From 07d90e7755d2e5140e8e2c34d555da8e47b4af3f Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Mon, 13 Jul 2020 20:30:09 +0800 Subject: [PATCH] make.sh: add args to assign uboot and trust image size syntax: --sz-uboot --sz-trust example: ./make.sh rk3399 --sz-uboot 1024 2 | V uboot.img = 1024KB * 2 = 2048KB Signed-off-by: Joseph Chen Change-Id: I809ddd762545069b45ab8b0977630ffdd7d8b50c --- make.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/make.sh b/make.sh index 5bcf5c87ae..5fffd60fc6 100755 --- a/make.sh +++ b/make.sh @@ -177,6 +177,16 @@ function process_args() shift 1 ;; + --sz-trust) + ARG_TRUST_SIZE="--size $2 $3" + shift 3 + ;; + + --sz-uboot) + ARG_UBOOT_SIZE="--size $2 $3" + shift 3 + ;; + --no-pack) ARG_NO_PACK="y" shift 1 @@ -442,6 +452,7 @@ function select_chip_info() fi } +# Priority: default < CHIP_CFG_FIXUP_TABLE() < make.sh args function fixup_platform_configure() { u_kb="-" u_num="-" t_kb="-" t_num="-" sha="-" rsa="-" @@ -493,6 +504,15 @@ function fixup_platform_configure() if [ "${t_kb}" != "-" ]; then PLATFORM_TRUST_SIZE="--size ${t_kb} ${t_num}" fi + + # args + if [ ! -z "${ARG_UBOOT_SIZE}" ]; then + PLATFORM_UBOOT_SIZE=${ARG_UBOOT_SIZE} + fi + + if [ ! -z "${ARG_TRUST_SIZE}" ]; then + PLATFORM_TRUST_SIZE=${ARG_TRUST_SIZE} + fi } # Priority: default < CHIP_TYPE_FIXUP_TABLE() < defconfig < make.sh args