NetBSD/mac68k Operating System Information

Colin Wood, Alice Group

All brand and product names used in this guide are or may be trademarks or registered trademarks of their respective owners.

NetBSD® is a registered trademark of The NetBSD Foundation, Inc.

Published: 2007/06/09 13:32:37

$NetBSD: netbsd-mac68k.html,v 1.61 2023/11/10 19:49:39 martin Exp $


Table of Contents

Preface
1. Introduction
1.1. About NetBSD/mac68k
2. NetBSD/mac68k Features
2.1. Working Systems
2.2. Working hardware
2.2.1. Video Cards
2.2.2. ADB Devices
2.2.3. Network Cards
2.2.4. Accelerator Cards
2.3. Future Enhancements & Wish List
2.3.1. Claimed Projects
2.3.2. Unclaimed Projects/Wish List
2.3.3. How YOU Can Contribute to the Project
3. Known Bugs and Patches
3.1. ADB
3.2. Ethernet
3.3. Serial
3.4. PRAM
3.5. Kernel
3.6. Mac Utilities
3.6.1. Booter
3.6.2. Installer
3.6.3. Mkfs -> Newfs
4. Known Problems and Solutions
4.1. Introduction
4.2. SCSI difficulties
4.3. Installer dies during install with the error: Error on SCSIRead(), #5
4.4. Boot hangs while recognizing ethernet or video card
4.5. Problems with Mkfs 1.4 recognizing the last partition on the drive
5. NetBSD/mac68k Software
5.1. dt (desktop)
5.2. hfs
5.3. procps
6. Tips for Porting Software
6.1. Building
7. Other Mac OSes & Compatibility
7.1. MachTen
7.2. MacLinux
7.3. MacMiNT
7.4. MacMach
7.5. A/UX
7.6. 9.6 Mac OS
8. Other NetBSD OSes & Compatibility
8.1. NetBSD Ports

Preface

This book is about the NetBSD/mac68k operating system

Note: The information contained here is probably out of date.

Chapter 1. Introduction

Table of Contents

1.1. About NetBSD/mac68k

1.1. About NetBSD/mac68k

NetBSD/mac68k is the port of NetBSD which runs on several models of Apple Macintosh computers. NetBSD is a "UNIX-like" operating system which is based mainly on BSD 4.4 Lite from the University of California, Berkeley. NetBSD is a fairly POSIX.1 compliant operating system.

Chapter 2. NetBSD/mac68k Features

2.1. Working Systems

Please see the machine-status document in HTML format:

www.macbsd.com machine-status

2.2. Working hardware

The hardware listed here has been reported to me or one of the mailing lists as working/non-working. There are no guarantees that the information is 100% correct. If we are ever able to get our hands on some of these pieces of hardware for testing we should be able to give more definite answers.

2.2.1. Video Cards

2.2.1.1. Working Video Cards

Note: QuickDraw-compatible cards should work () However, accelerated cards and many 24-bit cards will not.

  • Apple Toby Frame Buffer Card

  • Apple Mac II High-Resolution Video Display Card

  • Apple 8.24

  • Apple Portrait Display Card

  • Lapis Technologies 1-bit @ 1024x768 Steven R. Weiss (srw@cyberspace.or)

  • RasterOps 264 SE/30 Monroe Williams (monroe@cs.pdx.edu)

  • RasterOps 24S John Valdes (valdes@macavity.uchicago.edu)

  • Micron Color 30 Joe Bacso (jbacso@cadence.com)

  • Futura II LX Michel Chalufour (michelc@tiac.net)

  • SuperMac GFX Kai-Yew Lum (kaiyewl@engin.umich.edu)

