kleaf: Use aliases for kernel targets

Add //common:* which are aliases of kernel targets.
The actual kernel targets are from @//aosp or @//aosp-staging according
to the build flag. With the aliases, all the other BUILD.bazel can use
//common:* instead of hardcoded //aosp:* or //aosp-staging:*.

Also update device_build_configs.bzl to get KERNEL_DIR from
//common:set_kernel_dir_build_config.

Bug: 340163250
Change-Id: Ibb76c6921ab4d1b67de441aa10fd8ac192331e9e
Signed-off-by: Jacky Liu <[email protected]>
7 files changed
tree: 7f0e0fbc6beea5674bafd9b6b8a2cd03c0c11b28
  1. kleaf/
  2. sepolicy/
  3. bazel.WORKSPACE
  4. BUILD.bazel
  5. build.config.blktest
  6. build.config.debug_api
  7. build.config.debug_kmemleak
  8. build.config.debug_locking
  9. build.config.debug_memory
  10. build.config.debug_memory_accounting
  11. build.config.kasan
  12. build.config.khwasan
  13. debug_all_defconfig
  14. device.bazelrc
  15. function_tracer_defconfig
  16. merge-from-pixel-6.1-zuma.sh
  17. README.md
  18. update_symbol_list.sh
README.md

Building with Bazel (recommended)

# Files are copied to out/{branch}/dist
$ tools/bazel run --config=raviole //private/devices/google/raviole:gs101_raviole_dist

See build/kernel/kleaf/README.md for details.

Disable LTO

Note: This only works on raviole-mainline branch.

# Files are copied to out/{branch}/dist
$ tools/bazel run --lto=none --config=raviole //private/devices/google/raviole:gs101_raviole_dist

ABI monitoring with Bazel (recommended)

Note: ABI monitoring is not supported on raviole-mainline branch.

# Compare ABI and build files for distribution
$ tools/bazel build --config=raviole //private/devices/google/raviole:gs101_raviole_abi

# Update symbol list aosp/android/abi_gki_aarch64_pixel
$ tools/bazel run --config=raviole //private/devices/google/raviole:gs101_raviole_abi_update_symbol_list

# Update ABI aosp/android/abi_gki_aarch64.xml
$ tools/bazel run //aosp:kernel_aarch64_abi_update

# Copy files to distribution
$ tools/bazel run --config=raviole //private/devices/google/raviole:gs101_raviole_abi_dist