[PATCH 11/34] scripts: imx-image: Allow dcd offset 0x0
Sascha Hauer
s.hauer at pengutronix.de
Tue Feb 2 06:47:54 PST 2016
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 at pengutronix.de>
---
scripts/imx/imx-image.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index 5c9faee..788fa81 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;
--
2.7.0.rc3
More information about the barebox
mailing list