Skip to content

A simple OS that prints "Hello World", for RaspberryPi 3

License

Notifications You must be signed in to change notification settings

rxchit/Barebone-OS-rasPi3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barebone-OS-rasPi3

A simple OS that prints "Hello World", for RaspberryPi 3

Pre-requisite

Here I am going to describe the steps that I went through to get my dev environment set up. I am, however, going to assume that you are working in a Linux environment.

The Compiler

Most likely, your computer is running on an Intel or AMD processor that uses the x86_64 architecture. The raspberry pi processor, however, uses the ARM architecture. This difference means that we cannot use regular gcc that is likely already installed on your machine.

Building this kernel requires binutils and a GCC cross compiler built for the aarch64-elf target.

This tutorial can be followed for any Operating System.

ArchLinux - I however am using the AUR build for aarch64-elf target ie: aarch64-none-elf.

The Virtual Machine

I am going to use QEMU to run the virtual machine. Newer versions of QEMU can emulate the raspberry pi hardware. We need QEMU AARCH64 VM.

We can check if it is installed by doing qemu-system-aarch64 --version

Building

NOTE : You should pass --enable-languages=c,c++ to the GCC configure script. Make sure to add the install location to your $PATH if it isn't already.

This repo doesn't contains the bin/ & sysroot/ directory structures will not be present.

make setup        #Run to create this structure.

To compile, assemble, and link the code into sysroot/kernel8.img

make

To remove all build files

make clean

Testing

To test this code on QEMU

qemu-system-aarch64 -M raspi3b -serial null -serial stdio -kernel bin/rxchit.elf

Screenshot

To test on actual hardware

Not tested on actual hardware yet, Use on your own accord.

References

About

A simple OS that prints "Hello World", for RaspberryPi 3

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published