diff options
author | Matteo Croce <rootkit85@yahoo.it> | 2008-07-14 10:50:30 +0000 |
---|---|---|
committer | Matteo Croce <rootkit85@yahoo.it> | 2008-07-14 10:50:30 +0000 |
commit | e027e87a896ac1f9a3bddfef93184225fcaa9bf6 (patch) | |
tree | 5e706cc4af20635f7db8f8cacea4a2e79bc02f4e /target/linux/ar7/patches-2.6.26/200-mtd_fixes.patch | |
parent | 047ba29df711e045b0e74f6bd075e476a72b2feb (diff) | |
download | master-31e0f0ae-e027e87a896ac1f9a3bddfef93184225fcaa9bf6.tar.gz master-31e0f0ae-e027e87a896ac1f9a3bddfef93184225fcaa9bf6.tar.bz2 master-31e0f0ae-e027e87a896ac1f9a3bddfef93184225fcaa9bf6.zip |
ar7: initial 2.6.26 patches
SVN-Revision: 11824
Diffstat (limited to 'target/linux/ar7/patches-2.6.26/200-mtd_fixes.patch')
-rw-r--r-- | target/linux/ar7/patches-2.6.26/200-mtd_fixes.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/target/linux/ar7/patches-2.6.26/200-mtd_fixes.patch b/target/linux/ar7/patches-2.6.26/200-mtd_fixes.patch new file mode 100644 index 0000000000..850a643024 --- /dev/null +++ b/target/linux/ar7/patches-2.6.26/200-mtd_fixes.patch @@ -0,0 +1,54 @@ +--- a/drivers/mtd/ar7part.c ++++ b/drivers/mtd/ar7part.c +@@ -34,6 +34,10 @@ + #define LOADER_MAGIC1 le32_to_cpu(0xfeedfa42) + #define LOADER_MAGIC2 le32_to_cpu(0xfeed1281) + ++#ifndef SQUASHFS_MAGIC ++#define SQUASHFS_MAGIC 0x73717368 ++#endif ++ + struct ar7_bin_rec { + unsigned int checksum; + unsigned int length; +@@ -47,7 +51,8 @@ + unsigned long origin) + { + struct ar7_bin_rec header; +- unsigned int offset, len; ++ unsigned int offset; ++ size_t len; + unsigned int pre_size = master->erasesize, post_size = 0; + unsigned int root_offset = ROOT_OFFSET; + +@@ -66,7 +71,7 @@ + do { /* Try 10 blocks starting from master->erasesize */ + offset = pre_size; + master->read(master, offset, +- sizeof(header), &len, (u8 *)&header); ++ sizeof(header), &len, (uint8_t *)&header); + if (!strncmp((char *)&header, "TIENV0.8", 8)) + ar7_parts[1].offset = pre_size; + if (header.checksum == LOADER_MAGIC1) +@@ -88,7 +93,7 @@ + while (header.length) { + offset += sizeof(header) + header.length; + master->read(master, offset, sizeof(header), +- &len, (u8 *)&header); ++ &len, (uint8_t *)&header); + } + root_offset = offset + sizeof(header) + 4; + break; +@@ -96,10 +101,10 @@ + while (header.length) { + offset += sizeof(header) + header.length; + master->read(master, offset, sizeof(header), +- &len, (u8 *)&header); ++ &len, (uint8_t *)&header); + } + root_offset = offset + sizeof(header) + 4 + 0xff; +- root_offset &= ~(u32)0xff; ++ root_offset &= ~(uint32_t)0xff; + break; + default: + printk(KERN_WARNING "Unknown magic: %08x\n", header.checksum); |