2.2.1.2. Non-Working Video Cards

  • Apple Macintosh Display Card 8-24 GC Kevin Coffee (kpc@enteract.com)

  • SuperMac 8/24 Chas Williams (chas@ohm.nrl.navy.mil)

  • Magic 8-bit video card Kevin Wilson (kevin@spef8.spef.syr.ge.com)

  • Radius 24XP Michael Petrotta (mgp@uclink.berkeley.edu), IIsi

  • MicroXeed 24-bit video card Bow-Yaw Wang (bywang@sm.iis.sinica.edu.tw)

  • Formac video card Brad Salai (bsalai@servtech.com)

  • Lapis Procolorserver 8.16 Kevin Radke (radke@cpre1.ee.iastate.edu)

  • RasterOps 24Sx Mack Nagashima (mackn@CSUA.Berkeley.EDU)

  • Radius Spigot Pro AV Nigel Pearson (nigel@ind.tansu.com.au)

  • SuperMac Spectrum/8 Series III Paul (wb2oyc@bellatlantic.net)

  • SuperMac VideoSpigot

2.2.2. ADB Devices

2.2.2.1. Working ADB Devices

  • Apple Standard Mouse

  • Apple Standard Keyboard

  • Apple Extended Keyboard

  • Apple Adjustable Keyboard Olivier Boudry (schultz@bluewin.ch)

  • Animas 3-button Mouse

  • Kensington Turbo Mouse

  • Gravis 3-button Mouse

  • Logitech TrackMan Ken Nakata (kenn@eden.rutgers.edu)

  • Logitech MouseMan (M/N: M-AH32) Dan McMahill (mcmahill@sandia.mit.edu)

  • Logitech Marble (3 button trackball/optical) Derrick Hutchinson (derrick.hutchinson@reuters.com)

  • Logitech Cordless MouseMan Mark Routbort (routbort@neuro.duke.edu)

  • Mouse Systems A3 (3 button/optical) Colin Wood (ender@macbsd.com)

  • MicroSpeed 3-button Mouse Brad Salai (bsalai@servtech.com)

  • Alps Glidepoint touchpad Nathan Raymond (xray@cs.brandeis.ed)

2.2.2.2. Non-working ADB devices

NOTE: most of these mice have 1 functioning button, but the second and third might not work.

  • Logitech MouseMan (M/N: AC-13-4MD) John Wittkowski (jpw@netscape.com)

  • Logitech TrackMan (M/N: T-AA1-4MD) John Wittkowski (jpw@netscape.com)

  • Logitech TrackMan Marble (M/N: T-AH11) xiamin (ingerrn@cris.com)

  • EMAC Silhouette trackball Monroe Williams (monroe@cs.pdx.edu) & John E. Clark (clark@synergy.encinitas.ca.us)

2.2.3. Network Cards

2.2.3.1. Working Network Cards

Take a look at: macbsd.com

Note: most Ethernet cards based on the 8390 chip should work for most machines. Many SONIC-based cards are now working as well, as is onboard SONIC-based Ethernet for the Quadra-series Macs. MACE-based onboard Ethernet for AV Macs should be supported in NetBSD 1.3 and later.

2.2.3.2. Non-working Network Cards

Take a look at: macbsd.com

Note: it appears that some SONIC cards are still not working, but support for these cards is in the works.

2.2.4. Accelerator Cards

2.2.4.1. Working Accelerator Cards

  • Daystar 33MHz 030 w/cache turned off in the control panel

  • Daystar 40MHz 030 on a IIcx (jahenso@netcom.com)

  • Daystar 50MHz 030 PowerCache w/ cache turned on in the control panel

  • DiiMO 50mHz 030 accelerator on an SE/30 (monroe@mbw.placo.com)

  • DayStar 80 MHz 040 PowerCache (tchen@ibl.org)

  • Dove MaraThon 030 w/ cache on MacII (gunnar@bitcon.no)

  • Sonnet Quaddouble 50Mhz 040 FPU Accelerator on a Q700 (David.Sterling@Colorado.edu)

Note:work is currently being done by Kevin Radke (radke@cpre1.ee.iastate.edu) to get the cache on Daystar accelerators working under NetBSD. He has test kernels available at ftp://cpre1.ee.iastate.edu/pub/netbsd/ .

