Skip to content

Commit e4ad5d0

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 7d64237)
1 parent 80f767f commit e4ad5d0

5 files changed

+37
-28
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.14-q
2+
KERNEL_DIR=common
3+
4+
CC=clang
5+
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r353983c/bin
6+
BUILDTOOLS_PREBUILT_BIN=build/build-tools/path/linux-x86
7+
8+
EXTRA_CMDS=''
9+
STOP_SHIP_TRACEPRINTK=1

build.config.cuttlefish.aarch64

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

build.config.cuttlefish.x86_64

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
ARCH=x86_64
2-
BRANCH=android-4.14
3-
CLANG_TRIPLE=x86_64-linux-gnu-
4-
CROSS_COMPILE=x86_64-linux-androidkernel-
1+
. ${ROOT_DIR}/common/build.config.common
2+
. ${ROOT_DIR}/common/build.config.x86_64
3+
54
DEFCONFIG=x86_64_cuttlefish_defconfig
6-
EXTRA_CMDS=''
7-
KERNEL_DIR=common
85
POST_DEFCONFIG_CMDS="check_defconfig"
9-
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r353983c/bin
10-
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin
11-
FILES="
12-
arch/x86/boot/bzImage
13-
vmlinux
14-
System.map
15-
"
16-
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)