Message ID | 1445334721-10839-3-git-send-email-vigneshr@ti.com |
---|---|
State | Accepted |
Delegated to: | Przemyslaw Marczak |
Headers | show |
Hi Vignesh, > This adds support to update firmware on qspi flash using DFU. > > On device: > => setenv dfu_alt_info ${dfu_alt_info_qspi} > => dfu 0 sf 0:0 > > On host: > $ sudo dfu-util -l > $ sudo dfu-util -D MLO -a MLO > $ sudo dfu-util -D u-boot.img -a u-boot.img This patch series seems ok. I just have one question regarding dfu-util: sudo dfu-util -D MLO -a MLO Is the above correct? Shouldn't it be sudo dfu-util -a 0 -D MLO where alt setting 0 corresponds to MLO? > > Signed-off-by: Vignesh R <vigneshr@ti.com> > --- > include/configs/dra7xx_evm.h | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/include/configs/dra7xx_evm.h > b/include/configs/dra7xx_evm.h index 6e32de854619..cb9544b49efb 100644 > --- a/include/configs/dra7xx_evm.h > +++ b/include/configs/dra7xx_evm.h > @@ -82,11 +82,24 @@ > "fdt ram 0x80f80000 0x80000;" \ > "ramdisk ram 0x81000000 0x4000000\0" > > +#define DFU_ALT_INFO_QSPI \ > + "dfu_alt_info_qspi=" \ > + "MLO raw 0x0 0x010000;" \ > + "MLO.backup1 raw 0x010000 0x010000;" \ > + "MLO.backup2 raw 0x020000 0x010000;" \ > + "MLO.backup3 raw 0x030000 0x010000;" \ > + "u-boot.img raw 0x040000 0x0100000;" \ > + "u-boot-spl-os raw 0x140000 0x080000;" \ > + "u-boot-env raw 0x1C0000 0x010000;" \ > + "u-boot-env.backup raw 0x1D0000 0x010000;" \ > + "kernel raw 0x1E0000 0x800000\0" > + > #define DFUARGS \ > "dfu_bufsiz=0x10000\0" \ > DFU_ALT_INFO_MMC \ > DFU_ALT_INFO_EMMC \ > - DFU_ALT_INFO_RAM > + DFU_ALT_INFO_RAM \ > + DFU_ALT_INFO_QSPI > > /* Fastboot */ > #define CONFIG_USB_FUNCTION_FASTBOOT > @@ -207,6 +220,7 @@ > > #define CONFIG_DFU_MMC > #define CONFIG_DFU_RAM > +#define CONFIG_DFU_SF > > /* SATA */ > #define CONFIG_BOARD_LATE_INIT
Hi Lukasz, On 10/20/2015 04:07 PM, Lukasz Majewski wrote: > Hi Vignesh, > >> This adds support to update firmware on qspi flash using DFU. >> >> On device: >> => setenv dfu_alt_info ${dfu_alt_info_qspi} >> => dfu 0 sf 0:0 >> >> On host: >> $ sudo dfu-util -l >> $ sudo dfu-util -D MLO -a MLO >> $ sudo dfu-util -D u-boot.img -a u-boot.img > > This patch series seems ok. I just have one question regarding dfu-util: > > sudo dfu-util -D MLO -a MLO > > Is the above correct? > > Shouldn't it be sudo dfu-util -a 0 -D MLO > where alt setting 0 corresponds to MLO? > According to man page of dfu-util 0.5 (supports DFU v1.0): "-a" can be used Specify the Altsetting of the DFU Interface by name or by number So since "MLO" is the name for alt setting 0 both sudo dfu-util -D MLO -a MLO and sudo dfu-util -a 0 -D MLO are correct. I used the above format as its easier for reading. Thanks! >> >> Signed-off-by: Vignesh R <vigneshr@ti.com> >> --- >> include/configs/dra7xx_evm.h | 16 +++++++++++++++- >> 1 file changed, 15 insertions(+), 1 deletion(-) >> >> diff --git a/include/configs/dra7xx_evm.h >> b/include/configs/dra7xx_evm.h index 6e32de854619..cb9544b49efb 100644 >> --- a/include/configs/dra7xx_evm.h >> +++ b/include/configs/dra7xx_evm.h >> @@ -82,11 +82,24 @@ >> "fdt ram 0x80f80000 0x80000;" \ >> "ramdisk ram 0x81000000 0x4000000\0" >> >> +#define DFU_ALT_INFO_QSPI \ >> + "dfu_alt_info_qspi=" \ >> + "MLO raw 0x0 0x010000;" \ >> + "MLO.backup1 raw 0x010000 0x010000;" \ >> + "MLO.backup2 raw 0x020000 0x010000;" \ >> + "MLO.backup3 raw 0x030000 0x010000;" \ >> + "u-boot.img raw 0x040000 0x0100000;" \ >> + "u-boot-spl-os raw 0x140000 0x080000;" \ >> + "u-boot-env raw 0x1C0000 0x010000;" \ >> + "u-boot-env.backup raw 0x1D0000 0x010000;" \ >> + "kernel raw 0x1E0000 0x800000\0" >> + >> #define DFUARGS \ >> "dfu_bufsiz=0x10000\0" \ >> DFU_ALT_INFO_MMC \ >> DFU_ALT_INFO_EMMC \ >> - DFU_ALT_INFO_RAM >> + DFU_ALT_INFO_RAM \ >> + DFU_ALT_INFO_QSPI >> >> /* Fastboot */ >> #define CONFIG_USB_FUNCTION_FASTBOOT >> @@ -207,6 +220,7 @@ >> >> #define CONFIG_DFU_MMC >> #define CONFIG_DFU_RAM >> +#define CONFIG_DFU_SF >> >> /* SATA */ >> #define CONFIG_BOARD_LATE_INIT > > >
Hi Vignesh, > Hi Lukasz, > > On 10/20/2015 04:07 PM, Lukasz Majewski wrote: > > Hi Vignesh, > > > >> This adds support to update firmware on qspi flash using DFU. > >> > >> On device: > >> => setenv dfu_alt_info ${dfu_alt_info_qspi} > >> => dfu 0 sf 0:0 > >> > >> On host: > >> $ sudo dfu-util -l > >> $ sudo dfu-util -D MLO -a MLO > >> $ sudo dfu-util -D u-boot.img -a u-boot.img > > > > This patch series seems ok. I just have one question regarding > > dfu-util: > > > > sudo dfu-util -D MLO -a MLO > > > > Is the above correct? > > > > Shouldn't it be sudo dfu-util -a 0 -D MLO > > where alt setting 0 corresponds to MLO? > > > > According to man page of dfu-util 0.5 (supports DFU v1.0): > "-a" can be used Specify the Altsetting of the DFU Interface by name > or by number > > So since "MLO" is the name for alt setting 0 both > sudo dfu-util -D MLO -a MLO and > sudo dfu-util -a 0 -D MLO are correct. > > I used the above format as its easier for reading. Thanks! I'm using dfu-util for few years now and I was not aware of this :-). I will test this patch set and then submit PR to Marek. Thanks for your work! > > >> > >> Signed-off-by: Vignesh R <vigneshr@ti.com> > >> --- > >> include/configs/dra7xx_evm.h | 16 +++++++++++++++- > >> 1 file changed, 15 insertions(+), 1 deletion(-) > >> > >> diff --git a/include/configs/dra7xx_evm.h > >> b/include/configs/dra7xx_evm.h index 6e32de854619..cb9544b49efb > >> 100644 --- a/include/configs/dra7xx_evm.h > >> +++ b/include/configs/dra7xx_evm.h > >> @@ -82,11 +82,24 @@ > >> "fdt ram 0x80f80000 0x80000;" \ > >> "ramdisk ram 0x81000000 0x4000000\0" > >> > >> +#define DFU_ALT_INFO_QSPI \ > >> + "dfu_alt_info_qspi=" \ > >> + "MLO raw 0x0 0x010000;" \ > >> + "MLO.backup1 raw 0x010000 0x010000;" \ > >> + "MLO.backup2 raw 0x020000 0x010000;" \ > >> + "MLO.backup3 raw 0x030000 0x010000;" \ > >> + "u-boot.img raw 0x040000 0x0100000;" \ > >> + "u-boot-spl-os raw 0x140000 0x080000;" \ > >> + "u-boot-env raw 0x1C0000 0x010000;" \ > >> + "u-boot-env.backup raw 0x1D0000 0x010000;" \ > >> + "kernel raw 0x1E0000 0x800000\0" > >> + > >> #define DFUARGS \ > >> "dfu_bufsiz=0x10000\0" \ > >> DFU_ALT_INFO_MMC \ > >> DFU_ALT_INFO_EMMC \ > >> - DFU_ALT_INFO_RAM > >> + DFU_ALT_INFO_RAM \ > >> + DFU_ALT_INFO_QSPI > >> > >> /* Fastboot */ > >> #define CONFIG_USB_FUNCTION_FASTBOOT > >> @@ -207,6 +220,7 @@ > >> > >> #define CONFIG_DFU_MMC > >> #define CONFIG_DFU_RAM > >> +#define CONFIG_DFU_SF > >> > >> /* SATA */ > >> #define CONFIG_BOARD_LATE_INIT > > > > > > >
On Tue, Oct 20, 2015 at 03:22:01PM +0530, Vignesh R wrote: > This adds support to update firmware on qspi flash using DFU. > > On device: > => setenv dfu_alt_info ${dfu_alt_info_qspi} > => dfu 0 sf 0:0 > > On host: > $ sudo dfu-util -l > $ sudo dfu-util -D MLO -a MLO > $ sudo dfu-util -D u-boot.img -a u-boot.img > > Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Lukasz, can you just pull this in along with 1/2 when you do that? Thanks!
Hi Tom, > On Tue, Oct 20, 2015 at 03:22:01PM +0530, Vignesh R wrote: > > > This adds support to update firmware on qspi flash using DFU. > > > > On device: > > => setenv dfu_alt_info ${dfu_alt_info_qspi} > > => dfu 0 sf 0:0 > > > > On host: > > $ sudo dfu-util -l > > $ sudo dfu-util -D MLO -a MLO > > $ sudo dfu-util -D u-boot.img -a u-boot.img > > > > Signed-off-by: Vignesh R <vigneshr@ti.com> > > Reviewed-by: Tom Rini <trini@konsulko.com> > Lukasz, can you just pull this in along with 1/2 when you do that? I've already pulled this to dfu tree, branch testing. I will send proper PR in a few days time. > Thanks! >
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 6e32de854619..cb9544b49efb 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -82,11 +82,24 @@ "fdt ram 0x80f80000 0x80000;" \ "ramdisk ram 0x81000000 0x4000000\0" +#define DFU_ALT_INFO_QSPI \ + "dfu_alt_info_qspi=" \ + "MLO raw 0x0 0x010000;" \ + "MLO.backup1 raw 0x010000 0x010000;" \ + "MLO.backup2 raw 0x020000 0x010000;" \ + "MLO.backup3 raw 0x030000 0x010000;" \ + "u-boot.img raw 0x040000 0x0100000;" \ + "u-boot-spl-os raw 0x140000 0x080000;" \ + "u-boot-env raw 0x1C0000 0x010000;" \ + "u-boot-env.backup raw 0x1D0000 0x010000;" \ + "kernel raw 0x1E0000 0x800000\0" + #define DFUARGS \ "dfu_bufsiz=0x10000\0" \ DFU_ALT_INFO_MMC \ DFU_ALT_INFO_EMMC \ - DFU_ALT_INFO_RAM + DFU_ALT_INFO_RAM \ + DFU_ALT_INFO_QSPI /* Fastboot */ #define CONFIG_USB_FUNCTION_FASTBOOT @@ -207,6 +220,7 @@ #define CONFIG_DFU_MMC #define CONFIG_DFU_RAM +#define CONFIG_DFU_SF /* SATA */ #define CONFIG_BOARD_LATE_INIT
This adds support to update firmware on qspi flash using DFU. On device: => setenv dfu_alt_info ${dfu_alt_info_qspi} => dfu 0 sf 0:0 On host: $ sudo dfu-util -l $ sudo dfu-util -D MLO -a MLO $ sudo dfu-util -D u-boot.img -a u-boot.img Signed-off-by: Vignesh R <vigneshr@ti.com> --- include/configs/dra7xx_evm.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)