FedoraThis forum is for the discussion of the Fedora Project.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to install a wireless card to my FC4 box.
So I have ndiswrapper 1.3.4. Can't install ndiswrapper until I have some sources files in /usr/kernel. So I grabbed a source online (kernel.org, 2.6.19).
I untarred everything, and went to the directory and tried
'make config'
but that died.
looks like the gcc-version.sh script is dying at lines 11 and 12 with an error message that says 'command not found'.
Another line says HOSTCC scripts/basic/fixdep
/bin/sh: gcc: command not found.
I did an RPM -q to make sure gcc is there (it is)
First thing I'm going to do is check my path and try again.
If that doesn't work, I'm going to edit that script and point it to where my gcc is.
As far as I know, the kernel config and compilation steps are:
1. Unpack the kernel in /usr/src/linux
2. Make clean
3. Make mrproper
4. Make menuconfig or make xconfig
5. Make all
6. Make modules_install
7. Make install
Maybe you should do make menuconfig or make xconfig instead of thust make config?
make is failing right when I run it. Errors out at line 11 and 12. Here's the script:
Code:
#!/bin/sh
#
# gcc-version gcc-command
#
# Prints the gcc version of `gcc-command' in a canonical 4-digit form
# such as `0295' for gcc-2.95, `0303' for gcc-3.3, etc.
#
compiler="$*"
MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1)
MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
printf "%02d%02d\\n" $MAJOR $MINOR
Here is the instructions from linmodems.org on proper compiling kernel headers needed for compiling modem drivers, not sure but I believe the .config part may be a step you need also, as I said "not sure" but may be relevant. This example relates to my system and kernel as it was produced by a script called scanModem, many other .txt files were created.
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.6.18-1.2869.fc6
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.6.18-1.2869.fc6
matching the output of:
uname -r
Or it may be the target of a symbolic link: /boot/config -->
So
cp /boot/config-2.6.18-1.2869.fc6 .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 may generate additional .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
for 2.4.n kernels or for 2.6.n kernels
make bzImage
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.
COMPILING the MODEM DRIVERS can now finally be done.
Unpack the compiler kit for your modem drivers,
cd into its folder, read any README or INSTALL files,
make clean
FINALLY, your modem drivers will compiled by a command like
make OR make ModuleName
or perhaps
make all
During this process, some of the kernel-header code with be joined
with the supplied modem specific code, and ModemDrivers.o will be produced.
Follow and further instructions in the modem code resource
to install the drivers, often with:
make install
Last edited by Junior Hacker; 01-18-2007 at 03:48 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.