xref: /OK3568_Linux_fs/u-boot/scripts/uimage-pack.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/bash
2#
3# Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd
4#
5# SPDX-License-Identifier: GPL-2.0
6#
7set -e
8
9IMG_DIR=images
10IMG_NAME=boot.img
11
12if grep -Eq ''^CONFIG_ARM64=y'|'^CONFIG_ARM64_BOOT_AARCH32=y'' .config ; then
13	ARCH=arm64
14else
15	ARCH=arm
16fi
17
18echo
19./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
20echo
21
22