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!

2) I've decided to ignore OpenWRT auto-generated vmlinux.lzma
(build_dir/linux-brcm47xx/vmlinux.lzma). I've compressed vmlinux by
myself using "lzma" from WNDR4500 official firmware source:
~/WNDR4500-V1.0.0.58_1.0.13_src/tools/lzma e vmlinux vmlinuz-repacked

And generated trx and chk again... It worked! I've uploaded my chk
image using tftp and CFE booted it successfully! :)

-- 
Rafał
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to