tools: imx8image: add possibility to skip dcd
PATCH v2 1/1 tools: imx8image: add possibility to skip dcd
Currently U-Boot always adds DCD Image to boot container. On imx8qxp SoC it is possible to init RAM from within SCFW, and adding a DCD image type to the boot container in this case breaks booting (No debug output anymore from SCFW! Nor any output from SPL), so we need to configure a dcd skip somehow.
This patch adds a new imx8image_cmd entry CMD_DCD_SKIP and a new entry in imximage.cfg "DCD_SKIP". If set to "true" no DCD image type will be added to the container.
---
Superseds patch:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
azure build is fine:
https://dev.azure.com/hs0298/hs/_build/results?buildId=129&view=results
Changes in v2:
- removed the RFC tag
added Reviewed-by: Peng Fan <[email protected]>
rebased patch on mainline commit
6ebfafe8c53 ("Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh")
include/imx8image.h | 1 + tools/imx8image.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)
include/imx8image.h +1 -0
@@ -146,6 +146,7 @@ struct image_array {enum imx8image_cmd {CMD_INVALID ,CMD_BOOT_FROM , +CMD_DCD_SKIP ,CMD_FUSE_VERSION ,CMD_SW_VERSION ,CMD_MSG_BLOCK ,
tools/imx8image.c +6 -1
@@ -14,6 +14,7 @@ static soc_type_t soc;static int container =-1 ;static int32_t core_type =CFG_CORE_INVALID ;static bool emmc_fastboot; +static bool dcd_skip;static image_t param_stack[IMG_STACK_SIZE ];static uint8_t fuse_version;static uint16_t sw_version;
@@ -41,6 +42,7 @@ static int imx8image_check_image_types(uint8_t type)static table_entry_t imx8image_cmds[] = { {CMD_BOOT_FROM ,"BOOT_FROM" ,"boot command" , }, + {CMD_DCD_SKIP ,"DCD_SKIP" ,"skip DCD init" , }, {CMD_FUSE_VERSION ,"FUSE_VERSION" ,"fuse version" , }, {CMD_SW_VERSION ,"SW_VERSION" ,"sw version" , }, {CMD_MSG_BLOCK ,"MSG_BLOCK" ,"msg block" , },
@@ -88,6 +90,9 @@ static void parse_cfg_cmd(image_t *param_stack, int32_t cmd, char *token,if (!strncmp ("emmc_fastboot" , token,13 )) emmc_fastboot = true;break ; +case CMD_DCD_SKIP : +if (!strncmp ("true" , token,4 )) + dcd_skip = true;case CMD_FUSE_VERSION : fuse_version = (uint8_t )(strtoll (token,NULL ,0 ) &0xFF );break ;
@@ -1024,7 +1029,7 @@ int imx8image_copy_image(int outfd, struct image_tool_params *mparams)fprintf (stdout,"CONTAINER SW VERSION:\t0x%04x\n" , sw_version);build_container (soc, sector_size, emmc_fastboot, - img_sp, false, fuse_version, sw_version, outfd); + img_sp, dcd_skip, fuse_version, sw_version, outfd);return 0 ; }
Signature · 1 line
2.20.1
Quoted 7 lines · Heiko Schocher
Currently U-Boot always adds DCD Image to boot container. On imx8qxp SoC it is possible to init RAM from within SCFW, and adding a DCD image type to the boot container in this case breaks booting (No debug output anymore from SCFW! Nor any output from SPL), so we need to configure a dcd skip somehow.
Quoted 6 lines
This patch adds a new
imx8image_cmdentryCMD_DCD_SKIPand a new entry in imximage.cfg "DCD_SKIP". If set to "true" no DCD image type will be added to the container.Signed-off-by Heiko Schocher <[email protected]>Reviewed-by Peng Fan <[email protected]>
Applied, thanks.