Hello
I am trying to get u-boot to boot from ram on the D1s (F133).
I am unsuccessful. Perhaps someone can tell me why?
I follow the guide on
https://linux-sunxi.org/Allwinner_Nezha
As I understand the D1 is very similar to D1s with a few exceptions I care little about for this experiment.
(I am missing something critical?)
I build the Opensbi and I can try loading the fw_jump.bin with
xfel ddr f133
xfel write 0x43100000 fw_jump.bin
xfel exec 0x43100000
Serial output
ZQ value = 0x2e***********
get_pmu_exist() = 4294967295
ddr_efuse_type: 0xa
[AUTO DEBUG] single rank and full DQ!
ddr_efuse_type: 0xa
[AUTO DEBUG] rank 0 row = 13
[AUTO DEBUG] rank 0 bank = 4
[AUTO DEBUG] rank 0 page size = 2 KB
DRAM BOOT DRIVE INFO: %s
DRAM CLK = 528 MHz
DRAM Type = 2 (2:DDR2,3:DDR3)
DRAMC read ODT off.
DRAM ODT off.
ddr_efuse_type: 0xa
DRAM SIZE =64 M
DRAM simple test OK.
OpenSBI v1.2-94-gc6a092c
Build time: 2023-03-30 00:02:21 +0200
Build compiler: gcc version 12.2.0 (Debian 12.2.0-13)
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|___/_____|
| |
|_|
Platform Name : Allwinner D1s
Platform Features : medeleg
Platform HART Count : 1
Platform IPI Device : aclint-mswi
Platform Timer Device : aclint-mtimer @ 24000000Hz
Platform Console Device : uart8250
Platform HSM Device : ---
Platform PMU Device : ---
Platform Reboot Device : sunxi-wdt-reset
Platform Shutdown Device : ---
Platform Suspend Device : ---
Firmware Base : 0x43100000
Firmware Size : 360 KB
Firmware RW Offset : 0x40000
Runtime SBI Version : 1.0
Domain0 Name : root
Domain0 Boot HART : 0
Domain0 HARTs : 0*
Domain0 Region00 : 0x0000000014000000-0x000000001400ffff M: (I,R,W) S/U: ()
Domain0 Region01 : 0x0000000043140000-0x000000004315ffff M: (R,W) S/U: ()
Domain0 Region02 : 0x0000000043100000-0x000000004313ffff M: (R,X) S/U: ()
Domain0 Region03 : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X)
Domain0 Next Address : 0x0000000080200000
Domain0 Next Arg1 : 0x0000000082200000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Domain0 SysSuspend : yes
Boot HART ID : 0
Boot HART Domain : root
Boot HART Priv Version : v1.11
Boot HART Base ISA : rv64imafdcvx
Boot HART ISA Extensions : time
Boot HART PMP Count : 8
Boot HART PMP Granularity : 2048
Boot HART PMP Address Bits: 38
Boot HART MHPM Count : 0
Boot HART MIDELEG : 0x0000000000000222
Boot HART MEDELEG : 0x000000000000b109
So something looks ok. My next step is to build the u-boot from GitHub - smaeul/u-boot: Patches include sunxi platform support and various driver fixes -branch d1-wip.
I build it like this. fw_dynamic.bin from the opensbi build above
make CROSS_COMPILE=riscv64-linux-gnu- nezha_defconfig
make CROSS_COMPILE=riscv64-linux-gnu- OPENSBI=fw_dynamic.bin
Then I load it like
xfel ddr f133
xfel write 0x43100000 u-boot-sunxi-with-spl.bin
xfel exec 0x43100000
Here I am stuck. I have tried to use a DT for sun20i-d1s-mangopi-mq, but still nothing. No output on the serial console.
What is the correct address to load for this experiment with the xfel tool? Is there a DT for the d1s-mangopi that should be a better fit? All I want initially is to just get u-boot to boot from RAM.
Thanks for any help!