aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/airlink.c
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-04-01 11:08:26 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-04-01 11:08:26 +0000
commitaef8f80a3ac507da5b66f14bfc0f3ef0306d63e9 (patch)
tree238f05a844c4ad18c7ca7d03867163cdb4682d3d /tools/firmware-utils/src/airlink.c
parentb99dfc713360fe497da88fa1ee12b539d4d68859 (diff)
downloadupstream-aef8f80a3ac507da5b66f14bfc0f3ef0306d63e9.tar.gz
upstream-aef8f80a3ac507da5b66f14bfc0f3ef0306d63e9.tar.bz2
upstream-aef8f80a3ac507da5b66f14bfc0f3ef0306d63e9.zip
Fix image generation (sn9)
SVN-Revision: 6781
Diffstat (limited to 'tools/firmware-utils/src/airlink.c')
-rw-r--r--tools/firmware-utils/src/airlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/airlink.c b/tools/firmware-utils/src/airlink.c
index aae68ebede..5a396f357f 100644
--- a/tools/firmware-utils/src/airlink.c
+++ b/tools/firmware-utils/src/airlink.c
@@ -102,7 +102,7 @@ u32 header[] = {
0x00000000, 0x00000005, 0x00000000, 0x00000000
};
-static int JFFS2 = 0x20;
+static int JFFS2 = 0;
int generate_image(char *kname, char *fsname, char *fname, int EHDR)
{
@@ -136,6 +136,7 @@ int generate_image(char *kname, char *fsname, char *fname, int EHDR)
else
write(ffd, header + 2, 0x20);
write(ffd, bk, lenk);
+ if (!JFFS2) JFFS2 = 0x20;
printf("Padding header+kernel - 0x%x + 0x%x = 0x%x\n",
lenk, ((lenk - 1 + JFFS2) / JFFS2) * JFFS2 - lenk,
((lenk - 1 + JFFS2) / JFFS2) * JFFS2);