Add: initrd filesystem utilities (ls, cat) + docs

This commit is contained in:
xamidev
2024-09-05 14:59:51 +02:00
parent b59af22897
commit d2034cd68b
10 changed files with 200 additions and 3 deletions

View File

@@ -7,6 +7,7 @@
- Emulated booting in UEFI mode
- Writing programs for BlankOS
- Changing the TTY font
- Changing the initial ramdisk content
## Getting Started
@@ -119,3 +120,10 @@ readelf -s -W build/fonts/YOUR_FONT_8x16.o
Get the symbol name that ends with `_start` and replace all occurences of it in the `src/drivers/framebuffer.c` file.
Then, run `make` again and the font should have changed properly.
## Changing the initial ramdisk content
The system loads an initial ramdisk as a simple TAR file located in `iso/boot/initrd.tar`.
You can add, delete, or modify this file's contents by doing that in the `src/initrd` folder. Anything in that folder will be added to the initial ramdisk and will therefore be loaded into the system.
The ramdisk gets loaded as a GRUB2 module.

View File

@@ -113,3 +113,15 @@ Makes a cow speak!
#### `pi <terms>`
Computes Pi up to a couple of digits using the Leibniz series; takes one integer argument, the number of terms of the series to compute.
### Initrd utilities
You can browse the (really) simple TAR filesystem with the following commands:
#### `ls`
Lists all files present in `initrd.tar`.
#### `cat <file>`
Prints file content to terminal. Filename must be specified the same way as it is outputted when using `ls`.