From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1] arm: socfpga: Enable load zImage and Linux DTB from QSPI
Date: Fri, 27 Nov 2015 09:26:50 +0800 [thread overview]
Message-ID: <1448587610.1908.6.camel@altera.com> (raw)
In-Reply-To: <5656A2DC.4020802@denx.de>
Hi Stefan,
On Thu, 2015-11-26 at 07:12 +0100, Stefan Roese wrote:
> On 26.11.2015 03:32, Chin Liang See wrote:
> > Adding new environment qspiload which will load zImage and
> > Linux DTB from serial NOR flash. The default flash offset for
> > the images as below and they are configurable during run time.
> >
> > - zImage located at 0xa0000 with assuming file size 6MB
> > - Linux DTB located at 0x50000 with assuming file size 28kB
> >
> > Please adjust the file size env var if exceeding the default
> >
> > Signed-off-by: Chin Liang See <clsee@altera.com>
> > Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> > Cc: Dinh Nguyen <dinh.linux@gmail.com>
> > Cc: Pavel Machek <pavel@denx.de>
> > Cc: Marek Vasut <marex@denx.de>
> > Cc: Stefan Roese <sr@denx.de>
> > ---
> > include/configs/socfpga_arria5_socdk.h | 10 +++++++++-
> > include/configs/socfpga_cyclone5_socdk.h | 10 +++++++++-
> > 2 files changed, 18 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/configs/socfpga_arria5_socdk.h
> > b/include/configs/socfpga_arria5_socdk.h
> > index 91ecbf7..0506336 100644
> > --- a/include/configs/socfpga_arria5_socdk.h
> > +++ b/include/configs/socfpga_arria5_socdk.h
> > @@ -77,9 +77,11 @@
> > "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
> > "bootm ${loadaddr} - ${fdt_addr}\0" \
> > "bootimage=zImage\0" \
> > + "bootimagesize=0x600000\0" \
> > "fdt_addr=100\0" \
> > "fdtimage=socfpga.dtb\0" \
> > - "fsloadcmd=ext2load\0" \
> > + "fdtimagesize=0x7000\0" \
> > + "fsloadcmd=ext2load\0" \
> > "bootm ${loadaddr} - ${fdt_addr}\0" \
> > "mmcroot=/dev/mmcblk0p2\0" \
> > "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
> > @@ -90,6 +92,12 @@
> > "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
> > "qspiroot=/dev/mtdblock0\0" \
> > "qspirootfstype=jffs2\0" \
> > + "qspiloadcs=0\0" \
> > + "qspibootimageaddr=0xa0000\0" \
> > + "qspifdtaddr=0x50000\0" \
> > + "qspiload=sf probe ${qspiloadcs};" \
> > + "sf read ${loadaddr} ${qspibootimageaddr}
> > ${bootimagesize};" \
> > + "sf read ${fdt_addr} ${qspifdtaddr}
> > ${fdtimagesize};\0" \
> > "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
> > " root=${qspiroot} rw
> > rootfstype=${qspirootfstype};"\
> > "bootm ${loadaddr} - ${fdt_addr}\0"
> > diff --git a/include/configs/socfpga_cyclone5_socdk.h
> > b/include/configs/socfpga_cyclone5_socdk.h
> > index b5cf393..d7369ee 100644
> > --- a/include/configs/socfpga_cyclone5_socdk.h
> > +++ b/include/configs/socfpga_cyclone5_socdk.h
> > @@ -77,9 +77,11 @@
> > "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
> > "bootm ${loadaddr} - ${fdt_addr}\0" \
> > "bootimage=zImage\0" \
> > + "bootimagesize=0x600000\0" \
> > "fdt_addr=100\0" \
> > "fdtimage=socfpga.dtb\0" \
> > - "fsloadcmd=ext2load\0" \
> > + "fdtimagesize=0x7000\0" \
> > + "fsloadcmd=ext2load\0" \
> > "bootm ${loadaddr} - ${fdt_addr}\0" \
> > "mmcroot=/dev/mmcblk0p2\0" \
> > "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
> > @@ -90,6 +92,12 @@
> > "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
> > "qspiroot=/dev/mtdblock0\0" \
> > "qspirootfstype=jffs2\0" \
> > + "qspiloadcs=0\0" \
> > + "qspibootimageaddr=0xa0000\0" \
> > + "qspifdtaddr=0x50000\0" \
> > + "qspiload=sf probe ${qspiloadcs};" \
> > + "sf read ${loadaddr} ${qspibootimageaddr}
> > ${bootimagesize};" \
> > + "sf read ${fdt_addr} ${qspifdtaddr}
> > ${fdtimagesize};\0" \
> > "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
> > " root=${qspiroot} rw
> > rootfstype=${qspirootfstype};"\
> > "bootm ${loadaddr} - ${fdt_addr}\0"
>
> I know that you didn't introduce this here, but wouldn't it make
> sense to switch to the generic FS commands, "load" and "ls" instead
> of using the specific ones "ext2load" etc? Especially since EXT2
> is a bit deprecated.
>
Yah, we should be using newer ext command. Let me drop another patch to
use load command. Thanks for raising this.
Thanks
Chin Liang
> Thanks,
> Stefan
>
next prev parent reply other threads:[~2015-11-27 1:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 2:32 [U-Boot] [PATCH v1] arm: socfpga: Enable load zImage and Linux DTB from QSPI Chin Liang See
2015-11-26 6:12 ` Stefan Roese
2015-11-27 1:26 ` Chin Liang See [this message]
2015-11-26 14:43 ` Pavel Machek
2015-11-27 1:24 ` Chin Liang See
2015-11-27 1:27 ` Marek Vasut
2015-11-27 1:34 ` Chin Liang See
2015-11-27 10:20 ` Marek Vasut
2015-11-27 12:07 ` Chin Liang See
2015-11-27 12:11 ` Marek Vasut
2015-11-27 12:16 ` Chin Liang See
2015-11-27 12:26 ` Marek Vasut
2015-11-27 13:08 ` Chin Liang See
2015-11-27 14:24 ` Marek Vasut
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=1448587610.1908.6.camel@altera.com \
--to=clsee@altera.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox