Skip to content
This repository was archived by the owner on Dec 25, 2025. It is now read-only.

This project was created to fix the problem of Windows' files (.exe, .dll, .pe, etc.) being incompatible with Linux/Unix files in one Operating System. Have fun digging through everything. Stay safe, stay Aspen.

License

Notifications You must be signed in to change notification settings

Aspen-Software-Foundation/VNiX-Operating-System

Repository files navigation

The V-NiX Operating System Project

This project aims to run multiple executable formats in one Unix-like Operating System (Windows' PE/COFF/EXE, Unix/Linux's ELF, etc.)

The SConscript script is a modular build system used to assemble, compile, link, and package the bootloader and related targets into an ISO image, including GPT/PMBR patching and optional QEMU emulation.


Project Overview

  • Bootloader: A bootloader that scans the root directory to locate the setup file (setup.ase) and load it efficiently.
  • Setup.ase: The main OS setup binary, carefully assembled and linked.
  • Build System: Python-like build automation for compiling assembly, C, and C++ sources, linking, creating bootable ISOs, and running in QEMU.
  • ISO Support: Custom ISO9660 generation with GPT + Protective MBR patching to ensure compatibility.
  • Emulation: Supports booting and testing with QEMU using various device types (iso, cdrom, fdd, hdd).

Key Features

  • Fast and flexible root directory scanning bootloader
  • Paged ISO Parsing which parses ISOs page by page
  • Support to load a setup.ase binary which is limited to upwards of ~500KiB in raw content size
  • Support for different boot mediums (FDD, HDD, ISO/CD-ROM, USB, etc) and different boot methods (BIOS MBR, BIOS GPT, UEFI)
  • Modular build targets with flexible per-target configs
  • Support for raw binary and ELF linked targets
  • Custom linker script and includes directory usage
  • Automated ISO image creation with GPT + PMBR patching
  • Integrated QEMU emulation options with different boot devices
  • Command-line flags for cleaning, debugging, selective builds, and minimal file operations
  • Support for aligning individual files to align boot.esp to 1MiB (Required by some UEFI implementations)

Directory Structure

/VNiX-Operating-System
|
+-- assets/ (DIR)
    +-- screenshot.png
+-- build.sh                # Build automation script
+-- boot/ (DIR)             # Bootloader source code (assembly)
|   +-- boot.asm
+-- source/ (MAIN DIR)           # Setup OS sources (C, asm)
|   +-- includes/ (DIR)          # Header files for drivers
    |    +-- arch/ (DIR)
    |       +-- x86/ (DIR)
    |            +-- gdt.h
    |            +-- idt.h
    |            +-- io.h
    |            +-- irq_pic.h
    |            +-- isr.h
    |            +-- isrs_gen.inc
    |            +-- pic.h
    |    +-- drivers/ (DIR)
    |     |   +-- encv/ (DIR)
    |     |       +-- encoding.h
    |     |   +-- fs/ (DIR)
    |     |   |   +-- fat.h
    |     |   |   +-- filesystem.h
    |     |   |   +-- fs_but_more_free.h
    |     |   |   +-- gpt.h
    |     |   |   +-- iso9660.h
    |     |   |   +-- mbr.h
    |     |   |   +-- ntfs.h
    |     |   --------------->
    |     |  +-- util/ (DIR)
    |     |  |   +-- math.h
    |     |  |   +-- memory.h
    |     |  |   +-- user.h
    |     |  |   +-- hostname.h
    |     |  |   +-- strops.h
    |     |  |   +-- hash.h
    |     |  |   +-- endian.h
    |     |  --------------->
    |     |  +-- memory/ (DIR)
    |     |  |    +-- memops.h
    |     |  |    +-- memory.h
    |     |  |    +-- paging.h
    |     |  --------------->
    |     |  +-- pci/ (DIR)
    |     |       +-- pci.h
    |     |  +-- shell/ (DIR)
    |     |      +-- terminal.h
    |     |      +-- nightshell.h
    |     |  +-- storage/ (DIR)
    |     |  |    +-- ata.h
    |     |  |    +-- atapi.h
    |     |  |    +-- sata.h
    |     |  |    +-- scsi.h
    |     |  |    +-- storage.h
    |     |  --------------->
    |     |  +-- time/ (DIR)
    |     |       +-- time.h
    |     |       +-- tsc.h
    |     |  +-- usb/ (DIR)
    |     |       +-- ehci.h
    |     |  +-- flags.inc
    |     |  +-- apic_irq.h
    |     |  +-- apic.h
    |     |  +-- keyboard_macros.h
    |     |  +-- keyboard.h
    |     |  +-- pic_irq.h
    |     |  +-- pic.h
    |     |  +-- pit.h
    |      ------------------>
    ------------------->

