Making Minimal Linux Distro with Buildroot
Ғылым және технология
In this video I will demonstrate how you can use Buildroot to create a simple x64 Linux distro
Dependencies (Ubuntu packages):
apt install g++ make libncurses-dev unzip bc bzip2 libelf-dev libssl-dev extlinux
Пікірлер: 95
Dang, my man makes building an entire operating system look easy between this and his last custom Linux episode.
It has been 0 days since I recompiled the Linux kernel.
@AggamRahamim-fs2zm
14 күн бұрын
gentoo user spotted
I had no idea this even existed. I started LinuxFromScratch and just lost interest. But this is 10 minutes start to finish.
@Maxjoker98
Ай бұрын
Haha, true. Although you learn a lot more by doing LinuxFromScratch, for example how all the compilers, build systems, etc. work.
@Nunya58294
Ай бұрын
Yeah man LFS is if you really want to get into how GNU and Linux works
@Maxjoker98
Ай бұрын
@@Nunya58294 It's true, but as said before, it's a lot since explains every step and you build a very conventional distro/installation(glibc, dynamic linked, etc.). This is both a strength and a weakness. If you just want to **create** a minimal bootable Linux image with some tools, probably choose buildroot. If you want to learn how to do it, I'd recommend statically compiling busybox and creating an initrd first. Way less effort for a basic DIY bootable system(just compile this one application and create a file system). But if you want a deep understanding(no shortcuts) of how everything comes together in a Linux distro, LFS is the way to go. I've personally never sat through the entire LFS from start to finish, but I've used it as a reference a lot, for example for setting up toolchains, filesystem hierarchy, etc., and I've created lots of single-purpose Linux distros/initds, from bootable games to rescue tools and testing android kernels.
@trickeddev
26 күн бұрын
i think this is compiling the entire linux kernel too so 10 minutes + like 2 hours lol
Buildroot is pretty fun, a while ago I used a buildroot-based system as my "game engine"(Linux kernel, Lua "userland" using framebuffer graphics, uinput). You should have included some mention of the various ways you can include files in the final rootfs, for example overlay directories or custom buildroot packages. Also you don't have to manually create a bootable disk image, buildroot has support for creating grub(2)/extlinux/isolinux(including needed configs), or you could directly boot a kernel+initramfs in QEMU(no bootloader).
It's incredible what can be done nowadays with Linux and the way Linux is designed, keeping its simplicity makes it all much more comfortable when you really understand the concepts
finally, a way to utilize my computer truely bloatless.
@thestickmahn2446
27 күн бұрын
vi is bloat, manually edit the files by using a magnet next to your hdd.
@connorspruit6002
27 күн бұрын
@@thestickmahn2446 you have just invented more than you realize. using this method we dont need an os at all anymore. heck. we dont need a computer anymore all we need is a hard drive, a magnet, a sata breakout board, a power supply and a piece of mettle, just connect the power and then bride the pins of the sata to write. and maybe use some led's to read. or just use paper
@DeVibe.
26 күн бұрын
@@thestickmahn2446or zap his SSD
Another fun, easy to follow tutorial on building a minimal distro and yet another project I will be completing in the near future. Thanks and keep up the great work, Nir!
You are a perfect programmer!! I didn't see anybody do video like this, making a lot of video on C, or debugging Windows Kernel. Please continue your videos!!!
So glad I found this channel. Somehow, youtube algo got it right this time and recommended me something really good.
Amazing video as always!! I didn't know before, that you can boot linux without an initrd...... but it makes sense, that you can, if all drivers to mount the rootfs are in the kernel. Learned something new today😃
Love me some buildroot. did the arm kindle stuff a decade? back. Top work
Oh damnnn I was recently looking to perhaps make my own very lightweight distro for an ARM based SBC. This looks really really simple too! Thank you very much :)
would you do a video about custom compiling Debian?
@nirlichtman
Ай бұрын
Planned :)
@nou712
Ай бұрын
@@nirlichtman Can't wait :)
this is one of the first tutorials I've ever seen that gets straight to the point and shows you every single detail you need and nothing that you don't. I wish this guy did tutorials on everything , it would save so much time.
Hi future me, you are proud that you subscribed before 50k subscribers to the best tutorial channel.
This is actually pretty interesting. It all began with Linux from Scratch, now we're just 10 minutes to make a simple distro.
Love your video, i work as a web dev, but i watch your video for fun.
That was even faster and easier than Rob Landley's video on a minimal Linux, nice!
Underrated Channel for sure 👍
Love it. Definitely gonna try to substitute busybox with uutils/coreutils. any recommendations?
One of the best video on internet
great video as always!
Any plans on covering the basics of the yocto project in the future?
I have said it earlier. i will say it again. THIS CHANNEL IS A GOLDMINE.
cool. no flashy splashes or stalling. subscribing
This is super cool! But how are you going to manage packages? I would love to see this series continued, thank you very much!
@nirlichtman
Ай бұрын
You can add packages during the build by customizing the buildroot settings, I think you can also add a simple package manager with the buildroot settings but I haven't tried that yet.
Could you run top on the guest machine you made? What was the RAM usage?
holy holy i want to absolutly do dispicable things i finally got my own distro thank you thank you thank you
Awesome Video. I just want to know about, how i add UI stuffs into this ?
Amazing!
Always wondered how distro mantainers like debian or canonical manage all their package and build stable versiones. What kind of integration testing they do
buildroot very good toolkit, but i have 1 question - how change default prefix in buildroot from / to /opt as it changed in entware?
Super cool video :)
Awsome! Thanks!!!!
Thanks!
What about just cooking up a gentoo and then just use qemu to squeeze it down and push it?
can you show us how to install a package manager on such a distro like this
Any thoughts on T2 Linux 24.5?
You should make a guide on how to make a Wayland compositor with c.
Nice, how to install security fixed and upgrades on this distro?
What boggles my mind is how yocto took over when buildroot was out there. Super easy buildroot, yocto SUPER TOUGH to master.
Beats using loopback and lilo!
Fun fact . The build time is from 9:56pm to 11:06 pm, aka 70 minutes. Only do this if you have time to spare
How big is the image?
Make series where you eventualy make a complete desktop usable distro
So what's next? Yocto?
💖💖💖💖
You got your shell up and running, but can it run DOOM?
Cool
cool
On the dead homies this is some cool shit. Subscribed
What is the difference between buildbox and buildroot?
@nirlichtman
Ай бұрын
You mean BusyBox? The difference is that Buildroot is a system to help build full Linux systems and BusyBox is a minimal all in one program that contains a bunch of standard Unix tools in one executable
@mythacker4365
Ай бұрын
@@nirlichtman oh yeah my bad! Thanks for the explanation ❤️
Does this mean I can "make" my own Linux distribution for my old Pentium 2 ??
@nathanb011
Ай бұрын
Naturally!
What is the difference between bzImage and rootfs?
@nirlichtman
Ай бұрын
bzImage is the kernel binary compressed and rootfs is the tar archive of the files of the distro
Why is buildroot suddenly a minor trend 90% of my recommendations are about buildroot
This is quite neat though never practical for a desktop. Which is unfortunate given how neat it sounds to fully build your own distro
how can we implement uefi boot using buildroot?
@gerolifium
Ай бұрын
i am currently compiling buildroot after navigating cluelessly through the menuconfig and enabling support for iw(,d), nano, uefi using grub, ext4 filesystem, htop, git, and other stuff i forgot. I hope i can succeed.
after running `make make`, the /output/images dir is empty
@samuelhulme8347
Ай бұрын
You have to run `make`. `make make` won’t do anything and was not demonstrated in this video.
@ProSureStrings
Ай бұрын
@@samuelhulme8347 yeah, sorry. I misunderstood.
Yey :D
@ProSureStrings
Ай бұрын
Another great video for me to watch :D
Next up, how to implement networking into TempleOS.
Make a minimal mail server, please!
@nirlichtman
Ай бұрын
Planned :)
Fix you path? No you fix escape.
how to install distro ?
@shellgecko
Ай бұрын
make or grab an installer (calamares, anaconda, etc) to make it copy all the files and configs to a storage device or make a chroot env like arch or gentoo and do it manually
make a package manager and repository now
Sending email with c please 😢
I run my own distro > I run arch btw
why are you using windows & edge? kinda cringe
@jackkendall6420
Ай бұрын
Presumably because WSL means that it's easier to do Linux things on a Windows install than it is to do Windows things on a Linux install. And he's clearly interested in both OSs
please dont use msedge
Amazing!