2021. szeptember 25.

Linux Amiga is still alive... just nobody cares (1.)


If you ever wondered, what happened to those architecture supports, which were there in Linux, then the answer is twofold: some of them was wiped out, some of them are still there. For those, that are still there, you can imagine that are tested less and less on real hardware.

One of them, is Linux m68k port, for Motorola 680{2|3|4|6}0 CPUs, with MMU (Memory Management Unit). Amiga is exactly one of them. I have a nice Amiga 2000, with A2630 CPU card (containing 68030, with math CPU as well), running on a zipping 25 MHz. Also have SCSI card, disc, some Memory expansion. I was wondering: can Linux still run on this machine? Despite the fact, that there is no recent distro publishing to this ancient architecture. Yes, ancient. The first Linux port to Amiga was released in 1993. Today, in 2021, it's 28 years old. That time, the kernel was 0.9, now 5.10 (stable). It was in fact the first stable port of the Linux kernel to a different architecture, a little bit predating Alpha, the first official port. So, I needed to compile a linux distro for myself.


The goal

  • Be as memory friendly, as possible (now considered as embedded)
  • Consume no more disk space than 512 MByte
  • Use as many capabilities of Amiga as possible

The tools I used

  • AMD Ryzen 3600 (12 cores, 4GHz), 32 GB RAM (for resources)
  • Gentoo Linux x86_64 (as host OS)
  • Qemu-m68k (user mode linux) (as a tool to "native" compile things)
  • chroot (a lot) (as a means to separate systems + install new ones)
  • WinUAE (to test)


The process

  1. Install i686-pc-linux-musl into a chroot on the host
  2. Install crossdev into i686-..-musl, and cross compile a kind of stage3 for m68k-unkown-linux-musl
  3. Inside the m68k-..-musl chroot recompile everything
  4. In the m68k-..-musl chroot configure and install needed packages on Amiga Linux
  5. From the m68k-..-musl, create prefix directory, with embedded profile
  6. From the m68k-..-musl, install all required packages into the prefix
  7. Chroot into the prefix, and finish up install/configuration of the environment just like you would do on a fresh install
  8. In m68k-..-musl set and compile a kernel and install into the prefix
  9. Create a WinUAE usable disk image, with Amiga boot partition, and amiboot-5.6, configure amiboot
  10. Try it out under WinUAE, and fix things not working
  11. Go to 6

 


1 megjegyzés: