build: config: Adding build configs for vm and kalama tuivm
Add build related configs for vm and kalama tuivm. Change-Id: I91dc5d5f423817ff1ba30a98b89bd8e846ab8216 Signed-off-by: Ashish Bhimanpalliwar <abhiman@codeaurora.org>
This commit is contained in:
35
build.config.msm.kalama.tuivm
Normal file
35
build.config.msm.kalama.tuivm
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
################################################################################
|
||||||
|
## Inheriting configs from ACK
|
||||||
|
. ${ROOT_DIR}/common/build.config.common
|
||||||
|
. ${ROOT_DIR}/common/build.config.aarch64
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Variant setup
|
||||||
|
HERMETIC_TOOLCHAIN=0
|
||||||
|
MSM_ARCH=kalama_tuivm
|
||||||
|
VARIANTS=(defconfig debug_defconfig)
|
||||||
|
[ -z "${VARIANT}" ] && VARIANT=debug_defconfig
|
||||||
|
|
||||||
|
if [ -e "${ROOT_DIR}/msm-kernel" -a "${KERNEL_DIR}" = "common" ]; then
|
||||||
|
KERNEL_DIR="msm-kernel"
|
||||||
|
fi
|
||||||
|
|
||||||
|
BOOT_IMAGE_HEADER_VERSION=3
|
||||||
|
BASE_ADDRESS=0x80000000
|
||||||
|
PAGE_SIZE=4096
|
||||||
|
DTB_IMG_CREATE=1
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Define VM parameters
|
||||||
|
KERNEL_OFFSET=0xf4400000
|
||||||
|
DTB_OFFSET=0xf6400000
|
||||||
|
RAMDISK_OFFSET=0xf6500000
|
||||||
|
DUMMY_IMG_OFFSET=0xf86f2000
|
||||||
|
|
||||||
|
VM_SIZE_EXT4=270000000
|
||||||
|
DUMMY_IMG_SIZE=4096
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
## Inheriting MSM configs
|
||||||
|
. ${KERNEL_DIR}/build.config.msm.common
|
||||||
|
. ${KERNEL_DIR}/build.config.msm.vm
|
||||||
49
build.config.msm.vm
Normal file
49
build.config.msm.vm
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
################################################################################
|
||||||
|
# Common configuration for building kernel for Virtual Machines
|
||||||
|
DEFCONFIG="generic_vm_defconfig"
|
||||||
|
OPENSSL_DIR=${KERNEL_DIR}/../build/build-tools/path/linux-x86/openssl
|
||||||
|
|
||||||
|
append_cmd POST_DEFCONFIG_CMDS 'update_signing_keys_config'
|
||||||
|
|
||||||
|
function update_signing_keys_config() {
|
||||||
|
if test -f "${OPENSSL_DIR}"; then
|
||||||
|
${OPENSSL_DIR} req -new -nodes -utf8 -newkey rsa:1024 -days 36500 \
|
||||||
|
-batch -x509 -config ${KERNEL_DIR}/certs/qcom_x509.genkey \
|
||||||
|
-outform PEM -out ${OUT_DIR}/verity_cert.pem -keyout ${OUT_DIR}/verity_key.pem
|
||||||
|
|
||||||
|
${OPENSSL_DIR} req -new -nodes -utf8 -sha256 -days 36500 \
|
||||||
|
-batch -x509 -config ${KERNEL_DIR}/certs/qcom_x509.genkey \
|
||||||
|
-outform PEM -out ${OUT_DIR}/signing_key.pem -keyout ${OUT_DIR}/signing_key.pem
|
||||||
|
|
||||||
|
${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config \
|
||||||
|
--set-str CONFIG_MODULE_SIG_KEY "${OUT_DIR}/signing_key.pem" \
|
||||||
|
--set-str CONFIG_SYSTEM_TRUSTED_KEYS "${OUT_DIR}/verity_cert.pem"
|
||||||
|
|
||||||
|
(cd ${OUT_DIR} && \
|
||||||
|
make ${CC_LD_ARG} O=${OUT_DIR} ${MAKE_ARGS} olddefconfig)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
append_cmd POST_KERNEL_BUILD_CMDS 'move_signing_keys'
|
||||||
|
|
||||||
|
function move_signing_keys() {
|
||||||
|
cp ${OUT_DIR}/signing_key.pem ${OUT_DIR}/certs
|
||||||
|
cp ${OUT_DIR}/verity_key.pem ${OUT_DIR}/certs
|
||||||
|
cp ${OUT_DIR}/verity_cert.pem ${OUT_DIR}/certs
|
||||||
|
}
|
||||||
|
|
||||||
|
function build_defconfig_fragments() {
|
||||||
|
if [[ "${VARIANT}" =~ ^(defconfig|debug_defconfig)$ ]]; then
|
||||||
|
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}.config vendor/${MSM_ARCH}_defconfig
|
||||||
|
|
||||||
|
if [ "${VARIANT}" = defconfig ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}_debug.config vendor/${MSM_ARCH}-debug_defconfig
|
||||||
|
else
|
||||||
|
echo "Variant '${VARIANT}' unsupported by gki"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
build_defconfig_fragments
|
||||||
Reference in New Issue
Block a user