However, I don’t even have such case when X equals to 0, look:
➜ ~ sudo fdisk /dev/mmcblk0
[sudo] password for user:
Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
fdisk: cannot open /dev/mmcblk0: No such file or directory
What can I do ? How can I communicate with my mmcblk0.
flashcp to which one? or both mtd1 and mtd2?
flashcp -v visionfive2_fw_payload.img /dev/mtd1
The reason why? I’ve got both uboot-env and uboot.
As long as you keep it in the same kernel major version, you can boot different OSes from NVME and/or SD. Just set to QSPI-Flash (0,0 on RPIO). Partitions 1-3 are the same as with one OS. Part4 then has OS1, Part5 has OS2 etc.
Just add entries to /boot/extlinux/extlinux.conf and you have two possibilities to choose which OS to boot:
change default entry in extlinux.conf and then reboot
have an USB2Serial attached and select via keyboard.
Important: kernel image and initial ramdisk must have different names between the OSes.
If you switch the system off while in this configuration and insert an SD, it boots from that one.
Thank you very much as well. Now, I’m able to have both successfully boot. However, as you suggested, I’ll have to manually edit that particular file under /boot, which is … Hmmm… I think this is quite similar to grub, which is now under my SD card.
One additional question, I can tell a noticable speed drop by changing fromSD to nvme. This is really out of my expectation.
Anyway, now it’s the time to build the system from source/scratch.
Well, NVME is not at speeds it would be on a x86 motherboard but for me it’s at ~200 MB/s whereas the SD is at 25-30 MB/s. Perhaps there is some kind of an issue of this particular PCIe controller of the VF2 and your NVME?
Grub has the same issue…at that time it is run, there is no HDMI and keyboard. So USB2Serial is needed anyway.
Ensure the SBC’s boot dip switches are at their default manufacturer settings.
Do a manufacturer wipe of the nvme to ensure it truly is wiped. It helps ensure a smooth running of the new img on a used nvme. Ensure no mountpoints are mounted on that nvme beforehand.
Dd the img to the nvme from any intel linux box. Ensure no mountpoints are mounted on that nvme beforehand.
Use gparted on the nvme to 1) fix the table (click yes) and 2) resize the last(root) partition to take up all the remaining capacity of the drive (right-click “btrfs root” and click “resize”).
Finally, install the nvme on the SBC and take out your sdcard. Power up, it should just magically boot to the nvme. The default boot order is to boot from the sdcard, if it’s not there then try the nvme if it’s there.
So I have to remove the nvme drive from the VF2 and mount it on a USB M,2 NMVE enclosure to dd the starfive-jh7110-VF2-515-3.8.2-nvme-minimal-desktop-wayland.img to /dev/nvme0n1? Can I just unmount the nvme and dd it from the VF2 directly to the nvme?
before doing that, do the other stuff I mentioned.
also use gparted on the nvme to fix the table and resize the last(root) partition to take up all the remaining capacity of the drive.
It is best you take out the nvme. Please use gparted which is a gui much easier to deal with the nvme with. Yes there is an equivalent command to resize the nvme btrfs partition, but I honestly don’t want to crack my head trying to recall that. If you run gparted with your nvme, it will show you in its detailed entirety what cli command it ran to do it when you expand its treeview displaying its output. I hope this helps.
if you want to dd from the vf2 directly, you can boot from sdcard that flashed SDK and then you can mount nfs where have your starfive-jh7110-VF2-515-3.8.2-nvme-minimal-desktop-wayland.img, finally, use command
dd if=***.img of=/dev/nvme0n1 bs=4096 && sync