https://github.com/alexjmercer/x86_64-bootloader-and-kernel
Learning about bootloaders and kernels. Diving deep into how an Operating system operates. All for learning purposes.
https://github.com/alexjmercer/x86_64-bootloader-and-kernel
assembly-x86 nasm-bootloader os osdev qemu x86-64
Last synced: 2 months ago
JSON representation
Learning about bootloaders and kernels. Diving deep into how an Operating system operates. All for learning purposes.
- Host: GitHub
- URL: https://github.com/alexjmercer/x86_64-bootloader-and-kernel
- Owner: AlexJMercer
- Created: 2023-12-10T19:41:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-18T18:56:11.000Z (over 1 year ago)
- Last Synced: 2025-01-21T04:41:47.890Z (4 months ago)
- Topics: assembly-x86, nasm-bootloader, os, osdev, qemu, x86-64
- Language: Assembly
- Homepage:
- Size: 150 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Beginners Attempt at OSDev
⚠️In progress

## Introduction
> This is an attempt at understanding how computers work.
> How an Operating system operates, and how it interfaces with bare metal hardware.
>
> I'm also making a collection of detailed notes and instructions for myself, and anyone else who wants to follow along on this journey.
>
> You can access the notes in the [Instructions & Notes](/Instructions%20&%20Notes) folder.
> The notes are written in Markdown, and can be viewed on GitHub itself.
>
> Please click here to begin reading the notes.
>## Environment Setup
> I'm using a Windows 11 64-bit machine, and here's what you will need to get started.
>
> - **NASM** : Install this through winget using `winget install nasm`. This is to help us assemble our code, i.e, convert our assembly code to machine code.
> - **QEMU** : Install this through winget using `winget install qemu`, or download it from here. QEMU is essentially a Virtual Machine, and we will use it to run our boot sector and boot into our OS.
> - **Preferred IDE** : I'm using **VSCode** 💖 as it's simple and easy to use with Git. You can use any IDE you want, or even a simple text editor like Notepad++ or Sublime Text.
>
> - **Additionally**, you may create a Shell script to automatically generate your `.asm` file into a `.bin` file, and then run it on QEMU.
I've implemented it using **BASH**, in a file called `run.sh`. You can use it by running `bash run.sh ` in your Windows Terminal.
>
> **NOTE :** You will need to have WSL installed on your machine to use this script. Also, you will need to have QEMU and NASM installed in your WSL environment as well.
>
> **Alternatively**, you can use the `run.bat` like so: `run.bat `. This will generate a `output.bin` file and run it on QEMU.## Building the files
> For sake of simplicity and convenience, I've chosen to build and run the final file in **`WSL`**.
>
> I have included a long list of dependencies and instructions in the `setup-g++-wsl.sh` file in the `src` folder. You can run this file to install all the dependencies at once.
**Just in case**, the script fails, you should be able to install the dependencies by manually typing the commands one by one.
>
> **NOTE :** You can simply open your current working directory inside of WSL by typing `bash` in the CMD.> Once the prerequisites are installed, you can proceed to run the `build.sh` file which will automagically build the files for you and place them in the `bin` folder & run them on QEMU.