TP Link XX230v (EU) V1.0

@Rondom i attemp write uboot to nand and now return PANIC on bootlaoder load, do you know how I can load the stock bootloader directly from memory?

EN7523DRAMC V0.2
dram_type = 5, speed = 1866
Final Impdance Cal Result: OCDP:0x1b, OCDN:0x1e, ODTP:0xa, ODTN:0xa
DDR1866 PLL setting init
[Dramc] PCDDR3 AC Timing update 
Fire MRW command...
ModeReg.2, value.0x20 done
Fire MRW command...
ModeReg.3, value.0x0 done
Fire MRW command...
ModeReg.1, value.0x6 done
Fire MRW command...
ModeReg.0, value.0x1114 done
Fire MRW command...
ModeReg.1, value.0x86 done
Fire MRW command...
ModeReg.1, value.0x6 done
Calculate size.
DRAM size=256MB
PANIC at PC : 0x08000b5b

Have you written your own U-Boot or the U-Boot from before? If you upload the exact same 512 KiB as before and it is correctly written, then everything should be as before and I do not understand why you get the panic.

For development and if you are not working on low-level init code, it can also be very convenent way of working is to load the new U-Boot via xmodem or TFTP and chainload it from an existing U-Boot.

https://github.com/Ansuel/atf-airoha/ expects a FIP and executes it directly. As far as I know it has not been tested on en7523/29/62

I wrote my own U-Boot, based on the iowrt work. I was successfully booting it from the stock uboot, but I wanted to test it by writing directly to the NAND. After I wrote it, it got stuck in this.

I tried using the xmodem method, but it seems to be prioritizing the NAND U-Boot. I tested it with the 512 KiB backup I had, with the firmware I had, but nothing worked.

I used the prebuild files (bl2, bl31) that came with the GPL, and my NAND programmer burned out last week, so I'll have to buy another one when I can to reflash the NAND. I don't even know when I'll be able to get another one, seriously.

for now, I'll try to recover it using xmodem

Fist 512Kib

Press x
CCC
*** file: fip.fip
$ sx fip.fip
Sending fip.fip, 4080 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent: 1008/126kRetry 0: Cancelled

Transfer incomplete

*** exit status: 128 ***

EN7523DRAMC V0.2
dram_type = 5, speed = 1866
Final Impdance Cal Result: OCDP:0x1b, OCDN:0x1e, ODTP:0xa, ODTN:0xa
DDR1866 PLL setting init
[Dramc] PCDDR3 AC Timing update 
Fire MRW command...
ModeReg.2, value.0x20 done
Fire MRW command...
ModeReg.3, value.0x0 done
Fire MRW command...
ModeReg.1, value.0x6 done
Fire MRW command...
ModeReg.0, value.0x1114 done
Fire MRW command...
ModeReg.1, value.0x86 done
Fire MRW command...
ModeReg.1, value.0x6 done
Calculate size.
DRAM size=256MB
PANIC at PC : 0x08000b5b


bl2-only-for-recovery.fip:

CCCCC
*** file: bl2-only-for-recovery.fip
$ sx bl2-only-for-recovery.fip
Sending bl2-only-for-recovery.fip, 955 blocks: Give your local XMODEM receive command now.
Bytes Sent: 122368   BPS:8504                            

Transfer complete

*** exit status: 0 ***

EN7523DRAMC V0.2
dram_type = 5, speed = 1866
Final Impdance Cal Result: OCDP:0x1b, OCDN:0x1e, ODTP:0xa, ODTN:0xa
DDR1866 PLL setting init
[Dramc] PCDDR3 AC Timing update 
Fire MRW command...
ModeReg.2, value.0x20 done
Fire MRW command...
ModeReg.3, value.0x0 done
Fire MRW command...
ModeReg.1, value.0x6 done
Fire MRW command...
ModeReg.0, value.0x1114 done
Fire MRW command...
ModeReg.1, value.0x86 done
Fire MRW command...
ModeReg.1, value.0x6 done
Calculate size.
DRAM size=256MB
PANIC at PC : 0x08000b5b



only --soc-fw and --nt-fw

$ sx fip_bl31_bl33.fip
Sending fip_bl31_bl33.fip, 946 blocks: Give your local XMODEM receive command now.
Bytes Sent: 121216   BPS:8408                            

Transfer complete

*** exit status: 0 ***

Looking at your video, I see that you the file you are trying to upload is too big. I think the limit for BL2 is a bit less than 128K. The bootloader can only use the SRAM on the chip and the BL2 that will get loaded and executed will initialise the DRAM. It seems like the file you uploaded is around 510 KB which is too much. You need to remove everything but BL2 from your file using fiptool as instructed in my forum post..

EDIT: ah I see. You are doing it correctly with bl2-only-for-recovery.fip in the post above and there are still issues.

I think disassembling to debug this is not worth it. Let’s wait until we have managed to get an open-source ATF running which we can compile with higher log levels.