Commit Graph

32 Commits

Author SHA1 Message Date
Lecopzer Chen
9aba4987ef ANDROID: fix KCFLAGS override by __ANDROID_COMMON_KERNEL__
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
2022-04-29 17:50:28 +00:00
Elliot Berman
1a596d3330 ANDROID: Add flag to indicate compiling against ACK
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>
2022-04-28 20:47:52 +00:00
Yifan Hong
1dfe7be90d ANDROID: Move BRANCH from build.config.common to .constants.
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>
2022-04-14 14:20:54 -07:00
Yifan Hong
54df59a346 ANDROID: build/build-tools -> build/kernel/build-tools.
This is part of the build -> build/kernel transition.

Test: TH
Bug: 204425264
Change-Id: I5bcf6ac00b6388af198e486f191e13f0b60050c9
Signed-off-by: Yifan Hong <elsk@google.com>
2022-02-02 07:21:10 +00:00
Matthias Maennich
5d1e61a486 ANDROID: move CLANG_VERSION definition to build.config.constants
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
2021-12-13 20:57:40 +00:00
Nick Desaulniers
61bb376162 ANDROID: clang: update to 14.0.0
Bug: 202986547
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ica702486da9ba9b99d9ed31199447be1bad9b960
2021-12-10 12:38:18 +00:00
Daniel Mentz
a71e480e82 ANDROID: build.config: Set DTC to absolute path
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
2021-09-17 18:06:27 +00:00
Nick Desaulniers
8f7cfec1cc ANDROID: clang: update to 13.0.2
Bug: 199534745
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I54d76cfe5f6b7c4cb3880c7d19143765d3a4e15c
2021-09-13 18:21:33 +00:00
Nick Desaulniers
9a125e71fa ANDROID: clang: update to 13.0.1
Bug: 192363966
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I3ee12faa8306372a35ca5ef6be2788821ba1a515
2021-08-10 16:41:35 +00:00
Matthias Maennich
b205dfffa2 ANDROID: Drop the -master suffix from the clang prebuilts
This suffix is now obsolete, get rid of it.

Bug: 170775957
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: Iaa72b2a75767b642fa82cd69da142a078fb643e6
2021-06-18 14:30:54 +01:00
Nick Desaulniers
7ec815f5df ANDROID: clang: update to 12.0.5
Bug: 185804542
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: If3d0c122472d8979b326d8a6fece30d8b2af962a
2021-04-19 19:38:54 +00:00
Nick Desaulniers
91d3f4ea12 ANDROID: clang: update to 12.0.4
Bug: 183031914
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I7b5219a9f91aa2554b6206d98f3c2140c9d24629
2021-03-19 17:27:05 -07:00
Nick Desaulniers
1280e509c9 ANDROID: clang: update to 12.0.3
Bug: 180726982
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I4cca039f9817eabd7bfedc92dbcfe57efec60853
2021-03-02 20:48:36 +00:00
Alistair Delva
ff0216d09f ANDROID: clang: update to 12.0.1
Bug: 176824850
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I74b00c1aa754362616b002718eb2eeb8fc6ef8e9
2021-01-26 04:20:05 +00:00
Matthias Maennich
237011c53a ANDROID: build.config.common: allow overriding of HERMETIC_TOOLCHAIN
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
2020-12-17 15:11:02 +00:00
Matthias Maennich
6991ab0b2d ANDROID: Enable hermetic toolchain
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>
2020-11-10 11:12:53 +00:00
Nick Desaulniers
cf67471ced ANDROID: clang: update to 11.0.5
Bug: 170775238
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Ibf405b519d406c58a25f4a765c6ba2d6f1bae50f
2020-10-27 11:22:40 -07:00
Nick Desaulniers
dacc12eb10 ANDROID: build.config.common: enable LLVM=1
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
2020-09-22 20:25:08 +00:00
Will McVicker
67a1d5d3be ANDROID: drop KERNEL_DIR setting in build.config.common
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>
2020-08-31 15:20:37 +00:00
Elliot Berman
023411cbe9 ANDROID: Use DTC from the hermetic toolchain
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>
2020-08-19 00:33:58 +00:00
Will McVicker
f0bec7afff ANDROID: update the kernel release format for GKI
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]
2020-07-27 23:41:36 +00:00
Matthias Maennich
82ce726a3f ANDROID: Use depmod from the hermetic toolchain
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
2020-06-22 08:19:19 +00:00
Alistair Delva
2ffcd3857f ANDROID: clang: update to 11.0.1
Bug: 155426344
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Id3fde5d1aef8420f280863dfb1bede16056b4a83
2020-05-18 19:36:33 +00:00
Nick Desaulniers
c68d25a6d8 ANDROID: clang: update to 10.0.6
Bug: 153164546
Change-Id: Iedeef21a93e45d2266a049f360ffe7f5bbc5f943
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2020-04-08 18:01:31 +00:00
Alistair Delva
4e33416b65 ANDROID: clang: update to 10.0.5
Bug: 151950245
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Id3112a7530683fdfbb136191e6e395eda9ed279f
2020-03-30 20:08:42 +00:00
Alistair Delva
7385a070e2 ANDROID: clang: update to 10.0.4
Bug: 149785865
Change-Id: Id666b686a6e62c035f4abd620994326792c6bc8a
Signed-off-by: Alistair Delva <adelva@google.com>
2020-02-19 18:09:28 +00:00
Alistair Delva
dbc9ea9521 ANDROID: clang: update to 10.0.1
Bug: 144776928
Change-Id: Ic1c76a05a54b0001eac6f9c6f248222989aa79bd
Signed-off-by: Alistair Delva <adelva@google.com>
2019-11-26 12:58:21 -08:00
Matthias Maennich
836bc88629 ANDROID: add unstripped modules to the distribution
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>
2019-11-20 23:43:38 +00:00
Peter Collingbourne
d37d6fd8c0 ANDROID: build kernels with llvm-nm and llvm-objcopy
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>
2019-11-14 22:13:48 +00:00
Nick Desaulniers
7a5e47a1a8 build.config.*: Link android-mainline kernels with LLD
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
2019-10-25 18:56:06 +00:00
Ram Muthiah
6ce0937faa ANDROID: Move from clang r353983c to r365631c
Bug: 139440459
Test: BUILD_CONFIG=common/build.config.gki.x86_64 build/build.sh
Test: BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
Change-Id: I7ee5d9a687843c09bbc5edb591d3337bd5bfbcbc
Signed-off-by: Ram Muthiah <rammuthiah@google.com>
2019-10-22 17:59:02 +00:00
Matthias Maennich
6e792fdbdf ANDROID: refactor build.config files to remove duplication
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>
2019-08-30 14:55:29 +01:00