• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Installing Debian 12 on 68040

eharmon

Well-known member
Sometimes I create my own distractions...just built a 68k distribution with Buildroot and it's idling at 5MB, even with working networking. I'll whip up some instructions sometime soon.
And then I can't escape my hobbies. Here's a repo that'll create a Buildroot Linux image with networking and ssh that should work on all(?) 68040 Macs:


Nothing but the basics are installed, seems like it fits in just a few MB once booted. I may or may not have broken support for 68LC040 with this configuration (or it may not work with Buildroot at all) -- that's an exercise for the reader.

You can add more by configuring Buildroot from the instructions at http://buildroot.org.

I'll probably add some instructions to install it onto a real Mac soon, but it's pretty straightforward and similar to the Debian instructions.
 

luRaichu

Well-known member
I'll certainly play with this if I have the time, especially since that idle memory usage seems pretty impressive for Linux. I haven't checked the repo yet, but are there any modifications required to build for other 68k CPUs (68020, 68030)? And what's the minimum RAM requirement?
 
Last edited:

eharmon

Well-known member
I'll certainly play with this if I have the time, especially since that idle memory usage seems pretty impressive for Linux. I haven't checked the repo yet, but are there any modifications required to build for other 68k CPUs (68020, 68030)? And what's the minimum RAM requirement?
Based on the kernel size I’d guess around 10-15mb. You can slim the kernel further by removing a bunch of filesystem support, etc. probably can’t save much more than 2mb would be my guess.

With the configuration there it’ll build for 040 only. I haven’t tried 030 and I think some tweaks might be needed to convince it to build as it can be tripped up by the optional FPU.

020 is more difficult. You need to build MMU-less Linux which is possible with Buildroot but may require additional tweaking.
 

rplacd

Well-known member
Based on the kernel size I’d guess around 10-15mb. You can slim the kernel further by removing a bunch of filesystem support, etc. probably can’t save much more than 2mb would be my guess.

With the configuration there it’ll build for 040 only. I haven’t tried 030 and I think some tweaks might be needed to convince it to build as it can be tripped up by the optional FPU.

020 is more difficult. You need to build MMU-less Linux which is possible with Buildroot but may require additional tweaking.
I don't know the details, but it looks like support for anything less than a 68040 and a particular Coldfire model was disabled around 2016, and in fact had been broken for a while. (http://lists.busybox.net/pipermail/buildroot/2016-March/156657.html)

I tried patching back in support for a 68000 flag (for funsies), and I seem to have problems building libc.
 

eharmon

Well-known member
I don't know the details, but it looks like support for anything less than a 68040 and a particular Coldfire model was disabled around 2016, and in fact had been broken for a while. (http://lists.busybox.net/pipermail/buildroot/2016-March/156657.html)

I tried patching back in support for a 68000 flag (for funsies), and I seem to have problems building libc.
Yeah, I've found without forcing -march and -mtune compiler options in for 040, a bunch of assembly in userland fails to build as it tries (and fails) to maintain 020 and 030 support despite missing instructions.

So maybe it's not theoretically possible at all without big code changes, if that goes as deep as uclibc. Theoretically the kernel still supports it, but not too useful without a userland.

Not surprised to see Buildroot has given up on it entirely. Thanks for the link!
 
Top