diff --git a/iMX8QM/soc.mak b/iMX8QM/soc.mak index 5351a679f964a38214f14b5cd24f758f8091796b..355851e695200ec4b46baf5da76fd337c9835871 100644 --- a/iMX8QM/soc.mak +++ b/iMX8QM/soc.mak @@ -81,7 +81,11 @@ u-boot-atf-container.img: bl31.bin u-boot-hash.bin mv u-boot-hash.bin.temp u-boot-hash.bin; \ fi if [ -f "tee.bin" ]; then \ - ./$(MKIMG) -soc QM -rev B0 -c -ap bl31.bin a53 0x80000000 -ap u-boot-hash.bin a53 0x80020000 -ap tee.bin a53 0xFE000000 -out u-boot-atf-container.img; \ + if [ $(shell echo $(ROLLBACK_INDEX_IN_CONTAINER)) ]; then \ + ./$(MKIMG) -soc QM -sw_version $(ROLLBACK_INDEX_IN_CONTAINER) -rev B0 -c -ap bl31.bin a53 0x80000000 -ap u-boot-hash.bin a53 0x80020000 -ap tee.bin a53 0xFE000000 -out u-boot-atf-container.img; \ + else \ + ./$(MKIMG) -soc QM -rev B0 -c -ap bl31.bin a53 0x80000000 -ap u-boot-hash.bin a53 0x80020000 -ap tee.bin a53 0xFE000000 -out u-boot-atf-container.img; \ + fi; \ else \ ./$(MKIMG) -soc QM -rev B0 -c -ap bl31.bin a53 0x80000000 -ap u-boot-hash.bin a53 0x80020000 -out u-boot-atf-container.img; \ fi @@ -198,19 +202,19 @@ flash_b0_spl_fit_m4_1_trusty: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin u-b flash_b0_spl_container_m4_1_trusty: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin u-boot-atf-container.img CM41.bin tee.bin u-boot-spl.bin ./$(MKIMG) -soc QM -rev B0 -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -m4 CM41.bin 1 0x88800000 -ap u-boot-spl.bin a53 0x00100000 -out flash.bin + cp flash.bin boot-spl-container.img @flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \ pad_cnt=$$(((flashbin_size + 0x400 - 1) / 0x400)); \ echo "append u-boot-atf-container.img at $$pad_cnt KB"; \ dd if=u-boot-atf-container.img of=flash.bin bs=1K seek=$$pad_cnt; \ - rm -f u-boot-atf-container.img; flash_b0_spl_container_trusty: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin u-boot-atf-container.img tee.bin 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 + cp flash.bin boot-spl-container.img @flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \ pad_cnt=$$(((flashbin_size + 0x400 - 1) / 0x400)); \ echo "append u-boot-atf-container.img at $$pad_cnt KB"; \ dd if=u-boot-atf-container.img of=flash.bin bs=1K seek=$$pad_cnt; \ - rm -f u-boot-atf-container.img; 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 diff --git a/iMX8QX/soc.mak b/iMX8QX/soc.mak index 586559eefcd166ec24eb055e5acf000cd40435c1..156d2ac20ecc4f6dbed80b68fef14565bc2080f5 100644 --- a/iMX8QX/soc.mak +++ b/iMX8QX/soc.mak @@ -72,7 +72,11 @@ u-boot-atf.itb: u-boot-hash.bin bl31.bin u-boot-atf-container.img: bl31.bin u-boot-hash.bin if [ -f tee.bin ]; then \ - ./$(MKIMG) -soc QX -rev B0 -c -ap bl31.bin a35 0x80000000 -ap u-boot-hash.bin a35 0x80020000 -ap tee.bin a35 0xFE000000 -out u-boot-atf-container.img; \ + if [ $(shell echo $(ROLLBACK_INDEX_IN_CONTAINER)) ]; then \ + ./$(MKIMG) -soc QX -sw_version $(ROLLBACK_INDEX_IN_CONTAINER) -rev B0 -c -ap bl31.bin a35 0x80000000 -ap u-boot-hash.bin a35 0x80020000 -ap tee.bin a35 0xFE000000 -out u-boot-atf-container.img; \ + else \ + ./$(MKIMG) -soc QX -rev B0 -c -ap bl31.bin a35 0x80000000 -ap u-boot-hash.bin a35 0x80020000 -ap tee.bin a35 0xFE000000 -out u-boot-atf-container.img; \ + fi; \ else \ ./$(MKIMG) -soc QX -rev B0 -c -ap bl31.bin a35 0x80000000 -ap u-boot-hash.bin a35 0x80020000 -out u-boot-atf-container.img; \ fi @@ -178,11 +182,11 @@ flash_all_spl_fit: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.itb flash_all_spl_container: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf-container.img CM4.bin u-boot-spl.bin ./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-spl.bin a35 0x00100000 -m4 CM4.bin 0 0x88000000 -out flash.bin + cp flash.bin boot-spl-container.img @flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \ pad_cnt=$$(((flashbin_size + 0x400 - 1) / 0x400)); \ echo "append u-boot-atf-container.img at $$pad_cnt KB"; \ dd if=u-boot-atf-container.img of=flash.bin bs=1K seek=$$pad_cnt; \ - rm -f u-boot-atf-container.img; 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