LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-24-2005, 06:51 AM   #1
Jens Peter
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Rep: Reputation: 0
Adding Ndiswwrapper to my kernel


Hi,

I have to compile a kernel (2.6.9) to be able to use the Ad hocProtocol Evaluation (APE) testbed. In that kernel, I need that my wireless cards in my laptops are working, and here's the problem.

I've found out, that I need to include Ndiswrapper (1.3rc1) in my kernel, to enable wireless communication. But, I can't seem to figure out, how I do that.

I've created a symlink between /usr/src/linux and the /linux where my kernel are placed. Then, I run the "make install" in Ndiswrapper, but it loads the modules into /lib/modules/2.6.9-1.667/ - my running kernel, but not the kernel that I want to use for my APE distribution.

I'm clueless of how I change things, so instead of installing Ndiswrapper on my running kernel, its installed in the kernel i need for APE.

Any ideas ?

Regard,

Jens Peter
 
Old 09-25-2005, 02:34 AM   #2
Charred
Member
 
Registered: Mar 2005
Location: Utah, USA
Distribution: Slackware 11
Posts: 816
Blog Entries: 2

Rep: Reputation: 30
Compile the new kernel, start it up, THEN make and install the NdisWrapper modules.
http://ndiswrapper.sourceforge.net/m...p/Installation
 
Old 09-25-2005, 05:06 AM   #3
Jens Peter
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Yes, but my problem is, that my kernel does not contain GCC. Then I'm unable to run the 'make' commands that are needed to build the Ndiswrapper. Thats why I wanted to add it to my kernel before compiling.

But I guess, I have to figure out, how to add GCC to my kernel, and then build and install Ndiswrapper modules...
 
Old 09-25-2005, 05:55 PM   #4
Charred
Member
 
Registered: Mar 2005
Location: Utah, USA
Distribution: Slackware 11
Posts: 816
Blog Entries: 2

Rep: Reputation: 30
You need to install GCC.
 
Old 09-26-2005, 01:21 AM   #5
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
What distro are you using? Most distros have ndiswrapper support compiled into their kernels already and also have ndiswrapper packages which make it much easier to install. Besides all that you already have gcc installed if you've compiled a kernel.
 
Old 09-26-2005, 02:26 AM   #6
Jens Peter
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Original Poster
Rep: Reputation: 0
My problem is, that I'm not using any distribution - only a pure kernel with some add-ons to enable it to run ad hoc network tests.

When I boot up in that, I don't have anything avaliable - no gcc and surely no ndiswrapper.

I tried to mount my fedora core file system (that worked), and added the path to the GCC, to my path in the kernel I had booted up in, but that didn't work either.

I don't know, if it is possible to compile GCC as a module, and then add it to my kernel. Then I have a GCC, and the I should be capable of building Ndiswrapper.

I know, I'm a big newbie..... but any ideas would be appreciated.
 
Old 09-26-2005, 03:34 AM   #7
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
I'm not sure what you mean by making a module for GCC - its all user-space code AFAIk, ie. its not part of the kernel nor is it a module. Anyway to get gcc onto a system with no existing compiler you have to do a bootstrap install. See the instructions on the gcc site: http://gcc.gnu.org/install/
 
Old 09-26-2005, 04:08 AM   #8
Jens Peter
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Yes, but my problem is, if I compile GCC in Fedora Core, I guess it will be dependent on some of Fedoras options/filestructure. And from Fedora I have not got access to the kernel or that kernels filesystem that I try to boot in, in order to run the ad hoc tests. Its hidden away in a vmlinuz-file / rootfs.img / initrd.gz.

But if I run a "make bootstrap --prefix=/some/dir/gcc" in my fedora, will I be able to simply copy the gcc-library from my fedora-filesystem an onto my test-kernel ? I would do this by booting up in the test-kernel, mounting the fedora-filesystem and then simply "cp /some/dir/gcc /gcc"
 
Old 09-26-2005, 04:42 AM   #9
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
No what I meant is do a bootstrap install after you've booted your custom kernel. That's the whole point of doing a bootstrap - you can do it even if the machine doesn't have a compiler on it. If you were going to do it in Fedora you wouldn't need to do a bootstrap
 
Old 09-26-2005, 07:42 AM   #10
Jens Peter
LQ Newbie
 
