Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
48
rated 0 times [  48] [ 0]  / answers: 1 / hits: 86736  / 2 Years ago, sat, july 30, 2022, 9:52:39

The linux-source-... has a module which is disabled in the config /boot/config-3.4-trunk-686-pae so that it is not part of linux-image-... (This is on Debian, but the solution should be the same for Ubuntu, or?), e.g.



# CONFIG_CAN_PEAK_USB is not set


How would one compile just that kernel module, so that it can be used with the distributed kernel?



The respective linux-source-... package is already installed, uncompressed and linked to /usr/src/linux. /boot/config-3.4-trunk-686-pae is copied to /usr/src/linux/.config and modified with



CONFIG_CAN_PEAK_USB=m


With



make
make modules


it is possible to compile the kernel and all modules. But how would one compile only that specific single module?



(Note: also the kernel needs to be compiled before, otherwise you get the following error: no symbol version for module_layout)


More From » kernel

 Answers
3

I had the same problem. I assume that you need not only to copy .config but also Module.symvers



my steps to compile module ft1000 (running Debian Wheeze 7.1.0; kernel 3.2.0-4-686-pae):



aptitude install linux-headers-3.2.0-4-686-pae
aptitude install linux-source-3.2
cd /usr/src/
tar xjf linux-source-3.2.tar.bz2
cd /usr/src/linux-source-3.2
cp ../linux-headers-3.2.0-4-686-pae/Module.symvers .
make oldconfig # it copies .config to ./
vi .config # enable ft1000 module: CONFIG_FT1000=m
make prepare # setup FT1000 as module
make modules_prepare
make SUBDIRS=scripts/mod
make SUBDIRS=drivers/staging/ft1000/ft1000-usb modules
cp drivers/staging/ft1000/ft1000-usb/ft1000.ko /lib/modules/3.2.0-4-686-pae/kernel
/drivers/staging/
depmod
modprobe ft1000

[#36574] Sunday, July 31, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
whoppinolo

Total Points: 93
Total Questions: 113
Total Answers: 107

Location: Cyprus
Member since Mon, Oct 24, 2022
2 Years ago
whoppinolo questions
Tue, Feb 14, 23, 08:30, 1 Year ago
Wed, Sep 28, 22, 06:56, 2 Years ago
Fri, May 27, 22, 01:55, 2 Years ago
Tue, Oct 12, 21, 09:33, 3 Years ago
;