rk: scripts/mkimg: Clean out directory before repack fit image
Also support fit boot.img is symlink. Change-Id: I1d2ebea389d0d8a2cbf19dee56832dd087c2c858 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
@ -123,8 +123,8 @@ check_mkimage()
|
|||||||
|
|
||||||
unpack_itb()
|
unpack_itb()
|
||||||
{
|
{
|
||||||
|
rm -rf ${OUT}
|
||||||
mkdir -p ${OUT}
|
mkdir -p ${OUT}
|
||||||
rm -f ${OUT}/fdt ${OUT}/kernel ${OUT}/resource
|
|
||||||
|
|
||||||
for NAME in $(fdtget -l ${ITB} /images)
|
for NAME in $(fdtget -l ${ITB} /images)
|
||||||
do
|
do
|
||||||
@ -151,7 +151,7 @@ gen_its()
|
|||||||
TMP_ITB=${OUT}/boot.tmp
|
TMP_ITB=${OUT}/boot.tmp
|
||||||
|
|
||||||
# add placeholder
|
# add placeholder
|
||||||
cp -a ${ITB} ${TMP_ITB}
|
cp ${ITB} ${TMP_ITB}
|
||||||
for NAME in $(fdtget -l ${ITB} /images); do
|
for NAME in $(fdtget -l ${ITB} /images); do
|
||||||
fdtput -t s ${TMP_ITB} /images/${NAME} data "/INCBIN/(${NAME})"
|
fdtput -t s ${TMP_ITB} /images/${NAME} data "/INCBIN/(${NAME})"
|
||||||
done
|
done
|
||||||
@ -252,7 +252,7 @@ fi
|
|||||||
echo " Image: resource.img (with ${DTB} ${LOGO} ${LOGO_KERNEL}) is ready"
|
echo " Image: resource.img (with ${DTB} ${LOGO} ${LOGO_KERNEL}) is ready"
|
||||||
|
|
||||||
if [ -f "${BOOT_IMG}" ]; then
|
if [ -f "${BOOT_IMG}" ]; then
|
||||||
if file -p -b ${BOOT_IMG} | grep -q 'Device Tree Blob' ; then
|
if file -L -p -b ${BOOT_IMG} | grep -q 'Device Tree Blob' ; then
|
||||||
repack_itb;
|
repack_itb;
|
||||||
elif [ -x ${srctree}/scripts/repack-bootimg ]; then
|
elif [ -x ${srctree}/scripts/repack-bootimg ]; then
|
||||||
repack_boot_img;
|
repack_boot_img;
|
||||||
|
|||||||
Reference in New Issue
Block a user