Skip to content
Hobby kernel for the x86 platform.
Branch: master
Clone or download
danirod Remove unused LOG() macro
It was not being used at the moment, plus it's very dangerous to use an
early logger at this stage until there is proper support for basic
hardware in a portable way.
Latest commit e7cd6cc Jul 30, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Clarify contributing conditions Jul 15, 2017
arch/i386 Remove unused LOG() macro Jul 30, 2018
tools Delete the old toolchain system Apr 15, 2017
.gdbinit Fix broken gdbinit file Apr 13, 2017
.gitignore Implement strcmp and strncmp Jun 24, 2018
.travis.yml Clarify contributing conditions Jul 15, 2017 Clarify a few topics Jul 16, 2017
COPYING Update docs Dec 12, 2015
Makefile Separate stdlib functions into libc Jun 21, 2018 Move architecture dependent header files Jun 4, 2018


NativeOS is a hobbyist kernel and operating system for the x86 platform. It is designed as a project to learn more about how the x86 processor work and how operating systems work. My intention is purely educational. The source code is open in the hope that it helps other people too.

Roadmap and contributing to the project

This project has no public roadmap. This means that I'm not disclosing what I'm working on when I'm working on this project. This is intended at this moment for this project because the project is not mature or stable enough and is still under development.

My issue and pull request policy is clarified on I'm not accepting pull requests at this moment. See the document to read why. Issues are still open and covered by the Code of Merit. See for details.

Building NativeOS

NativeOS requires the i386-elf-gcc cross-compiler installed in the machine to compile. The build process has already been tested under Linux, MacOS X and Windows and it works on all the platforms.

You must compile the i386-elf-binutils and i386-elf-gcc. Download GNU Binutils and GNU GCC and compile them targetting the i386-elf platform.

MS-Windows users should download and install a POSIX environment such as Cygwin or MSYS2 in order to get all the tools that would allow them to build the kernel image, such as make. Please note that although MS-Windows is a supported host, it is not tested so often, and a real UNIX or UNIX-like environment such as GNU/Linux or MacOS X is recommended, even on a virtual machine.

GNU Make is also required to run the Makefile file.

To build the kernel image just run the following command:

$ make

This will build the kernel into "nativeos.elf" file. NativeOS kernel uses the ELF format and it supports the Multiboot specification, so it can be deployed in any machine that uses a Multiboot bootloader (such as GRUB) and executed.

Creating a CD image

You can use some of the GRUB Command Line Tools to generate ISO files. There is already a rule in the Makefile file to generate a CD-ROM using GRUB.

You need the GRUB Command Line Tools installed with support for the i386-elf platform. If you are using GNU/Linux, you probably already have support for that platform, but othwersie you might have to add it. Instructions for building the GRUB Command Line Tools are given below.

To create a NativeOS ISO image, run the following command:

$ make cdrom

MacOS X and Windows users can install the GRUB Command Line tools by following the instructions given in the following address: (Instructions are the same for Windows).

NOTE: You'll be getting the GRUB Command Line Tools here. This is definitely NOT the same as installing the GRUB Bootloader on your host PC, although the command line tools allow you to do that, so care must be taken in order to avoid running any dangerous command.

Windows users can find a precompiled version of the GRUB Command Line tools at In any way you will need GNU xorriso to generate the ISO files. (There is already a precompiled version of xorriso for Windows in the link too.)

Running NativeOS

A virtual machine is the safest way for running and testing NativeOS. I don't recommend running this on your host PC unless you know what you are doing and you have inspected the source code. Also, take a look at the disclaimer below before attempting to run anything that you could regret later.

The Makefile already has some rules to run the NativeOS ISO file with QEMU. It is even possible to run QEMU in debug mode and to remotely attach GDB in order to debug the kernel image.

Run the following commands:

$ make qemu         # Executes qemu-system-i386
$ make qemu-gdb     # Executes qemu-system-i386 in debug mode

For more information on GDB debugging with QEMU, see the QEMU manual or the following article:

License and disclaimer

Copyright (C) 2015-2017 Dani Rodríguez

NativeOS is licensed under the terms of the GNU General Public License v3. See the COPYING file for more information. Old NativeOS files will probably not have the GPL header on it. I'm working on that.

NativeOS is provided AS IS with no extra support. Working with kernels and OS and bootloaders is fun, but I'm not resposible for anything wrong you do with it. If you break your hard drive or your computer because of using the wrong command, that is not my fault.

You can’t perform that action at this time.