I'm trying to install OpenWRT on my MR18 using the JTAG method with RPI. The serial connection works fine, I can halt and resume the boot process.
Although I issue exactly the same commands as the guide described I got some issues and the OpenWRT image doesn't load:
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
load_image openwrt-ar71xx-nand-mr18-initramfs-kernel.bin 0x8005FC00
mini program did not return to start
6353004 bytes written at address 0x8005fc00
downloaded 6353004 bytes in 34.503567s (179.811 KiB/s)
target halted in MIPS32 mode due to debug-request, pc: 0x00000000
verify_image openwrt-ar71xx-nand-mr18-initramfs-kernel.bin 0x8005FC00
reg r4 0
r4 (/32): 0x00000000
reg r5 0
r5 (/32): 0x00000000
reg r6 0
r6 (/32): 0x00000000
reg r7 0
r7 (/32): 0x00000000
resume 0x80060000
failed to restore 128 bytes of working area at address 0x81000000
target halted in MIPS32 mode due to target-not-halted, pc: 0x80060000
target halted in MIPS32 mode due to target-not-halted, pc: 0x80060000
I can see that something isn't correct during the copy process "mini program did not return to start" , even though it says downloaded, but I cannot understand what goes wrong.
I believe you have some communication problem between rpi and mr18.
Too many targets halted in MIPS32 ....
In particular
was an error that did not allow me to enter debug mode and communicate with mr18.
I can't tell you more as. I used that guide but with usb-blaster, DLC 5 and wiggler unbuffer cables. All successfully with many mr18.
I've checked every wire, the soldering and even I made a new Raspbian install and still the same issue. I tried to lower the adapter speed too and tweaking different settings with no success.
It looks to me it has a problem with the RPI 4 Model B board. I will check it with an RP3 later.
I used a Raspberry Pi Zero W, but @vuhuy suggested to other users that were having issues to check proper timings for the specific Raspberry Pi being used
i use a Raspberry Pi B+ and everything worked fine (i see the OpenWRT linux booting in the serial console) till i have to connect my notebook to the device, because i cant open the website of OpenWRT. i didnt get any IP address, so i changed to manual IP address, but that didnt help either.
i wonder is it because i halted the booting too early or too late. first i thought the ethernet port is broken, but both of the LEDs are blinking.
Unfortunately, no. I didn't have a chance to get another board to test it. It doesn't work with my RPI 4 Model B.
If you can manage to flash it, please share
I managed to get another version of Rpi. I this case, it was Rpi 3B. Changing the values in the config file, the same kind of problems appears, or even worst.. as It fails before I can load the image to the MR18. I checkd all the cables, double-soldered links... but no luck at all.
Now, I'm looking for somebody in Europe who could flash my device, but I'm not having any lock at all. I don't know what else to try.
Well, some minutes ago I managed to resold all the wires and I got a good connecion to MR18. Now My problem is the last command: resume 0x80060000. The AP terminal doesn,t show any activity. Sometimes a pair of strange symbols, but nothing else. In troubleshooting, the gide says to repeat the comands halt and resume... but I'm not being lucky. I tried multiple times, while stoping the AP in different moments, but I can't find the way to load openwrt kernel.
Anyway, If I get tired of trying this way, maybe I will use your methid, as it seems to be quite cheap,and I cant's spend more money.
You have to stop the AP as soon as possible, immediately.
If "resume 0x80060000" doesn't work the first time, give the halt command, reset the registers again and again "resume 0x80060000". This for 2/3 times. If it doesn't work, repeat everything from the beginning.
I have flash many mr18. All the first time it didn't work. But all 2/3 times successfully.
Yesterday I tried for the very last time, and I got it working. I think the trick was to stop it in the very very begginning. Once done, all steps are just quite easy.
Attempted the JTAG procedure 21 times (yes .. I counted ...).
Worked like a charm the 22nd !!!!
Just wanted to share where I had to halt the MR18 boot . It seems that it is the key factor for upgrade with success.
(too soon, can't even properly load image,
too late get either errors; or random characters)
I also skipped the verify image; as it appears to resume sometimes the device, but no proof of that.
I had the same issue and couldn't figure out the cause and thought my pi or some other device was at fault. While testing it with another pi I attached the Pi's ground directly to the JTAG ground as UART was running on another pi and was working. Worked straight away. Tried it on my initial pi with ground and worked on the first try.
Maybe this should be added or at least mentioned that proper grounding is very important.
I'm geting "ecc unrecoverable error" during flash write and it doesn't work, I think nand has problem with ecc correction did someone try to use nandwrite or nanddump to write openwrt image, I think when used standart method it doesn't handle ecc errors.