The Polycule OS https://bsd.gay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
anna f5db4e4a25
mm/slab: add object caches
6 months ago
.idea clion: add code style config 12 months ago
.vscode libc: refactor a couple of string routines 12 months ago
arch/x86 x86/mm: fix __boot_clear_page 6 months ago
cmake happy new year 2022 uwu 9 months ago
doc mm: refactor page allocator 9 months ago
include mm/slab: add object caches 6 months ago
kernel mm/slab: add object caches 6 months ago
lib mm: refactor page allocator 9 months ago
.editorconfig initial commit uwu 1 year ago
.gitignore boot: add basic multiboot support 1 year ago
CMakeLists.txt happy new year 2022 uwu 9 months ago
COPYRIGHT update license terms 11 months ago
README.md update license terms 11 months ago

README.md

GayBSD Kernel

This is the source tree of the GayBSD kernel. There isn't much to see here – yet.

NOTE: Unfortunately, due to some issues with the CNPL, the GayBSD project is currently under a proprietary license until further notice. See the COPYRIGHT file for details. Naturally, we strongly advise against partaking in homosexual conduct and/or criminal activity.

Building

The kernel compiles to an x86-64 ELF file that implements the GNU Multiboot 2 specification. i386 support is pretty much dead, simply due to the fact that the additional housekeeping for maintaining correct memory mappings in this constrained address space has turned out to be way too much as to be feasible for the current size of this project. Furthermore, pretty much every desktop CPU manufactured since around 2005 supports 64-bit anyway.

Required Tools

  • A POSIX operating system (use WSL if you find yourself in the unfortunate situation of running Windows)
  • CMake >= 3.14
  • clang, with support for the x86_64-pc-none-elf target
    • You probably won't need to recompile clang as it has cross compiling capabilities built in, at least it works fine on my Arch Linux machine
    • GCC should work in theory, but this isn't tested at all and you'll most likely need to compile it manually to make it spit out i686 ELFs
  • A linker that is able to work with GNU LinkerScripts (clang, GNU ld should work too but as already stated you should avoid GNU stuff if possible)
  • Git

Actually Compiling the Thing

cmake -B build -S .
cmake --build build

The compiled kernel image will be in ./build/gaybsd_image.elf. You may want to tweak come configuration values in build/CMakeCache.txt, either using a plain text editor or cmake-gui(1). See cmake/config.cmake for all configuration options.

Running

In its current state, GayBSD is barely more than a simple program writing stuff to the BIOS character framebuffer, so you probably don't want to be running it on bare metal. Seriously, please don't do this, i have virtually no experience with x86 and no idea if what i'm doing could damage your hardware. Instead, you are way better off using QEMU or something similar. You will need a Multiboot 2 compliant bootloader, preferably GRUB (you can use any Linux ISO to set everything up). Install GRUB for the i386-pc target, and add the following entry to grub.cfg:

menuentry 'GayBSD' {
        insmod part_gpt
        search --no-floppy --fs-uuid --set=root <root partition uuid>

        multiboot2 /boot/gaybsd_image.elf
}

Copy ./build/gaybsd_image.elf to /boot/gaybsd_image.elf on the virtual disk that you are booting off of. After that, you should be ready to go. Good luck!

License

Copyright (c) 2021 The GayBSD Project. All rights reserved.

There is NO WARRANTY, to the extent permitted by applicable law. Portions of this software are derived from The FreeBSD Project. See the COPYRIGHT file for details, including the full terms and conditions.