Tuesday 10 May 2022

Linux for m68k on QEMU (q800) - System Information

QEMU running Debian Linux unstable (bookworm/sid) for m86k

Motorola 68000 series

Introduced in 1979 the Motorola 68000 series was used in a wide range of computers through the 1980s and 1990s. Initially using a 32-bit instruction set and 32-bit registers combined with a 16-bit data bus, which Motorola dubbed a 16/32-bit processor, later iterations would implement fully 32-bit architectures, while remaining instruction compatible. The initial models provided 8-bit (68008) and 16-bit (68000, 68010) options for the external data bus allowing the use of cheaper support chips in markets that were typically 8-bit and 16-bit dominated in the early 1980s. The first fully 32-bit model, the 68020 introduced in 1984 (a year before Intel launched the 80386), initially appeared in UNIX workstations and its successors would be at the core of home computers in the 1990s. While 68000 series processors no longer appear in desktop systems, they can still be found in embedded applications.

Linux and Motorola 68000 series

Unsurprisingly the Motorola 68000 series was one of the first systems to have a Linux port (see Linux/m68k: Linux on Motorola's 68000 Processor | Linux Journal). Arguably Linux/m68k was the first port of Linux to a non-x86 architecture, initially starting off as a parallel fork of the Linux kernel, and later being incorporated into the mainline kernel, once work to support multiple platforms was in place (see Linus Torvalds 1997 M.Sc. thesis "Linux: a Portable Operating System").

A wide range of Motorola 68000 series systems are supported. Although a memory management unit (MMU) is required for support, which excludes some system variants using processors which didn't include the MMU or where the MMU is non-functional (systems without an MMU may be supported by μClinux (Wikipedia)). Looking around for a Linux distribution with Motorola 68000 series support and which doesn't require too much setup, it looks like Debian is the best bet.

Debian Linux had official release support in Debian 2.0 (Hamm) through Debian 3.1 (Sarge), and has continued to support the architecture through Debian - Ports. Currently a unofficial Linux/m68k network installation image is available for Debian 10 (buster) (https://cdimage.debian.org/cdimage/ports/10.0/m68k/iso-cd/). That sounds good, so let's give it a go...

QEMU

The wide range of systems that used the Motorola 68000 series means there are a lot of emulation options... Since we've looked at QEMU in previous emulation posts, let's see what QEMU offers for these systems...

QEMU has a relatively limited selection of system emulations for the Motorola 68000 series:

Arnewsh Inc. SBC5206an5206evaluation board
NXP MCF5208 Evaluation Boardmcf5208evbevaluation board
NeXT NeXTcube (Wikipedia)next-cubeUNIX workstation
Apple Macintosh Quadra 800 (Wikipedia)q800desktop system

Note: with QEMU 6.0 support has been added for a virt machine that is more flexible than systems considered here (see QEMU M680x0 support [PDF]).

The QEMU wiki has a description of how to install Linux on the q800 system (Documentation/Platforms/m68k - QEMU), so that sounds like a good place to begin...

Checking Apple Support, EveryMac.com, Wikipedia the hardware specification for the 'q800' would be:

SystemApple Macintosh Quadra 800
CPU68040 @ 33 MHz, includes PMMU & FPU
RAM8 MiB (136 MiB max.)
Floppy3.5" 1.44MB
StorageEmulex SCSI Processor (ESP236) controller
SCSI internal hard disk 230 MB or 500 MB
SCSI 2x CD-ROM drive
Videoframebuffer, 512 KiB or 1.0 MiB
NetworkSONIC (DP83932) 10Mb/s ethernet AAUI-15
Keyboard & MouseADB

Third-party processor clock upgrades could get the 68040 to 40 MHz or 50 MHz, and there was a PowerPC 601 @ 100 MHz upgrade processor option.

Since QEMU is not limited by the physical hardware, there is the option of having more memory than the system could support. For 'q800' it turns out that the maximum RAM is around 1,000 MiB (with 1.0 GiB problems appear).

Emulation Command

For running the emulated machine the command-line used is:

$ qemu-system-m68k \
    --machine q800 \
    --cpu m68040 \
    -m 1000M \
    -drive file="hda_DebianLinux10_q800.qcow2",format=qcow2 \
    -drive file="debian-10.0-m68k-NETINST-1.iso",format=raw,media=cdrom \
    -net nic,model=dp83932 \
    -net 'user,guestfwd=:10.0.2.1:22-cmd:netcat 127.0.0.1 22,hostfwd=::2222-:22' \
    -serial mon:stdio \
    -k en-gb \
    -kernel live-debian10/vmlinux-4.16.0-1-m68k \
    -initrd live-debian10/initrd.img-4.16.0-1-m68k \
    -append 'root=/dev/sda2 rw console=ttyS0 console=tty' \
    -name 'Debian Linux 10 (buster) for m68k on QEMU'

The network 'guestfwd' and 'hostfwd' configurations provide ssh access from the guest to the host using IP address 10.0.2.1 (ssh -l hostUser 10.0.2.1) and provide ssh access from the host to the guest via host port 2222 (ssh -l guestUser -p 2222 localhost).

For some reason the keyboard mappings seem to be screwed up in this version, so the graphics console is not usable. Mapping the system console to the serial port and connecting the serial port to the terminal, provides a workaround to interact with the system.

The Linux kernel and 'initrd' were extracted from the installed system with:

$ mkdir -p tmp_mnt
$ guestmount -a hda_DebianLinux10_q800.qcow2 -m /dev/sda2 tmp_mnt
$ ls tmp_mnt/boot
$ ls -1 tmp_mnt/boot/
config-4.16.0-1-m68k
initrd.img-4.16.0-1-m68k
System.map-4.16.0-1-m68k
vmlinux-4.16.0-1-m68k
$ cp tmp_mnt/boot/initrd.img-4.16.0-1-m68k live-debian10/
$ cp tmp_mnt/boot/vmlinux-4.16.0-1-m68k live-debian10/
$ guestunmount tmp_mnt

Note: this needs to be done for every kernel and/or initrd update.

For installation a similar process was used to extract the installation kernel and initrd from the ISO:

$ mkdir -p tmp_mnt
$ fuseiso debian-10.0-m68k-NETINST-1.iso tmp_mnt
$ cp tmp_mnt/boot/vmlinuz ./
$ cp tmp_mnt/boot/initrd.gz ./
$ fusermount -u tmp_mnt

Which were then passed to QEMU for installing the system.

System Information - Debian Linux unstable (buster/sid)

Some information about this system collected in Debian Linux unstable (buster/sid) for m86k...

uname

Operating system name, version, revision and platform information.

$ uname -a
Linux deb-m68k 4.16.0-1-m68k #1 Debian 4.16.5-1 (2018-04-29) m68k GNU/Linux

So a "Linux" kernel, running on a node named "deb-m68k", kernel release "4.16.0-1-m68k" (a patched 4.16.0 kernel), kernel version "#1 Debian 4.16.5-1 (2018-04-29)", platform architecture "m68k", for operating system "GNU/Linux".

Looking at the Debian release information files:

$ cat /etc/debian_version 
buster/sid
$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux buster/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

So a Debian unstable (sid) for Debian Linux 10 (buster).

/proc/cpuinfo & lscpu

System processor(s) information:

$ lscpu
Architecture:        m68k
Byte Order:          Big Endian
CPU(s):              1
On-line CPU(s) list: 0
Thread(s) per core:  1
Core(s) per socket:  1
Socket(s):           1
$ cat /proc/cpuinfo 
CPU:		68040
MMU:		68040
FPU:		68040
Clocking:	895.7MHz
BogoMips:	597.19
Calibration:	2985984 loops

Wow those 'BogoMips' and 'Clocking' figures are pretty spectacular. The Motorola 68040 (Wikipedia) had a maximum clock of 40 MHz (although some parts could overclock to 50 MHz with suitable cooling), but here we see a claim of the clock nearing 900 MHz.

report-hw

Report on hardware by running various commands:

$ report-hw 
uname -a: Linux deb-m68k 4.16.0-1-m68k #1 Debian 4.16.5-1 (2018-04-29) m68k GNU/Linux
lspci -knn: pcilib: Cannot open /proc/bus/pci
lspci -knn: lspci: Cannot find any working access method.
usb: No USB information available
lsmod: Module                  Size  Used by
lsmod: evdev                   8025  0
lsmod: mac_hid                 2213  0
lsmod: sg                     15600  0
lsmod: ip_tables               7980  0
lsmod: x_tables               12952  1 ip_tables
lsmod: sha1_generic            1835  1
lsmod: hmac                    2281  2
lsmod: ipv6                  303321  12
lsmod: autofs4                21492  2
lsmod: ext4                  316529  1
lsmod: crc16                   1015  1 ext4
lsmod: mbcache                 2928  1 ext4
lsmod: jbd2                   41408  1 ext4
lsmod: crc32c_generic          1318  2
lsmod: fscrypto               13227  1 ext4
lsmod: ecb                     1513  0
lsmod: sd_mod                 25666  3
lsmod: sr_mod                 10852  0
lsmod: cdrom                  33248  1 sr_mod
lsmod: mac_esp                 3870  0
lsmod: esp_scsi               17646  3 mac_esp
lsmod: macsonic               11127  0
df: Filesystem     1K-blocks   Used Available Use% Mounted on
df: udev              500728      0    500728   0% /dev
df: tmpfs             100800  11500     89300  12% /run
df: /dev/sda2        1866572 277420   1476284  16% /
df: tmpfs             503984      0    503984   0% /dev/shm
df: tmpfs               5120      0      5120   0% /run/lock
df: tmpfs             503984      0    503984   0% /sys/fs/cgroup
free:               total        used        free      shared  buff/cache   available
free: Mem:        1007968       14820      946836       11500       46312      969408
free: Swap:        167424           0      167424
/proc/cmdline: root=/dev/sda2 rw console=ttyS0 console=tty
/proc/cpuinfo: CPU:		68040
/proc/cpuinfo: MMU:		68040
/proc/cpuinfo: FPU:		68040
/proc/cpuinfo: Clocking:	895.7MHz
/proc/cpuinfo: BogoMips:	597.19
/proc/cpuinfo: Calibration:	2985984 loops
/proc/iomem: 00000000-00000000 : ST-RAM Pool
/proc/iomem: 00000000-00000000 : scc.1
/proc/iomem: 00000000-00000000 : scc.0
/proc/iomem: 00000000-00000000 : swim
/proc/interrupts:            CPU0       
/proc/interrupts:   3:        325      auto      sonic
/proc/interrupts:   4:         65      auto      ttyS0
/proc/interrupts:   7:          0      auto      NMI
/proc/interrupts:  10:        228       mac      ADB
/proc/interrupts:  14:      41175       mac      timer
/proc/interrupts:  19:       2428       mac      ESP
/proc/interrupts:  56:          0       mac      sonic
/proc/interrupts: ERR:          0
/proc/meminfo: MemTotal:        1007968 kB
/proc/meminfo: MemFree:          946868 kB
/proc/meminfo: MemAvailable:     969440 kB
/proc/meminfo: Buffers:            6184 kB
/proc/meminfo: Cached:            37636 kB
/proc/meminfo: SwapCached:            0 kB
/proc/meminfo: Active:            26664 kB
/proc/meminfo: Inactive:          24656 kB
/proc/meminfo: Active(anon):       7572 kB
/proc/meminfo: Inactive(anon):    11424 kB
/proc/meminfo: Active(file):      19092 kB
/proc/meminfo: Inactive(file):    13232 kB
/proc/meminfo: Unevictable:           0 kB
/proc/meminfo: Mlocked:               0 kB
/proc/meminfo: SwapTotal:        167424 kB
/proc/meminfo: SwapFree:         167424 kB
/proc/meminfo: Dirty:                 4 kB
/proc/meminfo: Writeback:             0 kB
/proc/meminfo: AnonPages:          7512 kB
/proc/meminfo: Mapped:            13224 kB
/proc/meminfo: Shmem:             11500 kB
/proc/meminfo: Slab:               7220 kB
/proc/meminfo: SReclaimable:       2492 kB
/proc/meminfo: SUnreclaim:         4728 kB
/proc/meminfo: KernelStack:         408 kB
/proc/meminfo: PageTables:          340 kB
/proc/meminfo: NFS_Unstable:          0 kB
/proc/meminfo: Bounce:                0 kB
/proc/meminfo: WritebackTmp:          0 kB
/proc/meminfo: CommitLimit:      671408 kB
/proc/meminfo: Committed_AS:      84132 kB
/proc/meminfo: VmallocTotal:    2375680 kB
/proc/meminfo: VmallocUsed:           0 kB
/proc/meminfo: VmallocChunk:          0 kB
/proc/bus/input/devices: I: Bus=0017 Vendor=0001 Product=2201 Version=0100
/proc/bus/input/devices: N: Name="ADB keyboard"
/proc/bus/input/devices: P: Phys=adb2:2.01/input
/proc/bus/input/devices: S: Sysfs=/devices/virtual/input/input0
/proc/bus/input/devices: U: Uniq=
/proc/bus/input/devices: H: Handlers=sysrq kbd leds event0 
/proc/bus/input/devices: B: PROP=0
/proc/bus/input/devices: B: EV=120003
/proc/bus/input/devices: B: KEY=10000 0 0 0 0 0 0 0 0 0 0 feb0ffdf 3cfffff ffffffff fffffffe
/proc/bus/input/devices: B: LED=7
/proc/bus/input/devices: 
/proc/bus/input/devices: I: Bus=0017 Vendor=0001 Product=3302 Version=0100
/proc/bus/input/devices: N: Name="ADB mouse"
/proc/bus/input/devices: P: Phys=adb3:3.02/input
/proc/bus/input/devices: S: Sysfs=/devices/virtual/input/input1
/proc/bus/input/devices: U: Uniq=
/proc/bus/input/devices: H: Handlers=mouse0 event1 
/proc/bus/input/devices: B: PROP=0
/proc/bus/input/devices: B: EV=7
/proc/bus/input/devices: B: KEY=70000 0 0 0 0 0 0 0 0
/proc/bus/input/devices: B: REL=3
/proc/bus/input/devices: 

Lots of information about the hardware, although since this system is Nubus based rather than PCI there are some gaps.

dmesg

System log messages:

$ sudo dmesg
[    0.000000] Linux version 4.16.0-1-m68k (debian-kernel@lists.debian.org) (gcc version 7.3.0 (Debian 7.3.0-16)) #1 Debian 4.16.5-1 (2018-04-29)
[    0.000000] Detected Macintosh model: 35
[    0.000000]  Penguin bootinfo data:
[    0.000000]  Video: addr 0xf9001000 row 0x320 depth 8 dimensions 800 x 600
[    0.000000]  Videological 0x0 phys. 0x0, SCC at 0x5000c020
[    0.000000]  Boottime: 0x0 GMTBias: 0x0
[    0.000000]  Machine ID: 35 CPUid: 0x2 memory size: 0x3e8
[    0.000000] Apple Macintosh Quadra 800
[    0.000000] On node 0 totalpages: 256000
[    0.000000]   DMA zone: 2500 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 256000 pages, LIFO batch:31
[    0.000000] initrd: 3e1c7000 - 3e7fff9c
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 253500
[    0.000000] Kernel command line: root=/dev/sda2 rw console=ttyS0 console=tty
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 1001456K/1024000K available (2741K kernel code, 391K rwdata, 964K rodata, 144K init, 204K bss, 22544K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0x003d0bd8 - 0x003d0fd8   (   1 KiB)
                   kmap    : 0xd0000000 - 0xf0000000   ( 512 MiB)
                   vmalloc : 0x3f000000 - 0xd0000000   (2320 MiB)
                   lowmem  : 0x00000000 - 0x3e800000   (1000 MiB)
                     .init : 0x(ptrval) - 0x(ptrval)   ( 144 KiB)
                     .text : 0x(ptrval) - 0x(ptrval)   (2742 KiB)
                     .data : 0x(ptrval) - 0x(ptrval)   (1356 KiB)
                     .bss  : 0x(ptrval) - 0x(ptrval)   ( 205 KiB)
[    0.000000] random: get_random_u32 called from __kmem_cache_create+0x34/0x492 with crng_init=0
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=8
[    0.000000] NR_IRQS: 200
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [tty0] enabled
[    0.000000] console [ttyS0] enabled
[    0.150000] Calibrating delay loop... 597.19 BogoMIPS (lpj=2985984)
[    0.150000] pid_max: default: 32768 minimum: 301
[    0.160000] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.160000] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.190000] devtmpfs: initialized
[    0.210000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.210000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.220000] NET: Registered protocol family 16
[    0.230000] NuBus: Scanning NuBus slots.
[    0.230000] Slot 9: Board resource not found!
[    0.230000] SCSI subsystem initialized
[    0.250000] VFS: Disk quotas dquot_6.6.0
[    0.250000] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.280000] NET: Registered protocol family 2
[    0.280000] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.290000] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.290000] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    0.290000] TCP: Hash tables configured (established 8192 bind 8192)
[    0.290000] UDP hash table entries: 512 (order: 1, 8192 bytes)
[    0.290000] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
[    0.290000] NET: Registered protocol family 1
[    0.300000] Unpacking initramfs...
[    1.490000] Freeing initrd memory: 6368K
[    1.490000] workingset: timestamp_bits=11 max_order=18 bucket_order=7
[    1.510000] zbud: loaded
[    1.550000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.550000] io scheduler noop registered
[    1.550000] io scheduler cfq registered (default)
[    1.550000] io scheduler mq-deadline registered
[    1.560000] atafb_init: start
[    1.560000] macfb: framebuffer at 0xf9001000, mapped to 0x(ptrval), size 468k
[    1.560000] macfb: mode is 800x600x8, linelength=800
[    1.570000] Console: switching to colour frame buffer device 100x37
[    1.580000] fb0: DAFB frame buffer device
[    1.580000] pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
[    1.580000] scc.0: ttyS0 at MMIO 0x5000c022 (irq = 4, base_baud = 230400) is a Z85c30 ESCC - Serial port
[    1.580000] scc.1: ttyS1 at MMIO 0x5000c020 (irq = 4, base_baud = 230400) is a Z85c30 ESCC - Serial port
[    1.590000] adb: Mac II ADB Driver v1.0 for Unified ADB
[    1.590000] mousedev: PS/2 mouse device common for all mice
[    1.590000] rtc-generic rtc-generic: rtc core: registered rtc-generic as rtc0
[    1.590000] ledtrig-cpu: registered to indicate activity on CPUs
[    1.590000] NET: Registered protocol family 17
[    1.590000] mpls_gso: MPLS GSO support
[    1.600000] random: fast init done
[    1.610000] ADB keyboard at 2, handler set to 3
[    1.620000] Detected ADB keyboard, type ANSI.
[    1.630000] input: ADB keyboard as /devices/virtual/input/input0
[    1.640000] ADB mouse at 3, handler set to 2
[    1.650000] input: ADB mouse as /devices/virtual/input/input1
[    1.650000] registered taskstats version 1
[    1.660000] zswap: loaded using pool lzo/zbud
[    1.670000] rtc-generic rtc-generic: setting system clock to 2021-06-20 15:39:26 UTC (1624203566)
[    1.680000] Freeing unused kernel memory: 144K
[    1.680000] This architecture does not have kernel memory protection.
[    2.730000] Checking for internal Macintosh ethernet (SONIC).. 
[    2.730000] yes
[    2.740000] sonic.c:v0.92 20.9.98 tsbogend@alpha.franken.de
[    2.740000] macsonic: onboard / comm-slot SONIC at 0x50f0a000
[    2.750000] macsonic: revision 0x0004, using 32 bit DMA and register offset 2
[    2.980000] eth0: MAC 08:00:07:12:34:56 IRQ 3
[    3.040000] mac_esp: using PDMA for controller 0
[    3.050000] mac_esp mac_esp.0: esp0: regs[(ptrval):(null)] irq[19]
[    3.050000] mac_esp mac_esp.0: esp0: is a ESP236, 16 MHz (ccf=4), SCSI ID 7
[    6.080000] scsi host0: esp
[    6.140000] scsi 0:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    2.5+ PQ: 0 ANSI: 5
[    6.150000] scsi target0:0:0: Beginning Domain Validation
[    6.150000] scsi target0:0:0: Domain Validation skipping write tests
[    6.160000] scsi target0:0:0: Ending Domain Validation
[    6.170000] scsi 0:0:1:0: CD-ROM            QEMU     QEMU CD-ROM      2.5+ PQ: 0 ANSI: 5
[    6.170000] scsi target0:0:1: Beginning Domain Validation
[    6.180000] scsi target0:0:1: Domain Validation skipping write tests
[    6.180000] scsi target0:0:1: Ending Domain Validation
[    6.190000] scsi 0:0:2:0: CD-ROM            QEMU     QEMU CD-ROM      2.5+ PQ: 0 ANSI: 5
[    6.190000] scsi target0:0:2: Beginning Domain Validation
[    6.190000] scsi target0:0:2: Domain Validation skipping write tests
[    6.200000] scsi target0:0:2: Ending Domain Validation
[    6.270000] sr 0:0:1:0: Power-on or device reset occurred
[    6.310000] sd 0:0:0:0: Power-on or device reset occurred
[    6.310000] sd 0:0:0:0: [sda] 4194304 512-byte logical blocks: (2.15 GB/2.00 GiB)
[    6.320000] sd 0:0:0:0: [sda] Write Protect is off
[    6.320000] sd 0:0:0:0: [sda] Mode Sense: 63 00 00 08
[    6.320000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.350000] sr 0:0:1:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray
[    6.350000] cdrom: Uniform CD-ROM driver Revision: 3.20
[    6.360000] sr 0:0:1:0: Attached scsi CD-ROM sr0
[    6.360000] sr 0:0:2:0: Power-on or device reset occurred
[    6.390000]  sda: [mac] sda1 sda2 sda3 sda4
[    6.400000] sr 0:0:2:0: [sr1] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray
[    6.410000] sr 0:0:2:0: Attached scsi CD-ROM sr1
[    6.450000] sd 0:0:0:0: [sda] Attached SCSI disk
[    7.830000] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    9.290000] NET: Registered protocol family 10
[    9.480000] Segment Routing with IPv6
[    9.570000] systemd[1]: systemd 238 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    9.580000] systemd[1]: Detected architecture m68k.
[    9.670000] systemd[1]: Set hostname to <deb-m68k>.
[   11.050000] random: systemd: uninitialized urandom read (16 bytes read)
[   11.060000] systemd[1]: Listening on udev Kernel Socket.
[   11.080000] random: systemd: uninitialized urandom read (16 bytes read)
[   11.090000] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[   11.110000] random: systemd: uninitialized urandom read (16 bytes read)
[   11.120000] systemd[1]: Listening on Journal Socket (/dev/log).
[   11.140000] random: systemd: uninitialized urandom read (16 bytes read)
[   11.150000] systemd[1]: Reached target Remote File Systems.
[   11.170000] random: systemd: uninitialized urandom read (16 bytes read)
[   11.170000] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   11.190000] random: systemd: uninitialized urandom read (16 bytes read)
[   11.190000] systemd[1]: Listening on Journal Socket.
[   11.210000] random: systemd: uninitialized urandom read (16 bytes read)
[   11.260000] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[   11.280000] random: systemd: uninitialized urandom read (16 bytes read)
[   11.320000] random: systemd: uninitialized urandom read (16 bytes read)
[   11.360000] random: systemd: uninitialized urandom read (16 bytes read)
[   12.560000] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro
[   13.340000] random: crng init done
[   14.230000] systemd-journald[152]: Received request to flush runtime journal from PID 1
[   15.900000] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   15.930000] sr 0:0:1:0: Attached scsi generic sg1 type 5
[   16.030000] sr 0:0:2:0: Attached scsi generic sg2 type 5
[   19.500000] Adding 167424k swap on /dev/sda3.  Priority:-2 extents:1 across:167424k FS

