From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 16 Sep 2021 20:04:20 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mQvkC-0003Hz-2U for lore@lore.pengutronix.de; Thu, 16 Sep 2021 20:04:20 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQvkA-00089F-6J for lore@pengutronix.de; Thu, 16 Sep 2021 20:04:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=l98mRn87xiKWhIOU089CyN+1gljEhzc6hbUWxGWPmw8=; b=JAnGFCkUl90aIj6jq5uRzRHI5S +KOGIu5JTzNF4n99W2oFSr/ekrmz7wlykaObVMwAqj/zYokg5JSV95UnIlExLD1ZbDXWhDqAd+TsE kUCAHm3Ec88dwF82hBqQmnajuDZ0IzxKfPGdB7t4Av327HTmk9BqaI1KssnRBEYixFwF1MfOZ866u C/mQRqXPh1a4VBMN6ciH9LEPK/w2FwBALCJuTnpmcQgsZbG6IPB9TEDFlmkzw/xLrl31xSJuBJwsB tTMH9glm9mZz+rdmCUkgno6lIqUnrcfT7uM2IooE4YRCOMFGOsDgkpXmXVS5ZJIWBTDSh3rWZT2RP iy2+gt8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQviL-00Bz9z-3h; Thu, 16 Sep 2021 18:02:25 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQviF-00Bz8Z-2l for barebox@lists.infradead.org; Thu, 16 Sep 2021 18:02:21 +0000 Received: by mail-lf1-x12b.google.com with SMTP id y28so21871829lfb.0 for ; Thu, 16 Sep 2021 11:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cartesi-io.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7pv3V/4rZ60oZSs0JD1YDq1D8SlGrwcqI7sE3V/3qH8=; b=GRcQ9GDoIDhLkr3xa/LeM7JT9GdO7RJON5hliPsyN6hIOrnn8kTdoY1bY6+hEGguoR 9D7gK14QhH6SkVHzX7YWmQYmHenoBXuYOsIP6ymBW91trDZcSb/rCoP66oezY5xFGH6M nf/aZlvRziFEj6lABkWI/Gto4/qMG75cPrtsbsD8ztTa47sIFIphLeuUAm5FiVpWqO/X lQfUP16v8LTNiSmmY8Fqk56cBXAaMuNNjyRfxJbvhfyZb9dGnRzyp68Al+BIGEEND28+ KqtCVHeB2xcQI1FQnBMb3G6zagnpbF8jXpgoO/5ARx/ccDaPoFRbY73w4VVqNnLGHGtA +XIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7pv3V/4rZ60oZSs0JD1YDq1D8SlGrwcqI7sE3V/3qH8=; b=VQ6QAxK/sRYtLZcGCrXtXohangXNEYSgdwTxeoHzDMWE/i/1/gDI1khqKGT6MrDvqZ sjvi1Xu1pjdvjGVWd6fHgDwBZoqvmeJN/Y33NLctJycufjkTLJFDBpuwE9sIjxG9ZT38 Y+ERX/uy4ijSB+SXkl2ADJAGAmmdwt3jCAOtiXAjlY4TzhiYh7JecZGlEKkKdiMc+PjJ pacJd8fy5AE8e0p/kDpjbhZ2UWZSVpTSbvcSGK/jLLLzhu5Lg0d0geWMFEetaGmPM7RL nhFBR6r/raILnTB+MjQ2D31ggqA4vkEbJjA//VwYlfSBgL8sEf4xtL4hB9BQhRhDGYBI CRlQ== X-Gm-Message-State: AOAM530P3kJivwEM7GnMQE4s77ICRH1I9GqgUF3IZp0uFdwV7mu5ZPxW kiJ7qzMZOgjNSbiWt4V/2dFviRQud68gWq+ZYk7Cdg== X-Google-Smtp-Source: ABdhPJxAsrOI/RF/gEF6DzUP6HhHzz9vLhoaIktN46Pro1Hs9BZ8W0vvPGY98O1rZK0LGWZFNitVFp+R3b3wHa/kmJI= X-Received: by 2002:a2e:1511:: with SMTP id s17mr4974076ljd.197.1631815334962; Thu, 16 Sep 2021 11:02:14 -0700 (PDT) MIME-Version: 1.0 References: <129de0c3-64d9-c2f7-18e0-b3764446b875@pengutronix.de> <38f21108-d380-d299-e9cd-311b2ef4c3c8@pengutronix.de> In-Reply-To: <38f21108-d380-d299-e9cd-311b2ef4c3c8@pengutronix.de> From: Marcelo Politzer Date: Thu, 16 Sep 2021 15:01:41 -0300 Message-ID: To: Ahmad Fatoum Cc: barebox@lists.infradead.org Content-Type: multipart/mixed; boundary="000000000000615b8005cc209d75" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210916_110219_285881_65825169 X-CRM114-Status: GOOD ( 51.74 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:e::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.3 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: Re: New RISCV board (cartesi-machine) X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.ext.pengutronix.de) --000000000000615b8005cc209d75 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Sep 15, 2021 at 6:58 PM Ahmad Fatoum wrot= e: > > Hello Marcelo, > > On 15.09.21 23:43, Marcelo Politzer wrote: > > On Wed, Sep 15, 2021 at 6:17 PM Ahmad Fatoum = wrote: > >> > >> Hello Marcelo, > >> > >> On 15.09.21 22:30, Marcelo Politzer wrote: > >>> Hi, I'm new to barebox > >>> > >>> I'm currently porting barebox to a riscv board (cartesi-machine). > >> > >> Oh, looks interesting! What SoC does it use? > > > > It uses SOC_VIRT. It is an emulator to be precise, we use it for > > verifiable computations. > > It is pretty easy to try it out (there is a docker image for it): > > https://www.cartesi.io/en/docs/machine/host/overview/ > > Thanks, will check it out. > > >>> I got it mostly working: > >>> - new serial: serial_sbi.c and > >> > >> Keep in mind that newer SBI versions deprecate > >> sbi_console_getchar() and sbi_console_putchar() with no replacement. > >> > >> But if your board's firmware provides it, there is no issue with > >> adding a driver for it. > > > > That is what the emulator implements for now. > > I have to admit that a virtio system would be cool, maybe in the future= . > > Like this? :-) > > https://www.barebox.org/jsbarebox/ That is cool! > > >>> - ext4 filesystem with mtdram > >>> > >>> 1) What I am still trying to figure out is how to customize `env` cor= rectly. > >>> I got it to build and appear based on the docs [1], [2], > >> > >> Those look ok. I assume you have > >> > >> defaultenv_append_directory(defaultenv_cartesi); in your board code? > > > > yes > > > >> > >>> however the only way I found around [3] was to replace `bin/init` wit= h > >>> this[4] layout. > >> > >> After drivers probe, barebox invokes init to source init scripts and > >> do the countdown and such. This is written in C, but you can override > >> it with an /env/bin/init shell script, which is what you did here. > >> > >> I would not recommend this. Drop /env/bin/init and use the same C init > >> nearly everyone else does. You can still customize it via the > >> /env/init/ scripts > >> > >>> Is there a recommended way to go about this? > >> > >> You need to set boot.default, e.g. > >> > >> echo 'cartesi net' > defaultenv-cartesi/nv/boot.default > >> > >> Which would try cartesi first and then net if the first one failed. > > > > That worked great. > > Looks a lot cleaner now. > > > >> > >>> 2) I also would like clarification on the upstreaming process, is it > >>> PR based, patches on this list? > >> > >> Patches to the mailing list are the usual way of contributing. > > > > OK, I'll clean this up and send it as two patches: > > - serial_sbi > > - cartesi (board) > > Sounds good. Patches attached, please review at your convenience. > > Cheers, > Ahmad > > > > >> > >> Cheers, > >> Ahmad > >> > >>> > >>> best, > >>> Marcelo > >>> > >>> > >>> [1] Makefile: > >>> ``` > >>> bbenv-$(CONFIG_BOARD_CARTESI) +=3D defaultenv-cartesi > >>> ``` > >>> > >>> [2] arch/riscv/boards/cartesi: > >>> ``` > >>> defaultenv-cartesi > >>> =E2=94=9C=E2=94=80=E2=94=80 boot > >>> =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 cartesi > >>> =E2=94=9C=E2=94=80=E2=94=80 init > >>> =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 automount > >>> =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 ps1 > >>> =E2=94=94=E2=94=80=E2=94=80 nv > >>> =E2=94=9C=E2=94=80=E2=94=80 allow_color > >>> =E2=94=9C=E2=94=80=E2=94=80 autoboot_timeout > >>> =E2=94=94=E2=94=80=E2=94=80 user > >>> ``` > >>> > >>> [3] > >>> ``` > >>> Hit m for menu or any to stop autoboot: 0 > >>> Booting entry 'net' > >>> ``` > >>> > >>> [4] > >>> ``` > >>> defaultenv-cartesi > >>> =E2=94=9C=E2=94=80=E2=94=80 bin > >>> =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 init > >>> =E2=94=94=E2=94=80=E2=94=80 boot > >>> =E2=94=94=E2=94=80=E2=94=80 cartesi > >>> ``` > >>> > >>> _______________________________________________ > >>> barebox mailing list > >>> barebox@lists.infradead.org > >>> http://lists.infradead.org/mailman/listinfo/barebox > >>> > >> > >> > >> -- > >> Pengutronix e.K. | = | > >> Steuerwalder Str. 21 | http://www.pengutronix.de= / | > >> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 = | > >> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-55= 55 | > > > > > -- > Pengutronix e.K. | = | > Steuerwalder Str. 21 | http://www.pengutronix.de/ = | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 = | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 = | --000000000000615b8005cc209d75 Content-Type: text/x-patch; charset="US-ASCII"; name="0002-RISC-V-cartesi-Initial-port.patch" Content-Disposition: attachment; filename="0002-RISC-V-cartesi-Initial-port.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ktn8h9m80 RnJvbSBmNGEzY2YyMDU4MmRlYzA4ZmQyYjAyYjYyY2U4NjRmY2FlN2JiMDM4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXJjZWxvIFBvbGl0emVyIDxtYXJjZWxvLnBvbGl0emVyQGNh cnRlc2kuaW8+CkRhdGU6IFRodSwgMTYgU2VwIDIwMjEgMTQ6MzM6MTcgLTAzMDAKU3ViamVjdDog W1BBVENIIDIvMl0gUklTQy1WOiBjYXJ0ZXNpOiBJbml0aWFsIHBvcnQKCi0tLQogYXJjaC9yaXNj di9LY29uZmlnLnNvY3MgICAgICAgICAgICAgICAgICAgICAgIHwgIDcgKysrKysKIGFyY2gvcmlz Y3YvYm9hcmRzL01ha2VmaWxlICAgICAgICAgICAgICAgICAgICB8ICAxICsKIGFyY2gvcmlzY3Yv Ym9hcmRzL2NhcnRlc2kvTWFrZWZpbGUgICAgICAgICAgICB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II"; name="0001-serial-implement-SBI-UART-support.patch" Content-Disposition: attachment; filename="0001-serial-implement-SBI-UART-support.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ktn8h9mi1 RnJvbSA1OTUzMDYyY2UxM2M0YjA3MTkwZDQ1NWQyYWFlMjI4Y2QzNzU2ZDQyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXJjZWxvIFBvbGl0emVyIDxtYXJjZWxvLnBvbGl0emVyQGNh cnRlc2kuaW8+CkRhdGU6IFRodSwgMTYgU2VwIDIwMjEgMTQ6Mjk6NTEgLTAzMDAKU3ViamVjdDog W1BBVENIIDEvMl0gc2VyaWFsOiBpbXBsZW1lbnQgU0JJIFVBUlQgc3VwcG9ydAoKLS0tCiBhcmNo L3Jpc2N2L2xpYi9zYmkuYyAgICAgICAgfCAxMSArKysrKysKIGRyaXZlcnMvc2VyaWFsL0tjb25m aWcgICAgICB8ICA3ICsrKysKIGRyaXZlcnMvc2VyaWFsL01ha2VmaWxlICAgICB8ICAxICsKIGRy aXZlcnMvc2VyaWFsL3NlcmlhbF9zYmkuYyB8IDc3ICsrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysKIDQgZmlsZXMgY2hhbmdlZCwgOTYgaW5zZXJ0aW9ucygrKQogY3JlYXRlIG1v ZGUgMTAwNjQ0IGRyaXZlcnMvc2VyaWFsL3NlcmlhbF9zYmkuYwoKZGlmZiAtLWdpdCBhL2FyY2gv cmlzY3YvbGliL3NiaS5jIGIvYXJjaC9yaXNjdi9saWIvc2JpLmMKaW5kZXggNDVhMDRmYjgyLi4y MDkwNjljOTggMTAwNjQ0Ci0tLSBhL2FyY2gvcmlzY3YvbGliL3NiaS5jCisrKyBiL2FyY2gvcmlz Y3YvbGliL3NiaS5jCkBAIC02NCwzICs2NCwxNCBAQCBzdGF0aWMgaW50IHNiaV9pbml0KHZvaWQp CiAKIH0KIGNvcmVfaW5pdGNhbGwoc2JpX2luaXQp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yaXZlcik7Ci0tIAoyLjMyLjAKCg== --000000000000615b8005cc209d75 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox --000000000000615b8005cc209d75--