From patchwork Mon Apr 10 09:42:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "MOESSBAUER, Felix" X-Patchwork-Id: 85 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 10 Apr 2023 11:43:14 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f55.google.com (mail-lf1-f55.google.com [209.85.167.55]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 33A9hEDw022028 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Apr 2023 11:43:14 +0200 Received: by mail-lf1-f55.google.com with SMTP id t15-20020a192d4f000000b004eb3fa146c4sf8127356lft.15; Mon, 10 Apr 2023 02:43:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681119788; cv=pass; d=google.com; s=arc-20160816; b=M5RJ/V4mLYNfRYsn9VAAqKHdhJ98IvS5Dv/JnZEVte9w7ss+xt6192c+b3vNY8DMSr 7Qx0AsvVhZdAe3Gvsh9JMBNWnxg1Y3T3verfGHHHe9xQx1CPcmGxym7Vc8taBcklghEO 1ALCljdDTrnTY8bah5sRvKx+7e1SRAlw47U+tEc4KZAI7Se3V7RcjhZKzIljua5FVhQx k1tmHVtrXe5zofmr04sk3aYAQo0xzpbi6WQihH1hx5qqCZOJdLgqOIz0Qwl+nY3h5Z+v qUId1f+ZFIs354COMsVaB8KXX+sTxKkCqucNEMhGylpHe8Ju5rCTQzCeuGJITb1w6EYy O8nA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=eKgUaDvBieosF8rBF/TwVvKXlm0rsSbTuRug8azHlqE=; b=iYXrHJXHL+pgxsMwEt0l13Ce1FCF8eke+W/yVTdWf+XQxipGdw6C6S0h/KUTVYVmKB 4PgRcbp9Iqu1DiqDfxQFrP+W4TG2cvb+wsLif8dpmozxqU+8D5P97ogWCXPUuQPEUxN3 Jt/fpetJ1bOt+o6xdQF+6WK5itywbgXhoePtWW9gMMtcxXMHUfEVVGef/FYl8lp8uQz1 x/Xq2Amil2h/ZexRm4EY/1/GR/QzA2pDFARHRpGpPnsrqjiYn9Ljzkx1WaStKHXRMiNa ost3TGuuy0SaUhhH8EOw8MS9d4J7PdnVfZar8bFQjQCj0DMAaNY6kIN9nUcUrSRR3S3H qRkA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=hLexZpFz; spf=pass (google.com: domain of fm-72506-202304100943053eca03122eb51590c2-coshur@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-72506-202304100943053eca03122eb51590c2-coshUR@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=20221208; t=1681119788; x=1683711788; 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:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=eKgUaDvBieosF8rBF/TwVvKXlm0rsSbTuRug8azHlqE=; b=AVH/3+dWbutYToXC55mxJI+euaus0yv7kZIdb1xYTsPy36VgavDHJo84kAaFwABVxR 4tF3qKqAxd5mLEZo8kVa2wXgwS/jvQapULUF0dqi/w7PH/1ccupuLNsAeoDsrVXreDiI lIXmskywD971PEqa/oq1eeP2R844M+YnXUutbWVfOyyKoPEntvl6NPQACwvl+8EaekDs tcjrARROmTSPpH2yPAQ0Gwi2Qf7S/HequYrwQ522UQJtt+kz8DJkMN+YSXfEH53Wf+bF jrhtyDjCIPxE5ow4xG7XRR6HyxPx3y0/hx/bfwZy/OY5NUfLsISiUj43Pl6dEgRJ1QRH w+4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681119788; x=1683711788; 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:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=eKgUaDvBieosF8rBF/TwVvKXlm0rsSbTuRug8azHlqE=; b=WwTlg3wxxrpVJiWJAsnnrLV36BJKYiwC3j35ZI49zkqnfLlpgPN88K3fbshGWx8n2w 9ffUBM9rrKavGirk3xP4d5SxxC1yjKwEkI6C90uD+VNl3b+me30RsKTQR8nm4xCfpE6H NpiAw2gY79PLg97pT89GzOZbk8SyRpylkxF7cwNEE0vsXBZzdlpzp3MRZvn3MAKfYVxW p0D8/C5tLXoeABtHMP+fC5uNonF14NOYB0OFDVuIbvZqljIB52QkNU5jLjdUKNZdO0S0 bQkV4DRDOwtzsQPHBn99WezND9k5v9p2XlLxM3ZgdUXq52d5eDRcfv43sZAUWrhj4r0U lD/Q== X-Gm-Message-State: AAQBX9ewZ1xiI24qjxw+j8MEDgmu2Ta17O6FJpbQ/8cEUq+38oDca7+C 9HqwBr3Iwt4zTK0x3Sum/n0= X-Google-Smtp-Source: AKy350Yos2Bc5zno4xSAuabntyjhKSlmbkO6l1cyKpk4yc6jwZx0zYWWnRdf4GQyooaCAgIDMx/Ziw== X-Received: by 2002:ac2:5a0c:0:b0:4ea:e5b5:9670 with SMTP id q12-20020ac25a0c000000b004eae5b59670mr2901920lfn.11.1681119788138; Mon, 10 Apr 2023 02:43:08 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:651c:1311:b0:2a7:73e2:ccaa with SMTP id u17-20020a05651c131100b002a773e2ccaals458156lja.6.-pod-prod-gmail; Mon, 10 Apr 2023 02:43:06 -0700 (PDT) X-Received: by 2002:a2e:9097:0:b0:2a7:7b8e:5888 with SMTP id l23-20020a2e9097000000b002a77b8e5888mr522792ljg.27.1681119786339; Mon, 10 Apr 2023 02:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681119786; cv=none; d=google.com; s=arc-20160816; b=dbjQI8ge5Zx8pLMEZm+CuKNEEEh68waYZ4qpypypdlzD0QhCIOgil9eGIh8euAPPCa Fhc4B1m1ZKaZkACKEUDS08h3/ZJ3UlU3oNvMBKxcVzVgvWeGhJjjKwjV74SsW59T9n+z fAwWv0gIAJQkB74l3RkUkHyuqjvXUdhgyzDUhZLIZWpagVOUUeIRIb1ZsqhaJTDNM/lR Fh2Vwy9Gga3hGxMyWWKLq1M/9MxZVXc7R4iIz4V0iuIgsKvUYJ5nxn2dQuVWPc+ZAQwr b54aicpIlgb31ravWOji4pCsaskj09FI0phHCSBrwsC9JYDBXy9ljPsOluRkvlweV/F4 JPpg== 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=ptndAc8coYh9LSF4QCRuRD1QOy3cPrgQe1QfzVA+Nso=; b=VruRIvK4ZfloUCzXqe+DS78DNcLxDnSYihgw+Rf+wu9dhnirRfyyjyy32UnmP1lfdB XKoxb6Dlu43yZ/OJOveB2K5KRjbmGW5vFdXIQ8TE9LO9qS+uM6YzmOQo8qkZRiSH+d/0 V/hox1gTvwtaOHD+r/iQa2sBsuQ1Tj6fqVUe8vJ+GQ9OiGMToMfp8qTd61yF26ylHgaj rq+I0Yvt5Yk5eCpClriBWKAVL45c1Kj3rdl/hUSUb3gkwllvp5ZMPw6nLzJQu5dyyQQ8 dWn5BWC6ZF7b8AwhL1PzV3tD94tCQZ3E1CMZKEogASZuafk83n7tmiD87bWl3vZUL/q8 a5UQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=hLexZpFz; spf=pass (google.com: domain of fm-72506-202304100943053eca03122eb51590c2-coshur@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-72506-202304100943053eca03122eb51590c2-coshUR@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id e22-20020a2ea556000000b002a77900f7b9si57746ljn.8.2023.04.10.02.43.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2023 02:43:06 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-72506-202304100943053eca03122eb51590c2-coshur@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 202304100943053eca03122eb51590c2 for ; Mon, 10 Apr 2023 11:43:05 +0200 X-Patchwork-Original-From: "'Felix Moessbauer' via isar-users" From: "MOESSBAUER, Felix" To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, daniel.bovensiepen@siemens.com, florian.bezdeka@siemens.com, Felix Moessbauer Subject: [PATCH v4 0/6] Add BSP for StarFiveTech VisionFive2 Risc-V board Date: Mon, 10 Apr 2023 09:42:46 +0000 Message-Id: <20230410094252.1151370-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=hLexZpFz; spf=pass (google.com: domain of fm-72506-202304100943053eca03122eb51590c2-coshur@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-72506-202304100943053eca03122eb51590c2-coshUR@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Felix Moessbauer Reply-To: Felix Moessbauer 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?= Changes since v3: - rebased onto next - drop "u-boot: make KCFLAGS and HOSTCFLAGS configurable" - opensbi: update version - u-boot - update which makes patches obsolete - support to compile without cross - simplify build dependencies - remove KCFLAGS injection - spl_tool: replace with OSS version from StarFive - linux: update which makes patches obsolete 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 (6): 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 | 10 +++++ .../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 ++++++++++++++ ...five-visionfive2_2022.01-rc4+VF2-2.11.5.bb | 31 ++++++++++++++ .../files/rules.tmpl | 12 ++++++ .../files/visionfive2-u-boot-firmware.install | 1 + .../visionfive2-uboot-fit-image.its.tmpl | 41 +++++++++++++++++++ .../visionfive2-u-boot-firmware.bb | 36 ++++++++++++++++ .../linux/files/starfive2_extra.cfg | 3 ++ .../linux/linux-starfive_5.15-visionfive2.bb | 17 ++++++++ .../canned-wks/starfive-visionfive2.wks.in | 23 +++++++++++ 17 files changed, 313 insertions(+) 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/u-boot-starfive-visionfive2_2022.01-rc4+VF2-2.11.5.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/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