Lots of information about the detection of hardware and initialization of devices.

System Information - Debian Linux unstable (bookworm/sid)

Taking a basic "netinst" install of Debian Linux unstable (buster/sid), pointing it at the repository for the unoffical ports (http://ftp.ports.debian.org/debian-ports/) and updating. After forcing a minor conflict through, we get a Debian Linux unstable (bookworm/sid) system. So let's see what it says about the system...

uname, lsb_release & /etc/os-release

Operating system name, version, revision and platform information.

$ uname -a
Linux deb-m68k 5.17.0-1-m68k #1 Debian 5.17.3-1 (2022-04-18) m68k GNU/Linux

So a "Linux" kernel, running on a node named "deb-m68k", kernel release "5.17.0-1-m68k" (a patched 5.17.0 kernel), kernel version "#1 Debian 5.17.3-1 (2022-04-18)", platform architecture "m68k", for operating system "GNU/Linux".

Linux Standard Base (LSB) release information:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux bookworm/sid
Release:	unstable
Codename:	sid

Confirming with the Debian release information files:

$ cat /etc/debian_version 
bookworm/sid
$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

So a Debian unstable (sid) for Debian Linux 12 (bookworm).

lscpu & /proc/cpuinfo

Report system processor(s) information:

$ lscpu
Architecture:          m68k
  Byte Order:          Big Endian
CPU(s):                1
  On-line CPU(s) list: 0

That is a bit bare bones, fortunately /proc/cpuinfo has a bit more to say:

$ cat /proc/cpuinfo
CPU:		68040
MMU:		68040
FPU:		68040
Clocking:	1193.1MHz
BogoMips:	795.44
Calibration:	3977216 loops

Wow those 'BogoMips' and 'Clocking' figures are pretty spectacular. The Motorola 68040 (Wikipedia) had a maximum clock of 40 MHz (although some parts could overclock to 50 MHz with suitable cooling), but here we see a claim of the CPU clock in excess of 1 GHz.

/proc/meminfo

Memory information:

$ cat /proc/meminfo
MemTotal:        1006888 kB
MemFree:          521860 kB
MemAvailable:     968732 kB
Buffers:           27560 kB
Cached:           418092 kB
SwapCached:            0 kB
Active:           130368 kB
Inactive:         326100 kB
Active(anon):        180 kB
Inactive(anon):    10872 kB
Active(file):     130188 kB
Inactive(file):   315228 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:        167424 kB
SwapFree:         167424 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         10824 kB
Mapped:            20648 kB
Shmem:               236 kB
KReclaimable:      17428 kB
Slab:              22452 kB
SReclaimable:      17428 kB
SUnreclaim:         5024 kB
KernelStack:         424 kB
PageTables:          152 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      670868 kB
Committed_AS:     116260 kB
VmallocTotal:    2375680 kB
VmallocUsed:        1588 kB
VmallocChunk:          0 kB
Percpu:              128 kB

Showing the 1,000 MiB of RAM and 167 MB of swap.

lshw

A hardware report:

$ sudo lshw -disable scsi
deb-m68k                    
    description: Computer
    width: 32 bits
  *-core
       description: Motherboard
       physical id: 0
     *-memory
          description: System memory
          physical id: 0
          size: 983MiB
     *-cpu
          physical id: 1
          bus info: cpu@0
          width: 32 bits
  *-graphics
       product: DAFB
       physical id: 1
       logical name: /dev/fb0
       capabilities: fb
       configuration: depth=8 resolution=800,600
  *-input:0
       product: ADB keyboard
       physical id: 2
       logical name: input0
       logical name: /dev/input/event0
       logical name: input0::capslock
       logical name: input0::numlock
       logical name: input0::scrolllock
       capabilities: adb
  *-input:1
       product: ADB mouse
       physical id: 3
       logical name: input1
       logical name: /dev/input/event1
       logical name: /dev/input/mouse0
       capabilities: adb
  *-network
       description: Ethernet interface
       physical id: 4
       logical name: eth0
       serial: 08:00:07:12:34:56
       capabilities: ethernet physical
       configuration: broadcast=yes driver=macsonic driverversion=5.17.0-1-m68k ip=10.0.2.15 multicast=yes

The QEMU system has some issues with the SCSI emulation that lshw triggers, so the SCSI tests have been disabled.

Lots of information about the hardware, although since this system is Nubus based rather than PCI there is lots of stuff missing.

dmesg

System log messages:

$ sudo dmesg
[    0.000000] Linux version 5.17.0-1-m68k (debian-kernel@lists.debian.org) (gcc-11 (Debian 11.2.0-20) 11.2.0, GNU ld (GNU Binutils for Debian) 2.38) #1 Debian 5.17.3-1 (2022-04-18)
[    0.000000] Detected Macintosh model: 35
[    0.000000]  Penguin bootinfo data:
[    0.000000]  Video: addr 0xf9001000 row 0x320 depth 8 dimensions 800 x 600
[    0.000000]  Videological 0x0 phys. 0x0, SCC at 0x5000c020
[    0.000000]  Boottime: 0x0 GMTBias: 0x0
[    0.000000]  Machine ID: 35 CPUid: 0x2 memory size: 0x3e8
[    0.000000] Apple Macintosh Quadra 800
[    0.000000] initrd: 3e02b000 - 3e7fff09
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000003e7ffffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003e7fffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003e7fffff]
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 253500
[    0.000000] Kernel command line: root=/dev/sda2 rw console=ttyS0 console=tty
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Sorting __ex_table...
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 998704K/1024000K available (3438K kernel code, 610K rwdata, 1132K rodata, 168K init, 211K bss, 25296K reserved, 0K cma-reserved)
[    0.000000] random: get_random_u32 called from __kmem_cache_create+0x24/0x26e with crng_init=0
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 200
[    0.000000] clocksource: via1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 2439823894983 ns
[    0.010000] Console: colour dummy device 80x25
[    0.010000] printk: console [tty0] enabled
[    0.030000] printk: console [ttyS0] enabled
[    0.030000] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.080000] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.120000] cblist_init_generic: Setting adjustable number of callback queues.
[    0.120000] cblist_init_generic: Setting shift to 0 and lim to 1.
[    0.140000] devtmpfs: initialized
[    0.150000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.160000] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.170000] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.180000] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.180000] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.220000] NuBus: Scanning NuBus slots.
[    0.220000] Slot 9: Board resource not found!
[    0.220000] SCSI subsystem initialized
[    0.240000] clocksource: Switched to clocksource via1
[    0.250000] VFS: Disk quotas dquot_6.6.0
[    0.250000] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.290000] NET: Registered PF_INET protocol family
[    0.290000] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.300000] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.310000] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.310000] TCP bind hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.310000] TCP: Hash tables configured (established 8192 bind 8192)
[    0.310000] MPTCP token hash table entries: 1024 (order: 1, 12288 bytes, linear)
[    0.320000] UDP hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.320000] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.320000] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.320000] NET: Registered PF_XDP protocol family
[    0.330000] Initialise system trusted keyrings
[    0.330000] Key type blacklist registered
[    0.340000] Trying to unpack rootfs image as initramfs...
[    0.380000] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.410000] zbud: loaded
[    0.420000] Key type asymmetric registered
[    0.420000] Asymmetric key parser 'x509' registered
[    1.380000] Freeing initrd memory: 8016K
[    1.530000] alg: self-tests for CTR-KDF (hmac(sha256)) passed
[    1.530000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    1.530000] io scheduler mq-deadline registered
[    1.530000] macfb: framebuffer at 0xf9001000, mapped to 0x(ptrval), size 468k
[    1.540000] macfb: mode is 800x600x8, linelength=800
[    1.550000] Console: switching to colour frame buffer device 100x37
[    1.560000] fb0: DAFB frame buffer device
[    1.560000] pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
[    1.560000] scc.0: ttyS0 at MMIO 0x5000c022 (irq = 4, base_baud = 230400) is a Z85c30 ESCC - Serial port
[    1.570000] scc.1: ttyS1 at MMIO 0x5000c020 (irq = 4, base_baud = 230400) is a Z85c30 ESCC - Serial port
[    1.580000] Non-volatile memory driver v1.3
[    1.580000] adb: Mac II ADB Driver v1.0 for Unified ADB
[    1.580000] mousedev: PS/2 mouse device common for all mice
[    1.600000] random: fast init done
[    1.600000] adb device [2]: 2 0x1
[    1.600000] adb device [3]: 3 0x2
[    1.610000] ADB keyboard at 2 has handler 0x3
[    1.610000] Detected ADB keyboard, type ANSI.
[    1.610000] input: ADB keyboard as /devices/virtual/input/input0
[    1.620000] ADB mouse (standard) at 3 has handler 0x2
[    1.620000] input: ADB mouse as /devices/virtual/input/input1
[    1.630000] rtc-generic rtc-generic: registered as rtc0
[    1.640000] rtc-generic rtc-generic: setting system clock to 2022-05-10T19:26:14 UTC (1652210774)
[    1.650000] ledtrig-cpu: registered to indicate activity on CPUs
[    1.660000] NET: Registered PF_PACKET protocol family
[    1.670000] mpls_gso: MPLS GSO support
[    1.670000] registered taskstats version 1
[    1.680000] Loading compiled-in X.509 certificates
[    1.780000] Loaded X.509 cert 'Debian Secure Boot CA: 6ccece7e4c6c0d1f6149f3dd27dfcc5cbb419ea1'
[    1.780000] Loaded X.509 cert 'Debian Secure Boot Signer 2021 - linux: 4b6ef5abca669825178e052c84667ccbc0531f8c'
[    1.790000] zswap: loaded using pool lzo/zbud
[    1.800000] Key type ._fscrypt registered
[    1.800000] Key type .fscrypt registered
[    1.810000] Key type fscrypt-provisioning registered
[    1.880000] Key type encrypted registered
[    1.900000] Freeing unused kernel image (initmem) memory: 168K
[    1.900000] This architecture does not have kernel memory protection.
[    1.900000] Run /init as init process
[    1.910000]   with arguments:
[    1.910000]     /init
[    1.910000]   with environment:
[    1.910000]     HOME=/
[    1.910000]     TERM=linux
[    3.320000] Onboard/comm-slot SONIC, revision 0x0004, 32 bit DMA, register offset 2
[    3.330000] SONIC ethernet @50f0a000, MAC 08:00:07:12:34:56, IRQ 3
[    3.370000] mac_esp: using PDMA for controller 0
[    3.380000] mac_esp mac_esp.0: esp0: regs[(ptrval):0] irq[19]
[    3.380000] mac_esp mac_esp.0: esp0: is a ESP236, 16 MHz (ccf=4), SCSI ID 7
[    6.480000] scsi host0: esp
[    6.550000] scsi 0:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    2.5+ PQ: 0 ANSI: 5
[    6.550000] scsi target0:0:0: Beginning Domain Validation
[    6.560000] scsi target0:0:0: Domain Validation skipping write tests
[    6.570000] scsi target0:0:0: Ending Domain Validation
[    6.570000] scsi 0:0:1:0: CD-ROM            QEMU     QEMU CD-ROM      2.5+ PQ: 0 ANSI: 5
[    6.580000] scsi target0:0:1: Beginning Domain Validation
[    6.590000] scsi target0:0:1: Domain Validation skipping write tests
[    6.590000] scsi target0:0:1: Ending Domain Validation
[    6.600000] scsi 0:0:2:0: CD-ROM            QEMU     QEMU CD-ROM      2.5+ PQ: 0 ANSI: 5
[    6.600000] scsi target0:0:2: Beginning Domain Validation
[    6.610000] scsi target0:0:2: Domain Validation skipping write tests
[    6.620000] scsi target0:0:2: Ending Domain Validation
[    6.740000] sr 0:0:1:0: Power-on or device reset occurred
[    6.750000] sr 0:0:1:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray
[    6.750000] cdrom: Uniform CD-ROM driver Revision: 3.20
[    6.810000] sr 0:0:1:0: Attached scsi CD-ROM sr0
[    6.810000] sr 0:0:2:0: Power-on or device reset occurred
[    6.820000] sr 0:0:2:0: [sr1] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray
[    6.850000] sd 0:0:0:0: Power-on or device reset occurred
[    6.870000] sr 0:0:2:0: Attached scsi CD-ROM sr1
[    6.890000] sd 0:0:0:0: [sda] 4194304 512-byte logical blocks: (2.15 GB/2.00 GiB)
[    6.910000] sd 0:0:0:0: [sda] Write Protect is off
[    6.910000] sd 0:0:0:0: [sda] Mode Sense: 63 00 00 08
[    6.910000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.970000]  sda: [mac] sda1 sda2 sda3 sda4
[    7.010000] sd 0:0:0:0: [sda] Attached SCSI disk
[    8.440000] process '/usr/bin/fstype' started with executable stack
[    9.170000] EXT4-fs (sda2): mounted filesystem with ordered data mode. Quota mode: none.
[   11.180000] systemd[1]: Inserted module 'autofs4'
[   11.310000] NET: Registered PF_INET6 protocol family
[   11.520000] Segment Routing with IPv6
[   11.530000] In-situ OAM (IOAM) with IPv6
[   11.740000] systemd[1]: systemd 250.4-1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK -SECCOMP +GCRYPT +GNUTLS -OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[   11.750000] systemd[1]: Detected architecture m68k.
[   11.790000] systemd[1]: Hostname set to <deb-m68k>.
[   15.300000] systemd[1]: Queued start job for default target Graphical Interface.
[   15.320000] random: systemd: uninitialized urandom read (16 bytes read)
[   15.380000] systemd[1]: Created slice Slice /system/getty.
[   15.390000] random: systemd: uninitialized urandom read (16 bytes read)
[   15.410000] systemd[1]: Created slice Slice /system/modprobe.
[   15.420000] random: systemd: uninitialized urandom read (16 bytes read)
[   15.450000] systemd[1]: Created slice Slice /system/serial-getty.
[   15.480000] systemd[1]: Created slice User and Session Slice.
[   15.490000] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[   15.510000] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   15.540000] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[   15.560000] systemd[1]: Reached target Local Encrypted Volumes.
[   15.570000] systemd[1]: Reached target Local Integrity Protected Volumes.
[   15.590000] systemd[1]: Reached target Path Units.
[   15.610000] systemd[1]: Reached target Remote File Systems.
[   15.620000] systemd[1]: Reached target Slice Units.
[   15.640000] systemd[1]: Reached target Local Verity Protected Volumes.
[   15.660000] systemd[1]: Listening on Syslog Socket.
[   15.680000] systemd[1]: Listening on fsck to fsckd communication Socket.
[   15.690000] systemd[1]: Listening on initctl Compatibility Named Pipe.
[   15.760000] systemd[1]: Journal Audit Socket was skipped because of a failed condition check (ConditionSecurity=audit).
[   15.770000] systemd[1]: Listening on Journal Socket (/dev/log).
[   15.790000] systemd[1]: Listening on Journal Socket.
[   15.810000] systemd[1]: Listening on udev Control Socket.
[   15.830000] systemd[1]: Listening on udev Kernel Socket.
[   15.860000] systemd[1]: Huge Pages File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
[   15.910000] systemd[1]: Mounting POSIX Message Queue File System...
[   16.010000] systemd[1]: Mounting Kernel Debug File System...
[   16.050000] systemd[1]: Kernel Trace File System was skipped because of a failed condition check (ConditionPathExists=/sys/kernel/tracing).
[   16.200000] systemd[1]: Starting Set the console keyboard layout...
[   16.340000] systemd[1]: Starting Create List of Static Device Nodes...
[   16.460000] systemd[1]: Starting Load Kernel Module configfs...
[   16.560000] systemd[1]: Starting Load Kernel Module drm...
[   16.720000] systemd[1]: Starting Load Kernel Module fuse...
[   16.750000] systemd[1]: File System Check on Root Device was skipped because of a failed condition check (ConditionPathExists=!/run/initramfs/fsck-root).
[   16.900000] fuse: init (API version 7.36)
[   16.920000] systemd[1]: Starting Journal Service...
[   17.080000] systemd[1]: Starting Load Kernel Modules...
[   17.190000] systemd[1]: Starting Remount Root and Kernel File Systems...
[   17.290000] systemd[1]: Repartition Root Disk was skipped because all trigger condition checks failed.
[   17.460000] systemd[1]: Starting Coldplug All udev Devices...
[   17.510000] random: crng init done
[   17.510000] random: 7 urandom warning(s) missed due to ratelimiting
[   17.880000] systemd[1]: Mounted POSIX Message Queue File System.
[   17.940000] systemd[1]: Mounted Kernel Debug File System.
[   17.980000] EXT4-fs (sda2): re-mounted. Quota mode: none.
[   18.160000] systemd[1]: Finished Create List of Static Device Nodes.
[   18.360000] systemd[1]: modprobe@configfs.service: Deactivated successfully.
[   18.400000] systemd[1]: Finished Load Kernel Module configfs.
[   18.520000] systemd[1]: modprobe@drm.service: Deactivated successfully.
[   18.560000] systemd[1]: Finished Load Kernel Module drm.
[   18.640000] systemd[1]: modprobe@fuse.service: Deactivated successfully.
[   18.680000] systemd[1]: Finished Load Kernel Module fuse.
[   18.760000] systemd[1]: Finished Load Kernel Modules.
[   18.800000] systemd[1]: Finished Remount Root and Kernel File Systems.
[   18.990000] systemd[1]: Mounting FUSE Control File System...
[   19.190000] systemd[1]: Mounting Kernel Configuration File System...
[   19.190000] systemd[1]: Platform Persistent Storage Archival was skipped because of a failed condition check (ConditionDirectoryNotEmpty=/sys/fs/pstore).
[   19.340000] systemd[1]: Starting Load/Save Random Seed...
[   19.440000] systemd[1]: Starting Apply Kernel Variables...
[   19.620000] systemd[1]: Starting Create System Users...
[   20.060000] systemd[1]: Started Journal Service.
[   20.940000] systemd-journald[176]: Received client request to flush runtime journal.
[   25.730000] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   25.730000] sr 0:0:1:0: Attached scsi generic sg1 type 5
[   25.730000] sr 0:0:2:0: Attached scsi generic sg2 type 5
[   30.870000] Adding 167424k swap on /dev/sda3.  Priority:-2 extents:1 across:167424k FS

