diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2020-12-22 13:32:22 +0300 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2021-01-31 16:08:56 +0300 |
commit | c533f94c102127b94abda206dbe41fe026bcde76 (patch) | |
tree | 6e428d7a3dba6ba5e9da1e532952b5e76f6c35dc /doc/README.dfu | |
parent | b5f3405b9d8666bd0ab627c298cea1c927da081a (diff) | |
download | u-boot-c533f94c102127b94abda206dbe41fe026bcde76.tar.xz |
dfu: add 'SCRIPT' entity
Define a new 'SCRIPT' type for DFU entities. The downloaded data are
treated as simple u-boot's scripts and executed with run_command_list()
function.
Flashing the 'SCRIPT' entity might result in changing the 'dfu_alt_info'
environment variable from the flashed script, so add a global variable
for tracking the potential need to reinitialize the dfu_alt_info related
structures.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'doc/README.dfu')
-rw-r--r-- | doc/README.dfu | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/doc/README.dfu b/doc/README.dfu index 6cb1cba9d7..eacd5bbfb4 100644 --- a/doc/README.dfu +++ b/doc/README.dfu @@ -17,7 +17,7 @@ Overview: - The access to mediums is done in DFU backends (driver/dfu) Today the supported DFU backends are: - - MMC (RAW or FAT / EXT2 / EXT3 / EXT4 file system / SKIP) + - MMC (RAW or FAT / EXT2 / EXT3 / EXT4 file system / SKIP / SCRIPT) - NAND - RAM - SF (serial flash) @@ -92,6 +92,7 @@ Commands: <name> fat <dev> <part_id> [mmcpart <num>] file in FAT partition <name> ext4 <dev> <part_id> [mmcpart <num>] file in EXT4 partition <name> skip 0 0 ignore flashed data + <name> script 0 0 execute commands in shell with <partid> being the GPT or DOS partition index, with <num> being the eMMC hardware partition number. @@ -116,6 +117,20 @@ Commands: "u-boot-<board1>.bin raw 0x80 0x800; u-boot-<board2>.bin skip 0 0" + When flashing new system image requires do some more complex things + than just writing data to the storage medium, one can use 'script' + type. Data written to such entity will be executed as a command list + in the u-boot's shell. This for example allows to re-create partition + layout and even set new dfu_alt_info for the newly created paritions. + Such script would look like: + --->8--- + setenv dfu_alt_info ... + setenv mbr_parts ... + mbr write ... + --->8--- + Please note that this means that user will be able to execute any + arbitrary commands just like in the u-boot's shell. + "nand" (raw slc nand device) cmd: dfu 0 nand <dev> each element in "dfu_alt_info" = |