summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-02-06build_utils.sh: Ignore MODULES_[RECOVERY|CHARGER]_LIST for system_dlkmandroid-u-qpr3-beta-2.1_r0.7android-u-qpr3-beta-2.1_r0.5android-u-qpr3-beta-2.1_r0.4android-u-qpr3-beta-2.1_r0.3android-u-qpr3-beta-2.1_r0.2android-u-qpr3-beta-2.1_r0.1android-15-dp-2_r0.5android-15-dp-2_r0.4android-15-dp-2_r0.3android-15-dp-2_r0.2android-15-beta-1_r0.6android-15-beta-1_r0.5android-15-beta-1_r0.4android-15-beta-1_r0.3android-15-beta-1_r0.2android-15-beta-1_r0.1android-14.0.0_r0.76android-14.0.0_r0.75android-14.0.0_r0.74android-14.0.0_r0.73android-14.0.0_r0.72android-14.0.0_r0.71android-14.0.0_r0.66android-14.0.0_r0.65android-14.0.0_r0.64android-14.0.0_r0.63android-14.0.0_r0.62android-14.0.0_r0.61android-gs-tangorpro-5.10-android15-dpandroid-gs-tangorpro-5.10-android15-betaandroid-gs-tangorpro-5.10-android14-qpr3-betaandroid-gs-tangorpro-5.10-android14-qpr2android-gs-raviole-5.10-android15-dpandroid-gs-raviole-5.10-android15-betaandroid-gs-raviole-5.10-android14-qpr3-betaandroid-gs-raviole-5.10-android14-qpr2android-gs-pantah-5.10-android15-dpandroid-gs-pantah-5.10-android15-betaandroid-gs-pantah-5.10-android14-qpr3-betaandroid-gs-pantah-5.10-android14-qpr2android-gs-lynx-5.10-android15-dpandroid-gs-lynx-5.10-android15-betaandroid-gs-lynx-5.10-android14-qpr3-betaandroid-gs-lynx-5.10-android14-qpr2android-gs-felix-5.10-android15-dpandroid-gs-felix-5.10-android15-betaandroid-gs-felix-5.10-android14-qpr3-betaandroid-gs-felix-5.10-android14-qpr2android-gs-bluejay-5.10-android15-dpandroid-gs-bluejay-5.10-android15-betaandroid-gs-bluejay-5.10-android14-qpr3-betaandroid-gs-bluejay-5.10-android14-qpr2Isaac J. Manjarres
The system_dlkm partition consists of GKI modules, which are not loaded during first-stage init. However, the MODULES_[RECOVERY|CHARGER]_LIST arguments specify vendor modules that must be loaded during first stage init. Therefore, it does not make sense to consider these lists when building system_dlkm.img, so do not consider them. Bug: 322408856 Bug: 323710246 Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com> (cherry picked from https://android-review.googlesource.com/q/commit:4daab96c0623f571c0eefbb0a4fe2d955e86fdea) Merged-In: I50fb42b40a94b0b53d5a2cda676d39b919395538 Change-Id: I50fb42b40a94b0b53d5a2cda676d39b919395538
2024-01-22kleaf: checkpatch: Ignore BAD_REPORTED_BY_LINKandroid-u-qpr3-beta-2_r0.7android-u-qpr3-beta-2_r0.6android-u-qpr3-beta-2_r0.5android-u-qpr3-beta-2_r0.4android-u-qpr3-beta-2_r0.3android-u-qpr3-beta-2_r0.2android-15-dp-2_r0.6android-15-dp-2_r0.1John Stultz
If you include a Reported-by: tag, checkpatch will warn with BAD_REPORTED_BY_LINK if there is not a URL link to where the report was made. While these links are nice, and should be included where possible, they shouldn't be required as often reports come in private email, and we should make sure to credit reporters even if there isn't a public URL for that report. Change-Id: I1a06a5c28c3dd9f7b365b475cbb446ba6d48c13c Signed-off-by: John Stultz <jstultz@google.com>
2023-11-30build_utils.sh: update the SPL for developmentandroid-wear-13.0.0_r0.14android-wear-13.0.0_r0.12android-u-qpr3-beta-1_r0.7android-u-qpr3-beta-1_r0.5android-u-qpr3-beta-1_r0.4android-u-qpr3-beta-1_r0.3android-u-qpr3-beta-1_r0.2android-u-qpr3-beta-1_r0.1android-u-qpr2-beta-3_r0.7android-u-qpr2-beta-3_r0.6android-u-qpr2-beta-3_r0.5android-u-qpr2-beta-3_r0.4android-u-qpr2-beta-3_r0.3android-u-qpr2-beta-3_r0.2android-u-qpr2-beta-3.1_r0.7android-u-qpr2-beta-3.1_r0.5android-u-qpr2-beta-3.1_r0.4android-u-qpr2-beta-3.1_r0.3android-u-qpr2-beta-3.1_r0.2android-u-qpr2-beta-3.1_r0.1android-15-dp-1_r0.7android-15-dp-1_r0.5android-15-dp-1_r0.4android-15-dp-1_r0.3android-15-dp-1_r0.2android-15-dp-1_r0.1android-14.0.0_r0.56android-14.0.0_r0.55android-14.0.0_r0.54android-14.0.0_r0.53android-14.0.0_r0.52android-14.0.0_r0.51android-msm-eos-android13-wear-kr3-pixel-watchandroid-gs-tangorpro-5.10-android14-qpr2-betaandroid-gs-raviole-5.10-android14-qpr2-betaandroid-gs-pantah-5.10-android14-qpr2-betaandroid-gs-lynx-5.10-android14-qpr2-betaandroid-gs-felix-5.10-android14-qpr2-betaandroid-gs-bluejay-5.10-android14-qpr2-betaWill McVicker
The SPL in the platform build is being updated more frequently than originally anticipated (previously it was updated quarterly in the trunk_staging builds). Now the trunk staging SPL follows the monthly SPL. To accomidate this, this patch updates the development build's SPL to pick the QPR date after the next QPR, e.g. Nov 2023 builds would pick March 2024. Note, as a reminder, this is only applied for development GKI boot images (not certified GKI boot images). Bug: 274825778 Change-Id: I4b746e417d8b0403ad7a2cb21a83001cd1ecbd40 Signed-off-by: Will McVicker <willmcvicker@google.com>
2023-11-07build_utils: Add support to boot custom kernels without wipingandroid-u-qpr2-beta-2_r0.7android-u-qpr2-beta-2_r0.5android-u-qpr2-beta-2_r0.4android-u-qpr2-beta-2_r0.3android-u-qpr2-beta-2_r0.2android-u-qpr2-beta-2_r0.1android-14.0.0_r0.44android-14.0.0_r0.43android-14.0.0_r0.42android-14.0.0_r0.41android-14.0.0_r0.40android-14.0.0_r0.39android-14.0.0_r0.37android-14.0.0_r0.36android-14.0.0_r0.35android-14.0.0_r0.34android-14.0.0_r0.33android-14.0.0_r0.31android-gs-tangorpro-5.10-android14-qpr1android-gs-raviole-5.10-android14-qpr1android-gs-pantah-5.10-android14-qpr1android-gs-lynx-5.10-android14-qpr1android-gs-felix-5.10-android14-qpr1android-gs-bluejay-5.10-android14-qpr1Will McVicker
The following is implemented: * Add hashtree footer to vendor_dlkm. * Add SPL to boot.img This allows developers to flash a custom kernel on an unlocked device without having to wipe the device (based on SPL) or disable verification (based on AVB hashtree requirement). Test: verify custom boot.img boots without wiping on O6 Test: verify custom vendor_dlkm.img boots without wiping on O6 Bug: 274825778 Change-Id: I685199eb11bfc5a4bdf545170ec136b327f992ad Signed-off-by: Will McVicker <willmcvicker@google.com>
2023-08-23kleaf: checkpatch: add COMPLEX_MACRO into checkpatch ignore listandroid-u-qpr2-beta-1_r0.6android-u-qpr2-beta-1_r0.5android-u-qpr2-beta-1_r0.4android-u-qpr2-beta-1_r0.3android-u-qpr2-beta-1_r0.2android-u-qpr2-beta-1_r0.1android-u-qpr1-beta-2_r0.7android-u-qpr1-beta-2_r0.5android-u-qpr1-beta-2_r0.4android-u-qpr1-beta-2_r0.3android-u-qpr1-beta-2_r0.2android-u-qpr1-beta-2_r0.1android-u-qpr1-beta-2.2_r0.6android-u-qpr1-beta-2.2_r0.5android-u-qpr1-beta-2.2_r0.4android-u-qpr1-beta-2.2_r0.3android-u-qpr1-beta-2.2_r0.2android-u-qpr1-beta-2.2_r0.1android-u-qpr1-beta-2.1_r0.7android-u-qpr1-beta-2.1_r0.5android-u-qpr1-beta-2.1_r0.4android-u-qpr1-beta-2.1_r0.3android-u-qpr1-beta-2.1_r0.2android-u-qpr1-beta-2.1_r0.1android-u-qpr1-beta-1_r0.7android-u-qpr1-beta-1_r0.5android-u-qpr1-beta-1_r0.4android-u-qpr1-beta-1_r0.3android-u-qpr1-beta-1_r0.2android-u-qpr1-beta-1_r0.1android-14.0.0_r0.25android-14.0.0_r0.23android-14.0.0_r0.22android-14.0.0_r0.21android-14.0.0_r0.19android-14.0.0_r0.17android-14.0.0_r0.16android-14.0.0_r0.15android-14.0.0_r0.14android-14.0.0_r0.13android-14.0.0_r0.11android-13.0.0_r0.127android-13.0.0_r0.126android-13.0.0_r0.125android-13.0.0_r0.124android-13.0.0_r0.123android-13.0.0_r0.121android-gs-tangorpro-android14-releaseandroid-gs-tangorpro-5.10-u-qpr1-beta2android-gs-tangorpro-5.10-android14-qpr1-betaandroid-gs-tangorpro-5.10-android13-qpr3android-gs-raviole-android14-releaseandroid-gs-raviole-5.10-u-qpr1-beta2android-gs-raviole-5.10-android14-qpr1-betaandroid-gs-raviole-5.10-android13-qpr3android-gs-pantah-android14-releaseandroid-gs-pantah-5.10-u-qpr1-beta2android-gs-pantah-5.10-android14-qpr1-betaandroid-gs-pantah-5.10-android13-qpr3android-gs-lynx-android14-releaseandroid-gs-lynx-5.10-u-qpr1-beta2android-gs-lynx-5.10-android14-qpr1-betaandroid-gs-lynx-5.10-android13-qpr3android-gs-felix-android14-releaseandroid-gs-felix-5.10-u-qpr1-beta2android-gs-felix-5.10-android14-qpr1-betaandroid-gs-felix-5.10-android13-qpr3-candroid-gs-bluejay-android14-releaseandroid-gs-bluejay-5.10-u-qpr1-beta2android-gs-bluejay-5.10-android14-qpr1-betaandroid-gs-bluejay-5.10-android14android-gs-bluejay-5.10-android13-qpr3guibing
The checkpatch could produce false positive COMPLEX_MACRO type validation failure. It generates error for presubmit check. Test: N/A Bug: 289151587 Change-Id: I36b82cd26e0875ef0386624b23c8175a031d04c5 (cherry picked from commit 8276b10716fef6ae198ad9a59963795460197c60)
2023-07-24kleaf: common_kernels allows setting kmi_symbol_list_add_only.android-u-beta-5.3_r0.7android-u-beta-5.3_r0.5android-u-beta-5.3_r0.4android-u-beta-5.3_r0.2android-u-beta-5.3_r0.1android-14.0.0_r0.7android-14.0.0_r0.6android-14.0.0_r0.5android-14.0.0_r0.4android-14.0.0_r0.3android-14.0.0_r0.2android-gs-tangorpro-5.10-u-beta5.3android-gs-tangorpro-5.10-android14android-gs-raviole-5.10-u-beta5.3android-gs-raviole-5.10-android14android-gs-pantah-5.10-u-beta5.3android-gs-pantah-5.10-android14android-gs-lynx-5.10-android14android-gs-felix-5.10-u-beta5.3android-gs-felix-5.10-android14android-gs-bluejay-5.10-u-beta5.3Yifan Hong
Allow setting kmi_symbol_list_add_only on common_kernels.target_configs. Test: TH Bug: 292106238 Change-Id: I08c7162a8e978ce9de2c6be0f6ed8fee59bbf86a
2023-06-28kleaf: Set-ffile-prefix-map to real workspace rootYifan Hong
For android13-5.10, the kernel image uses the realpath to stdarg.h under prebuilts. For sandbox builds, this means the real workspace root appears in the final artifact, affecting hermeticity and emitting absolute paths to ABI dump XML file. Determine the real workspace root by using ${{ROOT_DIR}}/${{KERNEL_DIR}}/Makefile as an anchor. If Makefile does not exist, we are not executing Kbuild, so it is fine that KCPPFLAGS are not set properly. Bug: 287304304 Test: tools/bazel run //common:kernel_aarch64_abi_update --lto=thin and examine output Change-Id: Icf55624d221238bc90dee94876fae609fd2b7894
2023-06-28build.sh: Enable support for KASAN SW tags.Venkata Rao Kakani
Added support for configuring kasan with sw tags. Bug: 289171848 Change-Id: I79b7920360e55d7b7f94eba7a9537c108f642984 Signed-off-by: Venkata Rao Kakani <quic_vkakani@quicinc.com>
2023-06-01kleaf: Keep a copy of Module.symvers for GKIandroid-u-beta-4_r0.7android-u-beta-4_r0.5android-u-beta-4_r0.4android-u-beta-4_r0.3android-u-beta-4_r0.2android-u-beta-4_r0.1android-13.0.0_r0.117android-13.0.0_r0.116android-13.0.0_r0.115android-13.0.0_r0.114android-13.0.0_r0.113android-13.0.0_r0.112android-gs-tangorpro-5.10-u-beta4android-gs-raviole-5.10-u-beta4android-gs-pantah-5.10-u-beta4android-gs-lynx-5.10-u-beta4android-gs-felix-5.10-u-beta4android-gs-felix-5.10-android13-qpr3android-gs-bluejay-5.10-u-beta4Ulises Mendez Martinez
Bug: 265923948 Change-Id: I46e06bd17da3bbbcc44185e6231034fb65cc2ed3 Signed-off-by: Ulises Mendez Martinez <umendez@google.com> (cherry picked from commit b51b753d6b55deb76b29cffd47a4abc592418fcd)
2023-06-01kleaf: Support to keep a copy of Module.symversUlises Mendez Martinez
Bug: 265923948 Change-Id: I9633c5a8380927de4bfe97b7862c72b2970a675f Signed-off-by: Ulises Mendez Martinez <umendez@google.com> (cherry picked from commit 89625d0dd0befc78600aa141a26314484911da81)
2023-06-01kleaf: Fix buildifier warnings in kernel_build fileUlises Mendez Martinez
Bug: 265923948 Change-Id: I5e593ad899cef6903e53f782c02bfa612e3c475f Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-05-25Fix Buildifier findingsMatthias Männich
Change-Id: Icfcfee4bafad59b8fdc2a1c3daf677d116639954 Signed-off-by: Matthias Männich <maennich@google.com>
2023-05-02build_utils.sh: Add support for specifying modules for recovery/chargerandroid-u-beta-3_r0.3android-u-beta-3_r0.2android-u-beta-2.1_r0.4android-u-beta-2.1_r0.3android-u-beta-2.1_r0.2android-13.0.0_r0.107android-13.0.0_r0.106android-13.0.0_r0.105android-13.0.0_r0.104android-13.0.0_r0.103android-13.0.0_r0.100android-gs-raviole-5.10-u-beta3android-gs-raviole-5.10-u-beta2android-gs-pantah-5.10-u-beta2android-gs-bluejay-5.10-u-beta3android-gs-bluejay-5.10-u-beta2Isaac J. Manjarres
Currently, build.sh makes it so that the same modules.load file is used for normal boot and booting into recovery/fastbootd and charger modes during first-stage init. This means that during normal boot, the modules that are needed for recovery and charger modes are loaded during first-stage init, which is not required. Add support for specifying a list of modules that are required for booting into recovery or charger mode, in addition to the set of modules loaded during first-stage init. This introduces two new environment variables called MODULES_RECOVERY_LIST and MODULES_CHARGER_LIST, which point to files that contain lists the modules that are needed for booting into recovery or charger mode respectively, in addition to the modules required for first-stage init (defined by MODULES_LIST). Defining MODULES_[RECOVERY/CHARGER]_LIST also produces a file named modules.load.[recovery/charger] in the initramfs, which init uses instead of modules.load when booting into recovery or charger mode respectively to load the first-stage init and recovery and charger modules. In case of normal boot, init will use the modules.load file, which will only contain the modules needed for first stage-init, and the recovery and charger modules will be loaded from from the vendor_dlkm partition during second-stage init. Bug: 266752750 Change-Id: I11503b11683ef64cf0933b8641959ea5acd63ab1 Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
2023-05-02kleaf: cleanup: Fix buildifier linter warnings.Ulises Mendez Martinez
* Buildifier provides linter recommendations when `--lint=warn` is used, so adding the ones for these files before working with them so the cleanup changes are separated from the actual changes. Bug: 236012223 Bug: 252888476 Signed-off-by: Ulises Mendez Martinez <umendez@google.com> Change-Id: I5d1c5a8bfd99d2efbe8f32420225507ac8296d31 [isaacmanjarres: Did not apply the portion of the patch in kernel_images.bzl that refers to kwargs, as it is not necessary on this branch.] Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
2023-01-17kleaf: kernel_abi_dist only depends on kernel_build (with_vmlinux).android-u-preview-2_r0.4android-u-preview-2_r0.3android-u-preview-2_r0.2android-u-beta-2_r0.4android-u-beta-2_r0.3android-u-beta-2_r0.2android-u-beta-1_r0.5android-u-beta-1_r0.4android-u-beta-1_r0.3android-t-qpr3-beta-3_r0.5android-t-qpr3-beta-3_r0.4android-t-qpr3-beta-3_r0.3android-t-qpr3-beta-3.1_r0.5android-t-qpr3-beta-3.1_r0.4android-t-qpr3-beta-3.1_r0.3android-t-qpr3-beta-2_r0.5android-t-qpr3-beta-2_r0.4android-t-qpr3-beta-2_r0.3android-t-qpr3-beta-1_r0.5android-t-qpr3-beta-1_r0.4android-t-qpr3-beta-1_r0.3android-t-qpr3-beta-1_r0.1android-t-qpr2-beta-3.2_r0.5android-13.0.0_r0.93android-13.0.0_r0.92android-13.0.0_r0.91android-13.0.0_r0.85android-13.0.0_r0.84android-13.0.0_r0.83android-13.0.0_r0.82android-13.0.0_r0.77android-13.0.0_r0.75android-13.0.0_r0.74android-13.0.0_r0.73android-13.0.0_r0.70android-13.0.0_r0.69android-13.0.0_r0.68android-13.0.0_r0.64android-gs-tangorpro-5.10-android13-d2android-gs-raviole-5.10-u-preview-2android-gs-raviole-5.10-u-beta1android-gs-raviole-5.10-t-qpr3-beta-3android-gs-raviole-5.10-t-qpr3-beta-2android-gs-raviole-5.10-android13-qpr3-beta1android-gs-raviole-5.10-android13-qpr2android-gs-pantah-5.10-u-preview-2android-gs-pantah-5.10-u-beta1android-gs-pantah-5.10-t-qpr3-beta-3android-gs-pantah-5.10-t-qpr3-beta-2android-gs-pantah-5.10-android13-qpr3-beta1android-gs-pantah-5.10-android13-qpr2android-gs-lynx-5.10-android13-qpr2-bandroid-gs-felix-5.10-android13-d3android-gs-bluejay-5.10-u-preview-2android-gs-bluejay-5.10-u-beta1android-gs-bluejay-5.10-t-qpr3-beta-3android-gs-bluejay-5.10-t-qpr3-beta-2android-gs-bluejay-5.10-t-qpr2-beta-3android-gs-bluejay-5.10-android13-qpr3-beta1android-gs-bluejay-5.10-android13-qpr2Yifan Hong
For example, kernel_aarch64_abi_dist only depends on kernel_aarch64_with_vmlinux. This is so that we aren't building kernel_aarch64 twice, once for ABI artifacts, the other for dist artifacts. Bug: 264710236 Test: manual Change-Id: I47d757fb10544ede2061f34d7591835fdf485b8f
2023-01-17kleaf: Refactor logic for defining extra targets for GKI.Yifan Hong
Move them to a separate macro for reuse. Test: TH Bug: 264710236 Change-Id: I58d0685d1ea95df59703bc7e5ca5c02251e5ea83
2023-01-10kleaf: set KBUILD_SYMTYPES for ABI targets.android-t-qpr2-beta-3_r0.5android-t-qpr2-beta-3_r0.4android-t-qpr2-beta-3_r0.3android-t-qpr2-beta-3.2_r0.6android-gs-raviole-5.10-android13-qpr2-betaandroid-gs-pantah-5.10-t-qpr2-beta-3.2android-gs-pantah-5.10-android13-qpr2-betaandroid-gs-bluejay-5.10-android13-qpr2-betaYifan Hong
This was missing, causing differences in behavior against build_abi.sh Test: manual Bug: 264263657 Change-Id: I8eadf1478c9dbd2afd609e9f6834e029f3c3acf9
2023-01-06symbols.deny: add PageMovableandroid-u-preview-1_r0.3android-gs-bluejay-5.10-u-preview-1Greg Kroah-Hartman
This is not a symbol that drivers should be attempting to use and is being removed from upstream as an export. Change-Id: Idd0731fc112f93f4f9bb5c1588307067f4258894 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-01-03kleaf: Enable full console logsandroid-u-preview-1_r0.4android-u-preview-1_r0.2android-gs-raviole-5.10-u-preview-1android-gs-pantah-5.10-u-preview-1Will McVicker
By default, the bazel output only writes to the console up to 1048576 bytes. If you hit this limit, then a message like this is printed: stdout (.../bazel-out/_tmp/actions/stdout-6) 21226460 exceeds maximum size of --experimental_ui_max_stdouterr_bytes=1048576 bytes; skipping and the remaining output will be redirected to the file above. This message is (1) hard to find in the build logs and (2) there is no message printed at the end of the build invocation to indicate some of the logs were redirected to a file. This makes it extra hard to debug with kleaf since you may not even know parts of the logs are hidden away deep (10 directories!) within the bazel-out folder. The use-case that hits this consistently is when you build with the flag --debug_annotate_scripts which is equivalent to: `set -x; make V=1`. This patch disables the limit so that everything gets written to the console (stdout/stderr) without any limitation. Refer to [1] for details on this flag. [1] https://bazel.build/reference/command-line-reference#flag--experimental_ui_max_stdouterr_bytes Bug: 263392927 Change-Id: Ia17636f613f846dcbdebb6d5ccd98a90ca013635 (cherry picked from commit 46ea0da28e68bf340e2870c4048c72c9125b975b)
2022-12-16build.sh: Set FRAME_WARN to 0 in LTO=none buildsPeter Collingbourne
In development builds such as sanitizer and LTO=none builds we may end up with frame sizes that exceed the size limit due to compiler implementation details. It is useful to enforce the limit in shipping builds but not for these development builds. We are already setting FRAME_WARN to 0 in KASan builds. Do likewise for LTO=none builds. Change-Id: Iefe991d5e6e231c3ee22ed313d7568d99a655619 (cherry picked from commit bfaf00f82aff51e06c01eb42bbcd6422d8ac1da0)
2022-10-27kleaf: extract_symbol with GKI modules objectsandroid-t-qpr2-beta-2_r0.5android-t-qpr2-beta-2_r0.4android-t-qpr2-beta-2_r0.3android-t-qpr2-beta-1_r0.6android-t-qpr2-beta-1_r0.5android-t-qpr2-beta-1_r0.4android-13.0.0_r0.76android-13.0.0_r0.60android-13.0.0_r0.59android-13.0.0_r0.58android-13.0.0_r0.55android-13.0.0_r0.54android-13.0.0_r0.53android-gs-raviole-5.10-t-qpr2-beta-1android-gs-raviole-5.10-android13-qpr1android-gs-pantah-5.10-t-qpr2-beta-1android-gs-pantah-5.10-android13-qpr1android-gs-lynx-5.10-android13-d4android-gs-bluejay-5.10-t-qpr2-beta-1android-gs-bluejay-5.10-android13-qpr1Ramji Jiyani
Due to change f67eea6aa43b30326960b39fe5f4c99c1519b86a (kleaf: Do not include GKI modules in default output of //common:kernel_aarch64.) and relevant changes, GKI modules are no longer listed as default outputs of the GKI kernel //common:kernel_aarch64, causing the `in_tree_modules` list to be empty in extracted_symbols rule. Backporting this change fixes the issue by also extracting the full modules_staging_dir, which contains all GKI modules. Bug: 246716067 Test: manual (bazel run //common:kernel_aarch64_abi_update_symbol_list, see no change) Signed-off-by: Yifan Hong <elsk@google.com> ---- Original commit message: To partition between GKI and vendor modules on the fly; we need to pass GKI modules from the base_kernel build in addition to vendor modules. Remove passing the list and pass the modules instead from the base_kernel first and then the vendor modules overwriting the modules from the base build being overridden. Bug: 245404948 Bug: 232431411 Test: TH Signed-off-by: Ramji Jiyani <ramjiyani@google.com> Change-Id: I2f40943d0d4f0a65cc7ab47a5064caff7fbf39b4
2022-10-27kleaf: refactor common constants for MODULES_STAGING_ARCHIVE.Yifan Hong
Test: TH Change-Id: I434bf0933edd3656f5ea59a0edb5c481bb4840f7 Signed-off-by: Yifan Hong <elsk@google.com>
2022-10-21kleaf: ABI add MAKE_GOALS += vmlinuxYifan Hong
Always add vmlinux to MAKE_GOALS for ABI targets. Otherwise, it is not built without the existence of base_kernel. Test: build slider_abi_dist Bug: 254328713 Change-Id: Ib720e21dcd28fa4e8703787c7938a516902779e6
2022-10-19kleaf: Always run depmod for GKI builds.Yifan Hong
Even though there are no external modules, running kernel_modules_install (depmod) is necessary because we have in-tree GKI modules. Test: TH Bug: 254127112 Change-Id: I506d583bc8715ef7433d467e8170f48db141d4de
2022-10-19kleaf: docs: Add missing KMI_SYMBOL_LIST_ADD_ONLYUlises Mendez Martinez
Bug: 248004337 Signed-off-by: Ulises Mendez Martinez <umendez@google.com> Change-Id: I99ec941b8f13766395fa370843af67d5abfd8aab (cherry picked from commit 0698da54e1ab185a197346e0a37c377838500d8b)
2022-10-19kleaf: kernel_module kernel_module_deps -> depsYifan Hong
There'll be additional deps that are not kernel_module, especially for ddk_module. So deprecate the kernel_module_deps attribute and use the standard name, deps. Test: TH Bug: 211515836 Change-Id: Idb0bacc0a0add23bad01fffc5bed65ee0a88580b (cherry picked from commit 0382f35d937ca53f2ba232552e1b18c7533633cb)
2022-10-18compare_to_symbol_list: Fix script name in UsageRamji Jiyani
Bug: 232431411 Test: TH Signed-off-by: Ramji Jiyani <ramjiyani@google.com> Change-Id: Ib1cf9aa082f01792845a38caddf1bf66af6f881a
2022-10-17kleaf: device modules takes priority over GKI modules in unstrippedYifan Hong
In the case when the device also builds the modules with the same name as the GKI modules, the device module should take priority. Test: manually inspect the final unstripped modules archive Bug: 250097199 Change-Id: Ibc92edfbbc64f7951cfa063a7fe14761083b05c0
2022-10-17kleaf: Do not use Target's in KernelUnstrippedModulesInfoYifan Hong
It is not "Bazellic" to contain Target's in infos, but better to put necessary information only. Bug: 247622808 Bug: 247624301 Test: manual (check order in srcs in kernel_unstripped_modules_archive.bzl) Change-Id: Ic1891d99ec7bd24b07d30873e4f223263c1add38
2022-10-12kleaf: unstripped modules archive allow collisions.Yifan Hong
Collisions are unavoidable with GKI modules, because both the unstripped dir from GKI modules and the dir from device modules contains the device-built GKI modules (e.g. slider builds zsmalloc). Hence, just allow collisions. Test: build slider_unstripped_modules_archive Bug: 228557644 Bug: 253309286 Change-Id: Ia90a59a110ac80860ae47fb895cce6a03c76c929
2022-09-22kleaf: Rename files from ABI Extractionandroid-t-qpr1-beta-3_r0.5android-t-qpr1-beta-3_r0.4android-t-qpr1-beta-3_r0.3android-t-qpr1-beta-3.1_r0.1android-13.0.0_r0.50android-13.0.0_r0.49android-13.0.0_r0.48main-16k-gs-raviole-5.10android-gs-raviole-5.10-android13-qpr1-beta-3android-gs-pantah-5.10-t-qpr1-beta-3android-gs-pantah-5.10-android13-qpr1-beta-3android-gs-bluejay-5.10-android13-qpr1-beta-3Ulises Mendez Martinez
Bug: 243136716 Signed-off-by: Ulises Mendez Martinez <umendez@google.com> Change-Id: I08851cd40b250b73f471bcf42a1ad5e9426f896d (cherry picked from commit aa63643d678e6e8e00a297823f3d75e63bb0abb0)
2022-09-15kleaf: Fix kernel_module.outs = None failureYifan Hong
_kernel_module_set_defaults sets the defaults in kwargs but it doesn't mutate the original local variable outs. Test: TH Change-Id: Ib5929ccc51a2fa225f779c64d24da9fba405c5c4
2022-09-15Revert "kleaf: exclude backup files in glob expression"Yifan Hong
This reverts commit 67e88a473c41adb934edc961f54fe7b9932b4578. Reason for revert: we'll use solution to not glob Change-Id: Ie0ae4bb1c053d65a4d593fe81da40579aa2cfd46
2022-09-14kleaf: exclude backup files in glob expressionYifan Hong
... where the result of the glob expression is used in conditionals in Bazel macros and rules. The most significant one is where we look for KMI symbol lists. Also exclude backup files create by some editors to avoid the ABI monitoring tools to add unexpected files (e.g. android/abi_gki_aarch64.xml~). Test: TH Bug: 246344503 Change-Id: I26a757bbd6feaf5715b765186ce7dc02846fd666
2022-09-13kleaf: Support building boot-img.tar.gz for x86_64 GKI.Yifan Hong
boot-img.tar.gz is also available for x86_64 arch, so remove the conditional. Test: builds Bug: 245302247 Change-Id: Ib5699ee822e4eb2fc2a8f13db22c679d4d4bcad5 (cherry picked from commit 3ac8be54503d8bc9d893e902d51e75b6e3f7bda3)
2022-09-12Builds boot-img.tar.gz for x86_64 GKIBowgo Tsai
Unlike arm64 GKI, currently x86_64 GKI artifacts only include a boot.img without a boot-img.tar.gz. To support x86_64 GKI certification, we also need to build a boot-img.tar.gz for the signing server to start GKI certification process. Bug: 241497048 Test: BUILD_CONFIG=common/build.config.gki.x86_64 build/build.sh Change-Id: Iee877975c6b613af1fecb6dbc310988d465ec7f5 Signed-off-by: Bowgo Tsai <bowgotsai@google.com> (cherry picked from commit 3567ad13950c2619c5e29918d257d12a548a7853)
2022-09-09build_utils: Ignore no match failure in module trimming.John Moon
Currently, if no modules are matched by grep while trimming unused modules, the build fails. This is because Bazel is running the scripts with set -o pipefail. To fix, simply ignore the grep failures in the middle of the pipeline. Bug: 245744241 Change-Id: Ie730f7ce6756b69d704e749d2ad04b94baad087b Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2022-09-09kleaf: Fix bazel version.Yifan Hong
bazel version does not accept custom args like --//build/kernel/kleaf:cache_dir. Test: bazel version Bug: N/A Change-Id: I5ffcec021267ac8e3061848841b483c8e086a014 (cherry picked from commit 697977083abe458fc921c9496916c83a9a2615d8)
2022-09-09kleaf: Do not set --cache_dir for bazel query.Yifan Hong
It breaks the bazel query command. Test: manual Change-Id: Ia0478eb47d380721b2d6242a9df00675d8821931 (cherry picked from commit 515c020119a6f37bf4b3aef490741fa679e5d175)
2022-09-06kleaf: Fix link in impl.md.Yifan Hong
We no longer maintain the raviole-mainline branch on AOSP, but the raviole-5.15 branch is maintained. Test: none Change-Id: I4b376ae8378c4e9849582d3458ad96d2dcfa2315
2022-09-06Add short aliases for kernel_build.*outs.Yifan Hong
This enables the following labels for 5.15 branches //common:kernel_aarch64/zram.ko //common:kernel_aarch64/zsmalloc.ko Test: TH Bug: 244215515 Change-Id: I248ada8bc51645e567c3d73141562c3a46713f63
2022-09-06kleaf: Do not include GKI modules in default output of //common:kernel_aarch64.Yifan Hong
This change adds the `module_implicit_outs` mechanism to kernel_build that acts like `module_outs` but not added to default info (like implicit_outs). This allows us to exclude GKI modules from //common:kernel_aarch64 DefaultInfo. When a device kernel builds their own modules that conflicts with the GKI modules (zram and zsmalloc for android13-5.15), the dist target will produce a warning about conflicting source files. Hence, do not include zram and zsmalloc to the device dist targets by default when they include "//common:kernel_aarch64" only. If they wish to include zram and zsmalloc in the distribution on the android13-5.15 branch, they may add the following to the dist target: "//common:kernel_aarch64_modules", or individual modules: "//common:kernel_aarch64/drivers/block/zram/zram.ko", "//common:kernel_aarch64/mm/zsmalloc.ko", //common:kernel_aarch64_dist continues to include GKI modules defined by the branch. Bug: 244215515 Test: manual Change-Id: Id1c9fd9e603e9b2946cd59c7fde14d11ef7dd8b2
2022-08-15Kleaf: fix caching for --config=localMatthias Maennich
The --config=local mode was broken in that it would not actually cache the OUT_DIR across executions. This was due to the OUT_DIR being defined in the sandbox, relative to symlinked sources. It is not clear why the local mode worked before and what combination of changes broke it. This change restores is by adding a starlark flag --cache_dir that is used to define OUT_DIR in KernelEnv. Said flag is also understood by the bazel.py wrapper and set to a reasonable default within WORKSPACE if not defined. Yet in order to have $WORKSPACE/out/cache we need to also execute the KernelEnv rule in config=local mode. This lets --config=local and --config=fast cache OUT_DIR in $WORKSPACE/out/cached/<some_generated_name> across invocations. Further, by specifying --cache_dir=/some/fast/disk consistently across invocations, one can make use of a fast filesystem for caching; perhaps a tmpfs. In an experiment, this saves 50s when comparing --config=local and non --config=local incremental builds. Bug: 235632059 Bug: 241603176 Test: manual with the following: $ bazel build //common:kernel_dist && echo >> common/init/main.c && time bazel build //common:kernel_dist Takes 114 seconds for the second build; kernel_build() takes 97s. $ bazel build --config=local //common:kernel_dist && echo >> common/init/main.c && time bazel build --config=local //common:kernel_dist Takes 64 seconds for the second build; kernel_build() takes 40s. Signed-off-by: Matthias Maennich <maennich@google.com> Signed-off-by: Yifan Hong <elsk@google.com> Change-Id: I64fbfd928efd78fb5d3d3c3af6a5582fca22b0a5 (cherry picked from commit c2f2105abc6f729357a56a6c354ac9516a4a0907)
2022-08-11abitool.py: shorten ABI report paths by removing .stgGiuliano Procida
`diff_abi --abi-tool delegated` (which is what the build runs) produces a number of reports and compatibility links. This commit changes the reports as follows: * `abi.report{,.short}` are no longer copies of `abi.report.stg.short` * each `abi.report.stg.foo` is now `abi.report.foo` * `abi.report` is now a copy of `abi.report.short` Change-Id: I49aa71eb8e84ab5ecf2634180dcd62348c34c779 Test: manual Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-08-11abitool.py: simplify Delegated diff_abi codeGiuliano Procida
Now that `abidiff` is no longer invoked, we can get rid of a bunch of complexity that is no longer needed. Bug: 228843807 Change-Id: Ic233a17e26e6e060da0ebebb865907a49f1437dd Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-08-11abitool.py: diff_abi --abi-tool delegated no longer invokes abidiffGiuliano Procida
Farewell `abidiff` reporting. `abidiff` is still available as a pre-built binary and `diff_abi --abi-tool libabigail` should continue to work. We will not support such use-cases after Android 13. Bug: 228843807 Change-Id: Ief321b01a356774afc881c8fc13389bde73b454b Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-08-11abitool.py: repoint compatibility links at STG short reportGiuliano Procida
Various people and systems may continue to assume the existence of `abi.report` and `abi.report.short` files. This commit links both of them to `abi.report.stg.short`. Bug: 228843807 Change-Id: Ib6d61eaf9c7575c17ef8d312dabed3cf409bf056 Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-08-11abitool.py: prefer stgdiff reports over abidiff reportsGiuliano Procida
Now that `stgdiff --format short` also groups together removed and added symbols the reports are more suitable for inclusion in commit messages. Bug: 228843807 Change-Id: I8d65810c01218542603b7f01d53ed62717f3d984 Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-08-11abitool.py: remove dead stgdiff post-processing codeGiuliano Procida
It is no longer used. Bug: 231304878 Change-Id: I3dc69789b9d42903ec0b18d8005aae7cae713eaa Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-08-11abitool.py: replace stgdiff post-processing with own functionalityGiuliano Procida
This impacts `diff_abi --abi-tool delegated` which is what is used by AOSP kernel build tools. With this commit: * `stgdiff` is invoked with `--compare-options all` which causes * symbol type presence changes to be ignored * type definedness changes to be ignored * (these options are needed to deal with varying `abidw` output and replace specially coded post-processing) * `stgdiff` additionally produces a `short` format report * this includes all the existing report compression: * runs of CRC-only changes * runs of offset changes * and adds: * grouping together of symbol removals and additions * the `.stg.small.short` report has been removed * it was a post-processed version of `.stg.small` * but has been obsoleted by `.stg.short` * if STG finds a diff (but libabigail does not) then * the printed report is now the `.stg.short` one Bug: 231304878 Change-Id: Iffe29ea030558bbe422118cf082f24c3b14f0f72 Signed-off-by: Giuliano Procida <gprocida@google.com>