Browse Source

Merge branch 'starfive-kirkstone' into 'starfive-kirkstone'

JH8100 bug fixes and repository branch update

See merge request starfive-tech/meta-starfive!47
Rebecca Chang 2 months ago
parent
commit
80d53a0dfb

+ 5 - 4
conf/machine/starfive-jh8100.conf

@@ -23,10 +23,10 @@ SERIAL_CONSOLE = "115200 ttyS0"
 PREFERRED_PROVIDER_virtual/kernel = "linux-starfive-dev"
 PREFERRED_PROVIDER_virtual/bootloader = "u-boot-starfive"
 
-LLVMVERSION = "16.0.5"
-GLIBCVERSION = "2.36"
-BINUVERSION = "2.39"
-GCCVERSION = "12.2.0"
+LLVMVERSION = "17.0.0"
+GLIBCVERSION = "2.38%"
+BINUVERSION = "2.41"
+GCCVERSION = "13.2.0"
 QEMUVERSION = "7.2.0"
 PREFERRED_VERSION_openocd = "riscv"
 PREFERRED_VERSION_openocd-native = "riscv"
@@ -36,6 +36,7 @@ PREFERRED_VERSION_xserver-xorg = "1.20.13"
 PREFERRED_VERSION_mbedtls = "3.4.0"
 PREFERRED_PROVIDER_dhcp-relay = "dhcp"
 PREFERRED_PROVIDER_nodejs = "18.0.0"
+PREFERRED_VERSION_linux-starfive-dev = "6.6%"
 
 RISCV_SBI_PLAT = "generic"
 #RISCV_SBI_PAYLOAD = "u-boot.bin"

+ 2 - 2
recipes-bsp/opensbi/opensbi_%.bbappend

@@ -7,8 +7,8 @@ BRANCH:starfive-visionfive2 = "master"
 SRCREV:starfive-visionfive2 = "c6a092cd80112529cb2e92e180767ff5341b22a3"
 
 FORK:starfive-jh8100 = "starfive-tech"
-BRANCH:starfive-jh8100 = "fpga-starfive-v1.2-jh8100-bmc-30Nov"
-SRCREV:starfive-jh8100 = "7cbdf359bb9d2f4c79c736fa92952a06a7740657"
+BRANCH:starfive-jh8100 = "fpga-starfive-v1.2-jh8100"
+SRCREV:starfive-jh8100 = "924640487c6815c63adcbf19fbf3283900988a6f"
 
 SRC_URI:starfive-dubhe = "\
 	git://github.com/${FORK}/opensbi.git;protocol=https;branch=${BRANCH} \

+ 30 - 0
recipes-bsp/starfive-tool/spltool-native_1.0.0.bb

@@ -0,0 +1,30 @@
+DESCRIPTION = "Starfive Tools"
+
+inherit native
+
+BBCLASSEXTEND = "native"
+
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = ""
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI = "file://jh8100_cst.tar.gz"
+
+S = "${WORKDIR}/jh8100_cst"
+
+FILES:${PN} = "${bindir}/*"
+
+RDEPENDS:${PN} = "bash"
+
+do_compile() {
+	oe_runmake -C ${S}
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -d ${D}${bindir}/input_files/jh8100
+	install -m 0755 ${S}/input_files/jh8100/scpbl_nor.cfg ${D}${bindir}/input_files/jh8100/scpbl_nor.cfg
+	install -m 0755 ${S}/mkbif ${D}${bindir}
+	install -m 0755 ${S}/create_hdr ${D}${bindir}
+}

+ 0 - 13
recipes-bsp/starfive-tool/starfive-tool.bb

@@ -6,14 +6,9 @@ LIC_FILES_CHKSUM = ""
 LICENSE:starfive-visionfive2 = "GPL-2.0"
 LIC_FILES_CHKSUM:starfive-visionfive2 = "file://LICENSE;md5=e6dc25dc2418b8831c906d43809d8336"
 
-LICENSE:starfive-jh8100 = "CLOSED"
-LIC_FILES_CHKSUM:starfive-jh8100 = ""
-
 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
 
 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"
 
@@ -23,16 +18,8 @@ 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_install:starfive-jh8100() {
-	cp -r  ${WORKDIR}/jh8100_cst ${DEPLOY_DIR_IMAGE}/jh8100_cst
-}
-
 BBCLASSEXTEND = "native"

+ 17 - 20
recipes-bsp/u-boot/u-boot-starfive.bb

@@ -18,8 +18,8 @@ BRANCH:starfive-visionfive2 = "JH7110_VisionFive2_devel"
 SRCREV:starfive-visionfive2 = "b6e2b0e85c774a18ae668223a6e5f7d335895243"
 
 FORK:starfive-jh8100 = "starfive-tech"
