Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antoninhrlt/bootos
Kernel loader in protected mode with GDT initialized, for x64 and x86 operating systems
https://github.com/antoninhrlt/bootos
assembly kernel operating-system os x64 x86
Last synced: about 1 month ago
JSON representation
Kernel loader in protected mode with GDT initialized, for x64 and x86 operating systems
- Host: GitHub
- URL: https://github.com/antoninhrlt/bootos
- Owner: antoninhrlt
- License: mit
- Created: 2022-05-28T12:56:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-01T14:31:18.000Z (over 2 years ago)
- Last Synced: 2024-11-08T06:45:07.259Z (3 months ago)
- Topics: assembly, kernel, operating-system, os, x64, x86
- Language: Assembly
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bootos
Kernel loader in protected mode with GDT initialized, for x64 and x86 operating systems## Usage
Clone the repository for your project : `git clone https://github.com/antoninhrlt/bootos` (delete the "test/" folder inside "bootos/" because useless)Your project structure :
```
build/
- kernel.o
bootos/ (cloned from https://github.com/antoninhrlt/bootos)
src/
- kernel.c (will gives build/kernel.o)
```Your Makefile :
```make
# Generates "floppy disk" with the operating system, runnable with "qemu"
floppy : bootos/build/bootos build/kernel
cat $^ $< /dev/zero | dd of=$@ bs=512 count=2880# Builds the kernel
build/kernel : build/kernel.o
ld --oformat binary -Ttext 1000 -o build/kernel build/kernel.obuild/kernel.o : src/kernel.c
gcc -c -o $@ $<# Builds the boot sector
bootos/build/bootos :
$(MAKE -C .. build)
```## Build
The project requires [make](https://www.gnu.org/software/make/), "ld" and [nasm](https://www.nasm.us/)
> Test also requires [gcc](https://gcc.gnu.org/)
```bash
# Build the project, giving "build/bootos" output
make build -B
# Test for a simple kernel using "bootos"
(cd test && make emu -B)
```