1 Star 0 Fork 0

sunplus-plus1 / ipack_q654

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
add_uhdr.sh 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
# $1: image name
# $2: source image
# $3: output image
# $4: arch (arm or riscv)
# $5: load address (optional)
# $6: execute address (optional)
# $7: type (vmlinux used type=kernel)
NAME="$1"
SRC="$2"
OUTPUT="$3"
ARCH="$4"
LADDR=$5
RADDR=$6
type=$7
####################
# check if mkimage is available?
MKIMAGE=./tools/mkimage_sp # Only our mkimage supports quickboot
TYPE=quickboot
function usage()
{
echo "Usage:"
echo "$0 image_name source_image output_image arch [load_addr] [exec_addr] [type]"
}
#NAME=uboot
#SRC=u-boot.bin
#OUTPUT=u-boot.img
#LADDR=0x08100000
#RADDR=$LADDR
##################
# Check arguments
if [ -z "$NAME" ];then
echo "Missed arg1: name"
usage
exit 1
fi
if [ -z "$SRC" ];then
echo "Missed arg2: source image"
usage
exit 1
fi
if [ -z "$OUTPUT" ];then
echo "Missed arg3: output image"
usage
exit 1
fi
if [ -z "$LADDR" ];then
LADDR=0
fi
if [ -z "$RADDR" ];then
RADDR=0
fi
if [ ! -f "$SRC" ];then
echo "Not found source image: $SRC"
exit 1
fi
if [ ! -z "$type" ];then
TYPE=$7
fi
$MKIMAGE -A $ARCH -O linux -T $TYPE -C none -a $LADDR -e $RADDR -n $NAME -d $SRC $OUTPUT
ls -l $OUTPUT
C
1
https://gitee.com/sunplus-plus1/ipack_q654.git
git@gitee.com:sunplus-plus1/ipack_q654.git
sunplus-plus1
ipack_q654
ipack_q654
master

搜索帮助