/joh'liks/ n.,adj. 386BSD

Porting Unix to the 386: A Practical Approach



William & Lynne Jolitz


Started open source UNIX.

Appeared in part as a 17 article magazine series in 1991-1992.

Documented the "how, what, why, who, when" of porting BSD to the 386.

Done while BSD was becoming "open source".





Porting Unix to the 386: A Practical Approach - THREE INITIAL PC UTILITIES

THREE INITIAL PC UTILITIES:

Porting Unix to the 386: Three Initial PC Utilities

The second article in the "PORTING UNIX TO THE 386" series discussed the utilities we had to build to test the port on an actual 80386 PC.
By far, the most popular article.

GATE A20

Dealing with PC reverse compatibility requires defeating logic like Gate A20, which forces address rollover to a single megabyte for ancient 8086/8088 compatibility.

Consistency Checks

Its not enough just to load the kernel and go, you need to insure its the kernel bit-for-bit by the time you run it.

The First PC Utility: boot.exe

Requirements for a DOS PC Utility to boot a 386BSD UNIX kernel.

The GCC Executable Format

Our kernel is a UNIX executable file, just like all of its applications. So what does the a.out file, compiled and loaded usiing GCC and utilities look like?

The Purpose of Our PC Utilities

Why we wrote PC utilities to port UNIX with - the advantage of working from a primitive OS that runs on the absolute machine.

Unix Kernel Load Program

DOS C program for loading 386BSD kernel from DOS, and executing it, taking over the machine.

Entering Protected Mode

After loading the kernel program, we enter protected mode to start up the 386BSD kernel, itself a protected mode program like its own applications.

The Second PC Utility: cpfs.exe

First thing the kernel does is open its root filesystem - so we need a way to write a filesystem onto the hard disk, adjacent to the DOS filesystem, which is what this utility does.

The Third PC Utility: cpsw.exe

Once the system is debugged and tested, the next step was to load on more code to expand with. So we moved "tar balls" to the swap space with this utility to provide a primative file upload capability.

Where We Go From Here

Ironically, these utilities advanced progress fast enough that once the kernel was operational, the biggest obstacle became booting off of DOS. So the next step was to implement a bootstrap and standalone system so that we could rid ourself of DOS entirely.

The 386BSD Project and Berkeley UNIX

Synopsis of what 386BSD was intended to be in the 1989-1990 timeframe.

What should have happened was that Berkeley should have released a basic 386 system binary and source release, and followed it up with a general release.

What's in the Tool Chest?

The tool chest for 386BSD cross support included compiler, assembler, loader, libraries and include files. It did not include an emulation environment.

Porting Unix to the 386: Research and the Commercial Sector

Understanding the boundary between research and development with BSD, and where a balance between commercial efforts can be struck.





Copyright 2006 TeleMuse Partners, William Jolitz and Lynne Jolitz