As a osdev beginner enthusiast, with general knowledge of os internal workings and in need of finding concrete examples that can be tested/played with, I was wondering if the first four books(volume 1 - volume 4) would be sufficient to get started?
My goal is to make a simple, single threaded unix clone for x86 which can be tested/developed on some emulator.
For a case such as this, Volume 1 should be sufficient.
Volume 1 explains the processes from power up (POST) to a working single tasking/multi-threading kernel.
1) POST to 0x07C00 (boot code)
2) Various forms of boot code from MBR, eMBR
, GDT, etc., including extended partitions and creating a partition stack.
3) Partition boot code: boot code for a floppy and/or a partition found via 2) above, including how to load additional sectors if needed.
4) Loading a loader file. This shows how to load a file from disk to any location in (lower) memory, then jump to it.
5) The loader. This shows what a loader can/should do including getting information from the BIOS.
6) Loading multiple kernel files and jumping to the kernel.
7) The Kernel. A simple single-tasking/multi-threading kernel using hardware task switching (TSS's)
Volume 2 shows what is needed to make your kernel file-system independent as well as explains the details of some of the most used *simple* file systems, such as FAT, FYSFS
(created for the series as well as for the fun of it), and CD-ROM's. Includes information on booting CD-ROMs.
Volume 3 is for creating media drivers. It shows how to read from various forms of media: FDC, ATA, SATA, and AHCI. Shows how to detect, initialize, and read and write to the media using each controller type.
Volume 4 shows how to detect and initialize a mouse (PS2, AT, Bus) and a keyboard. This volume is pretty much for outdated, obsolete (Bus Mouse) hardware since most mice and keyboards are now USB ( Volume 8 ). However, I only write these books for the enjoyment of writing them, and I enjoyed writing Volume 4. And yes, I have a few Bus mouse ISA cards and mice...
Correct me if i am wrong, but some stuff that aren't included in your series on osdev but which I think I need to get my head around before setting on completing my goal are:
1) making text user interface (as I think they are simpler to write)
2) processes implementation (switching context, clock interrupts, ipc)
3) managing memory (from physical to virtual(paging) needed for processes)
4) concrete file system (or is this covered by virtual file system book?)
5) setting up environment for developing (emulators, compilers, build/make, etc.)
You are correct. Volume 1 does contain a minimal memory manager.
Please note that the intent of the series is not to write the OS for you, but to show you what can be done using minimal code. The intent is to then let the reader expand upon each portion of that code to create a better memory manager, file system driver, task manager, etc.
In my opinion, the reader will learn and enjoy the process of doing it him/herself rather than copy/pasting the code.
Btw. I am not trying to undermine your series, which seem great and I am really interested in buying them, but just trying to get an idea how far would they aid me in my goal and what's "missing" from them.
Oh no, absolutely no thought of undermining taken. I write these books for enjoyment only. I make very little money on them, just enough to pay for the web page and various other items I use to write them with. So by no means do I express that this is the next best book series. I know that there can be much information added.
For example, I am currently editing/adding to Volume 1.
1) UEFI BIOS. How to boot from and use various items within the UEFI.
2) APIC. The Advanced PIC including multi-processor function.
3) HPET. The High Precision Event Timer and how to use at least the first 3 timers.
4) Paging. How to use paging to have separate task spaces.
5) ACPI. How to parse the ACPI for hardware information with an included example for the APIC information.
6) More information on the older hardware items such as the PIC, PIT, RTC.
I still have a little editing to do, but this should add to the information required to get started. (Sorry, I don't have an estimated time of release).
To be complete:
Volume 6 shows how to write to the video screen, creating objects to form a Graphical User Interface, showing how to move windows, switching between items, buttons, icons, etc.
Volume 8 is my favorite. It shows how to use the USB from detecting the hardware all the way to reading and writing data from/to a device such as a thumb drive. It shows detailed examples of how to use a mouse, keyboard and various thumb drives. It shows the information on all four controller types: UHCI, OHCI, EHCI, and xHCI. It has information about Super-speed devices as well.
Please note that each volume contains a companion CD-ROM with source code from each chapter and a set of utilities to show how to use the subject read. Once you have the book, send me a simple "proof of purchase" email, and I will send you the ISO of the CD-ROM.
I tried to write this series so that a beginner with little to no background in OS development could start and learn how to create an operating system, as well as a moderate to well versed programmer could use these books for reference. I admit that I am not a great writer nor am I a great programmer, though I learned as a wrote. Remember, I do this because I want to and enjoy the work, not because I need to or for the money.
One more thing I would like to point out though. I do include many notes and off-topic items to help the newbie understand why his/her code doesn't work. For example, Volume 1 explains that if you intend to have more than one sector of code in your boot sector, you *must* contain all of the code used to read addition sectors within the first sector of your code. How many of us, be honest, have written a multi-sector boot sector and couldn't figure out why it didn't work until we realized that the read_sector code or even a simple little thing as our variable to hold the DL value was beyond the 512 mark?
I tried to write the text so that a newbie as well as a more versed reader would not make these little mistakes.
Anyway, thanks for the comments. When I receive comments like this, it fuels the flames under my seat to continue working on them.