A 64-Bit loader and kernel for OS Development (Archived)
- C 95.9%
- Batchfile 2.4%
- Makefile 1.7%
| drive | Updated License | |
| src | Updated License | |
| .gitignore | Initial Code | |
| bios64.bin | Initial Code | |
| BUILD.md | Initial Code | |
| data types.png | Initial Code | |
| LICENSE | Update LICENSE | |
| progress1.png | Initial Code | |
| progress2.png | Initial Code | |
| progress3.png | Initial Code | |
| progress4.png | Initial Code | |
| progress5.png | Initial Code | |
| README.md | Update README.md | |
| run-qemu-ac97.bat | Initial Code | |
| run-qemu.bat | Initial Code | |
| unmount.bat | Initial Code | |
Step by Step Tutorials on how to code a 64-Bit loader and kernel for OS Development
THIS IS NO LONGER IN DEVELOPMENT. USE AT YOUR OWN RISK. THIS IS NOT AN OPERATING SYSTEM, JUST A BOOTLOADER, OF WHICH WAS GOING TO BE AN OS. BUT IT'S NO LONGER BEING WORKED ON DO TO USA POLICIES.
LICENSE / COPYRIGHT
MIT License
Copyright (c) 2026 ThatOSDev
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
NOTES
- WARNING - This code is for teaching purposes only. It is not written for professional use. Some code is written in order to speed up teaching, and thus is not properly coded. You should rewrite the code for your own professional use.
- Starting with CODE5, the resolution from the EFI file sets the screen height and width to 1920x1080.
- Although this can work on real hardware, I do NOT recommend doing so unless you know what you are doing. Use virtualbox or qemu until you know you have solid working code.
- For CODE1, you will need the BOOTX64.EFI file from my other GitHub Repo. https://codeberg.org/ThatOSDev/UEFI-Tuts
- The drive.hdd file is included, I didn't realize this when I made the first video.
- The bios64.bin file is for qemu to work. Otherwise QEMU will fail to load.
- Although the BUILD INSTRUCTIONS shows Windows, MAC or Linux, this tutorial series is using a windows host. However all code and makefile command switches should all work if you follow the build instructions.
TOOLS NEEDED
- OSFMount ---- https://www.osforensics.com/tools/mount-disk-images.html
- QEMU ( Optional ) ---- https://www.qemu.org/
- VirtualBox ( Optional ) ---- https://www.virtualbox.org/
- GCC for windows ---- https://nuwen.net/mingw.html
BUILD INSTRCUTIONS
https://codeberg.org/ThatOSDev/UEFI-Tuts/src/branch/master/BUILD.md
READ THIS !!!
- THINGS YOU SHOULD KNOW BEFORE STARTING OS DEVELOPMENT
- The C Language
- Assembly Language
- How to read Hex Code ( Example : 0x8664 )
- How your Host Operating System works ( Such as windows or linux )
- How your compiler works ( Such as GCC )
- How to do research ( Don't be lazy )
- BEGINNER MISTAKES : https://wiki.osdev.org/Beginner_Mistakes
STRUCT FROM THE EFI BOOTLOADER
NOTE: This is current starting with CODE5
typedef struct BLOCKINFO
{
uint64_t BaseAddress;
uint64_t BufferSize;
uint32_t ScreenWidth;
uint32_t ScreenHeight;
uint32_t PixelsPerScanLine;
uint64_t LoaderFileSize;
EFI_MEMORY_DESCRIPTOR* MMap;
uint64_t MMapSize;
uint64_t MMapDescriptorSize;
uint64_t* rsdp;
} __attribute__((__packed__)) BLOCKINFO;
TUTORIALS
- RIGHT CLICK THE LINKS AND OPEN IN NEW TAB