Tag Info

Hot answers tagged

19

A kernel module is a bit of compiled code that can be inserted into the kernel at run-time, such as with insmod or modprobe. A driver is a bit of code that runs in the kernel to talk to some hardware device. It "drives" the hardware. Most every bit of hardware in your computer has an associated driver[*]. A large part of a running kernel is driver code; the ...


16

When the kernel is tainted, it means that it is in a state that is unsupported by the community. Most kernel developers will ignore bug reports involving tainted kernels, and community members may ask that you correct the tainting condition before they can proceed with diagnosing problems related to the kernel. In addition, some debugging functionality and ...


13

To get this information from sysfs for a device file, first determine the major/minor number by looking at the output of ls -l, eg $ ls -l /dev/sda brw-rw---- 1 root disk 8, 0 Apr 17 12:26 /dev/sda The 8, 0 tells us that major number is 8 and the minor is 0. The b at the start of the listing also tells us that it is a block device. Other devices may ...


9

It is, unless your root volume is on an LVM, on a dmcrypt partition, or otherwise requires commands to be run before it can be accessed. I haven't used an initrd on my server in years. You need at a minimum these modules built in: the drivers of whatever controller where your root volume disk lives the drivers necessary to "get to" that like PCI, PCIe ...


8

Finding the Kernel Driver(s) The victim device $ lsusb Bus 010 Device 002: ID 046d:c01e Logitech, Inc. MX518 Optical Mouse Bus 010 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply We're going to try to find out what driver is used for the APC UPS. Note that there are two answers to this question: The driver that the kernel ...


8

I have two suggestions to start. The first you're not going to like. No matter how stable you think your overclocked system is, it would be my first suspect. And any developer you report the problem to will say the same thing. Your stable test workload isn't necessarily using the same instructions, stressing the memory subsystem as much, whatever. Stop ...


8

There are pretty good directions on doing it here, titled: Disable / enable keyboard and mouse in Linux. Example You can list the devices with this command. $ xinput --list "Virtual core pointer" id=0 [XPointer] "Virtual core keyboard" id=1 [XKeyboard] "Keyboard2" id=2 [XExtensionKeyboard] "Mouse2" id=3 [XExtensionKeyboard] And ...


7

For the first part of the question, I've looked and couldn't find a better way to detach a USB driver than what you're already doing with libusb. As for the second part of the question, udev can react to driver loading, but not force a specific driver to be assigned to a device. Every driver in the Linux kernel is responsible for one or more devices. The ...


6

First things first, debug the module? Just see if you can load it up in gdb it might point you straight at a line that uses the relevant variable(or close to it). oh, and you might find this article useful


6

A patch or a git pull request is submitted with a request for comments. This is sometimes done to the kernel mailing list, but is frequently done on other lists pertaining to the subject of the patch first. Sometimes discussion about a proposed module is brought up before any code is even written. People ask why the patch is necessary, state their ...


6

There are many kernels in existence. Linux is not the only game out there, but it's the most widely used. Some people recommend the minix kernel to understand operating system concepts. I would go with Linux 2.6.x series as it's the most common and it won't be wasted on something (almost) nobody uses. Solaris, XNU (Mac), FreeBSD and Dragonfly are ...


6

Have a look at the CONFIG_FIRMWARE_IN_KERNEL, CONFIG_EXTRA_FIRMWARE, and CONFIG_EXTRA_FIRMWARE_DIR configuration options (found at Device Drivers -> Generic Driver Options). The first option will enable firmware being built into the kernel, the second one should contain the firmware filename (or a space-separated list of names), and the third where to look ...


6

I found the following answer here: The short answer is that the .ko file is your object file linked with some kernel automatically generated data structures that are needed by the kernel. The .o file is the object file of your modules - the result of compiling your c files. The kernel build system then automatically creates another C file ...


5

Firstly: For the baby stages, writing various variations on "hello world" modules, and virtual hardware drivers, are the best way to start (real hardware introduces real world problems best faced when you have more of an idea what you are doing). "Linux Device Drivers" is an excellent book and well worth starting with: http://lwn.net/Kernel/LDD3/ LDD ...


5

Find a module or driver you want to modify or start with a null / hello world type of module and build from there. Specifically work with a module because it will allow you to load, unload, recompile and reload the code into a running kernel. Later you can get into the core bits, but basically modules have all kinds of and you can do pretty much whatever you ...


5

