Star64: 4GB on 8GB boards
#1
I have 8 GB of physical memory and I get that on Fishwaldo's image.

When using his kernel, modules and device tree from https://github.com/Fishwaldo/Star64_linux on Armbian https://www.armbian.com/star64/, I get only 4 GB of physical memory.


Code:
root@star64:/usr/src/linux# dmesg | grep Memory
[    0.000000] Memory: 2970040K/4192256K available (10967K kernel code, 7217K rwdata, 4096K rodata, 2189K init, 405K bss, 435784K reserved, 786432K cma-reserved)


Note, in these early days, Fishwaldo's kernel is a must-have way superior over other kernels.

I have not familiarized myself with the ins and outs of the boot process and don't understand where it fails on Armbian and perhaps other distributions.

The easiest workaround is setting the memory requirements to 8GB in the device tree


Code:
root@star64:/usr/src/linux# git diff
diff --git a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtsi b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtsi
index a6517cb4178a..d39e1377db73 100755
--- a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtsi
@@ -47,7 +47,7 @@ cpus {

        memory@40000000 {
                device_type = "memory";
-              reg = <0x0 0x40000000 0x1 0x0>;
+              reg = <0x0 0x40000000 0x2 0x0>;
        };

        reserved-memory {


After applying above patch, rebuild the device tree as usual:


Code:
root@star64:/usr/src/linux# make starfive/jh7110-pine64-star64.dtb
root@star64:/usr/src/linux# cp arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtb /boot/dtb/starfive/jh7110-star64-pine64.dtb
root@star64:/usr/src/linux# reboot


This patch against Fishwaldo's kernel gives me 8 GB of memory on Armbian:


Code:
root@star64:/usr/src/linux# dmesg | grep Memory
[    0.000000] Memory: 7100836K/8386560K available (10967K kernel code, 7217K rwdata, 4096K rodata, 2189K init, 405K bss, 499292K reserved, 786432K cma-reserved)
  Reply
#2
This is due to u-boot not updating the dtb file.
The current flow is
1) uboot reads the eeprom and determines which model you have (4/8gb)
2) uboot finds your dts file through various means (distroboot, extlinux etc)
3) uboot updates the dts file with the correct memory: "fdt memory ${memory_addr} ${memory_size};"
4) uboot "saves" the updated dtb file to /dtbs/${fdtfile}
5) uboot boots the kernel

If your distro doesn't follow the boot process exactly like starfive images, then the above wont happen, and you will be left with 4Gb ram.

You can see the uboot commands executed on boot here:
https://github.com/Fishwaldo/u-boot/blob...r64.h#L141

(also, another thread talked about instability with ethernet - thats also due to uboot commands not executing correctly to setup the ethernet ports - it was a issue on VF2, but doesn't exist on Star64 - until someone "ports" uboot properly to Star64, we are stuck with that).
  Reply
#3
Are there owners of a model with 4GB of RAM ?
  Reply
#4
(07-12-2023, 11:57 PM)balbes150 Wrote: Are there owners of a model with 4GB of RAM ?

Yes, I am an owner of the 4GB model
  Reply
#5
(07-26-2023, 12:33 PM)Gladox114 Wrote:
(07-12-2023, 11:57 PM)balbes150 Wrote: Are there owners of a model with 4GB of RAM ?

Yes, I am an owner of the 4GB model
What systems do you run on your device ? Can you check how much RAM ArmbianTV will show on your model?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Star64 JH7110 (slarm64, riscv64) mara 2 1,062 10-09-2023, 03:43 AM
Last Post: mara
  Star64: GPU firmware loading on Armbian Der Geist der Maschine 13 4,398 09-29-2023, 05:46 PM
Last Post: mara
  Star64: jtag debugging? bluepill 1 941 09-20-2023, 08:26 AM
Last Post: bwooster0
  Star64: SATA Der Geist der Maschine 1 990 07-26-2023, 12:35 PM
Last Post: Gladox114
Information Star64: Armbian Installation Der Geist der Maschine 5 4,300 06-03-2023, 01:26 PM
Last Post: Der Geist der Maschine
  Star64: a first benchmark Der Geist der Maschine 0 998 05-29-2023, 01:00 PM
Last Post: Der Geist der Maschine
  Star64 first boot (and success) bortzmeyer 1 1,572 05-24-2023, 02:45 AM
Last Post: draintroup
  Need help in selecting boards ripcord 1 3,368 03-06-2019, 01:37 PM
Last Post: tllim
  Linking the boards to make a server? Ramlatus 3 6,811 01-27-2018, 01:02 PM
Last Post: 11b2p508
  No HDMI output (don't think the boards are dead) thegooddoctor 15 26,098 07-17-2016, 12:00 PM
Last Post: thegooddoctor

Forum Jump:


Users browsing this thread: 1 Guest(s)