[U-Boot,3/6] pico-imx6ul: Add boot and rootfs dfu_alt_info

Message ID 20171114180720.3817-3-otavio@ossystems.com.br
State Changes Requested
Delegated to: Stefano Babic
Headers show
Series
  • [U-Boot,1/6] pico-imx6ul: Move dfu_alt_info to CONFIG_DFU_ENV_SETTINGS variable
Related show

Commit Message

Otavio Salvador Nov. 14, 2017, 6:07 p.m.
From: Fabio Berton <fabio.berton@ossystems.com.br>

Change dfu_alt_info variable to use the following altsetting:

  uboot:                     To flash raw U-Boot
  /zImage: boot:             To copy kernel image
  /imx6ul-pico-hobbit.dtb:   To copy dtb file
  rootfs:                    To copy rootfs

List the currently attached DFU capable USB devices running:
  sudo dfu-util -l

Flash U-Boot:
  sudo dfu-util -D u-boot.imx -a uboot

Copy boot files:
  sudo dfu-util -D zImage -a /zImage
  sudo dfu-util -D imx6ul-pico-hobbit.dtb -a /imx6ul-pico-hobbit.dtb

Flash rootfs:
  sudo dfu-util -D rootfs.ext4 -a rootfs

To copy boot files you need to have a formated mmc 0:1 partition. To
format with ext4 filesystem you can use ums.

Run on target:
  ums 0 mmc 0

and on host:
  sudo mkfs.ext4 /dev/sdx1

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 include/configs/pico-imx6ul.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Fabio Estevam Nov. 14, 2017, 10:41 p.m. | #1
On Tue, Nov 14, 2017 at 4:07 PM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> From: Fabio Berton <fabio.berton@ossystems.com.br>
>
> Change dfu_alt_info variable to use the following altsetting:
>
>   uboot:                     To flash raw U-Boot
>   /zImage: boot:             To copy kernel image
>   /imx6ul-pico-hobbit.dtb:   To copy dtb file
>   rootfs:                    To copy rootfs
>
> List the currently attached DFU capable USB devices running:
>   sudo dfu-util -l
>
> Flash U-Boot:
>   sudo dfu-util -D u-boot.imx -a uboot
>
> Copy boot files:
>   sudo dfu-util -D zImage -a /zImage
>   sudo dfu-util -D imx6ul-pico-hobbit.dtb -a /imx6ul-pico-hobbit.dtb
>
> Flash rootfs:
>   sudo dfu-util -D rootfs.ext4 -a rootfs
>
> To copy boot files you need to have a formated mmc 0:1 partition. To
> format with ext4 filesystem you can use ums.
>
> Run on target:
>   ums 0 mmc 0
>
> and on host:
>   sudo mkfs.ext4 /dev/sdx1
>
> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

Patch

diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h
index c775c32690..6a19861da7 100644
--- a/include/configs/pico-imx6ul.h
+++ b/include/configs/pico-imx6ul.h
@@ -48,7 +48,11 @@ 
 #define DFU_DEFAULT_POLL_TIMEOUT 300
 
 #define CONFIG_DFU_ENV_SETTINGS \
-	"dfu_alt_info=boot raw 0x2 0x400 mmcpart 1\0" \
+	"dfu_alt_info=uboot raw 0x2 0x400 mmcpart 1;" \
+		"boot part 0 1;" \
+		"/zImage ext4 0 1;" \
+		"/imx6ul-pico-hobbit.dtb ext4 0 1;" \
+		"rootfs part 0 2\0" \
 
 #define CONFIG_SYS_MMC_IMG_LOAD_PART	1