Skip to content

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/AMP-Operating-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The AMPOS 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 make.py 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-based 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

/project-root
|
+-- build.py                # Build automation script
+-- boot/                   # Bootloader source code (assembly)
|   +-- boot.asm
+-- setup/                  # Setup OS sources (C, asm)
|   +-- inc/flags.inc
|   +-- initial/entry16.asm
|   +-- initial/entry32.asm
|   +-- linker.ld
|   +-- kernel.c
+-- custom_buildtools       # Python toolkit for building
+-- iso/                    # Folder for staging ISO contents (auto-generated)
+-- bin/                    # Compiled binaries output (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:

python3 make.py

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
--debug 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

Example: Clean, build everything, make ISO, and run QEMU emulating a CD-ROM:

python3 make.py --all --emul cdrom

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 make.py with options for first files, raw builds, linker scripts, and ISO paths.


Dependencies (REQUIRED)

  • Python 3.x ----| pycdlib pyfatfs

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

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

  • NASM assembler

  • QEMU for emulation/testing


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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •