heyho,
i try to chainload redboot from ram on my se551 (see http://wiki.openwrt.org/OpenWrtDocs/Har … mens/SE551 for some infos about the device). the current bootloader allows me to place files on the router (ram or flash, but so far i'll not write to flash due the fact i killed the jtag solder pads , first i want to see redboot working on it before write it into the flash).
first i tried to play around with ap51.ram (took some time until malbon told me that it's not re-allocatable, thanks malbon ), uploaded the image to 0x80041000 according to:
LOAD off 0x00001000 vaddr 0x80041000 paddr 0x80041000 align 2**12
still no success... next hint from malbon, skip the elf header. so i used objdump to get the:
start address 0x800410bc
again, nothing happend, after a short look with hexedit into ap51.ram at 0xbc, i thought there might be a big problem with the address, there are only zeros following until 0x1000. but here the output from the bootloader:
Go to Memory Address: (default:0x80001000) : 0x800410bc
Are you sure, you have the valid code on 0x800410bc ? (Y/n) Yes
sysConsoleDump: type 0x00000200
epc: 0xc60c0a84 bva: 0xc60c0a84 sr: 0x10400002 cse: 0x50808008
R0: r0: 0x00000000 at: 0xbfc00000 v0: 0x800410bc v1: 0x00000000
R4: a0: 0xb1100014 a1: 0x0000000d a2: 0x80530000 a3: 0x00000067
R8: t0: 0x00000008 t1: 0x8052c644 t2: 0x00ab0401 t3: 0x00020800
R12: t4: 0x00d80400 t5: 0x8052d83c t6: 0xefd56479 t7: 0x03d2e400
R16: s0: 0x80530000 s1: 0x00000000 s2: 0x80520000 s3: 0x0000cfa4
R20: s4: 0xd9fd0b6b s5: 0x5effd539 s6: 0xf7d7de8f s7: 0x7d8feaef
R24: t8: 0xffeaffb2 t9: 0xfbfd4feb k0: 0x00000000 k1: 0x00000000
R28: gp: 0x80534fa0 sp: 0x8053ed70 fp: 0x7b93f68c ra: 0x805242f0
there are two different kinds of the sysConsoleDump lines so far (ok, the rest of the messages is also different, but i think this line is something like an error code), the following came up after i pointed the loader to the wrong address:
sysConsoleDump: type 0x00000380
next step: use a .bin created with objcopy from the the ap51.ram. placed it again at 0x80041000 and tried to load it from there (is there also an entry point i have to use?), interesting now the bootloader asks to load it right after i transfered it:
[WG4005E Boot]:m
RAM upload destination: (default:0x80001000) : 0x80041000
Starting XModem download to 80041000...(press Enter to abort)
Cuploaded code? (Y/n) sysConsoleDump: type 0x00000200
epc: 0x1a0ae15c bva: 0x1a0ae15c sr: 0x10400002 cse: 0x50808008
R0: r0: 0x00000000 at: 0xbfc00000 v0: 0x80041000 v1: 0x00000059
R4: a0: 0x00000059 a1: 0x00000020 a2: 0x80530000 a3: 0x00007942
R8: t0: 0x8053e530 t1: 0x8052c644 t2: 0x00ab0401 t3: 0x00020800
R12: t4: 0x00d80400 t5: 0x8052d83c t6: 0xefd56479 t7: 0x03d2e400
R16: s0: 0x80530000 s1: 0x00000000 s2: 0x80520000 s3: 0x0000cfa4
R20: s4: 0xd9fd0b6b s5: 0x5effd539 s6: 0xf7d7de8f s7: 0x7d8feaef
R24: t8: 0xffeaffb2 t9: 0xfbfd4feb k0: 0x00000000 k1: 0x00000000
R28: gp: 0x80534fa0 sp: 0x8053ed70 fp: 0x7b93f68c ra: 0x80524398
ok, it trashed the output a little bit, but like all the times before, it rebooted right after printing those lines .
any ideas? some final thoughts/questions:
- malbon confirmed the redboot image as working (but he tested on another router) - could it be the reason why redboot doesn't start?
- in the README from the redboot sources (got the on the ecos site iirc) ap51 is listed as: "ap51: 16MB DRAM, 2MB Flash, 184MHz CPU Clock, IC+ Phy", the Phy shouldn't matter, at least i should start i think, but the cpu speed, the se551 runs at 240MHz (maybe malbon can provide some infos about the build options he used).
- like mentioned above, is there an offset if i use the .bin i generated with "objcopy -O binary ap51.ram redboot.bin"?
- does somebody know how to interpret those sysConsoleDump lines?
finally some output from the current bootloader (i can provide more if you like, but rest is stuff from the current fw, vxworks, uninteresting i think):
ar531xPlus rev 0x00000087 boot loader startup...
Flash initialized
SDRAM initialized
Cache initialized
Copy program from 0xbfc00000 to 0x80520000, length 0x0000cfa4 bytes ... done
Jump to SDRAM 0x80520cb4 [0x10000008, 0x00000000, 0x00000000]
Clear BSS section ... done
Stack: 0x8053edc0
Heap: 0x8053edd0
==================================================================
Wireless Gateway WG4005E Loader V0.06 build Jul 20 2005 18:02:12
Arcadyan Technology Corporation
==================================================================
Copying boot params.....DONE
cpuFreq=240000000 sysFreq=60000000 cntFreq=120000000
Press any key to enter command mode ...
Checking Valid Image in Flash...
Passed.
Unzipping from bfc40000 to 80e00000 ... done
Uncompressed size = 1797316
looking forwards to your posts
crazy_imp