1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

Fix image generation (sn9)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6781 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian
2007-04-01 11:08:26 +00:00
parent 202ebdce2d
commit ca97dc55d5

View File

@@ -102,7 +102,7 @@ u32 header[] = {
0x00000000, 0x00000005, 0x00000000, 0x00000000 0x00000000, 0x00000005, 0x00000000, 0x00000000
}; };
static int JFFS2 = 0x20; static int JFFS2 = 0;
int generate_image(char *kname, char *fsname, char *fname, int EHDR) 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 else
write(ffd, header + 2, 0x20); write(ffd, header + 2, 0x20);
write(ffd, bk, lenk); write(ffd, bk, lenk);
if (!JFFS2) JFFS2 = 0x20;
printf("Padding header+kernel - 0x%x + 0x%x = 0x%x\n", printf("Padding header+kernel - 0x%x + 0x%x = 0x%x\n",
lenk, ((lenk - 1 + JFFS2) / JFFS2) * JFFS2 - lenk, lenk, ((lenk - 1 + JFFS2) / JFFS2) * JFFS2 - lenk,
((lenk - 1 + JFFS2) / JFFS2) * JFFS2); ((lenk - 1 + JFFS2) / JFFS2) * JFFS2);