diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-25 09:53:07 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-02-02 15:41:04 +0100 |
commit | 2ae40562aefa957e3b40c18dd96f280a61e7c7f2 (patch) | |
tree | 5d8c472f4d2ff672bdf7649a6f633c9fed78ad1b /scripts | |
parent | bca787cf4aa2c2b89e331a2832fee4b6d95a4c0f (diff) | |
download | barebox-2ae40562aefa957e3b40c18dd96f280a61e7c7f2.tar.gz barebox-2ae40562aefa957e3b40c18dd96f280a61e7c7f2.tar.xz |
scripts: imx-image: Allow dcd offset 0x0
0 is a valid offset for the dcd, so do not use this value to detect
an unset dcd offset. Use 0xffffffff instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/imx/imx-image.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c index 5c9faee749..788fa81a7e 100644 --- a/scripts/imx/imx-image.c +++ b/scripts/imx/imx-image.c @@ -34,7 +34,7 @@ #define CSF_LEN 0x2000 /* length of the CSF (needed for HAB) */ static uint32_t image_load_addr; -static uint32_t image_dcd_offset; +static uint32_t image_dcd_offset = 0xffffffff; static uint32_t dcdtable[MAX_DCD]; static int curdcd; static int header_version; @@ -729,7 +729,7 @@ int main(int argc, char *argv[]) if (!buf) exit(1); - if (!image_dcd_offset) { + if (image_dcd_offset == 0xffffffff) { fprintf(stderr, "no dcd offset given ('dcdofs'). Defaulting to 0x%08x\n", FLASH_HEADER_OFFSET); image_dcd_offset = FLASH_HEADER_OFFSET; |