18 Commits

Author SHA1 Message Date
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 11eb02562d7e89037c67f5a22a142b110b303a30.

Change-Id: I5f5d4ee79be7f872ec321e93f58f6516974d0cad
2024-05-09 09:46:55 -07:00
Juan Yescas
11eb02562d Revert "Add a different implementation of insmod.sh"
This reverts commit 60cc378f185e75899c62dc97c7fc3a55856525eb.

Reason for revert: thermal-service.pixel native crash many times

Bug: 339337171
Change-Id: Ibd228ea6a0950c2ff8449f7fd55a405fe9a0a99f
2024-05-09 13:24:05 +00:00
Kelvin Zhang
60cc378f18 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
Change-Id: Ice77c19cad47f299db113f11878182f37e0b6f91
2024-05-07 20:04:33 -07:00
Kelvin Zhang
03c030cd04 Revert "Skip loading kernel modules for 16K mode"
This reverts commit 959ba11426888cc5dfd054c04151fa69573c9eb5.

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
Adam Shih
4819623003 Merge " move libdump to dumpstate" into main am: b4e2f27c63 am: d740152953 am: 935e913d3e
Original change: https://android-review.googlesource.com/c/device/google/gs-common/+/2786040

Change-Id: I404b937b18400f0b657117907c152a3a22d5129c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-13 03:28:58 +00:00
Adam Shih
857f654a5b move libdump to dumpstate
Bug: 256065208
 Test: make dump_soc

Change-Id: Ia9a4bfd691c855fb6a7f170f575c40226a30467f
2023-10-13 00:11:23 +00: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
Robin Peng
f938468e2e Allow insmod-sh to install kernel modules from system_dlkm
reference:
https://source.android.com/docs/core/architecture/partitions/gki-partitions#selinux

Bug: 267429528
Change-Id: I7a675c0f089452379d5675a353fbfd866cfd3edc
Signed-off-by: Robin Peng <robinpeng@google.com>
2023-03-16 00:25:07 +00:00
Adam Shih
bd75d8f1ab close stream after use
Bug: 240530709
Test: adb bugreport
Change-Id: I251a0f8a8e7d6a233b201a0a79df6c1bca137cd0
2023-03-02 14:52:50 +08:00
Adam Shih
147df54dc6 create a function that copies a file
Bug: 240530709
Test: adb bugreport
Change-Id: Ie09b70a7b9b10e42c46618944fa598f6c0120db2
2023-03-01 13:11:35 +08:00
Adam Shih
d0f5360b76 create function dumpLog
Bug: 240530709
Test: adb bugreport
Change-Id: I036757f10f18f5dcf4faa6574a7280912348aef4
2023-02-21 14:14:44 +08:00
Adam Shih
4b68f5fe95 create a lib to hold commonly used functions
Bug: 240530709
Test: adb bugreport
Change-Id: Idcdcca968b65d2bd413b219d39fc1104dfc9f3b8
2022-10-18 13:38:13 +08:00
Bob Badour
96dc7772bf [LSC] Add LOCAL_LICENSE_KINDS to device/google/gs-common
Added SPDX-license-identifier-Apache-2.0 to:
  insmod/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I418b0b125007fd136ed0554f4656d50e2eeb845e
2022-09-08 09:17:37 -07:00
Adam Shih
e4a75e452a rename rc to avoid name collision
Bug: 245233839
Test: build pass
Change-Id: I9057ac78d1197fd098290282552805f91b80f02a
2022-09-06 14:56:27 +08:00
Adam Shih
8e524374dd move insert module script sepolicy to gs-common
Bug: 243763292
Test: boot to home with no relevant SELinux error
Change-Id: I6646fa4433fc1ccb94ac05f9cc8d7076a6a2d8cf
2022-09-06 10:39:35 +08: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