summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Ji <ji.luo@nxp.com>2018-10-25 22:08:14 +0800
committerfaqiang.zhu <faqiang.zhu@nxp.com>2018-10-26 14:46:05 +0800
commitb38a91993ea73f8b8bea71ec5e15540260a6ee92 (patch)
tree6f8726174d11baa8d4cbf4ae78a6cf5554d21064
parentcb8a72c4d73563cff51a4005bec36d8b3f6037bf (diff)
iMX8Q: Support spl build for Android/Android Autop9.0.0_1.0.2-auto-alphap9.0.0_1.0.0-beta
Add targets to make images for imx8q after spl build and fit are enabled. Signed-off-by: Luo Ji <ji.luo@nxp.com> Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
-rwxr-xr-xiMX8QM/mkimage_fit_atf.sh11
-rw-r--r--iMX8QM/soc.mak14
-rwxr-xr-xiMX8QX/mkimage_fit_atf.sh10
-rw-r--r--iMX8QX/soc.mak8
4 files changed, 42 insertions, 1 deletions
diff --git a/iMX8QM/mkimage_fit_atf.sh b/iMX8QM/mkimage_fit_atf.sh
index 80c52c6..30fb956 100755
--- a/iMX8QM/mkimage_fit_atf.sh
+++ b/iMX8QM/mkimage_fit_atf.sh
@@ -83,6 +83,15 @@ cat << __CONF_HEADER_EOF
__CONF_HEADER_EOF
+if [ -f $BL32 ]; then
+cat << __CONF_SECTION1_EOF
+ config@1 {
+ description = "fsl-imx8qm-mek";
+ firmware = "uboot@1";
+ loadables = "atf@1", "tee@1";
+ };
+__CONF_SECTION1_EOF
+else
cat << __CONF_SECTION1_EOF
config@1 {
description = "fsl-imx8qm-mek";
@@ -90,7 +99,7 @@ cat << __CONF_SECTION1_EOF
loadables = "atf@1";
};
__CONF_SECTION1_EOF
-
+fi
cat << __ITS_EOF
};
};
diff --git a/iMX8QM/soc.mak b/iMX8QM/soc.mak
index 256e30b..75bc6cb 100644
--- a/iMX8QM/soc.mak
+++ b/iMX8QM/soc.mak
@@ -60,6 +60,12 @@ u-boot-atf.bin: u-boot.bin bl31.bin
u-boot-atf.itb:
./$(MKIMG) -commit > head.hash
@cat u-boot.bin head.hash > u-boot-hash.bin
+ @if [ -f "hdmitxfw.bin" ] && [ -f "hdmirxfw.bin" ]; then \
+ objcopy -I binary -O binary --pad-to 0x20000 --gap-fill=0x0 hdmitxfw.bin hdmitxfw-pad.bin; \
+ objcopy -I binary -O binary --pad-to 0x20000 --gap-fill=0x0 hdmirxfw.bin hdmirxfw-pad.bin; \
+ cat u-boot-hash.bin hdmitxfw-pad.bin hdmirxfw-pad.bin > u-boot-hash.bin.temp; \
+ mv u-boot-hash.bin.temp u-boot-hash.bin; \
+ fi
./mkimage_fit_atf.sh > u-boot.its;
./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot-atf.itb;
@rm -f u-boot.its
@@ -162,6 +168,14 @@ flash_b0_multi_cores_m4_1: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin u-boot
flash_b0_multi_cores_m4_1_trusty: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin u-boot-atf.bin m41_tcm.bin tee.bin
./$(MKIMG) -soc QM -rev B0 -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -m4 m41_tcm.bin 1 0x38FE0000 -ap u-boot-atf.bin a53 0x80000000 -data tee.bin 0x84000000 -out flash.bin
+flash_b0_spl_fit_m4_1_trusty: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin u-boot-atf.itb m41_tcm.bin tee.bin u-boot-spl.bin
+ ./$(MKIMG) -soc QM -rev B0 -dcd skip -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -m4 m41_tcm.bin 1 0x38FE0000 -ap u-boot-spl.bin a53 0x00100000 -out flash.bin
+ @flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \
+ pad_cnt=$$(((flashbin_size + 0x400 - 1) / 0x400)); \
+ echo "append u-boot-atf.itb at $$pad_cnt KB"; \
+ dd if=u-boot-atf.itb of=flash.bin bs=1K seek=$$pad_cnt; \
+ rm -f u-boot-atf.itb;
+
flash_b0_spl_fit: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin u-boot-atf.itb u-boot-spl.bin
./$(MKIMG) -soc QM -rev B0 -dcd skip -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-spl.bin a53 0x00100000 -out flash.bin
@flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \
diff --git a/iMX8QX/mkimage_fit_atf.sh b/iMX8QX/mkimage_fit_atf.sh
index 783fbb5..b88a069 100755
--- a/iMX8QX/mkimage_fit_atf.sh
+++ b/iMX8QX/mkimage_fit_atf.sh
@@ -83,6 +83,15 @@ cat << __CONF_HEADER_EOF
__CONF_HEADER_EOF
+if [ -f $BL32 ]; then
+cat << __CONF_SECTION1_EOF
+ config@1 {
+ description = "fsl-imx8qxp-mek";
+ firmware = "uboot@1";
+ loadables = "atf@1", "tee@1";
+ };
+__CONF_SECTION1_EOF
+else
cat << __CONF_SECTION1_EOF
config@1 {
description = "fsl-imx8qxp-mek";
@@ -90,6 +99,7 @@ cat << __CONF_SECTION1_EOF
loadables = "atf@1";
};
__CONF_SECTION1_EOF
+fi
cat << __ITS_EOF
};
diff --git a/iMX8QX/soc.mak b/iMX8QX/soc.mak
index d0d1f3d..0123aee 100644
--- a/iMX8QX/soc.mak
+++ b/iMX8QX/soc.mak
@@ -145,6 +145,14 @@ flash_spl_fit: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.itb u-b
dd if=u-boot-atf.itb of=flash.bin bs=1K seek=$$pad_cnt; \
rm -f u-boot-atf.itb;
+flash_all_spl_fit: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.itb CM4.bin u-boot-spl.bin
+ ./$(MKIMG) -soc QX -rev B0 -dcd skip -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-spl.bin a35 0x00100000 -m4 CM4.bin 0 0x34FE0000 -out flash.bin
+ @flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \
+ pad_cnt=$$(((flashbin_size + 0x400 - 1) / 0x400)); \
+ echo "append u-boot-atf.itb at $$pad_cnt KB"; \
+ dd if=u-boot-atf.itb of=flash.bin bs=1K seek=$$pad_cnt; \
+ rm -f u-boot-atf.itb;
+
flash_spl: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.bin u-boot-spl.bin
./$(MKIMG) -soc QX -rev B0 -dcd skip -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-spl.bin a35 0x00100000 -out flash.bin
@flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \