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>
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 @@
DFU_FS_EXT4,
DFU_RAM_ADDR,
DFU_SKIP,
+ DFU_SCRIPT,
};
enum dfu_op {
@@ -497,6 +498,8 @@
}
#endif
+extern bool dfu_reinit_needed;
+
#if CONFIG_IS_ENABLED(DFU_WRITE_ALT)
/**
* dfu_write_by_name() - write data to DFU medium