Skip to content

0x06K/os-development

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

:)

The script (setup-tools.sh) fetches the latest GCC and Binutils from the GNU FTP, builds them from source, and installs NASM, QEMU, GDB, and Make alongside them. When it's done, you can use the Makefile to compile and run the code.

image

Usage

chmod +x setup-tools.sh
./setup-tools.sh

# to compile and run the code. i mean just read it already bruh :3
make run

Note: the image gets mounted at /mnt/os to drop user.bin into the OS image so make run will ask for sudo.

Shell Commands

You can use these commands in shell.

cat   <file>              print file contents
touch <file>              create empty file
rm    <file>              delete file
mv    <src> <dst>         rename or move file
cp    <src> <dst>         copy file
ls                        list current directory
mkdir <dir>               create directory
mkdir -p <path>           create nested directories
rmdir <dir>               remove empty directory
rmdir -r <dir>            remove directory recursively
cd    <path>              change directory
pwd                       print working directory
stat  <path>              file or directory info
find  <name>              search recursively
df                        disk free space
du    <file>              disk usage of a file
sync                      flush disk writes
echo  <text>              print to terminal
echo  <text> > <file>     write text to file
help                      show command list
clear                     clear the screen
version                   show shell version

This code may contain some bugs in rmdir command anyway code efficiency was never focus though i was just trying to learn some theoretical concepts by implementing them. Feel free to make changings in the code. I will upload the code documentation in a few days.

About

Just a tiny x86 OS with a bootloader, FAT32 filesystem, userspace shell. Supports only one process at this point.

Topics

Resources

Stars

Watchers

Forks