summaryrefslogtreecommitdiff
path: root/tools/firmware-utils/src/trx.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2010-07-30 21:19:49 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2010-07-30 21:19:49 +0000
commitda7493d8f92be7f0eb0ec69252119ec93527fe08 (patch)
tree1bbbbb53c091c30b93e8941d486df08d6126225f /tools/firmware-utils/src/trx.c
parent941f72b11ce7e1da682329b2aa23f086f6f3e6a5 (diff)
downloadmtk-20170518-da7493d8f92be7f0eb0ec69252119ec93527fe08.zip
mtk-20170518-da7493d8f92be7f0eb0ec69252119ec93527fe08.tar.gz
mtk-20170518-da7493d8f92be7f0eb0ec69252119ec93527fe08.tar.bz2
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) SVN-Revision: 22418
Diffstat (limited to 'tools/firmware-utils/src/trx.c')
-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 426a6b5..8e95d98 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 */