From patchwork Tue Jan 9 07:33:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3269 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 09 Jan 2024 08:33:40 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f55.google.com (mail-qv1-f55.google.com [209.85.219.55]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4097XdqC021585 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 9 Jan 2024 08:33:39 +0100 Received: by mail-qv1-f55.google.com with SMTP id 6a1803df08f44-680118b101fsf58350306d6.3 for ; Mon, 08 Jan 2024 23:33:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704785613; cv=pass; d=google.com; s=arc-20160816; b=inrn2MBvgoi/DDeLaDciPE3hCMWudOl0Xh+i7ff+q8xd9fX1tHYBWU6MFiTzy/Uax/ DjvziIX7BtLhdQ7vS4KoLRWLC5s+7ToAum+wWbP7t0cwLxEswsvQUKaRZhaUSkvTxTTR zic95rH5UGpHxy0t+c6fftJmueZQoz5JZK8DXv3tB9CY8pSFOl3vbfRDIpQugnDu0usx jZbKCQ1WVG+kQ+lujKr5gp1AYkw1kOYo5GlUFWdf5kDXrBm4fGR6oTA9sBsFTD7P6u1h PTtZGsYZz2gIEIYJd6Bqzsynbw6+g02E7qJRg4s2uwIX86mmA04yrIYqzqHNxdkQKch1 msTw== 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=zg5H78woy8hK6K0yFKobyPBkol5lUDeHRn6Yv4R8akk=; fh=xxo2rOAPT4f31TY31yIWVuVlno6QMa2Pdllc3KKolm0=; b=CNzReB291gYnaVi0FtqgLyfNWyLh2EX3UoTwrX7oQT451ewLQFyREGBUe4WFLbdO05 Ry2VU7je15YI8wjuoc4NqJIKEbUTRPSCTuuzKc/ZcVgI0WOsjM84JrVeIXSG2NlXDANP 9jIjDBePtaByRzLp/5HT9/5j4Ssp91Tr3uqXq5O5VR71Izbyp0N+LqKBPpea1eMLyOfc 9kym3ceW7LyxoZFpsHO3tOQfh5s0y6w//dGy8O4DXtyktdAq2KN0/3MQP+N8gfFA2axI tUxgCW77WRpSqs3z2YCyLsI+DI77EurrzWsdYdnjwBuwQgMAOaHHgMrYDevtsgpdLF6k g5HQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=CrWlOaiV; spf=pass (google.com: domain of fm-294854-202401090733322bb8b3970bcf18b14d-edtm2m@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-202401090733322bb8b3970bcf18b14d-eDtM2m@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=1704785613; x=1705390413; 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=zg5H78woy8hK6K0yFKobyPBkol5lUDeHRn6Yv4R8akk=; b=worcDZLqsM6x6oF7Dq0aakDHzQyQh4xjQW5vP/PT77kwUQ8noCFFHlunx/soaz9ieE vDtMX70TvQhwr6Fz2lFdb9KGYwipca/jo2lNcklKLyMNxjfqtF34VpK3h4bf5AJfMwel xNUNhCMz5gIDpeTPYfnphe6yV1Yec2M9a49eL6ROwJwYuys2t9KQxsJ0WXr3cFL67/Nz UtvU4xAhlR0haNrlCQHnQk2faCVqCKFCOJ4zl7MdE2FS98beZ0OqlxfE1S2NLcUFKDq/ /OSgjik4wQM1EPz/p0rv3jOi9w42w0ert5J0jMp9hgSbYPcJy99u0sDHnVxf6LL2k0gT QHUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704785613; x=1705390413; 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=zg5H78woy8hK6K0yFKobyPBkol5lUDeHRn6Yv4R8akk=; b=evG9jMloItVJPVxI8Uvu27E5eHaeilph9fSy8mHbHon96fxCH7AmCVhsceMOgletLk GpLbcO1NgxnNX43qW/5o0aopxz5eMtB4TMEhgC4Ww2bD3MidJJfesNHWSvYEMBjw7gAj H89WeCrIRh5fayx3bHwIwGkM9bKiHkwKEZhi72A3G4UF65UEtFnLP7Ux47B3Ig34JWE8 FAV8tMnuJNMK43YuWoZuFvFiSjfi4136wD/+EcElIYIFo4tbN/nzOg4AqXf3xSEmebBQ lqI5oCkw8rZs4mkWAWDL3YKJGjokLSWcHTQwR+RA1QCC6u+oHLocD/vAn3OgOTnZn+rJ l30w== X-Gm-Message-State: AOJu0YzF0LcUyCgy7CbBSIyfjiEWoMxq+LfSh47Bul2h0HsbvuESnz5D CSc9kzxK40B0NvqODo8RRO4= X-Google-Smtp-Source: AGHT+IFLgMfZWUaV2xRXOhMw+pJmH7wTTynPia/tavj1YEookHbZwHWF3NmvzLp8zHRwfnGGe77TZg== X-Received: by 2002:a05:6214:1c44:b0:67f:d69e:9c45 with SMTP id if4-20020a0562141c4400b0067fd69e9c45mr7051172qvb.11.1704785613577; Mon, 08 Jan 2024 23:33:33 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6214:260d:b0:67f:38e1:6983 with SMTP id gu13-20020a056214260d00b0067f38e16983ls1863215qvb.2.-pod-prod-09-us; Mon, 08 Jan 2024 23:33:33 -0800 (PST) X-Received: by 2002:a05:620a:4506:b0:781:1c3c:da61 with SMTP id t6-20020a05620a450600b007811c3cda61mr5966824qkp.154.1704785612751; Mon, 08 Jan 2024 23:33:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704785612; cv=none; d=google.com; s=arc-20160816; b=pwAuVT645AVDf5otzkLNtINuLk3qlHQ+QDZmT1nJNjPcWHG2rhL3HDTP1KtdC1xm68 XtRABULxuNrpQYjAuOk+gqAzktdvGEjDAizPrFHbMt8dftMdCr8L0LZEenbrQrXaIa8B CffnL71xpeQ/Ptjn+w2T8Qt7x0we+uVKKNvEwCu1Uh0id3bSg+Nb5BK9tF2J3jY9Xzxa 3neIZhuA4XXg4I+wAnypbUn9TsM2kOnRlCPPATG5VEOp/oB5GN2Chq0wsbWmG/G/7D67 wkUs/oFtLMukaUe2NATr4/gWZ2UjVD2BIgEdl19wG4zfh8uFswu5eOZ+THC/RFhJfIxe Tu2Q== 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=whX3ebLF0KsQg+nAPU8R8d4LP74hTyJLlDvDPkAPbH8=; fh=xxo2rOAPT4f31TY31yIWVuVlno6QMa2Pdllc3KKolm0=; b=VkIsiBYOk574cPguxOf3Q8RicxRYP1ovLYdE3HZy7rxZwVkySSDkIwv1+cqWr4VYap gHicwwq9tFdJVUVswFbVycBzx0CI92aVLLKcthcYLL+MQOJptaOS8G6hUb+vPeyd7Chi u7RWMu7tE6esufCrTn3mdvAnb2b0mN5hf3e/eHbhNyxhXK2odl8i+bDWLEkujqp+I7X+ NF4BOA+HiZZzj01ml/ZgDT2SnbpiZSFzblodwhk3XXwfkActTXUlbhjRP43YOixgbuKU pF5lgRtzsKkzz6RhgHZFwEi8+3R7uqgQsY5SFN8b3pXgw+4sJPVkSWuBvYULUpV13Zoh 1umw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=CrWlOaiV; spf=pass (google.com: domain of fm-294854-202401090733322bb8b3970bcf18b14d-edtm2m@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-202401090733322bb8b3970bcf18b14d-eDtM2m@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net. [185.136.65.225]) by gmr-mx.google.com with ESMTPS id tv4-20020a05620a3e8400b007811b471a29si85011qkn.4.2024.01.08.23.33.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jan 2024 23:33:32 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-202401090733322bb8b3970bcf18b14d-edtm2m@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) client-ip=185.136.65.225; Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 202401090733322bb8b3970bcf18b14d for ; Tue, 09 Jan 2024 08:33:32 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Felix Moessbauer Subject: [PATCH v2 5/8] meta-isar: starfive-visionfive2: Switch to upstream U-Boot Date: Tue, 9 Jan 2024 08:33:21 +0100 Message-Id: <1cf405a41709494b23ce75f83d8c4047f67214c6.1704785604.git.jan.kiszka@siemens.com> 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=CrWlOaiV; spf=pass (google.com: domain of fm-294854-202401090733322bb8b3970bcf18b14d-edtm2m@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-202401090733322bb8b3970bcf18b14d-eDtM2m@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 2023.10 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_2023.10.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_2023.10.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_2023.10.bb b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2023.10.bb new file mode 100644 index 00000000..5428080a --- /dev/null +++ b/meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2023.10.bb @@ -0,0 +1,29 @@ +# +# Copyright (c) Siemens AG, 2023 +# +# 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] = "e00e6c6f014e046101739d08d06f328811cebcf5ae101348f409cbbd55ce6900" + +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