+-- drivers/ (DIR)    # System drivers & misc. C files
|    +-- encv/ (DIR)
|        +-- encoding.c
|    +-- fs/ (DIR)
|    |    +-- fat.c
|    |    +-- gpt.c
|    |    +-- iso9660.c
|    |    +-- mbr.c
|    |    +-- ntfs.c
|    ------------------->
|    +-- memory/ (DIR)
|        +-- memops.c
|        +-- memory.c
|        +-- paging.c
|    +-- pci/ (DIR)
|        +-- pci.c
|    +-- shell/ (DIR)
|        +-- nightshell.c
|        +-- terminal.c
|    +-- storage/ (DIR)
|        +-- ata.c
|        +-- atapi.c
|        +-- sata.c
|        +-- storage.c
|    +-- time/ (DIR)
|        +-- time.c
|        +-- tsc.c
|    +-- usb/ (DIR)
|        +-- ehci.c
|    +-- apic_irq.c
|    +-- apic.c
|    +-- keyboard.c 
|    +-- pic_irq.c
|    +-- pic.c
|    +-- pit.c
------------------->

+-- util/ (DIR)       # System utilities & runtime files
    +-- hash.c
    +-- math.c
    +-- strops.c
+-- initial/ (DIR)
       +-- entry16.asm
       +-- entry32.asm
+-- arch/ (DIR)
|    +-- x86/ (DIR)
|        +-- gdt.c
|        +-- gdt.asm
|        +-- idt.c
|        +-- idt.asm
|        +-- io.asm
|        +-- isr.h
|        +-- isr.asm
|        +-- isrs_gen.inc
------------------->
+-- linker.ld
+-- kernel.c
+-- custom_buildtools/ (DIR)    # Python toolkit for building
+-- iso/                        # Folder for staging ISO contents (auto-generated)
+-- .temp/                      # Temporary build objects (auto-generated)
+-- output.iso                  # Final bootable ISO image (auto-generated)

How to Use the Build System

Run the build script from the project root:

scons --all 

OR you could use the "build.sh" file, which compiles via argument:

scons --no-build --iso --emul=iso

Useful options:

Option Description
--only <name> Build only a specific target (e.g., setup or boot)
--clean Clean build output and temporary files before building
--keep Keep the bin/ and .temp/ directories after build (don't clean)
--no-build Skip the build step; only run ISO creation, emulation, etc.
--iso Generate the ISO image after build
--dbg Show detailed compile/link commands and progress
--minimal Move built files instead of copying to reduce duplication
--all Clean, build, create ISO, and run QEMU emulation
--emul=<type> Run QEMU with device type: iso, cdrom, fdd, hdd, hdd_sata, none

NOTE: The "--iso" argument may not work on all distributions of Linux IMPORTANT NOTE FOR ARCH LINUX USERS: You may need to use "--emul=hdd" or "--emul=hdd_sata" until we can figure out why "--emul=iso" and "--iso" do not work.


Current Build Targets

  • setup: Main OS setup loader, linked from multiple sources.
  • boot: Raw bootloader assembly binary that performs root directory parsing.

Targets are configured inside SConstruct file with options for first files, raw builds, linker scripts, and ISO paths.


A picture of VNiX post-startup, version 0.0.0.1-dev-prototype

A picture of VNiX post-startup, version 0.0.0.1-dev-prototype


Dependencies (REQUIRED)

  • Python 3.x ----| pycdlib, pyfatfs (If using FAT(12/16/32) partitons) FATtools (If using exFAT)

  • SConstruct

  • GCC toolchain (gcc, g++, ld)

  • Clang toolchain (clang, clang++, lld)

  • NASM assembler

  • QEMU for emulation/testing

  • xorriso for ISO assembly


Project Goals for the future

  • Build & Maintain a reliable Operating System for executing files of both Unix/Linux and Windows origin.
  • Offer an easy to use build system that compiles all necessary components and produces a bootable ISO.
  • Enhance drivers and user experience

License

This project is licensed under GPLv2. See to the "LICENSE" file for more information


Feel free to contribute improvements or report issues!

About

This project was created to fix the problem of Windows' files (.exe, .dll, .pe, etc.) being incompatible with Linux/Unix files in one Operating System. Have fun digging through everything. Stay safe, stay Aspen.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •