Galaxy OS
Introduction
“Galaxy OS” is a simple OPERATING SYSTEM written in ASSEMBLY LANGUAGE. The main task of this OS is to display the hardware information of your personal computer where you run this operating system.
The main task of this OS is to display the hardware information of your personal computer where you run this operating system. This OS only shows hardware information only.
Here i have developed this operating system that enables the capability to boot this OS through CD rom, USB, floppy disk or can be run this OS in a virtual machine box on linux or windows.
Pre-requisites
Basic knowledge of assembly language.
mkisofs — This is to generate a CD-ROM ISO image of AMOS
sudo apt-get install cdda2wav cdrecord mkisofs
NASM — This tool can be installed using terminal in Ubuntu following code.
sudo bash apt-get install nasm
QEMU — This is an emulator and this is to run .flp/.iso file that we needed. Code to install this tool is,
sudo bash apt-get install qemu-system-x86
Above mentioned tools should be installed prior to coding of OS.
Steps
These are the most important files and directories in the AM_OS folder which contains:
- source/ — Contains the entire OS source code.
- source/bootload/ — Source to generate BOOTLOAD.BIN, which is added to the disk image when building.
- source/features/ — Components of AMOS such as keyboard and screen.
- source/kernel.asm — The core kernel source file, which pulls in other source files.
- programs/ — Source code for programs added to the disk image.
Codes
All code lines for this OS can be obtained from HERE
Building
To build AMOS, open a terminal and switch into the expanded AMOS package. Then enter following code in terminal:
sudo bash ./build-linux.sh
In here sudo bash is required to get root access.
This will use NASM to assemble the bootloader, kernel and supplied programs, then write the bootloader to the amos.flp floppy disk image in the disk_images/ directory.
Next, the build script loopback-mounts the amos.flp image onto the file system — in other words, mounting the image as if it was a real floppy.
The script copies over the kernel (kernel.bin) and binaries from the programs/ directory, before unmounting the floppy image.
With that done, the script runs the mkisofs utility to generate a CD-ROM ISO image of AMOS, injecting the floppy image as a boot section.
So we end up with two files in the disk_images/ directory: one for floppy disks and one for CD-Rs.
Running the OS
Now we can now use amos.iso /amos.flp in an emulator or on a real PC. In here we used qemu for this and code for that is (when we are using qemu ):
sudo bash qemu-system-x86 -soundhw pcspk -drive format=raw,file=disk_images/amos.flp,index=0,if=floppy
If we are running this OS in windows we can use virtual box and amos .iso