From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 26 Nov 2015 12:04:31 +0100 Subject: [U-Boot] [PATCH v1] arm: socfpga: Enable load zImage and Linux DTB from USB In-Reply-To: <5656A360.4000204@denx.de> References: <1448507879-3501-1-git-send-email-clsee@altera.com> <5656A360.4000204@denx.de> Message-ID: <201511261204.31344.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, November 26, 2015 at 07:14:56 AM, Stefan Roese wrote: > On 26.11.2015 04:17, Chin Liang See wrote: > > Adding new environment usbload which will load zImage and > > Linux DTB from USB mass storage through FAT file system. > > > > Signed-off-by: Chin Liang See > > Cc: Dinh Nguyen > > Cc: Dinh Nguyen > > Cc: Pavel Machek > > Cc: Marek Vasut > > Cc: Stefan Roese > > --- > > > > include/configs/socfpga_arria5_socdk.h | 5 ++++- > > include/configs/socfpga_cyclone5_socdk.h | 5 ++++- > > 2 files changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/include/configs/socfpga_arria5_socdk.h > > b/include/configs/socfpga_arria5_socdk.h index 0506336..f488b00 100644 > > --- a/include/configs/socfpga_arria5_socdk.h > > +++ b/include/configs/socfpga_arria5_socdk.h > > @@ -100,7 +100,10 @@ > > > > "sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize};\0" \ > > > > "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ > > > > " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ > > > > - "bootm ${loadaddr} - ${fdt_addr}\0" > > + "bootm ${loadaddr} - ${fdt_addr}\0" \ > > + "usbload=usb reset;" \ > > + "fatload usb 0 ${loadaddr} ${bootimage};" \ > > + "fatload usb 0 ${fdt_addr} ${fdtimage}\0" > > > > /* The rest of the configuration is shared */ > > #include > > > > diff --git a/include/configs/socfpga_cyclone5_socdk.h > > b/include/configs/socfpga_cyclone5_socdk.h index d7369ee..40a4f08 100644 > > --- a/include/configs/socfpga_cyclone5_socdk.h > > +++ b/include/configs/socfpga_cyclone5_socdk.h > > @@ -100,7 +100,10 @@ > > > > "sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize};\0" \ > > > > "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ > > > > " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ > > > > - "bootm ${loadaddr} - ${fdt_addr}\0" > > + "bootm ${loadaddr} - ${fdt_addr}\0" \ > > + "usbload=usb reset;" \ > > + "fatload usb 0 ${loadaddr} ${bootimage};" \ > > + "fatload usb 0 ${fdt_addr} ${fdtimage}\0" > > Again, please use the generic FS commands here, e.g. "load" instead > of "fatload". > > And doesn't it make sense to consolidate these common, identical > commands into a common file (socfpga_common.h)? Even better -- why not switch to distro_bootcmd and/or update it to support booting from USB (it probably already does). Best regards, Marek Vasut