aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorGravatar Erik Larsson <karl.erik.larsson@gmail.com>2018-04-12 22:36:48 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-12 22:38:50 +0200
commit4a1ad1d135e38f01ba8dd13f713667a071ad3f2e (patch)
tree622d84ff70ecd3c122912f083284420e4b98a52a /board
parent4755bf2bd43a7b4c3bf4f88be790240a01b3116f (diff)
downloadbuildroot-4a1ad1d135e38f01ba8dd13f713667a071ad3f2e.tar.gz
buildroot-4a1ad1d135e38f01ba8dd13f713667a071ad3f2e.tar.bz2
board/freescale/common/imx: add imx8-bootloader-prepare script
This commit adds an imx8-bootloader-prepare.sh script that will be used by i.MX8 platforms to prepare their bootloader image. Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com> Signed-off-by: Christopher Dahlberg <crille.dahlberg@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'board')
-rwxr-xr-xboard/freescale/common/imx/imx8-bootloader-prepare.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/board/freescale/common/imx/imx8-bootloader-prepare.sh b/board/freescale/common/imx/imx8-bootloader-prepare.sh
new file mode 100755
index 0000000000..2648147ab0
--- /dev/null
+++ b/board/freescale/common/imx/imx8-bootloader-prepare.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+main ()
+{
+ # Currently we support imx8mqevk.
+ cat ${BINARIES_DIR}/u-boot-spl.bin ${BINARIES_DIR}/lpddr4_pmu_train_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin
+ BL31=${BINARIES_DIR}/bl31.bin BL33=${BINARIES_DIR}/u-boot.bin ${HOST_DIR}/bin/mkimage_fit_atf.sh ${BINARIES_DIR}/fsl-imx8mq-evk.dtb > ${BINARIES_DIR}/u-boot.its
+ ${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 $@