mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
Fix image generation (sn9)
SVN-Revision: 6781
This commit is contained in:
parent
b99dfc7133
commit
aef8f80a3a
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user