Registered: Sep 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Okay, I downloaded gcc 4.0.1 (in Fedora) and extracted it to the desktop. Then I booted in my custom kernel, mounted my fedora filesystem, and accessed the fedora desktop. I wanted to copy the GCC folder to /, but the error I'm getting is "No space left on device". This leads me to the conclusion that my custom kernel are a fix-size thing, and there are not enough space on the image to add the GCC. Even if I try to move the Ndiswrapper-folder I get the same error.

I think the only option is, to add Ndiswrapper to my custom-kernel before building it.

I have contacted a linux-guy at my university, hoping he will be able to assist me, because this is getting on my nerves...

If you have any other ideas, I would appreciate it.

Thank you for all your help.

Jens Peter.
 
Old 09-26-2005, 05:59 PM   #11
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
I'm not sure exactly what you're doing here. The steps you're going through are what you would do if you were trying to make your own version of Linux - ie. making your own distro. If you just want to compile a new kernel for your Fedora install then boot into Fedora and do so. Now just add that kernel to the grub boot menu for Fedora and reboot, making sure to select the new kernel in the boot loader menu on startup.

If you do this you will find yourself in your Fedora install except running your new kernel. You will still have all the stuff that you had access to when running the Fedora default kernel. So if you had gcc, make, X windows, KDE, GNOME, XMMS installed in Fedora it would all still be there.

Last edited by tkedwards; 09-26-2005 at 06:03 PM.
 
Old 09-27-2005, 03:09 PM   #12
Charred
Member
 
Registered: Mar 2005
Location: Utah, USA
Distribution: Slackware 11
Posts: 816
Blog Entries: 2

Rep: Reputation: 30
tkedwards,
I think we're dealing with 2 systems here. One running Fedora, the other (practically) bare metal.

Jens Peter,
NdisWrapper does not get put into the kernel, it's userspace code that generates a kernel module that can be INSERTED into the kernel to allow the kernel to interface with the device in question.

Kernel modules need to be compiled with certain gcc options in order for them to work properly (see http://www.faqs.org/docs/kernel/x204.html for more information). In order to compile, you need to have GCC. As your setup currently has no compiler, forget about NdisWrapper until you are able to compile.

To make a native build, follow the steps located on the link kindly provided by tkedwards. ALL THIS PRESUMES YOUR TEST SYSTEM IS FUNCTIONAL, AS THIS HAS TO BE DONE ON THE SYSTEM RUNNING YOUR TEST-KERNEL, BECAUSE IT WILL MAKE A GCC BUILD JUST FOR THAT SYSTEM.
Quote:
The installation procedure itself is broken into five steps.
  • 1. Prerequisites
    2. Downloading the source
    3. Configuration
    4. Building
    5. Testing (optional)
    6. Final install
If you follow the directions contained therein, you will successfully make a native build for your system. If you have specific questions about the process, just ask; if you want hand-holding, try it a few times on your own first. Don't let it intimidate you; imagine how you'll feel telling the linux-guy that you made a native build of gcc on your own, which is PROBABLY something he's NEVER done!

AGAIN, GCC IS NOT PART OF THE KERNEL, IT'S A PROGRAM THAT CHANGES C SOURCE CODE INTO MACHINE CODE.
NDISWRAPPER IS NOT PART OF THE KERNEL, NOTHING NDISWRAPPER DOES WILL REQUIRE A KERNEL RECOMPILE.


NOTE: When you've got gcc running on your test machine, you will (almost certainly) need to recompile your test kernel (ON YOUR TEST MACHINE) to prevent any gcc-mismatch problems between your test-kernel and the NdisWrapper module. Don't worry about that now, we'll launch that boat when the ground gets wet; I just wanted you to be prepared.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding 2.6 kernel for Slackware WindowBreaker Linux - Software 1 11-11-2005 10:49 PM
adding K7 support to kernel wjacobusse Fedora 1 03-07-2005 03:37 PM
Adding kernel modules dustin_wielenga Slackware 5 02-15-2005 11:10 PM
adding own module to kernel b123coder Linux - Newbie 1 12-08-2004 10:05 PM
Slackware 10.0 Adding a new kernel. LunarEagle Slackware 1 11-03-2004 03:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration