summaryrefslogtreecommitdiff
path: root/kernel
AgeCommit message (Collapse)Author
2025-02-12Don't panic in ModuleForTests and friends Colin Cross
Panicking in ModuleForTests and similar test helper functions was a mistake. Go's test runner stops running tests as soon as any test panics, which means debugging multiple tests panicking requires rerunning all the tests after fixing each panic to find the next one. Pass the *testing.T into ModuleForTests and friends so that it can call t.Fatalf instead. Test: all soong tests pass Change-Id: I5d0f2424eaf04fb795079e6d1e4b9469d8c7033c
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
2024-08-16Remove more internal fields from ModuleBase. Yu Liu
Bug: 358425833 Test: Manual compare the generated ninja and mk files and CI. Change-Id: I4edd0dc646ac035594f47cd9044cc4eb5f710e64
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-10Merge "Add LOCAL_LICENSE_KINDS to build/soong" Treehugger Robot
2021-02-06Add LOCAL_LICENSE_KINDS to build/soong Bob Badour
Added SPDX-license-identifier-Apache-2.0 to: Android.bp android/Android.bp android/soongconfig/Android.bp androidmk/Android.bp apex/Android.bp bazel/Android.bp bp2build/Android.bp bpf/Android.bp bpfix/Android.bp cc/Android.bp cc/config/Android.bp cc/libbuildversion/Android.bp cc/libbuildversion/tests/Android.bp cc/ndk_api_coverage_parser/Android.bp cc/ndkstubgen/Android.bp cc/symbolfile/Android.bp cmd/dep_fixer/Android.bp cmd/diff_target_files/Android.bp cmd/extract_apks/Android.bp cmd/extract_jar_packages/Android.bp cmd/extract_linker/Android.bp cmd/fileslist/Android.bp cmd/host_bionic_inject/Android.bp cmd/javac_wrapper/Android.bp cmd/merge_zips/Android.bp cmd/multiproduct_kati/Android.bp cmd/path_interposer/Android.bp cmd/pom2bp/Android.bp cmd/pom2mk/Android.bp cmd/sbox/Android.bp cmd/soong_build/Android.bp cmd/soong_env/Android.bp cmd/soong_ui/Android.bp cmd/zip2zip/Android.bp cmd/zipsync/Android.bp cuj/Android.bp dexpreopt/Android.bp dexpreopt/dexpreopt_gen/Android.bp env/Android.bp etc/Android.bp filesystem/Android.bp finder/Android.bp finder/cmd/Android.bp genrule/Android.bp jar/Android.bp java/Android.bp java/config/Android.bp kernel/Android.bp linkerconfig/Android.bp linkerconfig/proto/Android.bp makedeps/Android.bp partner/Android.bp phony/Android.bp python/Android.bp python/tests/Android.bp remoteexec/Android.bp rust/Android.bp rust/config/Android.bp scripts/Android.bp sdk/Android.bp sh/Android.bp shared/Android.bp symbol_inject/Android.bp symbol_inject/cmd/Android.bp sysprop/Android.bp tradefed/Android.bp ui/build/Android.bp ui/logger/Android.bp ui/metrics/Android.bp ui/metrics/proc/Android.bp ui/status/Android.bp ui/terminal/Android.bp ui/tracer/Android.bp xml/Android.bp zip/Android.bp zip/cmd/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: finder/fs/Android.bp third_party/zip/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ia47ca14f16b8c9f84f9d533a07e5b00e2c04e8d4
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