OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:16 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Phase V - Recursive Osdev
PostPosted: Tue Mar 31, 2015 6:00 pm 
Offline
Member
Member
User avatar

Joined: Wed Mar 21, 2012 3:01 pm
Posts: 930
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.

Image

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!

You can simply boot the disk image up and run a simple script to complete one of the meta layers of Bare Bones and view the result in Bochs. You can then proceed to enter a whole new operating system into the editor, recompile, and complete the next meta layer of Bare Bones, then upload the result as a response to this topic.

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.

Run the ./bochs.sh scripts to recompile and test the tutorials. Use ./install.sh to install them properly onto the harddisk image, so you can select them from the bootloader itself.

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:
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


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:
Code:
-   ln -s . "$(SYSROOT)/usr"
-   ln -s . "$(SYSROOT)/$(HOST)"
+   ln -sf . "$(SYSROOT)/usr"
+   ln -sf . "$(SYSROOT)/$(HOST)"


Top
 Profile  
 
 Post subject: Re: Phase V - Recursive Osdev
PostPosted: Wed Apr 01, 2015 12:44 pm 
Offline
Member
Member

Joined: Sat Oct 09, 2010 3:35 am
Posts: 274
=D>

Waiting for someone to post a "MyOS under Sortix under Sortix" on 1 April 2016, now...

_________________
http://shikhin.in/

Current status: Gandr.


Top
 Profile  
 
 Post subject: Re: Phase V - Recursive Osdev
PostPosted: Wed Apr 01, 2015 11:59 pm 
Offline
Member
Member

Joined: Thu Jul 05, 2012 5:12 am
Posts: 923
Location: Finland
This may be a silly and simplified question. If we had a single-file kernel, let it be SortieKernel.elf, and we would build it on Linux by using a cross-compiler, and the file checksum was "something". If you built it on Sortix, would the checksum be equal to the first one? What about the next iteration? And the next? And so on?

_________________
Undefined behavior since 2012


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group