Skip to content
/ osc2022 Public
forked from oscapstone/osc2022

Homework submission for student

License

Notifications You must be signed in to change notification settings

LJP-TW/osc2022

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My OSC 2022

Author

學號 GitHub 帳號 姓名 Email
310555003 LJP-TW 張書銘 [email protected]

How to build

  • Download dependencies:
sudo apt-get install gcc-aarch64-linux-gnu qemu-system-arm
  • Build kernel8.img:
make
  • Build kernel8.img with some debug information:
# Options:
#   MM_DEBUG
#   DEMANDING_PAGE_DEBUG
make MM_DEBUG=1
make DEMANDING_PAGE_DEBUG=1
  • Build myos.img (which you can dd to SD card):
make image

How to run

  • Qemu emulation:
make qemu
  • You should either attach gdb to qemu, or just remove the arugments -s -S passed to qemu in the Makefile

  • Qemu will emulate the bootloader and you can then attach to the bootloader shell with:

sudo screen /dev/pts/<pts_idx>
  • In the bootloader shell, you can use the command load to ask the bootloader to load the kernel image. After entering the load command, you can send the kernel image to the bootloader with the following command:
sudo ./tools/loadkernel.py /dev/pts/<pts_id> build/kernel8.img

How to burn it into pi3

dd if=./build/myos.img of=/dev/<your SD card device>

About

Homework submission for student

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 93.1%
  • Assembly 3.7%
  • Makefile 2.0%
  • Other 1.2%