Go to file
Pierre Pronchery f39779e810 i386: remove dependency on <sys/mman.h>
This defines memory-protection flags specifically for the GDT.
2025-03-20 19:03:46 +01:00
.github/workflows deforaos-c-ci_ubuntu-latest: use checkout v4 2024-05-26 00:04:59 +02:00
doc doc: spell e.g., in full 2025-02-05 00:11:18 +01:00
include Include <stddef.h> for NULL 2019-10-02 16:06:23 +02:00
src i386: remove dependency on <sys/mman.h> 2025-03-20 19:03:46 +01:00
tests i386: remove dependency on <sys/mman.h> 2025-03-20 19:03:46 +01:00
tools Fix the amd64 build 2021-09-29 04:26:11 +02:00
.gitignore Ignore more object files 2018-06-08 11:23:38 -04:00
.gitmodules Import DeforaOS libc as a submodule 2019-05-30 02:18:16 +02:00
COPYING Import the 2-clause BSD license 2018-03-19 01:02:43 +01:00
project.conf Register project modes globally 2021-01-09 20:30:13 +01:00
README.md Explicitly list Github as a mirror 2019-10-03 23:25:19 +02:00

DeforaOS uKernel

About uKernel

uKernel is intended to be the kernel of the DeforaOS Operating System.

This project is in a very early stage and only targets the Intel 32-bit architecture for the moment (x86). Support for the Intel 64-bit architecture is in progress (amd64).

Compiling uKernel

First, when compiling from the source code repository, make sure that the Git submodules have been initialized and checked out as required:

$ git submodule init
$ git submodule update

Then, the Makefiles must be generated for the current platform. This can be performed with configure(1) from the DeforaOS configure project, found at https://www.defora.org/os/project/16/configure (or on the Github mirror at https://github.com/DeforaOS/configure). The procedure is then as follows:

$ configure

Please refer to the documentation of DeforaOS configure for further instructions.

Once this done, to build uKernel for the Intel 32-bit architecture, simply run:

$ make ARCH="i386" CC="/path/to/compiler"

To build uKernel for the Intel 64-bit architecture, this would be:

$ make ARCH="amd64" CC="/path/to/compiler"

The "CC" parameter is only required if a compiler other than the default is necessary. When using GCC, it is normally recommended to use a compiler specifically targeted for this purpose.

The resulting kernel is located in src/kernel/uKernel.bin. On the i386 and amd64 platforms, it produces a multiboot-compliant kernel file.

Note that it is also possible to build uKernel outside of the source tree, by using the "OBJDIR" variable as follows:

$ make ARCH="i386" OBJDIR="$PWD/obj-i386/"

(note that the trailing slash is required)

Testing uKernel

To test uKernel for the Intel 32-bit platform:

$ qemu-system-i386 -kernel src/kernel/uKernel.bin

It is also possible to leverage the generic loader:

$ qemu-system-i386 -kernel src/loader/uLoader.bin -initrd src/kernel/uKernel.bin

On the Intel 64-bit platform, the loader is actually required:

$ qemu-system-x86_64 -kernel src/loader/uLoader.bin -initrd src/kernel/uKernel.bin

Generating ISO images

The build system will automatically try to create a bootable ISO image in src/DeforaOS.iso on supported platforms.

On Intel-based platforms (i386, amd64) this currently requires GNU GRUB and the corresponding dependencies (eg xorriso) to be installed.