ANDROID: GKI: Add 64-bit RISC-V config

Add a "fake" GKI for RISC-V based on the arm64 one. This implementation
simply symlinks the arm64 gki_defconfig and merges in two other configs:

- arch/riscv/configs/64-bit.config
  This is an upstream file which enables RISC-V for 64-bit.

- arch/riscv/configs/gki.config
  This is a workaround file which enables things the ARM64 architecture
  pre-selects, such as GPIOLIB. Without enabling these options, some
  drivers are incorrectly dropped from the gki_defconfig.

Bug: 260012551
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ifad59ed483bdbb736e905eefc5107328155a361b
This commit is contained in:
Alistair Delva 2022-11-21 16:11:21 -08:00 committed by Treehugger Robot
parent 6fe5cd619c
commit d0da01fd61
5 changed files with 46 additions and 0 deletions

View File

@ -22,6 +22,9 @@ define_common_kernels(target_configs = {
"kernel_aarch64_debug": {
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
},
"kernel_riscv64": {
"module_implicit_outs": COMMON_GKI_MODULES_LIST,
},
"kernel_x86_64": {
"kmi_symbol_list_strict_mode": False,
"module_implicit_outs": COMMON_GKI_MODULES_LIST,

View File

@ -0,0 +1,2 @@
CONFIG_CPU_FREQ=y
CONFIG_GPIOLIB=y

View File

@ -0,0 +1 @@
../../arm64/configs/gki_defconfig

26
build.config.gki.riscv64 Normal file
View File

@ -0,0 +1,26 @@
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.common
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.riscv64
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.gki
MAKE_GOALS="${MAKE_GOALS}
Image.lz4
Image.gz
"
FILES="${FILES}
arch/riscv/boot/Image.lz4
arch/riscv/boot/Image.gz
"
BUILD_SYSTEM_DLKM=1
MODULES_LIST=${ROOT_DIR}/${KERNEL_DIR}/android/gki_system_dlkm_modules
BUILD_GKI_CERTIFICATION_TOOLS=1
BUILD_GKI_ARTIFACTS=1
BUILD_GKI_BOOT_IMG_SIZE=67108864
BUILD_GKI_BOOT_IMG_GZ_SIZE=47185920
BUILD_GKI_BOOT_IMG_LZ4_SIZE=53477376
PRE_DEFCONFIG_CMDS="mkdir -p \${OUT_DIR}/arch/riscv/configs/ && cat ${ROOT_DIR}/${KERNEL_DIR}/arch/riscv/configs/gki_defconfig ${ROOT_DIR}/${KERNEL_DIR}/arch/riscv/configs/64-bit.config ${ROOT_DIR}/${KERNEL_DIR}/arch/riscv/configs/gki.config > \${OUT_DIR}/arch/riscv/configs/${DEFCONFIG};"
POST_DEFCONFIG_CMDS=""

14
build.config.riscv64 Normal file
View File

@ -0,0 +1,14 @@
ARCH=riscv
MAKE_GOALS="
Image
modules
"
FILES="
arch/riscv/boot/Image
vmlinux
System.map
vmlinux.symvers
modules.builtin
modules.builtin.modinfo
"