summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-04-01 11:08:26 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-04-01 11:08:26 +0000
commitca97dc55d54152ca6a724c0aacf3e03a3bf9661e (patch)
treec8335436f490a19c7e1613cee1c54f3e795a2157 /tools
parent202ebdce2de2126f25cf940214da250ed1dc0794 (diff)
Fix image generation (sn9)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6781 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools')
-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 aae68ebed..5a396f357 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);