zapper: pack irdeto loadercore bl2f to bl33 [4/4]
PD#SWPL-185850
Problem:
Support irdeto bootstrap with standalone
Solution:
support irdeto bootstrap with standalone
Verify:
zapper
Change-Id: I1a15122b46da31ba4e9621bfbf4d90e69a841793
Signed-off-by: ziting.xian <ziting.xian@amlogic.com>
diff --git a/mk_script.sh b/mk_script.sh
index 4c8eceb..41f45f6 100755
--- a/mk_script.sh
+++ b/mk_script.sh
@@ -338,7 +338,7 @@
# bl2/bl30/bl31..etc, build or copy from bin.git
build_blx $@
- if [ "1" == "${CONFIG_NASC_NAGRA_TIER_1}" ]; then
+ if [[ "1" == "${CONFIG_NASC_NAGRA_TIER_1}" || "y" == "${CONFIG_ZAPPER_IRDETO_LOADER_V5}" ]]; then
# combine bl2f.bin with bl33(uboot)
combine_bl2f_with_bl33
fi
@@ -630,6 +630,7 @@
fi
BL2F_BIN_FIXED_PATH=${argv[@]:$((i))}
+ BL2F_BIN_FIXED_PATH=${BL2F_BIN_FIXED_PATH%%--*}
export BL2F_BIN_FIXED_PATH
continue ;;
--bl30)
@@ -814,7 +815,7 @@
}
function combine_bl2f_with_bl33() {
- if [ "1" == "${CONFIG_NASC_NAGRA_TIER_1}" ]; then
+ if [[ "1" == "${CONFIG_NASC_NAGRA_TIER_1}" || "y" == "${CONFIG_ZAPPER_IRDETO_LOADER_V5}" ]]; then
# place bl2f at end of u-boot.bin, _end align(4096)
if [ "y" == "${BL2F_UPDATE_TYPE}" ]; then
echo "use source code build, bl2f bin: bl2/ree/bl2f/bl2f.bin"
@@ -836,15 +837,15 @@
exit -1
fi
- END_LENS=`stat -c "%s" "./bl33/v2019/build/u-boot.bin"`
+ END_LENS=`stat -c "%s" "${BL33_BUILD_FOLDER}u-boot.bin"`
END_ALIGN=4096
BL2F_LOAD=`echo "((($END_LENS-1) / $END_ALIGN * $END_ALIGN) + $END_ALIGN)" | bc`
echo "uboot.bin size:$END_LENS, align:$END_ALIGN, new uboot size:$BL2F_LOAD"
- dd if=/dev/zero of=./bl33/v2019/u-boot.tmp bs=$BL2F_LOAD count=1
- dd if=./bl33/v2019/build/u-boot.bin of=./bl33/v2019/u-boot.tmp conv=notrunc &> /dev/null
- cat $BL2F_BIN >> bl33/v2019/u-boot.tmp
- cp -rf bl33/v2019/u-boot.tmp bl33/v2019/build/u-boot.bin
+ dd if=/dev/zero of=${UBOOT_SRC_FOLDER}/u-boot.tmp bs=$BL2F_LOAD count=1
+ dd if=${BL33_BUILD_FOLDER}u-boot.bin of=${UBOOT_SRC_FOLDER}/u-boot.tmp conv=notrunc &> /dev/null
+ cat $BL2F_BIN >> ${UBOOT_SRC_FOLDER}/u-boot.tmp
+ cp -rf ${UBOOT_SRC_FOLDER}/u-boot.tmp ${BL33_BUILD_FOLDER}u-boot.bin
echo "Append bl2f.bin to the end of uboot.bin OK."
fi
}