From 49d3e2721164eaef5df702a26cfca6efd430be30 Mon Sep 17 00:00:00 2001 From: Dirk Behme Date: Wed, 22 Feb 2012 22:50:19 +0000 Subject: imximage: Remove overwriting of flash_offset The flash header supports different flash offsets for different boot devices. E.g. parallel NOR or OneNAND use a different offset than FLASH_OFFSET_STANDARD (== 0x400). The flash offset is correctly read from the configuration in parse_cfg_cmd(). But is then overwritten wrongly in set_imx_hdr_v1/2(). Fix this by removing this overwriting. Use the flash offset correctly read from the configuration, instead. If there is no flash_offset read from the configuration file, i.e. the BOOT_FROM tag is missing, exit with an error message. Signed-off-by: Dirk Behme CC: Jason Liu CC: Stefano Babic Tested-by: Stefano Babic --- tools/imximage.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/imximage.h') diff --git a/tools/imximage.h b/tools/imximage.h index d784a8d2ec1..34f293d95af 100644 --- a/tools/imximage.h +++ b/tools/imximage.h @@ -32,6 +32,7 @@ #define HEADER_OFFSET 0x400 #define CMD_DATA_STR "DATA" +#define FLASH_OFFSET_UNDEFINED 0xFFFFFFFF #define FLASH_OFFSET_STANDARD 0x400 #define FLASH_OFFSET_NAND FLASH_OFFSET_STANDARD #define FLASH_OFFSET_SD FLASH_OFFSET_STANDARD -- cgit v1.2.3