本文主要是介绍linux开发笔记(buildroot打包镜像),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
参考文章:https://www.cnblogs.com/arnoldlu/p/9553995.html
mangopi_r3的buildroot在编译完成后会将所有镜像打包到一起。与之有关的buildroot配置项为
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/allwinner/generic/scripts/genimage.sh"
genimage.sh内容如下
#!/bin/bash
set -e
STARTDIR=`pwd`
SELFDIR=`dirname \`realpath ${0}\``
MKIMAGE="${HOST_DIR}/bin/mkimage"
IMAGE_ITS="kernel.its"
OUTPUT_NAME="kernel.itb"[ $# -eq 2 ] || {echo "SYNTAX: $0 <output dir> <u-boot-with-spl image>"echo "Given: $@"exit 1
}cp board/allwinner/generic/kernel.its "${BINARIES_DIR}"
cd "${BINARIES_DIR}"
"${MKIMAGE}" -f ${IMAGE_ITS} ${OUTPUT_NAME}
rm ${IMAGE_ITS}cd "${SELFDIR}/../"
cp splash.bmp "${BINARIES_DIR}/"cd "${STARTDIR}/"board/allwinner/generic/scripts/mknanduboot.sh ${1}/${2} ${1}/u-boot-sunxi-with-nand-spl.bin
support/scripts/genimage.sh ${1} -c board/allwinner/generic/genimage-sdcard.cfg
support/scripts/genimage.sh ${1} -c board/allwinner/generic/genimage-nor.cfg
support/scripts/genimage.sh ${1} -c board/allwinner/generic/genimage-nand.cfg
这篇关于linux开发笔记(buildroot打包镜像)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!