-BRANCH:starfive-jh8100 = "jh8100_fpga_dev_v2023.01-bmc-30Nov"
-SRCREV:starfive-jh8100 = "c1a4c841e01fbcd3f6d5e894e726e9f50abc6938"
+BRANCH:starfive-jh8100 = "jh8100_fpga_dev_v2023.01"
+SRCREV:starfive-jh8100 = "7f3f31a04b3a0e2bd7f3c78d290648e33abbb646"
 
 SRC_URI:starfive-dubhe = "\
 	git://github.com/${FORK}/u-boot.git;protocol=https;branch=${BRANCH} \
@@ -47,7 +47,7 @@ SRC_URI:starfive-jh8100 = "\
 
 DEPENDS:append:starfive-dubhe = " u-boot-tools-native bmap-tools-native opensbi"
 DEPENDS:append:starfive-visionfive2 = " u-boot-tools-native starfive-tool-native"
-DEPENDS:append:starfive-jh8100 = " u-boot-tools-native bmap-tools-native opensbi starfive-tool"
+DEPENDS:append:starfive-jh8100 = " u-boot-tools-native bmap-tools-native opensbi spltool-native"
 
 # Overwrite this for your server
 TFTP_SERVER_IP ?= "127.0.0.1"
@@ -64,14 +64,12 @@ do_configure:prepend:starfive-jh8100() {
         -d ${WORKDIR}/tftp-mmc-boot.txt ${WORKDIR}/${UBOOT_ENV_BINARY}
 }
 
