board/ctrl: Add BOARDIOC_BOOT_IMAGE for booting a new application image

This command enables the application to perform the final steps of the
booting process prior to finally switching the execution to another
firmware image.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei
2021-07-30 09:47:46 -07:00
committed by Xiang Xiao
parent 3c400f32fa
commit ae714baae5
4 changed files with 75 additions and 1 deletions
+13 -1
View File
@@ -202,6 +202,7 @@
#define BOARDIOC_TESTSET _BOARDIOC(0x0011)
#define BOARDIOC_UNIQUEKEY _BOARDIOC(0x0012)
#define BOARDIOC_SWITCH_BOOT _BOARDIOC(0x0013)
#define BOARDIOC_BOOT_IMAGE _BOARDIOC(0x0014)
/* If CONFIG_BOARDCTL_IOCTL=y, then board-specific commands will be support.
* In this case, all commands not recognized by boardctl() will be forwarded
@@ -210,7 +211,7 @@
* User defined board commands may begin with this value:
*/
#define BOARDIOC_USER _BOARDIOC(0x0014)
#define BOARDIOC_USER _BOARDIOC(0x0015)
/****************************************************************************
* Public Type Definitions
@@ -392,6 +393,17 @@ struct boardioc_nxterm_ioctl_s
};
#endif /* CONFIG_NXTERM */
#ifdef CONFIG_BOARDCTL_BOOT_IMAGE
/* Structure containing the arguments to the BOARDIOC_BOOT_IMAGE command */
struct boardioc_boot_info_s
{
FAR const char *path; /* Path to application firmware image */
uint32_t header_size; /* Size of the image header in bytes */
};
#endif
/****************************************************************************
* Public Data
****************************************************************************/