From: Stafford Horne <shorne@gmail.com>
To: Gary Lau <zgliu@foxmail.com>
Cc: linux-openrisc <linux-openrisc@vger.kernel.org>
Subject: Re: [Question]or1k-elf/or1k-linux Windows/Cygwin toolchain availability?
Date: Sun, 13 Jul 2025 06:59:29 +0100 [thread overview]
Message-ID: <aHNLQdk1W_A7PvDw@antec> (raw)
In-Reply-To: <tencent_D7671DAE3F2DCA4F5AAD8A421C72F3568E08@qq.com>
Hi Gary,
I see you sent 2 emails which are about the same. I will reply only to this
one.
On Sat, Jul 12, 2025 at 03:11:43PM +0800, Gary Lau wrote:
> Hi openrisc folks,
>
> I’m exploring OpenRISC development and would like to build the linux kernel/busybox rootfs on Windows/Cygwin.
> I wanted to check:
> 1. Are prebuilt or1k-elf and or1k-linux toolchains available for Windows/Cygwin?
There are none available at the moment. We do have docker images however. It
seems possible to run containers on windows. But I haven't tried it.
- Docker images: https://openrisc.io/tutorials/images.html
- Containers on windows: https://ubuntu.com/tutorials/windows-ubuntu-hyperv-containers#1-overview
In terms of toolchains, you may only need an or1k-elf toolchain. The or1k-linux
toolchain is a special build with no libc library which is only good for
building the kernel, you can use or1k-elf to build the kernel too.
> 2. If not, is cross-compiling from Cygwin feasible, or is a native Linux host strongly recommended?
I am sure it's possible, I have seen that ARM and Risc-V toolchains are
available on windows via cygwin. They mention that to build the toolchain you
must ensure the filesystem is case-sensitive. If you can get cygwin installed
with the GCC toolchain, you can then run our normal toolchain build script, the
one I use is this:
- newlib.build: From https://github.com/stffrdhrn/or1k-utils/tree/master
- example usage: From https://github.com/stffrdhrn/or1k-toolchain-build/blob/master/or1k-toolchain-build/build-gcc.sh
# Setup overrides for newlib.config
export NOTIFY=n
export BUILDDIR=$PWD
export GCC_SRC=$(archive_src gcc ${GCC_VERSION})
export BINUTILS_SRC=$(archive_src binutils ${BINUTILS_VERSION})
export GDB_SRC=$(archive_src gdb ${GDB_VERSION})
export NEWLIB_SRC=$(archive_src newlib ${NEWLIB_VERSION})
export INSTALLDIR=$PREFIX
export CROSS=${target}
../or1k-utils/toolchains/newlib.build
> I checked the OpenRISC docs and toolchain repos but couldn’t find Windows-specific
> guidance. Any pointers would be helpful!
You can mainly look for risc-v and arm guidance and then translate it to
OpenRISC. If you get anything working please let me know, we can try to add it
as a tutorial to our main documentation.
-Stafford
next prev parent reply other threads:[~2025-07-13 5:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-12 7:11 [Question]or1k-elf/or1k-linux Windows/Cygwin toolchain availability? Gary Lau
2025-07-13 5:59 ` Stafford Horne [this message]
2025-07-14 9:40 ` [Question]or1k-elf/or1k-linux Windows/Cygwin toolchainavailability? Gary Lau
[not found] ` <tencent_AB1F05656F2D0DC53C8ECD792547FB8E8707@qq.com>
2025-07-14 15:03 ` Stafford Horne
-- strict thread matches above, loose matches on Subject: below --
2025-07-12 7:09 [Question]or1k-elf/or1k-linux Windows/Cygwin toolchain availability? Gary Lau
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=aHNLQdk1W_A7PvDw@antec \
--to=shorne@gmail.com \
--cc=linux-openrisc@vger.kernel.org \
--cc=zgliu@foxmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox