Skip to content

Commit 4ea389c

Browse files
Add README
1 parent 109fe21 commit 4ea389c

10 files changed

+164
-0
lines changed

README.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
ChaOS
2+
=====
3+
4+
[![CI](https://github.com/Filiprogrammer/ChaOS/actions/workflows/main.yml/badge.svg)](https://github.com/Filiprogrammer/ChaOS/actions/workflows/main.yml)
5+
6+
What is ChaOS?
7+
--------------
8+
9+
ChaOS is a hobbyist x86 operating system written from scratch in C.
10+
11+
Features
12+
--------
13+
14+
- Legacy BIOS bootloader
15+
- EFI bootloader
16+
- Pre-emptive single CPU MLFQ multitasking
17+
- PS/2 keyboard & mouse support
18+
- VGA text & graphics
19+
- ATA hard drive support
20+
- Floppy support
21+
- FAT file system support
22+
- ELF user programs
23+
24+
Building
25+
--------
26+
27+
*Note: It is recommended to have at least 1 GB of free storage*
28+
29+
### Clone the ChaOS repository
30+
31+
*Note: Do not clone the repository into a path containing whitespaces*
32+
33+
```console
34+
git clone https://github.com/Filiprogrammer/ChaOS.git
35+
36+
cd ChaOS
37+
```
38+
39+
### Download tools
40+
41+
#### Debian
42+
43+
Install wget and unzip if not already installed
44+
45+
```console
46+
sudo apt install wget unzip
47+
```
48+
49+
Download ChaOS tools
50+
51+
```console
52+
./download_tools.sh
53+
```
54+
55+
#### Arch Linux
56+
57+
Install wget and unzip if not already installed
58+
59+
```console
60+
sudo pacman -Sy wget unzip
61+
```
62+
63+
Download ChaOS tools
64+
65+
```console
66+
./download_tools.sh
67+
```
68+
69+
#### Fedora
70+
71+
Install wget and unzip if not already installed
72+
73+
```console
74+
sudo yum install wget unzip
75+
```
76+
77+
Download ChaOS tools
78+
79+
```console
80+
./download_tools.sh
81+
```
82+
83+
#### Windows
84+
85+
Download ChaOS tools
86+
87+
```console
88+
DOWNLOAD_TOOLS.BAT
89+
```
90+
91+
### Build image
92+
93+
#### Linux
94+
95+
```console
96+
./build_image.sh hd
97+
```
98+
99+
#### Windows
100+
101+
```console
102+
BUILD_IMAGE.BAT hd
103+
```
104+
105+
#### VSCode
106+
107+
Press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd>
108+
109+
A select dialog will appear where the configuration to be built can be selected.
110+
111+
![Build image in VSCode 1](res/build_image_in_vscode_1.png)
112+
113+
![Build image in VSCode 2](res/build_image_in_vscode_2.png)
114+
115+
![Build image in VSCode 3](res/build_image_in_vscode_3.png)
116+
117+
![Build image in VSCode 4](res/build_image_in_vscode_4.png)
118+
119+
Once a configuration has been selected, the build process will start and progress can be tracked in the bottom terminal window. The build script might also ask which user programs to build.
120+
121+
![Build image in VSCode 5](res/build_image_in_vscode_5.png)
122+
123+
Running
124+
-------
125+
126+
### QEMU
127+
128+
To run ChaOS in QEMU, just use the following script.
129+
130+
#### Windows
131+
132+
```console
133+
QEMU_BOOT.BAT hd
134+
```
135+
136+
#### Linux
137+
138+
```console
139+
./qemu_boot.sh hd
140+
```
141+
142+
### VirtualBox
143+
144+
To run ChaOS in VirtualBox, create a new virtual machine with at least 32 MB of memory and use the generated HDImage.vdi file as a virtual hard disk.
145+
146+
![Create virtual machine in VirtualBox](res/create_virtual_machine_in_virtualbox.png)
147+
148+
Debugging
149+
---------
150+
151+
### Debugging in VSCode
152+
153+
To start debugging in VSCode, press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>D</kbd> or click on the Run tab on the left. Then select a debug configuration and click the green arrow to start debugging.
154+
155+
![Debug in VSCode](res/debug_in_vscode.png)
156+
157+
During debugging, while the OS is paused, GUI tools can be launched to see, for example, which tasks are running and in which queue they are.
158+
To use that, simply type `-exec source ../../gdb_tasks_gui.py` into the Debug Console.
159+
160+
![Debug in VSCode with GDB tasks GUI](res/debug_in_vscode_with_gdb_tasks_gui.gif)
161+
162+
Another graphical debugging tool would be a tool that can be used to inspect the heap of the kernel. This can be launched by typing `-exec source ../../gdb_heap_gui.py` into the Debug Console.
163+
164+
![Debug in VSCode with GDB heap GUI](res/debug_in_vscode_with_gdb_heap_gui.gif)

res/build_image_in_vscode_1.png

20.5 KB
Loading

res/build_image_in_vscode_2.png

1.69 KB
Loading

res/build_image_in_vscode_3.png

1.37 KB
Loading

res/build_image_in_vscode_4.png

1.84 KB
Loading

res/build_image_in_vscode_5.png

18.1 KB
Loading
3.92 KB
Loading

res/debug_in_vscode.png

19.5 KB
Loading
237 KB
Loading
345 KB
Loading

0 commit comments

Comments
 (0)