mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
tools: arm: imx: Implement BOOT_OFFSET command for imximage
Implement BOOT_OFFSET command for imximage. This command is parallel to current BOOT_FROM command, but allows more flexibility in configuring arbitrary image header offset. Also add an imximage.cfg with default offset values into arm/arch/imx-common/ so the board-specific imximage.cfg can include this file to avoid magic constants. The syntax of BOOT_OFFSET command is "BOOT_OFFSET <u32 offset>". Signed-off-by: Marek Vasut <marex@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@ti.com> Acked-by: Stefano Babic <sbabic@denx.de> Acked-by: Stefan Roese <sr@denx.de>
This commit is contained in:

committed by
Stefano Babic

parent
7e2173cf82
commit
6cb83829a0
@ -37,6 +37,7 @@
|
||||
*/
|
||||
static table_entry_t imximage_cmds[] = {
|
||||
{CMD_BOOT_FROM, "BOOT_FROM", "boot command", },
|
||||
{CMD_BOOT_OFFSET, "BOOT_OFFSET", "Boot offset", },
|
||||
{CMD_DATA, "DATA", "Reg Write Data", },
|
||||
{CMD_IMAGE_VERSION, "IMAGE_VERSION", "image version", },
|
||||
{-1, "", "", },
|
||||
@ -352,6 +353,11 @@ static void parse_cfg_cmd(struct imx_header *imxhdr, int32_t cmd, char *token,
|
||||
if (unlikely(cmd_ver_first != 1))
|
||||
cmd_ver_first = 0;
|
||||
break;
|
||||
case CMD_BOOT_OFFSET:
|
||||
imxhdr->flash_offset = get_cfg_value(token, name, lineno);
|
||||
if (unlikely(cmd_ver_first != 1))
|
||||
cmd_ver_first = 0;
|
||||
break;
|
||||
case CMD_DATA:
|
||||
value = get_cfg_value(token, name, lineno);
|
||||
(*set_dcd_val)(imxhdr, name, lineno, fld, value, dcd_len);
|
||||
|
Reference in New Issue
Block a user