mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Some documentation/README updates
This commit is contained in:
@@ -6,40 +6,51 @@ Idk why i called it that it was 3am and i needed sleep
|
|||||||
## About
|
## About
|
||||||
Kern is a 32-bit OS based on the x86 architecture written in NASM Assembly and C.
|
Kern is a 32-bit OS based on the x86 architecture written in NASM Assembly and C.
|
||||||
I'm working on a basic command line as well as a custom filesystem (filetable for now).
|
I'm working on a basic command line as well as a custom filesystem (filetable for now).
|
||||||
|
It has a simple shell with some commands. (Use 'help' for a list of available ones)
|
||||||
|
|
||||||
More info can be found in [The Docs](./docs/main.md)
|
Since there's always more to do, here are the [todos](todo.txt).
|
||||||
|
|
||||||
_Since 32-bit switch, a lot of features have been removed because they were dependent on BIOS interrupts_
|
### Features
|
||||||
|
- Filesystem (filetable)
|
||||||
|
- Interactive Shell
|
||||||
|
- Disk I/O
|
||||||
|
|
||||||
## Usage
|
## Building & Running
|
||||||
If you want to try kern for some reason, you can.
|
If you want to try kern for some reason, you can.
|
||||||
You might be able to find some releases, or build it using the build.sh script.
|
|
||||||
|
|
||||||
For building, you'll need these tools:
|
### Tools
|
||||||
- [NASM](https://www.nasm.us/)
|
- [NASM](https://www.nasm.us/)
|
||||||
- [GCC](https://gcc.gnu.org/) on linux
|
|
||||||
- A cross compiler on mac (installation `$ brew tap nativeos/i386-elf-toolchain && brew install i386-elf-binutils i386-elf-gcc`)
|
|
||||||
- [QEMU](https://www.qemu.org/) (for emulation)
|
- [QEMU](https://www.qemu.org/) (for emulation)
|
||||||
|
|
||||||
Then just run `./build.sh` and it should build and run qemu.
|
**Unix Like Systems**
|
||||||
|
- [GCC](https://gcc.gnu.org/)
|
||||||
|
|
||||||
I personally wouldn't recommend running this on real hardware, because it's untested and will just probably break you pc, but if you really want to, you can try it, but don't blame me if something goes wrong.
|
**On MacOS**
|
||||||
|
- A cross compiler: `$ brew tap nativeos/i386-elf-toolchain && brew install i386-elf-binutils i386-elf-gcc`
|
||||||
|
|
||||||
If you don't know how to do something, try the 'help' command!
|
### Commands
|
||||||
|
```bash
|
||||||
|
$ make # Or 'make os'
|
||||||
|
$ make run # Run QEMU
|
||||||
|
```
|
||||||
|
|
||||||
|
_I personally wouldn't recommend running this on real hardware, because it's untested and will just probably break you pc, but if you really want to, you can try it, but don't blame me if something goes wrong._
|
||||||
|
|
||||||
## Some images
|
## Some images
|
||||||
|
|
||||||
Interactive Shell: \
|
Interactive Shell: \
|
||||||

|

|
||||||
|
|
||||||
Text editor **concept**: \
|
Filesystem: \
|
||||||

|

|
||||||
|
|
||||||
|
Disk R/W: \
|
||||||
|

|
||||||
|
|
||||||
_These images may be outdated, Idk_
|
_These images may be outdated, Idk_
|
||||||
|
|
||||||
## Known issues
|
## Known issues
|
||||||
- If you run the kernel.bin, loading files sorta breaks, because the program is running at 0x8000, but it thinks that it's at 0x2000 (i think)
|
- Idk, they're probably just unknown ;)
|
||||||
- If you run anything in the code editor and return to the kernel, you won't be able to load any files
|
|
||||||
- For some unknown reason, i cannot name the f\_disk.c file just disk.c. It breaks the OS. No idea why. In fact, anything starting with a character that is before f doesn't work. Help me
|
|
||||||
|
|
||||||
## [Old Version](https://github.com/Tom-on64/old-kern)
|
## [Old Version](https://github.com/Tom-on64/old-kern)
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
# kern.
|
|
||||||
|
|
||||||
Kern is a 32-bit x86 based operating system.
|
|
||||||
|
|
||||||
What does that mean?
|
|
||||||
Well, 32-bit means that it can access $2^{32}$ different memory addresses.
|
|
||||||
x86 is the processor architecture it is built upon.
|
|
||||||
|
|
||||||
## Command Line
|
|
||||||
Kern uses a shell (for now), so you'll have to type commands to do stuff.
|
|
||||||
It is currently quite simple. It supports these commands:
|
|
||||||
|
|
||||||
- clear: Clears the screen
|
|
||||||
- disk \<r/w> \<sector> [data]: Reads/Writes data from/to sector on disk
|
|
||||||
- echo \<msg>: Prints msg to the screen
|
|
||||||
- exit: Exits the shell
|
|
||||||
- help: Prints all available commands
|
|
||||||
- ls: Prints all files
|
|
||||||
- reboot: Reboots the system
|
|
||||||
- test: Tests the newest feature _Debug_
|
|
||||||
|
|
||||||
You can also print/run files by typing their filename (More in **Filesystem**)
|
|
||||||
|
|
||||||
## Filesystem
|
|
||||||
Kern has a custom filesystem. This filesystem works as a simple filetable.
|
|
||||||
It doesn't support directories at the moment.
|
|
||||||
Here's a list of supported filetypes:
|
|
||||||
|
|
||||||
| Type | Description | CLI Behaivour |
|
|
||||||
| ---- | ----------- | ------------- |
|
|
||||||
| .bin | Executable binary | Executes file |
|
|
||||||
| .txt | Raw ASCII text file | Prints out file content |
|
|
||||||
| .tab | Filetable format | Prints files in filetable |
|
|
||||||
| .dat | Data Binary | Prints HEX content of file |
|
|
||||||
| .asm | Assembly source code | Prints out file content |
|
|
||||||
|
|
||||||
### Filetable format
|
|
||||||
The filetable format (.tab) is a binary file containing
|
|
||||||
|
|
||||||
| Byte(s) | Content |
|
|
||||||
| ------- | -------- |
|
|
||||||
| 0-9 | Filename |
|
|
||||||
| 10-12 | Filetype |
|
|
||||||
| 13 | Number of filetable entries |
|
|
||||||
| 14 | Starting sector |
|
|
||||||
| 15 | File Length (in sectors) |
|
|
||||||
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 77 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 69 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 73 KiB |
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
- [ ] Multistage Bootloader
|
- [ ] Multistage Bootloader
|
||||||
- [ ] VESA BIOS Extensions
|
- [ ] VESA BIOS Extensions
|
||||||
|
- [ ] Custom font
|
||||||
- [ ] Filesystem
|
- [ ] Filesystem
|
||||||
- [ ] Filetable
|
- [ ] Filetable
|
||||||
- [ ] Files
|
- [ ] Files
|
||||||
@@ -14,5 +15,18 @@
|
|||||||
- [ ] Links??
|
- [ ] Links??
|
||||||
- [ ] Symbolic
|
- [ ] Symbolic
|
||||||
- [ ] Hard
|
- [ ] Hard
|
||||||
- [ ] Custom font
|
- [ ] System Calls
|
||||||
|
- [ ] Write()
|
||||||
|
- [ ] Read()
|
||||||
|
- [ ] Open()
|
||||||
|
- [ ] Close()
|
||||||
|
- [ ] Malloc()
|
||||||
|
- [ ] Free()
|
||||||
|
- [ ] Virtual Memory
|
||||||
|
- [ ] Paging
|
||||||
|
- [ ] User (or system) programs
|
||||||
|
- [ ] Loading them
|
||||||
|
- [ ] Running them
|
||||||
|
- [ ] Exit back to kernel/shell
|
||||||
|
- [ ] Standalone shell program
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user