All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1] imx: add u-boot-nand.imx target
@ 2019-07-16  9:31 Igor Opaniuk
  2019-07-16 10:50 ` Jagan Teki
  0 siblings, 1 reply; 3+ messages in thread
From: Igor Opaniuk @ 2019-07-16  9:31 UTC (permalink / raw)
  To: u-boot

From: Igor Opaniuk <igor.opaniuk@toradex.com>

Add an additional target which prepends the u-boot.imx image with
0x400 padding bytes. On Vybrid and i.MX 7, i.MX6ULL this is required
for NAND boot devices. The configuration CONFIG_IMX_NAND enables this
image for a board.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---

 Makefile                   | 3 +++
 arch/arm/config.mk         | 4 ++++
 arch/arm/mach-imx/Makefile | 7 +++++++
 3 files changed, 14 insertions(+)

diff --git a/Makefile b/Makefile
index 73fdf70cdd..287b74dd50 100644
--- a/Makefile
+++ b/Makefile
@@ -1106,6 +1106,9 @@ endif
 %.vyb: %.imx
 	$(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@
 
+u-boot-nand.imx: u-boot.imx
+	$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
+
 quiet_cmd_copy = COPY    $@
       cmd_copy = cp $< $@
 
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index f25603109e..2003161801 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -157,12 +157,16 @@ ifndef CONFIG_SPL_BUILD
 ALL-y += SPL
 endif
 else
+ifeq ($(CONFIG_IMX_NAND),y)
+ALL-y += u-boot-nand.imx
+else
 ifeq ($(CONFIG_OF_SEPARATE),y)
 ALL-y += u-boot-dtb.imx
 else
 ALL-y += u-boot.imx
 endif
 endif
+endif
 ifneq ($(CONFIG_VF610),)
 ALL-y += u-boot.vyb
 endif
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 898478fc4a..03e6fc25b3 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -112,6 +112,13 @@ u-boot.imx: MKIMAGEOUTPUT = u-boot.imx.log
 u-boot.imx: u-boot.bin u-boot.cfgout $(PLUGIN).bin FORCE
 	$(call if_changed,mkimage)
 
+ifeq ($(CONFIG_IMX_NAND),y)
+cmd_u-boot-nand_imx = (dd bs=1024 count=1 if=/dev/zero 2>/dev/null) | \
+	cat - $< > $@
+u-boot-nand.imx: u-boot.imx FORCE
+	$(call if_changed,u-boot-nand_imx)
+endif
+
 ifeq ($(CONFIG_MULTI_DTB_FIT),y)
 MKIMAGEFLAGS_u-boot-dtb.imx = -n $(filter-out $(PLUGIN).bin $< $(PHONY),$^) \
 	-T $(IMAGE_TYPE) -e $(CONFIG_SYS_TEXT_BASE)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH v1] imx: add u-boot-nand.imx target
  2019-07-16  9:31 [U-Boot] [PATCH v1] imx: add u-boot-nand.imx target Igor Opaniuk
@ 2019-07-16 10:50 ` Jagan Teki
  2019-07-23 13:14   ` Igor Opaniuk
  0 siblings, 1 reply; 3+ messages in thread
From: Jagan Teki @ 2019-07-16 10:50 UTC (permalink / raw)
  To: u-boot

On Tue, Jul 16, 2019 at 3:01 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote:
>
> From: Igor Opaniuk <igor.opaniuk@toradex.com>
>
> Add an additional target which prepends the u-boot.imx image with
> 0x400 padding bytes. On Vybrid and i.MX 7, i.MX6ULL this is required
> for NAND boot devices. The configuration CONFIG_IMX_NAND enables this
> image for a board.

How about trying like this for imx7.

https://patchwork.ozlabs.org/patch/1100412/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH v1] imx: add u-boot-nand.imx target
  2019-07-16 10:50 ` Jagan Teki
@ 2019-07-23 13:14   ` Igor Opaniuk
  0 siblings, 0 replies; 3+ messages in thread
From: Igor Opaniuk @ 2019-07-23 13:14 UTC (permalink / raw)
  To: u-boot

Hi Jagan,

On Tue, Jul 16, 2019 at 1:51 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> On Tue, Jul 16, 2019 at 3:01 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote:
> >
> > From: Igor Opaniuk <igor.opaniuk@toradex.com>
> >
> > Add an additional target which prepends the u-boot.imx image with
> > 0x400 padding bytes. On Vybrid and i.MX 7, i.MX6ULL this is required
> > for NAND boot devices. The configuration CONFIG_IMX_NAND enables this
> > image for a board.
>
> How about trying like this for imx7.
>
> https://patchwork.ozlabs.org/patch/1100412/

yeah, makes sense, we can avoid messing with make
instructions in arch/arm/config.mk and handle this in Kconfig.
Will fix and send v2 soon.

Thanks

--
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-23 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-16  9:31 [U-Boot] [PATCH v1] imx: add u-boot-nand.imx target Igor Opaniuk
2019-07-16 10:50 ` Jagan Teki
2019-07-23 13:14   ` Igor Opaniuk

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.