background: 

currently Armbian linux use the 'mainline u-boot' 
https://source.denx.de/u-boot/u-boot
however, it has a '1.5GB' problem in that boards with 1.5GB DRAM is 
detected incorrectly.
It detects 2GB instead possibly due to address wraparound, so the boot 
crashes mid stream.
I'm trying to build a custom u-boot for a 'hack' i.e. to return 1.5GB dram 
from the memory initialization and setup functions. in part to explore 
solutions

what I tried and issues:
I'm building u-boot from
https://source.denx.de/u-boot/u-boot
basically following these instructions
https://docs.u-boot.org/en/latest/board/allwinner/sunxi.html

my shell script ot build u-boot is like
#!/usr/bin/bash 
export BL31=../arm-trusted-firmware/build/sun50i_h616/release/bl31.bin 
make orangepi_zero3_defconfig 
CROSS_COMPILE=aarch64-linux-gnu- make

where the bl31 module from arm-trusted-firmware is in its own directory 
build with
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=sun50i_h616

I did succeed with building u-boot and flashed the u-boot SPL into the sd 
card
sudo dd if=u-boot-sunxi-with-spl.bin of=/de
v/sde bs=1024 seek=8

and it actually boots, but :
U-Boot SPL 2024.04-00757-gbeac958153-dirty (Apr 19 2024 - 12:46:06 +0800)
DRAM: 0 MiB
Trying to boot from MMC1
NOTICE:  BL31: v2.10.0(release):v2.10.0-729-gc8be7c08c
NOTICE:  BL31: Built : 23:11:18, Apr 18 2024
NOTICE:  BL31: Detected Allwinner H616 SoC (1823)
NOTICE:  BL31: Found U-Boot DTB at 0x4a0be348, model: OrangePi Zero3
ERROR:   RSB: set run-time address: 0x10003
U-Boot 2024.04-00757-gbeac958153-dirty (Apr 19 2024 - 12:46:06 +0800) 
Allwinner Technology

size=30, ptr=590, limit=2000: 26370
CPU:   Allwinner H616 (SUN50I)
Model: OrangePi Zero3
DRAM:  0 Bytes

So apparently the DRAM is not detected. I tried tracing flow execution by 
placing 
debug("tag"); or log_info("tag") in 
board_init_f()
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-sunxi/board.c?ref_type=heads#L457
and
sunxi_dram_init()
https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-sunxi/dram_sun50i_h616.c?ref_type=heads#L1377

however, none of my tags are printed, which implies that the initialization 
routines for both the board and sunxi_dram_init() are not called.

I did configure logging to be pretty verbose in .config
# 
# Logging 
# 
CONFIG_LOG=y 
CONFIG_LOG_MAX_LEVEL=8 
CONFIG_LOG_DEFAULT_LEVEL=8 
CONFIG_LOG_CONSOLE=y

I'm not sure what else could be wrong or how to go about it further.


-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/d4c8f022-d793-47cf-a6de-6a79fc7e9cefn%40googlegroups.com.

Reply via email to