2012/6/22 Hauke Mehrtens <ha...@hauke-m.de>: > On 06/22/2012 02:10 PM, Rafał Miłecki wrote: >> 2012/6/22 Rafał Miłecki <zaj...@gmail.com>: >>> 2012/6/21 Rafał Miłecki <zaj...@gmail.com>: >>>> YOU'RE GREAT GUYS >>>> >>>> boot -tftp -elf 192.168.1.2" :/openwrt-brcm47xx-vmlinux.elf >>>> Loader:elf Filesys:tftp Dev:eth0 >>>> File:192.168.1.2:/openwrt-brcm47xx-vmlinux.elf Options:(null) >>>> Loading: 0x80001000/4400228 0x80433464/118060 Entry at 0x80247370 >>>> Closing network. >>>> Starting program at 0x80247370 >>>> [ 0.000000] Linux version 3.3.8 (za...@linux-bxwm.site) (gcc >>>> version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #5 Thu >>>> Jun 21 12:00:17 CEST 2012 >>>> [ 0.000000] bootconsole [early0] enabled >>>> [ 0.000000] CPU revision is: 00019749 (MIPS 74Kc) >>>> [ 0.000000] bcm47xx: using bcma bus >>>> [ 0.000000] bcma: Found chip with id 0x5300, rev 0x01 and package 0x00 >>>> [ 0.000000] bcma: Failed to scan for common core: -29 >>>> [ 0.000000] Kernel panic - not syncing: Failed to initialize BCMA >>>> bus (err -1) >>>> >>>> Now the rest sounds trivial to fix! :) >>>> >>>> >>>> Why booting elf from tftp allowed to me finally see anything? Any >>>> explanation to that maybe? >>> >>> OK, I've fixed booting to reach some sane state. I've been working >>> using tftp and elf all the time. Finally my boot log (using tftp + >>> elf) looks like you can see in attached log. >>> >>> So after reaching this stage I've switched from generating ramdisk to >>> generating squashfs. Installed my openwrt-wndr4500-squashfs.chk and... >>> again, nothing. I can't see anything after "Starting program at >>> 0x80001000". >> >> Hauke: does serial console logging works for you on any BCMA board? >> >> In brcm47xx/setup.c I can see some serial related code in >> bcm47xx_register_ssb. We don't have anything like that in >> bcm47xx_register_bcma. Can this cause a problem for me? > > This code is used if the default serial port is on a different tty and > it is used for some old devices or just one. > > I had never problems with serial console on my bcma based devices > (bcm4716 and BCM5357). I think you stored the image on the wrong flash > chip. From the boot log of the original firmware it looks like it has a > 2MB serial flash and a 128MB NAND flash. One has the partition named > linux and the other a partition named kernel with round about the same > size. You could look into the source code provided by Netgear for your > device and find out how the booting works with the original firmware and > how the original firmware image is structured.
I've compared firmware files: original one and OpenWRT's one. Both are chk files, both chk contain trx. However I can't understand what does original firmware's trx contain. OpenWRT's trx is understandable, it just contains gzipped loader. Does looking at official.analyze.txt make any sense to you? -- Rafał
WNDR4500-V1.0.0.58_1.0.13.chk ****************** *** chk_header *** ****************** | magic | header_len | reserved | 0000:0000 | 2A 23 24 5E |00 00 00 3A |01 01 00 00 3A 01 00 0D | *#$^...:....:... | kernel_chksum | rootfs_chksum | kernel_len | rootfs_len | 0000:0010 | 96 01 EC DB |00 00 00 00 |00 7B B0 00 |00 00 00 00 | ..ìÛ.....{°..... | image_chksum | header_chksum | board_id | 0000:0020 | 96 01 EC DB |2F 26 0B F5 |55 31 32 48 31 38 39 54 | ..ìÛ/&.õU12H189T | board_id | 0000:0030 | 30 30 5F 4E 45 54 47 45 41 52 | | 00_NETGEAR ****************** *** trx header *** ****************** | magic | leng- | 0000:0030 | 48 44 52 30 |00 B0 | HDR0.° | -th | CRC | flags | ver | offset0 | offs- | 0000:0040 | 7B 00 |68 67 C7 56 |00 00 |01 00 |1C 00 00 00 |78 1A | {.hgÇV........x. | -et1 | offset2 | what does begin here??? 0000:0050 | 14 00 |00 00 00 00 |5D 00 00 01 00 86 C0 39 00 00 | ......].....À9.. 0000:0060 | 00 00 00 00 00 25 D8 FB 85 9C B0 B1 53 C1 CF 25 | .....%Øû..°±SÁÏ% 0000:0070 | 28 25 31 69 C7 52 7A FE 81 AE 1A 06 34 E1 83 A0 | (%1iÇRzþ.®..4á. 0000:0080 | C6 4A 3A 8C AB 99 EC A8 8C 2A F0 6D 5E 70 2A D5 | ÆJ:.«.ì¨.*ðm^p*Õ 0000:0090 | 83 41 DB 32 6D 16 88 51 D4 EF FB 27 69 28 96 90 | .AÛ2m..QÔïû'i(.. 0000:00A0 | 57 94 EA 8C 82 71 8B 0B 37 1C 77 5A 83 B4 F3 92 | W.ê..q..7.wZ.´ó. 0000:00B0 | 8C 12 F4 76 ED C9 B5 9C 57 4B BB 1B 14 E5 F7 2F | ..ôvíɵ.WK»..å÷/ 0000:00C0 | D5 38 2B B8 D4 C6 51 FD C4 03 1D AF 3A 26 1F 8B | Õ8+¸ÔÆQýÄ..¯:&.. 0000:00D0 | 36 9C 4C A3 56 95 28 BE 19 DA 55 23 2F 9A F3 53 | 6.L£V.(¾.ÚU#/.óS Is the "1F 8B" at 0xCE:0xCF header of gzip? Doesn't seem to, as 0x36 can't be gzip'sCM and 0x9C can't be gzip's FLG.
openwrt-wndr4500-squashfs.chk ****************** *** chk_header *** ****************** | magic | header_len | reserved | 0000:0000 | 2A 23 24 5E |00 00 00 3A |02 01 01 63 00 00 00 00 | *#$^...:...c.... | kernel_chksum | rootfs_chksum | kernel_len | rootfs_len | 0000:0010 | F2 3B 39 59 |00 00 00 00 |00 2B 10 00 |00 00 00 00 | ò;9Y.....+...... | image_chksum | header_chksum | board_id | 0000:0020 | F2 3B 39 59 |F1 C4 09 E4 |55 31 32 48 31 38 39 54 | ò;9YñÄ.äU12H189T | board_id | 0000:0030 | 30 30 5F 4E 45 54 47 45 41 52 | | 00_NETGEAR ****************** *** trx header *** ****************** | | magic | leng- | 0000:0030 | |48 44 52 30 |00 10 | HDR0.. | -th | CRC | flags | ver | offset0 | offs- | 0000:0040 | 2B 00 |04 88 4A BE |00 00 |01 00 |1C 00 00 00 |60 09 | +...J¾........`. | -et1 | offset2 | 0000:0050 | 00 00 |00 98 0F 00 | | ................ ****************** *** loader(gz) *** ****************** | |ID1|ID2|CM |FLG| MTIME |XFL|OS | 0000:0050 | |1F |8B |08 |00 |00 00 00 00 |02 |03 | ................
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel