build: Add bazel support for anorak
Add bazel build support for anorak platform. Change-Id: Ic8075f546827b8f808547fde7e78ad0537e0eb70 Signed-off-by: Asit Shah <quic_asitshah@quicinc.com>
This commit is contained in:
parent
772f573cd9
commit
49685ed111
37
build.config.msm.anorak
Normal file
37
build.config.msm.anorak
Normal file
@ -0,0 +1,37 @@
|
||||
################################################################################
|
||||
## Inheriting configs from ACK
|
||||
. ${ROOT_DIR}/msm-kernel/build.config.common
|
||||
. ${ROOT_DIR}/msm-kernel/build.config.aarch64
|
||||
|
||||
################################################################################
|
||||
## Variant setup
|
||||
MSM_ARCH=anorak
|
||||
VARIANTS=(consolidate gki)
|
||||
[ -z "${VARIANT}" ] && VARIANT=consolidate
|
||||
|
||||
ABL_SRC=bootable/bootloader/edk2
|
||||
BOOT_IMAGE_HEADER_VERSION=4
|
||||
BASE_ADDRESS=0x80000000
|
||||
PAGE_SIZE=4096
|
||||
BUILD_VENDOR_DLKM=1
|
||||
PREPARE_SYSTEM_DLKM=1
|
||||
SYSTEM_DLKM_MODULES_LIST=${ROOT_DIR}/${KERNEL_DIR}/android/gki_system_dlkm_modules
|
||||
SUPER_IMAGE_SIZE=0x10000000
|
||||
TRIM_UNUSED_MODULES=1
|
||||
BUILD_INIT_BOOT_IMG=1
|
||||
|
||||
[ -z "${DT_OVERLAY_SUPPORT}" ] && DT_OVERLAY_SUPPORT=1
|
||||
|
||||
if [ "${KERNEL_CMDLINE_CONSOLE_AUTO}" != "0" ]; then
|
||||
KERNEL_VENDOR_CMDLINE+=' console=ttyMSM0,115200n8 msm_geni_serial.con_enabled=1 '
|
||||
fi
|
||||
|
||||
KERNEL_VENDOR_CMDLINE+=' bootconfig '
|
||||
|
||||
################################################################################
|
||||
## Inheriting MSM configs
|
||||
. ${KERNEL_DIR}/build.config.msm.common
|
||||
. ${KERNEL_DIR}/build.config.msm.gki
|
||||
|
||||
## Inherit SXR configs
|
||||
. ${KERNEL_DIR}/build.config.sxr.common
|
56
build.config.sxr.common
Normal file
56
build.config.sxr.common
Normal file
@ -0,0 +1,56 @@
|
||||
################################################################################
|
||||
# Common configuration for building kernel for SXR products
|
||||
if [[ "${MSM_ARCH}" == "anorak" ]]; then
|
||||
DEFCONFIG="gki_defconfig"
|
||||
else
|
||||
DEFCONFIG="generic_sxr_defconfig"
|
||||
fi
|
||||
|
||||
OPENSSL_DIR=${KERNEL_DIR}/../build/build-tools/path/linux-x86/openssl
|
||||
# Kernel platform missing aosp/1843323
|
||||
DISABLE_HERMETIC_SYSROOT=1
|
||||
|
||||
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}" =~ ^(gki|consolidate)$ ]]; then
|
||||
apply_defconfig_fragment ${KERNEL_DIR}/arch/${ARCH}/configs/vendor/${MSM_ARCH}.config vendor/${MSM_ARCH}_defconfig
|
||||
|
||||
if [ "${VARIANT}" = gki ]; 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
|
@ -1,6 +1,7 @@
|
||||
build.config.msm.autogvm
|
||||
build.config.msm.autoghgvm
|
||||
build.config.msm.pineapple
|
||||
build.config.msm.anorak
|
||||
build.config.msm.niobe
|
||||
build.config.msm.kalama
|
||||
build.config.msm.pineapple.vm
|
||||
|
@ -14,6 +14,7 @@ load(":msm_common.bzl", "define_signing_keys")
|
||||
load("//build:msm_kernel_extensions.bzl", "define_top_level_rules")
|
||||
load(":blair.bzl", "define_blair")
|
||||
load(":pitti.bzl", "define_pitti")
|
||||
load(":anorak.bzl", "define_anorak")
|
||||
|
||||
def define_msm_platforms():
|
||||
define_top_level_rules()
|
||||
@ -32,3 +33,4 @@ def define_msm_platforms():
|
||||
define_pineapple_vms()
|
||||
define_blair()
|
||||
define_pitti()
|
||||
define_anorak()
|
||||
|
@ -1,5 +1,6 @@
|
||||
la_targets = [
|
||||
# keep sorted
|
||||
"anorak",
|
||||
"autogvm",
|
||||
"blair",
|
||||
"gen3auto",
|
||||
|
Loading…
Reference in New Issue
Block a user