An Operating System based on x86-64 architecture.
-
Before building our OS and make final image, we need a blank hard disk image, We will use
bximage
to make it with:- Size 100 megabytes.
- Sector size is 512 bytes.
- Kind of image is
flat
.
-
this is done by run image.sh script, the output image is
boot.img
file.
- The OS using make to build final image.
-
To simulate the OS, we can use Bochs x86 Emulator 2.7, first generate a bochs configuration file (this is done automatically by run image.sh script). And then,
make
to build our OS. And finally runbochs
command to start simulating. -
The second option to simulate our OS is using QEMU, after build our OS with
make
, simply run command:qemu-system-x86_64 -cpu qemu64,pdpe1gb -hda boot.img
mount -t vfat boot.img /mnt/d/
- Build & Mount image to the OS & Running:
make run
- System booting look like:
- List files in root directory with
ls
command:
ls.bin
- You can create, edit, delete files on the image via command in your host, because the image was mounted to
/mnt/d
directory. For example:
echo "Test file system" > /mnt/d/test.doc
- After that check the file content by our OS cat command:
cat test.doc
- And also, you can run binary files by specifying the file name. For example, we need to run
process4.bin
program:
process4.bin
- In addition, we have many features waiting for you to experiment :).
- After build the OS, copy our image to the USB device:
sudo dd if=boot.img of=/dev/sdb
- Plug the USB to your machine, booting it with the USB.
- Please build program with our C/C++ runtime library.