Skip to content
/ pinyon Public

A toy ARMv7 and AArch64 kernel targeting the Raspberry Pi 2 and 3B.

License

Notifications You must be signed in to change notification settings

dylngg/pinyon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pinyon

Pinyon is a toy ARMv7 and AArch64 kernel targeting the Raspberry Pi 2 and 3. It presently has the following features:

  • Booting
  • UART console output
  • Basic UNIX-like shell
  • Preemptive round-robin scheduling
  • Memory allocation
  • open()/read()/write() syscalls for UART IO
  • Process CPU time and memory reporting
  • System uptime reporting
  • Virtual memory
  • Tasks run with non-supervisor privileges

Prerequisites

GNU Make is required for building. On MacOS, the default make that comes with XCode developer tools seems to work.

For AARCH64=0 (ARMv7) the ARM GNU toolchain is required. This can be obtained from ARM's website.

If the GCC toolchain is downloaded from ARM, you will either need it in your $PATH.

$ export PATH="$PATH:/your/path/to/arm-none-eabi-gcc/bin"

Otherwise, for AARCH64=1 Clang and LLVM is required. The default clang++ that comes with XCode developer tools works for compilation, however, llvm-objcopy and ld.lld will have to be downloaded.

QEMU is required and be downloaded from QEMU's website.

Running

Building and running is straightforward:

make            # build aarch64
AARCH64=0 make  # build armv7
make run        # after building

Using

The internal help command details what commands are available in Pinyon.

To exit, hit Ctrl-C. The exit command inside Pinyon does nothing.

Developing

A compile_commands.json file, often used by editors such as VS Code, can be generated using compiledb. You might want to edit the COMPILEDB macro in the Makefile, depending on how you installed it.

About

A toy ARMv7 and AArch64 kernel targeting the Raspberry Pi 2 and 3B.

Resources

License

Stars

Watchers

Forks