scripts: add uimage pack script

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Id1570789d84f8aba3a6b857e92cc2941e640aaa4
This commit is contained in:
Joseph Chen 2020-04-23 20:12:56 +08:00
parent 0fb435fa05
commit a46b05016b
1 changed files with 21 additions and 0 deletions

21
scripts/uimage-pack.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
#
# Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd
#
# SPDX-License-Identifier: GPL-2.0
#
set -e
IMG_DIR=images
IMG_NAME=boot.img
if grep -Eq ''^CONFIG_ARM64=y'|'^CONFIG_ARM64_BOOT_AARCH32=y'' .config ; then
ARCH=arm64
else
ARCH=arm
fi
echo
./tools/mkimage -n 'Multi Images' -A $ARCH -O linux -T multi -C none -a 0xffffffff -e 0xffffffff -d ${IMG_DIR}/kernel.img:${IMG_DIR}/ramdisk.img:${IMG_DIR}/rk-kernel.dtb:${IMG_DIR}/resource.img $IMG_NAME
echo