u-boot-brain/arch/arm/mach-stm32mp/cmd_stm32prog
Patrick Delaunay d0686c69ff stm32mp: stm32prog: support for script
Support an U-Boot script included in uimage instead of flashlayout file
(text file in tsv format).

This feature is used to execute this script directly when U-Boot is
loaded in DDR (for update without STM32CubeProgrammer for example).

A simple example with dfu-util only is:

$> echo "dfu 0" > script.cmd
$> mkimage -C none -A arm -T script -d script.cmd script.uimg
$> mkimage -T stm32image -a 0xC0000000 -e 0xC0000000 -d script.uimg \
  script.stm32

$> dfu-util -d 0483:df11 -a 1 -D tf-a.stm32
$> dfu-util -d 0483:df11 -a 0 -D script.stm32
$> dfu-util -d 0483:df11 -a 0 -D u-boot.stm32
$> dfu-util -d 0483:df11 -a 0 -e

Then you can used dfu-utils to update your device

To increase speed, you can also switch to fastboot protocol with:
  echo "fastboot 0" > script.cmd

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14 09:02:12 +02:00
..
cmd_stm32prog.c stm32mp: stm32prog: support for script 2020-05-14 09:02:12 +02:00
Makefile stm32mp: stm32prog: add serial link support 2020-05-14 09:02:12 +02:00
stm32prog_serial.c stm32mp: stm32prog: add serial link support 2020-05-14 09:02:12 +02:00
stm32prog_usb.c stm32mp: stm32prog: add serial link support 2020-05-14 09:02:12 +02:00
stm32prog.c stm32mp: stm32prog: add serial link support 2020-05-14 09:02:12 +02:00
stm32prog.h stm32mp: stm32prog: add serial link support 2020-05-14 09:02:12 +02:00