-do_configure:prepend:starfive-dubhe() {
-    cp ${DEPLOY_DIR_IMAGE}/fw_dynamic.bin ${WORKDIR}/build/fw_dynamic.bin
-    export OPENSBI=${WORKDIR}/build/fw_dynamic.bin
+do_compile:prepend:starfive-dubhe() {
+    export OPENSBI=${DEPLOY_DIR_IMAGE}/fw_dynamic.bin
 }
 
-do_configure:prepend:starfive-jh8100() {
-    cp ${DEPLOY_DIR_IMAGE}/fw_dynamic.bin ${WORKDIR}/build/fw_dynamic.bin
-    export OPENSBI=${WORKDIR}/build/fw_dynamic.bin
+do_compile:prepend:starfive-jh8100() {
+    export OPENSBI=${DEPLOY_DIR_IMAGE}/fw_dynamic.bin
 }
 
 do_deploy:append:starfive-visionfive2() {
@@ -84,8 +82,7 @@ do_deploy:append:starfive-visionfive2() {
 }
 
 do_deploy:append:starfive-dubhe() {
-    install -m 644 ${WORKDIR}/build/u-boot.itb ${DEPLOYDIR}/u-boot.itb
-    rm ${WORKDIR}/build/fw_dynamic.bin
+    install -m 644 ${B}/u-boot.itb ${DEPLOYDIR}/u-boot.itb
     install -m 644 ${WORKDIR}/run_qemu_virt.dtb ${DEPLOYDIR}/run_qemu_virt.dtb
 }
 
@@ -93,20 +90,20 @@ do_deploy:append:starfive-jh8100() {
     install -m 644 ${WORKDIR}/uboot.env ${DEPLOYDIR}/uboot.env
     install -m 644 ${WORKDIR}/bootloader.bin.normal.out ${DEPLOYDIR}/bootloader.bin.normal.out
     install -m 644 ${WORKDIR}/firmware_merak.bin.normal.out ${DEPLOYDIR}/firmware_merak.bin.normal.out
-    install -m 644 ${WORKDIR}/build/u-boot.itb ${DEPLOYDIR}/u-boot.itb
-    rm ${WORKDIR}/build/fw_dynamic.bin
+    install -m 644 ${B}/u-boot.itb ${DEPLOYDIR}/u-boot.itb
     install -m 644 ${WORKDIR}/run_qemu_virt.dtb ${DEPLOYDIR}/run_qemu_virt.dtb
 
-    ${DEPLOY_DIR_IMAGE}/jh8100_cst/mkbif ${DEPLOYDIR}/${SPL_BINARYNAME}
+    mkbif ${DEPLOYDIR}/${SPL_BINARYNAME}
+
+    dd if=${WORKDIR}/bootloader.bin.normal.out of=${DEPLOYDIR}/scp_raw.img count=1 bs=512k conv=sync
+    dd if=${WORKDIR}/bootloader.bin.normal.out of=${DEPLOYDIR}/scp_raw.img seek=1 count=1 bs=512k conv=sync
 
-    dd if=${WORKDIR}/bootloader.bin.normal.out of=${DEPLOY_DIR_IMAGE}/scp_raw.img count=1 bs=512k conv=sync
-    dd if=${WORKDIR}/bootloader.bin.normal.out of=${DEPLOY_DIR_IMAGE}/scp_raw.img seek=1 count=1 bs=512k conv=sync
+    dd if=${WORKDIR}/firmware_merak.bin.normal.out of=${DEPLOYDIR}/scp_raw.img seek=2 count=1 bs=512k conv=sync
+    dd if=${WORKDIR}/firmware_merak.bin.normal.out of=${DEPLOYDIR}/scp_raw.img seek=3 count=1 bs=512k conv=sync
 
-    dd if=${WORKDIR}/firmware_merak.bin.normal.out of=${DEPLOY_DIR_IMAGE}/scp_raw.img seek=2 count=1 bs=512k conv=sync
-    dd if=${WORKDIR}/firmware_merak.bin.normal.out of=${DEPLOY_DIR_IMAGE}/scp_raw.img seek=3 count=1 bs=512k conv=sync
+    dd if=${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out of=${DEPLOYDIR}/scp_raw.img seek=4 count=1 bs=512k conv=sync
+    dd if=${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out of=${DEPLOYDIR}/scp_raw.img seek=5 count=1 bs=512k conv=sync
 
-    dd if=${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out of=${DEPLOY_DIR_IMAGE}/scp_raw.img seek=4 count=1 bs=512k conv=sync
-    dd if=${DEPLOYDIR}/${SPL_BINARYNAME}.normal.out of=${DEPLOY_DIR_IMAGE}/scp_raw.img seek=5 count=1 bs=512k conv=sync
 }
 
 TOOLCHAIN = "gcc"

+ 24 - 0
recipes-devtools/nodejs/nodejs/0001-fix-build-with-gcc-13.patch

@@ -0,0 +1,24 @@
+diff --git a/deps/v8/src/base/logging.h b/deps/v8/src/base/logging.h
+index 08db24a..38be165 100644
+--- a/deps/v8/src/base/logging.h
++++ b/deps/v8/src/base/logging.h
+@@ -5,6 +5,7 @@
+ #ifndef V8_BASE_LOGGING_H_
+ #define V8_BASE_LOGGING_H_
+ 
++#include <cstdint>
+ #include <cstring>
+ #include <sstream>
+ #include <string>
+diff --git a/deps/v8/src/inspector/v8-string-conversions.h b/deps/v8/src/inspector/v8-string-conversions.h
+index c1d69c1..eb33c68 100644
+--- a/deps/v8/src/inspector/v8-string-conversions.h
++++ b/deps/v8/src/inspector/v8-string-conversions.h
+@@ -5,6 +5,7 @@
+ #ifndef V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
+ #define V8_INSPECTOR_V8_STRING_CONVERSIONS_H_
+ 
++#include <cstdint>
+ #include <string>
+ 
+ // Conversion routines between UT8 and UTF16, used by string-16.{h,cc}. You may

+ 1 - 0
recipes-devtools/nodejs/nodejs_18.0.0.bb

@@ -21,6 +21,7 @@ COMPATIBLE_HOST:powerpc = "null"
 
 SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
+	   file://0001-fix-build-with-gcc-13.patch \
            file://0004-v8-don-t-override-ARM-CFLAGS.patch \
            file://system-c-ares.patch \
            file://run-ptest \

+ 12 - 0
recipes-extended/mnn/mnn/0001-fix-build-with-gcc-13.patch

@@ -0,0 +1,12 @@
+diff --git a/test/MNNTestSuite.h b/test/MNNTestSuite.h
+index a7ea46e4..52ade143 100644
+--- a/test/MNNTestSuite.h
++++ b/test/MNNTestSuite.h
+@@ -27,6 +27,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <dirent.h>
++#include <cstdint>
+ #endif
+ 
+ static inline uint64_t getTimeInUs() {

+ 4 - 2
recipes-extended/mnn/mnn_2.6.0.bb

@@ -1,13 +1,15 @@
 DESCRIPTION = "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba"
 HOMEPAGE = "www.mnn.zone"
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://README.md;startline=124;endline=125;md5=49af4a1302656dc01a1c983ee77b8227"
+LIC_FILES_CHKSUM = "file://README.md;startline=124;endline=125;md5=866c85dec0fa0932d17067810bf0e08c"
 
 SRC_URI = " \
     git://github.com/alibaba/MNN.git;branch=master;protocol=https \
     file://run-ptest \
+    file://0001-fix-build-with-gcc-13.patch \
 "
-SRCREV = "c293f9eeab0a2983aa260ca81c751b09a389b16d"
+SRCREV = "d20f37fd7134127dde9201e74d38dc0c08d4a096"
+
 S = "${WORKDIR}/git"
 
 inherit cmake ptest

+ 3 - 3
recipes-kernel/linux/linux-starfive-dev_6.6.bb

@@ -13,12 +13,12 @@ BRANCH:starfive-dubhe = "starfive-6.6.10-dubhe"
 SRCREV:starfive-dubhe = "c657db3b77ea6a5406ff86fd0b1aa4ce26b45c7e"
 
 FORK:starfive-jh8100 = "starfive-tech"
-BRANCH:starfive-jh8100 = "starfive-6.1-dev-jh8100-bmc-30Nov"
-SRCREV:starfive-jh8100 = "d3c89a346ad56faa46713019ba82ade5ace25651"
+BRANCH:starfive-jh8100 = "starfive-6.6.10-dev-jh8100"
+SRCREV:starfive-jh8100 = "0272068c64b55a16d32da216913f8558f94bee5c"
 
 LINUX_VERSION ?= "6.6.10"
 LINUX_VERSION:starfive-dubhe = "6.6.10"
-LINUX_VERSION:starfive-jh8100 = "6.1.20"
+LINUX_VERSION:starfive-jh8100 = "6.6.10"
 
 LINUX_VERSION_EXTENSTION:append:starfive-dubhe = "-starlight"