All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/6] imx: add container target
Date: Tue, 7 May 2019 12:52:46 +0000	[thread overview]
Message-ID: <20190507130554.4598-6-peng.fan@nxp.com> (raw)
In-Reply-To: <20190507130554.4598-1-peng.fan@nxp.com>

To 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.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 Makefile                       |  8 ++++++++
 arch/arm/mach-imx/Makefile     | 14 ++++++++++++++
 arch/arm/mach-imx/imx8/Kconfig |  7 +++++++
 3 files changed, 29 insertions(+)

diff --git a/Makefile b/Makefile
index d6a6ef19ab..2912cebaf6 100644
--- a/Makefile
+++ b/Makefile
@@ -1300,9 +1300,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 $@
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 0562640599..494eee8e5a 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -104,6 +104,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)
+
 DEPFILE_EXISTS := 0
 ifeq ($(CONFIG_ARCH_IMX8), y)
 CNTR_DEPFILES := $(srctree)/tools/imx_cntr_image.sh
@@ -161,7 +166,16 @@ SPL: spl/u-boot-spl.bin spl/u-boot-spl.cfgout FORCE
 MKIMAGEFLAGS_flash.bin = -n spl/u-boot-spl.cfgout -T $(IMAGE_TYPE) -e 0x100000
 flash.bin: MKIMAGEOUTPUT = flash.log
 
+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)
+flash.bin: spl/u-boot-spl.bin u-boot.cnt FORCE
+else
 flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE
+endif
 	$(eval SPL_DEPFILE_EXISTS := $(shell $(CPP) $(cpp_flags) -x c -o spl/u-boot-spl.cfgout $(srctree)/$(IMX_CONFIG); if [ -f spl/u-boot-spl.cfgout ]; then $(CNTR_DEPFILES) spl/u-boot-spl.cfgout; echo $$?; fi))
 ifeq ($(SPL_DEPFILE_EXISTS),0)
 	$(call if_changed,mkimage)
diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig
index 8e6b79eb77..8128ec16b4 100644
--- a/arch/arm/mach-imx/imx8/Kconfig
+++ b/arch/arm/mach-imx/imx8/Kconfig
@@ -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
-- 
2.16.4

  parent reply	other threads:[~2019-05-07 12:52 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07 12:52 [U-Boot] [PATCH 0/6] imx8: support container Peng Fan
2019-05-07 12:52 ` [U-Boot] [PATCH 1/6] imx: mach-imx: clean up Makefile Peng Fan
2019-05-07 12:52 ` [U-Boot] [PATCH 2/6] spl: Add function to get u-boot raw sector Peng Fan
2019-05-07 12:52 ` [U-Boot] [PATCH 3/6] imx8: support parsing i.MX8 Container file Peng Fan
2019-05-07 12:52 ` [U-Boot] [PATCH 4/6] spl: mmc: support loading i.MX container format file Peng Fan
2019-05-18 16:09   ` Simon Glass
2019-05-20  1:30     ` Peng Fan
2019-05-20  1:45       ` Marek Vasut
2019-05-20  1:54         ` Peng Fan
2019-05-20 10:36           ` Marek Vasut
2019-05-21  2:31             ` Peng Fan
2019-05-21  2:49               ` Marek Vasut
2019-05-21  2:55                 ` Peng Fan
2019-05-21  3:03                   ` Marek Vasut
2019-05-21  3:19                     ` Peng Fan
2019-05-21  8:32                       ` Lukasz Majewski
2019-05-21 12:41                         ` Marek Vasut
2019-05-21 13:13                           ` Lukasz Majewski
2019-05-22  4:18                         ` Peng Fan
2019-05-22  6:02                           ` Lukasz Majewski
2019-05-22  6:15                             ` Peng Fan
2019-05-22  6:46                               ` Lukasz Majewski
2019-05-22  7:22                                 ` Peng Fan
2019-05-22  7:34                                   ` Lukasz Majewski
2019-05-22 11:41                                     ` Marek Vasut
2019-05-24  1:59                                       ` [U-Boot] [EXT] " Ye Li
2019-05-27  9:49                                         ` Peng Fan
2019-05-27 11:31                                           ` Marek Vasut
2019-05-30  7:06                                             ` Ye Li
2019-05-30  8:19                                               ` Marek Vasut
2019-06-04  3:27                                                 ` Peng Fan
2019-06-04 11:24                                                   ` Marek Vasut
2019-06-05  1:18                                                     ` Peng Fan
2019-06-05  1:30                                                       ` Marek Vasut
2019-06-05  1:59                                                         ` Peng Fan
2019-06-05  2:38                                                           ` Marek Vasut
2019-06-05  3:03                                                             ` Peng Fan
2019-06-05 13:24                                                               ` Marek Vasut
2019-06-05 13:52                                                                 ` Tom Rini
2019-06-05 13:55                                                                   ` Marek Vasut
2019-06-06  2:33                                                                   ` Peng Fan
2019-06-06  7:02                                                                     ` Lukasz Majewski
2019-06-06  7:23                                                                       ` Peng Fan
2019-06-06  7:12                                                                     ` Marek Vasut
2019-06-06  7:54                                                                       ` Peng Fan
2019-06-06  8:05                                                                         ` Marek Vasut
2019-05-22  2:56       ` [U-Boot] " Peng Fan
2019-05-07 12:52 ` Peng Fan [this message]
2019-05-07 12:52 ` [U-Boot] [PATCH 6/6] imx8qxp_mek: switch to use container image Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190507130554.4598-6-peng.fan@nxp.com \
    --to=peng.fan@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.