aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2010-07-30 21:19:49 +0000
committerHauke Mehrtens <hauke@openwrt.org>2010-07-30 21:19:49 +0000
commit43aabdf1854ed2f278f92ba283b75e913e7536ba (patch)
tree08492de69b0c261e5631dcc2c35c014733a3f7ae /tools/firmware-utils/src
parentb6623aaf0393b60b02c1de1af524e4f35a2358a4 (diff)
downloadupstream-43aabdf1854ed2f278f92ba283b75e913e7536ba.tar.gz
upstream-43aabdf1854ed2f278f92ba283b75e913e7536ba.tar.bz2
upstream-43aabdf1854ed2f278f92ba283b75e913e7536ba.zip
mostly revert commit r22396
CFE does not boot images generated with these checksums because of wrong checksum. After flashing then with tftp to my Asus wl500-GPv1 the following messages are show: Null Rescue Flag. Boot program checksum is invalid Hello!! Enter Rescue Mode: (Check error) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22418 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/firmware-utils/src')
-rw-r--r--tools/firmware-utils/src/trx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/trx.c b/tools/firmware-utils/src/trx.c
index 426a6b5834..8e95d98d7a 100644
--- a/tools/firmware-utils/src/trx.c
+++ b/tools/firmware-utils/src/trx.c
@@ -276,7 +276,7 @@ int main(int argc, char **argv)
(fsmark)?fsmark:cur_len - offsetof(struct trx_header, flag_version));
p->crc32 = STORE32_LE(p->crc32);
- p->len = (fsmark)?fsmark:cur_len - offsetof(struct trx_header, flag_version);
+ p->len = STORE32_LE((fsmark) ? fsmark : cur_len);
p->len = STORE32_LE(p->len);
/* restore TRXv2 bin-header */