Commit dd64b450 authored by Ye Li's avatar Ye Li

imx8: Clean up targets

Split the soc.mak to several .mak files for different usages:

soc.mak:       BSP default build targets
android.mak:   Android specified targets
m4.mak:        M4 standalone targets
rev_a.mak:     Revision A0 chip targets
autobuild.mak: Nightly build targets
misc.mak:      Mfgtool, secofw, msgblock, nandfw targets
test.mak:      Various test targets: scfw_test, DDR_stress_test,
               NAND test, etc
Signed-off-by: default avatarYe Li <ye.li@nxp.com>
(cherry picked from commit 28dd3769902263e6e304520559b0ec43c9c6180f)
parent cf81e9e6
......@@ -44,16 +44,18 @@ src/build_info.h:
help:
@echo $(CURR_DIR)
@echo "usage ${MAKE} SOC=<SOC_TARGET> [TARGET]"
@echo "i.e. ${MAKE} SOC=iMX8QX flash_dcd"
@echo "i.e. ${MAKE} SOC=iMX8QX flash"
@echo "Common Targets:"
@echo
@echo "Parts with SCU"
@echo " flash_scfw - Only boot SCU"
@echo " flash_dcd - SCU + AP cluster with DCDs"
@echo " flash - SCU + AP (no DCD)"
@echo " flash_flexspi - SCU + AP (FlexSPI device) "
@echo " flash_cm4_0 - SCU + M4_0 w/ DCDs "
@echo " flash_all - SCU + AP + M4 + SCD + CSF(AP & SCU) w/ DCDs"
@echo " flash_scfw - Only boot SCU"
@echo " flash - SCU + AP"
@echo " flash_flexspi - SCU + AP (FlexSPI device) "
@echo " flash_nand - SCU + AP (NAND device) "
@echo " flash_cm4 - SCU + M4_0 TCM image"
@echo " flash_linux_m4 - SCU + AP (OPTEE) + M4_0 (and M4_1) TCM image"
@echo " flash_linux_m4_xip - SCU + AP (OPTEE) + M4_0 (and M4_1) FLASH XIP image"
@echo " flash_linux_m4_ddr - SCU + AP (OPTEE) + M4_0 (and M4_1) DDR image"
@echo ""
@echo "Parts w/o SCU"
@echo " flash_ddr3l_val - DisaplayPort FW + u-boot spl"
......
flash_b0: flash
flash_b0_flexspi: flash_flexspi
flash_b0_spl_container: flash_spl
flash_b0_spl_flexspi_container: flash_spl_flexspi
flash_b0_scfw: flash_scfw
flash_b0_linux: flash_kernel
flash_b0_ca72: flash_ca72
flash_b0_cm40flexspi: flash_cm4_xip
flash_b0_cm4sflexspi: flash_cm4s_xip
flash_b0_cm4_0: flash_cm4
flash_b0_cm4_1: flash_cm41
flash_b0_m4s_tcm: flash_cm4s
\ No newline at end of file
flash_b0_spl_container_m4_1_trusty: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin u-boot-atf-container.img m4_1_image.bin tee.bin u-boot-spl.bin
./$(MKIMG) -soc QM -rev B0 -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -m4 m4_1_image.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; \
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; \
WGET = /usr/bin/wget
N ?= latest
SERVER=http://yb2.am.freescale.net
#DIR = internal-only/Linux_IMX_Rocko_MX8/$(N)/common_bsp
DIR = internal-only/Linux_IMX_Core/$(N)/common_bsp
#DIR = internal-only/Linux_IMX_Regression/$(N)/common_bsp
nightly :
@rm -rf boot
@echo "Pulling nightly for Validation board from $(SERVER)/$(DIR)"
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qm/mx8qm-val-scfw-tcm.bin -O scfw_tcm.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qm/bl31-imx8qm.bin -O bl31.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qm/u-boot-imx8qmlpddr4arm2.bin-sd -O u-boot.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qm/mx8qm-ahab-container.img -O mx8qm-ahab-container.img
@$(WGET) -qr -nd -l1 -np $(SERVER)/$(DIR) -P boot -A "Image-*imx8qm*"
@$(RENAME) "Image-" "" boot/*.dtb
nightly_mek :
rm -rf boot
echo "Pulling nightly for MEK board from $(SERVER)/$(DIR)"
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qm/mx8qm-mek-scfw-tcm.bin -O scfw_tcm.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qm/bl31-imx8qm.bin -O bl31.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qm/u-boot-imx8qmmek.bin-sd -O u-boot.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qm/u-boot-spl.bin-imx8qmmek-sd -O u-boot-spl.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qm/mx8qm-ahab-container.img -O mx8qm-ahab-container.img
@$(WGET) -qr -nd -l1 -np $(SERVER)/$(DIR) -P boot -A "Image-*imx8qm*"
@$(RENAME) "Image-" "" boot/*.dtb
flash_cm4: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin m4_image.bin
./$(MKIMG) -soc QM -rev B0 -dcd skip -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
flash_cm41: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin m4_1_image.bin
./$(MKIMG) -soc QM -rev B0 -dcd skip -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -p1 -m4 m4_1_image.bin 1 0x38FE0000 -out flash.bin
flash_cm4s: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin m4_image.bin m4_1_image.bin
./$(MKIMG) -soc QM -rev B0 -dcd skip -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x34FE0000 -m4 m4_1_image.bin 1 0x38FE0000 -out flash.bin
flash_cm4_ddr: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin m4_image.bin
./$(MKIMG) -soc QM -rev B0 -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x88000000 -out flash.bin
flash_cm41_ddr: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin m4_1_image.bin
./$(MKIMG) -soc QM -rev B0 -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -p1 -m4 m4_1_image.bin 1 0x88800000 -out flash.bin
flash_cm4s_ddr: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin m4_image.bin m4_1_image.bin
./$(MKIMG) -soc QM -rev B0 -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x88000000 -m4 m4_1_image.bin 1 0x88800000 -out flash.bin
flash_cm4_xip: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin m4_image.bin $(QSPI_HEADER)
./$(MKIMG) -soc QM -rev B0 -dcd skip -dev flexspi -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -fileoff 0x80000 -p1 -m4 m4_image.bin 0 0x08081000 -out flash.bin
./$(QSPI_PACKER) $(QSPI_HEADER)
flash_cm41_xip: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin m4_1_image.bin $(QSPI_HEADER)
./$(MKIMG) -soc QM -rev B0 -dcd skip -dev flexspi -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -fileoff 0x180000 -p1 -m4 m4_1_image.bin 1 0x08181000 -out flash.bin
./$(QSPI_PACKER) $(QSPI_HEADER)
flash_cm4s_xip: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin m4_image.bin m4_1_image.bin $(QSPI_HEADER)
./$(MKIMG) -soc QM -rev B0 -dcd skip -dev flexspi -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin -fileoff 0x80000 -p1 -m4 m4_image.bin 0 0x08081000 -fileoff 0x180000 -m4 m4_1_image.bin 1 0x08181000 -out flash.bin
./$(QSPI_PACKER) $(QSPI_HEADER)
\ No newline at end of file
DCD_800_CFG_SRC = imx8qm_dcd_800MHz.cfg
DCD_1200_CFG_SRC = imx8qm_dcd_1.2GHz.cfg
DCD_CFG_SRC = imx8qm_dcd_1.6GHz.cfg
DCD_800_CFG = imx8qm_dcd_800.cfg.tmp
DCD_1200_CFG = imx8qm_dcd_1200.cfg.tmp
DCD_CFG = imx8qm_dcd.cfg.tmp
#set default DDR_training to be in DCDs
DDR_TRAIN ?= 1
$(DCD_CFG): FORCE
@echo "Converting iMX8 DCD 1.6GHz file"
$(CC) -E -Wp,-MD,.imx8qm_dcd.cfg.cfgtmp.d -nostdinc -Iinclude -I$(INCLUDE) -DDDR_TRAIN_IN_DCD=$(DDR_TRAIN) -x c -o $(DCD_CFG) $(DCD_CFG_SRC)
$(DCD_800_CFG): FORCE
@echo "Converting iMX8 DCD 800MHz file"
$(CC) -E -Wp,-MD,.imx8qm_dcd_800.cfg.cfgtmp.d -nostdinc -Iinclude -I$(INCLUDE) -DDDR_TRAIN_IN_DCD=$(DDR_TRAIN) -x c -o $(DCD_800_CFG) $(DCD_800_CFG_SRC)
$(DCD_1200_CFG): FORCE
@echo "Converting iMX8 DCD 1200MHz file"
$(CC) -E -Wp,-MD,.imx8qm_dcd_1200.cfg.cfgtmp.d -nostdinc -Iinclude -I$(INCLUDE) -DDDR_TRAIN_IN_DCD=$(DDR_TRAIN) -x c -o $(DCD_1200_CFG) $(DCD_1200_CFG_SRC)
flash_a0_scfw: $(MKIMG) scfw_tcm.bin
./$(MKIMG) -soc QM -c -scfw scfw_tcm.bin -out flash.bin
flash_a0_dcd: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a53 0x80000000 -out flash.bin
flash_a0_dcd_800: $(MKIMG) $(DCD_800_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_800_CFG) -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a53 0x80000000 -out flash.bin
flash_a0_dcd_1200: $(MKIMG) $(DCD_1200_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_1200_CFG) -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a53 0x80000000 -out flash.bin
flash_a0_early: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -c -flags 0x00400000 -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a53 0x80000000 -out flash.bin
flash_a0_flexspi: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -c -dev flexspi -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a53 0x80000000 -out flash.bin
./$(QSPI_PACKER) $(QSPI_HEADER)
flash_a0_ca72: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -c -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a72 0x80000000 -out flash.bin
flash_a0_multi_cores_m4_1: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m41_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -m4 m41_tcm.bin 1 0x38FE0000 -c -ap u-boot-atf.bin a53 0x80000000 -out flash.bin
flash_a0_multi_cores: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m40_tcm.bin m41_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -m4 m40_tcm.bin 0 0x34FE0000 -m4 m41_tcm.bin 1 0x38FE0000 -c -ap u-boot-atf.bin a53 0x80000000 -out flash.bin
flash_a0_cm4_0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m4_image.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
flash_a0_cm4_1: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m4_image.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 1 0x38FE0000 -out flash.bin
flash_a0_m4s_tcm: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m40_tcm.bin m41_tcm.bin
./$(MKIMG) -soc QM -c -scfw scfw_tcm.bin -p1 -m4 m40_tcm.bin 0 0x34FE0000 -m4 m41_tcm.bin 1 0x38FE0000 -out flash.bin
flash_a0_all: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m4_image.bin u-boot-atf.bin scd.bin csf.bin csf_ap.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -m4 m4_image.bin 0 0x34FE0000 -csf csf.bin -scd scd.bin -c -ap u-boot-atf.bin a53 0x80000000 -csf csf_ap.bin -out flash.bin
flash_a0_ca72_ddrstress: $(MKIMG) scfw_tcm.bin mx8qm_ddr_stress_test.bin
./$(MKIMG) -soc QM -c -flags 0x00800000 -scfw scfw_tcm.bin -c -ap mx8qm_ddr_stress_test.bin a72 0x00112000 -out flash.bin
flash_a0_ca53_ddrstress: $(MKIMG) scfw_tcm.bin mx8qm_ddr_stress_test.bin
./$(MKIMG) -soc QM -c -flags 0x00800000 -scfw scfw_tcm.bin -c -ap mx8qm_ddr_stress_test.bin a53 0x00112000 -out flash.bin
flash_a0_ca72_ddrstress_dcd: $(MKIMG) $(DCD_CFG) scfw_tcm.bin mx8qm_ddr_stress_test.bin
./$(MKIMG) -soc QM -c -flags 0x00800000 -dcd $(DCD_CFG) -scfw scfw_tcm.bin -c -ap mx8qm_ddr_stress_test.bin a72 0x00112000 -out flash.bin
flash_a0_ca53_ddrstress_dcd: $(MKIMG) $(DCD_CFG) scfw_tcm.bin mx8qm_ddr_stress_test.bin
./$(MKIMG) -soc QM -c -flags 0x00800000 -dcd $(DCD_CFG) -scfw scfw_tcm.bin -c -ap mx8qm_ddr_stress_test.bin a53 0x00112000 -out flash.bin
flash_a0_cm4_01_ddr: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m40_ddr.bin m41_ddr.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -p1 -m4 m40_ddr.bin 0 0x88000000 -m4 m41_ddr.bin 1 0x88800000 -out flash.bin
flash_a0_m4_tcm_ddr: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m4_image.bin m41_ddr.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x34FE0000 -m4 m41_ddr.bin 1 0x88800000 -out flash.bin
flash_a0_cm4_1_ddr: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m41_ddr.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -p1 -m4 m41_ddr.bin 1 0x88800000 -out flash.bin
flash_a0_fastboot: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QM -dev emmc_fast -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -m4 m4_image.bin 0 0x34fe0000 -ap u-boot-atf.bin a53 0x80000000 -out flash.bin
flash_a0_aprom_ddr: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin aprom_ddr.bin csf_ap.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -ap aprom_ddr.bin a53 0x80000000 -c -ap u-boot-atf.bin a53 0x90000000 -csf csf_ap.bin -out flash.bin
flash_a0_aprom_ddr_unsigned: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin aprom_ddr.bin csf_ap.bin
./$(MKIMG) -soc QM -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -ap aprom_ddr.bin a53 0x80000000 -c -ap u-boot-atf.bin a53 0x90000000 -out flash.bin
\ No newline at end of file
flash_b0_ca72_ddrstress: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin mx8qmb0_ddr_stress_test.bin
./$(MKIMG) -soc QM -rev B0 -append mx8qm-ahab-container.img -c -flags 0x00800000 -scfw scfw_tcm.bin -ap mx8qmb0_ddr_stress_test.bin a72 0x00100000 -out flash.bin
flash_ddrstress flash_b0_ca53_ddrstress: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin mx8qmb0_ddr_stress_test.bin
./$(MKIMG) -soc QM -rev B0 -append mx8qm-ahab-container.img -c -flags 0x00800000 -scfw scfw_tcm.bin -ap mx8qmb0_ddr_stress_test.bin a53 0x00100000 -out flash.bin
flash_scfw_test flash_b0_scfw_test: $(MKIMG) mx8qm-ahab-container.img scfw_tcm.bin scfw_tests.bin
./$(MKIMG) -soc QM -rev B0 -dcd skip -append mx8qm-ahab-container.img -c -scfw scfw_tcm.bin --data scfw_tests.bin 0x100000 -out flash.bin
\ No newline at end of file
This diff is collapsed.
flash_b0: flash
flash_spl_container: flash_spl
flash_spl_flexspi_container: flash_spl_flexspi
flash_spl_nand_container: flash_spl_nand
flash_all_spl_container: flash_linux_m4
flash_b0_all flash_all flash_uboot_cm4 flash_b0_uboot_cm4: flash_regression_linux_m4
flash_uboot_cm4ddr flash_b0_uboot_cm4ddr: flash_regression_linux_m4_ddr
flash_b0_scfw: flash_scfw
flash_b0_linux: flash_kernel
flash_b0_cm4: flash_cm4
flash_b0_cm4ddr: flash_cm4_ddr
flash_b0_cm4flexspi: flash_cm4_xip
\ No newline at end of file
flash_b0_all_ddr: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.bin m4_image
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -m4 m4_image 0 0x88000000 -out flash.bin
\ No newline at end of file
WGET = /usr/bin/wget
N ?= latest
SERVER=http://yb2.am.freescale.net
#DIR = internal-only/Linux_IMX_Rocko_MX8/$(N)/common_bsp
#DIR = internal-only/Linux_IMX_Core/$(N)/common_bsp
DIR = internal-only/Linux_IMX_Regression/$(N)/common_bsp
nightly :
@rm -rf boot
@echo "Pulling nightly for Validation board from $(SERVER)/$(DIR)"
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/mx8qx-ahab-container.img -O mx8qx-ahab-container.img
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/mx8qx-val-scfw-tcm.bin -O scfw_tcm.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/bl31-imx8qxp.bin -O bl31.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/u-boot-imx8qxplpddr4arm2.bin-sd -O u-boot.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/CM4.bin -O u-boot.bin -O CM4.bin
@$(WGET) -qr -nd -l1 -np $(SERVER)/$(DIR)/imx_dtbs -P boot -A "Image-fsl-imx8qxp-*.dtb"
@$(WGET) -q $(SERVER)/$(DIR)/Image-imx8_all.bin -O Image
@mv -f Image boot
@$(RENAME) "Image-" "" boot/*.dtb
nightly_mek :
@rm -rf boot
@echo "Pulling nightly for MEK board from $(SERVER)/$(DIR)"
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/mx8qx-ahab-container.img -O mx8qx-ahab-container.img
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/mx8qx-mek-scfw-tcm.bin -O scfw_tcm.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/bl31-imx8qxp.bin -O bl31.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/u-boot-imx8qxpmek.bin-sd -O u-boot.bin
@$(WGET) -q $(SERVER)/$(DIR)/imx-boot/imx-boot-tools/imx8qx/CM4.bin -O u-boot.bin -O CM4.bin
@$(WGET) -qr -nd -l1 -np $(SERVER)/$(DIR)/imx_dtbs -P boot -A "Image-fsl-imx8qxp-*.dtb"
@$(WGET) -q $(SERVER)/$(DIR)/Image-imx8_all.bin -O Image
@mv -f Image boot
@$(RENAME) "Image-" "" boot/*.dtb
\ No newline at end of file
flash_cm4: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin m4_image.bin
./$(MKIMG) -soc QX -rev B0 -dcd skip -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
flash_cm4_ddr: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin m4_image.bin
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x88000000 -out flash.bin
flash_cm4_xip: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin m4_image.bin $(QSPI_HEADER)
./$(MKIMG) -soc QX -rev B0 -dcd skip -dev flexspi -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -fileoff 0x80000 -p1 -m4 m4_image.bin 0 0x08081000 -out flash.bin
./$(QSPI_PACKER) $(QSPI_HEADER)
\ No newline at end of file
flash_secofw flash_b0_secofw: $(MKIMG) ahabfw.bin
./$(MKIMG) -soc QX -rev B0 -c -seco ahabfw.bin -out flash.bin
flash_msg_block:
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -msg_blk test_block.bin field 0x83000000 -out flash.bin
flash_nand_fw: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_mfg flash_b0_mfg: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.bin Image fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot board.dtb Image0 Image1
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -data board.dtb 0x83000000 -data fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot 0x83100000 -data Image0 0x80280000 -data Image1 0x80c80000 -out flash_mfg.bin
flash_nand_mfg flash_nand_b0_mfg: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.bin Image fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot board-nand.dtb Image0 Image1
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -data board-nand.dtb 0x83000000 -data fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot 0x83100000 -data Image0 0x80280000 -data Image1 0x80c80000 -out flash_mfg.bin
DCD_CFG_SRC = imx8qx_dcd_1.2GHz.cfg
DCD_CFG = imx8qx_dcd.cfg.tmp
DCD_CFG_16BIT_SRC = imx8qx_dcd_16bit_1.2GHz.cfg
DCD_16BIT_CFG = imx8qx_16bit_dcd.cfg.tmp
DCD_CFG_DDR3_SRC = imx8qx_ddr3_dcd_1066MHz_ecc.cfg
DCD_DDR3_CFG = imx8qx_ddr3_dcd_1066MHz_ecc.cfg.tmp
DCD_CFG_DX_DDR3_SRC = imx8dx_ddr3_dcd_16bit_933MHz.cfg
DCD_DX_DDR3_CFG = imx8dx_ddr3_dcd_16bit_933MHz.cfg.tmp
#set default DDR_training to be in DCDs
DDR_TRAIN ?= 1
DDR3_DCD ?= 0
DX ?= 0
ifeq ($(DDR3_DCD), 1)
ifeq ($(DX), 1)
DCD_CFG_SRC = imx8dx_ddr3_dcd_16bit_933MHz.cfg
else
DCD_CFG_SRC = imx8qx_ddr3_dcd_1066MHz_ecc.cfg
endif
endif
$(DCD_CFG): FORCE
@echo "Converting iMX8 DCD file"
$(CC) -E -Wp,-MD,.imx8qx_dcd.cfg.cfgtmp.d -nostdinc -Iinclude -I$(INCLUDE) -DDDR_TRAIN_IN_DCD=$(DDR_TRAIN) -x c -o $(DCD_CFG) $(DCD_CFG_SRC)
$(CC) -E -Wp,-MD,.imx8qx_dcd.cfg.cfgtmp.d -nostdinc -Iinclude -I$(INCLUDE) -DDDR_TRAIN_IN_DCD=$(DDR_TRAIN) -x c -o $(DCD_16BIT_CFG) $(DCD_CFG_16BIT_SRC)
$(CC) -E -Wp,-MD,.imx8qx_dcd.cfg.cfgtmp.d -nostdinc -Iinclude -I$(INCLUDE) -DDDR_TRAIN_IN_DCD=$(DDR_TRAIN) -x c -o $(DCD_DDR3_CFG) $(DCD_CFG_DDR3_SRC)
$(CC) -E -Wp,-MD,.imx8dx_dcd.cfg.cfgtmp.d -nostdinc -Iinclude -I$(INCLUDE) -DDDR_TRAIN_IN_DCD=$(DDR_TRAIN) -x c -o $(DCD_DX_DDR3_CFG) $(DCD_CFG_DX_DDR3_SRC)
flash_scfw_a0: $(MKIMG) scfw_tcm.bin
./$(MKIMG) -soc QX -c -scfw scfw_tcm.bin -out flash.bin
flash_dcd_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_16bit_dcd_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -c -dcd $(DCD_16BIT_CFG) -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_ddr3_dcd_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -c -dcd $(DCD_DDR3_CFG) -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_dx_ddr3_dcd_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -c -dcd $(DCD_DX_DDR3_CFG) -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_a0: $(MKIMG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -c -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_cm4_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m4_image.bin
./$(MKIMG) -soc QX -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
flash_early_a0: $(MKIMG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -c -flags 0x00400000 -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_flexspi_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -dev flexspi -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_multi_cores_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m40_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -m4 m40_tcm.bin 0 0x34FE0000 -c -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_nand_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -dev nand -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -c -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
flash_all_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m4_image.bin u-boot-atf.bin scd.bin csf.bin csf_ap.bin
./$(MKIMG) -soc QX -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -m4 m4_image.bin 0 0x34FE0000 -scd scd.bin -csf csf.bin -c -ap u-boot-atf.bin a35 0x80000000 -csf csf_ap.bin -out flash.bin
flash_ca35_ddrstress_a0: $(MKIMG) scfw_tcm.bin mx8qx_ddr_stress_test.bin
./$(MKIMG) -soc QX -c -flags 0x00800000 -scfw scfw_tcm.bin -c -ap mx8qx_ddr_stress_test.bin a35 0x00112000 -out flash.bin
flash_ca35_ddrstress_dcd_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin mx8qx_ddr_stress_test.bin
./$(MKIMG) -soc QX -c -flags 0x00800000 -dcd $(DCD_CFG) -scfw scfw_tcm.bin -c -ap mx8qx_ddr_stress_test.bin a35 0x00112000 -out flash.bin
flash_cm4ddr_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin m4_image.bin
./$(MKIMG) -soc QX -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -p1 -m4 m4_image.bin 0 0x88000000 -out flash.bin
flash_fastboot_a0: $(MKIMG) $(DCD_CFG) scfw_tcm.bin u-boot-atf.bin
./$(MKIMG) -soc QX -dev emmc_fast -c -dcd $(DCD_CFG) -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -out flash.bin
\ No newline at end of file
flash_ddrstress flash_b0_ddrstress: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin mx8qx_ddr_stress_test.bin
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -flags 0x00800000 -scfw scfw_tcm.bin -ap mx8qxb0_ddr_stress_test.bin a35 0x00100000 -out flash.bin
flash_test_build_nand_4K flash_b0_test_build_nand_4K: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot.bin m4_image.bin
./$(MKIMG) -soc QX -rev B0 -dev nand 4K -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot.bin a35 0x80000000 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
flash_test_build_nand_8K flash_b0_test_build_nand_8K: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot.bin m4_image.bin
./$(MKIMG) -soc QX -rev B0 -dev nand 8K -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot.bin a35 0x80000000 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
flash_test_build_nand_16K flash_b0_test_build_nand_16K: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot.bin m4_image.bin
./$(MKIMG) -soc QX -rev B0 -dev nand 16K -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot.bin a35 0x80000000 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
flash_test_build flash_b0_test_build: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot.bin m4_image.bin
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot.bin a35 0x80000000 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
flash_test_build_mfg flash_b0_test_build_mfg: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin dummy_ddr.bin u-boot.bin CM4.bin kernel.bin initramfs.bin board.dtb
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot.bin a35 0x80000000 -m4 CM4.bin 0 0x34FE0000 -data kernel.bin 0x80280000 -data initramfs.bin 0x83100000 -data board.dtb 0x83000000 -out flash.bin
flash_scfw_test flash_b0_scfw_test: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin scfw_tests.bin
./$(MKIMG) -soc QX -rev B0 -dcd skip -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin --data scfw_tests.bin 0x100000 -out flash.bin
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment