Our test build is broken by KCFLAGS overrided in build.config.comm.
Since Linux Makefile supports 'export KCFLAGS=XXX' to customize the
KCFLAGS, and we should keep this functionality.
Bug: 230818006
Fixes: 1a596d3330 ("ANDROID: Add flag to indicate compiling against ACK")
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: I9425d79697bc1fe816ce82d523f91631dee6b8f4
Add a flag: __ANDROID_COMMON_KERNEL__ which out-of-tree vendor drivers
can use to check if they are compiling against an Android Common Kernel.
These out-of-tree vendor drivers can use this flag +
LINUX_KERNEL_VERSION to determine if a feature has been backported.
Bug: 229953929
Change-Id: I832344d63f3639479784753edfb7ac405068312f
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
This allows Bazel to load the value of $BRANCH in order
to determine the value of --dist_dir of copy_to_dist_dir
statically.
Test: TH
Bug: 229268271
Change-Id: Iff759b8188360ea1b2bc204d29750eece9095582
Signed-off-by: Yifan Hong <elsk@google.com>
This is part of the build -> build/kernel transition.
Test: TH
Bug: 204425264
Change-Id: I5bcf6ac00b6388af198e486f191e13f0b60050c9
Signed-off-by: Yifan Hong <elsk@google.com>
Moving this static value to a separate configuration file allows it to
be used from other builds as well, such as the Kleaf build.
Bug: 210296725
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I07aac5609d8ec986e0e270fdbba3662ac10029f4
The device tree compiler specified by $(DTC) is actually used as a
prerequisite for the following .dtb makefile rule:
$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
Ensure that it's set to an absolute path so that make can actually find
it. Otherwise, make will not instantiate that rule, because it can't
find dtc.
Bug: 198176779
Fixes: 023411cbe9 ("ANDROID: Use DTC from the hermetic toolchain")
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Change-Id: I4e190192b39c4cf18c6412cc85895ed1ce2ec6dd
This suffix is now obsolete, get rid of it.
Bug: 170775957
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: Iaa72b2a75767b642fa82cd69da142a078fb643e6
This is required at the moment to be set by build_abi.sh.
Bug: 175681515
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I2657652c3fd3755fe2cee7a9a9ab01989a0bc8f3
Enable the use of the hermetic toolchain across all builds of this
branch. For allmodconfig builds, also allow the use of openssl from the
host.
Bug: 157507870
Change-Id: Iabb1fe4f760f9821df0318934942302ffffade7c
Signed-off-by: Matthias Maennich <maennich@google.com>
This moves builds to all use LLVM=1 argument to make, rather than
CC=clang NM=llvm-nm OBJCOPY=llvm-objcopy ... (see also
https://www.kernel.org/doc/html/latest/kbuild/llvm.html#llvm-utilities).
Step 3 of aosp/1405387.
Bug: 65987925
Bug: 141693040
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I0975dcad48b6c5344124343606e1c7f85e76e4ee
And replace many references of ${ROOT_DIR}/common with
${ROOT_DIR}/${KERNEL_DIR}, which makes it a lot easier
to branch off of ACK and update the KERNEL_DIR.
The variable of KERNEL_DIR will be set in build/_setup_env.sh
to the directory of the build config file by default if it's
not set explicitly in the build config file or in environment.
Test: build test with following configs
common/build.config.gki.aarch64
common/build.config.db845c
common/build.config.hikey960
cuttlefish-modules/build.config.cuttlefish.aarch64
Bug: 162785964
Change-Id: I790ac0ded10bd790484f14c6f93d53e06c38b830
Signed-off-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
(cherry picked from commit 931718fa65fe5e34d143250c048f591a7d74e5f8)
[elavila: resolve conflicts]
Signed-off-by: J. Avila <elavila@google.com>
Set DTC from kernel build tools. The DTC is the same as used in AOSP.
Bug: 162811113
Change-Id: I16c513ba9c6ce5a1206e95e8de4ae923c11db894
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
The new kernel release format is: w.x.y-zz-k where,
w.x.y are the current values
zzz is the Android Release value
k is the KMI Generation number
This allows one to identify the kernel module interface version using
`uname -r`. The KMI Generation number is used to identify any KMI
changes that occur after the KMI freeze. This should only occur in an
unlikely event that a security patch requires a KMI update.
Here is a local example:
5.4.51-android12-0-00153-ga972f59040e4-dirty
Signed-off-by: Will McVicker <willmcvicker@google.com>
Bug: 159842160
Change-Id: I33f40e424ca967b85d810cdb12c6a2c58e4197b7
[willmcvicker: squash with commit 0c0d417747d8e289b2808c3fca32c845f82fd5e5]
DEPMOD=depmod overwrites the default DEPMOD=/sbin/depmod and uses the
depmod version from PATH (coming from the hermetic toolchain).
Bug: 130657633
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I73eefaa5508298bc61e9e586f981c5ddabed7656
The kernel ABI is determined by what vmlinux and the kernel modules are
exposing in their distribution. Hence, add IN_KERNEL_MODULES to the
distribution and ensure they have proper debug information.
Change-Id: Ia0ac6b8aa98fa28690acc1469c92c92e01f0fcbd
Signed-off-by: Matthias Maennich <maennich@google.com>
Causes CONFIG_RELR to be enabled, resulting in a gki_defconfig image size
decrease of 2.2MB/10.3% uncompressed or 170KB/2.0% compressed.
Bug: 137200966
Change-Id: I85d36e346ca54bfc50aaca6804684b9bf16c47f0
Signed-off-by: Peter Collingbourne <pcc@google.com>
We've been building mainline x86_64 with LLD for months now, and don't
plan to upgrade Android's binutils to work around issues upstream
related to:
commit c603a309cc ("x86/mm: Identify the end of the kernel area to be reserved")
Bug: 138463564
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ic52f7f374c494e5d39efb758a7739ebd33799f49
The build.config.* files largely contain duplicate information by their
nature. Reorganize them reduce duplication and to allow adding new
configurations without copying the definitions again.
Bug: 140224784
Change-Id: I6a3810a125b0ed48591690ca33bb5c02be58218a
Signed-off-by: Matthias Maennich <maennich@google.com>