jh7110 visionfive2 linux uboot debian rtl8188ftv-下载到 sdcard

时间:2024-04-28 07:20:31
sudo sgdisk -z -og /dev/sdc
sudo sgdisk --clear \
--set-alignment=2 \
--new=1:4096:8191 --change-name=1:spl --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \
--new=2:8192:16383 --change-name=2:uboot --typecode=2:BC13C2FF-59E6-4262-A352-B275FD6F7172 \
--new=3:16384:1654784 --change-name=3:boot --typecode=3:EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 \
--new=4:1654785: --change-name=4:rootfs \
/dev/sdc

sudo mkfs.ext4 /dev/sdc3

nano extlinux.conf

extlinux.conf:

default hhh

label hhh
    kernel /Image.gz
    fdt /jh7110-starfive-visionfive-2-v1.3b.dtb
    append root=/dev/mmcblk1p4 rw
sudo dd if=u-boot/spl/u-boot-spl.bin.normal.out of=/dev/sdc1 bs=512
sudo dd if=u-boot/u-boot.itb of=/dev/sdc2 bs=512
sudo dd if=rootfs.img of=/dev/sdc4 bs=512
sync

sudo mount /dev/sdc3 /mnt/
sudo mkdir /mnt/extlinux
sudo cp extlinux.conf /mnt/extlinux/
sudo cp linux/arch/riscv/boot/Image.gz /mnt/
sudo cp linux/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb /mnt/
sudo umount /mnt