Skip to content

Latest commit

 

History

118 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assembly C QEMU GDB

kernel-from-scratch

An educational kernel built completely from scratch to explore low-level systems programming, memory management, interrupts, scheduling, and hardware interaction.

Required Tools:

  • QEMU - An open-source emulator that allows you to run the kernel in a virtual environment.
  • GCC - The GNU Compiler Collection, used to compile the kernel code.
  • i686-elf-gcc - A cross-compiler for the i686 architecture, used to compile the kernel code for the target architecture.
  • NASM - The Netwide Assembler, used for assembling low-level assembly code.
  • GCC - The GNU Compiler Collection, used to compile the kernel code.
  • Make - A build automation tool that simplifies the compilation process.
  • GDB - The GNU Debugger, used for debugging the kernel during development.
  • PWNdbg - A TUI debugger for GDB, providing an enhanced debugging experience.

Project Structure

.
├── conf.gdb
├── Dockerfile
├── linker.ld
├── Makefile
├── README.md
├── bin/
├── build/
├── docs/
├── includes/
│   ├── kernel.h
│   ├── panic.h
│   ├── timer.h
│   ├── driver/
│   ├── interrupt/
│   ├── lib/
│   └── utils/
├── scripts/
│   └── requirements.sh
├── src/
│   ├── bootloader/
│   ├── driver/
│   ├── interrupt/
│   ├── kernel/
│   ├── libs/
│   └── utils/
└── test/

To install all the required tools, you can use the following commands:

  • if u'r using Linux:

        sh ./scripts/install.sh
  • if u'r using Windows: (shame on you)

    1. Uninstall windows
    2. Install linux
    3. Run the above command

Getting Started

  • clone the repository and navigate to the project directory:
    git clone https://github.com/Ox03bb/kernel-from-scratch.git
    cd kernel-from-scratch
  • install the required tools using the provided script:
    sh ./scripts/install.sh
  • build the kernel using the Makefile:
    make setup # to setup the build environment(build docker image...etc) && build the kernel
    # or 
    make build # if u'r already setup the build environment
  • run the kernel in QEMU:
    make run

About

An educational kernel built completely from scratch to explore low-level systems programming, memory management, interrupts, scheduling, and hardware interaction.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages