Changeset 33935


Ignore:
Timestamp:
2012-10-25T21:49:20+02:00 (5 years ago)
Author:
hauke
Message:

brcm47xx: check for .ELF header in partition parser

The image format for the wgt634u is different from the normal format.
Without this patch the partition parser detects a 128kb bigger
partition after every update.

This closes #11420

Thank you b.sander for the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm47xx/patches-3.3/050-mtd-add-bcm47xx-part-parser.patch

    r33920 r33935  
    2727--- /dev/null 
    2828+++ b/drivers/mtd/bcm47xxpart.c 
    29 @@ -0,0 +1,542 @@ 
     29@@ -0,0 +1,548 @@ 
    3030+/* 
    3131+ *  Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> 
     
    9797+}; 
    9898+ 
     99+/* for WGT634U search the ELF-header of 
     100+ * the kernel decompressor instead of TRX 
     101+ */ 
     102+#define WGT634U_ELF_MAGIC      0x464c457f /*  ".ELF"  */ 
     103+ 
    99104+/* for Edimax Print servers which use an additional header 
    100105+ * then the firmware on flash looks like : 
     
    150155+ 
    151156+               /* found a TRX header */ 
    152 +               if (le32_to_cpu(trx->magic) == TRX_MAGIC) 
     157+               if (le32_to_cpu(trx->magic) == TRX_MAGIC || 
     158+                   le32_to_cpu(trx->magic) == WGT634U_ELF_MAGIC) 
    153159+                       goto found; 
    154160+       } 
Note: See TracChangeset for help on using the changeset viewer.