From 50c5f3a2faa441f3565b6e5d72f6e498db874f4a Mon Sep 17 00:00:00 2001 From: Daniel Dickinson Date: Sun, 26 Dec 2010 04:18:13 +0000 Subject: [PATCH] Added OpenWRT-specific field to imagetag so that we can record the real root length, so that when the CRC fixup is applied and the root length is recorded as zero we can still calculate the rootfs mtd partition size. Signed-off-by: Daniel Dickinson SVN-Revision: 24838 --- src/imagetag.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/imagetag.c b/src/imagetag.c index 1818daa..a7b9bab 100644 --- a/src/imagetag.c +++ b/src/imagetag.c @@ -338,11 +338,12 @@ int tagfile(const char *kernel, const char *rootfs, const char *bin, \ if (args->root_first_flag) { sprintf(tag.flashImageStart, "%lu", rootfsoff); - sprintf(tag.rootLength, "%lu", rootfslen); + sprintf(tag.flashRootLength, "%lu", rootfslen); } else { sprintf(tag.flashImageStart, "%lu", kerneloff); - sprintf(tag.rootLength, "%lu", rootfslen + sizeof(deadcode)); + sprintf(tag.flashRootLength, "%lu", rootfslen + sizeof(deadcode)); } + int2tag(tag.rootLength, rootfslen + sizeof(deadcode)); if (args->rsa_signature_given) { strncpy(tag.rsa_signature, args->rsa_signature_arg, RSASIG_LEN); -- 2.30.2