William Frederick Jolitz and Lynne Greer JolitzIn previous installments of this project, we've tantalized you with the preliminaries to our porting project. We've discussed our initial plan of the port, a bootstrap of the system off MS-DOS, the standalone utilities that help us test out the basic protected mode mechanisms of the 386, and cross-tools for generating the BSD utility programs that will run off our BSD operating systems kernel. In our analogy of climbing K2, most of our equipment has checked out in use, and the route along the ridge to the peak looks clear with possible good weather. In fact, at the end of this installment, we will finally complete the preliminaries, and leave our base camp to start the major ascent. We now examine the initial root file-system required for our 386BSD operating system kernel. Earlier in this series, we discussed the cross-tools used to create 386BSD utilities, but we did not mention how we got these utilities onto our target machine. We could load them as files onto MS-DOS -- unfortunately, 386BSD has no ability (initially) to decipher the organization of files on the disk. (Some programmers who have spent time with the FAT, clusters, and their ilk might consider this to be more of a blessing than a curse.) Again, keep in mind that the primary operating system focus in this port is UNIX and not MS-DOS, and that we are working on a research project, not a commercial release. We now embark on making a usable filesystem in order to hold the programs and files used by our newly ported system. The filesystem is a special data structure and functions that describe the storage of files on some means of bulk storage. It literally is a subsystem for reading, writing, creating, and destroying programs and data files on a media. Some programs and data files will need to be used by our operating system kernel immediately when it begins to run; the rest will be made accessible as the system is configured for use by the configuration programs, which will be run only after the system is completely underway. The first group of files will contain the programs that allow us to add (or mount) new filesystems, creating hierarchical or "tree-based" filesystems. Because trees grow from their roots, this filesystem will be known as the "root," or bottom-most of the filesystems. The kernel is the "heart" of UNIX, running programs inside of processes that it creates for that purpose, and satisfying program requests (system calls) as needed. Later, when we describe the formulation of the kernel operating systems program (hereafter called the "kernel") and its initialization, we will use this initial root filesystem. Thus, in starting our major ascent, we will begin the actual job of porting the kernel program. Porting Unix to the 386: The Initial Root Filesystem
|
|