Browse Source

jh8100: starfive-jh8100: Added machine config

Added starfive-jh8100 machine config file and wks file.

Signed-off-by: yang.lee <yang.lee@starfivetech.com>
yang.lee 8 months ago
parent
commit
c110cffeaa
2 changed files with 80 additions and 0 deletions
  1. 70 0
      conf/machine/starfive-jh8100.conf
  2. 10 0
      wic/starfive-jh8100.wks

+ 70 - 0
conf/machine/starfive-jh8100.conf

@@ -0,0 +1,70 @@
+#@TYPE: Machine
+#@NAME: starfive-jh8100
+#@SOC: JH8100
+#@DESCRIPTION: Machine configuration for the JH8100 default config
+
+require conf/machine/include/riscv/tune-riscv.inc
+
+EXTRA_IMAGEDEPENDS:append = " qemu-helper-native:do_addto_recipe_sysroot"
+IMAGE_CLASSES += " qemuboot "
+QB_MACHINE = "-machine virt"
+QB_DEFAULT_KERNEL = "Image-starfive-jh8100.bin"
+QB_CPU = "-cpu rv64"
+QB_MEM = "-m 8G"
+QB_DEFAULT_FSTYPE = "ext4"
+SERIAL_CONSOLES = "115200;ttyS0"
+QB_SYSTEM_NAME = "qemu-system-riscv64"
+QB_ROOTFS_OPT = "-drive file=@ROOTFS@,format=raw,id=hd0 -device virtio-blk-device,drive=hd0"
+
+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"
+
+LLVMVERSION = "14.0.0"
+GLIBCVERSION = "2.36"
+BINUVERSION = "2.39"
+GCCVERSION = "12.2.0"
+QEMUVERSION = "7.2.0"
+PREFERRED_VERSION_opensbi ?= "1.2"
+PREFERRED_VERSION_xserver-xorg = "1.20.13"
+PREFERRED_VERSION_mbedtls = "3.4.0"
+PREFERRED_PROVIDER_dhcp-relay = "dhcp"
+PREFERRED_PROVIDER_nodejs = "18.0.0"
+
+RISCV_SBI_PLAT = "generic"
+#RISCV_SBI_PAYLOAD = "u-boot.bin"
+#RISCV_SBI_FDT = "jh8100-fpga.dtb"
+
+IMAGE_FSTYPES += " ext4 wic.gz wic.bmap cpio cpio.gz"
+
+KERNEL_DEVICETREE ?= "starfive/jh8100-fpga.dtb"
+KERNEL_IMAGETYPE = "Image"
+
+FIT_KERNEL_COMP_ALG = "none"
+
+EXTRA_IMAGEDEPENDS += " u-boot-starfive openocd-native"
+
+UBOOT_ENV ?= "boot"
+UBOOT_ENV_SUFFIX = "scr.uimg"
+
+UBOOT_MACHINE = "starfive_jh8100_defconfig"
+UBOOT_DTB_BINARY = "jh8100-fpga.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 \
+	bmap-tools-native \
+"
+IMAGE_BOOT_FILES ?= " \
+        jh8100-fpga.dtb \
+	Image \
+"
+WKS_FILE ?= "starfive-jh8100.wks"

+ 10 - 0
wic/starfive-jh8100.wks

@@ -0,0 +1,10 @@
+#short-description: Create SD card image for Starfive Duhbe
+# long-description: Creates a partitioned SD card image for Starfive Dubhe.
+
+#boot partition
+part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 1024 --size=200M --use-uuid
+
+#root partition
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 1024 --size=2G --use-uuid
+
+bootloader --append "rootwait console=ttyS0,115200"