Skip to content

malwarebo/kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kernel

Minimal starting point for kernel development using x86 assmebly Basic kernel implementation of this paper

Usage

Prerequisites

  • A development environment for assembling and running x86 assembly code (e.g., NASM and QEMU).
  • Basic knowledge of x86 assembly language.
  • A virtual machine or computer with x86 architecture.

File Structure

- kernel/
    - boot/
        - bootloader.asm
    - kernel/
        - kernel.asm
    - linker.ld

Steps to Build and Run

  • Assemble the bootloader and kernel using NASM:
nasm -f bin boot/bootloader.asm -o bootloader.bin
nasm -f elf32 kernel/kernel.asm -o kernel.o
ld -T kernel/linker.ld kernel.o -o kernel.bin
  • Combine the bootloader and kernel into a single image:
cat bootloader.bin kernel.bin > os-image.bin
  • Run the kernel using QEMU
qemu-system-i386 -fda os-image.bin

The QEMU emulator should launch, and you will see the output of your simple kernel, which in this case, clears the screen and prints 'H' in white text on a black background. The kernel will enter an infinite loop to keep it running.

About

Tiny kernel built using x86 assembly

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors