Skip to content

eden881/tinylinux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bda44ba · Jan 20, 2025

History

2 Commits
Jan 20, 2025
Jan 20, 2025
Jan 20, 2025
Jan 20, 2025
Jan 20, 2025

Repository files navigation

tinylinux

This project is heavily inspired by Nir Lichtman's awesome YouTube video about hacking your own tiny Linux kernel with a static init userspace.

Dependencies

For Ubuntu on WSL 2:

sudo apt install make build-essential flex bison libncurses-dev libelf-dev cpio syslinux isolinux genisoimage

Building the kernel

Use the tinyconfig option along with the other config options shown in the video.

Building the userspace

gcc -c userspace.c
as sys.S
ld -o init userspace.o a.out --entry main -z noexecstack
echo init | cpio -H newc -o > init.cpio

Packaging the kernel and userspace

make isoimage FDARGS="initrd=/init.cpio" FDINITRD="~/tinylinux/init.cpio"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published