Message ID | 1334223234-23383-3-git-send-email-timo@exertus.fi |
---|---|
State | Rejected |
Delegated to: | Stefano Babic |
Headers | show |
On 12/04/2012 11:33, Timo Ketola wrote: > .imx image directly from mkimage must be flashed at offset 0x400 into the nand. Thats a little hard with e.g. openocd. > > Signed-off-by: Timo Ketola <timo@exertus.fi> > --- Hi Timo, > Makefile | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/Makefile b/Makefile > index 1446131..b3f1279 100644 > --- a/Makefile > +++ b/Makefile > @@ -410,6 +410,9 @@ $(obj)u-boot.imx: $(obj)u-boot.bin > $(obj)tools/mkimage -n $(CONFIG_IMX_CONFIG) -T imximage \ > -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ > > +$(obj)u-boot-nand.imx: $(obj)u-boot.imx > + dd if=$< of=$@ seek=2 > + I wonder why we need this in u-boot code and to set this rule in the main Makefile. You can always do this after generating u-boot. The rules here are to generate the u-boot.imx. Then the same image can be stored at different addresses. Depending on the i.MX SOC, ofssets can be different (MX5 / MX6 have different offsets for NOR / NAND / oneNAND). Best regards, Stefano Babic
On 12.04.2012 14:11, Stefano Babic wrote: > On 12/04/2012 11:33, Timo Ketola wrote: >> +$(obj)u-boot-nand.imx: $(obj)u-boot.imx >> + dd if=$< of=$@ seek=2 >> + > > I wonder why we need this in u-boot code and to set this rule in the > main Makefile. You can always do this after generating u-boot. Older U-Boot (from FreeScale) made an .imx image with 1KB padding which I could flash directly into the NAND at offset 0. Now I had to do manually that dd-magic (before I put it in Makefile) because openocd doesn't allow to flash at offset 0x400 (it demands write-page alignment). > The rules here are to generate the u-boot.imx. Then the same image can > be stored at different addresses. Depending on the i.MX SOC, ofssets can > be different (MX5 / MX6 have different offsets for NOR / NAND / oneNAND). I prefer a build system which generates an image ready for flashing but perhaps I have to do that outside of U-Boot, somehow. -- Timo
diff --git a/Makefile b/Makefile index 1446131..b3f1279 100644 --- a/Makefile +++ b/Makefile @@ -410,6 +410,9 @@ $(obj)u-boot.imx: $(obj)u-boot.bin $(obj)tools/mkimage -n $(CONFIG_IMX_CONFIG) -T imximage \ -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ +$(obj)u-boot-nand.imx: $(obj)u-boot.imx + dd if=$< of=$@ seek=2 + $(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 $< $@
.imx image directly from mkimage must be flashed at offset 0x400 into the nand. Thats a little hard with e.g. openocd. Signed-off-by: Timo Ketola <timo@exertus.fi> --- Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)