KePOS is a 64-bit operating system. Design and implement your own operating system

Related tags

Miscellaneous KePOS
Overview

KePOS

tag license centos gcc AMD

1.Introduction

KePOS is a 64-bit operating system. The purpose of this system is to combine the theoretical knowledge and practice of the operating system, and to deepen the understanding of the operating system. kePOS is suitable for people who want to understand the basic implementation of modern operating systems. It is also suitable for people who want to understand how user mode programs (compile -> link -> run on the operating system), how to switch processes, and how system calls enter the kernel and return.

KePOS implements what modern operating systems involve: memory management, device management (keyboard, mouse), interrupt and exception handling, multi-process, GUI, system calls; due to time constraints, KePOS does not implement a file system, and may be implemented later.

If you want to run KePOS or read its code, you need basic knowledge of C language and assembly language.

presention:

cHMRBV.png

2.Environment

The following is the development and deployment environment of the project:

  • Operating system used for development: centos 6
  • gcc 4.4.7
  • CPU: AMD RYZEN 5, Inter cpu is also available (compatible instructions are used)
  • Run KePOS virtual machine: Oracle VM VirtualBox

3.Directory introduction

bin directory:
  • kernel.bin:Binary file after kernel compilation
  • loader.bin:Binary file after bootloadercompilation
  • mymain.bin: Binary file of user program
bootloader directory:

​ Save the assembly source code of boot and loader, and makefile

kernel directory:

​ Save the kernel source code

user directory:

​ Save user programs and library files.

  • main.c source code of user program.
  • makefile:Used to compile and link user programs and libraries code .

KePOS_v0.1.img:The prepared floppy disk file (including: F12 file system, kernel.bin, mymain.bin, boot.bin, loader.bin) .

4.System structure

cHLtBT.gif

5.Installation

1.Quick start

In the Oracle VM VirtualBox , create a new 64-bit virtual machine (memory: 4G, including floppy disk). Download KePOS_v0.1.img and add it to the virtual machine to run the KePOS system.

Open the kePOS system and click the right mouse button to open a user process. The process can enter (w, a, s, d) on the keyboard to control the movement direction of the small square.

The window closing has not yet been realized.

2.Compile

In centos 6, make sure the gcc version is 4, then execute the following commands:

Compile to generate boot.bin and loader.bin, go to the bootloader directory, and execute:

make

Compile to generate kernel.bin, go to the kernel directory, and execute:

make

Compile and generate mymain.bin, go to the user directory, and execute:

make

3.Floppy disk image

In the directory where boot.bin is located, execute the following command, the KePOS_v0.1.img will be generated in the current directory.

dd if=boot.bin of=KePOS_v0.1.img bs=512 count=1 conv=notrunc
dd if=/dev/zero of=KePOS_v0.1.img bs=512 count=2880

4.Copy binary file to floppy disk image

You can copy the prepared KePOS_v0.1.img, loader.bin and kernel.bin, mymain.bin to the windows operating system, and then use the software WinImage to open KePOS_v0.1.img, drag loader.bin, kernel.bin, mymain.bin to KePOS_v0.1.img.

5.Virtual machine settings

  • Create any 64-bit virtual machine in Oracle VM VirtualBox.
  • The memory size of the virtual machine>4G
  • Storage contains floppy disk
  • Display controller select vboxSVGA, or vmSVGA

6.Run

  • Add KePOS_v0.1.img to the virtual machine
  • Click to start the virtual machine to run the system.

6.Improve

The file system function has yet to be realized.

The GUI function needs to be improved.

There are few types of user programs and need to be added.

7.reference

《操作系统概念》第七版

《一个64位操作系统的实现》田宇

《Linux 内核完全注释》赵烔

《AMD64 Architecture Programmer’s Manual: Volumes 1-5》

More detailed documentation

You might also like...
Program that allows you to get the source code of a website's home page without doing it manually. Use it at your own risk.

Website-Homepage-Grabber Install one of the folders x64 or x32 if the program doesn't work(probably because you don't have visual studio installed) If

A step by step example of creating your own React Native TurboModule.

Discovering Turbo Modules Note: This example was made in RN 0.63. Some things have changed since then, but the good news is that now the setup should

All-in-One firmware for your 32-bit Prusa MK3S/+ Bear!
All-in-One firmware for your 32-bit Prusa MK3S/+ Bear!

Prusa All-in-One Marlin Firmware About All-in-One firmware for your 32-bit Prusa MK3S/+ Bear! Configuring & Building Prusa All-in-One Firmware To conf

