add i.MX8 container loading support
Subsystems (4)
v3 cover add i.MX8 container loading support
V3:
Drops patch 1/5 from V2, add 8QM support, nothing else changed. Stefano,
This patchset was pending in patchwork for more that one month, please consider to apply.
V2:
Drop cleanup Makefile since V1, that patch is not correct. Rebased on master
The V2 version:
https://patchwork.ozlabs.org/cover/1118413/
The V1 version:
https://patchwork.ozlabs.org/cover/1096334/
This patchset is to support i.MX8 container loading from SPL, i.MX8 AHAB secure boot not support FIT image, so we need to use container image.
Currently still use a fixed offset for the 2nd container(u-boot.cnt), future patches will drop this fixed offset and use dynamaic offset according to the size of 1st container for spl.
Only MMC is supported now, future patches will also support SPI/NOR/NAND following similar style as mmc part, if the mmc part is ok.
Based on the comments in https://patchwork.ozlabs.org/patch/1096336/
So I think we have agreed the approach, the only comments that not addressed from Lukasz is add doc for the container format. The detailed format could be found in RM
https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf
Chapter 5.9.4 High Level Container Format
CI: https://travis-ci.org/MrVan/u-boot/builds/547161366
Peng Fan (5):
imx8: support parsing i.MX8 Container file
spl: mmc: support loading i.MX container format file
imx: add container target
imx8qxp_mek: switch to use container image
imx8qm_mek: switch to use container image
Makefile | 8 ++ arch/arm/include/asm/arch-imx8/image.h | 56 +++++++++++ arch/arm/mach-imx/Makefile | 14 ++- arch/arm/mach-imx/imx8/Kconfig | 13 +++ arch/arm/mach-imx/imx8/Makefile | 4 + arch/arm/mach-imx/imx8/parse-container.c | 120 ++++++++++++++++++++++++ board/freescale/imx8qm_mek/README | 4 +- board/freescale/imx8qm_mek/uboot-container.cfg | 13 +++ board/freescale/imx8qxp_mek/README | 4 +- board/freescale/imx8qxp_mek/uboot-container.cfg | 13 +++ common/spl/spl_mmc.c | 10 ++ configs/imx8qm_mek_defconfig | 8 +- configs/imx8qxp_mek_defconfig | 5 +- include/spl.h | 12 +++ 14 files changed, 270 insertions(+), 14 deletions(-) create mode 100644 arch/arm/include/asm/arch-imx8/image.h create mode 100644 arch/arm/mach-imx/imx8/parse-container.c create mode 100644 board/freescale/imx8qm_mek/uboot-container.cfg create mode 100644 board/freescale/imx8qxp_mek/uboot-container.cfg
Signature · 1 line
2.16.4
PATCH v3 1/5 imx8: support parsing i.MX8 Container file
Add parsing i.MX8 Container file support, this is to let SPL could load images in a container file to destination address.
--- arch/arm/include/asm/arch-imx8/image.h | 56 +++++++++++++++ arch/arm/mach-imx/imx8/Kconfig | 6 ++ arch/arm/mach-imx/imx8/Makefile | 4 ++ arch/arm/mach-imx/imx8/parse-container.c | 120 +++++++++++++++++++++++++++++++ 4 files changed, 186 insertions(+) create mode 100644 arch/arm/include/asm/arch-imx8/image.h create mode 100644 arch/arm/mach-imx/imx8/parse-container.c
arch/arm/include/asm/arch-imx8/image.h new file +56 -0
@@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2018-2019 NXP +*/ + +#ifndef __CONTAINER_HEADER_H_ +#define __CONTAINER_HEADER_H_ + +#include <linux/sizes.h> +#include <linux/types.h> + +#define IV_MAX_LEN 32 +#define HASH_MAX_LEN 64 + +#define CONTAINER_HDR_ALIGNMENT 0x400 +#define CONTAINER_HDR_EMMC_OFFSET 0 +#define CONTAINER_HDR_MMCSD_OFFSET SZ_32K +#define CONTAINER_HDR_QSPI_OFFSET SZ_4K +#define CONTAINER_HDR_NAND_OFFSET SZ_128M + +struct container_hdr { +u8 version; +u8 length_lsb; +u8 length_msb; +u8 tag; +u32 flags; +u16 sw_version; +u8 fuse_version; +u8 num_images; +u16 sig_blk_offset; +u16 reserved; +} __packed; + +struct boot_img_t { +u32 offset; +u32 size; +u64 dst; +u64 entry; +u32 hab_flags; +u32 meta; +u8 hash[HASH_MAX_LEN ]; +u8 iv[IV_MAX_LEN ]; +} __packed; + +struct signature_block_hdr { +u8 version; +u8 length_lsb; +u8 length_msb; +u8 tag; +u16 srk_table_offset; +u16 cert_offset; +u16 blob_offset; +u16 signature_offset; +u32 reserved; +} __packed; +#endif
arch/arm/mach-imx/imx8/Kconfig +6 -0
@@ -23,6 +23,12 @@ config IMX8QXP config SYS_SOC default "imx8" +config SPL_LOAD_IMX_CONTAINER + bool "Enable SPL loading U-Boot as a i.MX Container image" + depends on SPL + help + This is to let SPL could load i.MX8 Container image + choice prompt "i.MX8 board select" optional
arch/arm/mach-imx/imx8/Makefile +4 -0
@@ -5,3 +5,7 @@ # obj-y += cpu.o iomux.o misc.o + +ifdef CONFIG_SPL_BUILD +obj-$(CONFIG_SPL_LOAD_IMX_CONTAINER) += parse-container.o +endif
arch/arm/mach-imx/imx8/parse-container.c new file +120 -0
120 lines not on this page · raw message
Signature · 1 line
2.16.4
PATCH v3 2/5 spl: mmc: support loading i.MX container format file
In reply to Peng Fani.MX8 only support AHAB secure boot with Container format image, we could not use FIT to support secure boot, so introduce container support to let SPL could load container images.
--- common/spl/spl_mmc.c | 10 ++++++++++ include/spl.h | 12 ++++++++++++ 2 files changed, 22 insertions(+)
common/spl/spl_mmc.c +10 -0
@@ -79,6 +79,16 @@ int mmc_load_image_raw_sector(struct spl_image_info *spl_image, load.bl_len = mmc->read_bl_len; load.read = h_spl_load_read; ret =spl_load_simple_fit (spl_image, &load, sector, header); + }else if (IS_ENABLED (CONFIG_SPL_LOAD_IMX_CONTAINER )) { +struct spl_load_info load; + + load.dev = mmc; + load.priv =NULL ; + load.filename =NULL ; + load.bl_len = mmc->read_bl_len; + load.read = h_spl_load_read; + + ret =spl_load_imx_container (spl_image, &load, sector); }else { ret =mmc_load_legacy (spl_image, mmc, sector, header); }
include/spl.h +12 -0
@@ -134,6 +134,18 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,#define SPL_COPY_PAYLOAD_ONLY 1#define SPL_FIT_FOUND 2 +/** +* spl_load_imx_container() - Loads a imx container image from a device. +* @spl_image: Image description to set up +* @info: Structure containing the information required to load data. +* @sector: Sector number where container image is located in the device +* +* Reads the container image @sector in the device. Loads u-boot image to +* specified load address. +*/ +int spl_load_imx_container (struct spl_image_info *spl_image, +struct spl_load_info *info,ulong sector); +/* SPL common functions */ void preloader_console_init (void );u32 spl_boot_device (void );
Signature · 1 line
2.16.4
PATCH v3 3/5 imx: add container target
In reply to Peng FanTo support SPL loading container file, add a new Makefile target, and introduce a new Kconfig file to source the cfg file which will be parsed by mkimage.
--- Makefile | 8 ++++++++ arch/arm/mach-imx/Makefile | 14 ++++++++++++-- arch/arm/mach-imx/imx8/Kconfig | 7 +++++++ 3 files changed, 27 insertions(+), 2 deletions(-)
Makefile +8 -0
@@ -1330,9 +1330,17 @@ SPL: spl/u-boot-spl.bin FORCE $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ ifeq ($(CONFIG_ARCH_IMX8M)$(CONFIG_ARCH_IMX8), y) +ifeq ($(CONFIG_SPL_LOAD_IMX_CONTAINER), y) +u-boot.cnt: u-boot.bin FORCE + $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ + +flash.bin: spl/u-boot-spl.bin u-boot.cnt FORCE + $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ +else flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ endif +endif u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
arch/arm/mach-imx/Makefile +12 -2
@@ -90,6 +90,11 @@ IMX_CONFIG = $(CONFIG_IMX_CONFIG:"%"=%) $(Q)mkdir -p $(dir $@) $(call if_changed_dep,cpp_cfg) +IMX_CONTAINER_CFG = $(CONFIG_IMX_CONTAINER_CFG:"%"=%) +container.cfg: $(IMX_CONTAINER_CFG) FORCE + $(Q)mkdir -p $(dir $@) + $(call if_changed_dep,cpp_cfg) + ifeq ($(CONFIG_ARCH_IMX8), y) CNTR_DEPFILES := $(srctree)/tools/imx_cntr_image.sh IMAGE_TYPE := imx8image
@@ -158,10 +163,15 @@ SPL: MKIMAGEFLAGS_flash.bin = -n spl/u-boot-spl.cfgout -T $(IMAGE_TYPE) -e 0x100000 flash.bin: MKIMAGEOUTPUT = flash.log -flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE -ifeq ($(SPL_DEPFILE_EXISTS),0) +MKIMAGEFLAGS_u-boot.cnt = -n container.cfg -T $(IMAGE_TYPE) -e 0x100000 +u-boot.cnt: MKIMAGEOUTPUT = u-boot.cnt.log + +ifeq ($(CONFIG_SPL_LOAD_IMX_CONTAINER), y) +u-boot.cnt: u-boot.bin container.cfg FORCE $(call if_changed,mkimage) endif +flash.bin: spl/u-boot-spl.bin FORCE + $(call if_changed,mkimage) endif else
arch/arm/mach-imx/imx8/Kconfig +7 -0
@@ -29,6 +29,13 @@ config SPL_LOAD_IMX_CONTAINER help This is to let SPL could load i.MX8 Container image +config IMX_CONTAINER_CFG + string "i.MX Container config file" + depends on SPL + help + This is to specific the cfg file for generating container + image which will be loaded by SPL. + choice prompt "i.MX8 board select" optional
Signature · 1 line
2.16.4
PATCH v3 4/5 imx8qxp_mek: switch to use container image
In reply to Peng FanBecause 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.
Note: The AHAB related code has not been added.
--- board/freescale/imx8qxp_mek/README | 4 +--- board/freescale/imx8qxp_mek/uboot-container.cfg | 13 +++++++++++++ configs/imx8qxp_mek_defconfig | 5 ++--- 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 board/freescale/imx8qxp_mek/uboot-container.cfg
board/freescale/imx8qxp_mek/README +1 -3
@@ -39,11 +39,9 @@ $ cp imx-sc-firmware-0.7/mx8qx-mek-scfw-tcm.bin . Build U-Boot ============ -$ export ATF_LOAD_ADDR=0x80000000 -$ export BL33_LOAD_ADDR=0x80020000 $ make imx8qxp_mek_defconfig $ make flash.bin -$ dd if=u-boot.itb of=flash.bin bs=512 seek=528 +$ dd if=u-boot.cnt of=flash.bin bs=512 seek=528 Flash the binary into the SD card =================================
board/freescale/imx8qxp_mek/uboot-container.cfg new file +13 -0
@@ -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 IMX8QX +CONTAINER +IMAGE A35 bl31.bin 0x80000000 +IMAGE A35 u-boot.bin CONFIG_SYS_TEXT_BASE
configs/imx8qxp_mek_defconfig +2 -3
@@ -7,15 +7,14 @@ 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/imx8qxp_mek/uboot-container.cfg" CONFIG_TARGET_IMX8QXP_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/imx8qxp_mek/imximage.cfg" CONFIG_BOOTDELAY=3 CONFIG_LOG=y
Signature · 1 line
2.16.4
PATCH v3 5/5 imx8qm_mek: switch to use container image
In reply to Peng FanBecause 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.
--- board/freescale/imx8qm_mek/README | 4 +--- board/freescale/imx8qm_mek/uboot-container.cfg | 13 +++++++++++++ configs/imx8qm_mek_defconfig | 8 +++++--- 3 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 board/freescale/imx8qm_mek/uboot-container.cfg
board/freescale/imx8qm_mek/README +1 -3
@@ -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 =================================
board/freescale/imx8qm_mek/uboot-container.cfg new file +13 -0
@@ -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
configs/imx8qm_mek_defconfig +5 -3
@@ -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_CMD_IMPORTENV is not set CONFIG_CMD_CLK=y
Signature · 1 line
2.16.4
v3 cover add i.MX8 container loading support
In reply to Peng FanQuoted 5 lines · Peng Fan
V3:
Drops patch 1/5 from V2, add 8QM support, nothing else changed. Stefano,
This patchset was pending in patchwork for more that one month, please consider to apply.
I'm not the one to judge here and I don't know the rules for U-Boot, but only because they have been pending for a long time, doesn't make the patches more suitable for upstream. Even more so, if no one has reviewed them yet.
Quoted 21 lines
V2:
Drop cleanupMakefilesince V1, that patch is not correct. Rebased on masterThe V2 version:
https://patchwork.ozlabs.org/cover/1118413/The V1 version:
https://patchwork.ozlabs.org/cover/1096334/This patchset is to support i.MX8 container loading from SPL, i.MX8 AHAB secure boot not support FIT image, so we need to use container image.
Currently still use a fixed offset for the 2nd container(u-boot.cnt), future patches will drop this fixed offset and use dynamaic offset according to the size of 1st container for spl.
Only MMC is supported now, future patches will also support SPI/NOR/NAND following similar style as mmc part, if the mmc part is ok.
Quoted 3 lines
Based on the comments in https://patchwork.ozlabs.org/patch/1096336/
So I think we have agreed the approach, the only comments that not addressed from Lukasz is add doc for the container format.
So why didn't you add some docs? I support Lukasz's request for a proper documentation in some README file. I found it already hard enough to find information about the current boot process of the i.MX8 and if you need to add even more complexity, please add docs before this gets merged.
Quoted 33 lines
The detailed format could be found in RM
https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf
Chapter 5.9.4 High Level Container FormatCI: https://travis-ci.org/MrVan/u-boot/builds/547161366
Peng Fan (5):
imx8: support parsing i.MX8 Container file
spl: mmc: support loading i.MX container format file
imx: add container target
imx8qxp_mek: switch to use container image
imx8qm_mek: switch to use container imageMakefile | 8 ++ arch/arm/include/asm/arch-imx8/image.h | 56 +++++++++++ arch/arm/mach-imx/Makefile | 14 ++- arch/arm/mach-imx/imx8/Kconfig | 13 +++ arch/arm/mach-imx/imx8/Makefile | 4 + arch/arm/mach-imx/imx8/parse-container.c | 120 ++++++++++++++++++++++++ board/freescale/imx8qm_mek/README | 4 +- board/freescale/imx8qm_mek/uboot-container.cfg | 13 +++ board/freescale/imx8qxp_mek/README | 4 +- board/freescale/imx8qxp_mek/uboot-container.cfg | 13 +++ common/spl/spl_mmc.c | 10 ++ configs/imx8qm_mek_defconfig | 8 +- configs/imx8qxp_mek_defconfig | 5 +- include/spl.h | 12 +++ 14 files changed, 270 insertions(+), 14 deletions(-)create mode 100644
arch/arm/include/asm/arch-imx8/image.hcreate mode 100644arch/arm/mach-imx/imx8/parse-container.ccreate mode 100644 board/freescale/imx8qm_mek/uboot-container.cfg create mode 100644 board/freescale/imx8qxp_mek/uboot-container.cfg
v3 cover add i.MX8 container loading support
Quoted 9 lines
Subject: Re: [U-Boot] [PATCH V3 0/5] add i.MX8 container loading support
Quoted 5 lines · Peng Fan
V3:
Drops patch 1/5 from V2, add 8QM support, nothing else changed. Stefano,
This patchset was pending in patchwork for more that one month, please consider to apply.
Quoted 3 lines
I'm not the one to judge here and I don't know the rules for U-Boot, but only because they have been pending for a long time, doesn't make the patches more suitable for upstream. Even more so, if no one has reviewed them yet.
Since it was there long time, I just thought no one has comments.
Quoted 40 lines
Quoted 8 lines
V2:
Drop cleanupMakefilesince V1, that patch is not correct. Rebased on masterThe V2 version:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch
work.ozlabs.org%2Fcover%2F1118413%2F&data=02%7C01%7Cpeng.fan %40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&sdata=xUcj AnqE2WHa2yPppBDx2Og8yv8McyWEaULsJOEzNmk%3D&reserved=0Quoted 3 lines
The V1 version:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch
work.ozlabs.org%2Fcover%2F1096334%2F&data=02%7C01%7Cpeng.fan %40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&sdata=o4 Wbxso8J5HuHlvMvnuKsNK8rDFUSEtItv0Yh0ITeQg%3D&reserved=0Quoted 9 lines
This patchset is to support i.MX8 container loading from SPL, i.MX8 AHAB secure boot not support FIT image, so we need to use container image.
Currently still use a fixed offset for the 2nd container(u-boot.cnt), future patches will drop this fixed offset and use dynamaic offset according to the size of 1st container for spl.
Only MMC is supported now, future patches will also supportSPI/NOR/NAND
Quoted 3 lines
following similar style as mmc part, if the mmc part is ok.
Based on the comments in
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch
work.ozlabs.org%2Fpatch%2F1096336%2F&data=02%7C01%7Cpeng.fan %40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&sdata=8aH Hmlu%2FZ6g6h20k%2BxIOrPfk3kG4yzwTE93aRucQ%2FCY%3D&reserve d=0
Quoted 7 lines
Quoted 2 lines
So I think we have agreed the approach, the only comments that not addressed from Lukasz is add doc for the container format.
So why didn't you add some docs? I support Lukasz's request for a proper documentation in some README file. I found it already hard enough to find information about the current boot process of the i.MX8 and if you need to add even more complexity, please add docs before this gets merged.
Not sure you are working i.MX8 and i.MX8M both. Or just i.MX8M. There is a README in the i.MX8QM/QXP board file shows the steps to build images. Or you wanna me to put the container format from Reference Manual to U-Boot?
Regards,
Peng.
Quoted 48 lines
Quoted 3 lines
The detailed format could be found in RM
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
nxp.com%2Fdocs%2Fen%2Freference-manual%2FIMX8DQXPRM.pdf&da ta=02%7C01%7Cpeng.fan%40nxp.com%7C87ccfec5031249de3fde08d70e77f a9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C636993780782 660409&sdata=PMOVoEX30qwR3XDPBThWFWTU7qqFaaC6SyykGweIi2 E%3D&reserved=0Quoted 3 lines
Chapter 5.9.4 High Level Container Format
CI:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-
ci.org%2FMrVan%2Fu-boot%2Fbuilds%2F547161366&data=02%7C01%7 Cpeng.fan%40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1 d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&s data=oPp3%2FyB2kpHj4sxi5n1xWPnf21foJ%2FroU21UXskqijM%3D&res erved=0Quoted 10 lines
Peng Fan (5):
imx8: support parsing i.MX8 Container file
spl: mmc: support loading i.MX container format file
imx: add container target
imx8qxp_mek: switch to use container image
imx8qm_mek: switch to use container imageMakefile | 8 ++ arch/arm/include/asm/arch-imx8/image.h | 56+++++++++++
Quoted 4 lines
arch/arm/mach-imx/Makefile | 14 ++- arch/arm/mach-imx/imx8/Kconfig | 13 +++ arch/arm/mach-imx/imx8/Makefile | 4 + arch/arm/mach-imx/imx8/parse-container.c | 120++++++++++++++++++++++++
Quoted 14 lines
board/freescale/imx8qm_mek/README | 4 +- board/freescale/imx8qm_mek/uboot-container.cfg | 13 +++ board/freescale/imx8qxp_mek/README | 4 +- board/freescale/imx8qxp_mek/uboot-container.cfg | 13 +++ common/spl/spl_mmc.c | 10 ++ configs/imx8qm_mek_defconfig | 8 +- configs/imx8qxp_mek_defconfig | 5 +- include/spl.h | 12 +++ 14 files changed, 270 insertions(+), 14 deletions(-)create mode 100644
arch/arm/include/asm/arch-imx8/image.hcreate mode 100644arch/arm/mach-imx/imx8/parse-container.ccreate mode 100644 board/freescale/imx8qm_mek/uboot-container.cfg create mode 100644 board/freescale/imx8qxp_mek/uboot-container.cfg
v3 cover add i.MX8 container loading support
Quoted 63 lines · Peng Fan
Quoted 9 lines
Subject: Re: [U-Boot] [PATCH V3 0/5] add i.MX8 container loading support
Quoted 5 lines · Peng Fan
V3:
Drops patch 1/5 from V2, add 8QM support, nothing else changed. Stefano,
This patchset was pending in patchwork for more that one month, please consider to apply.Quoted 3 lines
I'm not the one to judge here and I don't know the rules for U-Boot, but only because they have been pending for a long time, doesn't make the patches more suitable for upstream. Even more so, if no one has reviewed them yet.
Since it was there long time, I just thought no one has comments.
Quoted 40 lines
Quoted 8 lines
V2:
Drop cleanupMakefilesince V1, that patch is not correct. Rebased on masterThe V2 version:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch
work.ozlabs.org%2Fcover%2F1118413%2F&data=02%7C01%7Cpeng.fan %40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&sdata=xUcj AnqE2WHa2yPppBDx2Og8yv8McyWEaULsJOEzNmk%3D&reserved=0Quoted 3 lines
The V1 version:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch
work.ozlabs.org%2Fcover%2F1096334%2F&data=02%7C01%7Cpeng.fan %40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&sdata=o4 Wbxso8J5HuHlvMvnuKsNK8rDFUSEtItv0Yh0ITeQg%3D&reserved=0Quoted 9 lines
This patchset is to support i.MX8 container loading from SPL, i.MX8 AHAB secure boot not support FIT image, so we need to use container image.
Currently still use a fixed offset for the 2nd container(u-boot.cnt), future patches will drop this fixed offset and use dynamaic offset according to the size of 1st container for spl.
Only MMC is supported now, future patches will also supportSPI/NOR/NAND
Quoted 3 lines
following similar style as mmc part, if the mmc part is ok.
Based on the comments in
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch
work.ozlabs.org%2Fpatch%2F1096336%2F&data=02%7C01%7Cpeng.fan %40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&sdata=8aH Hmlu%2FZ6g6h20k%2BxIOrPfk3kG4yzwTE93aRucQ%2FCY%3D&reserve d=0Quoted 7 lines
Quoted 2 lines
So I think we have agreed the approach, the only comments that not addressed from Lukasz is add doc for the container format.
So why didn't you add some docs? I support Lukasz's request for a proper documentation in some README file. I found it already hard enough to find information about the current boot process of the i.MX8 and if you need to add even more complexity, please add docs before this gets merged.
Quoted 4 lines
Not sure you are working i.MX8 and i.MX8M both. Or just i.MX8M. There is a README in the i.MX8QM/QXP board file shows the steps to build images. Or you wanna me to put the container format from Reference Manual to U-Boot?
For now I'm only working on i.MX8M. But if I ever would need to work on i.MX8, I would be glad to have a proper documentation of how the container format is used in U-Boot and what happens while booting. What happens in the different stages, which image is copied to what address and things like that.
Thanks,
Frieder
Quoted 51 lines
Regards,
Peng.Quoted 48 lines
Quoted 3 lines
The detailed format could be found in RM
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
nxp.com%2Fdocs%2Fen%2Freference-manual%2FIMX8DQXPRM.pdf&da ta=02%7C01%7Cpeng.fan%40nxp.com%7C87ccfec5031249de3fde08d70e77f a9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C636993780782 660409&sdata=PMOVoEX30qwR3XDPBThWFWTU7qqFaaC6SyykGweIi2 E%3D&reserved=0Quoted 3 lines
Chapter 5.9.4 High Level Container Format
CI:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-
ci.org%2FMrVan%2Fu-boot%2Fbuilds%2F547161366&data=02%7C01%7 Cpeng.fan%40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1 d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&s data=oPp3%2FyB2kpHj4sxi5n1xWPnf21foJ%2FroU21UXskqijM%3D&res erved=0Quoted 10 lines
Peng Fan (5):
imx8: support parsing i.MX8 Container file
spl: mmc: support loading i.MX container format file
imx: add container target
imx8qxp_mek: switch to use container image
imx8qm_mek: switch to use container imageMakefile | 8 ++ arch/arm/include/asm/arch-imx8/image.h | 56+++++++++++
Quoted 4 lines
arch/arm/mach-imx/Makefile | 14 ++- arch/arm/mach-imx/imx8/Kconfig | 13 +++ arch/arm/mach-imx/imx8/Makefile | 4 + arch/arm/mach-imx/imx8/parse-container.c | 120++++++++++++++++++++++++
Quoted 14 lines
board/freescale/imx8qm_mek/README | 4 +- board/freescale/imx8qm_mek/uboot-container.cfg | 13 +++ board/freescale/imx8qxp_mek/README | 4 +- board/freescale/imx8qxp_mek/uboot-container.cfg | 13 +++ common/spl/spl_mmc.c | 10 ++ configs/imx8qm_mek_defconfig | 8 +- configs/imx8qxp_mek_defconfig | 5 +- include/spl.h | 12 +++ 14 files changed, 270 insertions(+), 14 deletions(-)create mode 100644
arch/arm/include/asm/arch-imx8/image.hcreate mode 100644arch/arm/mach-imx/imx8/parse-container.ccreate mode 100644 board/freescale/imx8qm_mek/uboot-container.cfg create mode 100644 board/freescale/imx8qxp_mek/uboot-container.cfg
v3 cover add i.MX8 container loading support
Quoted 83 lines
Subject: Re: [U-Boot] [PATCH V3 0/5] add i.MX8 container loading support
Quoted 10 lines · Peng Fan
Quoted 10 lines
Subject: Re: [U-Boot] [PATCH V3 0/5] add i.MX8 container loading support
Quoted 5 lines · Peng Fan
V3:
Drops patch 1/5 from V2, add 8QM support, nothing else changed. Stefano,
This patchset was pending in patchwork for more that one month, please consider to apply.Quoted 3 lines
Quoted 3 lines
I'm not the one to judge here and I don't know the rules for U-Boot, but only because they have been pending for a long time, doesn't make the patches more suitable for upstream. Even more so, if no one has
reviewed them yet.
Quoted 13 lines
Since it was there long time, I just thought no one has comments.
Quoted 10 lines
Quoted 8 lines
V2:
Drop cleanupMakefilesince V1, that patch is not correct. Rebased on masterThe V2 version:
work.ozlabs.org%2Fcover%2F1118413%2F&data=02%7C01%7Cpeng.fan
Quoted 1 line
Quoted 1 line
%40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1d3bc2b
4c
Quoted 1 line
Quoted 1 line
6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&sdata=xUcj
Quoted 1 line
Quoted 1 line
AnqE2WHa2yPppBDx2Og8yv8McyWEaULsJOEzNmk%3D&reserved=0
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
The V1 version:
work.ozlabs.org%2Fcover%2F1096334%2F&data=02%7C01%7Cpeng.fan
Quoted 1 line
Quoted 1 line
%40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1d3bc2b
4c
Quoted 1 line
Quoted 1 line
6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&sdata=o4
Quoted 10 lines
Quoted 10 lines
Wbxso8J5HuHlvMvnuKsNK8rDFUSEtItv0Yh0ITeQg%3D&reserved=0
Quoted 9 lines
This patchset is to support i.MX8 container loading from SPL, i.MX8 AHAB secure boot not support FIT image, so we need to use container image.
Currently still use a fixed offset for the 2nd container(u-boot.cnt), future patches will drop this fixed offset and use dynamaic offset according to the size of 1st container for spl. Only MMC is supported now, future patches will also support
Quoted 6 lines
Quoted 6 lines
SPI/NOR/NAND
Quoted 3 lines
following similar style as mmc part, if the mmc part is ok.
Based on the comments in
work.ozlabs.org%2Fpatch%2F1096336%2F&data=02%7C01%7Cpeng.fan
Quoted 1 line
Quoted 1 line
%40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1d3bc2b
4c
Quoted 1 line
Quoted 1 line
6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&sdata=8aH
Quoted 1 line
Quoted 1 line
Hmlu%2FZ6g6h20k%2BxIOrPfk3kG4yzwTE93aRucQ%2FCY%3D&reserve
Quoted 8 lines
Quoted 8 lines
d=0
Quoted 2 lines
So I think we have agreed the approach, the only comments that not addressed from Lukasz is add doc for the container format.
So why didn't you add some docs? I support Lukasz's request for a proper documentation in some README file. I found it already hard enough to find information about the current boot process of the i.MX8 and if you need to add even more complexity, please add docs
before this gets merged.
Quoted 3 lines
Not sure you are working i.MX8 and i.MX8M both. Or just i.MX8M. There is a README in the i.MX8QM/QXP board file shows the steps to build
images.
Quoted 8 lines
Quoted 2 lines
Or you wanna me to put the container format from Reference Manual to U-Boot?
For now I'm only working on i.MX8M. But if I ever would need to work on i.MX8, I would be glad to have a proper documentation of how the container format is used in U-Boot and what happens while booting. What happens in the different stages, which image is copied to what address and things like that.
ok, a file like README.imximage should be ok. V4 will include README.imx8image.
Regards,
Peng.
Quoted 65 lines
Thanks,
FriederQuoted 8 lines
Regards,
Peng.Quoted 5 lines
Quoted 3 lines
The detailed format could be found in RM
nxp.com%2Fdocs%2Fen%2Freference-manual%2FIMX8DQXPRM.pdf&da
Quoted 1 line
Quoted 1 line
ta=02%7C01%7Cpeng.fan%40nxp.com%7C87ccfec5031249de3fde08d70e77f
Quoted 1 line
Quoted 1 line
a9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C636993780782
Quoted 1 line
Quoted 1 line
660409&sdata=PMOVoEX30qwR3XDPBThWFWTU7qqFaaC6SyykGweIi2
Quoted 6 lines
Quoted 6 lines
E%3D&reserved=0
Quoted 3 lines
Chapter 5.9.4 High Level Container Format
CI:
ci.org%2FMrVan%2Fu-boot%2Fbuilds%2F547161366&data=02%7C01%7
Quoted 1 line
Quoted 1 line
Cpeng.fan%40nxp.com%7C87ccfec5031249de3fde08d70e77fa9a%7C686ea1
Quoted 1 line
Quoted 1 line
d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C636993780782660409&s
Quoted 1 line
Quoted 1 line
data=oPp3%2FyB2kpHj4sxi5n1xWPnf21foJ%2FroU21UXskqijM%3D&res
Quoted 17 lines
Quoted 17 lines
erved=0
Quoted 10 lines
Peng Fan (5):
imx8: support parsing i.MX8 Container file
spl: mmc: support loading i.MX container format file
imx: add container target
imx8qxp_mek: switch to use container image
imx8qm_mek: switch to use container imageMakefile | 8 ++ arch/arm/include/asm/arch-imx8/image.h | 56+++++++++++
Quoted 4 lines
arch/arm/mach-imx/Makefile | 14 ++- arch/arm/mach-imx/imx8/Kconfig | 13 +++ arch/arm/mach-imx/imx8/Makefile | 4 + arch/arm/mach-imx/imx8/parse-container.c | 120++++++++++++++++++++++++
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
board/freescale/imx8qm_mek/README | 4 +- board/freescale/imx8qm_mek/uboot-container.cfg | 13 +++ board/freescale/imx8qxp_mek/README | 4 +- board/freescale/imx8qxp_mek/uboot-container.cfg | 13 +++Quoted 8 lines
Quoted 8 lines
common/spl/spl_mmc.c | 10 ++ configs/imx8qm_mek_defconfig | 8 +- configs/imx8qxp_mek_defconfig | 5 +- include/spl.h | 12 +++ 14 files changed, 270 insertions(+), 14 deletions(-)create mode 100644
arch/arm/include/asm/arch-imx8/image.hcreate mode 100644arch/arm/mach-imx/imx8/parse-container.ccreate mode 100644board/freescale/imx8qm_mek/uboot-container.cfg
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
create mode 100644board/freescale/imx8qxp_mek/uboot-container.cfg
v3 cover add i.MX8 container loading support
In reply to Peng FanDear Peng Fan,
Quoted 9 lines · In message <AM0PR04MB4481B10F3B36DD27D33C7FA788C40@AM0PR04MB4481.eurprd04.prod.…
Quoted 9 lines
Subject: Re: [U-Boot] [PATCH V3 0/5] add i.MX8 container loading support
Quoted 5 lines · Peng Fan
V3:
Drops patch 1/5 from V2, add 8QM support, nothing else changed. Stefano,
This patchset was pending in patchwork for more that one month, please consider to apply.
Quoted 5 lines
Quoted 3 lines
I'm not the one to judge here and I don't know the rules for U-Boot, but only because they have been pending for a long time, doesn't make the patches more suitable for upstream. Even more so, if no one has reviewed them yet.
Since it was there long time, I just thought no one has comments.
If you don't get _any_ feedback for a long time this usually means the stuff is too difficult to digest by most of the readers (aka TLDR symtom). Adding better documentation (README, commit messaes, etc.) may help...
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The only way to get rid of a temptation is to yield to it.
- Oscar Wilde