diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-12-02 21:27:54 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-12-02 21:27:54 +0000 |
commit | 08e8737994db7654157be36585c43c563b2a6735 (patch) | |
tree | 7583f950e56419c23c980d861556d2a976b8c12b /target/linux/brcm47xx/image/lzma-loader/src | |
parent | fab3a85d30350bbaa65e938f39b66e06e614af22 (diff) |
brcm47xx: Add edimax PS1208mfg support
Thank you clemvangelis for the patches. (closes #7672)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24217 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/image/lzma-loader/src')
-rw-r--r-- | target/linux/brcm47xx/image/lzma-loader/src/decompress.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/target/linux/brcm47xx/image/lzma-loader/src/decompress.c b/target/linux/brcm47xx/image/lzma-loader/src/decompress.c index ce2876a30..05681b152 100644 --- a/target/linux/brcm47xx/image/lzma-loader/src/decompress.c +++ b/target/linux/brcm47xx/image/lzma-loader/src/decompress.c @@ -87,6 +87,9 @@ struct trx_header { unsigned int offsets[3]; /* Offsets of partitions from start of header */ }; +#define EDIMAX_PS_HEADER_MAGIC 0x36315350 /* "PS16" */ +#define EDIMAX_PS_HEADER_LEN 0xc /* 12 bytes long for edimax header */ + /* beyound the image end, size not known in advance */ extern unsigned char workspace[]; @@ -135,8 +138,12 @@ void entry(unsigned long icache_size, unsigned long icache_lsize, /* look for trx header, 32-bit data access */ for (data = ((unsigned char *) KSEG1ADDR(BCM4710_FLASH)); - ((struct trx_header *)data)->magic != TRX_MAGIC; data += 65536); + ((struct trx_header *)data)->magic != TRX_MAGIC && + ((struct trx_header *)data)->magic != EDIMAX_PS_HEADER_MAGIC; + data += 65536); + if (((struct trx_header *)data)->magic == EDIMAX_PS_HEADER_MAGIC) + data += EDIMAX_PS_HEADER_LEN; /* compressed kernel is in the partition 0 or 1 */ if (((struct trx_header *)data)->offsets[1] > 65536) data += ((struct trx_header *)data)->offsets[0]; |