diff --git a/README.md b/README.md index 0169987..4aab291 100644 --- a/README.md +++ b/README.md @@ -6,40 +6,51 @@ Idk why i called it that it was 3am and i needed sleep ## About 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). +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. -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/) -- [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) -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 Interactive Shell: \ -![Example Shell Output](other/shell.png) +![Example shell output](other/shell.png) -Text editor **concept**: \ -![Vim like editor](other/editor.png) +Filesystem: \ +![Ls command output and some file reading](other/filesystem.png) + +Disk R/W: \ +![Disk command reading and writing](other/disk.png) _These images may be outdated, Idk_ ## 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) -- 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 +- Idk, they're probably just unknown ;) ## [Old Version](https://github.com/Tom-on64/old-kern) + diff --git a/docs/main.md b/docs/main.md deleted file mode 100644 index 350307e..0000000 --- a/docs/main.md +++ /dev/null @@ -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 \ \ [data]: Reads/Writes data from/to sector on disk -- echo \: 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) | - diff --git a/other/disk.png b/other/disk.png new file mode 100644 index 0000000..9037954 Binary files /dev/null and b/other/disk.png differ diff --git a/other/editor.png b/other/editor.png deleted file mode 100644 index 1cb60f1..0000000 Binary files a/other/editor.png and /dev/null differ diff --git a/other/filesystem.png b/other/filesystem.png new file mode 100644 index 0000000..75899b9 Binary files /dev/null and b/other/filesystem.png differ diff --git a/other/shell.png b/other/shell.png index 8ff03da..417c068 100644 Binary files a/other/shell.png and b/other/shell.png differ diff --git a/todo.txt b/todo.txt index 84bfb27..71599ee 100644 --- a/todo.txt +++ b/todo.txt @@ -2,6 +2,7 @@ - [ ] Multistage Bootloader - [ ] VESA BIOS Extensions +- [ ] Custom font - [ ] Filesystem - [ ] Filetable - [ ] Files @@ -14,5 +15,18 @@ - [ ] Links?? - [ ] Symbolic - [ ] 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