Lots of information about the detection of hardware and initialization of devices.

Benchmark

To see how well this compares to real hardware, we need some benchmarks for comparison...

BogoMips

The BogoMips (Wikipedia) pseudo-benchmark has a behavior where the score is related to the processor clock speed, and has an easily available collection of results from a range of systems (see BogoMips mini-Howto).

Linux 4.16.0, Debian Linux unstable (buster/sid) for m68k:

Calibrating delay loop... 597.19 BogoMIPS (lpj=2985984)

Linux 5.17.0, Debian Linux unstable (bookworm/sid) for m68k:

Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)

These lines from the dmesg output for BogoMips, indicate that the result is from calibration using the basic algorithm, rather than using an alternative based on system timers. This shows fluctuation between boots, demonstrating that the value is calculated and likely reflects the performance for the instruction mix used in this busy-wait-loop.

In this case the BogoMips results are approximately inline with the claimed CPU clock: (estimated as: 0.67 * clock MHz = BogoMips)

  • Linux 4.16.0: 0.67 * 895.7 MHz = 600.12 BogoMips vs. 597.19 BogoMIPS
  • Linux 5.17.0: 0.67 * 1193.1 MHz = 799.38 BogoMips vs. 795.44 BogoMIPS

OpenSSL

The OpenSSL cryptographic library provides a tool providing a command-line interface to the library methods and one aspect of this provides a speed test. Since I'm mostly interested in older systems I'm going to use the common RSA and MD5 methods.

