From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7198826225008115712 X-Received: by 2002:a05:651c:19a0:b0:295:9626:a1d9 with SMTP id bx32-20020a05651c19a000b002959626a1d9mr1380314ljb.1.1679059304698; Fri, 17 Mar 2023 06:21:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:368f:b0:4e8:6261:7dc1 with SMTP id d15-20020a056512368f00b004e862617dc1ls380670lfs.2.-pod-prod-gmail; Fri, 17 Mar 2023 06:21:43 -0700 (PDT) X-Google-Smtp-Source: AK7set8XTKeyc8mTmkGyfEK9jl2kMLSJqg8lM43GW0JZ8ZNGN0GCH3mHPEhpYfZ6NSpqzdYWmUEd X-Received: by 2002:a05:6512:11f2:b0:4e8:20f6:83f4 with SMTP id p18-20020a05651211f200b004e820f683f4mr3963452lfs.21.1679059302915; Fri, 17 Mar 2023 06:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679059302; cv=none; d=google.com; s=arc-20160816; b=vm3QQ/1jtrACXXwDcoBFjvIVfGe+iwICvorPOtVfUL8AZaK6yZ6372iSDD6vMJ8YHw roZUEU089AQBVqJ1qKNMmlU18XKRp6CmAFMI7X9N/q+M+NtgZ7+k6lbkC+E0holuq1id 6gNMxyue1UI8RGn1K+sPSF64gB8wMmcae3LFH2jdnbZl0L3U56H164HQDjf3hEX+3Lvw Sibdv3pWpATyXiCM+vO0Ow1KEPLXF3s2DqH2of1KVy67Fcw29hSQG4kmzUlZK8nBfPmU lesE7RPweGfaO5d9cspTRBpU5Kp1fiwRb2mmUTe5HNFdBYsjmCS6BWbG90VPXhdK6Z+9 bzyA== 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=TLVkVmIvLjwhPQy/ffVzGrV4BjAnfPRswlK/62HOJmQ=; b=AUj59/9lmd5azXrJMoKkSkqonMG054dJBmS3Y0s5oUGD1h4FqkvVNNKMACnX/svPlD mVS/7w3uciaFGmpp3ZkIsTkVHAdm6KgF82W3C5cKWlaIVGYOM6U4MJmnf+bOmcicQhYZ O9bbLYWhyM8DY6bvM7xVpVFjbfL0ApvHDRzhTfPqARCVCpxXBFGJXrA/jKAXHB/o2pxs +XmOO3qY/8pYkxBOHffpFxmpjUnvK8l9MVOKCtg8z2xMlSh+zSwK9grznOUEIasf3ffT B0lMnciGbyTeJdi1qnE9JsvwB6buQXwnAUauKFfZFROfpTMobGgYgX0ANStVRHOy1rYh 5Muw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Gouf1dTs; spf=pass (google.com: domain of fm-72506-20230317132142a16e3c14f119e49f90-e7u57l@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-72506-20230317132142a16e3c14f119e49f90-e7U57L@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id b8-20020a0565120b8800b004e899899d5csi94422lfv.5.2023.03.17.06.21.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2023 06:21:42 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-72506-20230317132142a16e3c14f119e49f90-e7u57l@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Gouf1dTs; spf=pass (google.com: domain of fm-72506-20230317132142a16e3c14f119e49f90-e7u57l@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-72506-20230317132142a16e3c14f119e49f90-e7U57L@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20230317132142a16e3c14f119e49f90 for ; Fri, 17 Mar 2023 14:21:42 +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=TLVkVmIvLjwhPQy/ffVzGrV4BjAnfPRswlK/62HOJmQ=; b=Gouf1dTsmMn0Qumm/++Uf5j9kpPVRf+bWvc7m16ToZ/2QN374CiL5Wa3m7aJnL0UEPu7Jr AnqFcAyNVFDXg9cMGT3mFNGKAbj+m2xNMZXv2opegESRgnjXeAqgQOJwQFSzKcyE2bOeo1hi v/8wY03TUh9q9BPH9z+yzpm8xWzHc=; From: Felix Moessbauer To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, daniel.bovensiepen@siemens.com, florian.bezdeka@siemens.com, Felix Moessbauer Subject: [PATCH v3 5/7] starfive-visionfive2: create u-boot-spl firmware Date: Fri, 17 Mar 2023 14:21:04 +0100 Message-Id: <20230317132106.1111258-6-felix.moessbauer@siemens.com> In-Reply-To: <20230317132106.1111258-1-felix.moessbauer@siemens.com> References: <20230317132106.1111258-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: mseKjIWO6mSr 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..1991e61a --- /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;protocol=https;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.30.2