Age | Commit message (Collapse) | Author |
|
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
|
|
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>
|
|
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>
|
|
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>
|
|
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)
|
|
Allow setting kmi_symbol_list_add_only on common_kernels.target_configs.
Test: TH
Bug: 292106238
Change-Id: I08c7162a8e978ce9de2c6be0f6ed8fee59bbf86a
|
|
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
|
|
Added support for configuring kasan with sw tags.
Bug: 289171848
Change-Id: I79b7920360e55d7b7f94eba7a9537c108f642984
Signed-off-by: Venkata Rao Kakani <quic_vkakani@quicinc.com>
|
|
Bug: 265923948
Change-Id: I46e06bd17da3bbbcc44185e6231034fb65cc2ed3
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
(cherry picked from commit b51b753d6b55deb76b29cffd47a4abc592418fcd)
|
|
Bug: 265923948
Change-Id: I9633c5a8380927de4bfe97b7862c72b2970a675f
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
(cherry picked from commit 89625d0dd0befc78600aa141a26314484911da81)
|
|
Bug: 265923948
Change-Id: I5e593ad899cef6903e53f782c02bfa612e3c475f
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
|
|
Change-Id: Icfcfee4bafad59b8fdc2a1c3daf677d116639954
Signed-off-by: Matthias Männich <maennich@google.com>
|
|
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>
|
|
* 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>
|
|
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
|
|
Move them to a separate macro for reuse.
Test: TH
Bug: 264710236
Change-Id: I58d0685d1ea95df59703bc7e5ca5c02251e5ea83
|
|
This was missing, causing differences in behavior against
build_abi.sh
Test: manual
Bug: 264263657
Change-Id: I8eadf1478c9dbd2afd609e9f6834e029f3c3acf9
|
|
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>
|
|
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)
|
|
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)
|
|
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
|
|
Test: TH
Change-Id: I434bf0933edd3656f5ea59a0edb5c481bb4840f7
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
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
|
|
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
|
|
Bug: 248004337
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
Change-Id: I99ec941b8f13766395fa370843af67d5abfd8aab
(cherry picked from commit 0698da54e1ab185a197346e0a37c377838500d8b)
|
|
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)
|
|
Bug: 232431411
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Ib1cf9aa082f01792845a38caddf1bf66af6f881a
|
|
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
|
|
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
|
|
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
|
|
Bug: 243136716
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
Change-Id: I08851cd40b250b73f471bcf42a1ad5e9426f896d
(cherry picked from commit aa63643d678e6e8e00a297823f3d75e63bb0abb0)
|
|
_kernel_module_set_defaults sets the defaults in kwargs
but it doesn't mutate the original local variable outs.
Test: TH
Change-Id: Ib5929ccc51a2fa225f779c64d24da9fba405c5c4
|
|
This reverts commit 67e88a473c41adb934edc961f54fe7b9932b4578.
Reason for revert: we'll use solution to not glob
Change-Id: Ie0ae4bb1c053d65a4d593fe81da40579aa2cfd46
|
|
... 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
|
|
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)
|
|
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)
|
|
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>
|
|
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)
|
|
It breaks the bazel query command.
Test: manual
Change-Id: Ia0478eb47d380721b2d6242a9df00675d8821931
(cherry picked from commit 515c020119a6f37bf4b3aef490741fa679e5d175)
|
|
We no longer maintain the raviole-mainline branch on AOSP, but
the raviole-5.15 branch is maintained.
Test: none
Change-Id: I4b376ae8378c4e9849582d3458ad96d2dcfa2315
|
|
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
|
|
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
|
|
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)
|
|
`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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
It is no longer used.
Bug: 231304878
Change-Id: I3dc69789b9d42903ec0b18d8005aae7cae713eaa
Signed-off-by: Giuliano Procida <gprocida@google.com>
|
|
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>
|