After a bit of mucking about to get APT (Advanced Package Tool) working for the installation (including an update to 'sid' for 'bookworm'), and installing OpenSSL we have:

$ openssl version
OpenSSL 1.1.1n  15 Mar 2022

So lets see what the speed test says:

$ openssl speed md5 rsa
Doing md5 for 3s on 16 size blocks: 1169120 md5's in 3.02s
Doing md5 for 3s on 64 size blocks: 37700 md5's in 3.02s
Doing md5 for 3s on 256 size blocks: 24462 md5's in 3.02s
Doing md5 for 3s on 1024 size blocks: 11084 md5's in 3.02s
Doing md5 for 3s on 8192 size blocks: 1766 md5's in 3.02s
Doing md5 for 3s on 16384 size blocks: 900 md5's in 3.02s
Doing 512 bits private rsa's for 10s: 1504 512 bits private RSA's in 9.74s
Doing 512 bits public rsa's for 10s: 16337 512 bits public RSA's in 8.24s
Doing 1024 bits private rsa's for 10s: 286 1024 bits private RSA's in 10.06s
Doing 1024 bits public rsa's for 10s: 5905 1024 bits public RSA's in 9.46s
Doing 2048 bits private rsa's for 10s: 47 2048 bits private RSA's in 11.01s
Doing 2048 bits public rsa's for 10s: 1841 2048 bits public RSA's in 9.76s
Doing 3072 bits private rsa's for 10s: 15 3072 bits private RSA's in 10.09s
Doing 3072 bits public rsa's for 10s: 790 3072 bits public RSA's in 9.98s
Doing 4096 bits private rsa's for 10s: 8 4096 bits private RSA's in 30.61s
Doing 4096 bits public rsa's for 10s: 521 4096 bits public RSA's in 10.28s
Doing 7680 bits private rsa's for 10s: 2 7680 bits private RSA's in 18.34s
Doing 7680 bits public rsa's for 10s: 138 7680 bits public RSA's in 11.27s
Doing 15360 bits private rsa's for 10s: 1 15360 bits private RSA's in 66.88s
Doing 15360 bits public rsa's for 10s: 36 15360 bits public RSA's in 10.50s
OpenSSL 1.1.1n  15 Mar 2022
built on: Tue Mar 15 18:46:18 2022 UTC
options:bn(64,32) rc4(char) des(long) aes(partial) blowfish(ptr) 
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -Wa,--noexecstack -g -O2 -ffile-prefix-map=/build/openssl-K45oLO/openssl-1.1.1n=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DNDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5               6194.01k      798.94k     2073.60k     3758.28k     4790.42k     4882.65k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.006476s 0.000504s    154.4   1982.6
rsa 1024 bits 0.035175s 0.001602s     28.4    624.2
rsa 2048 bits 0.234255s 0.005301s      4.3    188.6
rsa 3072 bits 0.672667s 0.012633s      1.5     79.2
rsa 4096 bits 3.826250s 0.019731s      0.3     50.7
rsa 7680 bits 9.170000s 0.081667s      0.1     12.2
rsa 15360 bits 66.880000s 0.291667s      0.0      3.4

