[Перевод] Собираем и запускаем минимальное ядро Linux
Однажды на работе техлид порекомендовал мне проштудировать книгу Understanding the Linux Kernel Бове и Чезати. В ней рассмотрена версия Linux 2.6, сильно не дотягивающая до более современной версии 6.0. Но в ней явно ещё много ценной информации. Книга толстая, поэтому на её изучение мне потребовалось немало времени. Занимаясь по ней, я решил настроить такую среду разработки, в которой я мог бы просматривать и изменять новейшую версию ядра Linux — чтобы было ещё интереснее. Есть и другие статьи, в которых рассказано, как собрать ядро Linux. Но в этой статье я немного иначе организую и подаю информацию.
My README.md is closing in on completion - and I'm filling out #Python library/tools script in parallel so I have all batteries included.
Making final feature additions to the #Rust multi-personality binary that makes up the base system -- it poses as seven different programs #busybox style.
And I can't wait to start re-implementing it entirely from scratch again once I'm done -- splitting each service off to be coded with loving care as a stand-alone binary.
@burnoutqueen the problem is that #enforcing #copyleft doesn't get you a single line of code improvements.
In an ideal world it would, but we all know that's not the case.
Uff! This stuff is good to know:
“When You Deleted /lib On Linux While Still Connected Via SSH” [2022], Yohanes Nugroho (https://tinyhack.com/2022/09/16/when-you-deleted-lib-on-linux-while-still-connected-via-ssh/).
Via HN: https://news.ycombinator.com/item?id=43444160
On Lobsters: https://lobste.rs/s/zmgtvx/when_you_deleted_lib_on_linux_while_still
Recovering from Catastrophe: How to Restore /lib on Linux After Deletion
Accidental deletion of critical system files can leave developers in a bind. This article explores innovative recovery techniques using Bash and static binaries to restore essential libraries on a Lin...
https://news.lavx.hu/article/recovering-from-catastrophe-how-to-restore-lib-on-linux-after-deletion
@cstross isn't even joking, I think.
Both BusyBox and ToyBox actually do have an init program, a getty program, and a login program.
BusyBox also has the Almquist shell. ToyBox has a Landley shell. BusyBox even has runit.
It is possible to have a system where even if you are doing various things in a shell you're just invoking the same program image over and over, using all of the same code that is there in process #1.
@notjustbikes precisely!
Only #OpenSource & #OpenStandards can yield #MultiVendor & #MultiProvider systems necessary to prevent #monopolies and #oligopolies and enshure #ITsec, #InfoSec, #OpSec & #ComSec, thus being able to comply with #NatSec & #IntlSec demands.
Guess why #NORAD runs #BusyBox / #Linux?
@cas TBH, this actually makes sense in some #CriticalInfrastructure when someone wants to finally replace some #MOS6502-based system and chug a low-end SBC in...
And given it targets #BusyBox, I'd not be surprised if #NORAD is already looking at the code to see if they can use it...
https://www.ott.net/buildroot-initramfs/ - new post on how to use #buildroot to build a custom #initramfs
GOOOOD NEWS EVERYONE! (/ref)
#Bim (although not in #Kuroko fully but still uses Kuroko to an extent) and Kuroko itself work in #Musl on a bare kernel! I'm only using #BusyBox and util-linux (which are the only non-Kuroko tools)! Everything including the #Linux kernel is compiled to Musl.
I'm calling this Lunaris. Yes I reuse names from failed projects of mine a lot. This is very volatile. One wrong move and I need to remake the rootfs or the disk image or packages... I hate it.
@AugierLe42e I assume that port is fixed to a specific USB Hub / Controller / Port and the button is similarly linked to some GPIO / I²C / PS/2 port...
lsusb
for #USB devices and see if the specific port in question has a USB mass storage device or SATA bridge chip attached to it when said button is pressed.If #QNAP used #Linux they should've provided those drivers / scripts as part of their #GPLv2 obligations to buyers/owners of said #NAS boxes.
Either way if you can reliably identify the port & detect the button presses that should be sufficient to build like a #bash or #python script to basically detect the drive, mount it and cp -r /dev/$DRIVE/ /home/copied_drives/$LABEL/
Pretty shure you'll have to tweak a bit unless you want to use /dev/by-uuid/$UUID
and the UUIDs of the partitions as name...
I'm now gonna try Arch Linux with inits I haven't tried/not yet familiar. I'm curious how it'll all go, lol.
I'm open for any suggestions on what inits to try other than OpenRC, runit, dinit, s6, and sysvinit cos I've already done those, but I'm also open to hear your thoughts and if I should also try them on Arch as well.
#arch #archlinux #linux #opensource #freesoftware #foss #busybox #openrc #runit #dinit #s6 #s6-rc #sysvinit
With all the installations on #GNU/#Linux (servers, vms, desktop, ... ), #BSD and #Unix systems, #MacOS, #Microsoft #Windows and WLS) I feel comfortable to claim there or way more than 1 billion installations of Vi*; often without people knowing about it.
Thank you Bram Moolenaar, Christian Brabandt, the whole #Vim community, and all the people from projects like #NeoVIM, #Nvi, #Busybox #Vi, who develop and maintain their #vim flavour.
https://k7r.eu/thank-you-for-the-editor-of-the-beast/ #ilovefs
Oof, busybox's `wget` doesn't want to use certificates, so no https fetching out of the box.
Off in the weeds today looking at basing a docker image on busybox and dropbear.
@reallylazybear
#Alpine has a massive community behind it thanks to its usage in #Docker and other #container based projects. That would be my go to.
Hey #linux community, I wanna play around with more distros and stuff. Particularly ones that isn't #systemd but might use #busybox. Right now I have #voidlinux & #devuan in my head.
I mean I could just go to #distrowatch & use filters but I like hearing people's personal experience about these distros and I'll admit I'm really lazy browsing forums and discussions right now.
I've already tried #gentoo, #alpine, and #slackware. Also no #linuxfromscratch #lfs. That's for waay later taters.