From: Rob Landley <rob@landley.net>
To: linux-sh@vger.kernel.org
Subject: Bootable sh4 qemu images.
Date: Fri, 08 Jan 2016 18:12:56 +0000 [thread overview]
Message-ID: <568FFC28.2010409@landley.net> (raw)
The question was recently raised about QEMU images for sh. Since I
maintain those as part of my Aboriginal Linux project, and put out a new
release last night, I thought I'd link to and explain them.
The project page is http://landley.net/aboriginal/about.html
The sh4 images are "qemu-system-sh4.tar.gz", the current release (1.4.4)
is based on musl-libc and kernel 4.2, and the previous release (1.4.3)
was uClibc and 4.1. The stable link to historical prebuilt binary
versions is at:
http://landley.net/aboriginal/downloads/old/binaries/
Download a system image, extract it, and run either ./run-emulator.sh
(simple initramfs-only, without compiler) or ./dev-environment.sh (with
compiler loaded from /dev/sda squashfs image).
Unfortunately qemu's r2d board can't give me multiple block devices yet
(-hdb and later are ignored) so the 2 gig ext2 image dev-environment.sh
tries to mount on /home is inaccessible, and the native-build.sh script
is useless on this target because there's no /dev/[sh]dc. Also this
board is hardwired to provide 64 megs of ram (gcc requires 256 megs to
build linux from scratch), and when you exit and the kernel tries to
halt the emulator, qemu panics and doesn't reset the TTY properly. (Type
"reset" and hit enter to get your cursor back.)
In the current release's system image tarball is a "mini.config" file
used to build the kernel. You can expand that via:
make ARCH=sh allnoconfig KCONFIG_ALLCONFIG=mini.config
And then you have a big config from which you can build a kernel. There
are cross-compilers in each release directory, download and extract
cross-compiler-sh4.tar.gz and add its "bin" subdirectory to your path,
and use sh4- as the prefix. (Or you can use the full path to the
compiler ending with the prefix as the prefix, and not fiddle with the
$PATH.)
make ARCH=sh CROSS_COMPILE=sh4-
(There are also sh2eb images and compilers, sh2 big endian, but the
kernels in those boot on a Numato board, not under qemu. See
http://nommu.org/jcore for details of that. Those are all still uClibc,
they should move to musl next release.)
Again, http://landley.net/aboriginal/about.html should explain or
provide links to everything else.
This is what I've been using to regression test the sh4 kernel for the
past several years. I only got involved in the sh2 nommu stuff at the
end of 2014, and dragged Rich into it what, 6 months ago?
Rob
P.S. Sorry I've fallen a couple kernel versions behind, I'm trying to
catch up but with https://lwn.net/Articles/629362/ and
https://lwn.net/Articles/616315/ and now
http://review.cyanogenmod.org/#/c/119819/1 toybox is dominating my todo
list...
next reply other threads:[~2016-01-08 18:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 18:12 Rob Landley [this message]
2016-01-11 18:02 ` Bootable sh4 qemu images Peter Zijlstra
2016-01-11 20:42 ` Rob Landley
2016-01-12 7:19 ` Rob Landley
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=568FFC28.2010409@landley.net \
--to=rob@landley.net \
--cc=linux-sh@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).