I have a UEFI image built from edk2-stable202311 pulling in Patches from dev edk2 mailing list.
I documented the steps here:
opened 06:53PM - 15 Mar 24 UTC
https://doc-en.rvspace.org/Doc_Center/visionfive_2.html
https://github.com/me… ta-flutter/meta-flutter/issues/453
https://github.com/jwinarske/meta-vulkan/issues/19
https://github.com/jwinarske/meta-vulkan/issues/18
The following config/patch produces a `core-image-weston` image:
## layers
```
Build Configuration:
BB_VERSION = "2.0.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "riscv64-poky-linux"
MACHINE = "starfive-visionfive2"
DISTRO = "poky"
DISTRO_VERSION = "4.0.14"
TUNE_FEATURES = "riscv64"
meta
meta-poky
meta-yocto-bsp = "HEAD:d8d6d921fad14b82167d9f031d4fca06b5e01883"
meta-oe
meta-python
meta-networking
meta-multimedia
meta-filesystems = "HEAD:8a75c61cce2aa1d6e5a3597ab8fc5a7e6aeae1e4"
meta-clang = "HEAD:79169d9be565b7a87310ca280d3a21aaf608ce33"
meta-riscv = "kirkstone:0bd22610f8f4f0b17efcfba08b29f58fb3e6d3f0"
meta-starfive = "starfive-kirkstone:65fb9a3903375d63538a7571c86ef3d30ef15842"
meta-vulkan = "kirkstone:f20ac7ad576fa1fb63f198dd88594ed8e7a760d7"
meta-qt5 = "HEAD:ae8a97f79364bed1abc297636f7933d0e35f22be"
meta-flutter = "kirkstone:f8329e73810a00dfbcf1bccbb55bb7d64367d647"
```
## conf/local.conf
```
MACHINE ?= "starfive-visionfive2"
```
```
INHERIT += "rm_work"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INIT_MANAGER = "systemd"
DISTRO_FEATURES:append = " wayland opengl"
# localization
DEFAULT_TIMEZONE = "America/Los_Angeles"
ENABLE_BINARY_LOCALE_GENERATION = "1"
IMAGE_LINGUAS:append = " en-us en-gb es-us"
GLIBC_GENERATE_LOCALES:append = " en_US.UTF-8 es_US.UTF-8 en_GB.UTF-8"
IMAGE_INSTALL:append = " \
tzdata-core \
tzdata-americas \
"
DISTRO_FEATURES:append = " systemd alsa wifi bluetooth usbhost pipewire x11"
DISTRO_FEATURES:remove = "sysvinit usbgadget ptest xen"
COMBINED_FEATURES += "alsa "
INIT_MANAGER = "systemd"
DISTRO_FEATURES:append = " opengl wayland pam"
PACKAGECONFIG:append:pn-weston = " remoting"
DISTRO_FEATURES:append = " vulkan"
IMAGE_INSTALL:append = " \
vulkan-tools \
vulkan-caps-viewer \
sascha-samples \
vkcube \
comp-surf-pbr \
dart-sdk \
\
\
mesa-pvr \
ffmpeg \
libsf-codaj12 \
libsf-omxil \
libsf-wave420l \
libsf-wave511 \
jpu-module \
vdec-module \
venc-module \
"
PREFERRED_PROVIDER_mesa = "mesa-pvr"
PACKAGECONFIG:append:pn-mesa-pvr = " gles egl"
BBMASK += "libforms nginx"
```
## meta-starfive `starfive-kirkstone` patch
```
From 1ddc1aab2f8a8cddf0d7a67fd3134980492003c6 Mon Sep 17 00:00:00 2001
From: Joel Winarske <joel.winarske@gmail.com>
Date: Fri, 15 Mar 2024 11:51:33 -0700
Subject: [PATCH] changes to work
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
---
recipes-bsp/starfive-tool/starfive-tool.bb | 36 ++++++-------------
recipes-bsp/u-boot/u-boot-starfive.bb | 4 +--
.../images/core-image-minimal-xfce.bbappend | 29 ---------------
.../packagegroups/packagegroup-starfive-c.bb | 1 -
recipes-graphics/mesa/mesa-pvr.inc | 4 +--
recipes-httpd/nginx/nginx_%.bbappend | 9 -----
6 files changed, 14 insertions(+), 69 deletions(-)
delete mode 100644 recipes-core/images/core-image-minimal-xfce.bbappend
delete mode 100644 recipes-httpd/nginx/nginx_%.bbappend
diff --git a/recipes-bsp/starfive-tool/starfive-tool.bb b/recipes-bsp/starfive-tool/starfive-tool.bb
index 7934412..da6ed04 100644
--- a/recipes-bsp/starfive-tool/starfive-tool.bb
+++ b/recipes-bsp/starfive-tool/starfive-tool.bb
@@ -1,38 +1,22 @@
DESCRIPTION = "Starfive Tools"
LICENSE = "CLOSED"
-LIC_FILES_CHKSUM = ""
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e6dc25dc2418b8831c906d43809d8336"
-LICENSE:starfive-visionfive2 = "GPL-2.0"
-LIC_FILES_CHKSUM:starfive-visionfive2 = "file://LICENSE;md5=e6dc25dc2418b8831c906d43809d8336"
+SRC_URI = "\
+ git://github.com/starfive-tech/soft_3rdpart;protocol=https;lfs=0;branch=JH7110_VisionFive2_devel \
+"
-LICENSE:starfive-jh8100 = "CLOSED"
-LIC_FILES_CHKSUM:starfive-jh8100 = ""
+SRCREV = "5eca20d2ce6fb7b18044bfe30c5bfd7f8f47958d"
-FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+S = "${WORKDIR}/git/spl_tool"
-SRC_URI:starfive-visionfive2 = "git://git@192.168.110.45/sdk/soft_3rdpart;protocol=ssh;branch=jh7110-devel"
-SRC_URI:starfive-jh8100 = "file://jh8100_cst.tar.gz \
- "
-
-SRCREV:starfive-visionfive2 = "10f543ca35e14809a9b4e9df814b798aa4362d14"
-
-S:starfive-visionfive2 = "${WORKDIR}/git/spl_tool"
-
-do_compile:starfive-visionfive2() {
- oe_runmake -C ${S}
-}
-
-do_compile:starfive-jh8100() {
- oe_runmake -C ${WORKDIR}/jh8100_cst
-}
-
-do_install:starfive-visionfive2() {
- install -Dm 0755 ${S}/spl_tool ${D}/${bindir}/spl_tool
+do_compile() {
+ oe_runmake -C ${S}
}
-do_install:starfive-jh8100() {
- cp -r ${WORKDIR}/jh8100_cst ${DEPLOY_DIR_IMAGE}/jh8100_cst
+do_install() {
+ install -Dm 0755 ${S}/spl_tool ${D}/${bindir}/spl_tool
}
BBCLASSEXTEND = "native"
diff --git a/recipes-bsp/u-boot/u-boot-starfive.bb b/recipes-bsp/u-boot/u-boot-starfive.bb
index e13149b..c3e338a 100644
--- a/recipes-bsp/u-boot/u-boot-starfive.bb
+++ b/recipes-bsp/u-boot/u-boot-starfive.bb
@@ -15,7 +15,7 @@ SRCREV:starfive-dubhe = "cef715ce412e97f17acab08529540c9fa317a923"
FORK:starfive-visionfive2 = "starfive-tech"
BRANCH:starfive-visionfive2 = "JH7110_VisionFive2_devel"
-SRCREV:starfive-visionfive2 = "b6e2b0e85c774a18ae668223a6e5f7d335895243"
+SRCREV:starfive-visionfive2 = "223ac8b1e907924d3891b3be1b2f6620b56bff31"
FORK:starfive-jh8100 = "starfive-tech"
BRANCH:starfive-jh8100 = "jh8100_fpga_dev_v2023.01-bmc-30Nov"
@@ -28,7 +28,7 @@ SRC_URI:starfive-dubhe = "\
"
SRC_URI:starfive-visionfive2 = "\
- git://github.com/${FORK}/u-boot.git;protocol=ssh;branch=${BRANCH} \
+ git://github.com/${FORK}/u-boot.git;protocol=https;branch=${BRANCH} \
file://vf2_uEnv.txt \
file://vf2_nvme_uEnv.txt \
file://tftp-mmc-boot.txt \
diff --git a/recipes-core/images/core-image-minimal-xfce.bbappend b/recipes-core/images/core-image-minimal-xfce.bbappend
deleted file mode 100644
index 5dd6e95..0000000
--- a/recipes-core/images/core-image-minimal-xfce.bbappend
+++ /dev/null
@@ -1,29 +0,0 @@
-require sd-image.inc
-
-DEPENDS += " opensbi starfive-tool-native u-boot-tools-native dtc-native"
-
-IMAGE_INSTALL += " \
- helloworld \
- coremark \
- dhrystone \
- perf \
- gdb \
- gdbserver \
- util-linux \
- ethtool \
- bmap-tools \
- systemd-analyze \
- e2fsprogs-resize2fs \
- mesa-pvr \
- visionfive2-pvr-graphics \
- glmark2 \
- ffmpeg \
- libsf-codaj12 \
- libsf-omxil \
- libsf-wave420l \
- libsf-wave511 \
- jpu-module \
- vdec-module \
- venc-module \
- openssh \
- "
diff --git a/recipes-core/packagegroups/packagegroup-starfive-c.bb b/recipes-core/packagegroups/packagegroup-starfive-c.bb
index b2d0abd..bf0b34f 100644
--- a/recipes-core/packagegroups/packagegroup-starfive-c.bb
+++ b/recipes-core/packagegroups/packagegroup-starfive-c.bb
@@ -59,7 +59,6 @@ RDEPENDS:${PN} = "\
netbase \
net-snmp \
nfs-utils \
- nginx \
ntp \
openldap \
openssh \
diff --git a/recipes-graphics/mesa/mesa-pvr.inc b/recipes-graphics/mesa/mesa-pvr.inc
index 2dedc2d..7b3466f 100644
--- a/recipes-graphics/mesa/mesa-pvr.inc
+++ b/recipes-graphics/mesa/mesa-pvr.inc
@@ -107,6 +107,8 @@ PROVIDES = " \
${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
virtual/mesa \
+ virtual/libgles1 \
+ virtual/libgles3 \
"
inherit meson pkgconfig python3native gettext features_check
@@ -147,8 +149,6 @@ EXTRA_OEMESON = " \
-Dglx-read-only-text=true \
-Dplatforms='${@",".join("${PLATFORMS}".split())}' \
-Ddri-drivers=pvr \
- -Dgles1=disabled \
- -Dgles2=disabled \
"
def strip_comma(s):
diff --git a/recipes-httpd/nginx/nginx_%.bbappend b/recipes-httpd/nginx/nginx_%.bbappend
deleted file mode 100644
index f3d56c6..0000000
--- a/recipes-httpd/nginx/nginx_%.bbappend
+++ /dev/null
@@ -1,9 +0,0 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
-
-SRCREV = "2f67cde5a0aaf7cffd43a71f5c4b443698909f4a"
-
-SRC_URI += " \
- git://github.com/fdintino/nginx-upload-module.git;branch=master;destsuffix=nginx-upload-module;protocol=ssh \
-"
-
-EXTRA_OECONF += "--add-module=${WORKDIR}/nginx-upload-module "
--
2.44.0
```
Running spl_tool on the fd file I am getting:
$ Tools/spl_tool/spl_tool -c -f FV/VISIONFIVE2.fd
ubsplhdr.sofs:0x240, ubsplhdr.bofs:0x200000, ubsplhdr.vers:0x1010101 name:FV/VISIONFIVE2.fd
File too large! Please rebuild your SPL with -Os. Maximum allowed size is 180048 bytes.
I would like to flash the UEFI image to QSPI.
Is this the correct approach?
I will try this method, changing the name from JH7110.fd
to VISIONFIVE2.fd
.
Steps documented here work:
2 Likes