Date: Sat, 19 Jul 2014 19:06:56 -0400 From: Rich Felker <dalias@...c.org> To: Stefan Kristiansson <stefan.kristiansson@...nalahti.fi> Cc: musl@...ts.openwall.com Subject: Re: How to build a musl toolchain for or1k 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.