Skip to content

PINAUK-OS/PINAUK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PINAUK

PINAUK Is Not an Another Unix Kernel

Yeah, it uses UEFI-SIMPLE.

Its license is in the LICENSE file.

Join the project's Discord!

Discord

What is PINAUK?

PINAUK means "PINAUK Is Not an Another Unix Kernel".

This is a kernel written in C for UEFI.

You can also contribute to this project as written in the CONTRIBUTING file.

Building and running

You can either build and run through Visual Studio or using make or non-Windows platforms (in Linux or in MinGW).

The recommended way is through Visual Studio.

The more experimental (and UNTESTED) method is with make.






How to build and run with make

Prerequesites

  • gcc/make
  • QEMU v2.7 or later
  • git
  • wget, unzip

Building

You need to initialize the git submodule either through git commandline with:

git submodule init
git submodule update

Or, if using a UI client (such as TortoiseGit) by selecting Submodule Update in the context menu. If using MinGW or Linux, issue the following from a command prompt:

make

If needed you can also add ARCH= and CROSS_COMPILE=, e.g.:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
make ARCH=aa64 CROSS_COMPILE=aarch64-linux-gnu-
make ARCH=riscv64 CROSS_COMPILE=riscv64-linux-gnu-

where can be x64, ia32, arm, aa64 or riscv64.

You can also add qemu as your make target to run the application under QEMU, in which case a relevant UEFI firmware (OVMF for x86 or QEMU_EFI for Arm) will be automatically downloaded to run PINAUK against it.

How to build and run?

Follow those instructions to ensure the kernel builds correctly:

Prerequisites

  1. Microsoft Visual Studio 2022
  2. A Git client such as GitHub Desktop
  3. QEMU v2.7 or later (NB: You can find QEMU Windows binaries here)

Compilation and testing (VISUAL STUDIO)

Testing in an emulated environment (requires prerequisite #3)

If you are using Visual Studio, press F5 to build and run the kernel in QEMU.






If you need to test it on real hardware:

Testing on real hardware

Via a script (Windows-only)
  1. COMPILE the project following Testing on real hardware
  2. Use the burnToFlash.bat to build.

Caution

DOUBLE- AND TRIPLE-CHECK WHAT YOU HAVE INPUTED! THE SCRIPT MAKES ABSOLUTELY ZERO CHECKS AND INPUTING INCORRECT DATA WILL RESULT IN A DATA LOSS!!! YOU'VE BEEN WARNED.

Manually
  1. Get a USB stick
  2. Format is as FAT32
  3. Copy the built binaries folder onto it (the entire image folder's contents (subfolders), not just the binaries).

The resulting structure should look like:

BOOT/EFI/BOOTX64.EFI (or BOOTIA32.EFI,depends on built architecture)

  1. Boot from the drive

Note about ARM/ARM64 support

Edit your current VS installation in VS Installer -> Add individual components "MSVC v142 - VS 2019 C++ ARM build tools (v14.22)" for ARM and "MSVC v142 - VS 2019 C++ ARM64 build tools (v14.22)" for ARM64.