Extracting the relevant figures for comparisons (see OpenSSL Speed Results):

  • OpenSSL speed MD5 8,192 bytes: 4,790.42k
  • OpenSSL speed RSA 4,096 bytes sign/s: 0.3
  • OpenSSL speed RSA 4,096 bytes verify/s: 50.7

Hummm... this build of OpenSSL doesn't use assembler implementations of the methods, so we expect performance to be lower than equivalent x86 systems. Looking at the MD5 results our list, the performance looks to be a bit less than that of a Intel Pentium 75, at a rough estimate it looks to be about the level expected for a Pentium 60. For the RSA results it looks to be in the realm of a Intel Pentium Pro 200. That is quite a range, but these are very different algorithms so differences are expected.

OpenSSL 3.0

Update (2022-May-18) bookworm/sid has pushed out an update to OpenSSL 3, which has a bunch of changes to OpenSSL behaviour... so let's try running it.

Details of the OpenSSL build:

$ openssl version -a
OpenSSL 3.0.3 3 May 2022 (Library: OpenSSL 3.0.3 3 May 2022)
built on: Mon May 16 21:20:27 2022 UTC
platform: debian-m68k
options:  bn(64,32)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -fzero-call-used-regs=used-gpr -DB_ENDIAN -g -O2 -ffile-prefix-map=/build/openssl-AG3TKG/openssl-3.0.3=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2
OPENSSLDIR: "/usr/lib/ssl"
ENGINESDIR: "/usr/lib/m68k-linux-gnu/engines-3"
MODULESDIR: "/usr/lib/m68k-linux-gnu/ossl-modules"
Seeding source: os-specific
CPUINFO: N/A

