u-boot/arch/arm/mach-stm32mp
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 stm32mp: stm32prog: support for script 2020-05-14 09:02:12 +02:00
include/mach stm32mp: stm32prog: adapt the MTD partitions 2020-05-14 09:02:12 +02:00
boot_params.c board: stm32mp1: use FDT address provided by TF-A at boot time 2020-05-14 09:02:12 +02:00
bsec.c configs: stm32mp1: replace STM32MP1_TRUSTED by TFABOOT 2020-04-15 09:08:37 +02:00
cmd_stm32key.c stm32mp1: key: add stm32key command 2019-07-12 11:18:53 +02:00
config.mk stm32mp1: add trusted boot with TF-A 2019-04-12 16:09:13 +02:00
cpu.c stm32mp: add function get_cpu_dev 2020-05-14 09:02:12 +02:00
dram_init.c board: stm32mp1: reserve memory for OP-TEE in device tree 2020-05-14 09:02:12 +02:00
fdt.c stm32mp1: dynamically detect op-tee presence 2020-05-14 09:02:12 +02:00
Kconfig stm32mp: stm32prog: add MTD devices support 2020-05-14 09:02:12 +02:00
Makefile stm32mp: add the command stm32prog 2020-05-14 09:02:12 +02:00
psci.c stm32mp: psci: set cntfrq register of cpu on 2020-03-24 14:17:38 +01:00
pwr_regulator.c stm32mp1: pwr: use the last binding for pwr 2020-02-13 17:26:22 +01:00
spl.c board: stm32mp1: support boot from spi-nand 2020-05-14 09:02:12 +02:00
syscon.c stm32mp1: pwr: use the last binding for pwr 2020-02-13 17:26:22 +01:00