Age | Commit message (Collapse) | Author |
|
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>
|
|
This change introduces `_link_file`. The second argument is the new
destination link. Any existing file with that name is first removed.
Change-Id: Ifbf7c020ec3c4bc2c66253cd96c3ad7d615674ae
Signed-off-by: Giuliano Procida <gprocida@google.com>
|
|
This was broken by an earlier commit and no one noticed.
`stgdiff` is run with `diff_abi --abi-tool delegated` which is what we
use.
Change-Id: Iff94ab874e589d66306ebbb513d4a9b7ed152c7b
Signed-off-by: Giuliano Procida <gprocida@google.com>
|
|
system_dlkm_staging_archive
system_dlkm_image produces staging_archive and modules.load
files. Also download them and put them as part of distribution
when building against downloaded prebuilts.
With system_dlkm_staging_archive.tar.gz from GKI
piped to the device's system_dlkm rule, instead
of creating the staging directory, unarchive the archive
and build system_dlkm from there.
As part of this change, kernel_images now also
accept these arguments:
- system_dlkm_modules_list
- system_dlkm_modules_blocklist
- system_dlkm_props
... which corresponds to the upper-case version of the build configs,
respectively. Their semantics are the same as the build configs.
Unlike vendor_dlkm_*:
- system_dlkm_modules_list falls back to modules_list if not set
- system_dlkm_modules_blocklist falls back to modules_blocklist if not set
Test: build slider_images_system_dlkm_image with build_system_dlkm=True
Bug: 233401974
Bug: 238786592
Change-Id: Ie9a2073d571b23eee58764ef9ced0976e5fa9622
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
A bazel invocation usually looks like:
bazel [<startup options>] <command> [<command_args>] [-- <target_patterns>]
Bazel wrapper args like --use_prebuilt_gki, --make_jobs, etc.
are now only searched from command_args in the list.
The Bazel wrapper:
- Appends additional startup options
- Transform command_args
... before feeding the arguments to the Bazel binary.
Test: manual
Test: TH
Bug: 235632059
Change-Id: If93ee196ad9f1c277d8b460ecdca334fa540845e
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
Test: TH
Change-Id: I0eaed0fd9ee58532213053f20195e6a2067911f0
|
|
No more slider.bzl.
Test: none
Bug: 241937211
Change-Id: I97d5d5098a97492e1ddb40359261a4b211671d97
|
|
The staging directory of a kernel_modules_install target
contains symlinks to the out directory and the source directory.
If rsync --copy-links (transform symlinks into referrent file / dir),
the build time is significantly longer.
Hence, just copy symlinks as symlinks (use -l option) for the
source/ and build/ symlinks.
Test: Build and check build time
Bug: 235632059
Change-Id: Ic8f2b29229a3fe1c43619207f5aaa64ad46792ad
|
|
This adds gki_artifacts (boot images, boot-img.tar.gz,
gki-info.txt) to the list of artifacts available
to be downloaded from --use_prebuilt_gki flag.
For distribution for device kernel builds that builds
against prebuilts, this ensures the boot image from
GKI build is included.
Test: TH
Change-Id: Id7215b2fdbd20723a48580fe7aa41ba815ee86d0
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
Unlike MODULES_OPTIONS in build.sh, modules_options in
Kleaf points to a file that contains the lines.
Fix comments and build rules that previously assume
it contains strings.
Test: bazel test //common:kernel_aarch64_tests
Fixes: 241162984
Change-Id: Ie3ab2544f91cbcec55e5af390fc06eba400add14
|
|
Use a for loop instead of find+exec so that, if there are any
errors in sign-file (e.g. the script does not exist), exits
properly (assuming set -e).
Test: manual
Change-Id: Icf04d37c3bd546a3067bb8739928246445128012
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
Instead of having one filegroup named additional_artifacts_downloaded,
define multiple filgroups that corresponds to each item in it,
then define the overarching _additional_artifacts_downloaded
on top of it.
Same for _additional_artifacts_download_or_build.
Test: bazel build --use_prebuilt_gki=xxx \
//common:kernel_aarch64_additional_artifacts_downloaded
Change-Id: I4f94fb715be32d7144e823a5f2cd02aa665d4e1e
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
The source_package_name is useless because Bazel is okay
with or without the prefixing colon.
Test: TH
Change-Id: I147800c6effd6d2f417a54fb1a98a1820d1306e7
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
Make it consistent with the type.
Test: TH
Change-Id: I02483692145c3609cddda42d07cdbcf80d339de3
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
It is a per-branch configuration. Hence there is no
need to maintain a common list in build/kernel.
Test: TH
Change-Id: I7d2dacbf1a9579ba11e61f5db38361aaed686fab
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
Test: TH
Change-Id: I9c242115f3d7c1d2a96328b1aeaaba8320d0149a
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
The filesystem format is an implementation detail.
Test: none
Change-Id: I241b038760b6d5bdb9104f0282cadb601a500110
|
|
When updating the ABI symbol list for a mixed build configuration,
build_abi.sh disables mixed building and directly compiles the kernel
using the device BUILD_CONFIG. In order to be able to successfully do
this, we need to also make sure the proper kernel files are copied over
to the DIST_DIR (since mixed building doesn't require the device
BUILD_CONFIG to do this). Re-work this logic to (1) only modify
MAKE_GOALS and FILES when mixed building is enabled and (2) append the
necessary kernel artifacts to the FILES variable.
Bug: 239094500
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: If1f1d60874ba899f4f8e50394b9eb653a1f7cef9
|
|
Currently we are just checking if TRIM_NONLISTED_KMI is set and not
differentiating between =0 and =1. So update the script accordingly to
make sure we don't re-compile the kernel unnecessarily.
Bug: 239094500
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I9ad799305d2790ca763bdea7a4bee1db7d24e0f0
|
|
This is needed for use of rel_path in the BUILD_CONFIG when updating the
ABI.
Bug: 239094500
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: Id4880214c4d5ef7200029f770814e18c536661ea
|
|
In addition to providing the lines to add to the BUILD files,
also provide a buildozer command that, when executed, attempts
to fix the BUILD files automatically.
Running buildozer requires the developer to install buildozer
as a one-time set up.
Sample output:
Alternatively, install buildozer and execute:
$ buildozer 'add module_outs drivers/mfd/vexpress-sysreg.ko
drivers/gpu/drm/drm_cma_helper.ko
drivers/gpu/drm/pl111/pl111_drm.ko
drivers/virtio/virtio_mmio.ko
drivers/input/mouse/psmouse.ko
drivers/input/serio/ambakmi.ko
drivers/clk/versatile/clk-vexpress-osc.ko
drivers/bus/vexpress-config.ko
drivers/mmc/host/armmmci.ko' //common-modules/virtual-device:virtual_device_aarch64
Bug: none
Test: manual
Change-Id: I8b7ea944721975e4406be430e544d60580d9bae0
|
|
kernel_module does not have module_outs attribute.
Test: manual
Change-Id: I3a33dedb89e73d4ebf5f93324772f12d2b484d2d
Signed-off-by: Yifan Hong <elsk@google.com>
|
|
The --kasan flag enables kasan build. This automatically
implies --lto=none; if --lto is specified otherwise, build
fails.
Also add analysis test to ensure that the above is enforced.
Also add artifacts test to ensure that the CONFIG_KASAN
is set properly, even when it is used in combination with
other flags.
Test: TH
Bug: 236012429
Change-Id: I170d3cc8b672f51a24192e4df39704924fc38771
|
|
BYPASS_INCLUSIVE_LANGUAGE_REASON=CONFIG_UNUSED_KSYMS_WHITELIST
is a key used in upstream kernel.
Test: bazel test //build/kernel/kleaf/tests
Bug: 236012429
Change-Id: Ic43a20180eacd5f345c0ebfe8af38d89e72d6722
|
|
Check that the LTO settings are configured properly.
Test: TH
Change-Id: I737dfb9610a97ac7f2e66f8e21e32a2b48c0dad8
|
|
Modify system_dlkm_image to operate in the same way as
vendor_dlkm_image, calling the build_utils scripts.
This is part of the change to build system_dlkm
as ext4 instead of erofs.
Bug: 236753150
Test: build with bazel,
file ./out/mixed/dist/system_dlkm.img
./out/mixed/dist/system_dlkm.img: Linux rev 1.0 ext2 filesystem data,
UUID=75130cbd-6ffb-4594-9084-8ce5bda658dc, volume name "system_dlkm" (extents) (large files) (huge files)
Signed-off-by: Andrew Chant <achant@google.com>
Change-Id: I8229be29b76ad8261a5ed79b6135e4867357a353
|
|
Group tests by the name of the rule or macro
they are testing.
Test: TH
Change-Id: I3a7a3a54efe8554b4a83e676d3870498d38197a2
|
|
Build system_dlkm as ext4 the same way android system does.
At the same time modify the build to mirror how vendor_dlkm
is built.
Test: build with BUILD_KERNEL=1, flashed and booted.
Signed-off-by: Andrew Chant <achant@google.com>
Bug: 236753150
Change-Id: If92c8f8426fd16636113bbdc09fd55001aeec6f0
|
|
Instead of specifying
--in-dir=$ROOT_DIR/$KERNEL_DIR $(rel_path <src> $ROOT_DIR/$KERNEL_DIR)
use
--in-dir=$ROOT_DIR <src>
This ensures that it works when $ROOT_DIR/$KERNEL_DIR
does not exist (because rel_path requires paths to exist).
This is the case in particular when the symbol list file
is outside of the $KERNEL_DIR for testing.
Test: see next CL
Change-Id: I4a0e8ef46d84c8006d9707167363b530f3aa16ca
|
|
Test: TH
Change-Id: I5b97f4e1e9141592c35c6140776b6925ea8f32d2
|
|
Add condition if we only want to build vendor_kernel_boot.img
when enabling BUILD_VENDOR_KERNEL_BOOT=1.
Bug: 237436066
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: I4519ffa231e10dfc2c289da1f1ef23b8fcd8eeda
|