mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: musl@lists.openwall.com
Subject: Re: How to build a musl toolchain for or1k
Date: Sat, 19 Jul 2014 19:06:56 -0400	[thread overview]
Message-ID: <20140719230655.GG17402@brightrain.aerifal.cx> (raw)
In-Reply-To: <20140719222628.GA19901@chokladfabriken.org>

On Sun, Jul 20, 2014 at 01:26:29AM +0300, Stefan Kristiansson wrote:
> Now when or1k support has landed in musl, I thought I'd take the opportunity to
> give some notes on how to build a toolchain for it (and also, Rich asked me to).

Thanks!

> And some notes about emulators and kernel for or1k.
> There's support in qemu for or1k, but the atomic instructions required for musl
> has not yet been added to that, but we have a functional simulator (or1ksim)
> with support for them.
> 
> git clone -b or1k-master git://github.com/openrisc/or1ksim.git
> ../configure --target=or1k-elf
> make && make install
> 
> Mainline kernel is missing support for a couple of features required
> by musl (mostly related to the atomic instructions). I've added
> support for them, but sending out patches for them is yet to be done.
> In the meantime, they are all present in the smp branch of
> git://openrisc.net/stefan/linux.

What kernel features are needed for atomics to work? I figured it was
mainly a cpu-level issue. Or were changes needed for the kernel to
properly clear the lwa/swa flag on context switch?

It would be really nice if the kernel could also trap and emulate
l.lwa/l.swa and perhaps also l.msync so that these features could be
used on old emulators/hardware that lack them.

> git clone -b smp git://openrisc.net/stefan/linux
> make ARCH=openrisc musl_defconfig
> make ARCH=openrisc

What's special in musl_defconfig? :)

> This became pretty lengthy, but if nothing else, now I've got some
> instructions in a public place to point people to. =P

Indeed. It sounds like it's still enough work that I won't setup an
environment yet (I've got lots of other things I'm trying to finish
including getting the next musl release out on schedule this month)
but I'm looking forward to having a setup (perhaps musl-cross
binaries, Gregor? :) to try it out in the future.

Rich


  reply	other threads:[~2014-07-19 23:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-19 22:26 Stefan Kristiansson
2014-07-19 23:06 ` Rich Felker [this message]
2014-07-20  6:18   ` Stefan Kristiansson

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=20140719230655.GG17402@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    --cc=stefan.kristiansson@saunalahti.fi \
    /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).