arm: socfpga: Enable load zImage and Linux DTB from USB
PATCH 1/1 arm: socfpga: Enable load zImage and Linux DTB from USB
Adding new environment usbload which will load zImage and Linux DTB from USB mass storage through FAT file system.
--- include/configs/socfpga_arria5_socdk.h | 5 ++++- include/configs/socfpga_cyclone5_socdk.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)
include/configs/socfpga_arria5_socdk.h +4 -1
@@ -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 <configs/socfpga_common.h>
include/configs/socfpga_cyclone5_socdk.h +4 -1
@@ -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 <configs/socfpga_common.h>
Signature · 1 line
2.2.0
PATCH 1/1 arm: socfpga: Enable load zImage and Linux DTB from USB
Quoted 35 lines · Chin Liang See
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 <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Pavel Machek <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>--- include/configs/socfpga_arria5_socdk.h | 5 ++++- include/configs/socfpga_cyclone5_socdk.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)include/configs/socfpga_arria5_socdk.h +4
-1@@ -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 <configs/socfpga_common.h> include/configs/socfpga_cyclone5_socdk.h +0
-0
include/configs/socfpga_cyclone5_socdk.h line 106
Quoted 8 lines
include/configs/socfpga_cyclone5_socdk.h +4
-1@@ -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)?
Thanks,
Stefan
PATCH 1/1 arm: socfpga: Enable load zImage and Linux DTB from USB
Quoted 58 lines · Stefan Roese
Quoted 43 lines · Chin Liang See
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 <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Pavel Machek <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>---
include/configs/socfpga_arria5_socdk.h | 5 ++++- include/configs/socfpga_cyclone5_socdk.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/include/configs/socfpga_arria5_socdk.hindex 0506336..f488b00 100644include/configs/socfpga_arria5_socdk.h +4
-1@@ -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 <configs/socfpga_common.h> (quoted diff) +0
-0
b/include/configs/socfpga_cyclone5_socdk.hindex d7369ee..40a4f08 100644include/configs/socfpga_cyclone5_socdk.h +0
-0@@ -100,7 +100,10 @@"sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize};\0" \include/configs/socfpga_cyclone5_socdk.h
Quoted 10 lines
include/configs/socfpga_cyclone5_socdk.h +4
-1"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".
Quoted 2 lines
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
PATCH 1/1 arm: socfpga: Enable load zImage and Linux DTB from USB
Hi Marek,
Quoted 65 lines · Marek Vasut
Quoted 64 lines · Stefan Roese
Quoted 54 lines · Chin Liang See
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 <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Pavel Machek <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>---
include/configs/socfpga_arria5_socdk.h | 5 ++++- include/configs/socfpga_cyclone5_socdk.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/include/configs/socfpga_arria5_socdk.hindex 0506336..f488b00 100644include/configs/socfpga_arria5_socdk.h +0
-0@@ -100,7 +100,10 @@"sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize};\0" \"qspiboot=setenv bootargs " CONFIG_BOOTARGS \ " root=${qspiroot} rwrootfstype=${qspirootfstype};"\
include/configs/socfpga_arria5_socdk.h +4
-1-"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 <configs/socfpga_common.h> (quoted diff) +0
-0
b/include/configs/socfpga_cyclone5_socdk.hindex d7369ee..40a4f08 100644include/configs/socfpga_cyclone5_socdk.h +0
-0@@ -100,7 +100,10 @@"sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize};\0" \"qspiboot=setenv bootargs " CONFIG_BOOTARGS \ " root=${qspiroot} rwrootfstype=${qspirootfstype};"\
include/configs/socfpga_cyclone5_socdk.h
Quoted 5 lines
include/configs/socfpga_cyclone5_socdk.h +4
-1-"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".
Quoted 6 lines
Quoted 2 lines
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_bootcmdand/or update it to support
booting from USB (it probably already does).
Thanks for sharing this. I presume we need a script to store the boot command? Let me read more on this.
Thanks
Chin Liang
Quoted 3 lines
Best regards,
Marek Vasut
PATCH 1/1 arm: socfpga: Enable load zImage and Linux DTB from USB
Quoted 75 lines · Chin Liang See
Hi Marek,
Quoted 72 lines · Marek Vasut
Quoted 70 lines · Stefan Roese
Quoted 58 lines · Chin Liang See
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 <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Pavel Machek <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>---
include/configs/socfpga_arria5_socdk.h | 5 ++++- include/configs/socfpga_cyclone5_socdk.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/include/configs/socfpga_arria5_socdk.hindex 0506336..f488b00 100644include/configs/socfpga_arria5_socdk.h +0
-0@@ -100,7 +100,10 @@"sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize};\0" \"qspiboot=setenv bootargs " CONFIG_BOOTARGS \ " root=${qspiroot} rwrootfstype=${qspirootfstype};"\
include/configs/socfpga_arria5_socdk.h +4
-1-"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 <configs/socfpga_common.h> (quoted diff) +0
-0
b/include/configs/socfpga_cyclone5_socdk.hindex d7369ee..40a4f08 100644include/configs/socfpga_cyclone5_socdk.h +0
-0@@ -100,7 +100,10 @@"sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize};\0" \"qspiboot=setenv bootargs " CONFIG_BOOTARGS \ " root=${qspiroot} rwrootfstype=${qspirootfstype};"\
include/configs/socfpga_cyclone5_socdk.h
Quoted 5 lines
include/configs/socfpga_cyclone5_socdk.h +4
-1-"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)?
Quoted 6 lines
Quoted 3 lines
Even better -- why not switch to
distro_bootcmdand/or update it to support
booting from USB (it probably already does).Thanks for sharing this. I presume we need a script to store the boot command? Let me read more on this.
Yeah, it'd be much better than this ad-hoc stuff.
Best regards,
Marek Vasut
PATCH 1/1 arm: socfpga: Enable load zImage and Linux DTB from USB
In reply to Stefan RoeseHi Stefan,
Quoted 45 lines · Stefan Roese
Quoted 44 lines · Chin Liang See
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 <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Pavel Machek <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>--- include/configs/socfpga_arria5_socdk.h | 5 ++++- include/configs/socfpga_cyclone5_socdk.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)include/configs/socfpga_arria5_socdk.h +4
-1@@ -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 <configs/socfpga_common.h>include/configs/socfpga_cyclone5_socdk.h +0
-0@@ -100,7 +100,10 @@"sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize};\0" \"qspiboot=setenv bootargs " CONFIG_BOOTARGS \" root=${qspiroot} rw rootfstype=${qspirootfstype};"\
Quoted 8 lines
include/configs/socfpga_cyclone5_socdk.h line 108
Quoted 5 lines
include/configs/socfpga_cyclone5_socdk.h +4
-1-"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".
Oops, forget about the load. Let me fix this.
Quoted 3 lines
And doesn't it make sense to consolidate these common, identical commands into a common file (
socfpga_common.h)?
Hmmm, currently there are all in board specific configuration as board to board might have different configuration (e.g. some board might not have USB).
Thanks
Chin Liang
Quoted 4 lines
Thanks,
Stefan