diff --git a/01-bootsector-barebones/README.md b/01-bootsector-barebones/README.md index 09c2b906..a1458cf1 100644 --- a/01-bootsector-barebones/README.md +++ b/01-bootsector-barebones/README.md @@ -25,7 +25,7 @@ e9 fd ff 00 00 00 00 00 00 00 00 00 00 00 00 00 ``` It is basically all zeros, ending with the 16-bit value -`0xAA55` (beware of indianness, x86 is little-endian). +`0xAA55` (beware of endianness, x86 is little-endian). The first three bytes perform an infinite jump Simplest boot sector ever @@ -55,6 +55,8 @@ I know you're anxious to try it out (I am!), so let's do it: `qemu boot_sect_simple.bin` +> On some systems, you may have to run `qemu-system-x86_64 boot_sect_simple.bin` If this gives an SDL error, try passing the --nographic and/or --curses flag(s). + You will see a window open which says "Booting from Hard Disk..." and nothing else. When was the last time you were so excited to see an infinite loop? ;-) diff --git a/03-bootsector-memory/boot_sect_memory.asm b/03-bootsector-memory/boot_sect_memory.asm index d41e78ed..7218841b 100644 --- a/03-bootsector-memory/boot_sect_memory.asm +++ b/03-bootsector-memory/boot_sect_memory.asm @@ -43,7 +43,7 @@ jmp $ ; infinite loop the_secret: ; ASCII code 0x58 ('X') is stored just before the zero-padding. - ; On this code that is at byte 0x2d (check it out using 'xdd file.bin') + ; On this code that is at byte 0x2d (check it out using 'xxd file.bin') db "X" ; zero padding and magic bios number diff --git a/03-bootsector-memory/boot_sect_memory_org.asm b/03-bootsector-memory/boot_sect_memory_org.asm index 9a29adc1..de5193c5 100644 --- a/03-bootsector-memory/boot_sect_memory_org.asm +++ b/03-bootsector-memory/boot_sect_memory_org.asm @@ -39,7 +39,7 @@ jmp $ ; infinite loop the_secret: ; ASCII code 0x58 ('X') is stored just before the zero-padding. - ; On this code that is at byte 0x2d (check it out using 'xdd file.bin') + ; On this code that is at byte 0x2d (check it out using 'xxd file.bin') db "X" ; zero padding and magic bios number diff --git a/11-kernel-crosscompiler/README.md b/11-kernel-crosscompiler/README.md index 774a909a..6d489946 100644 --- a/11-kernel-crosscompiler/README.md +++ b/11-kernel-crosscompiler/README.md @@ -58,7 +58,7 @@ gcc --- ```sh cd /tmp/src -curl -O http://mirror.bbln.org/gcc/releases/gcc-4.9.1/gcc-4.9.1.tar.bz2 +curl -O https://ftp.gnu.org/gnu/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2 tar xf gcc-4.9.1.tar.bz2 mkdir gcc-build cd gcc-build diff --git a/12-kernel-c/README.md b/12-kernel-c/README.md index 7f00d38f..5292d661 100644 --- a/12-kernel-c/README.md +++ b/12-kernel-c/README.md @@ -37,7 +37,7 @@ generates machine code without any labels and/or metadata *Note: a warning may appear when linking, disregard it* -Now examine both "binary" files, `function.o` and `function.bin` using `xdd`. You +Now examine both "binary" files, `function.o` and `function.bin` using `xxd`. You will see that the `.bin` file is machine code, while the `.o` file has a lot of debugging information, labels, etc. diff --git a/13-kernel-barebones/Makefile b/13-kernel-barebones/Makefile index 764f9b07..94e765f5 100644 --- a/13-kernel-barebones/Makefile +++ b/13-kernel-barebones/Makefile @@ -23,7 +23,7 @@ bootsect.bin: bootsect.asm nasm $< -f bin -o $@ os-image.bin: bootsect.bin kernel.bin - cat $^ > os-image.bin + cat $^ > $@ run: os-image.bin qemu-system-i386 -fda $< diff --git a/14-checkpoint/README.md b/14-checkpoint/README.md index 6af38f6a..8d9958e3 100644 --- a/14-checkpoint/README.md +++ b/14-checkpoint/README.md @@ -20,7 +20,7 @@ on Homebrew's repos) ```sh cd /tmp/src -curl -O http://ftp.rediris.es/mirror/GNU/gnu/gdb/gdb-7.8.tar.gz +curl -O http://ftp.rediris.es/mirror/GNU/gdb/gdb-7.8.tar.gz tar xf gdb-7.8.tar.gz mkdir gdb-build cd gdb-build diff --git a/21-shell/README.md b/21-shell/README.md index 34aca085..e1a06119 100644 --- a/21-shell/README.md +++ b/21-shell/README.md @@ -1,7 +1,7 @@ **Goal: Clean the code a bit and parse user input** -In this lesson we will do tho things. First, we will clean up the code a bit, so it is ready +In this lesson we will do two things. First, we will clean up the code a bit, so it is ready for further lessons. During the previous ones I tried to put things in the most predictable places, but it is also a good exercise to know when the code base is growing and adapt it to current and further needs. @@ -34,7 +34,7 @@ we implement the boot sequence for a different machine. There are more switches for the `CFLAGS` on the `Makefile`, since we will now start creating higher-level functions for our C library and we don't want the compiler to include any external code if we make a mistake with a declaration. -We also added some flags to turn warnings into errors, since an apparantly minor mistake +We also added some flags to turn warnings into errors, since an apparently minor mistake converting pointers can blow up later on. This also forced us to modify some misc pointer declarations in our code. diff --git a/23-fixes/README.md b/23-fixes/README.md index e9c4acba..4289413c 100644 --- a/23-fixes/README.md +++ b/23-fixes/README.md @@ -16,7 +16,7 @@ We add `-ffreestanding` when compiling `.o` files, which includes `kernel_entry Before, we disabled libgcc (not libc) through the use of `-nostdlib` and we didn't re-enable it for linking. Since this is tricky, we'll delete `-nostdlib` -`-nostdinc` was also pased to gcc, but we will need it for step 3, so let's delete it. +`-nostdinc` was also passed to gcc, but we will need it for step 3, so let's delete it. 2. kernel.c `main()` function diff --git a/24-el-capitan/README.md b/24-el-capitan/README.md index 88d777dd..33d59601 100644 --- a/24-el-capitan/README.md +++ b/24-el-capitan/README.md @@ -1,6 +1,6 @@ **Goal: Update our build system to El Capitan** -If you were following this guide from the beginning, and upgraded to El Capitan only +If you were following this guide from the beginning and upgraded to El Capitan only to find that Makefiles don't compile anymore, follow these instructions to upgrade your cross-compiler. @@ -33,7 +33,7 @@ export PATH="$PREFIX/bin:$PATH" binutils -------- -Rember: always be careful before pasting walls of text from the internet. I recommend copying line by line. +Remember: always be careful before pasting walls of text from the internet. I recommend copying line by line. ```sh mkdir /tmp/src diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..c02f0a16 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018, Carlos Fenollosa +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 4f43623f..fad5bad0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ os-tutorial =========== +_⚠️ Hey! This is an old, abandoned project, with both technical and design issues [listed here](https://github.com/cfenollosa/os-tutorial/issues/269). Please have fun with this tutorial but do look for more modern and authoritative sources if you want to learn about OS design. ⚠️_ + How to create an OS from scratch! I have always wanted to learn how to make an OS from scratch. In college I was taught @@ -87,5 +89,8 @@ If we feel brave enough: Contributing ------------ -I'm still learning this. For the moment, please restrict your contributions to fixing possible bugs -or improving existing documents. I'm not yet ready to accept enhancements. +This is a personal learning project, and even though it hasn't been updated for a long time, I still have hopes to get into it at some point. + +I'm thankful to all those who have pointed out bugs and submitted pull requests. I will need some time to review everything and I cannot guarantee that at this moment. + +Please feel free to fork this repo. If many of you are interested in continuing the project, let me know and I'll link the "main fork" from here.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: