aboutsummaryrefslogtreecommitdiff
path: root/include/dfu.h
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2020-12-22 11:32:22 +0100
committerMarek Vasut <marex@denx.de>2021-01-31 14:08:56 +0100
commitc533f94c102127b94abda206dbe41fe026bcde76 (patch)
tree6e428d7a3dba6ba5e9da1e532952b5e76f6c35dc /include/dfu.h
parentb5f3405b9d8666bd0ab627c298cea1c927da081a (diff)
downloadu-boot-c533f94c102127b94abda206dbe41fe026bcde76.zip
u-boot-c533f94c102127b94abda206dbe41fe026bcde76.tar.gz
u-boot-c533f94c102127b94abda206dbe41fe026bcde76.tar.bz2
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 'include/dfu.h')
-rw-r--r--include/dfu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/dfu.h b/include/dfu.h
index 0b1dae0..d18b701 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -34,6 +34,7 @@ enum dfu_layout {
DFU_FS_EXT4,
DFU_RAM_ADDR,
DFU_SKIP,
+ DFU_SCRIPT,
};
enum dfu_op {
@@ -497,6 +498,8 @@ static inline int dfu_fill_entity_virt(struct dfu_entity *dfu, char *devstr,
}
#endif
+extern bool dfu_reinit_needed;
+
#if CONFIG_IS_ENABLED(DFU_WRITE_ALT)
/**
* dfu_write_by_name() - write data to DFU medium