make.sh: support assign compression
Use new args mechanism to call fit generator script. Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Ifc74852d5de1b76ea103981e7a71c3cb5e12a961
This commit is contained in:
parent
3882551536
commit
1a2ec6b5b5
12
make.sh
12
make.sh
|
|
@ -578,8 +578,16 @@ function pack_uboot_itb_image()
|
||||||
mcu_enabled=`awk -F"," '/MCU=/ { printf $3 }' ${ini} | tr -d ' '`
|
mcu_enabled=`awk -F"," '/MCU=/ { printf $3 }' ${ini} | tr -d ' '`
|
||||||
if [ "${mcu_enabled}" == "enabled" ]; then
|
if [ "${mcu_enabled}" == "enabled" ]; then
|
||||||
mcu_image=`awk -F"," '/MCU=/ { printf $1 }' ${ini} | tr -d ' ' | cut -c 5-`
|
mcu_image=`awk -F"," '/MCU=/ { printf $1 }' ${ini} | tr -d ' ' | cut -c 5-`
|
||||||
mcu_offset=`awk -F"," '/MCU=/ { printf $2 }' ${ini} | tr -d ' '`
|
|
||||||
cp ${RKBIN}/${mcu_image} mcu.bin
|
cp ${RKBIN}/${mcu_image} mcu.bin
|
||||||
|
mcu_offset=`awk -F"," '/MCU=/ { printf $2 }' ${ini} | tr -d ' '`
|
||||||
|
optional_mcu="-m "${mcu_offset}
|
||||||
|
else
|
||||||
|
optional_mcu=
|
||||||
|
fi
|
||||||
|
|
||||||
|
compression=`awk -F"," '/COMPRESSION=/ { printf $1 }' ${ini} | tr -d ' ' | cut -c 13-`
|
||||||
|
if [ -z "${compression}" ]; then
|
||||||
|
compression="none"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SPL_FIT_SOURCE=`sed -n "/CONFIG_SPL_FIT_SOURCE=/s/CONFIG_SPL_FIT_SOURCE=//p" .config | tr -d '""'`
|
SPL_FIT_SOURCE=`sed -n "/CONFIG_SPL_FIT_SOURCE=/s/CONFIG_SPL_FIT_SOURCE=//p" .config | tr -d '""'`
|
||||||
|
|
@ -587,7 +595,7 @@ function pack_uboot_itb_image()
|
||||||
cp ${SPL_FIT_SOURCE} u-boot.its
|
cp ${SPL_FIT_SOURCE} u-boot.its
|
||||||
else
|
else
|
||||||
SPL_FIT_GENERATOR=`sed -n "/CONFIG_SPL_FIT_GENERATOR=/s/CONFIG_SPL_FIT_GENERATOR=//p" .config | tr -d '""'`
|
SPL_FIT_GENERATOR=`sed -n "/CONFIG_SPL_FIT_GENERATOR=/s/CONFIG_SPL_FIT_GENERATOR=//p" .config | tr -d '""'`
|
||||||
${SPL_FIT_GENERATOR} ${tee_offset} ${mcu_offset} > u-boot.its
|
${SPL_FIT_GENERATOR} -u -t ${tee_offset} -c ${compression} ${optional_mcu} > u-boot.its
|
||||||
fi
|
fi
|
||||||
./tools/mkimage -f u-boot.its -E u-boot.itb
|
./tools/mkimage -f u-boot.its -E u-boot.itb
|
||||||
echo "pack u-boot.itb okay! Input: ${ini}"
|
echo "pack u-boot.itb okay! Input: ${ini}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue