diff options
| author | Roman Yeryomin <roman@advem.lv> | 2013-05-26 01:02:55 +0300 |
|---|---|---|
| committer | Roman Yeryomin <roman@advem.lv> | 2013-05-26 01:02:55 +0300 |
| commit | 342045a35b1981a89e4bc80842b10c065e1050da (patch) | |
| tree | 4140720b20e8d641c11da882010d6130a75fef21 /target/linux/brcm47xx/patches-3.8/026-mtd-bcm47xxpart-find-boot-partition-by-CFE-magic.patch | |
| parent | 7338133dde8238afce34676214b494c8db96689b (diff) | |
| parent | 1a116ce7818ecee5d167a9c0ebb1a0feca9120e6 (diff) | |
Merge trunk into realtek-unstable
Conflicts:
Config.in
feeds.conf.default
package/base-files/files/etc/hotplug2-common.rules
package/network/config/netifd/files/etc/init.d/network
Diffstat (limited to 'target/linux/brcm47xx/patches-3.8/026-mtd-bcm47xxpart-find-boot-partition-by-CFE-magic.patch')
| -rw-r--r-- | target/linux/brcm47xx/patches-3.8/026-mtd-bcm47xxpart-find-boot-partition-by-CFE-magic.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.8/026-mtd-bcm47xxpart-find-boot-partition-by-CFE-magic.patch b/target/linux/brcm47xx/patches-3.8/026-mtd-bcm47xxpart-find-boot-partition-by-CFE-magic.patch new file mode 100644 index 000000000..d3fb9d3a6 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.8/026-mtd-bcm47xxpart-find-boot-partition-by-CFE-magic.patch @@ -0,0 +1,26 @@ +--- a/drivers/mtd/bcm47xxpart.c ++++ b/drivers/mtd/bcm47xxpart.c +@@ -23,9 +23,10 @@ + * Amount of bytes we read when analyzing each block of flash memory. + * Set it big enough to allow detecting partition and reading important data. + */ +-#define BCM47XXPART_BYTES_TO_READ 0x404 ++#define BCM47XXPART_BYTES_TO_READ 0x4e8 + + /* Magics */ ++#define CFE_MAGIC 0x43464531 /* 1EFC */ + #define BOARD_DATA_MAGIC 0x5246504D /* MPFR */ + #define POT_MAGIC1 0x54544f50 /* POTT */ + #define POT_MAGIC2 0x504f /* OP */ +@@ -93,8 +94,9 @@ static int bcm47xxpart_parse(struct mtd_ + continue; + } + +- /* CFE has small NVRAM at 0x400 */ +- if (buf[0x400 / 4] == NVRAM_HEADER) { ++ /* Magic or small NVRAM at 0x400 */ ++ if (buf[0x4e0 / 4] == CFE_MAGIC || ++ buf[0x400 / 4] == NVRAM_HEADER) { + bcm47xxpart_add_part(&parts[curr_part++], "boot", + offset, MTD_WRITEABLE); + continue; |
