From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Marcelo Politzer <marcelo.politzer@cartesi.io>,
barebox@lists.infradead.org
Subject: Re: New RISCV board (cartesi-machine)
Date: Wed, 15 Sep 2021 23:17:48 +0200 [thread overview]
Message-ID: <129de0c3-64d9-c2f7-18e0-b3764446b875@pengutronix.de> (raw)
In-Reply-To: <CA+cd6D476jyxKGWZUqLbFizW_TvGCpfqvS6-vC8T3sX=nzS5kg@mail.gmail.com>
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?
> 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.
> - ext4 filesystem with mtdram
>
> 1) What I am still trying to figure out is how to customize `env` correctly.
> 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?
> however the only way I found around [3] was to replace `bin/init` with
> 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.
> 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.
Cheers,
Ahmad
>
> best,
> Marcelo
>
>
> [1] Makefile:
> ```
> bbenv-$(CONFIG_BOARD_CARTESI) += defaultenv-cartesi
> ```
>
> [2] arch/riscv/boards/cartesi:
> ```
> defaultenv-cartesi
> ├── boot
> │ └── cartesi
> ├── init
> │ ├── automount
> │ └── ps1
> └── nv
> ├── allow_color
> ├── autoboot_timeout
> └── user
> ```
>
> [3]
> ```
> Hit m for menu or any to stop autoboot: 0
> Booting entry 'net'
> ```
>
> [4]
> ```
> defaultenv-cartesi
> ├── bin
> │ └── init
> └── boot
> └── 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-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-09-15 21:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 20:30 Marcelo Politzer
2021-09-15 21:17 ` Ahmad Fatoum [this message]
2021-09-15 21:43 ` Marcelo Politzer
2021-09-15 21:58 ` Ahmad Fatoum
2021-09-16 18:01 ` Marcelo Politzer
2021-09-16 21:21 ` Ahmad Fatoum
2021-09-20 19:41 ` Marcelo Politzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=129de0c3-64d9-c2f7-18e0-b3764446b875@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=marcelo.politzer@cartesi.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox