From patchwork Wed Jan 17 11:19:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3304 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 17 Jan 2024 12:19:47 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-qk1-f187.google.com (mail-qk1-f187.google.com [209.85.222.187]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 40HBJjFs032548 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 17 Jan 2024 12:19:46 +0100 Received: by mail-qk1-f187.google.com with SMTP id af79cd13be357-78371be5e1asf124817385a.1 for ; Wed, 17 Jan 2024 03:19:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705490378; cv=pass; d=google.com; s=arc-20160816; b=lX9g+elTCvlGyGmZmTak8woN0lVrflNwwb5NyybjcZ+4eLxLKitFDDEsnbvZl1ps28 2caOfc/GoFjXxMd1xiOg0aj0sEhyz0uDvOQADuJ62ttU5bF4mxNS9oLLUmrah81QCWZ1 S+O0Hxjq0gEJwa6VI7ADSzz4qgE1gbWyxJByfiZ9FiIUUjhWaldkQOOeepvbiuiNV0tZ j4uVpOp+lqC+QFGdZpyTpFdkW4Gbtd22KjgAl45bkFIL/2DQu5cayDoW4ZEEeIzzdaBO 44+U5ovx6952HwmkTeOtce0FJnZDnMPOy9jWZ85r+D4Vcb+EJwuWUQ85c4Q44trHuP3u 0lnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Y7O0Tsm505xT3CDWgIydAZ7eukIxbTQ3pBYrsrZHNFQ=; fh=xxo2rOAPT4f31TY31yIWVuVlno6QMa2Pdllc3KKolm0=; b=ag6D54/tWjt2PBmW1HZc8qYU4CUUFasHJvePblJemsNPWhzqr+kxch+lKBNKsu8x3G M9mkRuJJFUyhgXSqgmvEaPVdfM3CETWnqy7n0SUZ0kn6t1BcJXi9AVzOjgRlaoSh/90L qnSW5S/o4vrkAiUn9UI6mJWRUQiBmHIQ9EtAcACpGy+9kX2OVExShpdErM0LwzcbCbTZ dBMvUdpgd+qu+h8We2vSjLE3cwa+VsW/uh3Sf8LyKCOu3Ykg8US0puNtvn/SQVTuCN+g r80y1qL3oTRFC5ufLNdF3uLTxr2UWkvotzURM4u5NeMLQ+yjH4da9wlW9zxHLxDZj6Wm ye2w== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="G/3dhh/t"; spf=pass (google.com: domain of fm-294854-20240117111935ec290332b68c88faf2-1cd4x7@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-294854-20240117111935ec290332b68c88faf2-1cD4X7@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1705490378; x=1706095178; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Y7O0Tsm505xT3CDWgIydAZ7eukIxbTQ3pBYrsrZHNFQ=; b=G4JeKlrHJ287gHcZsAnPyXjG8qeZ6b/+W4tM1EMC5YXZWjBBSBK0urLNNgbPM7XwSF FdXIc0xtfyZMBhz5Vw4+EncanPBdtR/FiqAslFGNbAJUZh5w3l+zR5SjMNlsTpvm0qYK jJqkO96BV7o2vKW/fZv7zAgzDk/6fnUkQXncAQlNdqWbU+BpO6lgtg9BRQhoADSNZCks q9atzx1oHuv0v2LnUgr1yRe3EenqgWP7kxzBKx75iqqlBEJOu9AWDSEh++pdeS9MThym Ke29ZcAHthVGZXLUwCy215BRy00HgkDmwAPdRGdkAVZMGEhTxwjTkJK7ign0K5rtOg0Y eA1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705490378; x=1706095178; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Y7O0Tsm505xT3CDWgIydAZ7eukIxbTQ3pBYrsrZHNFQ=; b=Qg3FFxz0OHER6b+vaZAsItdSMJfqgDVniukcc55cpCsaF1xd9KeNPa3cUwXbsTtVYy WB+Pg4OKv/ynwCpqbDx/OP8DZeAJNeI41zzpUvlXVnQM1YmuOCYMZqqziMNlD7hyzC0c QTdchYE8Wl+djdUiG8k6SEhds9ViThR+2aMcDLPp8HAfkWzydbdBUjaZ3AGI6fTlwfHG 1mQHZgDAenFtY/7jWMRhHG2OBvDnqWeZ/B5YszhQiJ8wctGqtmW/Vp/FWoEeGzvJxsTc uK60EH5/tMslzDLbFZ9uLwpmJg5zSuNZ/eIbyLAROg95vS4UeXqq9IcwInnyv1k2j+Mv GfDw== X-Gm-Message-State: AOJu0YyOYTsta3YPT9cIml3Owwhms7z+PfmGqhpfrYhf5fjrwDOloohU oJxlNYyW3WIoTbXCtZHA4/AghpeMR/GwOFRFtCrtb32HOFKReeSV X-Google-Smtp-Source: AGHT+IHA7weYyUrfycogo5igjfSHIYf/KNQQ6EACmWwFx5LTK/hHiUyayULhxS5MSYWS/S+hRi1SUQ== X-Received: by 2002:ad4:5cab:0:b0:680:b90a:37c1 with SMTP id q11-20020ad45cab000000b00680b90a37c1mr841757qvh.64.1705490377763; Wed, 17 Jan 2024 03:19:37 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a0c:b384:0:b0:681:7999:1bca with SMTP id t4-20020a0cb384000000b0068179991bcals1253887qve.0.-pod-prod-00-us; Wed, 17 Jan 2024 03:19:37 -0800 (PST) X-Received: by 2002:a05:6102:2411:b0:467:f036:7667 with SMTP id j17-20020a056102241100b00467f0367667mr285382vsi.23.1705490376957; Wed, 17 Jan 2024 03:19:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705490376; cv=none; d=google.com; s=arc-20160816; b=VmiZjbPQ6L00SkjF1lgWya/6GPzq81s41bkRKohBWKB+9BuRR8mEcGp6E3lck3D8mh 4n+T+D56Qec5sQEEQ7+IW/BjRyfH4KkZvy4CiJ0qrIzaW/K7zindui57hX8cn5urbP0t NX5+1lFS4U93tQjYiBaeWI+MkaaroSfX7Hn9ipvHofZR9245Z6BTfdeHUvi5ZYCWT6Bm epU50e0GU8WAV6kL5apl5oMt/1hDoZZkMxj0AfG4lnFV+ZfsCJVKLLCnrlEM58FMg/LX T+Ro1VNzLxXOII2KeAAFeLcWupJtkSIRqZc5Y9YhDQj1vkvvK3VSu4YLPwzn88s0GCKg JKhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=XPtpblRV2GeKv7abkkitNR8MZ3QlUaZVshaXKznMn5w=; fh=xxo2rOAPT4f31TY31yIWVuVlno6QMa2Pdllc3KKolm0=; b=xiyTj7a0rwrlIKYFMjNvqStpDQSvHTupSlOOwrtDCMLTlalUnePoSW5MU0gCfxnhwd OX4f98GN5qnrxt1z5E8FieTDO3xpYlr0mMDCEvT+f4mmgAkqKXNu7cyyhGsKUM9HfxG9 +C65zTj7SvWXwo7DYf1fWlS/WLEC0wvRADjbYI2fXf3FwkOCEgmTfDYmTIfjgFP0E3D7 AXlhL1hJXJOBmNHBATjdmDzio0RVqq7knkMudBOEW4ltBO1u8h1vvTTomy8Leoa2HPqi 8x2XSbnVvV3Gqu+oP7pKt1shuTv4kRDmvHUAeXozEME6ypBXoKCOvPXIu0g8A8XoRcfr mMGw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="G/3dhh/t"; spf=pass (google.com: domain of fm-294854-20240117111935ec290332b68c88faf2-1cd4x7@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-294854-20240117111935ec290332b68c88faf2-1cD4X7@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net. [185.136.64.226]) by gmr-mx.google.com with ESMTPS id cw4-20020a056130220400b007cb8c7adf99si1055969uab.0.2024.01.17.03.19.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jan 2024 03:19:36 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-20240117111935ec290332b68c88faf2-1cd4x7@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) client-ip=185.136.64.226; Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20240117111935ec290332b68c88faf2 for ; Wed, 17 Jan 2024 12:19:35 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Felix Moessbauer Subject: [PATCH v3 5/8] meta-isar: starfive-visionfive2: Switch to upstream U-Boot Date: Wed, 17 Jan 2024 12:19:30 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="G/3dhh/t"; spf=pass (google.com: domain of fm-294854-20240117111935ec290332b68c88faf2-1cd4x7@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-294854-20240117111935ec290332b68c88faf2-1cD4X7@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Jan Kiszka Reply-To: Jan Kiszka Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=0.1 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, NUMERIC_HTTP_ADDR,RCVD_IN_MSPIKE_H2,SPF_PASS,URI_HEX autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Jan Kiszka There are no more reasons to use the vendor tree, U-Boot 2024.01 sufficiently supports the board. Moving upstream allows for significant simplifications in the build. We are now building OpenSBI first and are then using U-Boot to finish all artifacts needed for the image. The wks file is updated accordingly, switching the GUID of the U-Boot partition to the one upstream is recommending. Unneeded options for the first two partitions are dropped at this chance. Signed-off-by: Jan Kiszka --- .../conf/machine/starfive-visionfive2.conf | 10 ++---- .../opensbi/files/starfive-visionfive2-rules | 12 +++++++ .../files/starfive-visionfive2-rules.tmpl | 17 --------- ...ensbi-starfive-visionfive2_1.2+20230310.bb | 11 ++---- .../files/starfive-visionfive2-rules.tmpl | 35 +++++++++++++++++++ ...-starfive-visionfive2_2021.10+VF2-3.0.4.bb | 31 ---------------- .../u-boot-starfive-visionfive2_2024.01.bb | 29 +++++++++++++++ .../canned-wks/starfive-visionfive2.wks.in | 4 +-- 8 files changed, 82 insertions(+), 67 deletions(-) create mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules delete mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl create mode 100755 meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl delete mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2024.01.bb diff --git a/meta-isar/conf/machine/starfive-visionfive2.conf b/meta-isar/conf/machine/starfive-visionfive2.conf index 806d914c..c7f72bb3 100644 --- a/meta-isar/conf/machine/starfive-visionfive2.conf +++ b/meta-isar/conf/machine/starfive-visionfive2.conf @@ -8,18 +8,12 @@ DISTRO_ARCH = "riscv64" KERNEL_NAME ?= "starfive" IMAGE_FSTYPES ?= "wic" - WKS_FILE ?= "starfive-visionfive2.wks.in" IMAGER_INSTALL:wic += " \ - jh7110-u-boot-spl-image \ - visionfive2-u-boot-firmware \ + u-boot-starfive-visionfive2 \ ${SYSTEMD_BOOTLOADER_INSTALL}" -IMAGER_BUILD_DEPS += " \ - jh7110-u-boot-spl-image \ - visionfive2-u-boot-firmware" +IMAGER_BUILD_DEPS += "u-boot-starfive-visionfive2" -# DTB file for OpenSBI -DTB_UBOOT_JH7110_VF2 = "starfive_visionfive2.dtb" # DTB file for booting DTB_VISIONFIVE2 = "jh7110-visionfive-v2.dtb" DTB_FILES = "starfive/${DTB_VISIONFIVE2}" diff --git a/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules b/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules new file mode 100644 index 00000000..452ff356 --- /dev/null +++ b/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules @@ -0,0 +1,12 @@ +#!/usr/bin/make -f + +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- +endif + +override_dh_auto_build: + CFLAGS= LDFLAGS= $(MAKE) $(PARALLEL_MAKE) \ + PLATFORM=generic FW_TEXT_START=0x40000000 FW_OPTIONS=0 + +%: + dh $@ diff --git a/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl b/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl deleted file mode 100644 index 5f35c1c2..00000000 --- a/meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/make -f - -ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) -export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- -endif - -UBOOT_DTB_FILE := /usr/share/u-boot/starfive-visionfive2/${DTB_UBOOT_JH7110_VF2} -FW_TEXT_START := 0x40000000 - -override_dh_auto_build: - CFLAGS= LDFLAGS= $(MAKE) $(PARALLEL_MAKE) PLATFORM=generic \ - FW_PAYLOAD_PATH=/usr/lib/u-boot/starfive-visionfive2/u-boot.bin \ - FW_FDT_PATH=$(UBOOT_DTB_FILE) \ - FW_TEXT_START=$(FW_TEXT_START) - -%: - dh $@ diff --git a/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.2+20230310.bb b/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.2+20230310.bb index f6d6905a..afbba0f3 100644 --- a/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.2+20230310.bb +++ b/meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.2+20230310.bb @@ -9,25 +9,18 @@ DESCRIPTION = "OpenSBI firmware for StarFive VisionFive 2" SRC_URI = " \ git://github.com/riscv-software-src/opensbi.git;destsuffix=opensbi-${PV};protocol=https;branch=master \ - file://starfive-visionfive2-rules.tmpl" + file://starfive-visionfive2-rules" # required patches are not yet part of a release, but will be in 1.3 SRCREV = "2868f26131308ff345382084681ea89c5b0159f1" S = "${WORKDIR}/opensbi-${PV}" -TEMPLATE_FILES += "starfive-visionfive2-rules.tmpl" -TEMPLATE_VARS += "DTB_UBOOT_JH7110_VF2" - -DEPENDS = "u-boot-starfive-visionfive2" -DEBIAN_BUILD_DEPENDS = " \ - u-boot-starfive-visionfive2, \ - u-boot-starfive-visionfive2-dev" do_prepare_build[cleandirs] += "${S}/debian" do_prepare_build() { cp ${WORKDIR}/starfive-visionfive2-rules ${WORKDIR}/rules deb_debianize - echo "build/platform/generic/firmware/fw_payload.bin /usr/lib/opensbi/starfive-visionfive2/" > ${S}/debian/install + echo "build/platform/generic/firmware/fw_dynamic.bin /usr/lib/opensbi/starfive-visionfive2/" > ${S}/debian/install } COMPATIBLE_MACHINE = "starfive-visionfive2" diff --git a/meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl b/meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl new file mode 100755 index 00000000..01bb9156 --- /dev/null +++ b/meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2-rules.tmpl @@ -0,0 +1,35 @@ +#!/usr/bin/make -f + +# Debian rules for custom U-Boot build +# +# This software is a part of ISAR. +# Copyright (c) Siemens AG, 2018-2021 +# +# SPDX-License-Identifier: MIT + +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- +SET_CROSS_BUILD_TOOLS=CROSS_BUILD_TOOLS=y +endif + +override_dh_auto_build: + $(MAKE) $(PARALLEL_MAKE) ${U_BOOT_CONFIG} + $(MAKE) $(PARALLEL_MAKE) flash.bin OPENSBI=/usr/lib/opensbi/starfive-visionfive2/fw_dynamic.bin + spl_tool -c -f spl/u-boot-spl.bin + $(MAKE) -n u-boot-initial-env >/dev/null 2>&1; if [ $$? -ne 2 ]; then \ + $(MAKE) $(PARALLEL_MAKE) u-boot-initial-env; \ + else \ + ./scripts/get_default_envs.sh >u-boot-initial-env; \ + fi + $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools + +override_dh_auto_install: + mv tools/env/lib.a tools/env/libubootenv.a + +override_dh_auto_test: + +override_dh_strip: + dh_strip -X libubootenv.a + +%: + dh $@ --parallel diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb deleted file mode 100644 index 9e1b7251..00000000 --- a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2021.10+VF2-3.0.4.bb +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (c) Siemens AG, 2023 -# -# SPDX-License-Identifier: MIT - -require recipes-bsp/u-boot/u-boot-custom.inc - -SRC_URI += "git://github.com/starfive-tech/u-boot.git;nobranch=1;protocol=https;destsuffix=u-boot-${PV}" -SRCREV = "b6e2b0e85c774a18ae668223a6e5f7d335895243" - -DEBIAN_BUILD_DEPENDS .= ", libssl-dev, libssl-dev:native" - -U_BOOT_CONFIG = "starfive_visionfive2_defconfig" -U_BOOT_BIN = "u-boot.bin" -U_BOOT_SPL_BIN = "spl/u-boot-spl.bin" - -S = "${WORKDIR}/u-boot-${PV}" - -# install dtb files for opensbi -do_prepare_build[cleandirs] += "${S}/debian" -do_prepare_build:append() { - # also build and install spl component - sed -i 's|${U_BOOT_BIN}|${U_BOOT_BIN} ${U_BOOT_SPL_BIN}|g' ${S}/debian/rules - echo "${U_BOOT_SPL_BIN} usr/lib/u-boot/${MACHINE}/" \ - >> ${S}/debian/u-boot-${MACHINE}.install - # install device tree - echo "arch/riscv/dts/*.dtb usr/share/u-boot/${MACHINE}/" \ - >> ${S}/debian/u-boot-${MACHINE}-dev.install -} - -COMPATIBLE_MACHINE = "starfive-visionfive2" diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2024.01.bb b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2024.01.bb new file mode 100644 index 00000000..9f819c3e --- /dev/null +++ b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2024.01.bb @@ -0,0 +1,29 @@ +# +# Copyright (c) Siemens AG, 2023-2024 +# +# SPDX-License-Identifier: MIT + +require recipes-bsp/u-boot/u-boot-custom.inc + +COMPATIBLE_MACHINE = "starfive-visionfive2" + +SRC_URI += "https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \ + file://starfive-visionfive2-rules.tmpl" +SRC_URI[sha256sum] = "b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3" + +DEPENDS += "opensbi-starfive-visionfive2 jh7110-u-boot-spl-tool-native" +DEBIAN_BUILD_DEPENDS .= ", opensbi-starfive-visionfive2, \ + jh7110-u-boot-spl-tool:native, \ + swig, python3-dev:native, python3-setuptools, \ + libssl-dev:${DISTRO_ARCH}, libssl-dev:native" + +U_BOOT_CONFIG = "starfive_visionfive2_defconfig" +U_BOOT_BIN = "u-boot.itb spl/u-boot-spl.bin.normal.out" + +TEMPLATE_FILES += "starfive-visionfive2-rules.tmpl" + +S = "${WORKDIR}/u-boot-${PV}" + +do_prepare_build:append() { + cp ${WORKDIR}/starfive-visionfive2-rules ${S}/debian/rules +} diff --git a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in index 99156f81..ed8a3b71 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in +++ b/meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in @@ -12,9 +12,9 @@ # 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 +part --source rawcopy --sourceparams "file=/usr/lib/u-boot/starfive-visionfive2/u-boot-spl.bin.normal.out" --fixed-size 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 +part --source rawcopy --sourceparams "file=/usr/lib/u-boot/starfive-visionfive2/u-boot.itb" --fixed-size 4M --part-type BC13C2FF-59E6-4262-A352-B275FD6F7172 # EFI part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot,dtb=${DTB_VISIONFIVE2}" --use-uuid --label efi --part-type EF00 --align 1024 # rootfs