From c533f94c102127b94abda206dbe41fe026bcde76 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Tue, 22 Dec 2020 11:32:22 +0100 Subject: 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 --- include/dfu.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/dfu.h b/include/dfu.h index 0b1dae0b3ba..d18b7017282 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 -- cgit v1.2.3