magicbox: add 0x40 to the kernel image size (uImage header)
authorFelix Fietkau <nbd@openwrt.org>
Wed, 30 Aug 2006 14:04:26 +0000 (14:04 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 30 Aug 2006 14:04:26 +0000 (14:04 +0000)
SVN-Revision: 4720

openwrt/target/linux/magicbox-2.6/patches/002-flash_map.patch

index 80382305130f16ab4e198876041ff66d4dc21913..fcddb348c72fc2b03a48231f42a61025b704c41e 100644 (file)
@@ -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
 --- 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
-@@ -0,0 +1,112 @@
+@@ -0,0 +1,113 @@
 +/*
 + * 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) ||
 +                      len != 4)
 +                      return -ENXIO;
++              size += 0x40; /* header size of the uImage */
 +              if ((size > 0) && (size < 0x400000)) {
 +                      /* skip to next erase block */
 +                      if (size & (flash->erasesize - 1)) {