Browse Source

visionfive2: starfive-visionfive2: Added machine config

Added starfive-visionfive2 machine config file and wks file.

Signed-off-by: yang.lee <yang.lee@starfivetech.com>
yang.lee 11 months ago
parent
commit
38f4017df8
2 changed files with 75 additions and 0 deletions
  1. 63 0
      conf/machine/starfive-visionfive2.conf
  2. 12 0
      wic/starfive-visionfive2.wks

+ 63 - 0
conf/machine/starfive-visionfive2.conf

@@ -0,0 +1,63 @@
+#@TYPE: Machine
+#@NAME: VisionFive 2
+#@SOC: JH7110
+#@DESCRIPTION: Machine configuration for the VisionFive 2 default config
+
+require conf/machine/include/riscv/tune-riscv.inc
+
+MACHINE_FEATURES = "screen keyboard ext2 ext3 serial"
+
+SERIAL_CONSOLE = "115200 ttyS0"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-starfive-dev"
+PREFERRED_PROVIDER_virtual/bootloader = "u-boot-starfive"
+
+PREFERRED_VERSION_glibc ?= "2.35"
+PREFERRED_VERSION_gcc ?= "11.3.0"
+PREFERRED_VERSION_binutils ?= "2.38"
+PREFERRED_VERSION_opensbi ?= "1.2"
+
+RISCV_SBI_PLAT = "generic"
+RISCV_SBI_PAYLOAD = "u-boot.bin"
+RISCV_SBI_FDT = "starfive_visionfive2.dtb"
+
+KERNEL_CLASSES = "kernel-fitimage"
+KERNEL_DEVICETREE ?= "starfive/jh7110-visionfive-v2.dtb"
+KERNEL_IMAGETYPE = "fitImage"
+UBOOT_ENTRYPOINT = "0x40200000"
+UBOOT_DTB_LOADADDRESS = "0x46000000"
+UBOOT_RD_ENTRYPOINT = "0x46100000"
+UBOOT_RD_LOADADDRESS = "0x46100000"
+UBOOT_DTB = "1"
+
+INITRAMFS_FSTYPES = "cpio.gz"
+IMAGE_FSTYPES += "wic.gz wic.bmap ext4"
+FIT_KERNEL_COMP_ALG = "none"
+
+EXTRA_IMAGEDEPENDS += "u-boot-starfive"
+
+UBOOT_ENV ?= "boot"
+UBOOT_ENV_SUFFIX = "scr.uimg"
+
+UBOOT_MACHINE = "starfive_visionfive2_defconfig"
+UBOOT_DTB_BINARY = "starfive_visionfive2.dtb"
+
+SPL_BINARY = "spl/u-boot-spl.bin"
+SPL_NORMAL_BINARY = "u-boot-spl.bin.normal.out"
+
+## Do not update fstab file when using wic images
+WIC_CREATE_EXTRA_ARGS ?=  "--no-fstab-update"
+
+WKS_FILE_DEPENDS ?= " \
+	opensbi \
+"
+
+IMAGE_BOOT_FILES ?= " \
+	vf2_uEnv.txt \
+	vf2_nvme_uEnv.txt \
+	starfiveu.fit \
+	fitImage-linux.bin-starfive-visionfive2 \
+	initramfs.img \
+	jh7110-visionfive-v2-starfive-visionfive2.dtb \
+"
+WKS_FILE ?= "starfive-visionfive2.wks"

+ 12 - 0
wic/starfive-visionfive2.wks

@@ -0,0 +1,12 @@
+#short-description: Create SD card image for Starfive VisionFive2
+# long-description: Creates a partitioned SD card image for Starfive VisionFive2.
+
+part spl --source rawcopy  --sourceparams="file=u-boot-spl.bin.normal.out" --part-name spl --offset 2M --size 2M --part-type 2E54B353-1271-4842-806F-E436D6AF6985
+
+part uboot --source rawcopy --sourceparams="file=visionfive2_fw_payload.img" --part-name uboot --offset 4M --size 4M --part-type 5B193300-FC78-40CD-8002-E86C45580B47
+
+part /boot --source bootimg-partition --fstype=vfat --label boot --use-uuid --part-name boot --part-type EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 --align 4096 --size 292M
+
+part /root --source rootfs --fstype=ext4 --part-name root --part-type 0FC63DAF-8483-4772-8E79-3D69D8477DE4 --active --label root --align 4096
+
+bootloader  --ptable gpt