uClinux on Amiga

Introduction

uClinux on Amiga is a port of uClinux, which is a port of Linux 2.0 to CPUs without a MMU (Memory Management Unit).

Platforms

The final goal is to run uClinux on all MMU-less Amiga models. We're starting with the models based on the plain 68000, which include the original A1000, the A500/A2000 and various later models like the A500+, A600 and CDTV. Later we (or you?) might add support for the 68EC020 (A1200 and CD32) and the 68EC030 (A4000/030).

My test machine is an A500 with 512K Chip RAM, 512K slow RAM, A590 with a 80 MB SCSI disk and 2 MB Fast RAM, soft-kicked to AmigaOS 3.1.

Development is mainly done using the Ubiquitous Amiga Emulator (UAE), since that's much more convenient than putting test kernels on floppy and boot them on the real A500. I tried UAE versions 0.7.6, 0.8.14 and 0.8.15.

Kernel images

I started with a kernel based on plain Linux 2.0.38, merged with Linux/m68k 2.0.36 and Paul Coene's Linux/68000 2.0.33 for Atari ST. Later I upgraded partly to uClinux 2.0.38.1-pre7.

To compile the kernel (ELF), you have to create cross-development tools according to Paul Coene's guidelines. I tried with a plain m68k-linux-gcc as well, but that didn't work.

Additional notes:

User space

I extracted the romfs ramdisk from the uClinux image for Palmpilot (vmlinux.rom) and replaced all occurrencies of Pilot by Amiga.

Booting uCLinux

You need a modified Amiboot binary that supports MMU-less CPUs. Since compiling m68kboot was/is a PITA, I don't provide a patch for it yet, sorry.

Amiboot-uC requires utility.library, so you need a recent Kickstart ROM or have to softkick your (virtual) Amiga to at least AmigaOS 2.0. This limitation will be removed in the future, when I know why libnix needs utility.library and can fake an incomplete utility.library.

Just like the normal Amiboot, Amiboot-uC supports gzipped kernel images, so you do not have to decompress the kernel image first. But you probably do want to decompress it once and for all, since decompressing can be very slow on slow CPUs :-) The same is true for the ramdisk image, which can be decompressed by the kernel.

You can boot uClinux with one the following command lines:

amiboot-uC -k ucimage -r romfs root=/dev/ram
amiboot-uC -k ucimage.gz -r romfs.gz root=/dev/ram
    

The kernel boot log on the (emulated) serial port looks like:

ABN
Amiga hardware found: [A2000] A2000_CLK VIDEO BLITTER AUDIO FLOPPY KEYBOARD MOUSE SERIAL PARALLEL CHIP_RAM PAULA AGNUS_HR_PAL ZORRO 
Probing AutoConfig expansion device(s):
  0x00200000: Hacker Test Board 0x01 (Z2, 8M MEM)
  0x00e90000: Hacker Test Board 0x02 (Z2, 64K)
Console: colour Amiga OCS 80x32, 1 virtual console (max 63)
Calibrating delay loop.. ok - 0.82 BogoMIPS
Memory: 7236k/8192k available (412k kernel code, 340k data)
<6>Swansea University Computer Society NET3.035 for Linux 2.0
<6>NET3: Unix domain sockets 0.13 for Linux NET3.035.
Swansea University Computer Society TCP/IP for NET3.034
IP Protocols: ICMP, UDP, TCP
uClinux version 2.0.38.1pre7 (geert@cassiopeia) (gcc version 2.7.2.2) #74 Wed Aug 30 16:48:17 CEST 2000
<6>M68K Serial driver version 1.01
<6>ttyS0 at 0x00dff018: Amiga builtin
Ramdisk driver initialized : 16 ramdisks of 4096K size
scsi : 0 hosts.
scsi : detected total.
<6>PPP: version 2.2.0 (dynamic channel allocation)
<6>TCP compression code copyright 1989 Regents of the University of California
<6>PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.
<6>PPP line discipline registered.
<5>RAMDISK: Romfs filesystem found at block 0
<5>RAMDISK: Loading 203 blocks into ram disk... done.
VFS: Mounted root (romfs filesystem).
    

I also have a screenshot.

Known problems

uClinux

UAE

Development History

2004/10/19

It's been a while ago I updated this page. This doesn't mean no progress was made. Plase check out the (very old) patch queue status page for the merge of Linux/m68k and uClinux.

2000/09/26

More address errors are gone: memcpy_tofs() was still the m68k one, and not memcpy() like it should have been.

On the A500, uClinux boots into user space, but crashes in init with an address error exception. Under UAE, it doesn't crash but stops doing anything useful after starting the task manager.

2000/09/06

After replacing jbsr by jsr in the few assembler sources, the uClinux kernel boots on the real A500!

2000/08/30

uClinux boots using UAE only, while emulating an A500/A2000. On the real A500, it crashes very early in the boot process with an address error guru.

Under UAE, uClinux boots until userland tries to start the task manager (sometimes it prints the whole last line, sometimes not, cfr. the screenshot above). The cursor keeps on flashing though. With the -C 0c option of UAE, I start getting zillions of BAD KERNEL TRAP dumps at that moment.

Download

You can download source patches and binaries from my download area. You need at least the booter (amiboot-uC) and a kernel image (ucimage), and probably want a ramdisk (romfs) as well.


This page is maintained by Geert Uytterhoeven.
$Date: 2008-08-24 08:55:25 $