A base run of the speed test on the QEMU emulated m68k system:

$ openssl speed
...
version: 3.0.3
built on: Mon May 16 21:20:27 2022 UTC
options: bn(64,32)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -fzero-call-used-regs=used-gpr -DB_ENDIAN -g -O2 -ffile-prefix-map=/build/openssl-AG3TKG/openssl-3.0.3=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2
CPUINFO: N/A
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5               2903.86k    11336.87k    33977.76k     3212.11k    89841.25k    91397.51k
sha1              2635.15k     7148.93k     1222.73k     2197.63k     2933.62k     3106.36k
sha256              85.89k     4437.99k    10123.96k    13271.76k      808.28k      808.28k
sha512             341.37k     1494.36k     2103.18k     3018.65k     3530.75k     3603.39k
hmac(md5)         1640.10k      308.69k     1084.85k     2675.29k     4823.56k     5129.62k
des-ede3           152.43k      174.71k      185.56k      185.81k      186.55k      188.63k
aes-128-cbc        429.18k      634.09k      758.17k      789.70k      794.79k      792.07k
aes-192-cbc        401.67k      571.78k      634.49k      692.05k      699.85k      700.63k
aes-256-cbc        369.70k      533.49k      581.51k      599.14k      604.91k      620.52k
camellia-128-cbc      698.23k     1467.43k     2085.67k     2307.78k     2482.18k     2490.37k
camellia-192-cbc      634.25k     1420.31k     2098.26k     2317.44k     2395.00k     2394.58k
camellia-256-cbc      688.12k     1450.35k     2080.15k     2313.36k     2397.92k     2392.50k
ghash              422.45k      784.61k      998.57k     1079.61k     1104.02k     1101.31k
rand               359.42k     1329.43k      284.66k      488.56k      600.75k      611.02k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.006797s 0.010921s    147.1     91.6
rsa 1024 bits 0.036051s 0.001602s     27.7    624.4
rsa 2048 bits 0.218261s 0.005592s      4.6    178.8
rsa 3072 bits 0.708667s 0.013202s      1.4     75.7
rsa 4096 bits 1.423750s 0.019920s      0.7     50.2
rsa 7680 bits 9.545000s 0.084583s      0.1     11.8
                  sign    verify    sign/s verify/s
