aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src
diff options
context:
space:
mode:
authorDaniel Dickinson <daniel@cshore.neomailbox.net>2010-12-26 04:18:13 +0000
committerDaniel Dickinson <daniel@cshore.neomailbox.net>2010-12-26 04:18:13 +0000
commitec103967cb5570cac5558b94aad95fd68a32635a (patch)
treeb31fe0c8ce115d86db9ab2bf1a5da7bb585be8f9 /tools/firmware-utils/src
parent934de91827ceadf6c3cee70503b8c3b7ed9cfdf6 (diff)
downloadmaster-187ad058-ec103967cb5570cac5558b94aad95fd68a32635a.tar.gz
master-187ad058-ec103967cb5570cac5558b94aad95fd68a32635a.tar.bz2
master-187ad058-ec103967cb5570cac5558b94aad95fd68a32635a.zip
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 <daniel@cshore.neomailbox.net> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24838 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/firmware-utils/src')
-rw-r--r--tools/firmware-utils/src/imagetag.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/firmware-utils/src/imagetag.c b/tools/firmware-utils/src/imagetag.c
index 1818daaca1..a7b9babd3e 100644
--- a/tools/firmware-utils/src/imagetag.c
+++ b/tools/firmware-utils/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);