Create your own Operating System
I’m really happy thrilled to introduce a new Operating System called Dragon OS. Dragon OS is a simple operating system written completely from the ground up which shows hardware features of the computer.You can check the given source at https://github.com/sanjula97/CustomOS .
Requirements
To develop this operating system several development tools are required.
sudo apt-get install build-essential qemu nasm
This command helps you to get you the development tools required, QEMU PC emulator and the NASM assembler, which converts assembly language into raw machine code executable files.
Building the Dragon OS
To build the Dragon OS I mainly used the Mike OS and removed the unnecessary features of the Mike OS and combined it with Josh OS which has the capability of showing the hardware details.
First open a terminal and switch into the expanded DragonOS package. Enter sudo bash in Ubuntu-flavoured distros to switch to the root user. Then enter;
./build-linux.sh
This will use NASM to assemble the bootloader, kernel and supplied programs, then write the bootloader to the dragonos.flp floppy disk image in the disk_images/ directory. After that, the build script loopback-mounts the dragon.flp image onto the filesystem that means mounting the image as if it was a real floppy. The script copies over the kernel and binaries from the programs/ directory, before unmounting the floppy image. After doying that done, the script runs the ‘mkisofs’ utility to generate a CD-ROM ISO image of DragonOS, injecting the floppy image as a boot section. So we end up with two files in the disk_images/ directory;
- Floppy disks
- CD-Rs
Now you can use them in an emulator or on a real PC.
Then enter:
qemu-system-i386 -soundhw pcspk -drive format=raw,file=disk_images/dragon.flp,index=0,if=floppy
Appearance of the “Dragon OS”
*To shut down press the escape key.
*Enabled keys are Arrow keys,Enter and escape key.
*BIOS service interrupts/processor and hardware interrupts are used to display hardware information.
- Hard Drive information
- CPU Interrupts
- Base memory information
- BIOS Interrupts
Hardware interrupts are mainly used by devices to communicate that they require attention from the Operating System. They are implemented using electronic alerting signals that are sent to the processor from an external device, which can be either a part of the computer itself. They have a direct line to the processor through an interrupt request line.
Thank You for taking time to see my blog and hope you all enjoyed and learned something. Please comment your suggestions and any questions you have to ask about this blog.