Kernel compile error

Did you make dtbs_install?

I did indeed, as per your instructions. The “wrong” DTB - jh7110-visionfive-v2.dts ended up in /boot/dtbs/new/starfive.
I had to extract, edit and replace the above with the correct value.

Aubrey

1 Like

I’ve got the same problem, recompiled kernel recognize 4GB of memory. I don’t understand how it works, there is only one version of jh7110-visionfive-v2.dtsi in git repo and it has 4GB setting. But if you decompile the dtb file that got installed with “standard” kernel that setting is for 8GB. Where is the magic that change it?

maybe some thing in this file?

1 Like

I (again) had exactly the same problem with the last binary distribution. On decompiling the dtb file, it has the 4GB setting.

Editing to the 8GB setting and recompiling /boot/dbts/starfive/jh7110-visionfive-v2.dtb fixed it.

1 Like

I can’t see how anything in this file can change memory setting. But there is something in u-boot/include/configs/starfive-visionfive2.h:visionfive2_mem_set which appears to modify that value in fdt ->in memory<- before booting linux. At least that is my guess. However if that what it is, it does not work correctly. Or maybe this is not what that code is for.

Edit: I found the following comment in git commit related to the above code "Visionfive2 has a 2/4/8G version. You need to read eeprom information in uboot to obtain the size of mem, and modify the size of mem in linux dts. So this seems to be the right code, however it’s broken.

Edit: I may have figured something. The name of directories (dtbs/starfive) as well as the name of jh7110-visionfive-v2.dtb file are hard-coded in a code responsible for adjusting memory parameter. If you use exact same path and names, during the boot and before loading Linux this dtb file will get adjusted with correct value. If you change the path or the name it will not get adjusted and you’ll have 4GB.

1 Like

I wanted to state at bootup, IT IS DEFINITELY NOT dtbs/starfive/*.dtb that get loaded.
It is /boot/starfive/jh7110-visionfive-v2.dtb