From a817a348fbefb917693d83ac4c4ffd3e7ac2f6b1 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sun, 1 Apr 2007 11:08:26 +0000 Subject: [PATCH] Fix image generation (sn9) SVN-Revision: 6781 --- src/airlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/airlink.c b/src/airlink.c index aae68eb..5a396f3 100644 --- a/src/airlink.c +++ b/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); -- 2.30.2