Commit graph

10 commits

Author SHA1 Message Date
Michael Bestas
dc28234ecd
gs-common: Update init scripts from BP2A
Change-Id: Ibb8d3715ec6cb9ebb5d89e116374d468dfcad826
2025-06-23 19:29:30 +03:00
Brian Norris
17719c9da4 insmod.sh: Fix 'setprop' syntax
These all require a value.

Bug: 360934165
Test: run `/vendor/bin/insmod.sh` with a missing cfg file
Flag: EXEMPT bugfix
Change-Id: If6b3b95f1eb4fcc21ca9d3f47c174af80ee98187
2025-01-08 10:14:32 -08:00
Brian Norris
6b137ff16d insmod.sh: Support 'rmmod' directive
Some mechanisms (e.g., initramfs module lists) may be overzealous in
what modules get loaded on a system. It can save resources to remove
certain modules when we know they are going to be unused -- for example,
extraneous panel drivers only needed for other devices within a given
device family.

Bug: 360934165
Test: `rmmod|<module_name>.ko` added to init.insmod.<device>.cfg
Change-Id: Iddb588116a0526faded3396d54f54ef82deed44d
2024-10-18 15:10:16 -07:00
Juan Yescas
3b484f698e Revert "Add a different implementation of insmod.sh"
This reverts commit 99f848ed48.

Reason for revert: b/350767144#comment8

Bug: 350767144
Change-Id: I169af080656e8e871e3f6322b123eee8e681d530
2024-07-09 23:46:49 +00:00
Kelvin Zhang
99f848ed48 Add a different implementation of insmod.sh
Use soong namespace to branch a implementation of insmod.sh .
The newly added implementation is only added to PRODUCT_PACKAGE
for dev option enabled devices. The only change to the script is
skip loading kernel modules from vendor|system_dlkm when under 16K
mode.

Test: Dev option works
Bug: 319335586

This reverts commit 11eb02562d.

Change-Id: I5f5d4ee79be7f872ec321e93f58f6516974d0cad
2024-05-09 09:46:55 -07:00
Kelvin Zhang
03c030cd04 Revert "Skip loading kernel modules for 16K mode"
This reverts commit 959ba11426.

Reason for revert: aosp/3050544 breaks this CL

Change-Id: I9dcbcd3b8d6fb8f1e9c468cbca3ea7264bda264d
2024-04-25 00:49:19 +00:00
Kelvin Zhang
959ba11426 Skip loading kernel modules for 16K mode
For boot options, 16K kernel modules are all stored under vendor_boot.
So we can skip loading modules from vendor_dlkm/system_dlkm
if device is in 16K mode and boot option is enabled.

Bug: 293313353
Change-Id: I46c440a7ce67dfbd0cce83dadbd908dff144c583
2024-04-22 16:23:46 -07:00
Zheng Pan
b2a04f23d6 Support conditional insmod
Conditional insmod config file format

condinsmod|system_property_name|module1|module2

if getprop system_property_name == true;
    load module1
else
    load module2

Bug: 325647677
Change-Id: I0f2dd92caaefd707a626b9f80923aeab495d31a2
2024-03-12 18:21:05 -07:00
Robin Peng
dbf355ee8b insmod: Add support to load kernel modules from /system/lib/modules
Bug: 267429528
Change-Id: I15a375cf1adeab12b969b2e3185ea6f55317d886
Signed-off-by: Robin Peng <robinpeng@google.com>
2023-03-16 01:31:03 +00:00
Adam Shih
f15086f3d9 move insmod script to gs-common
Bug: 243763292
Test: boot to home
Change-Id: I43b281a5b1c77d1388bac356b6b2bf267dbe099c
2022-09-05 12:32:54 +08:00