在原装 4 MB Macintosh Plus 上运行的 Linux 7.3
Linux 7.3 on a stock 4 MB Macintosh Plus

原始链接: https://github.com/ActionRetro/nugget-linux

这个项目在一台原装 Macintosh Plus 上启动主线 Linux 移植版:7.83 MHz 68000、无 MMU、4 MB 内存和 800K 软盘。它提供 BusyBox shell、通过 Asante SCSI 以太网或串行 SLIP 实现的可选网络功能,以及受紧凑型 Mac、Lisa 和 NeXT 启发的桌面环境。提供两套磁盘:一张仅含 shell 的启动软盘,以及一套包含桌面环境和带网络功能内核的双软盘。镜像可以写入真实软盘或 Floppy Emu;NuggetInstall 可对其进行复制,运行 “desktop” 可启动 GUI。基于 Nano-X 构建的 NADS 桌面包含支持 HFS 的文件管理器、菜单栏、RAM 磁盘、终端、编辑器、计算器、监视器、游戏、安装/网络/设置工具、Chicago 字体和光标。设置会持久保存在 Mac 软盘上。该发布版还包含 FrogSurf。构建过程使用 Docker、定制的 m68k uClinux 工具链、打过补丁的 Linux/Microwindows/hfsutils、BusyBox 和 Python machfs 来生成磁盘;并提供 MAME 构建目标。仓库中整理有内核补丁、启动代码、用户态工具、桌面源码、HFS 支持、构建脚本、模拟器测试和硬件说明。它基于 Colin Maykish 的 Mackerel-08;项目代码采用 GPL-2.0,并保留第三方许可证。使用 Claude 开发。

Hacker News 最新 | 往期 | 评论 | 提问 | 展示 | 招聘 | 投稿 登录 原装 4 MB Macintosh Plus 上的 Linux 7.3 (github.com/actionretro) 4 分,由 hochmartinez 于 26 分钟前发布 | 往期 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Nugget Linux on a Mac Plus (video)

Mainline Linux on a stock Macintosh Plus: a 68000 at 7.83 MHz with no MMU, 4 MB of RAM, booting from 800K floppies. It has a shell, networking and a small desktop with a mashup of Mac, Lisa and NeXT styling.

Nugget Linux

  • A Macintosh Plus with 4 MB of RAM. The boot disk checks for this and stops with a message if there's less.
  • An 800K floppy drive. A second (external) drive makes installing easier; a Floppy Emu works as either drive.
  • For networking (optional), either:
    • an Asante EN/SC SCSI Ethernet adapter, or
    • SLIP over a serial cable on the printer port.

There are two ways to run it:

Disks What you get
linux-plus.dsk One 800K floppy: boot the Mac into a BusyBox shell from a single disk. No networking.
linux-plus-set.dsk + linux-plus-set-2.dsk Two 800K floppies: full desktop with networking. Boot disk 1; it asks for disk 2.

The networking kernel is too big for one floppy, which is why the desktop needs two disks.

Write the images to 800K floppies, or load them in a Floppy Emu, and boot the Plus from disk 1. Once it's running, nuggetinstall at the shell, or the NuggetInstall app on the desktop, copies the disks onto blank floppies.

At the shell, type desktop to start the desktop (on the two-disk set). For Ethernet, eth-up 192.168.1.250 (your own address) or the Network control panel on the desktop.

The Nugget Advanced Desktop System (NADS) is a custom ultra-light desktop environment built on Nano-X (Microwindows) with a window manager and file manager written for the Plus. It has:

  • a Finder-like file manager that reads and writes Mac (HFS) floppies, a menu bar, and a RAM disk
  • Terminal, NugEdit (a text editor), Calculator, Eyes, NugMon (a system monitor), Doubles, Floppy Saver, NuggetInstall, and the Network, Settings and Wallpaper control panels
  • the Plus ROM's own Chicago font and cursors

Settings saved from the desktop go in a NugPrefs folder on a Mac floppy and come back when that disk is inserted.

The released two-disk set also includes FrogSurf, a web browser that uses FrogFind. FrogSurf's source isn't in this repository; a build from this source has Landmine in its place.

See desktop/README.md for how the desktop works.

The build runs in Docker. On macOS the Linux kernel tree needs a case-sensitive volume.

  1. Build the image and the toolchain (crosstool-ng, m68k uClinux with uClibc-ng and elf2flt):
    docker build -t macplus-build docker
    docker run --rm -v macplus-xtools:/home/build/x-tools -v macplus-work:/home/build/work \
      -v $PWD/docker:/scripts macplus-build /scripts/build-toolchain.sh
  2. Get the third-party sources into the places the build expects, and apply our patches:
    • src/linux: crmaykish/mackerel-linux at commit 4fa7985a3 (Linux 7.3.5), plus patches/linux-7.3.5-macplus.patch
    • desktop/microwindows: ghaerr/microwindows at 3b20527, plus desktop/microwindows.patch
    • hfs/hfsutils-3.2.6: hfsutils 3.2.6 (see hfs/README.md), plus hfs/hfsutils.patch
    • BusyBox is downloaded by the build.
  3. A Python with machfs, for writing HFS: python3 -m venv .venv && .venv/bin/pip install machfs
  4. Build:
    ./make-floppy.sh plus        # floppy/linux-plus.dsk
    ./make-floppy.sh plus set    # floppy/linux-plus-set.dsk and -set-2.dsk
    ./make-floppy.sh mame [set] builds the same disks for the MAME emulator, whose serial clock differs. The mame/ directory has the test scripts.
Directory What's in it
patches/ The kernel changes: the Mac Plus platform, the floppy (IWM), serial, SCSI Ethernet, keyboard, mouse and framebuffer drivers
floppy/ The boot blocks, the second-stage loader, and the disk image writer
userland/ The BusyBox configuration and patches, and our own commands (nuggetinstall, eth-up, fetch ...)
desktop/ The desktop: our apps and our changes to Microwindows
hfs/ Mac disk support (libhfs) and Floppy Saver
docker/ The build image and toolchain
mame/ Emulator tests and profiling scripts
asante/ Notes from working out the Asante EN/SC's protocol
slip/ A SLIP gateway for testing networking
  • The 68000 port this started from is Colin Maykish's Mackerel-08.
  • Linux, BusyBox, uClibc-ng, Microwindows (Nano-X) and hfsutils are the work of their authors, under their own licenses.

Developed using Claude.

Our own code is under the GNU General Public License, version 2: see LICENSE. The kernel and BusyBox changes are GPL-2.0 as those projects are. Third-party code keeps its own license.

联系我们 contact @ memedata.com