LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   trouble compiling modules against custom fedora core 4 kernel (https://www.linuxquestions.org/questions/linux-software-2/trouble-compiling-modules-against-custom-fedora-core-4-kernel-345474/)

blahJake 07-21-2005 03:16 PM

trouble compiling modules against custom fedora core 4 kernel
 
///////////////////////////////////
// BACKGROUND //
///////////////////////////////////

ok, i'm trying to install ndiswrapper on my laptop, which is running Fedora Core 4 (via the upgrade feature, from Fedora Core 3) so i can use my linksys WPC54Gv2 wireless card (PCMCIA). i can create the kernel module and userspace utilities for it by using a simple 'make rpm'. however, the fedora core kernels are configured w/ 4K stacks instead of 8K stacks. this is a problem for ndiswrapper (which allows the use of windows wireless card drivers in linux) because many windows drivers won't work w/ 4K stacks. i assume this is my problem, as everything goes well until i load the module w/ the card in (freezes during runtime, kernel panics at boot time).

so, i got the src.rpm for the kernel and recreated the source tree as instructed in the fedora core 4 release notes. used their config and changed the stack size option (which is under Kernel Hacking). briefly:
rpm -Uvh kernel-2.6.12-1.1398_FC4.src.rpm
cd /usr/src/redhat/SPECS
rpmbuild -bp --target $(arch) kernel-2.6.spec
<go to source dir, get i686 config file into .config>
make oldconfig
make menuconfig (changed stack size only)
make rpm

this was all done on my desktop (running Fedora Core 3). moved the kernel rpm over to my laptop and installed. i can now boot this kernel (2.6.12-prep) w/out problems.

now, if i try to 'make rpm' for ndiswrapper, it says it needs /lib/modules/2.6.12-prep/build/Makefile, which doesn't exist. i've tried making this directory a symlink to the expanded source tree, which clearly has the makefile (the tree is present on the laptop, there just wasn't enough disk space to build it there).

when i first installed fedora core 4, i couldn't build against the current kernel due to the same error. this was fixed by installing the corresponding kernel-devel rpm.

i've examined the structure of the existing /lib/modules directories and attempted to mimic them manually (by creating symlinks), but have been unsuccessful.

///////////////////////////
// QUESTION //
///////////////////////////

what do i need to do to be able to compile the module against this new kernel that has no kernel-devel rpm to go with it? can i create this rpm somehow? can the appropriate /lib/modules directory be created from the source tree, src.rpm, or otherwise?

any advice, including pointers to resources, will be greatly appreciated.

thewade 08-12-2005 07:26 PM

Different but the same
 
I am also trying to install ndiswrapper, except that I am using Fedora Core 3, the 2.6.13-rc4-RT-V0.7.52-13 kernel, and I am buildding from the ndiswrapper 1.2.1 tar.gz file, not the src rpm.

I try "sudo make rpm" but I get:
Quote:

[wade@transport ndiswrapper-1.2]$ sudo make rpm
mkdir -p ndiswrapper-1.2
for subdir in utils driver debian; do \
if test "$subdir" = .; then :; else \
test -d ndiswrapper-1.2/$subdir \
|| mkdir ndiswrapper-1.2/$subdir \
|| exit 1; \
fi; \
done
make -C driver distdir=../ndiswrapper-1.2/driver dist
make[1]: Entering directory `/home/wade/ndiswrapper-1.2/driver'
make[1]: Leaving directory `/home/wade/ndiswrapper-1.2/driver'
make -C utils distdir=../ndiswrapper-1.2/utils dist
make[1]: Entering directory `/home/wade/ndiswrapper-1.2/utils'
make[1]: Leaving directory `/home/wade/ndiswrapper-1.2/utils'
make -C debian distdir=../ndiswrapper-1.2/debian dist
make[1]: Entering directory `/home/wade/ndiswrapper-1.2/debian'
make[1]: Leaving directory `/home/wade/ndiswrapper-1.2/debian'
# Update version in dist rpm spec file - don't crash if it fails
sed -i "s/\%define\s\+ndiswrapper_version\s\+[^\}]\+\}/%define ndiswrapper_version 1.2\}/" ndiswrapper-1.2/ndiswrapper.spec
tar cfz ndiswrapper-1.2.tar.gz ndiswrapper-1.2
rpmbuild -ta ndiswrapper-1.2.tar.gz --define="ndiswrapper_version 1.2"
error: Failed build dependencies:
/lib/modules/2.6.13-rc4-RT-V0.7.52-13/build/Makefile is needed by ndiswrapper-1.2-1.i386
make: *** [rpm] Error 1
I then try "sudo pmbuild -ta ndiswrapper-1.2.tar.gz --define="ndiswrapper_version 1.2" -vv" and get:
Quote:

sudo rpmbuild -ta ndiswrapper-1.2.tar.gz --define="ndiswrapper_version 1.2" -vv
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: ========== +++ ndiswrapper-1.2-1 i386/linux 0x0
D: opening db index /var/lib/rpm/Depends create mode=0x0
D: opening db index /var/lib/rpm/Basenames rdonly mode=0x0
D: opening db index /var/lib/rpm/Providename rdonly mode=0x0
D: Requires: /lib/modules/2.6.13-rc4-RT-V0.7.52-13/build/Makefile NO
D: package ndiswrapper-1.2-1.i386 has unsatisfied Requires: /lib/modules/2.6.13-rc4-RT-V0.7.52-13/build/Makefile
D: closed db index /var/lib/rpm/Depends
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Basenames
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
error: Failed build dependencies:
/lib/modules/2.6.13-rc4-RT-V0.7.52-13/build/Makefile is needed by ndiswrapper-1.2-1.i386
but clearly the Makefile is there:
Quote:

-rw-r--r-- wade wade root:object_r:src_t /lib/modules/2.6.13-rc4-RT-V0.7.52-13/build/Makefile
so what is up (wo)man?

thewade 08-13-2005 10:40 AM

New problem
 
I still have not figured out the "make rpm" problem, so I just did "make;sudo make install".
But now the module wont load due to an unknown symbol "get_current"!
Quote:

sudo modprobe ndiswrapper
FATAL: Error inserting ndiswrapper (/lib/modules/2.6.13-rc4-RT-V0.7.52-13/misc/ndiswrapper.ko): Unknown symbol in module, or unknown parameter (see dmesg)
dmesg gives me:
Quote:

ndiswrapper: Unknown symbol get_current
ndiswrapper: Unknown symbol get_current
ndiswrapper: Unknown symbol get_current
POOP!

mmmax3d 10-20-2006 11:36 AM

Problem
 
Hi!

I have a HP Pavilion zd8179ea and have installed Linux Fedora on it. I am trying to make the wireless connection work. It has the Broadcom chipset. I followed the procedure and I have done all the steps right till I have reached the NDISWRAPPER steps. I am trying to enter the ¨make¨ command and the ¨make install¨ command but I get an error message. This is the error:

[root@localhost ndiswrapper-1.26]# make
make -C driver
make[1]: Entering directory `/home/user01/ndiswrapper-1.26/driver'
Can't find kernel build files in /lib/modules/2.6.18-1.2200.fc5smp/build;
give the path to kernel build directory with
KBUILD=<path> argument to make
make[1]: *** [prereq_check] Error 1
make[1]: Leaving directory `/home/user01/ndiswrapper-1.26/driver'
make: *** [all] Error 2
[root@localhost ndiswrapper-1.26]#

What is going wrong? I am doing something wrong? Please help me as soon as possible cause my work depends on that...

Thank you

lebabyg 12-15-2006 07:59 PM

wade, did you manage to find a solution to compiling ndiswrapper on a custom kernel, as i have exactly the same problem although mine is more problematic as i need to use the custom kernel to include the modules for my AMD processor and for my custom DSDT table (goes into thermal overrun otherwise) any help is very much appreciated. Cheers Graham

studioj 12-15-2006 10:08 PM

first i don't know one single thing about rpms but i think
repeat the build procedure this time doing it on the laptop so all the build directories are in the right place ??
don't even have to install it just create the build.

lebabyg 12-16-2006 06:54 AM

ndiswrapper compiles and builds fine on my custom kernel, i just can't insert the module as it says its in the wrong format. Any ideas??


All times are GMT -5. The time now is 08:12 AM.