From patchwork Fri Mar 17 13:21:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "MOESSBAUER, Felix" X-Patchwork-Id: 2735 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 17 Mar 2023 14:21:50 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f62.google.com (mail-lf1-f62.google.com [209.85.167.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 32HDLnkH005539 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Mar 2023 14:21:50 +0100 Received: by mail-lf1-f62.google.com with SMTP id i16-20020ac25b50000000b004b565e69540sf2019657lfp.12; Fri, 17 Mar 2023 06:21:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679059304; cv=pass; d=google.com; s=arc-20160816; b=V1Z945K4VdqUOreoVLN5aRIzCHRpJczSv4p5+0yqdBtGSRF875E5w04DkGh41KzvJv Q0WL/UEWkW+SVGH0/oB1J5GiwHLRAwyAkVjZFMMAfGE4bdiMyaIEPuECroewwXng64lB IRVkMBCyiLwSr5puFDmlGVlWD8KUv11vb5EGZ8NQ8YPxIXTUvv6toL3DsDmElajQNDyc uzUl3ruWU/9Iu53EGsuZqg6HnWDxk4m2sHfRS2SOCfv7Jh8vVdZBLzdKBZw64Yj6mkyP rF+KDrT1rfgeJ4sK0/9wWF50p/Hn5ZaWKzUpiGdt+mcmGmK5fAgVcaG2FEywWL5UNpQT aIEw== 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:feedback-id:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=12FczjzHlziVaPARKAgj7ZHCGU1CQzXUYspQbr5hC40=; b=qG4kBR/d8dew+KJqxsmgbYbHtdTwy41E5+sBFNKIyH7sHmcFTvDe0ZlIDtC3jcqlVE 5E/pyP/MuMPq9dd1cxquqQ6KHbBfqp+07kcoilniWKaEWX2xV4Uhh7+3b+mhAxnA9g4t F6J0C8AIo6nWIGky6g4FLY6vbylmBaNJV5UjBMWm+y7R789tUmMmjdp86TiOHP6+H5CH vOizRlAyOXLZhVFuK7iyYQ3pjVRVPoy8lBLoOjF6tUb8evchbXrBcvtq1XCQNZze86kT O3u/PaFiBRNGpJzvdMMIGCo3KZWKFqLPfzVuHaw3ZxVXlOFgrjWCJy8YsWrmFMKBi7G3 0YnQ== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1679059304; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:feedback-id:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=12FczjzHlziVaPARKAgj7ZHCGU1CQzXUYspQbr5hC40=; b=SUtkHZBItWYMLgeXKR7OnqgtBmJe210mbSABEqIBcy+TI14qUItVjQBEvs8SnVyWYZ 7S8O+76Dp/nKht7Ei+H7LZtoXe3dogqfL8lLi3q0vZLIAYV6FjASpJV05ajXjgncIlwi tc437w2hUYH6p/8ZrMbviHF1+ZBlGomEzCgLvJaWIyn4axpQG2ONLumWxed6JKj4otEs EXUIMYo6TC2FB28+a0JrZqH/G6HF3yAsq0a0PMp8HxJ2H1xDaPe6psO7stuNB65+i4HA qaKll+UgQC044OCznVT7OGcU3YLD8OMIsxpfIbBZxVgyXeRZKBQ+4XYdGdXCrqfZ+1q+ /8sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679059304; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=12FczjzHlziVaPARKAgj7ZHCGU1CQzXUYspQbr5hC40=; b=yxNHT8p8ECU0MvzTi0qWRz0hPVmOCcIwzLB3mxgTzu6wo47j/MwWS2R4MA6liiqntc Mp76aHcI1IYAR2EVgY6Btn96UyO0Nn3uq+rxJYk0jwc4B4Vp4k/WempENMh9X0KeD8+R LWf4qb9/q2BwlZhR+9Nd7hdsMBRAz+FsnxSyYSqQz4IyKSUnXVH46jdcdV3Xhf6hzfkA kzfnSqgoI6dXf4mO7FXDmPUipq4br5gnrq6KTFIRWMAy3nNIlJLR1x6DwQxu+TmWzz7k o0c+fA+OOr/6n1YOIDQzJOtNHSM7J7yRPFT7b4BQPovIrW8Us67z3nwMFFCgzW7HWz6g vUsg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AO0yUKUeqRow6QpnB8BgrC8NGrDzn87qGRhN5AC3NnLYWneLqxWTD847 qUp+CBRrgdbNFA6Q2Tc4jxU= X-Google-Smtp-Source: AK7set8MarjUtoiFb5GlLQeTyXsi47ruW6/CiFKMF1HE8DRJ9enSCWyX5OoFEFhWURfEuzU6h8h6NQ== X-Received: by 2002:a05:651c:b9b:b0:293:4be3:9e6c with SMTP id bg27-20020a05651c0b9b00b002934be39e6cmr3371538ljb.1.1679059304634; 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-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 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; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20230317132142a16e3c14f119e49f90 for ; Fri, 17 Mar 2023 14:21:42 +0100 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 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-72506:519-21489:flowmailer X-Original-Sender: felix.moessbauer@siemens.com X-Original-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 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.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable 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?= 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 +}