anna
b4ed811920
This is hopefully the last time in a while that something in the mm subsystem needs a refactor this large. There are two main changes: - The page frame allocator returns a vm_page_t rather than a virtual address. - Data for the slab allocator is now stored in struct vm_page, which means there is no overhead in the slab itself so the space is used in a more efficient manner. |
2 years ago | |
---|---|---|
.idea | ||
.vscode | ||
arch/x86 | 2 years ago | |
cmake | 2 years ago | |
doc | 2 years ago | |
include | 2 years ago | |
kernel | 2 years ago | |
lib | 2 years ago | |
.editorconfig | ||
.gitignore | ||
CMakeLists.txt | 2 years ago | |
COPYRIGHT | 3 years ago | |
README.md | 3 years 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.