make.sh: add args to assign uboot and trust image size

syntax:
	--sz-uboot <cell KB> <number of cells>
	--sz-trust <cell KB> <number of cells>

example:
	./make.sh rk3399 --sz-uboot 1024 2
			|
			V
	uboot.img = 1024KB * 2 = 2048KB

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I809ddd762545069b45ab8b0977630ffdd7d8b50c
This commit is contained in:
Joseph Chen 2020-07-13 20:30:09 +08:00
parent 3ed9fa58e7
commit 07d90e7755
1 changed files with 20 additions and 0 deletions

20
make.sh
View File

@ -177,6 +177,16 @@ function process_args()
shift 1 shift 1
;; ;;
--sz-trust)
ARG_TRUST_SIZE="--size $2 $3"
shift 3
;;
--sz-uboot)
ARG_UBOOT_SIZE="--size $2 $3"
shift 3
;;
--no-pack) --no-pack)
ARG_NO_PACK="y" ARG_NO_PACK="y"
shift 1 shift 1
@ -442,6 +452,7 @@ function select_chip_info()
fi fi
} }
# Priority: default < CHIP_CFG_FIXUP_TABLE() < make.sh args
function fixup_platform_configure() function fixup_platform_configure()
{ {
u_kb="-" u_num="-" t_kb="-" t_num="-" sha="-" rsa="-" u_kb="-" u_num="-" t_kb="-" t_num="-" sha="-" rsa="-"
@ -493,6 +504,15 @@ function fixup_platform_configure()
if [ "${t_kb}" != "-" ]; then if [ "${t_kb}" != "-" ]; then
PLATFORM_TRUST_SIZE="--size ${t_kb} ${t_num}" PLATFORM_TRUST_SIZE="--size ${t_kb} ${t_num}"
fi 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 # Priority: default < CHIP_TYPE_FIXUP_TABLE() < defconfig < make.sh args