2018-04-12 22:36:48 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
main ()
|
|
|
|
{
|
2018-07-19 12:31:04 +02:00
|
|
|
UBOOT_DTB=$2
|
|
|
|
if [ ! -e "$UBOOT_DTB" ]; then
|
|
|
|
echo "ERROR: couldn't find dtb: $UBOOT_DTB"
|
|
|
|
exit 1
|
|
|
|
fi
|
2018-04-12 22:36:48 +02:00
|
|
|
cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
|
2018-07-19 12:31:04 +02:00
|
|
|
BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${UBOOT_DTB} > ${BINARIES_DIR}/u-boot.its
|
2018-04-12 22:36:48 +02:00
|
|
|
${HOST_DIR}/bin/mkimage -E -p 0x3000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb
|
|
|
|
rm -f ${BINARIES_DIR}/u-boot.its
|
|
|
|
|
|
|
|
${HOST_DIR}/bin/mkimage_imx8 -fit -signed_hdmi ${BINARIES_DIR}/signed_hdmi_imx8m.bin -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x7E1000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin
|
|
|
|
|
|
|
|
exit $?
|
|
|
|
}
|
|
|
|
|
|
|
|
main $@
|