Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
When i do "make menuconfig" and i configure the some driver as "M"
during kernel compilation i am getting like this in one of the line (output during make)
LD drivers/usb/gadget/built-in.o
I was not getting .ko files. Now the thing is when i loaded the kernel image on to board, How do i load this driver as i configured the driver as "M" during kernel config.
It would also help if you'd add your distro to your options, or wherever it is, like the others users have. The reason is that there is at least Debian and its derivatives that do things a bit differently. I've posted Debian related instructions several times only to find out that the OP needed to use the instructions as posted above.
It might help to consider just what these various "make" commands need to ultimately do. In other words, "exactly what do I need to somehow accomplish, in order to build an operating-system kernel that works?"
The kernel is an intricate piece of software that's designed to run on lots of types of hardware. But the only software that you actually need to build is whatever your system requires. That's the whole point of "configuration." Those hundreds of options, embodied in the hidden file .config, determine exactly what source-code is, and is not, compiled to make your kernel.
Linux uses a modular kernel. Modules can be loaded and unloaded on-demand. Nevertheless, all of the modules must be built, so that at the end of the kernel compile you have not only the always-resident kernel portions but also the modules ... all freshly compiled.
Believe it or not, when a kernel-compile is finished, you've got a fairly ordinary object-file on your hard disk... but, that alone isn't enough to get that software into memory where it needs to be. Because the kernel's job is to create the system environment, it (alone) cannot rely on that environment. The kernel uses a special loading process to get itself into memory. This means that, somehow, all of the file-setup necessary to do that must somehow be done. If the kernel includes modules, those also must be put into the proper locations so that it all "just works."
The Linux kernel is an intricate program, certainly, but it's not a particularly large one. What's really special about it is: the role that it plays in the grand scheme of things, and the rather peculiar way that it gets loaded into memory and initialied when you first start your computer. (The computer really does "pull itself up by its own boot straps..." ) These mechanisms are somewhat esoteric, as they are used nowhere else, but they actually make perfect sense once you understand them. Try to "get the big picture," because once you "see" that, everything else falls into place.
Last edited by sundialsvcs; 08-05-2009 at 09:43 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.