On 06/27/2012 10:22 AM, Florian Fainelli wrote:
> 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

The Asus RT-ac66u also has NAND flash, a BCM4706 and there all the lzma
stuff seams to be available in source code.

>> 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! :)
> 
> Congrats! Thanks for working on this!
Congrats, also from me. Really good work.

I will try to find some time today to work on the code reading out the
clocks of the SoC.

Hauke
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to