From patchwork Fri Mar 17 13:20:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "MOESSBAUER, Felix" X-Patchwork-Id: 81 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:35 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f63.google.com (mail-lf1-f63.google.com [209.85.167.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 32HDLYUp005484 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Mar 2023 14:21:34 +0100 Received: by mail-lf1-f63.google.com with SMTP id o23-20020a05651205d700b004cc7af49b05sf2029301lfo.10; Fri, 17 Mar 2023 06:21:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679059289; cv=pass; d=google.com; s=arc-20160816; b=GsmV0izOu+BA+shV96birXy1+p+Bcxw8WHyTAMg7ithhgJh5omscw4YG+KLZq4Haz4 YTce8qjybYiY4Hho5uBA/lpI6qjfCeBFGS8+z3T3lV5BbtHnFTQgsJoXEs+AAK8DlRUU 8AQmSKASX9a9dMvSJ9URrMwo3dGvapiRnsPv6I0kSWFR8LQqEey+czziU3nyU77CfhZ0 /asOGMnk1A87m3Zvo4TaPndWPMCmELXKODd1qQuZwI8qXpmOjs9tZ5C+KsL1TwSdyfHk eBRewcsD/ga+iwO/AlyhqTaYpjH88/7SU8gp4sLEgF4Frl6NVpPK25s2Rh+Ci5jY+R8P WNFQ== 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:message-id :date:subject:cc:to:from:sender:dkim-signature; bh=HbgzCQuxvwzBfGC7QhxkxwFxGzEqR+VI6IXnAEtdVsg=; b=H2CN7Euqeu7yRcgLxV7mlmMjY+h7kOndwbSsoHwUwqAqBNsuKF1X4tDpxwLxnn8U4J 5rv+Ekv3Z+2xd1iq2Er65QU6b8GfbKwEi1+JpGP1TFqgfdT9a2/8PNQnuos0FXG4ge4p vT3p13WdaKHk+4SxOS4Jt17Oj9G1RBgsfJFrTq7IuajDVXeXNAHrCBHXkh+oq/ooTl+I EvGA5b6eOR9VayHVMrhV8QeHRGGPl7voqJG0YwOwZgCwrq6S0BMJHlgmkOjBmFvWED/3 TwVIqC+kCt/NOIvj5lzBn6iY40f8XSJb3VJLkVQIHh+TOQPfzpYD4dknRPNKCJUp7Se3 GTgA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="c88bh2/g"; spf=pass (google.com: domain of fm-72506-2023031713212416925433ec3e661dae-jarcf_@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-72506-2023031713212416925433ec3e661dae-jArCF_@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=1679059289; 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:message-id:date:subject :cc:to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=HbgzCQuxvwzBfGC7QhxkxwFxGzEqR+VI6IXnAEtdVsg=; b=kX35/19V6bguRz9VPD6iBuI34fYFp0JlJZn1hieReaJGXcUoTiHUmtJaPEHNLWClHo XS2HhXsQ2UORx5n33y9Bkj13ftwNH58a/WLCsXdRHN7KMiT3VRMVI+ZAMisrn4f8VfPj Ui6aONL0mgOZe8Jmz2ZTOx4BCTCgBbfqHP9B7hjveGP7d3Gv4IrKVfxUK+SmVjSon8Qk LhoZ03//4Umi95hp87VU9ggIgyVxlH91OgxwB+8OAy4AYQbY3hAVbgylX2qVxgWEwyiV trFgGin4+PnBc6Gdoy3f2XxYi+vLo1Yw3YERglLceR60u0ZFCG/1wHi/fHePdY6zdwPi KvHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679059289; 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:message-id:date:subject:cc:to:from:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=HbgzCQuxvwzBfGC7QhxkxwFxGzEqR+VI6IXnAEtdVsg=; b=5UC0YXsWvqmqQhMdD+LEiNNl9H3dk9xIGGzelVPgpceqoIeply5cx9ggJ7lFDADIOu yvEWp64QAViv9KdrMBp4YJPQXAZEbOkQWqCdlgfANxxzWGcry6Obfkre97YpAcD1Kb2/ 4T4FuQ0U4M6AuYoky+/epRY2eCdB5IV0VSfQVasNi7WLfoReemB5C+rhXWR+dHP5LoNs iwOdr1+UVa6TpnQ7vALgzloWLGABNk3zraObyNJzMRcwZ9Bj2r4syvc6P1V94V2wqQqT M2/G0beBsZOvNq/+YNcjH8T+VRW5oP4s73yAKtkC2KwHbxgp1l4c5L2mZGEtD+urW/+t l+zg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AO0yUKWpfKVcuLyx/FC+8GOg6dHr8rTneAGMJkkqP1kp0M4psYbvA5Ka lFdAqSibHZdDcKctoXGGXno= X-Google-Smtp-Source: AK7set9aa0uINcbgvFEz7E/sB00UaeekNfVWWMu3/myOfJhLa5yFmu/3kJnSqx0urvprxYhesciIeA== X-Received: by 2002:a2e:8e33:0:b0:298:72a8:c6c4 with SMTP id r19-20020a2e8e33000000b0029872a8c6c4mr3305613ljk.9.1679059288872; Fri, 17 Mar 2023 06:21:28 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:651c:222a:b0:299:8859:2407 with SMTP id y42-20020a05651c222a00b0029988592407ls1044752ljq.1.-pod-prod-gmail; Fri, 17 Mar 2023 06:21:27 -0700 (PDT) X-Received: by 2002:a2e:82c2:0:b0:298:a124:dd8d with SMTP id n2-20020a2e82c2000000b00298a124dd8dmr3118290ljh.3.1679059287060; Fri, 17 Mar 2023 06:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679059287; cv=none; d=google.com; s=arc-20160816; b=oRTR6yibJvk88Q0QXZBFmKTuVV+4T95M8ODVhldjsfOXlwhC8tLySWFJsf5sKiQ+45 ATAWQ/8UjYZPdFxYW4BOgaZEja9+zBtbWJllDp2pzkSaKWBtgwfGPa8N0TsesU2K+9Tw Tn8VA/CSJFa+WN4xufAAm/FfSh9sduC3w3Z54eDjLHA1cGW9L5idknzpiUifkaBniypu 4omwhgQ0iOCBIWpHrnLcvZdH7ZIRsy33/afru5I0wr8EtNeajSv1UhLOfuscurzSt+23 UqpY/0UfjUcdMsN2Mj5a2cMPapVDGdL7Yt+KmEKruslY1PNF/RUxvxUa4305FzfxJ8zA ZMkw== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=sNgxHsW2oETg38yr33le2dytcBl8gQqn/JqZV5sHiC8=; b=xWl4JrDk/XSaGaLvNKFNF5Ed23fr7XKAdbrtd1ktq9RX6bKrUcuMX2nD7HYCN6chD8 jbKDNS0Gv6m5JsXsPUNcPcaBn0KP2JMwL4VHxFQJd/8JwI71OToB2VvTAYYy8uZb/F+m YgDEJVLYsFvSTWTcU/ddUZvQ3DcCGlNO/Yd4uUufbaOt4LsPJdy/jeaXVqvXumc72Ahx IpH/djGxecZlWX8vhln2zaMd8xppolkoBRR23CpVkhlTgD1h1NV6sMeDnuBCMR7sAAjP x3b/6Asfog82Xk5HCx/nkjiVEhqv5+SY+mhMFqLuqxjiv6fLB01wiCgJlRqhlqLrh8LJ WWrw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="c88bh2/g"; spf=pass (google.com: domain of fm-72506-2023031713212416925433ec3e661dae-jarcf_@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-72506-2023031713212416925433ec3e661dae-jArCF_@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE 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 5-20020a05651c12c500b002959f20a2afsi99142lje.8.2023.03.17.06.21.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2023 06:21:25 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-72506-2023031713212416925433ec3e661dae-jarcf_@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 2023031713212416925433ec3e661dae for ; Fri, 17 Mar 2023 14:21:25 +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 0/7] Add BSP for StarFiveTech VisionFive2 Risc-V board Date: Fri, 17 Mar 2023 14:20:59 +0100 Message-Id: <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="c88bh2/g"; spf=pass (google.com: domain of fm-72506-2023031713212416925433ec3e661dae-jarcf_@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-72506-2023031713212416925433ec3e661dae-jArCF_@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.5 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, 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?= Changes since v2: - rebased onto next - rework u-boot customization (p1) - update opensbi - update kernel Changes since v1: - rebased onto next (including bitbake 2.0 migration) - exclude opensbi memory range in u-boot DT - use upstream OpenSBI version (instead of StarFive version) This series adds a new machine "starfive-visionfive2" which is a Risc-V board based on the JH7110 SoC. The BSP is modeled based on the buildroot SDK [1], but without any proprietary imaging components. Further, we implement the fit + efi boot toolchain, instead of the proposed ubootenv + fit version. This also requires that we embed the board's linux device tree into the fit, as memory and reserved-memory nodes are resolved via the efi API (implemented by u-boot) instead of resolving them via the DT in Linux. As the JH7110 SoC has no usable upstream support yet, we directly build the 5.15 based kernel from the SDK, instead of porting patches on top of the standard Linux. Distro kernels are also not supported. Best regards, Felix Moessbauer Siemens AG Felix Moessbauer (7): u-boot: make KCFLAGS and HOSTCFLAGS configurable starfive-visionfive2: package u-boot starfive-visionfive2: package opensbi firmware starfive-visionfive2: add BSP kernel starfive-visionfive2: create u-boot-spl firmware starfive-visionfive2: create u-boot-spl FIT image starfive-visionfive2: add machine meta-isar/conf/local.conf.sample | 1 + .../conf/machine/starfive-visionfive2.conf | 29 ++++++ .../starfive-visionfive2-sid-ports.conf | 7 ++ .../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 +++++ .../files/starfive-visionfive2-rules.tmpl | 17 ++++ ...ensbi-starfive-visionfive2_1.2+20230310.bb | 31 +++++++ ...x-offset-of-env-data-block-on-jh7110.patch | 30 +++++++ ...iscv-Fix-build-against-binutils-2.38.patch | 55 ++++++++++++ ...-opensbi-memory-range-in-device-tree.patch | 40 +++++++++ ...upport-building-double-float-modules.patch | 89 +++++++++++++++++++ ...five-visionfive2_2022.01-rc4+VF2-v2.8.0.bb | 44 +++++++++ .../files/rules.tmpl | 12 +++ .../files/visionfive2-u-boot-firmware.install | 1 + .../visionfive2-uboot-fit-image.its.tmpl | 41 +++++++++ .../visionfive2-u-boot-firmware.bb | 36 ++++++++ ...or-unrecognized-opcode-csrr-a5-0xc01.patch | 26 ++++++ .../linux/files/starfive2_extra.cfg | 3 + .../linux/linux-starfive_5.15-visionfive2.bb | 18 ++++ .../canned-wks/starfive-visionfive2.wks.in | 23 +++++ .../u-boot/files/debian/rules.tmpl | 5 +- meta/recipes-bsp/u-boot/u-boot-custom.inc | 5 +- 24 files changed, 578 insertions(+), 2 deletions(-) create mode 100644 meta-isar/conf/machine/starfive-visionfive2.conf create mode 100644 meta-isar/conf/multiconfig/starfive-visionfive2-sid-ports.conf 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 create mode 100644 meta-isar/recipes-bsp/opensbi/files/starfive-visionfive2-rules.tmpl create mode 100644 meta-isar/recipes-bsp/opensbi/opensbi-starfive-visionfive2_1.2+20230310.bb create mode 100644 meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2/0001-fix-offset-of-env-data-block-on-jh7110.patch create mode 100644 meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2/0001-riscv-Fix-build-against-binutils-2.38.patch create mode 100644 meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2/0002-exclude-opensbi-memory-range-in-device-tree.patch create mode 100644 meta-isar/recipes-bsp/u-boot/files/starfive-visionfive2/0002-riscv-support-building-double-float-modules.patch create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-starfive-visionfive2_2022.01-rc4+VF2-v2.8.0.bb create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/rules.tmpl create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-u-boot-firmware.install create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/files/visionfive2-uboot-fit-image.its.tmpl create mode 100644 meta-isar/recipes-bsp/visionfive2-u-boot-firmware/visionfive2-u-boot-firmware.bb create mode 100644 meta-isar/recipes-kernel/linux/files/fix-Error-unrecognized-opcode-csrr-a5-0xc01.patch create mode 100644 meta-isar/recipes-kernel/linux/files/starfive2_extra.cfg create mode 100644 meta-isar/recipes-kernel/linux/linux-starfive_5.15-visionfive2.bb create mode 100644 meta-isar/scripts/lib/wic/canned-wks/starfive-visionfive2.wks.in