dsa  512 bits 0.014020s 0.007466s     71.3    133.9
dsa 1024 bits 0.023839s 0.021906s     41.9     45.6
dsa 2048 bits 0.076462s 0.071214s     13.1     14.0
                              sign    verify    sign/s verify/s
 160 bits ecdsa (secp160r1)   0.0352s   0.0298s     28.4     33.6
 192 bits ecdsa (nistp192)   0.0406s   0.0317s     24.6     31.6
 224 bits ecdsa (nistp224)   0.0495s   0.0407s     20.2     24.6
 256 bits ecdsa (nistp256)   0.0536s   0.0434s     18.7     23.0
 384 bits ecdsa (nistp384)   0.1397s   0.0996s      7.2     10.0
 521 bits ecdsa (nistp521)   0.3448s   0.2357s      2.9      4.2
 163 bits ecdsa (nistk163)   0.0184s   0.0337s     54.4     29.7
 233 bits ecdsa (nistk233)   0.0360s   0.0694s     27.8     14.4
 283 bits ecdsa (nistk283)   0.0686s   0.1329s     14.6      7.5
 409 bits ecdsa (nistk409)   0.1886s   0.3615s      5.3      2.8
 571 bits ecdsa (nistk571)   0.4570s   0.8606s      2.2      1.2
 163 bits ecdsa (nistb163)   0.0192s   0.0366s     51.9     27.3
 233 bits ecdsa (nistb233)   0.0389s   0.0744s     25.7     13.4
 283 bits ecdsa (nistb283)   0.0695s   0.1441s     14.4      6.9
 409 bits ecdsa (nistb409)   0.1853s   0.3487s      5.4      2.9
 571 bits ecdsa (nistb571)   0.5119s   1.0671s      2.0      0.9
 256 bits ecdsa (brainpoolP256r1)   0.0677s   0.0621s     14.8     16.1
 256 bits ecdsa (brainpoolP256t1)   0.0674s   0.0559s     14.8     17.9
 384 bits ecdsa (brainpoolP384r1)   0.2020s   0.1692s      5.0      5.9
 384 bits ecdsa (brainpoolP384t1)   0.2065s   0.1552s      4.8      6.4
 512 bits ecdsa (brainpoolP512r1)   0.3700s   0.2971s      2.7      3.4
 512 bits ecdsa (brainpoolP512t1)   0.3696s   0.3719s      2.7      2.7
                              op      op/s
 160 bits ecdh (secp160r1)   0.0354s     28.2
 192 bits ecdh (nistp192)   0.0372s     26.8
 224 bits ecdh (nistp224)   0.0473s     21.1
 256 bits ecdh (nistp256)   0.0507s     19.7
 384 bits ecdh (nistp384)   0.1316s      7.6
 521 bits ecdh (nistp521)   0.3216s      3.1
 163 bits ecdh (nistk163)   0.0160s     62.3
 233 bits ecdh (nistk233)   0.0331s     30.2
 283 bits ecdh (nistk283)   0.0631s     15.8
 409 bits ecdh (nistk409)   0.1523s      6.6
 571 bits ecdh (nistk571)   0.4369s      2.3
 163 bits ecdh (nistb163)   0.0175s     57.0
 233 bits ecdh (nistb233)   0.0366s     27.3
 283 bits ecdh (nistb283)   0.0660s     15.2
 409 bits ecdh (nistb409)   0.2024s      4.9
 571 bits ecdh (nistb571)   0.4629s      2.2
 256 bits ecdh (brainpoolP256r1)   0.0691s     14.5
 256 bits ecdh (brainpoolP256t1)   0.0654s     15.3
 384 bits ecdh (brainpoolP384r1)   0.1969s      5.1
 384 bits ecdh (brainpoolP384t1)   0.2575s      3.9
 512 bits ecdh (brainpoolP512r1)   0.3443s      2.9
 512 bits ecdh (brainpoolP512t1)   0.3417s      2.9
 253 bits ecdh (X25519)   0.0046s    217.1
 448 bits ecdh (X448)   0.0362s     27.6
                              sign    verify    sign/s verify/s
 253 bits EdDSA (Ed25519)   0.0017s   0.0049s    596.2    203.3
 456 bits EdDSA (Ed448)   0.4308s   0.0368s      2.3     27.1
                              sign    verify    sign/s verify/s
 256 bits SM2 (CurveSM2)   0.0684s   0.0538s     14.6     18.6
                       op     op/s
2048 bits ffdh   0.7329s      1.4
3072 bits ffdh   2.6000s      0.4
4096 bits ffdh   5.2400s      0.2

Extracting the relevant figures for comparisons (see OpenSSL Speed Results):

  • OpenSSL speed MD5 8,192 bytes: 89,841.25k
  • OpenSSL speed RSA 4,096 bytes sign/s: 0.7
  • OpenSSL speed RSA 4,096 bytes verify/s: 50.2

