From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7193944713273016320 X-Received: by 2002:a5d:6090:0:b0:2be:3539:269 with SMTP id w16-20020a5d6090000000b002be35390269mr1392802wrt.499.1674970821100; Sat, 28 Jan 2023 21:40:21 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:1d83:b0:3dc:5300:3d83 with SMTP id p3-20020a05600c1d8300b003dc53003d83ls439008wms.0.-pod-control-gmail; Sat, 28 Jan 2023 21:40:19 -0800 (PST) X-Google-Smtp-Source: AK7set83VGGGLkkZGJvJAArAOw3GD1x6fD/EyS69l0vT8bx5U0QCjSie99E1RkHDrh6eyP4EpzNv X-Received: by 2002:a05:600c:2187:b0:3dc:353c:8b45 with SMTP id e7-20020a05600c218700b003dc353c8b45mr10220632wme.1.1674970819561; Sat, 28 Jan 2023 21:40:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674970819; cv=none; d=google.com; s=arc-20160816; b=dGQUHkNqmTRw2qMxYmTJAMyeb3JYF3jb7cYW5XLSKUMfCfbEFEWVgHbqZ14ZR1rKGK r8I/NDhZNPso2DqTIvZTdud6LozqJDMqQGWFBCkESyjPAPYVbV4WEe1Tlm2GSmxg2BGL OhExmd7G7D9rREN4zUc8rTxSn6tk4GyWw/6kMEm1V17L2FOOLvFqAy0y+dGdsy8nsdKe 6uwgPu10G0nXZaSPWTETbbj+Jww1wB8isdat+2kuBVvsbOshgoJ20+qR4RuvgXySyRxo 6kTnA87By1T8xAI5WdfL+0DAu5EZV4i4oVhLCKBIv0RfZGefVG1MuUdSih4/dVu9O1nd Mn5Q== 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=QAV44vC1Mo/BDKpqBskPgOQaAj2g/iS5cbm0pfgKsX8=; b=jIyaLwnSuWqoLuX7hBKgXvG1MAv5r3PW7KVc96xYyp35uF1akCLLSnswylmKugr8Qv HGrji+IPK58IbN2QaFMv1fKr/k+LnKrIc31Og4T9C1M8KrzLim+k9bh08U+KYViaXY+5 9DOw1dElBgK12v6akvtYV5rUzcegNl2iisGPSsVKCMv3DpQme0Y1NwJaZ1P4cJpw7MOo 81cT3e4/fIXrwGj14nFWPcaX80gBa2Tn5jQ7S8tXB5QuWnzzxxVt+f4BtvXg7cW6P1Z5 77j1G+tYiy1DiphE5qnPQBUvNyQgI/KiQN/qy2Ts9SGXNdbjs0z+Be9Kdeu4FngMc/iE wZ9g== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=WoprM4OT; spf=pass (google.com: domain of fm-72506-202301290540198fc8a17991f536d0da-eqyru9@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-72506-202301290540198fc8a17991f536d0da-EqYru9@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id bi21-20020a05600c3d9500b003dc43c78e98si259629wmb.0.2023.01.28.21.40.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Jan 2023 21:40:19 -0800 (PST) Received-SPF: pass (google.com: domain of fm-72506-202301290540198fc8a17991f536d0da-eqyru9@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=WoprM4OT; spf=pass (google.com: domain of fm-72506-202301290540198fc8a17991f536d0da-eqyru9@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-72506-202301290540198fc8a17991f536d0da-EqYru9@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 202301290540198fc8a17991f536d0da for ; Sun, 29 Jan 2023 06:40:19 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=felix.moessbauer@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=QAV44vC1Mo/BDKpqBskPgOQaAj2g/iS5cbm0pfgKsX8=; b=WoprM4OTBUK2tMqlTlri77dOK8+bKTemNuSgCSBimtg34WgSdkput7jXHvrY2RUdHzzVQD EK1YgBd1fPLf+rDGuzD47iF20u2zeEtyMzsSn8wf03tupSWbxKnWgAgWQdftlF69kN0+kEsv hZ7i7zOVaJID/CGSR4/PNLzbHKJpY=; From: Felix Moessbauer To: isar-users@googlegroups.com Cc: daniel.bovensiepen@siemens.com, jan.kiszka@siemens.com, florian.bezdeka@siemens.com, Felix Moessbauer Subject: [PATCH 5/7] starfive-visionfive2: create u-boot-spl firmware Date: Sun, 29 Jan 2023 05:38:54 +0000 Message-Id: <20230129053856.4014419-6-felix.moessbauer@siemens.com> In-Reply-To: <20230129053856.4014419-1-felix.moessbauer@siemens.com> References: <20230129053856.4014419-1-felix.moessbauer@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-72506:519-21489:flowmailer X-TUID: sdb4PpL+HvrF Signed-off-by: Felix Moessbauer --- .../jh7110-u-boot-spl-image/files/install | 1 + .../jh7110-u-boot-spl-image/files/rules | 13 ++++++++ .../jh7110-u-boot-spl-image_0.1.bb | 30 +++++++++++++++++++ .../jh7110-u-boot-spl-tool_0.1.bb | 23 ++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install create mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules create mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb create mode 100644 meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install new file mode 100644 index 00000000..c300f842 --- /dev/null +++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/install @@ -0,0 +1 @@ +u-boot-spl.bin.normal.out usr/share/jh7110-uboot-spl-image diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules new file mode 100644 index 00000000..3c28b2c0 --- /dev/null +++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/files/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +U_BOOT_SPL_BIN := /usr/lib/u-boot/starfive-visionfive2/u-boot-spl.bin +# taken from https://github.com/starfive-tech/Tools +OFFSET := 0x01010101 + +override_dh_auto_build: + cp $(U_BOOT_SPL_BIN) u-boot-spl.bin + /usr/lib/jh7110-uboot-spl-tool/jh7110_uboot_spl u-boot-spl.bin $(OFFSET) + mv u-boot-spl.bin.out u-boot-spl.bin.normal.out + +%: + dh \$@ diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb new file mode 100644 index 00000000..08c53b51 --- /dev/null +++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-image/jh7110-u-boot-spl-image_0.1.bb @@ -0,0 +1,30 @@ +# +# Copyright (c) Siemens AG, 2023 +# +# SPDX-License-Identifier: MIT + +inherit dpkg + +SRC_URI = "file://rules file://install" + +DESCRIPTION = "StarFive VisionFive 2 u-boot SPL" +DEPENDS = "jh7110-u-boot-spl-tool u-boot-starfive-visionfive2" +DEBIAN_BUILD_DEPENDS = "jh7110-u-boot-spl-tool, u-boot-starfive-visionfive2:${DISTRO_ARCH}" + +# this is a host tool +PACKAGE_ARCH = "${HOST_ARCH}" + +do_prepare_build[cleandirs] += "${S}/debian" +do_prepare_build(){ + deb_debianize + cp ${WORKDIR}/install ${S}/debian/ +} + +do_deploy() { + dpkg --fsys-tarfile ${WORKDIR}/jh7110-u-boot-spl-image_${PV}*.deb | \ + tar xOf - "./usr/share/jh7110-uboot-spl-image/u-boot-spl.bin.normal.out" \ + > "${DEPLOY_DIR_IMAGE}/u-boot-spl.bin.normal.out" +} + +addtask deploy after do_dpkg_build before do_build +do_deploy[dirs] = "${DEPLOY_DIR_IMAGE}" diff --git a/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb b/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb new file mode 100644 index 00000000..76d82015 --- /dev/null +++ b/meta-isar/recipes-bsp/jh7110-u-boot-spl-tool/jh7110-u-boot-spl-tool_0.1.bb @@ -0,0 +1,23 @@ +# +# Copyright (c) Siemens AG, 2023 +# +# SPDX-License-Identifier: MIT + +inherit dpkg + +DESCRIPTION = "replacement for proprietary VisionFive2 SDK spl_tool" +LICENSE = "CPL-1" + +SRC_URI = "git://github.com/electrorys/jh7110_uboot_spl.git;branch=master;destsuffix=jh7110-uboot-spl" +SRCREV = "e089116b902240659c1dcd6cbb6537dc4c1e316c" + +S = "${WORKDIR}/jh7110-uboot-spl" + +# This is a host tool +PACKAGE_ARCH = "${HOST_ARCH}" + +do_prepare_build[cleandirs] += "${S}/debian" +do_prepare_build(){ + deb_debianize + echo "jh7110_uboot_spl usr/lib/jh7110-uboot-spl-tool" > ${S}/debian/${PN}.install +} -- 2.34.1