Shell program written in C to implement various system calls, with support of executing commands, output redirection and signals.

Use ./shell command to start the shell. $spacepath/executable to run the executable(please specify the path without beginning it with "/"). Eg. type

A program to backup all of your game savefiles on your system, neatly, and into a single folder.

Savefile Saver I created this project as a solution to a simple, but annoying problem: Backing up my game savefiles. I wanted to be able to copy all o

MAXREFDES1277 is a reference design that enables the evaluation of MAX17853/52 for battery management in a 48V system.
MAXREFDES1277 is a reference design that enables the evaluation of MAX17853/52 for battery management in a 48V system.

MAXREFDES1277 The MAXREFDES1277 reference design enables quick evaluation of MAX17853/52 for battery management in a 48V system. It can be used to tes

Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

Library to manage and implement achievements in a game.

Achieve Library to easily implement achievements in a game. Every achievement is described as a combination of properties (which are counters) guided

RV-Debugger-BL702 is an opensource project that implement a JTAG+UART debugger with BL702C-A0.
RV-Debugger-BL702 is an opensource project that implement a JTAG+UART debugger with BL702C-A0.

BL702 is highly integrated BLE and Zigbee combo chipset for IoT applications, contains 32-bit RISC-V CPU with FPU, frequency up to 144MHz, with 132KB RAM and 192 KB ROM, 1Kb eFuse, 512KB embedded Flash, USB2.0 FS device interface, and many other features.

Releases(v0.1)
Owner
null
C/C++ Application to solve irrigation rotation whatever two-turn rotation or three-turn rotation, longitudinal section design, hydraulic calculations, and design of hydraulic structures like weirs and tail escape.

Irrigation works C/C++ Application to solve irrigation rotation whatever two-turn rotation or three-turn rotation, longitudinal section design, hydrau

Mohamed Jamal Ghayyad 1 Jun 24, 2022
A video input (V4L2) to NDI converter that works with Raspberry Pi (32-bit and 64-bit), and Intel/AMD CPUs

V4L2 to NDI V4L2 to NDI is an application that connects to attached V4L2 devices and encodes the video signal into NDI It uses the NDI library, allowi

Luke Plassman 49 Nov 12, 2022
A program for converting instructions from Ben Eater's 8 Bit computer design to binary.

8Bit-Assembler A program for converting instructions from Ben Eater's 8 Bit computer design to binary. We used C because is used for it's mid-level-ne

Marek Borik 2 Nov 21, 2021
MyOwnBricks - A library for building your own sensors and devices compatible with the modern LEGO PoweredUp system.

English version (See at the end for the French version) MyOwnBricks MyOwnBricks is a library for building your own sensors and devices compatible with

null 5 Sep 26, 2022
A 32-bit multitasking Operating System

Tangent-Kernel This is 32-bit kernel Made for tangent OS with the following features: 1. VFS 2. Basic Drivers(Screen,PIT,Keyboard) 3. Ramdisk Support

sheispeko 10 Mar 28, 2022
NanoShell 3rd Edition is a preemptively multi-tasked 32-bit operating system with a windowed GUI

NanoShell NanoShell 3rd Edition is a preemptively multi-tasked 32-bit operating system with a windowed GUI. Be advised that this is UNFINISHED/beta-wa

iProgramInCpp 81 Nov 6, 2022
A continuation of FSund's pteron-keyboard project. Feel free to contribute, or use these files to make your own! Kits and PCBs are also available through my facebook page.

pteron-pcb Intro This project is the evolution of the Pteron-Keyboard project, an incredible ergonomic keyboard that was handwired only. I aimed to in

null 17 Oct 11, 2022
Control Heidelberg Wallbox Energy Control over WiFi using ESP8266 and configure your own local load management

< scroll down for English version and additional information > wbec WLAN-Anbindung der Heidelberg WallBox Energy Control über ESP8266 Die Heidelberg W

null 88 Nov 27, 2022
Bring your own print driver privilege escalation tool

Concealed Position Concealed Position is a local privilege escalation attack against Windows using the concept of "Bring Your Own Vulnerability". Spec

Jacob Baines 213 Nov 19, 2022
A fully customisable assembler for your own instruction sets

CASM A fully customisable assembler for your own instruction sets! What Is CASM? ?? Documentation ?? Command-Line Usage ?? How To Install CASM ?? Buil

Sjoerd Vermeulen 2 May 7, 2022