Skip to content

My Operating System for Raspberry Pi 3 Model B+

License

Notifications You must be signed in to change notification settings

fanhouin/My-Raspberry-Pi-OS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Operating Systems Capstone 2022

Implemented Features

  • Bootloader
  • UART communication interface
  • Mailbox
  • Exception and Interrupt
  • Thread, User Process
  • System Call (e.g. fork, exec, signal, read, write).
  • Dynamic Memory Allocator (Buddy System)
  • Virtual File System (tmpfs).

Run with QEMU

Prerequisites

sudo apt-get install gcc-aarch64-linux-gnu
sudo apt-get install qemu-system-aarch64

Make kernel image

cd kernel
make

Make bootloader image

cd bootloader
make

Run

Just run kernel image

cd kernel
make run

Boot kernel image with bootloader

# terminal 1
cd bootloader
make pty

# terminal 2
sudo screen /dev/pts/<num> 115200

# terminal 3 
cd kernel
sudo ../uartboot.py <num>

Directory

📦osc2022
 ┣ 📂bootloader
 ┃ ┣ 📂boot
 ┃ ┃ ┣ 📜linker.ld
 ┃ ┃ ┗ 📜start.S
 ┃ ┣ 📂include
 ┃ ┃ ┣ 📜gpio.h
 ┃ ┃ ┣ 📜read.h
 ┃ ┃ ┣ 📜string.h
 ┃ ┃ ┗ 📜uart.h
 ┃ ┣ 📂src
 ┃ ┃ ┣ 📜main.c
 ┃ ┃ ┣ 📜read.c
 ┃ ┃ ┣ 📜string.c
 ┃ ┃ ┗ 📜uart.c
 ┃ ┣ 📜Makefile
 ┃ ┣ 📜bcm2710-rpi-3-b-plus.dtb
 ┃ ┗ 📜initramfs.cpio
 ┣ 📂kernel
 ┃ ┣ 📂boot
 ┃ ┃ ┣ 📜linker.ld
 ┃ ┃ ┗ 📜start.S
 ┃ ┣ 📂include
 ┃ ┃ ┣ 📜allocator.h
 ┃ ┃ ┣ 📜cpio.h
 ┃ ┃ ┣ 📜dev_ops.h
 ┃ ┃ ┣ 📜exc.h
 ┃ ┃ ┣ 📜fdt.h
 ┃ ┃ ┣ 📜gpio.h
 ┃ ┃ ┣ 📜irq.h
 ┃ ┃ ┣ 📜list.h
 ┃ ┃ ┣ 📜mailbox.h
 ┃ ┃ ┣ 📜malloc.h
 ┃ ┃ ┣ 📜math.h
 ┃ ┃ ┣ 📜read.h
 ┃ ┃ ┣ 📜reboot.h
 ┃ ┃ ┣ 📜sched.h
 ┃ ┃ ┣ 📜shell.h
 ┃ ┃ ┣ 📜signal.h
 ┃ ┃ ┣ 📜stddef.h
 ┃ ┃ ┣ 📜stdint.h
 ┃ ┃ ┣ 📜string.h
 ┃ ┃ ┣ 📜syscall.h
 ┃ ┃ ┣ 📜task.h
 ┃ ┃ ┣ 📜test_fs.h
 ┃ ┃ ┣ 📜timer.h
 ┃ ┃ ┣ 📜tmpfs.h
 ┃ ┃ ┣ 📜uart.h
 ┃ ┃ ┣ 📜user_syscall.h
 ┃ ┃ ┗ 📜vfs.h
 ┃ ┣ 📂initramfs
 ┃ ┃ ┣ 📂flag
 ┃ ┃ ┃ ┣ 📂fffflag
 ┃ ┃ ┃ ┃ ┗ 📜flag   
 ┃ ┃ ┃ ┗ 📜fakeflag.txt
 ┃ ┃ ┣ 📜me
 ┃ ┃ ┣ 📜test1
 ┃ ┃ ┣ 📜test2.txt
 ┃ ┃ ┣ 📜test3.cc
 ┃ ┃ ┗ 📜user.S
 ┃ ┣ 📂src
 ┃ ┃ ┣ 📜allocator.c
 ┃ ┃ ┣ 📜cpio.c
 ┃ ┃ ┣ 📜ctx_switch.S
 ┃ ┃ ┣ 📜dev_ops.c
 ┃ ┃ ┣ 📜exc.c
 ┃ ┃ ┣ 📜fdt.c
 ┃ ┃ ┣ 📜irq.c
 ┃ ┃ ┣ 📜mailbox.c
 ┃ ┃ ┣ 📜main.c
 ┃ ┃ ┣ 📜malloc.c
 ┃ ┃ ┣ 📜math.c
 ┃ ┃ ┣ 📜read.c
 ┃ ┃ ┣ 📜reboot.c
 ┃ ┃ ┣ 📜sched.c
 ┃ ┃ ┣ 📜shell.c
 ┃ ┃ ┣ 📜signal.c
 ┃ ┃ ┣ 📜string.c
 ┃ ┃ ┣ 📜syscall.c
 ┃ ┃ ┣ 📜task.c
 ┃ ┃ ┣ 📜test_fs.c
 ┃ ┃ ┣ 📜timer.c
 ┃ ┃ ┣ 📜tmpfs.c
 ┃ ┃ ┣ 📜uart.c
 ┃ ┃ ┣ 📜user_syscall.S
 ┃ ┃ ┗ 📜vfs.c
 ┃ ┣ 📜Makefile
 ┃ ┣ 📜bcm2710-rpi-3-b-plus.dtb
 ┃ ┗ 📜initramfs.cpio
 ┣ 📜config.txt
 ┗ 📜uartboot.py

About

My Operating System for Raspberry Pi 3 Model B+

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • C 95.3%
  • Assembly 2.9%
  • Makefile 1.6%
  • Python 0.2%
  • Shell 0.0%
  • GDB 0.0%