File README.md added (mode: 100644) (index 0000000..bd1edba) |
|
1 |
|
This is an alternative version of sources presented as part of |
|
2 |
|
[Write Your Own OS](http://wyoos.org/) video tutorial by Viktor Engelmann. |
|
3 |
|
|
|
4 |
|
The sources were modified to be somewhat cleaner, more portable and with less |
|
5 |
|
bugs. |
|
6 |
|
|
|
7 |
|
There are still many issues and limitations and a lot of things can be improved |
|
8 |
|
in the code base. |
|
9 |
|
|
|
10 |
|
Makefile doesn't contain anything for VirtualBox and relies on qemu being |
|
11 |
|
available. |
|
12 |
|
|
|
13 |
|
### Differences from original ### |
|
14 |
|
|
|
15 |
|
* Use of C++11 |
|
16 |
|
* Use of qemu (no iso images or grub is necessary) |
|
17 |
|
* Fixed invocation of constructors of global objects |
|
18 |
|
* Set alignment for multiboot header |
|
19 |
|
* Added dependency tracking to the Makefile |
|
20 |
|
* Flags and build target for running a debugger |
|
21 |
|
* Fixed various weird or incorrect things |
|
22 |
|
* Reduced number of UBs in the code (this results in more complicated and slow |
|
23 |
|
but more correct code; plus, it was quite fun to implement) |
|
24 |
|
* Cosmetic changes like consistent naming, no commented out code, etc |
|
25 |
|
* Make keyboard and mouse work at the same time |
|
26 |
|
* No `include/` directory |
|
27 |
|
* No outermost namespace for everything (it's not a library after all) |
|
28 |
|
* Double buffering to avoid flickering of graphics |
|
29 |
|
|
|
30 |
|
### Prerequisites ### |
|
31 |
|
|
|
32 |
|
* g++ |
|
33 |
|
* GNU Make |
|
34 |
|
* qemu for i386 |
|
35 |
|
|
|
36 |
|
### Trying it out ### |
|
37 |
|
|
|
38 |
|
Starting the VM: |
|
39 |
|
|
|
40 |
|
``` |
|
41 |
|
make run |
|
42 |
|
``` |
|
43 |
|
|
|
44 |
|
Debugging: |
|
45 |
|
|
|
46 |
|
``` |
|
47 |
|
make gdb |
|
48 |
|
``` |
|
49 |
|
|
|
50 |
|
Testing network: |
|
51 |
|
|
|
52 |
|
``` |
|
53 |
|
# start one of these before running the VM in a separate terminal |
|
54 |
|
make udp-server |
|
55 |
|
make tcp-server |
|
56 |
|
|
|
57 |
|
# these can be run after VM has started (e.g. `make run; make udp-client`) |
|
58 |
|
make udp-client |
|
59 |
|
make tcp-client |
|
60 |
|
|
|
61 |
|
# open http://127.0.0.1:1234/ in a browser |
|
62 |
|
``` |
|
63 |
|
|
|
64 |
|
### Possible additions/changes ### |
|
65 |
|
|
|
66 |
|
* Virtual memory |
|
67 |
|
* User-mode |
|
68 |
|
* SMP |
|
69 |
|
* USB |
|
70 |
|
* 64-bit mode |
|
71 |
|
* Syscalls using `SYSENTER` |
|
72 |
|
* Handle loopback in IP stack |
|
73 |
|
* Graceful shutdown (ACPI) |
|
74 |
|
* Support GPT |
|
75 |
|
|
|
76 |
|
### License ### |
|
77 |
|
|
|
78 |
|
GPLv3 |