Skip to content

eden881/tinylinux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

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