Open
Description
Hi, I have a problem with the u-boot shipped with Ubuntu and Debian images. I have a stock of Orange Pi Zero 3 with 2GB of RAM and this is happening on the batch 24-01 (I don't know if it is important but I would like to specify it). The problem is that u-boot is detecting 4GB of RAM almost at every boot and this then breaks the system. From the serial output I get the log below. Do you think there is a way to fix the issue or even to hardcode the size? I had this problem with also the previous version of u-boot since the ubuntu image was updated last October. Also, the u-boot in SPI, version 2018.05, always detects the correct amount.
U-Boot SPL 2024.01-orangepi (Sep 12 2024 - 11:08:27 +0800)
DRAM base address is defined as 0x40000000
DRAM has 16 b/raw, 10 b/col, 4 B/width, 2 #rank and 8 #bank
DRAM top address must be less than 0x100000000
DRAM: 4096 MiB
Trying to boot from MMC1
NOTICE: BL31: v2.11.0(debug):0631d68d8
NOTICE: BL31: Built : 13:56:00, Sep 10 2024
NOTICE: BL31: Detected Allwinner H616 SoC (1823)
NOTICE: BL31: Found U-Boot DTB at 0x4a0b2aa8, model: OrangePi Zero3
INFO: ARM GICv2 driver initialized
INFO: Configuring SPC Controller
INFO: Probing for PMIC on I2C:
INFO: PMIC: found AXP313
INFO: BL31: Platform setup done
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: CPU workaround for erratum 855873 was applied
INFO: BL31: cortex_a53: CPU workaround for erratum 1530924 was applied
INFO: PSCI: Suspend is unavailable
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x4a000000
INFO: SPSR = 0x3c9
INFO: Changed devicetree.
U-Boot 2024.01-orangepi (Sep 12 2024 - 11:08:27 +0800) Allwinner Technology
CPU: Allwinner H616 (SUN50I)
Model: OrangePi Zero3
DRAM: 4 GiB
Core: 57 devices, 25 uclasses, devicetree: separate
WDT: Not starting watchdog@30090a0
MMC: mmc@4020000: 0
Loading Environment from FAT... Unable to use mmc 0:1...
In: serial@5000000
Out: serial@5000000
Err: serial@5000000
Allwinner mUSB OTG (Peripheral)
Net: eth0: ethernet@5020000using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
MAC de:ad:be:ef:00:01
HOST MAC de:ad:be:ef:00:00
RNDIS ready
, eth1: usb_ether
starting USB...
Bus usb@5200000: USB EHCI 1.00
Bus usb@5200400: USB OHCI 1.0
scanning bus usb@5200000 for devices... 1 USB Device(s) found
scanning bus usb@5200400 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3636 bytes read in 3 ms (1.2 MiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
173 bytes read in 2 ms (84 KiB/s)
39931 bytes read in 5 ms (7.6 MiB/s)
Working FDT set to 4fa00000
452 bytes read in 3 ms (146.5 KiB/s)
Applying kernel provided DT overlay sun50i-h616-ph-i2c3.dtbo
4203 bytes read in 4 ms (1 MiB/s)
Applying kernel provided DT fixup script (sun50i-h616-fixup.scr)
## Executing script at 45000000
18428387 bytes read in 763 ms (23 MiB/s)
9368071 bytes read in 389 ms (23 MiB/s)
Uncompressing Kernel Image
Moving Image from 0x40080000 to 0x40200000, end=41800000
## Loading init Ramdisk from Legacy Image at 4ff00000 ...
Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 18428323 Bytes = 17.6 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
Booting using the fdt blob at 0x4fa00000
Working FDT set to 4fa00000
Loading Ramdisk to 48e6c000, end 49fff1a3 ... OK
Loading Device Tree to 0000000048df9000, end 0000000048e6bfff ... OK
Working FDT set to 48df9000
Metadata
Metadata
Assignees
Labels
No labels
Activity
tmoore22 commentedon Nov 21, 2024
@Ripper346 thanks for the hint ;)
reverse this patch in u-boot: https://github.com/armbian/build/blob/cc4513958fb01d0fcdafe96144d2da76bcd51427/patch/u-boot/u-boot-sunxi/opizero3-1.5GB-trim-from-u-boot-v2024.01.patch#L64
just restore the "return" instead of "size =" and the code flow works without 1.5G detection... more stable for me!
Ripper346 commentedon Nov 22, 2024
@tmoore22 after doing the patch, how do you build the new u-boot? I tried with
make orangepi_zero3_defconfig; make all
but I don't know then what to do with all the files it makes. I tried also with the orangepi-build tool but it failstmoore22 commentedon Nov 23, 2024
Ripper346 commentedon Nov 23, 2024
Thanks @tmoore22, I already set the BL31 and I don't need the cross-compilation since I was directly compiling in the oPi zero 3 to be sure (and prior I tried also on a oPi 5B). Via
make
I am able to finish the compilation but I don't know what to do with all the files that it generates. My objective is to substitute the u-boot in the ubuntu image/TF and after themake
I thought that I had the new boot folder to replace but it seems this isn't the case.ColumKam commentedon Feb 17, 2025
有一个可行方法,在 scripts/compilation.sh 中做如下修改:
git diff :
观察报错是与 ccahe 的使用相关,直接移除掉能编译成功的。