From 24ec99ec598f047112ac0537a68b85c13021b760 Mon Sep 17 00:00:00 2001 From: BigfootACA Date: Thu, 19 May 2022 17:33:19 +0800 Subject: [PATCH] build.sh: add devices config --- build.sh | 10 +++++++--- devices/default.conf | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 devices/default.conf diff --git a/build.sh b/build.sh index 6e27077..ad36fa8 100755 --- a/build.sh +++ b/build.sh @@ -68,12 +68,16 @@ function _build(){ RELEASE)_MODE=RELEASE;; *)_MODE=DEBUG;; esac + if [ -f "devices/${DEVICE}.conf" ] + then source "devices/${DEVICE}.conf" + else source "devices/default.conf" + fi build \ -s \ -n 0 \ -a AARCH64 \ -t "${TOOLCHAIN}" \ - -p "sdm845Pkg/Devices/${DEVICE}.dsc" \ + -p "${DSC_FILE}" \ -b "${_MODE}" \ -D FIRMWARE_VER="${GITCOMMIT}" \ -D USE_UART="${USE_UART}" \ @@ -93,8 +97,8 @@ function _build(){ --kernel_offset 0x00000000 \ --ramdisk_offset 0x00000000 \ --tags_offset 0x00000000 \ - --os_version 12.0.0 \ - --os_patch_level 2022-04 \ + --os_version "${BOOTIMG_OS_VERSION}" \ + --os_patch_level "${BOOTIMG_OS_PATCH_LEVEL}" \ --header_version 1 \ -o "${OUTDIR}/boot-${DEVICE}.img" \ ||return "$?" diff --git a/devices/default.conf b/devices/default.conf new file mode 100644 index 0000000..8f98b9e --- /dev/null +++ b/devices/default.conf @@ -0,0 +1,4 @@ +DSC_FILE="sdm845Pkg/Devices/${DEVICE}.dsc" +DTB_FILE="device_specific/${DEVICE}.dtb" +BOOTIMG_OS_PATCH_LEVEL="$(date '+%Y-%m')" +BOOTIMG_OS_VERSION=12.0.0 -- 2.45.2