configs/pine64_star64: update to latest upstream uboot and LTS kernel

Since Buildroot commit [1] "package/gcc: switch to GCC 14.x as the
default", pine64_star64_defconfig compilation is failing in
u-boot with error:

    drivers/video/dw_hdmi.c: In function 'dw_hdmi_write':
    drivers/video/dw_hdmi.c:81:42: error: passing argument 2 of 'writeb' makes pointer from integer without a cast [-Wint-conversion]

See build failure [2].

Upstream U-Boot includes a support for this board since commit [3],
first included in v2024.07.
Upstream Kernel includes a support for this board since commit [4],
first included in v6.11.

This commit switches uboot and linux from the repository
https://github.com/Fishwaldo
to their respective upstream sources.

U-Boot is updated from the fork from a v2021.10 base to v2025.10.
The Linux Kernel is updated from the fork from a v5.15.131 base
to v6.12.56.

While at it, this commit updates the defconfig to the new convention:
- It adds custom hashes and enables BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
- It switches to a glibc stable bootlin external toolchain

Note that the upstream uboot defconfig name for the pine64 star64
board is starfive_visionfive2 (which is in fact another, but very
similar board). The detection of the board is made inside the SPL.
See [5].

Finally, switching to upstream uboot and kernel required few
adjustments:
- The genimage.cfg is updated to use the "u-boot.itb" file produced by
  U-Boot,
- In genimage.cfg, the uboot partition-type-uuid is changed to
  xbootldr (the genimage human readable name), to follow the
  recommendation of the UUID to use from [5],
- In extlinux.conf, rootwait is added in kernel arguments,
- The post-build.sh script and the star64-uboot-fit-image.its file
  are removed: they are no longer needed, since U-Boot and Binman
  are managing everything,
- BR2_TARGET_UBOOT_SPL_NAME is updated in the defconfig, to reflect
  the file name generated by U-Boot,
- BR2_PACKAGE_HOST_STARFIVE_SPLTOOL is removed from the defconfig,
  it is no longer needed, since upstream U-Boot produces the file
  at the correct format,
- BR2_PACKAGE_HOST_UBOOT_TOOLS is also removed from the defconfig,
  it is no longer needed since U-Boot uses Binman,
- the defconfig is updated to include the new uboot requirements
  (BR2_TARGET_UBOOT_{NEEDS,USE}_*),
- the pine64_star64_defconfig entry is removed from .checkpackageignore
  it is no longer needed.

This patch was tested on a Pine64 Star64 board V1.1,
PCB revision: 0xc1, BOM revision: A.

Fixes:
- [2]

[1] 1e1fafa1f0
[2] https://gitlab.com/buildroot.org/buildroot/-/jobs/11916952973
[3] 7ebf7e77c0
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2606bf583b9623694b864c220fd6b3d2ed13ba13
[5] https://source.denx.de/u-boot/u-boot/-/blob/v2025.10/doc/board/starfive/pine64_star64.rst

Reviewed-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Julien Olivain
2025-11-04 21:08:33 +01:00
parent 559bb4dd7b
commit dca6a203a5
8 changed files with 23 additions and 54 deletions

View File

@@ -149,7 +149,6 @@ configs/orangepi_pc2_defconfig lib_defconfig.ForceCheckHash
configs/orangepi_zero_plus_defconfig lib_defconfig.ForceCheckHash
configs/pine64_defconfig lib_defconfig.ForceCheckHash
configs/pine64_pinecube_defconfig lib_defconfig.ForceCheckHash
configs/pine64_star64_defconfig lib_defconfig.ForceCheckHash
configs/s6lx9_microboard_defconfig lib_defconfig.ForceCheckHash
configs/sipeed_lichee_rv_defconfig lib_defconfig.ForceCheckHash
configs/sipeed_lichee_rv_dock_defconfig lib_defconfig.ForceCheckHash

View File

@@ -12,8 +12,8 @@ image sdcard.img {
}
partition uboot {
image = "opensbi_uboot_payload.img"
partition-type-uuid = 5B193300-FC78-40CD-8002-E86C45580B47
image = "u-boot.itb"
partition-type-uuid = xbootldr
offset = 4M
}

View File

@@ -1,4 +1,4 @@
label star64
kernel /boot/Image
devicetree /boot/jh7110-pine64-star64.dtb
append root=/dev/mmcblk1p3 earlycon=sbi
append root=/dev/mmcblk1p3 rootwait earlycon=sbi

View File

@@ -0,0 +1,2 @@
# From https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
sha256 165ca1c37c4607b90e731996b7c1e3311285167d13deeedf08f3f1f0b9d2541a linux-6.12.57.tar.xz

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 b4f032848e56cc8f213ad59f9132c084dbbb632bc29176d024e58220e0efdf4a u-boot-2025.10.tar.bz2

View File

@@ -1,9 +0,0 @@
#!/bin/bash
BOARD_DIR="$CONFIG_DIR"/board/pine64/star64
# Add header to the SPL
"$HOST_DIR"/bin/spl_tool -c -f "$BINARIES_DIR"/u-boot-spl.bin
# Create the u-boot FIT image
cp "$BOARD_DIR"/star64-uboot-fit-image.its "$BINARIES_DIR"
mkimage -f "$BINARIES_DIR"/star64-uboot-fit-image.its -A riscv -O u-boot -T firmware "$BINARIES_DIR"/opensbi_uboot_payload.img

View File

@@ -1,29 +0,0 @@
/dts-v1/;
/ {
description = "U-boot-spl FIT image for JH7110 Pine64 Star64";
#address-cells = <2>;
images {
firmware {
description = "u-boot";
data = /incbin/("fw_payload.bin");
type = "firmware";
arch = "riscv";
os = "u-boot";
load = <0x0 0x40000000>;
entry = <0x0 0x40000000>;
compression = "none";
};
};
configurations {
default = "config-1";
config-1 {
description = "U-boot-spl FIT config for JH7110 Pine64 Star64";
firmware = "firmware";
};
};
};

View File

@@ -1,13 +1,14 @@
BR2_riscv=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_GLOBAL_PATCH_DIR="board/pine64/star64/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_ROOTFS_OVERLAY="board/pine64/star64/overlay/"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/pine64/star64/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/star64/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Fishwaldo,Star64_linux,1456c984f15e21e28fb8a9ce96d0ca10e61a71c4)/linux-1456c984f15e21e28fb8a9ce96d0ca10e61a71c4.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="pine64_star64"
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.57"
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="starfive/jh7110-pine64-star64"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
@@ -17,15 +18,18 @@ BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="100M"
BR2_TARGET_OPENSBI=y
BR2_TARGET_OPENSBI_PLAT="generic"
BR2_TARGET_OPENSBI_UBOOT_PAYLOAD=y
# BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,Fishwaldo,u-boot,172b47f62039605d6806fa96bd403c21cda28996)/u-boot-172b47f62039605d6806fa96bd403c21cda28996.tar.gz"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pine64_star64"
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2025.10"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="starfive_visionfive2"
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
BR2_TARGET_UBOOT_NEEDS_GNUTLS=y
BR2_TARGET_UBOOT_NEEDS_OPENSBI=y
BR2_TARGET_UBOOT_USE_BINMAN=y
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
BR2_TARGET_UBOOT_FORMAT_ITB=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin.normal.out"
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_STARFIVE_SPLTOOL=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y