mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
magicbox: add 0x40 to the kernel image size (uImage header)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4720 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -20,7 +20,7 @@ diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig
|
|||||||
diff -urN linux.old/drivers/mtd/maps/magicmap.c linux.dev/drivers/mtd/maps/magicmap.c
|
diff -urN linux.old/drivers/mtd/maps/magicmap.c linux.dev/drivers/mtd/maps/magicmap.c
|
||||||
--- linux.old/drivers/mtd/maps/magicmap.c 1970-01-01 01:00:00.000000000 +0100
|
--- linux.old/drivers/mtd/maps/magicmap.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ linux.dev/drivers/mtd/maps/magicmap.c 2006-08-30 06:52:34.000000000 +0200
|
+++ linux.dev/drivers/mtd/maps/magicmap.c 2006-08-30 06:52:34.000000000 +0200
|
||||||
@@ -0,0 +1,112 @@
|
@@ -0,0 +1,113 @@
|
||||||
+/*
|
+/*
|
||||||
+ * magicmap.c: Copyleft 2005 Karol Lewandowski
|
+ * magicmap.c: Copyleft 2005 Karol Lewandowski
|
||||||
+ *
|
+ *
|
||||||
@@ -94,6 +94,7 @@ diff -urN linux.old/drivers/mtd/maps/magicmap.c linux.dev/drivers/mtd/maps/magic
|
|||||||
+ if (MTD_READ(flash, 12, sizeof(u32), &len, (char *) &size) ||
|
+ if (MTD_READ(flash, 12, sizeof(u32), &len, (char *) &size) ||
|
||||||
+ len != 4)
|
+ len != 4)
|
||||||
+ return -ENXIO;
|
+ return -ENXIO;
|
||||||
|
+ size += 0x40; /* header size of the uImage */
|
||||||
+ if ((size > 0) && (size < 0x400000)) {
|
+ if ((size > 0) && (size < 0x400000)) {
|
||||||
+ /* skip to next erase block */
|
+ /* skip to next erase block */
|
||||||
+ if (size & (flash->erasesize - 1)) {
|
+ if (size & (flash->erasesize - 1)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user