@@ -77,6 +77,7 @@ BBMULTICONFIG = " \
rpi-arm-v7l-bullseye \
rpi-arm64-v8-bullseye \
sifive-fu540-sid-ports \
+ starfive-visionfive2-sid-ports \
qemuarm64-focal \
qemuamd64-focal \
"
new file mode 100644
@@ -0,0 +1,29 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+DISTRO_ARCH = "riscv64"
+
+KERNEL_NAME ?= "starfive"
+
+PREFERRED_PROVIDER_u-boot-starfive-visionfive2 = "u-boot-starfive-visionfive2"
+
+IMAGE_FSTYPES ?= "wic"
+
+WKS_FILE ?= "starfive-visionfive2.wks.in"
+IMAGER_INSTALL += " \
+ jh7110-u-boot-spl-image \
+ visionfive2-u-boot-firmware \
+ ${SYSTEMD_BOOTLOADER_INSTALL}"
+IMAGER_BUILD_DEPS += " \
+ jh7110-u-boot-spl-image \
+ visionfive2-u-boot-firmware"
+
+IMAGE_INSTALL += "sshd-regen-keys"
+IMAGE_INSTALL += "expand-on-first-boot"
+
+# DTB file for OpenSBI
+DTB_UBOOT_JH7110_VF2 = "starfive_visionfive2.dtb"
+# DTB file for booting
+DTB_FILES = "starfive/jh7110-visionfive-v2.dtb"
new file mode 100644
@@ -0,0 +1,7 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+MACHINE = "starfive-visionfive2"
+DISTRO = "debian-sid-ports"
new file mode 100644
@@ -0,0 +1,23 @@
+#
+# Copyright (c) Siemens AG, 2023
+#
+# SPDX-License-Identifier: MIT
+
+# The partition layout is based on the VisionFive2 example image:
+# https://github.com/starfive-tech/VisionFive2/blob/JH7110_VisionFive2_devel/Makefile#L394
+# However, instead of booting via ubootenv + fit, we boot fit + efi
+#
+# When booting from the SD card, make sure that the DIP switches are set to SD card.
+# By that, the board reads the u-boot firmware from the SD instead of the internal flash.
+# This is required to boot efi with the correct device tree, which is included in the fit image.
+
+# SPL
+part --source rawcopy --sourceparams "file=/usr/share/jh7110-uboot-spl-image/u-boot-spl.bin.normal.out" --ondisk mmcblk1 --fixed-size 2M --offset 2M --part-type 2E54B353-1271-4842-806F-E436D6AF6985
+# U-Boot FIT
+part --source rawcopy --sourceparams "file=/usr/share/visionfive2-u-boot-firmware/visionfive2_fw_payload.img" --ondisk mmcblk1 --fixed-size 4M --offset 4M --part-type 5B193300-FC78-40CD-8002-E86C45580B47
+# EFI
+part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot" --use-uuid --label efi --part-type EF00 --align 1024
+# rootfs
+part / --source rootfs --use-uuid --fstype ext4 --mkfs-extraopts "-T default" --label image --active --align 1024 --exclude-path=boot/
+
+bootloader --ptable gpt --timeout=0 --append "console=tty0 console=ttyS0,115200 earlycon rootwait"
This patch adds the RISCV64 based StarFive VisionFive 2 machine. The target still needs a custom kernel and also only works from debian bookworm on. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- meta-isar/conf/local.conf.sample | 1 + .../conf/machine/starfive-visionfive2.conf | 29 +++++++++++++++++++ .../starfive-visionfive2-sid-ports.conf | 7 +++++ .../canned-wks/starfive-visionfive2.wks.in | 23 +++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 meta-isar/conf/machine/starfive-visionfive2.conf create mode 100644 meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf create mode 100644 meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in