• Please review our updated Terms and Rules here

Linux for M68K

Plasmo

Experienced Member
Joined
Aug 29, 2017
Messages
217
Location
New Mexico, USA
I've developed a 68030 homebrew. I'm interested in porting Linux for M68K. Can anyone provide current status of Linux-M68K and whom to contact? Thanks
Bill
 
Thanks, I ran across that page before and was discouraged because it mentioned Debian 2.0 and 4.0 which were over a dozen years ago. I took another look and found an archive on that page with more recent materials.
Bill
 
I think your new board is pretty neat. Do you have enough parts to make full or assembled kits?
I still have two of the 68030 boards with ISA slots that Ingo Cyliax made at Indiana University.
http://marc.retronik.fr/motorola/68...ity_Workstation_[Circuit Cellar_1997_18p].pdf
There is the start of a simulation for it in MAME

A daughterboard for your SBC with 8-bit ISA slots might be a fun thing to build, or adding SPI to use a wiznet module.

A modern Linux has bloated in the 2000's to not even being able to run on a Sun SPARC.
You would probably have better luck with netBSD
 
Last edited:
Yeah, I'd definitely look to the BSDs if you want any kind of semi-current support for discontinued 32-bit architectures. These days I'm surprised the major Linux distros still have x86 support.
 
I think your new board is pretty neat. Do you have enough parts to make full or assembled kits?
I still have two of the 68030 boards with ISA slots that Ingo Cyliax made at Indiana University.
http://marc.retronik.fr/motorola/68...ity_Workstation_[Circuit Cellar_1997_18p].pdf
There is the start of a simulation for it in MAME

A daughterboard for your SBC with 8-bit ISA slots might be a fun thing to build, or adding SPI to use a wiznet module.

A modern Linux has bloated in the 2000's to not even being able to run on a Sun SPARC.
You would probably have better luck with netBSD

Etchedpixels also mentioned NetBSD. Sadly I'm not well versed in NetBSD nor Linux. I'm looking for guidance in hardware requirements--memory size, disk size, FPU or not. The actual porting of NetBSD or Linux is likely beyond me. I was successful in porting CP/M68K to it, however.

https://www.retrobrewcomputers.org/doku.php?id=builderpages:plasmo:cb030spec

I guess you've figured out where to find my design. My intention is to offer a partially assembled board with SMT devices assembled and CPLD programmed for $15-$20 so people can provide their own 68030, SIMM72, EPROM, I/O to build their own 68030 SBC. I can put together kit and it is likely around $50. I hope to make it reasonably priced so to attract the software talents to port modern OS to it.

The SBC does have an 8-bit I/O expansion slot for additional serial ports and possibly Ethernet board.

Bill

PS, link to retrobrewcomputers.org seem to be truncated so the link is broken. The name of the 68030 homebrew is CB030. This is the link, spelled out:
www-dot-retrobrewcomputers-dot-org/doku-dot-php?id=builderpages:plasmo:cb030spec
 
Code:
Kernel version 2.6.27-rotary-wombat-m68k-apple-lc475-68060
- compiled by root@queen-vittoria
- compiled with gcc version 3.4.5
- compiled on 19 Tue Jan 2009
Detected Macintosh model: LC475
 Bootinfo data:
 Video: addr 0xf9001000 row 0x400 depth 8 dimensions 640 x 480
 Videological 0xf0101000 phys. 0x51901000, SCC at 0x50f0c020
 Boottime: 0xe71c3e2a GMTBias: 0x0
 Machine ID: 90 CPUid: 0x2 memory size: 0x24
VIA1 at 50f00000 is a 6522 or clone
VIA2 at 50f02000 is a 6522 or clone
On node 0 totalpages: 9216
free_area_init_node: node 0, pgdat 00207b9c, node_mem_map 00257000
  DMA zone: 9135 pages, LIFO batch:1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 9135
