2012/6/27 Florian Fainelli <flor...@openwrt.org>: > Hello Rafal, > > On Wednesday 27 June 2012 09:56:32 Rafał Miłecki wrote: >> GOOD NEWS guys! :) >> >> 1) First of all, WNDR4500's CFE can run lzma compressed vmlinux. You >> can know that for example from earlier-attached official.analyze.txt. >> My analyze of trx header has shown there are only 2 images. offset0 is >> 0x1C, offset1 is 0x141a78 and offset2 is ZERO (yes!). And as explained >> earlier, at 0x1C we have hexes: 5D 00 00 01 which are early bytes >> of lzma-compressed vmlinux. >> >> So I've stared generating images skipping "loader" (small decompressor >> of lzma). Unfortunately it didn't result in any success directly. >> >> Then I've started hacking Netgear's vmlinuz-lzma. I've decompressed it >> and compressed again using my system's lzma. Guess what? My CFE >> started panicking with chk containing such a recompressed vmlinux: >> Checking crc...Loader:raw Filesys:raw Dev:nflash0.os File: Options:(null) >> Loading: PANIC: out of memory! >> raw_fileop_uninit: warning: refcnt not zero >> Entry at 0x00000000 >> >> So it gave me a tip, lzma compression is very sensitive! > > Yes it is, we have had some similar issues with bcm63xx images in order to > find > the right LZMA parameters, since both platforms use CFE, I suggest you give > them a try and see if that fixes anything for you: > https://dev.openwrt.org/browser/trunk/target/linux/brcm63xx/image/Makefile#L117
I can see you had to remove some parts of lzma file for bcm63xx. Really ugly. Fortunately it's a little nicer with my brcm47xx WNDR4500. After multiple test I've discovered my CFE doesn't like two things: 1) Dictionary 2) End Of Stream marker So using some low -dVALUE and *not* using -eos results in a working image. I've tried few random lc/lp/pb values but CFE seems to support all variations. -- Rafał
-d12 good Dictionary size: 0 MB (2^12 bytes) -d13 good Dictionary size: 0 MB (2^13 bytes) -d14 good Dictionary size: 0 MB (2^14 bytes) -d15 good Dictionary size: 0 MB (2^15 bytes) -d16 good Dictionary size: 0 MB (2^16 bytes) -d17 good Dictionary size: 0 MB (2^17 bytes) -d18 good Dictionary size: 0 MB (2^18 bytes) -d19 bad Dictionary size: 1 MB (2^19 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d20 bad Dictionary size: 1 MB (2^20 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d21 bad Dictionary size: 2 MB (2^21 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d22 bad Dictionary size: 4 MB (2^22 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d12 -eos bad Dictionary size: 0 MB (2^12 bytes) Loading: ...PANIC: out of memory! -d16 -eos bad Dictionary size: 0 MB (2^16 bytes) Loading: ...PANIC: out of memory! -d22 -eos bad Dictionary size: 4 MB (2^22 bytes) Loading PANIC: out of memory! raw_fileop_uninit: warning: refcnt not zero -d16 -lc1 -lp2 -pb2 good
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel