How does Linux add functionality on the fly?
Вставка
- Опубліковано 22 сер 2024
- Linux Modules is how we add new devices and new features to the Linux kernel when we only want to use them selectively. Maybe one server needs them and another server doesn't. Rather than compile them into the kernel we can simply load them real time, when we need them. Today I am going to look at Loadable Modules in Linux, what came before, why we need them and how do they work. I also describe three commands for inspecting and managing modules on your system.
Cover Photo: By Maxi Gagliano - Pexels
Support me on Patreon: / djware
Follow me:
Twitter @djware55
Facebook: / don.ware.7758
Discord: / discord
Gitlab: gitlab.com/djw...
"Brightly Fancy" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons...
"Militaire Electronic" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons...
Werq by Kevin MacLeod
Link: incompetech.fi...
License: filmmusic.io/s...
Industrial Cinematic by Kevin MacLeod
Link: incompetech.fi...
License: filmmusic.io/s...
Music Used in this video
"NonStop" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
#Linux #LinuxSkills #LinuxCertification
I would never want to go back to those days where we had to keep track of interrupts and IOs and set them via jumpers on each card.
Me either or communicating with RS-232. Another place to waste tons of time.
Yes but I bet it was happy time in that moment.
yeah i remember having two sounds card (roland and a soundblaster) and setting them differently, irq 5 and 336 for the roland, didn’t need the printer
@@CyberGizmo - "... or communicating with RS-232."
* cries in Arduino.... :...-(
:D
I can still remember the days of Interrupts etc and the likelihood of problems occurring. Thanks for this.
Welcome Dezmond
Such an underrated channel :(
Thanks, DJ, this was very informative!
Hi Andrew glad you found the video of use :)
Just lovely. Thanks for this introduction. It's way more informative, compared to what other youtubers do, while just doing distrohopoing on camera :) we need more coverage of the linux kernel magic.
It migh help a bit, if a person is bit in the arduino topic, where you have to do things like I2C or SPI in order to communicate with various devices
Awesome episode, really useful troubleshooting guidelines. Thanks so much!
Thanks DJ, great video👍!
Great to watch @DJ
That was one of the "What is really in this Linux system?" questions, I wish I knew 10 years ago...
Thanks you and the google logarithms for that one.
Welcome, Ola
Two other answers to "What problems were there that kernel modules were developed and designed to solve?"...
Firstly, even in the early days, Linux supported a vast number of devices. If they all had to be compiled into the kernel, the result would be huge, bloated with vast amounts of code that the average system would never use. On the other hand, thousands of modules that are only loaded (or even built) when required results in a much more reasonably sized main kernel.
The second problem is tied to the fact that the Linux kernel is distributed under the GPL. There have always been (and still are) vendors who were unable or unwilling to release the source code for the driver for their device, or or other functionality. (ie: ZFS) The GPL is clear - if GPL code is included in a binary, then the source for *everything* in the binary must be made available. A vendor could certainly create a modified version of a monolithic Linux kernel that supported their device, or implemented their special functionality, but they would be unable distribute it without violating the GPL. Kernel modules solve this, as modules are distinct entities, and and as such can be distributed under any license preferred by the vendor, and still be legally loaded into the GPL'd kernel.
This is a great series. Thanks for putting these videos together.
Great video! Very easy to understand.
Thanks for this very informative and concise video.
Cool use of the $(cmd) syntax. I've always used backtick: `cmd` to do more or less the same thing.
Thanks!
Thanks
👍👍- Thanks !
I found a long command for listing aliases then I discovered 'alias -p' which does the same thing. Making lsmod an alias for 'lsmod | sort | more' seems useful.
Ahh yes. The good, old days of Plug & Pray hardware which was supposed to resolve conflicts automatically.
Amazing content but please put some lighting in.
Actually wrong setting on the camera, was fixed in the next video
When doing modinfo for built-in module in kernel (module compiled in kernel)
#modinfo hci_pci
filename (built-in)
And for other module (not compiled in the kernel) you would not see this "filename (built-in)".
Rather the absolut path of the module.
Great content. Though would it be possible to use the whole screen when you are showing the console? I'm sure your desktop looks awesome, but it is 100% irrelevant to the watcher. Watching your videos on a small screen like iPhone is a real pain. Most of the watchable area of the screen is wasted.
The Home key is easier/faster than left arrow key, to get to the beginning of a line - different key strokes for different folks? :)
Thank you, I finally know I pressed something and you reminded me, also doesn't page down go to the end?
I use ctrl-A. All the EMACS line maneuvering shortcuts work, and my muscle memory thanks the devs for it.
Hi. I'm running Garuda Linux, an Arch based distro. I get output from lsmod and modinfo. But I do not have a /proc/modules
Have anything to do with the fact that I'm using DKMS?
I know this is off topic, but are initial resource management numbers for Linux DE's indicative of how well resources are managed after apps and programs are added.
I wonder if you interested in making a video about Linux vs FreeBSD. Cheers,.
the dry run for remove is somewhat pointless and perhaps why it lied. The 'used by' count must be 0 and for all.
whats the point of dry run if it does something else after the dry run? lmao.
wonder how hard it would be to derive your root password from the sound of you typing it out?
Assuming I am using my root password, and assuming I dont just throw away these virtual machines when done and assuming I dont generate random keyboard noises for the video....:)
Please glaze me over. we come here for the real stuff
I see, how little I know.
This says nearly nothing about *how* Linux loads and runs these modules, like the title says
man I missed this kind of tutorials lol. Great work here, thanks!!!