* [U-Boot] patch error
@ 2013-02-26 1:06 wanxs
2013-02-26 7:16 ` Marek Vasut
2013-02-26 11:28 ` Benoît Thébaudeau
0 siblings, 2 replies; 4+ messages in thread
From: wanxs @ 2013-02-26 1:06 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
Thanks for your patches.But when I patch them to my u-boot,I get a
error.
I get u-boot-imx from denx.
git apply
U-Boot-1-4-common-imx-Implement-generic-u-boot.nand-target.patch
error: patch failed: Makefile:470
error: Makefile: patch does not apply
error: patch failed: arch/arm/imx-common/Makefile:50
your
wanxs
^ permalink raw reply [flat|nested] 4+ messages in thread* [U-Boot] patch error
2013-02-26 1:06 [U-Boot] patch error wanxs
@ 2013-02-26 7:16 ` Marek Vasut
2013-02-26 11:28 ` Benoît Thébaudeau
1 sibling, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2013-02-26 7:16 UTC (permalink / raw)
To: u-boot
Dear wanxs,
it is usually polite to supply your full name in the email.
> Dear Marek Vasut,
> Thanks for your patches.But when I patch them to my u-boot,I get a
> error.
> I get u-boot-imx from denx.
> git apply
> U-Boot-1-4-common-imx-Implement-generic-u-boot.nand-target.patch
>
> error: patch failed: Makefile:470
> error: Makefile: patch does not apply
> error: patch failed: arch/arm/imx-common/Makefile:50
The patch depends on the OBJTREE vs. obj fixes.
> your
> wanxs
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] patch error
2013-02-26 1:06 [U-Boot] patch error wanxs
2013-02-26 7:16 ` Marek Vasut
@ 2013-02-26 11:28 ` Benoît Thébaudeau
1 sibling, 0 replies; 4+ messages in thread
From: Benoît Thébaudeau @ 2013-02-26 11:28 UTC (permalink / raw)
To: u-boot
Dear "wanxs",
On Tuesday, February 26, 2013 2:06:29 AM, "wanxs" wrote:
> Dear Marek Vasut,
> Thanks for your patches.But when I patch them to my u-boot,I get a
> error.
> I get u-boot-imx from denx.
> git apply
> U-Boot-1-4-common-imx-Implement-generic-u-boot.nand-target.patch
>
> error: patch failed: Makefile:470
> error: Makefile: patch does not apply
> error: patch failed: arch/arm/imx-common/Makefile:50
u-boot-imx/master has changed since my v7.
For v7, you should use u-boot-imx/master at commit
4adfcd68cc10449e2fda0f9fac8b09f2b5c09a02.
For my future v8, u-boot-imx/master at HEAD will be fine.
Best regards,
Beno?t
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/4] common: imx: Implement generic u-boot.nand target
@ 2013-02-25 18:19 Marek Vasut
2013-02-25 18:51 ` Benoît Thébaudeau
0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2013-02-25 18:19 UTC (permalink / raw)
To: u-boot
Implement u-boot.nand target that can be reused with a small amount of
churn across all CPU models. The idea is to delegate the u-boot.nand target
out of the main Makefile and into the CPU's Makefile (very similar to what
u-boot.imx does now). The main Makefile shall only contain path to which the
u-boot.nand target is delegated. Hopefully this will not produce too much
bloat in the main Makefile.
To demonstrate this implementation, add u-boot.nand target for i.MX53.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
---
Makefile | 18 ++++++++++++++++++
arch/arm/imx-common/Makefile | 6 ++++++
2 files changed, 24 insertions(+)
diff --git a/Makefile b/Makefile
index 41054b7..8b1010a 100644
--- a/Makefile
+++ b/Makefile
@@ -470,6 +470,23 @@ $(obj)u-boot.img: $(obj)u-boot.bin
$(obj)u-boot.imx: $(obj)u-boot.bin depend
$(MAKE) -C $(SRCTREE)/arch/arm/imx-common $(obj)u-boot.imx
+#
+# Generic u-boot.nand target.
+#
+# Every CPU that needs u-boot.nand must add a path to an implementation of
+# the actual u-boot.nand generator below.
+#
+ifdef CONFIG_MX53
+CONFIG_NAND_TRG_PATH := $(SRCTREE)/arch/arm/imx-common
+endif
+
+$(obj)u-boot.nand: $(obj)u-boot.bin depend
+ if [ "X$(CONFIG_NAND_TRG_PATH)X" = "XX" ] ; then \
+ echo "This CPU does not support u-boot.nand target!" ; \
+ exit 1 ; \
+ fi
+ $(MAKE) -C $(CONFIG_NAND_TRG_PATH) $(obj)u-boot.nand
+
$(obj)u-boot.kwb: $(obj)u-boot.bin
$(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
@@ -857,6 +874,7 @@ clobber: tidy
@rm -f $(obj)u-boot.kwb
@rm -f $(obj)u-boot.pbl
@rm -f $(obj)u-boot.imx
+ @rm -f $(obj)u-boot.nand
@rm -f $(obj)u-boot.ubl
@rm -f $(obj)u-boot.ais
@rm -f $(obj)u-boot.dtb
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
index 5d5c5b2..71ea36f 100644
--- a/arch/arm/imx-common/Makefile
+++ b/arch/arm/imx-common/Makefile
@@ -50,6 +50,12 @@ $(obj)u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX
$(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
-e $(CONFIG_SYS_TEXT_BASE) -d $< $@
+$(obj)u-boot.nand: $(obj)u-boot.imx
+ ( \
+ echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' ; \
+ dd if=/dev/zero bs=1015 count=1 2>/dev/null ) | \
+ cat - $< > $@
+
$(obj)SPL: $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp
$(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
-e $(CONFIG_SPL_TEXT_BASE) -d $< $@
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/4] common: imx: Implement generic u-boot.nand target
2013-02-25 18:19 [U-Boot] [PATCH 1/4] common: imx: Implement generic u-boot.nand target Marek Vasut
@ 2013-02-25 18:51 ` Benoît Thébaudeau
2013-02-26 1:02 ` [U-Boot] patch error wanxs
0 siblings, 1 reply; 4+ messages in thread
From: Benoît Thébaudeau @ 2013-02-25 18:51 UTC (permalink / raw)
To: u-boot
Dear Marek Vasut,
On Monday, February 25, 2013 7:19:54 PM, Marek Vasut wrote:
> Implement u-boot.nand target that can be reused with a small amount of
> churn across all CPU models. The idea is to delegate the u-boot.nand target
> out of the main Makefile and into the CPU's Makefile (very similar to what
> u-boot.imx does now). The main Makefile shall only contain path to which the
> u-boot.nand target is delegated. Hopefully this will not produce too much
> bloat in the main Makefile.
>
> To demonstrate this implementation, add u-boot.nand target for i.MX53.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
> Makefile | 18 ++++++++++++++++++
> arch/arm/imx-common/Makefile | 6 ++++++
> 2 files changed, 24 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 41054b7..8b1010a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -470,6 +470,23 @@ $(obj)u-boot.img: $(obj)u-boot.bin
> $(obj)u-boot.imx: $(obj)u-boot.bin depend
> $(MAKE) -C $(SRCTREE)/arch/arm/imx-common $(obj)u-boot.imx
>
> +#
> +# Generic u-boot.nand target.
> +#
> +# Every CPU that needs u-boot.nand must add a path to an implementation of
> +# the actual u-boot.nand generator below.
> +#
> +ifdef CONFIG_MX53
> +CONFIG_NAND_TRG_PATH := $(SRCTREE)/arch/arm/imx-common
What about calling it rather CONFIG_NAND_TGT_PATH? TRG looks more like trigger.
> +endif
> +
> +$(obj)u-boot.nand: $(obj)u-boot.bin depend
^
$(obj)u-boot.bin already depends on depend through $(obj)u-boot, so it's useless
here.
> + if [ "X$(CONFIG_NAND_TRG_PATH)X" = "XX" ] ; then \
> + echo "This CPU does not support u-boot.nand target!" ; \
> + exit 1 ; \
> + fi
> + $(MAKE) -C $(CONFIG_NAND_TRG_PATH) $(obj)u-boot.nand
^
$(OBJTREE)/
> +
> $(obj)u-boot.kwb: $(obj)u-boot.bin
> $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \
> -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
> @@ -857,6 +874,7 @@ clobber: tidy
> @rm -f $(obj)u-boot.kwb
> @rm -f $(obj)u-boot.pbl
> @rm -f $(obj)u-boot.imx
> + @rm -f $(obj)u-boot.nand
> @rm -f $(obj)u-boot.ubl
> @rm -f $(obj)u-boot.ais
> @rm -f $(obj)u-boot.dtb
> diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
> index 5d5c5b2..71ea36f 100644
> --- a/arch/arm/imx-common/Makefile
> +++ b/arch/arm/imx-common/Makefile
> @@ -50,6 +50,12 @@ $(obj)u-boot.imx: $(OBJTREE)/u-boot.bin
> $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX
> $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
> -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
>
> +$(obj)u-boot.nand: $(obj)u-boot.imx
> + ( \
> + echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' ; \
> + dd if=/dev/zero bs=1015 count=1 2>/dev/null ) | \
> + cat - $< > $@
Is that all? According to 7.5.2.2 (i.MX53 RM), the boot ROM switches to serial
mode if anything goes wrong with the NAND. Hence, for reliable NAND boot, you
have to choose either DBBT or SPL (or both, but that would be waste).
Populating the DBBT would be complicated, so I'd go for SPL. You could just use
my u-boot-with-nand-spl.imx and change the dummy header to a true FCB with the
fingerprint like you did in your header above. u-boot.nand then becomes useless.
> +
> $(obj)SPL: $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/$(patsubst
> "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp
> $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \
> -e $(CONFIG_SPL_TEXT_BASE) -d $< $@
Best regards,
Beno?t
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-26 11:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-26 1:06 [U-Boot] patch error wanxs
2013-02-26 7:16 ` Marek Vasut
2013-02-26 11:28 ` Benoît Thébaudeau
-- strict thread matches above, loose matches on Subject: below --
2013-02-25 18:19 [U-Boot] [PATCH 1/4] common: imx: Implement generic u-boot.nand target Marek Vasut
2013-02-25 18:51 ` Benoît Thébaudeau
2013-02-26 1:02 ` [U-Boot] patch error wanxs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox