imx8qm_mek: switch to use container image
authorPeng Fan <peng.fan@nxp.com>
Thu, 22 Aug 2019 07:42:46 +0000 (07:42 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 8 Oct 2019 14:35:58 +0000 (16:35 +0200)
Because FIT could not be used for AHAB secure boot on i.MX8,
so switch to use container image that could let SPL verify
ATF and U-Boot with AHAB.

Enable HUSH_PARSER in defconfig to make run netboot could work.

Note: The AHAB related code has not been added.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
board/freescale/imx8qm_mek/README
board/freescale/imx8qm_mek/uboot-container.cfg [new file with mode: 0644]
configs/imx8qm_mek_defconfig

index c3523801ae9bdf5bbcd03bce3765909ffad98714..ebf630c446a3c12aed4caa032652d79e0c8a20ab 100644 (file)
@@ -39,11 +39,9 @@ $ cp imx-sc-firmware-0.7/mx8qm-mek-scfw-tcm.bin      .
 
 Build U-Boot
 ============
-$ export ATF_LOAD_ADDR=0x80000000
-$ export BL33_LOAD_ADDR=0x80020000
 $ make imx8qm_mek_defconfig
 $ make flash.bin
-$ dd if=u-boot.itb of=flash.bin bs=512 seek=1984
+$ dd if=u-boot.cnt of=flash.bin bs=512 seek=1984
 
 Flash the binary into the SD card
 =================================
diff --git a/board/freescale/imx8qm_mek/uboot-container.cfg b/board/freescale/imx8qm_mek/uboot-container.cfg
new file mode 100644 (file)
index 0000000..6cc47cd
--- /dev/null
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019 NXP
+ */
+
+#define __ASSEMBLY__
+
+/* This file is to create a container image could be loaded by SPL */
+BOOT_FROM SD 0x400
+SOC_TYPE IMX8QM
+CONTAINER
+IMAGE A35 bl31.bin     0x80000000
+IMAGE A35 u-boot.bin   CONFIG_SYS_TEXT_BASE
index 42591c77812ca300b46613ba0256e1c6b3a8fd38..ee29be4930f615bbd9ba627b8066939466b095cf 100644 (file)
@@ -6,23 +6,25 @@ CONFIG_SYS_TEXT_BASE=0x80020000
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_SPL_LOAD_IMX_CONTAINER=y
+CONFIG_IMX_CONTAINER_CFG="board/freescale/imx8qm_mek/uboot-container.cfg"
 CONFIG_TARGET_IMX8QM_MEK=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=3
 CONFIG_SPL=y
-CONFIG_FIT=y
-CONFIG_SPL_LOAD_FIT=y
-CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/imx8qm_mek/imximage.cfg"
 CONFIG_BOOTDELAY=3
 CONFIG_LOG=y
 CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_POWER_SUPPORT=y
 CONFIG_SPL_POWER_DOMAIN=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
+CONFIG_HUSH_PARSER=y
 CONFIG_CMD_CPU=y
 # CONFIG_BOOTM_NETBSD is not set
 # CONFIG_CMD_IMPORTENV is not set