Comments (11)
Hi,
If anyone still experience this type of bug even with updated softwares, this is what I was adviced to do when fixed mine:
- Decompile your source dtb:
cd /tmp; dtc -I dtb -O dts /sys/firmware/fdt -o vf2.dts
# on system booted up, or place path to your dtb in place of/sys/firmware/fdt
. Ignore any warnings it produces. Ifdtc
tool is not installed, try installing it:apt install device-tree-compiler
or how dtc is named in your distro. Alternatively,dtc
from Linux kernel tree also can be used (you have to runmake menuconfig
first to produce executable). - Edit vf2.dts: Find section which starts with
memory@4
. Your line of interest isreg = <0x00 0x40000000 0x01 0x00>;
orreg = <0x00 0x40000000 0x1 0x00>;
. You shall replace it withreg = <0x00 0x40000000 0x02 0x00>;
. Notice0x02
and not0x01
. - Compile file back:
dtc -I dts -O dtb -o /boot/dtbs/starfive/vf2.dtb vf2.dts
. Again, if no errors and only warnings, you're good to go. - Boot with modified
vf2.dtb
: in U-Boot prompt you might want tosetenv fdtfile starfive/vf2.dtb
followed bysaveenv
. YMMV.
It worked fine for me this way.
from visionfive2.
The problem is visionfive2_mem_set is only run for bootcmd_distro (which AFAICT nothing actually runs, since boot_targets its "mmc0 dhcp") via set_fdt_distro. Neither bootcmd_mmc0 nor bootcmd_dhcp call it.
The whole set of U-Boot scripts seems like a mess. Hopefully upstreaming cleans this up to be sane (and adds both USB and PCIe support...).
from visionfive2.
Hello @electrorys
you are correct the default U-boot env. has an issue with the correct RAM size.
from visionfive2.
@electrorys @dtometzki
Is there a quick fix for this until the next debian image release ?
from visionfive2.
Hello,
with an update of u-boot and opensbi and the new Debian Image 69 the issue is solved.
from visionfive2.
Thanks for your answer.
With u-boot and opensbi updated (flashcp x 2) and the minimal Debian Image 69, I only see 4GB.
Is there a u-boot parameter I can set manually ?
from visionfive2.
Hello,
do you used the both files from here to flash https://github.com/starfive-tech/VisionFive2/releases/tag/VF2_v2.5.0 ?
from visionfive2.
Yes.
from visionfive2.
@electrorys
Excellent. It works!!! Decompiling and recompiling the dtb file was enough. I now see 8GB instead of 4GB.
Thank you so much.
from visionfive2.
You need a 3rd FAT boot partition with uEnv.txt
to change the
boot_targets=distro mmc0 dhcp
to have bootcmd_distro
called for this to work. It's a problem that
visionfive2_mem_set
isn't called regardless of which boot target is used- the
uEnv.txt
is loaded only from a 3rd FAT partition, which doesn't allow a normal partitioning (single Linux partition)
fw_printenv
and fw_setenv
can be used to check and change the U-Boot environment on SPI flash, but the /dev/mtd*
device and location of the environment needs to be known and set up in /etc/fw_env.config
.
from visionfive2.
Hi, If anyone still experience this type of bug even with updated softwares, this is what I was adviced to do when fixed mine:
1. Decompile your source dtb: `cd /tmp; dtc -I dtb -O dts /sys/firmware/fdt -o vf2.dts` # on system booted up, or place path to your dtb in place of `/sys/firmware/fdt`. Ignore any warnings it produces. If `dtc` tool is not installed, try installing it: `apt install device-tree-compiler` or how dtc is named in your distro. Alternatively, `dtc` from Linux kernel tree also can be used (you have to run `make menuconfig` first to produce executable). 2. Edit vf2.dts: Find section which starts with `memory@4`. Your line of interest is `reg = <0x00 0x40000000 0x01 0x00>;` or `reg = <0x00 0x40000000 0x1 0x00>;`. You shall replace it with `reg = <0x00 0x40000000 0x02 0x00>;`. Notice `0x02` and not `0x01`. 3. Compile file back: `dtc -I dts -O dtb -o /boot/dtbs/starfive/vf2.dtb vf2.dts`. Again, if no errors and only warnings, you're good to go. 4. Boot with modified `vf2.dtb`: in U-Boot prompt you might want to `setenv fdtfile starfive/vf2.dtb` followed by `saveenv`. YMMV.
It worked fine for me this way.
Having tried different images for a board with 8GB of memory, with a native bootloader, 4GB is always available, so I made an overlay file to configure the 8GB memory
from visionfive2.
Related Issues (20)
- ERROR: No hash found for gcc-12.2.0.tar.xz HOT 1
- U-Boot boot_targets set to only mmc0 dhcp HOT 28
- Python3 module not found: 'zlib' HOT 1
- "nftables" and "Set up additional Binary formats" fails to start in kernel boot procedure #bug
- The release tag kernel compilation of StarFive v3.1.5 source tree in Debian-202306-image produces a completely broken kernel HOT 9
- No Ethernet over USB support in the VisionFive2 kernel HOT 1
- Boot from NVMe is broken with "upstream" u-boot and "upstream" kernel HOT 1
- Version 3.4.5 visionfive2_fw_payload.img too large? HOT 6
- Booting from UART is extremely inconsistent
- No tun interface in the distribution? HOT 1
- NIC driver HOT 1
- vf2 can't boot HOT 1
- VisionFive 2 with 8GB failing to boot after flashing v3.6.1 HOT 4
- Boot from USB is broken with "upstream" u-boot (2023.10-rc4+) HOT 8
- Cold boot SD Card is fine but warm boot is shutdown instead HOT 6
- No Linux bridge or veth drivers on the distribution HOT 1
- How to resize the SPL partition to 40000 from the 20000 in QSPL flash
- what dose "Support BT function for WIFI/BT dongle AIC8800" mean in 3.8.2 release? HOT 1
- QEMU fails to boot
- Specific image does not boot after SPL and U-Boot update to v3.8.2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from visionfive2.