The modules listed in /etc/mkinitcpio.conf are included in the intitrd when it is generated with mkinitcpio -p linux. This loads the temporary filesystem into memory, and needs to include modules necessary to create this successfully, depending on your setup. An example would be adding raid1 to your modules line in /etc/mkinitcpio.conf to assemble a Raid1 ...


5

Just go to your kernel source directory, make the changes you want, and make, then make modules_install. That's all it takes. If you want to build only one specific module, use: make M=path/to/module/directory For instance (from the kernel toplevel directory): make M=fs/ext4 make M=fs/ext4 modules_install To activate the changed modules, you must ...


5

It is not possible because system call table (called sys_call_table) is a static size array. And its size is determined at compile time by the number of registered syscalls. This means there is no space for another one. You can check implementation for example for x86 architecture in arch/x86/kernel/syscall_64.c file, where sys_call_table is defined. Its ...


5

Your nvidia module is perfectly loaded and working. The problem lies in modinfo. modinfo fetch the list of known modules by reading the /lib/modules/$(uname -r)/modules.* files, which are usually updated with depmod. If depmod -a has not been run after installing the nvidia module, then modinfo does not knows about it. This does not prevent anybody from ...


5

You can find the answer in the wiki: the idea is that one does not use /etc/modprobe/blacklist.conf. Instead, say you want to blacklist pcspkr. You create a pcspkr.conf file in /etc/modprobe and put blacklist pcspkr inside. Then run depmod -ae && update-initramfs -u


5

Kernel modules (which you see under /proc/modules) are part of the Linux Kernel and needed for hardware support (like device drivers) or some other operating system feature. Loadable kernel modules in Linux are loaded (and unloaded) by the modprobe command. They are located in /lib/modules and have had the extension .ko ("kernel object"). You don't deal with ...


4

I'm one of the authors of that patch, sorry it is so buggy :) In general to find null pointers like this I just insert printks until I find the pointer that is null (=0), then I read the source code until I find out why. However in this case I know that you have to disable framebuffer console or you'll get this nasty bug, which is only triggered when the ...


4

If you are working on a kernel module, I very much recommend that you get a git tree. Obviously Linus's tree is mandatory - I also get the stable trees. Since you are working on Ubuntu, I'd check to see if they have a tree with their changes you can pull from. Using the git tree, I was able to checkout master and run git blame drivers/input/input.c to see ...


4

Place your module in /lib/modules/2.6.32-5-xen-amd64/updates/ (make the directory if it doesn't exist) and re-run dpkg-reconfigure linux-image-2.6.32-5-xen-amd64 (or just run depmod if you know how). Check that the new driver is found with modprobe -l tg3. Read man 5 depmod.conf for more details.


4

It varies, sometimes the dependencies of a kernel module has changed too much but for the wacom module it does not matter. By the way, you can get the wacom kernel module source from http://sourceforge.net/projects/linuxwacom/. I recommend you to use DKMS for building custom kernel modules. I've packaged a package for Ubuntu: ...


4

You lack the make command. Make is a utility that is often used to build programs from source; it runs the compiler on every source file in the right order. You need to install the make package, and possibly others: the C compiler, and the kernel headers (files generated during the compilation of the Linux kernel, that are necessary to compile third-party ...


4

If you have a /proc filesystem, the file /proc/modules exists if and only if the kernel if compiled with module support. If the file exists but is empty, your kernel supports modules but none are loaded at the moment. If the file doesn't exist, your kernel cannot load any module. It's technically possible to have loadable module support without /proc. You ...


4

To answer your specific question about the lspci output, the "kernel driver" line refers to which driver is currently bound to the card, in this case the proprietary nvidia driver. The "kernel modules" line lists all of the drivers known to be capable of binding to this card. Here, the proprietary driver shows up it a different name, probably due to how ...


4

The 'best' way to do this, is building it as a package. You can then distribute and install it to any Ubuntu machine running the same (major) version. For building vanilla kernels from source, there's a tool make-kpkg which can build the kernel as packages. Other major advantages: easy reverting by just removing the package, automatic triggers by the ...


4

Ok, I see some possibilities: The quickest way, the whole point of POSIX permissions and ownership: you want someone to be able to read and/or write, you set the permissions accordingly. Just put these people in a group and change the device ownership to that group, giving the group write permissions. You may have to put this in udev rules, if your /dev ...



Only top voted, non community-wiki answers of a minimum length are eligible