-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.config.amlogic
176 lines (151 loc) · 4.79 KB
/
build.config.amlogic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.gki.aarch64
. ${ROOT_DIR}/${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/amlogic_utils.sh
if [[ -n ${ANDROID_PROJECT} && -z ${UPGRADE_PROJECT} && -z ${CHECK_GKI_20} ]]; then
KCONFIG_EXT_MODULES_PREFIX=$(realpath ${MAIN_FOLDER} --relative-to ${KERNEL_DIR})/
KCONFIG_EXT_PREFIX=${COMMON_DRIVERS_DIR}/
fi
DO_NOT_STRIP_MODULES= #strip modules
# TOP_EXT_MODULE_COPY_BUILD=1
# AUTO_ADD_EXT_SYMBOLS=1
BUILD_INITRAMFS=${BUILD_INITRAMFS:-1}
# LZ4_RAMDISK=${BUILD_INITRAMFS:-1}
BUILD_SYSTEM_DLKM=
SYSTEM_DLKM_MODULES_LIST=${ROOT_DIR}/${KERNEL_DIR}/android/gki_system_dlkm_modules
MODULES_ORDER=
# COMPRESS_MODULES=1 # Package the unstripped modules for debugging
MODULES_LIST=
MODULES_BLOCKLIST=
VENDOR_DLKM_MODULES_LIST=
VENDOR_DLKM_MODULES_BLOCKLIST=
TRIM_UNUSED_MODULES=1
# BUILD_BOOT_IMG=1 # Need to add dtb files to FILES, otherwise an error occurs when building boot.img, such as s4d_s905y4_ap222_drm.dtb
BUILD_VENDOR_BOOT_IMG=1 # boot.img and dtb.img will be built only when BUILD_BOOT_IMG and BUILD_VENDOR_BOOT_IMG are set to 1
# KERNEL_BINARY=Image.lz4 # Need to set the value of AA, otherwise an error occurs when building boot.img,
# whether the value is Image.lz4 or vmlinux is uncertain due to different descriptions
if [[ -n ${ANDROID_PROJECT} ]]; then
BUILD_DTBO_IMG=1 # Android requires dtbo
BUILD_GKI_BOOT_IMG_GZ_SIZE=67108864
fi
if [[ -n ${FAST_BUILD} ]]; then
SKIP_MRPROPER=1
LZ4_RAMDISK_COMPRESS_ARGS="--fast"
LTO="thin"
SKIP_CP_KERNEL_HDR=1
BUILD_INITRAMFS=0
BUILD_SYSTEM_DLKM=0
BUILD_BOOT_IMG=
BUILD_VENDOR_BOOT_IMG=
BUILD_VENDOR_KERNEL_BOOT=
BUILD_GKI_ARTIFACTS=
fi
DEFCONFIG=amlogic_gki_defconfig
GKI_BASE_CONFIG=${KERNEL_DIR}/arch/${ARCH}/configs/gki_defconfig
KCONFIG_DEFCONFIG=${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/arch/${ARCH}/configs/${DEFCONFIG}
FRAGMENT_CONFIG=${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/arch/${ARCH}/configs/amlogic_gki.fragment
FRAGMENT_CONFIG_GKI10=${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/arch/${ARCH}/configs/amlogic_gki.10
FRAGMENT_CONFIG_DEBUG=${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/arch/${ARCH}/configs/amlogic_gki.debug
FRAGMENT_CONFIG_UPGRADE_R=${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/arch/${ARCH}/configs/amlogic_upgrade_r.defconfig
FRAGMENT_CONFIG_UPGRADE_P=${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/arch/${ARCH}/configs/amlogic_upgrade_p.defconfig
FRAGMENT_CONFIG_UPGRADE_S=${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/arch/${ARCH}/configs/amlogic_upgrade_s.defconfig
FRAGMENT_CONFIG_UPGRADE_U=${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/arch/${ARCH}/configs/amlogic_upgrade_u.defconfig
PRE_DEFCONFIG_CMDS="pre_defconfig_cmds"
POST_DEFCONFIG_CMDS="post_defconfig_cmds"
MAKE_GOALS="
${MAKE_GOALS}
Image.lz4
Image.gz
"
FILES="
${FILES}
"
if [[ -n ${ANDROID_PROJECT} ]]; then
MAKE_GOALS="
${MAKE_GOALS}
Image.gz
android_overlay_dt.dtbo
${MAKE_GOALS_ANDROID}
"
FILES="
${FILES}
arch/arm64/boot/Image.gz
android_overlay_dt.dtbo
${FILES_ANDROID}
"
if [[ -z ${KERNEL_DEVICETREE} ]]; then
KERNEL_DEVICETREE="sc2_s905x4_ah212_drm"
fi
for device_tree in ${KERNEL_DEVICETREE}; do
MAKE_GOALS="
${MAKE_GOALS}
${device_tree}.dtb
"
FILES="
${FILES}
${device_tree}.dtb
"
done
# s4d_s905y4_ap222_drm.dtb # configure in file build.config.meson.arm64.trunk
else
MAKE_GOALS="
${MAKE_GOALS}
dtbs
"
FILES="
${FILES}
"
fi
DTS_EXT_DIR=${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/arch/${ARCH}/boot/dts/amlogic
DTC_INCLUDE=${ROOT_DIR}/${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/include
EXT_MODULES="
${EXT_MODULES}
${EXT_MODULES_ANDROID}
"
EXT_MODULES_CONFIG="
${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/scripts/amlogic/ext_modules_config
"
EXT_MODULES_PATH="
${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/scripts/amlogic/ext_modules_path
"
TYPE_MODULE_SELECT_MODULE="
${TYPE_MODULE_SELECT_MODULE_ANDROID}
"
if [[ `grep "CONFIG_AMLOGIC_IN_KERNEL_MODULES=n" ${ROOT_DIR}/${FRAGMENT_CONFIG}` ]]; then
EXT_MODULES="
${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/drivers
${EXT_MODULES}
"
fi
if [[ ${IN_BUILD_GKI_10} == 1 ]]; then
BUILD_SYSTEM_DLKM=1
EXT_MODULES=
BUILD_BOOT_IMG=
BUILD_VENDOR_BOOT_IMG=
BUILD_VENDOR_KERNEL_BOOT=
else
POST_KERNEL_BUILD_CMDS="prepare_module_build"
EXTRA_CMDS="extra_cmds"
fi
if [[ ${GKI_CONFIG} == gki_20 ]]; then
ADDITIONAL_KMI_SYMBOL_LISTS="
${ADDITIONAL_KMI_SYMBOL_LISTS}
${COMMON_DRIVERS_DIR}/android/abi_gki_aarch64_amlogic
"
else
ADDITIONAL_KMI_SYMBOL_LISTS="
${ADDITIONAL_KMI_SYMBOL_LISTS}
${COMMON_DRIVERS_DIR}/android/abi_gki_aarch64_amlogic
${COMMON_DRIVERS_DIR}/android/abi_gki_aarch64_amlogic.10
${COMMON_DRIVERS_DIR}/android/abi_gki_aarch64_amlogic.debug
"
fi
if [[ `grep "CONFIG_AMLOGIC_BREAK_GKI=y" ${ROOT_DIR}/${FRAGMENT_CONFIG}` ]]; then
ADDITIONAL_KMI_SYMBOL_LISTS="
${ADDITIONAL_KMI_SYMBOL_LISTS}
${COMMON_DRIVERS_DIR}/android/abi_gki_aarch64_amlogic.illegal
"
fi
if [[ -z ${GKI_CONFIG} || -n ${KASAN} ]]; then
KMI_SYMBOL_LIST_STRICT_MODE=""
TRIM_NONLISTED_KMI=""
BUILD_GKI_ARTIFACTS=
fi