From: Michael Clark <michaeljclark@mac.com>
To: musl@lists.openwall.com
Subject: Re: Porting to RISC-V
Date: Sun, 23 Sep 2018 16:41:51 +1200 [thread overview]
Message-ID: <9F25CA30-65B4-454D-9589-22E3D791380C@mac.com> (raw)
In-Reply-To: <20180923024735.GG17995@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 3415 bytes --]
>>> Ping.
>>>
>>> I was hoping to get this merged in 1.1.20, which didn't happen despite
>>> it getting delayed for a long time. Is there a chance of it happening
>>> soon for 1.1.21?
>>
>> Yes. I can bump the priority for this.
>>
>> There hopefully should not be that much more to do on the port to
>> get it in shape for upstream. Sorry there have been a lot of things
>> going on so this has fallen through the cracks.
>>
>> There is still the ELF TLS bug, which shouldn’t be hard to fix, but
>> we could always mark the port experimental. If it’s in tree; then
>> more folk may be interested in fixing bugs. The code also needs some
>> review.
>
> I don't want to merge something with known bugs like this, but I'm
> happy to participate in fixing it if I know what the issue is and have
> a candidate submission that supposedly works modulo the bug to be
> fixed. My understanding is that gcc and qemu stuff is upstream now so
> it should be simple to me to build and test. Is this correct?
Okay. We’ll fix the bugs. Yes, there are now several ways to get RISC-V Linux booting in QEMU.
There are riscv cross tools and riscv qemu binaries in Debian Sid. I think it is possible to debootstrap riscv64. Indeed the Debian RISC-V builders are running QEMU.
I also have a bootstrap script for a musl riscv gcc 8.1 compiler here:
https://github.com/michaeljclark/musl-riscv-toolchain
You can build the gcc toolchain for comparison:
https://github.com/riscv/riscv-gnu-toolchain
There are links to several Linux images (Fedora, Debian) and build instructions for Linux kernel and bbl on the RISC-V QEMU wiki:
- https://github.com/riscv/riscv-qemu/wiki
Alternatively you can clone SiFive’s freedom-u-sdk and type “make qemu” to get a riscv64 buildroot image booting up in QEMU. This same root image and kernel runs on the HiFive Unleashed Board:
https://github.com/sifive/freedom-u-sdk
Also, Fabrice Belliard has a buildroot port that has recipes for both riscv32 and riscv64:
https://bellard.org/tinyemu/
Normally the kernel is packaged as a payload inside of “bbl”, the Berkeley Boot Loader. However, we now support separate kernel and firmware using the latest bbl, the RISC-V QEMU and “virt” machine in QEMU from the riscv-qemu repository (this feature is not upstream yet) and linux 4.19-rc5 kernel. This is mostly useful if you are recompiling the kernel. We have the -bios, -kernel, -initrd and -append options working:
https://github.com/riscv/riscv-qemu
e.g.
$ qemu-system-riscv64 -nographic -machine virt -bios bbl -kernel vmlinux -initrd initramfs.gz -append rdinit=/bin/busybox
The wiki link above and the freedom-u-sdk have docs and Makefile recipes for attaching VirtIO drives and networking devices.
>> We moved the port to riscv-musl in the RISC-V GitHub organisation
>> [1]. We need to rebase and squash the tree and write a commit
>> message containing the contributors list.
>>
>> The RISC-V rv32 port isn’t in glibc yet and it may be subject to
>> change. I need to get a riscv32 Linux kernel running in QEMU so we
>> can do testing against glibc... I’ll have to chat to Palmer about
>> riscv32, see if there are any ABI issues we need to be aware of. We
>> can spend some time this week...
>
> Great!
No worries. It’ll be nice to get the port upstream...
Cheers,
Michael
[-- Attachment #2: Type: text/html, Size: 5898 bytes --]
prev parent reply other threads:[~2018-09-23 4:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-02 19:28 Dean Michael Ancajas
2018-05-02 19:37 ` Rich Felker
2018-05-02 19:40 ` Dean Michael Ancajas
2018-05-02 19:45 ` Rich Felker
2018-05-02 20:37 ` Michael Clark
2018-05-02 20:45 ` Palmer Dabbelt
2018-09-23 0:55 ` Khem Raj
2018-09-23 0:45 ` Rich Felker
2018-09-23 2:40 ` Michael Clark
2018-09-23 2:47 ` Rich Felker
2018-09-23 4:41 ` Michael Clark [this message]
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=9F25CA30-65B4-454D-9589-22E3D791380C@mac.com \
--to=michaeljclark@mac.com \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).