Method 2: Adding Startup Item
To replace dtb file by adding a startup item, perform the following:
-
Execute the following commands under the root directory of Linux:
sudo cp arch/riscv/boot/dts/starfive/<dtb_file> <Mount_Direcotry>/boot/dtbs/
Tip:-
<dtb_file> refers to the dtb file name. Different boards use different dtb files. For more information, see dtb Files table in this document.
-
<Mount_Directory> refers to the actual mount directory. For
example,
/media/jianlong
.
Example Command:
sudo cp arch/riscv/boot/dts/starfive/jh7100-starfive-visionfive-v1.dtb /media/jianlong/__boot/dtbs/
-
-
Enter SD card mount directory:
cd <Mount_Direcotry>/__boot
Tip:<Mount_Directory> refers to the actual mount directory. For example,
/media/jianlong
. -
Update grub.cfg:
sudo gedit grub.cfg
-
Add the following command lines, save and exit:
menuentry 'MY Fedora vmlinux-5.14.0+' { linux /vmlinuz-5.14.0+ ro root=UUID=f852f7f6-aa4e-4404-8ea9-439568b767a1 rhgb console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 LANG=en_US.UTF-8 devicetree /dtbs/<dtb_File> initrd /initramfs-<Kernel_Version>.img }
Tip:In these command lines:
-
<dtb_file> refers to the dtb file name. Different boards use different dtb files. For more information, see dtb Files table in this document.
-
<Kernel_Version>: the kernel version number. For example,
5.14.0+
. - MY Fedora vmlinux-5.14.0: Configurable menu item name.
-
-
When the grub menu occurs, select the menu item set in the previous step, for example,
MY Fedora vmlinux-5.14.0+, during startup.
Tip: Multiple startup items can be added according to the actual number of dtb files.