Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kariaro/haruos
https://github.com/kariaro/haruos
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kariaro/haruos
- Owner: Kariaro
- Created: 2024-07-04T15:37:20.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-25T11:23:39.000Z (3 months ago)
- Last Synced: 2024-07-25T12:51:07.585Z (3 months ago)
- Language: Assembly
- Size: 94.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HaruOS
This is a two stage bootloader
## Setup
Install nasm and elf tools on windows
```
https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/
``````
https://github.com/lordmilko/i686-elf-tools/releases/tag/13.2.0
```## Building
```sh
./scripts/build.sh
```This will generate a FAT32 image with the first and second stage bootloaders
## Booting
Steps of STAGE1
1. Set CS to `0x0000:0x7C00`
1. Set stack to `0x0000:0xFFFF`
1. Read `STAGE2.BIN` to `0x0000:0x0600````
pmode read kernel to -> 0x8000_0000 (2gb)
long mode page mem -> 0x8000_0000 (2gb)
write elf kernel to -> 0xffff_ffff_8000_0000 (2gb) kernel
jump to kernel -> 0xffff_ffff_8000_0000
```Steps of STAGE2
1. Enter protected mode
1. Read sectors of KERNEL.BIN
1. ??????
1. Enter long mode
1. ??????
1. Jump to `kernel_main` from long mode