orangepi-xunlong / orangepi-build

Orange Pi build for H2+, H3, H5, H6, H616, RK3328, RK3399 and RK3588(s)
http://www.orangepi.cn/
GNU General Public License v2.0
643 stars 273 forks source link

How to compile an image for Orange Pi Zero 3 4Gb? #101

Open ShohninDmitriy opened 10 months ago

ShohninDmitriy commented 10 months ago

According to the instructions of OrangePi_Zero3_H618_user manual_v1.2, I compile a full image with the 5.4 kernel, the board starts but the real memory is only 2.47 Gb.

2023-09-17_21-46-11

I download the OS image of the official website, everything is fine with the memory there, all 4Gb.

2023-09-17_21-42-16

And with the fully compiled kernel version 6.1, my board did not start at all, it output to the console

U-Boot SPL 2021.07-orangepi (Aug 24 2023 - 19:39:25 +0300)
DRAM: 4096 MiB
Trying to boot from MMC1

I decided to check downloaded the OS image of the official website version 1-2 Gb kernel version 6.1 and got the same error

U-Boot SPL 2021.07-orangepi (Aug 24 2023 - 19:39:25 +0300)
DRAM: 4096 MiB
Trying to boot from MMC1

I download the OS image of the official website, the 4 Gb version with the 6.1 kernel version, the board starts up quietly.

What am I doing wrong and why is the 2Gb version always compiled when selecting the compilation menu for the version with 1/2/4 Gb memory.

Sorry for my English

ppsaheed commented 10 months ago

In many cases, the recognition of RAM is handled by the device tree configuration. Ensure that your device tree configuration (usually found in the kernel source) is correctly set to support 4GB of RAM. It's possible that the configuration for the compiled image is specifying the wrong memory size.

Make sure that you are using the correct toolchain and compiler flags for your Orange Pi Zero 3. Using the wrong compiler or flags can lead to compatibility issues.

The U-Boot bootloader plays a crucial role in the boot process and memory detection. Ensure that the U-Boot configuration is set up correctly to recognize and initialize the full 4GB of RAM.