summaryrefslogtreecommitdiff
path: root/kernel/prebuilt_kernel_modules.go
AgeCommit message (Collapse)Author
2024-12-26Modify prebuilt_kernel_modules behave more like ↵ Jihoon Kang
`build-image-kernel-modules-depmod` This change defines a depmod staging directory for vendor_ramdisk partition prebuilt kernel modules, and also modifies the build commands of `modules.dep` to add the leading slash for vendor ramdisk kernel modules. Test: unpack and diff soong and make generated vendor ramdisk partitions Bug: 381104942 Change-Id: I0d14ed676983976e20c7aca98b1c06ce097b1682
2024-12-10Add a `prebuilt_kernel_modules` prop to skip debug symbol strip Spandan Das
`Strip_debug_symbols` will default to true. If this property is set to false explicitly, the .ko files will be installed without running llvm-strip. The use case for this is (system|vendor|odm)_dlkm filesystems, which package the source *.ko files without stripping debug symbols. This CL also fixes a bug where the output of `addLeadingSlashToPaths` was getting ignored, since it assigned its output to a variable that was scoped locally (via :=) instead of updating the variable in its outer scope (via =) Bug: 383357338 Test: mounted system_dlkm, vendor_dlkm, odm_dlkm image files built by make and soong (top of CL stack). NOTICE is the last diff. Change-Id: Ie5ecef0c3f6d024fe413106e17f22dee3fb18d61
2024-11-27Merge "Add options_file support for prebuilt_kernel_modules" into main Treehugger Robot
2024-11-27Add options_file support for prebuilt_kernel_modules Jihoon Kang
The build rule for the options file is pretty much identical to that of the blocklist file, thus this change is inspired from https://r.android.com/3344224, which added the blocklist_file support for the module. Test: diff vendor_ramdisk/lib/modules/modules.options Bug: 381104942 Change-Id: I3eec03ca5233dce5b8d7ddab3ae50874a52539be
2024-11-27Specify correct install location for vendor_ramdisk prebuilt kernel module Jihoon Kang
vendor_ramdisk prebuilt kernel files are installed under `vendor_ramdisk/lib/modules` regardless of the product configuration in make. This change matches the behavior and allows the kernel files to be installed in the correct location. Test: m soong_generated_vendor_ramdisk_filesystem_test Bug: 381104942 Change-Id: Id2086de95f0554c849c1667ce190274232db6b99
2024-11-11Build and install modules.blocklist in prebuilt_kernel_modules Spandan Das
This ports `build-image-kernel-modules-blocklist-file` to Soong fsgen has been updated to set this property on the autogenerated dlkm filesystem modules. Test: verified that /vendor_dlkm/lib/modules.blocklist is same between kati and soong built vendor_dlkm Bug: 377562851 Bug: 377362016 Change-Id: I99425b8cc48128ac72aaad5a3fa09bf8e3a015eb
2024-11-08Make `runDepmod` behave more like `build-image-kernel-modules` Spandan Das
This CL adds the following to `prebuilt_kernel_modules` 1. System_deps property. This will be copied to the intermediates directory for running depmod, but will not be installed as part of this module. The use case for this is vendor_dlkm which depends on system_dlkm 2. Copy .ko files to staging directory based on their final install location on device. More details on (2): At ToT, the .ko files are copied to $intermediates/lib/modules/0.0/*.ko The resulting modules.dep is foo.ko: bar.ko baz.ko However, android devices do not have a single dlkm partition, /lib/modules/, but we have split dlkm partitions. To ensure that the modules.dep file resembles the paths on device, the .ko files will be copied to the the following $intermediates/lib/modules/0.0/system/lib/modules/*.ko $intermediates/lib/modules/0.0/vendor/lib/modules/*.ko $intermediates/lib/modules/0.0/odm/lib/modules/*.ko The resulting modules.dep is /vendor/lib/modules/foo.ko: /vendor/lib/modules/bar.ko /system/modules/lib/baz.ko Bug: 377562851 Test: verified that modules.* files are bit-identical for system_dlkm, vendor_dlkm, odm_dlkm between kati and soong for aosp CF (top of CL stack) Change-Id: I000b45dcba041b03d86fb971d45b54147250148e
2024-11-08Make `runDepmod` behave more like `build-image-kernel-modules` Spandan Das
modules.load defaults to filenames of the .ko files listed in `srcs`. This CL adds a property to skip this behvaior, thereby creating an empty modules.load file. This will be used to build system_dlkm.img of some products whose `BOARD_SYSTEM_KERNEL_MODULES_LOAD` is empty. Bug: 377562851 Test: verified that /system_dlkm/lib/modules/modules.dep is empty for both kati and soong for aosp cf Test: verified that modules.* files are not created for odm_dlkm.img built with soong (top of CL stack) Change-Id: I8a0304fda1b5cc2ea0d1f36334877beca26f1d8a
2024-11-05Autogenerate a system_dlkm android_filesystem Spandan Das
This .img file will package the .ko files returned by `BOARD_SYSTEM_KERNEL_MODULES` (plus some other files). The .ko files will be clustered by directory, and a `prebuilt_kernel_modules` will be automatically created for each cluster. These will then be added to the deps of the top-level system_dlkm android_filesystem. Bug: 376726109 Test: m out/soong/.intermediates/build/soong/fsgen/soong_filesystem_creator/android_common/diff_test_aosp_cf_x86_64_phone_generated_system_dlkm_image.txt KATI only installed file(s): etc/NOTICE.xml.gz etc/build.prop etc/fs_config_dirs etc/fs_config_files Change-Id: I96669ad9595379c4de4c67331fc56bfa8d93e036
2023-11-06Add installable to prebuilt_kernel_modules Inseob Kim
Some kernel prebuilt modules are only meant to be included in android_filesystem module, not to be installed to the device. To support such use case, adding installable property. Bug: 305118971 Test: build Change-Id: Ie945fe1f8a20a2a1fea9a44bc36f94dc73fa2a40
2021-03-29Convert kernel package to use test fixtures Paul Duffin
Bug: 181070625 Test: m nothing Change-Id: Ibd3cc62feec1b911d74451d53cea81607d3bec36
2021-02-05Install ko to /lib/modules Jiyong Park
... not to /lib/module Bug: 178980227 Test: m Change-Id: I6a5357e9e83e736181b885b64c76e0b7e5ffadf2
2021-02-02add prebuilt_kernel_modules module Jiyong Park
prebuilt_kernel_modules is a build rule for processing and installing kernel module files. The module files are processed by depmod to build modules.{load|alias|deps|softdeps} files. Debug symbols are stripped from the module files and then all the files are installed to ./lib/modules/<kernel_version> directory. This is the Soong-equivalent of the 'build-image-kernel-modules-dir` macro and is expected to replace it in the future. Bug: 178980227 Test: m Change-Id: I772ac816824921d275869e35b93a083d239a2450