That's odd the MD5 result is a lot better... (4.7 MB/s vs. 89.8 MB/s) that seems a bit large to be simply explained by changes in background load and the old number was pretty stable over 16 runs. Checking an OpenSSL 1.1.1n build (~96 MB/s for MD5 in a single run) it looks like the change is related to something else on the platform.

Can we use the Linux kernel crypto methods (AF_ALG)?

$ openssl engine afalg -c
(afalg) AFALG engine support
 [AES-128-CBC, AES-192-CBC, AES-256-CBC]

That looks like a "yes", so let's try a run with the kernel methods enabled (although the engine only provides AES, other methods will fall-back to the OpenSSL implementation):

$ openssl speed -engine afalg
[ 2171.560000] NET: Registered PF_ALG protocol family
Engine "afalg" set.
...
version: 3.0.3
built on: Mon May 16 21:20:27 2022 UTC
options: bn(64,32)
compiler: gcc -fPIC -pthread -Wa,--noexecstack -Wall -fzero-call-used-regs=used-gpr -DB_ENDIAN -g -O2 -ffile-prefix-map=/build/openssl-AG3TKG/openssl-3.0.3=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2
CPUINFO: N/A
The 'numbers' are in 1000s of bytes per second processed.
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
md5               3515.39k    11646.49k    32664.45k     3221.72k    94781.79k    94552.93k
sha1              2707.50k      423.20k     1299.03k    39320.35k     3084.54k     3123.37k
sha256              85.31k      206.35k      497.72k      723.79k      830.09k      854.58k
sha512             363.94k     1479.65k     2267.87k     3241.07k     3731.91k     3718.74k
hmac(md5)         1933.38k      342.86k    23365.42k     2657.54k    89425.46k     5047.60k
des-ede3           152.54k      176.19k      193.74k      196.66k      196.07k      196.18k
aes-128-cbc        201.90k      848.34k     3144.12k    11942.57k    57034.03k   233963.52k
aes-192-cbc        194.88k      971.49k     2994.42k    11822.29k   115796.33k   198246.40k
aes-256-cbc        238.73k      896.07k     3201.41k    14706.08k    73564.16k   144998.40k
camellia-128-cbc      726.50k     1490.39k     2199.90k     2438.27k     2568.82k     2604.08k
camellia-192-cbc      716.46k     1536.28k     2178.63k     2372.15k     2411.49k     2408.77k
camellia-256-cbc      685.88k     1477.70k     2087.42k     2306.37k     2406.06k     2408.77k
ghash              420.56k      782.81k      989.41k     1081.15k     1107.69k     1101.31k
rand               340.81k     1235.13k      280.08k      477.63k      588.63k      604.19k
                  sign    verify    sign/s verify/s
rsa  512 bits 0.006899s 0.000522s    145.0   1916.2
rsa 1024 bits 0.036255s 0.001609s     27.6    621.4
rsa 2048 bits 0.215745s 0.005593s      4.6    178.8
rsa 3072 bits 0.711333s 0.013188s      1.4     75.8
rsa 4096 bits 1.536250s 0.020000s      0.7     50.0
rsa 7680 bits 9.280000s 0.076515s      0.1     13.1
                  sign    verify    sign/s verify/s
dsa  512 bits 0.009346s 0.006757s    107.0    148.0
dsa 1024 bits 0.022854s 0.020208s     43.8     49.5
dsa 2048 bits 0.071714s 0.066577s     13.9     15.0
                              sign    verify    sign/s verify/s
 160 bits ecdsa (secp160r1)   0.0334s   0.0282s     30.0     35.5
 192 bits ecdsa (nistp192)   0.0374s   0.0290s     26.8     34.5
 224 bits ecdsa (nistp224)   0.0468s   0.0364s     21.4     27.4
 256 bits ecdsa (nistp256)   0.0515s   0.0413s     19.4     24.2
 384 bits ecdsa (nistp384)   0.1309s   0.0944s      7.6     10.6
 521 bits ecdsa (nistp521)   0.3326s   0.2270s      3.0      4.4
 163 bits ecdsa (nistk163)   0.0175s   0.0333s     57.2     30.0
 233 bits ecdsa (nistk233)   0.0342s   0.0652s     29.2     15.3
 283 bits ecdsa (nistk283)   0.0653s   0.1176s     15.3      8.5
 409 bits ecdsa (nistk409)   0.1462s   0.3544s      6.8      2.8
 571 bits ecdsa (nistk571)   0.4268s   0.7738s      2.3      1.3
 163 bits ecdsa (nistb163)   0.0192s   0.0359s     52.2     27.8
 233 bits ecdsa (nistb233)   0.0404s   0.0770s     24.7     13.0
 283 bits ecdsa (nistb283)   0.0748s   0.1305s     13.4      7.7
 409 bits ecdsa (nistb409)   0.1835s   0.3627s      5.4      2.8
 571 bits ecdsa (nistb571)   0.5886s   1.1243s      1.7      0.9
 256 bits ecdsa (brainpoolP256r1)   0.0630s   0.0605s     15.9     16.5
 256 bits ecdsa (brainpoolP256t1)   0.0629s   0.0545s     15.9     18.4
 384 bits ecdsa (brainpoolP384r1)   0.1940s   0.1605s      5.2      6.2
 384 bits ecdsa (brainpoolP384t1)   0.1915s   0.1445s      5.2      6.9
 512 bits ecdsa (brainpoolP512r1)   0.3476s   0.2858s      2.9      3.5
 512 bits ecdsa (brainpoolP512t1)   0.3367s   0.2449s      3.0      4.1
                              op      op/s
 160 bits ecdh (secp160r1)   0.0315s     31.7
 192 bits ecdh (nistp192)   0.0343s     29.1
 224 bits ecdh (nistp224)   0.0450s     22.2
 256 bits ecdh (nistp256)   0.0483s     20.7
 384 bits ecdh (nistp384)   0.1232s      8.1
 521 bits ecdh (nistp521)   0.3073s      3.3
 163 bits ecdh (nistk163)   0.0150s     66.5
 233 bits ecdh (nistk233)   0.0307s     32.6
 283 bits ecdh (nistk283)   0.0584s     17.1
 409 bits ecdh (nistk409)   0.1501s      6.7
 571 bits ecdh (nistk571)   0.4586s      2.2
 163 bits ecdh (nistb163)   0.0163s     61.4
 233 bits ecdh (nistb233)   0.0366s     27.3
 283 bits ecdh (nistb283)   0.0614s     16.3
 409 bits ecdh (nistb409)   0.1797s      5.6
 571 bits ecdh (nistb571)   0.4537s      2.2
 256 bits ecdh (brainpoolP256r1)   0.0601s     16.6
 256 bits ecdh (brainpoolP256t1)   0.0664s     15.1
 384 bits ecdh (brainpoolP384r1)   0.1971s      5.1
 384 bits ecdh (brainpoolP384t1)   0.1856s      5.4
 512 bits ecdh (brainpoolP512r1)   0.3197s      3.1
 512 bits ecdh (brainpoolP512t1)   0.3169s      3.2
 253 bits ecdh (X25519)   0.0041s    243.9
 448 bits ecdh (X448)   0.0314s     31.8
                              sign    verify    sign/s verify/s
 253 bits EdDSA (Ed25519)   0.0016s   0.0047s    628.6    212.5
 456 bits EdDSA (Ed448)   0.0153s   0.0375s     65.2     26.7
                              sign    verify    sign/s verify/s
 256 bits SM2 (CurveSM2)   0.0648s   0.0514s     15.4     19.5
                       op     op/s
2048 bits ffdh   0.6675s      1.5
3072 bits ffdh   2.3320s      0.4
4096 bits ffdh   4.7233s      0.2

Wow... those AES methods show a huge change, from ~800 KB/s to ~73 MB/s for AES-256-CBC in these OpenSSL 3.0.3 runs.

Further Sources

More information can be found at:


No comments: