Skip to content

Commit b648bdd

Browse files
mettirmuthiah
authored andcommitted
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> (cherry picked from commit 7d642373db4c6c1c6ed8af02492047896beb4a47)
1 parent fd673e8 commit b648bdd

5 files changed

+37
-32
lines changed

build.config.aarch64

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARCH=arm64
2+
3+
CLANG_TRIPLE=aarch64-linux-gnu-
4+
CROSS_COMPILE=aarch64-linux-androidkernel-
5+
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
6+
7+
FILES="
8+
arch/arm64/boot/Image.gz
9+
vmlinux
10+
System.map
11+
"

build.config.common

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
BRANCH=android-4.19-q
2+
KERNEL_DIR=common
3+
4+
CC=clang
5+
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r353983c/bin
6+
7+
EXTRA_CMDS=''
8+
STOP_SHIP_TRACEPRINTK=1
9+
LD=ld.lld

build.config.cuttlefish.aarch64

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
1-
ARCH=arm64
2-
BRANCH=android-4.19
3-
CC=clang
4-
CLANG_TRIPLE=aarch64-linux-gnu-
5-
CROSS_COMPILE=aarch64-linux-androidkernel-
1+
. ${ROOT_DIR}/common/build.config.common
2+
. ${ROOT_DIR}/common/build.config.aarch64
3+
64
DEFCONFIG=cuttlefish_defconfig
7-
EXTRA_CMDS=''
8-
KERNEL_DIR=common
95
POST_DEFCONFIG_CMDS="check_defconfig"
10-
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r353983c/bin
11-
LD=ld.lld
12-
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
13-
FILES="
14-
arch/arm64/boot/Image.gz
15-
vmlinux
16-
System.map
17-
"
18-
STOP_SHIP_TRACEPRINTK=1

build.config.cuttlefish.x86_64

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
1-
ARCH=x86_64
2-
BRANCH=android-4.19
3-
CC=clang
4-
CLANG_TRIPLE=x86_64-linux-gnu-
5-
CROSS_COMPILE=x86_64-linux-androidkernel-
1+
. ${ROOT_DIR}/common/build.config.common
2+
. ${ROOT_DIR}/common/build.config.x86_64
3+
64
DEFCONFIG=x86_64_cuttlefish_defconfig
7-
EXTRA_CMDS=''
8-
KERNEL_DIR=common
95
POST_DEFCONFIG_CMDS="check_defconfig"
10-
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r353983c/bin
11-
LD=ld.lld
12-
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin
13-
FILES="
14-
arch/x86/boot/bzImage
15-
vmlinux
16-
System.map
17-
"
18-
STOP_SHIP_TRACEPRINTK=1

build.config.x86_64

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARCH=x86_64
2+
3+
CLANG_TRIPLE=x86_64-linux-gnu-
4+
CROSS_COMPILE=x86_64-linux-androidkernel-
5+
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin
6+
7+
FILES="
8+
arch/x86/boot/bzImage
9+
vmlinux
10+
System.map
11+
"

0 commit comments

Comments
 (0)