Город МОСКОВСКИЙ
00:41:27

Creating an Operating System on C++ #1 (Remake)

Аватар
PythonQuest
Просмотры:
23
Дата загрузки:
03.12.2023 19:05
Длительность:
00:41:27
Категория:
Лайфстайл

Описание

I got many requests on continuing this tutorials, so I decided to do a remake. This is only part 1. In this video I want to show you how to create an Operating system using bare linux kernel and optimize it for your needs. I will show how to create a basic filesystem strucure and create a custom init on C++ and how to make standart libraries work.

Sorry, I haven't created a github repo yet, so I will publish all commands here:

mkdir -pv usr run tmp proc dev var etc sys boot
cd usr
mkdir -pv lib lib32 lib64 libx32 bin sbin
cd ..
ln -s ./usr/lib ./lib
ln -s ./usr/lib32 ./lib32
ln -s ./usr/lib64 ./lib64
ln -s ./usr/libx32 ./libx32
ln -s ./usr/bin ./bin
ln -s ./usr/sbin ./sbin

cp -r /lib/* ./lib
cp -r /lib32/* ./lib32
cp -r /lib64/* ./lib64
cp -r /libx32/* ./libx32

mknod -m 600 ./dev/console c 5 1
mknod -m 666 ./dev/null c 1 3

cp /boot/vmlinuz-linux ./boot/kernel
cp /boot/initramfs-linux.img ./boot/initramfs

grub-install /dev/sdb --skip-fs-probe --boot-directory=/mnt/boot

##grub config /boot/grub/grub.cfg
set default=0
set timeout=5

menuentry "DikovOS " {
linux /boot/kernel root=/dev/sdb1 rw
initrd /boot/initramfs
}

Supergrub2Disk: https://www.supergrubdisk.org/category/download/

Рекомендуемые видео