Note: if NetBSD does not boot on your machine with its Daystar accelerator, try turning off the cache in the control panel.

2.2.4.2. Non-working Accelerator Cards

  • Carerra '040 on a IIci (ijonglin@ee.princeton.edu)

Note: Current kernels should boot just about any of the Daystar '030 (and probably '040) accelerators. However, two users have had trouble getting an '030 accelerator to work on their Mac II's (which has an '020 by default). Likewise, '030-users have had trouble getting '040 accelerator working with their machines.

2.3. Future Enhancements & Wish List

To get the most up-to-date TODO list, take a look at: http://www.NetBSD.org/ports/mac68k/todo.html

2.3.1. Claimed Projects

  • installation docs (briggs@puma.macbsd.com)

  • update kernel compilation docs (briggs@puma.macbsd.com)

  • configuration (briggs@puma.macbsd.com)

  • FPU emulation (for Macs w/o FPUs) (kenn@eden.rutgers.edu)

  • ADB support (jpw@netscape.com)

  • dt fixes, if any (vuori@sci.fi)

  • hfs fixes, if any (kesteloo@cs.unc.edu)

  • SCSI disconnect/reconnect support (briggs@puma.macbsd.com)

  • interrupt handling for Quadras (briggs@puma.macbsd.com)

  • performance -- examine pmap, swtch, interrupt latency (claimed?)

  • low-level docs before Alice forgets (everyone)

  • man4/man8 pages written & added (ender@macbsd.com)

  • Portable cross-development system (MachTen?, MacMiNT?, Other Unix?).

  • New console/adb/grf/virtual terminal. (Final bug fixes...)

Note: the above is a little (ok, a lot) out of date. -Colin

2.3.2. Unclaimed Projects/Wish List

  • IDE support

  • read-only HFS support for Mac OS volumes (More or less done)

  • portable cross-development from other unix's (This too.)

  • binary compatibility with MachTen (?)

  • floppy driver (partial support for DD floppy drives available)

  • AppleTalk/LocalTalk (netatalk port to NetBSD in progress)

  • tape driver(s) (e.g. teac & DAT; probably working)

  • CD-ROM support (has anyone tried mounting A/UX cd-rom?) (This works.)

  • MO support (probably works)

  • 24-bit NuBus video cards (may be working in 1-bit mode w/ 1.0 release)

  • NuBus multi-port serial cards

  • other languages (lisp, prolog, pascal, better assembler/debugger)

  • MIDI driver

  • PAS16 NuBus card (Pro Audio Spectrum 16 sound card)

  • Mac OS emulation

2.3.3. How YOU Can Contribute to the Project

To see the current status of different projects, including unclaimed projects, check out the TODO page: http://www.NetBSD.org/ports/mac68k/todo.html

This page is our "whiteboard" for the mac68k port's status. At this point, there is no telling which will be updated first as new projects are claimed: the TODO page or this documents Claimed/Unclaimed Projects sections. More than likely the TODO page will change first.

If you see a project you would like to work on or assist with, send e-mail describing your interests to port-mac68k@NetBSD.org. You do not have to "register" your effort or anything formal like that, but we do like to keep track of who is doing what. Plus, if we come across any information that is useful to the work you are doing we will pass it along.

We do accept equipment loans, equipment donations, and monetary donations. If you would like to loan or donate equipment, please send e-mail to port-mac68k@NetBSD.org describing what equipment you are willing to part with. We will need to determine which member of the NetBSD/mac68k team can best put the equipment to use. From there we will give you a shipping address. If you donate the hardware, we will make an honest effort to add support for your hardware if that is what you desire. If you don't care what we do with the hardware, we'll put it to the best use possible without necessarily interrupting current project priorities.

This is a list of equipment we would really like to borrow for testing:

  • Machines: Anything other than a Mac II, especially a Quadra, Centris, Powerbook, or Duo. We could use IIx, IIcx, IIci, IIsi, IIvi, IIvx, and SE/30 machines as well (although these machines are pretty well-supported now).

  • Priority for the machines we would like to borrow is currently: Quadras (AV&other), Centrises, PowerBooks, Duos, Performas

  • Other hardware: Any video card plus the monitor if the card is particular to that monitor. ADB devices: trackballs, 3-button mice, Non-Apple mice, etc...

If you are willing to lend us a machine, please make sure it has 8MB RAM and at least 60MB of hard drive space that can be allocated to a BSD partition. 5MB of RAM will do if necessary, but currently it *must have an FPU* to be useful to us.

Chapter 3. Known Bugs and Patches

3.1. ADB

  • Many 3-button mice are still unsupported in the kernel

3.2. Ethernet

  • Not all 8390 and SONIC-based cards are supported yet

3.3. Serial

  • Occasional fifo/ring buffer overruns still possible

3.4. PRAM

  • Won't write correct time, but given how NetBSD/mac68k loses time, we probably don't want it to.

3.5. Kernel

  • Should emulate FPU - FPE is almost done, most machines without an FPU will now boot (all -current kernels include FPE and the FPU-less math library will avoid the few non-emulated functions on '030-based machines)

  • FPE problems with 'LC040-based machines, causes numerous seg-faults

  • Loses time while actually doing anything. (this has been improved)

  • vmstat statistics/kernel memory use seems high. (?)

3.6. Mac Utilities

3.6.1. Booter

  • Massive cleanup

  • Native booting (i.e. no Mac OS) ?

  • Booter versions later than 1.9.4 and earlier than 1.10.3 seem to not work on the IIvx, should be fixed in 1.10.3 and later

3.6.2. Installer

  • Update to new filesystems

  • fstat: file not found error (ignore it if you see it; it's harmless)

  • 1.1 versions of the Installer may crash on FPU-less Macs, use 1.1d or later

  • Installs use local timezone instead of GMT for updates. Fixed in 1.1e or later.

  • Build Devices only creates 4 ptys by default. Fixed in 1.1e or later.

  • Paging in the MiniShell is disabled. Fixed in 1.1f or later.

  • Extra ptys created incorrectly, fixed in 1.1f or later

3.6.3. Mkfs -> Newfs

  • Ignore SCSIError#5 messages

  • Rename to Newfs (need to add in level 2 ffs support first)

  • Merge in with Installer

Chapter 4. Known Problems and Solutions

4.1. Introduction

This section is not for bugs. It is for things such as system limitations that might have work-arounds.

4.2. SCSI difficulties

Many users have reported filesystem corruption under NetBSD. Symptoms include mysterious hangs and the transformation of numerous files from executable binaries into device files. The problem seems to plague Quantum drives more often than other models. This problem only happens on '030-based Macs using the ncrscsi driver.

Although this problem is technically a bug in the ncrscsi driver, it does have a workaround. The solution is to change to a kernel using the sbc SCSI driver instead. One of these kernels is available from: ftp://ftp.NetBSD.org/pub/NetBSD/arch/mac68k/new/

4.3. Installer dies during install with the error: Error on SCSIRead(), #5

The most recent version of the Installer (1.1g as of this writing) still has difficulties with partitions on large drives (i.e. greater than 1GB in size). The problems seem to occur most often on Quantum Fireball drives (I don't believe that it is limited to them), but the key factors seem to revolve around having partitions (often large partitions) located on the upper portion of the disk (i.e. beyond the first 1GB of the disk) and writing large distribution sets to these partitions (smaller sets often complete, but the base distribution set will often die). A similar bug in the Installer was fixed a while ago, but this one appears to be slightly different.

There are a few workarounds. The first thing to try is to increase the amount of memory allocated to the Installer to as much as you can give it. The next thing to try is to move your NetBSD partitions to the start of the drive (or as close to it as possible). If this doesn't work, you'll need to install as many distribution sets as you can using the Installer, then use the Installer's Mini-Shell to copy in the distribution sets to your NetBSD partition, and finally finish installing the sets from within NetBSD.

4.4. Boot hangs while recognizing ethernet or video card

This problem is usually a result of a conflict between ethernet and video cards. One possible solution is to simply reorder the cards in their slots. If this does not work, try removing whichever card you cannot live without and see if the boot sequence stops hanging.

If you're boot sequence is hanging merely because of a video card, chances are the kernel is not yet properly clearing the interrupts for your card. There is a HOWTO for locating the information necessary for doing this:

http://www.macbsd.com/macbsd/howto/video.html

With the proper information, changes can be made to the kernel to allow your machine to boot without having to remove the card.

4.5. Problems with Mkfs 1.4 recognizing the last partition on the drive

The symptoms of this problem are that you have created a partition of whatever type that you want to convert into a NetBSD partition, but Mkfs 1.4 refuses to recognize the partition.

This problem is caused by an off-by-one error in the Partition Map which is created by several hard drive formatters (including the latest HD SC setup from Apple). Basically, the number of Partition Map entries is one greater than the reported size of the Map. Mkfs 1.4 ignores this last entry (and rightly so, since it might be the Driver Partition in a correctly formatted drive).

The solution is to upgrade to Mkfs 1.45 or later where this bug is fixed. If you cannot locate Mkfs 1.45 or later, you have two choices. You can either use a formatter which correctly writes the Partition Map or else you can place a small partition at the end of the disk. If you are going to keep a Mac OS partition around, this is an excellent place to put one. On the other hand, if you'd rather conserve space, a 1 kB Scratch partition at the end of the disk should also work.

Chapter 5. NetBSD/mac68k Software

5.1. dt (desktop)

5.2. hfs

5.3. procps

Chapter 6. Tips for Porting Software

Table of Contents

6.1. Building

6.1. Building

Try building for m68k--netbsd, netbsd, mac68k, m68k, bsd44, or a combination.

Also, often software will come with a configure script that will determine machine dependencies for you. GNU software is pretty good at providing a configure script for their software.

Chapter 7. Other Mac OSes & Compatibility

7.1. MachTen

[coming]

7.2. MacLinux

Recently, Apple has endorsed a port of Linux to the PowerPC Macs. Check it out at:

http://www.mklinux.org/

In addition, there is an ongoing MacLinux/68k effort. For more information, see:

http://www.mac.linux-m68k.org/

7.3. MacMiNT

There is no current compatibility with MacMiNT.

More information on MacMiNT is available at Hoshi's MacMiNT Page.

7.4. MacMach

Unfortunately, MacMach died out years ago. However, the PowerMac Linux project is built on a version of the Mach microkernel. Check out Apple's Apple and the Open Software Foundation Announce Linux for Power Machintosh press release from February 1996.

7.5. A/UX

You can mount A/UX filesystems read-only. There may be binary compatibility with A/UX binaries in the future (don't hold your breath, though).

7.6. 9.6 Mac OS

You can use Lawrence Kesteloot's hfs tool to access Mac OS filesystems as read-only. Use this tool to browse the filesystem and copy files to a NetBSD/mac68k partition. Someday we hope to run Mac OS as a process on top of NetBSD/mac68k.

In addition to hfs there are the hfsutils collection of utilities for accessing the Mac HFS from within MacBSD.

Chapter 8. Other NetBSD OSes & Compatibility

Table of Contents

8.1. NetBSD Ports

8.1. NetBSD Ports

NetBSD/mac68k is binary compatible with all the NetBSD/m68k OSes. This includes the hp300, amiga, sun3, and atari. What this means is that the rather substantial NetBSD-Amiga archives are available for NetBSD/mac68k use as well.

However, this does not apply to binaries that depend on the local hardware's implementation.