Agere srpm and kernal headers
Hi all. I recently installe d fedora core 1 on my R40 thinkpad. My modem wasnt detected so I ran scanmodem from linmodems. I was then directed to the agere web site and downloaded the driver. They had a few rpms, but none for core 1, so I got the srpm. Then I installed the kernal source from my cd. In the reports from scanmodem, there is one that tells you how to compile drivers, and I followed that and then tried to install the driver, but I'm getting errors, Below is the instuctions I followed and the output fromm the terminal. If anyone can tell me where I went wrong or if there is an easier way to do it, then I'll be forever gratefull.
Configuration of the kernel-source is where almost all the Mistakes occur!!!
Here is a way to do it correctly (but read through EXCEPTIONAL CASES below).
1)Within kernel-source/ folder, browse the README file for general guidance.
It will relate that the command:
# make mrproper
cleans up leftovers from any previous usage .dot-files and the include/linux/ folder.
Additionally you may need to do an edit within Makefile, but ONLY that 4th line.
2) If necessary to edit, FIRST make a backup:
cp Makefile Makefile.backup
then edit ONLY the 4th line of Makefile to match the EXTRAVERSION of 2.4.22-1.2115.nptl
EXTRAVERSION = -
NEVER change anything else within the Makefile.
3) Set the dependencies of the current kernel.
For SuSE 9.0 and later, there is a command which does the following steps
# make cloneconfig && make dep
Also browse the excellent README.SuSE in the kernel-source/ folder
For other Distros, the following steps are necessary, within the kernel-source/ folder
copy the kernel-config file to .config
and DO SPECIFY that " . "
But where is it? For many Distros, it will be the file like
/boot/config-2.4.22-1.2115.nptl
matching the output of:
uname -r
Or it may be the target of a symbolic link: /boot/config -->
So
cp /boot/config-2.4.22-1.2115.nptl .config
For SuSE 8.0 and earlier versions it is:
cp /boot/vmlinuz.config .config
PLEASE do not omit that "." in .config as it is crucially necessary.
View .config with a text browser.
It is simply a listing of the code components used in the kernel and its modules:
#
# Automatically generated make config: don't edit
#
CONFIG_X86=y
# CONFIG_SBUS is not set
CONFIG_UID16=y
etc.
4) The .config file will be read during
# make oldconfig
which feeds its specifications through a process specifying
the SAME inter-dependencies previously used in compiling your kernel,
and generating fresh .dot-config files . They can be displayed with:
# ls -al
5) Though it may be redundant after "make mrproper", it will do no harm to:
make clean
5a) For the SuSe Linux versions 8.0 and previous , there will exist files:
/boot/vmlinuz.autoconf.h
/boot/vmlinuz.version.h
They MUST be copied as:
cp /boot/vmlinuz.autoconf.h /usr/src/linux/include/linux/autoconf.h
cp /boot/vmlinuz.version.h /usr/src/linux/include/linux/version.h
6) Now build kernel-headers with:
make dep
during which you can walk your dog, take a shower, have tea, etc.
7) Check for resultant FileNames.h with:
ls include/linux/
and
cat include/linux/version.h
to verify the version.
[root@localhost SRPMS]# rpmbuild --rebuild ageresoftmodembeta-2.1.0-2.src.rpm
Installing ageresoftmodembeta-2.1.0-2.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.84896
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf AgereSoftModemBeta-2.1.0
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/AgereSoftModemBeta-2.1.0.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd AgereSoftModemBeta-2.1.0
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.65722
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd AgereSoftModemBeta-2.1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ make all
Building Modem Controller Module for Agere Soft modem
In file included from /usr/src/linux-2.4.22-1.2115.nptl/include/asm/semaphore.h:39,
from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/fs.h:202,
from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/capability.h:17,
from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/binfmts.h:4,
from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/sched.h:10,
from agrmodem.c:30:
/usr/src/linux-2.4.22-1.2115.nptl/include/asm/system.h: In function `__set_64bit_var':
/usr/src/linux-2.4.22-1.2115.nptl/include/asm/system.h:189: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/linux-2.4.22-1.2115.nptl/include/asm/system.h:189: warning: dereferencing type-punned pointer will break strict-aliasing rules
agrmodem.c: In function `x_do_gettimeofday':
agrmodem.c:198: warning: control reaches end of non-void function
agrmodem.c: In function `x_atomic_read':
agrmodem.c:311: warning: dereferencing type-punned pointer will break strict-aliasing rules
agrmodem.c: In function `x_atomic_set':
agrmodem.c:312: warning: dereferencing type-punned pointer will break strict-aliasing rules
agrmodem.c: In function `x_atomic_inc':
agrmodem.c:313: warning: dereferencing type-punned pointer will break strict-aliasing rules
agrmodem.c: In function `x_atomic_dec':
agrmodem.c:314: warning: dereferencing type-punned pointer will break strict-aliasing rules
agrmodem.c: In function `x_atomic_dec_and_test':
agrmodem.c:315: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/tqueue.h:19,
from /usr/src/linux-2.4.22-1.2115.nptl/include/linux/serialP.h:24,
from serial24.c:217:
/usr/src/linux-2.4.22-1.2115.nptl/include/asm/system.h: In function `__set_64bit_var':
/usr/src/linux-2.4.22-1.2115.nptl/include/asm/system.h:189: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/src/linux-2.4.22-1.2115.nptl/include/asm/system.h:189: warning: dereferencing type-punned pointer will break strict-aliasing rules
serial24.c: In function `rs_close':
serial24.c:3061: error: invalid operands to binary ==
make: *** [serial24.a] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.65722 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.65722 (%build)
[root@localhost SRPMS]#
Sorry for the long post.
I've got a feeling that its the kernel headers that are making the errors and was hoping I could get away without having to compile the kernal as I am just blindly following what is in the text without really knowing what I'm doing. Please give detailed instructions if you have any ideas.
Cheers.
|