From patchwork Sat Feb 11 09:21:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "MOESSBAUER, Felix" X-Patchwork-Id: 66 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sat, 11 Feb 2023 10:22:29 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f57.google.com (mail-ed1-f57.google.com [209.85.208.57]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 31B9MSS5028368 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 11 Feb 2023 10:22:28 +0100 Received: by mail-ed1-f57.google.com with SMTP id p36-20020a056402502400b004aab6614de9sf4810524eda.6; Sat, 11 Feb 2023 01:22:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676107343; cv=pass; d=google.com; s=arc-20160816; b=MCEDzazQYQLcu/F5mixxfVIYGGSifXoO7MH+zroi3uYU82yeN3qEoaYcOmWn4jmtQv +/C8jyzPmM1/unRbRe1DvZ72SQX7CvY+d4kwPW+D8ZmFmM84GsloSL8aInIRgL5Ovyr2 AXHuInzl0P9p/2+RazC2jwADMyd2d3DPOdAYKyd7QxgO83QdRI/csOiMVXXNqmCVrLcb v5jg7HhMw+7EMlWTUZYt5X/pcF/VwvlRZDJOnGeAQVfCEvx/P3bnY3Q9lK6IDnMjZKUX CAzAwg9pWuzbpCsG7lmH869J/5mlp1kbHpEdcNjHUOGgbXDiL3r9np0G6gWzPNUnyn4T 6SRA== 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=5caHPZkA9KhHgrqcYR227M4DCG/kvLYmJRjGAZBzwaI=; b=lG5VsD4cjh5qJCIbfwqvEr7off4n4cBugS2H37D74+GFj8Uuq2p++O/OGG8PgJ4IQc 37bbnr8vb1J6crT+VM5w7IPiPiyPtO982+1QX7IDXbaL57PH0l7VpNiIn8UHPFPidEdA Aizsc/FXBoUAYQ5S4SxLhnJTCUBpfKWiPQaBNCPdytKokZ6hXfnDrWNL9uWYNR2p9pFi igy+YtF60ypCIinJwRwYvAv+XmO7La3CxBBj8RFxVuJeGSq9295DqeraU43koy8NTvEV dcdGQDutMAjiw/u4Qt+7Q8msMFNRdI4UzrE3fQb7fpysSMTO69l9dT5jzALUcG6Z73ze 9Itg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Sg1Du5Xk; spf=pass (google.com: domain of fm-72506-20230211092221761c125a9ae3dc2c93-d5yhtu@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-72506-20230211092221761c125a9ae3dc2c93-D5YHtu@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; 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=5caHPZkA9KhHgrqcYR227M4DCG/kvLYmJRjGAZBzwaI=; b=WttXlGUZHYULx7ddBNTxEcyT78FkQMKHixrHkoIr74NIvqGY3N4MQRtRinS2TcMRV8 TEoMoK1eJDqrCns+bAQRFTab0ezpBmrtCm82+ol+iFhE+QnRNTBYuzxeaOhbhBA1kv8F 4jvEPkOciG316lsglK10QurMKcdmLF34WNAmDCVmbFRsALj1SFMNch4ZEx8vsEjGaviq GLZHBjb5N7HBvHJC6+SOcBQOumUvd6q16BSXAOg7FJ/FxCElU7CI3Wtgy4rZpJP1dfop Z9B3KxUoUPa/GHRUW9obtwQuwpGjR4Z90ic9kTWV1jUKVX+4AWZNJVeZsP942FhgGkrT irZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=5caHPZkA9KhHgrqcYR227M4DCG/kvLYmJRjGAZBzwaI=; b=75ocgy+qlHQneBYHQjhycoRau/I2WLpk8rW18PGXLK0kOx04nMwVSly0SC6SwyW3/L 2C2rRayMHInJbJ5BfC2T/ztdRdD16LfTCHFNKqoCNzO0V6QmR9klum0gj5YcFI5kMIWI wuBWGhm2CR+o+V5fWTE38/JhI91iD4acc3dT/Z1Dci4pO6rc1zDdSaGdL85p5bvcxAO3 AS0PaMIG76FuQpLYZvdy6qmJrRTsr5INFecFwIZcGZNNv1334JrjWw50UedsW5dhKN07 C+9zLCuDI7WKiBAYkzM4GgnMpvhV7du71hQ5c3bXh7hSzmJylLf/0d6uVAuVHrdpZjVV 3GdQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AO0yUKVUgJZloppW5tp6gF0mA+Tzc96u5skmFdKXVuhRzzFJDcrCUprj cWrbQSTdrqno0NpsASblUFc= X-Google-Smtp-Source: AK7set91V/X2dFuga7i5rgxULaxvO8S+MB2ySEluxH7LBZtGtSj3U1wlFNxtmxofn/0jERPwPlK9XA== X-Received: by 2002:a17:906:2813:b0:883:b1d3:ae67 with SMTP id r19-20020a170906281300b00883b1d3ae67mr2117572ejc.5.1676107343189; Sat, 11 Feb 2023 01:22:23 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6402:2713:b0:4ac:b59b:6e28 with SMTP id y19-20020a056402271300b004acb59b6e28ls1575791edd.2.-pod-prod-gmail; Sat, 11 Feb 2023 01:22:21 -0800 (PST) X-Received: by 2002:a50:d704:0:b0:46f:a6ea:202 with SMTP id t4-20020a50d704000000b0046fa6ea0202mr20538523edi.37.1676107341637; Sat, 11 Feb 2023 01:22:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676107341; cv=none; d=google.com; s=arc-20160816; b=HT9KMU7cNOeDBvD2nYi+wbTxNTJTI0eW9lmhFxQTBkuDqykhgQltMVlldjxx+uJExu a6In4m/g8nDEm8kq1pwPjEs1LTpF+YEdesMftaAUINvScJcgbRqGP7j0xBJ5o1YjE//7 poWUnha7GujeX2vMxXjxWGh4mPvEYr9VZo2r9JL/F7AWKOMht1SnMAk+2rTkN9PbfC/I NVL1eN+tjn3m5RN78MQGjBSspfSN2ypQpt9eCEMx/KHkC0JsNeZpViH1HHUrlfyPIZEO aD4fpMX/kFBbaZwebW0FB487CAXeoU3qc119QPtgmCos9Ks/e3JjWnyY7TaSToWKRKah B70g== 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=+7SnOIpAbMPWpjJLSAikRBZ6VxnG8dD8RkHQ0AtdMAw=; b=uAZ9BnFv202bI2vqnQ+Ypf7SBD5TIHoojPhmCVbVJAfuYjCKrDWebf4WcS2d6vUCVp VdHRqdngDYzV4E4bF0cs+xnJCEXyUruabStUi8b5xuxB4Jir/myTprfbTnS0Kn4THQYm j0GrKgpRhDk0cTBCq3t6eZBYPbhnHwWGN75Yki1ObVYq6RfDEk5somVGGeOCtGMPMvBO 9eMB57Sc4HyfvP9hTHzUBUL6iitPuCcHi+/daMEbnSrLSf58a7HnsPproRL6eZ3A6KkI nZfUehwOxD2xJL7ItXFcOZKqHw3KpBNrprJBJzXyk7rACw56XQi0Ls6/IOZt285NHqE1 Ev+A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=Sg1Du5Xk; spf=pass (google.com: domain of fm-72506-20230211092221761c125a9ae3dc2c93-d5yhtu@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-72506-20230211092221761c125a9ae3dc2c93-D5YHtu@rts-flowmailer.siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net. [185.136.64.225]) by gmr-mx.google.com with ESMTPS id g35-20020a056402322300b004ab3a681994si235691eda.4.2023.02.11.01.22.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Feb 2023 01:22:21 -0800 (PST) Received-SPF: pass (google.com: domain of fm-72506-20230211092221761c125a9ae3dc2c93-d5yhtu@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) client-ip=185.136.64.225; Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 20230211092221761c125a9ae3dc2c93 for ; Sat, 11 Feb 2023 10:22:21 +0100 From: Felix Moessbauer To: isar-users@googlegroups.com Cc: jan.kiszka@siemens.com, daniel.bovensiepen@siemens.com, florian.bezdeka@siemens.com, jay.zhou@starfivetech.com, Felix Moessbauer Subject: [PATCH v2 0/7] Add BSP for StarFiveTech VisionFive2 Risc-V board Date: Sat, 11 Feb 2023 09:21:45 +0000 Message-Id: <20230211092152.949442-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=Sg1Du5Xk; spf=pass (google.com: domain of fm-72506-20230211092221761c125a9ae3dc2c93-d5yhtu@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-72506-20230211092221761c125a9ae3dc2c93-D5YHtu@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 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. Note: This series requires the following patch, which is NOT included: "fix cyclic dep on crossbuild-essential-riscv64" Best regards, Felix Moessbauer Siemens AG Felix Moessbauer (7): u-boot: inject debian multi-arch config 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+20230107.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 | 38 ++++++++ .../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 | 9 ++ 23 files changed, 573 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+20230107.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