Phase V - Recursive Osdev
Posted: Tue Mar 31, 2015 6:00 pm
This hobbyist operating system makes more.
When your operating system is self-hosting, has all the ports one could wish for, and actually resemble some degree of quality, then it is time to face the fact that your life has become too easy.
It's time to do it all over again. Recursively.
It's time to enter Phase V.
Bare Bones (II)
The Bare Bones tutorial is isomorphically also a secret meta-tutorial. It documents not only how to complete itself, but it also documents how to complete itself under the operating system you made from it. You've not actually completed Bare Bones until you completed it under your own operating system.
That includes following all the instructions, and building a cross-compiler, naturally.
Example
To better illustrate my point, I've made a special disk image of my operating system. It contains a number of relevant elements:
Usage
The command line environment is a traditional Unix environment and has the usual commands.
Read also /share/doc/user-guide for basic system usage.
The editor is called 'editor' and you exit it with Control-Q. You save with Control-S and load with Control-O.
Disk Image
This is a raw harddisk image containing a 64-bit (x86_64) operating system. It contains a lot of stuff. It's self-hosting. It has python, git, quake, trianglix, nasm, i686-elf cross-compiler, GRUB, parted, e2fsprogs, its own source code, the osdev wiki, and so on. See /tix/installed.list for a list of all ports it contains. You can adapt it to your favorite virtual machine and use it to develop your own recursive hobbyist system on a hobbyist system. It's compressed with xz for good measure.
https://users-cs.au.dk/~sortie/sortix/phase-v/phase-v_x86_64.hdd.xz
For instance,
Then follow the instructions above or just go do /root/bare-bones and run ./bochs.sh. Press ^C when done. To power off properly, simply type 'exit' in the outermost root shell. Local files are persistent.
The disk image uses the GRUB bootloader, has a ms-dos partition table and contains a single ext2 partition, in case you wish to access it from a host operating system and transfer files.
Let's get a level deeper!
Edit:
Errata
This release has a little bug that prevents it from properly wholly rebuilding itself, simply fix /src/Makefile:
When your operating system is self-hosting, has all the ports one could wish for, and actually resemble some degree of quality, then it is time to face the fact that your life has become too easy.
It's time to do it all over again. Recursively.
It's time to enter Phase V.
Bare Bones (II)
The Bare Bones tutorial is isomorphically also a secret meta-tutorial. It documents not only how to complete itself, but it also documents how to complete itself under the operating system you made from it. You've not actually completed Bare Bones until you completed it under your own operating system.
That includes following all the instructions, and building a cross-compiler, naturally.
Example
To better illustrate my point, I've made a special disk image of my operating system. It contains a number of relevant elements:
- The Bare Bones Tutorial (code, scripts and the tutorial itself)
- A i686-elf cross-compiler.
- GRUB & xorriso (grub-mkrescue).
- Bochs.
- A whole copy of the osdev wiki!
Usage
The command line environment is a traditional Unix environment and has the usual commands.
- /root/bare-bones contains the osdev standard Bare Bones tutorial.
- /root/meaty-skeleton contains the Meaty Skeleton tutorial.
- /root/wiki.osdev.org contains a offline copy of the osdev wiki.
Read also /share/doc/user-guide for basic system usage.
The editor is called 'editor' and you exit it with Control-Q. You save with Control-S and load with Control-O.
Disk Image
This is a raw harddisk image containing a 64-bit (x86_64) operating system. It contains a lot of stuff. It's self-hosting. It has python, git, quake, trianglix, nasm, i686-elf cross-compiler, GRUB, parted, e2fsprogs, its own source code, the osdev wiki, and so on. See /tix/installed.list for a list of all ports it contains. You can adapt it to your favorite virtual machine and use it to develop your own recursive hobbyist system on a hobbyist system. It's compressed with xz for good measure.
https://users-cs.au.dk/~sortie/sortix/phase-v/phase-v_x86_64.hdd.xz
For instance,
Code: Select all
wget https://users-cs.au.dk/~sortie/sortix/phase-v/phase-v_x86_64.hdd.xz &&
unxz phase-v_x86_64.hdd.xz &&
qemu-system-x86_64 -enable-kvm -vga std -hdd phase-v_x86_64.hdd -m 1024
The disk image uses the GRUB bootloader, has a ms-dos partition table and contains a single ext2 partition, in case you wish to access it from a host operating system and transfer files.
Let's get a level deeper!
Edit:
Errata
This release has a little bug that prevents it from properly wholly rebuilding itself, simply fix /src/Makefile:
Code: Select all
- ln -s . "$(SYSROOT)/usr"
- ln -s . "$(SYSROOT)/$(HOST)"
+ ln -sf . "$(SYSROOT)/usr"
+ ln -sf . "$(SYSROOT)/$(HOST)"