Kernel command line: root=/dev/sda7 init=/sbin/initmini
mac_init_IRQ(): Setting things up …
- Killing onboard sonic ethernet card ... <6>Done
mac_init_IRQ(): Done!
CPU HACK: 68060 support pack armed
PID hash table entries: 256 (order: 8, 1024 bytes)
mac_enable_irq irq=14, irq_src=1 <6> via_irq_enable <6>
Console: colour dummy device 80x25
console [tty0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 34072k/34092k available (1544k kernel code, 1144k data, 84k init)
SLUB: Genslabs=12, HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=8
Calibrating delay loop... 31.70 BogoMIPS
Mount-cache hash table entries: 512
net_namespace: 292 bytes
NET: Registered protocol family 16
NuBus: Scanning NuBus slots.
Now probing slot E at feffffff
Now probing slot E at fefffffe
Slot E:
  Board resource:
    type: [cat 0x1 type 0x0 hw 0x0 sw 0x0]
    name: EtherNet card
    board id: 0x8
    vendor info:
    ID: TFL LAN INC.
    revision: REV 1.1
    part: E410 NuBus/E420 LC PDS,EtherNet Adapter
  Function 0x08:
    type: [cat 0x4 type 0x1 hw 0x11e sw 0x100]
    name: Network_Ethernet_Apple_TFL
    memory offset: 0x000d0000
    MAC address: 00:a0:4b:08:db:26
SCSI subsystem initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 66
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
macfb: framebuffer at 0xf9001000, mapped to 0x02800000, size 480k
macfb: mode is 640x480x8, linelength=1024
macfb: scrolling: redraw
Console: switching to colour frame buffer device 80x30
fb0: DAFB frame buffer device
r3964: Philips r3964 Driver $Revision: 1.10 $
Ethernet Channel Bonding Driver: v3.3.0 (June 10, 2008)
bonding: Warning: either miimon or arp_interval and arp_ip_target module parameters must be specified, otherwise bonding will not detect link failures! see bonding.txt for details.
mac8390.c: v0.4 2001-05-15 David Huggins-Daines <dhd@debian.org> and others
eth0: Memory length resource for slot E not found, probing
eth0: EtherNet card in slot E (type apple)
MAC 00:a0:4b:08:db:26 IRQ 61, 32 KB shared memory at 0xfeed0000,  32-bit access.
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
input: Macintosh mouse button emulation as /class/input/input0
mac_enable_irq irq=10, irq_src=1 <6> via_irq_enable <6>
Macintosh CUDA driver v0.5 for Unified ADB.
adb: starting probe task …
mac_esp: using PDMA for controller 0
mac_enable_irq irq=19, irq_src=2 <6> (via:present) <6>
esp: esp0, regs[50f10000:0] irq[19]
esp: esp0 is a ESP236, 16 MHz (ccf=4), SCSI ID 7
adb devices: [2]: 2 8
ADB keyboard at 2, handler 1
Detected ADB keyboard, type ANSI.
input: ADB keyboard as /class/input/input1
adb: finished probe task...
scsi0 : esp
osst :I: Tape driver with OnStream support version 0.99.4
osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
Driver 'osst' needs updating - please use bus_type methods
scsi 0:0:0:0: Direct-Access     SEAGATE  ST32550N         8607 PQ: 0 ANSI: 2
 target0:0:0: Beginning Domain Validation
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
SCSI Media Changer driver v0.25
Driver 'ch' needs updating - please use bus_type methods
 target0:0:0: FAST-5 SCSI 3.3 MB/s ST (304 ns, offset 15)
 target0:0:0: Domain Validation skipping write tests
 target0:0:0: Ending Domain Validation
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 26
IPv4 over IPv4 tunneling driver
sd 0:0:0:0: [sda] 4194995 512-byte hardware sectors (2148 MB)
TCP bic registered
TCP cubic registered
TCP westwood registered
TCP htcp registered
NET: Registered protocol family 17
NET: Registered protocol family 15
802.1Q VLAN Support v1.8
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: ab 00 10 08
scsi: waiting for bus probes to complete ...
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, supports DPO and FUA
sd 0:0:0:0: [sda] 4194995 512-byte hardware sectors (2148 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: ab 00 10 08
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, supports DPO and FUA
 sda: [mac] sda1 sda2 sda3 sda4 sda5 sda6 sda7
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
EXT3-fs warning: checktime reached, running e2fsck is recommended
EXT3 FS on sda7, internal journal

Code:
# mac-fdisk /dev/sda
Codice: [Seleziona]
/dev/sda
Command (? for help): p
Disk /dev/sda
        #  type name          length   base    ( size )  system
/dev/sda1   map Apple             63 @ 1       ( 31.5k)  Partition map
/dev/sda2  Dr43 Macintosh         32 @ 64      ( 16.0k)  Driver 4.3
/dev/sda3   HFS MacOS           4096 @ 96      (  2.0M)  HFS
/dev/sda4  ???? bootstrap       1600 @ 4192    (800.0k)  NewWorld bootblock
/dev/sda5  unix boot           32768 @ 5792    ( 16.0M)  Unix native
/dev/sda6  unix swap          409600 @ 38560   (200.0M)  Unix swap
/dev/sda7  unix gentoo       3746835 @ 448160  (  1.8G)  Unix native

Block size=512, Number of Blocks=4194995
Command (? for help):

Code:
# gcc -v
Target: m68k-unknown-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.2.3/work/gcc-4.2.3/configure --prefix=/usr --bindir=/usr/m68k-unknown-linux-gnu/gcc-bin/4.2.3 --includedir=/usr/lib/gcc/m68k-unknown-linux-gnu/4.2.3/include --datadir=/usr/share/gcc-data/m68k-unknown-linux-gnu/4.2.3 --mandir=/usr/share/gcc-data/m68k-unknown-linux-gnu/4.2.3/man --infodir=/usr/share/gcc-data/m68k-unknown-linux-gnu/4.2.3/info --with-gxx-include-dir=/usr/lib/gcc/m68k-unknown-linux-gnu/4.2.3/include/g++-v4 --host=m68k-unknown-linux-gnu --build=m68k-unknown-linux-gnu --disable-altivec --disable-nls --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,objc,obj-c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.2.3 (Gentoo 4.2.3 p1.0)

Code:
# cat /proc/cpuinfo
CPU:      68060
MMU:      68060
FPU:      68060
Clocking:   33 MHz


Years ago I hacked an Apple LC475 to have a 68060 CPU on it. All the four ROMs were modified, and also the PLL, and I cooked a Gentoo Stage1,2,3,4 (it took five months).

The result was interesting and exciting, but ... the console was practically definitively too slow.

Code:
#include <stdio.h>

int main()
{
   printf("hAllo world, i do muuuuuuuu again\n");
   return 0;
}

Code:
# time gcc hAllo.c -o hAllo
real   0m6.890s
user   0m5.620s
sys   0m1.260s

Look how slow was compiling a simple "hAllo world" C program.

Code:
# ./hAllo
hAllo world, i do muuuuuuuu again
 
@Plasmo
I will buy one board, but not for Linux. I'd like to develop a kind of embedded applications OS-less.
 
NetBSD is the only unix/Linux that I'm aware of which is still under active development for M68k, and it would also run quite well within a single SIMM. I'm not sure how difficult it would be to port but I believe the reason why things like Amiga or Mac require a full project is because they aim to support a wide variety of hardware and a build for the CB030 would only need to support the one configuration. If you're able to start selling them as kits it would probably go quite a ways towards garnering some interest from people more familiar with that side of things (I know I have no way of building boards using SMT components).

That being said, maybe the KISS-68030 ECB board project on retrobrew could provide a kick-start? There was a running version of linux (kernel 4.4.1 according to the video) built for it, although it's several years out of date and I can't find a download for it on the site. It may have been lost when they rolled over the site a while back, it's from about 3-4 years ago.
 
It would be nice to have an M68k machine to run Linux, *BSD, and other os'es on.
 
Last edited:
NetBSD is the only unix/Linux that I'm aware of which is still under active development for M68k, and it would also run quite well within a single SIMM. I'm not sure how difficult it would be to port but I believe the reason why things like Amiga or Mac require a full project is because they aim to support a wide variety of hardware and a build for the CB030 would only need to support the one configuration. If you're able to start selling them as kits it would probably go quite a ways towards garnering some interest from people more familiar with that side of things (I know I have no way of building boards using SMT components).

That being said, maybe the KISS-68030 ECB board project on retrobrew could provide a kick-start? There was a running version of linux (kernel 4.4.1 according to the video) built for it, although it's several years out of date and I can't find a download for it on the site. It may have been lost when they rolled over the site a while back, it's from about 3-4 years ago.

I've read some of KISS030 development log and watched a few videos. The striking impression was how much memory it needed (128meg or more) and how slow it executed. I can revisit the older NetBSD and see whether the software bloats can be removed, but that requires more knowledge of NetBSD than I have. I'm sending out two of the CB030 prototypes to interested users so perhaps that'll pique the interests of software guru.

As a hardware person, the area where I can do most good is drive down the cost of a product and make it easy to produce and build the foundational tools (monitor, diagnostic, CP/M68K) to enable the next level of development. For advertisement I could auction off a few on eBay starting from 99 cents to attract attention, but in the past people have bid it up so high, I think it discourage rather than encourage users.
Bill
 
One common 68K platform where there was some development a few years back is the Cisco 2500-series router. It's not currently being developed, but there is some historical information at http://www.kdvelectronics.eu/uClinux-cisco2500/uClinux-cisco2500.html. The 2500 is more limited in RAM size, maximum being 16MB.

But NetBSD is probably the best choice for a 'heavy' traditional Unix.

I do think that this would be a killer platform for Fuzix, though.
 
One common 68K platform where there was some development a few years back is the Cisco 2500-series But NetBSD is probably the best choice for a 'heavy' traditional Unix.

NetBSD on my old modded Apple LC475/68060 box was 3 times faster due to the lighter pressure of the internal kernel mechanism and MMU pressure.
 
One common 68K platform where there was some development a few years back is the Cisco 2500-series router. It's not currently being developed, but there is some historical information at http://www.kdvelectronics.eu/uClinux-cisco2500/uClinux-cisco2500.html. The 2500 is more limited in RAM size, maximum being 16MB.

But NetBSD is probably the best choice for a 'heavy' traditional Unix.

I do think that this would be a killer platform for Fuzix, though.

Personally I'd love to have NetBSD simply because I know so little about it. FUZIX will be major cool! Maybe I can ship one to Alan if he'll work on it. Hey Alan, are you listening?
Bill
 
I found my Apple LC475 box on eBay for about 20 Euro, but you need to modify two things
- replace the default 68LC040 CPU with a 68040 (with MMU and FPU. 68LC040 is pin to pin compatible with 68040)
- add a network card (found one, 10Mbps, for 30 Euro).
Then you can modify and recompile "Emile68k" in order to bootstrap an elf file without the need for "macOS" classic.
For this part you also have to "hack" the harddrive's partitions, in order to properly install the bootloader.

This turns an LC475 into a Linux/m68k box, and it also allows you to bootstrap macOS classic (v7.5)

---

In my experience with the LC475/68060, I modified the socked, the PLL, and the four ROMs due to the incompatibilities between 68040 and 68060. These two CPUs are not pin to pin compatible, and you need to add a "smartsocket" between the 68060 CPU and the 68040 socket. This solves the hardware side, but ... there is also a software side to be solved, and I had to add the "Motorola Support Package" for the 060 because some 68k-instructions are not implemented and they need support, and also had to add a couple of instructions to correctly initialize the CPU. Also I put "Emile68k" inside the ROM (1) in order to have fewer troubles with common SCSI Harddrive. This because Emile68k requires you to manually "hack" the logical volume of an HFS formatted hard drive, and it is annoying.


(1) Apple ROMs come with the QuickTime code built-into the ROM. I deleted this part of the code in the ROM in order to have space for the bootloader. This makes it able to load an elf binary (even over the ethernet, or over the serial), it also added a debug console on the serial line (Zilog chip), but it made the machine no more compatible with macOS.
 
I found my Apple LC475 box on eBay for about 20 Euro, but you need to modify two things
- replace the default 68LC040 CPU with a 68040 (with MMU and FPU. 68LC040 is pin to pin compatible with 68040)
- add a network card (found one, 10Mbps, for 30 Euro).
Then you can modify and recompile "Emile68k" in order to bootstrap an elf file without the need for "macOS" classic.
For this part you also have to "hack" the harddrive's partitions, in order to properly install the bootloader.

This turns an LC475 into a Linux/m68k box, and it also allows you to bootstrap macOS classic (v7.5)

---

In my experience with the LC475/68060, I modified the socked, the PLL, and the four ROMs due to the incompatibilities between 68040 and 68060. These two CPUs are not pin to pin compatible, and you need to add a "smartsocket" between the 68060 CPU and the 68040 socket. This solves the hardware side, but ... there is also a software side to be solved, and I had to add the "Motorola Support Package" for the 060 because some 68k-instructions are not implemented and they need support, and also had to add a couple of instructions to correctly initialize the CPU. Also I put "Emile68k" inside the ROM (1) in order to have fewer troubles with common SCSI Harddrive. This because Emile68k requires you to manually "hack" the logical volume of an HFS formatted hard drive, and it is annoying.


(1) Apple ROMs come with the QuickTime code built-into the ROM. I deleted this part of the code in the ROM in order to have space for the bootloader. This makes it able to load an elf binary (even over the ethernet, or over the serial), it also added a debug console on the serial line (Zilog chip), but it made the machine no more compatible with macOS.

Interesting works. That's the kind of hack I love reading about. So how much RAM you've installed in LC475 to make Linux work?

I think there is a socket that translate the 5V 68040 signals to 3.3V 68060. Maybe that is the "smartsocket" you talked about.
Bill
 
Back
Top