LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to install modules with a new kernel (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-modules-with-a-new-kernel-109513/)

Bruce Hill 10-28-2003 10:38 AM

how to install modules with a new kernel
 
I just compiled a 2.4.22 kernel, and I have 4 modules that I need to include. When I compiled a kernel before (2.4.21) I used a build_kernel script someone gave me, which took care of the modules, also. The script doesn't work now, though. It errors out really quick, so I compiled the kernel by

# make xconfig
#make-kpkg clean
# make-kpkg --revision=786:MyKernel2.4.22 kernel_image

Now I have my kernel image to install, but I also need to install the following 4 modules:

paul:/home/mingdao# ls -l /usr/src/modules
total 4
drwxrwsr-x 22 root src 1232 Sep 9 06:57 alsa-driver
drwxr-xr-x 3 root root 592 May 13 2002 cdfs
drwxr-xr-x 6 root root 416 May 31 05:39 i2c
drwxr-xr-x 10 root root 704 Dec 7 2002 lm-sensors

I've read about 6 different documents concerning compiling the kernel, including "Compling Kernels the Debian Way" and also the readme from the kernel-package doc at
zless /usr/share/doc/kernel-package/README.gz

That's the only place I've read anything on modules, and it only has this:

make-kpkg clean
make-kpkg -rootcmd fakeroot --append-to-version -custom.${VER} \
--revision custom.${VER} kernel_image modules-image
This one also builds any standalone modules packages you may have
installed on your machine.

A point in the right direction would help. Maybe I've read it but I'm too sleepy to understand.

:scratch: :study:

aus9 10-29-2003 09:33 AM

look i use mdk so forgive me, have you tried "make --help" or 'man make' to see what debian options are.

If you want one line command and go away for a cup of tea is mine

make xconfig && make dep && make clean && make bzImage && make modules -j5 && make modules_install && make install

notes I use grub so after make clean try make bzlilo

TigerOC 10-29-2003 10:34 AM

I am not clear as to what you mean but if you are talking about creating the modules directory then that is automatically taken care of when you do dpkg -i . You'll find the new modules for the kernel in /lib/modules.
If you want other modules included with the kernel modules then I gather that if the source files are in the same directory eg /usr/src then they can be included with the kernel modules by appending "\modules_image" after the kernel_image eg fakeroot make-kpkg --append_to_version -486 --initrd \ --revision=rev.01 kernel_image \ modules_image. When you do the install do dpkg -i kernel-image-2.4.22*.deb alsa*.deb etc. Note that i2c is already or should be included in the kernel and therefore does not require anything extra.

Bruce Hill 10-29-2003 06:14 PM

Sorry to be confusing.

What I've done is download what I believe I need to build as modules that aren't included in the kernel. I had help with this back in August, but we got so far off track that I've started the whole Debian installation over again. At that time I was upgrading from kernel 2.4.18-bf2.4 that comes with Woody to 2.4.21-3. Now the upgrade will be to the 2.4.22 kernel. And I'm not sure if I should get the pre-packed i686 kernel or just the regular linux-2.4.22.tar.bz2 either. I do intend to run this as Debian GNU/Linux Sarge/Sid and not Woody.

What I have in my system is in the first post:

paul:/home/mingdao# ls -l /usr/src/modules
total 4
drwxrwsr-x 22 root src 1232 Sep 9 06:57 alsa-driver
drwxr-xr-x 3 root root 592 May 13 2002 cdfs
drwxr-xr-x 6 root root 416 May 31 05:39 i2c
drwxr-xr-x 10 root root 704 Dec 7 2002 lm-sensors

and those are the four modules that I was led to believe I need to build to have all my hardware supported. (Just in case the question comes up, I'll post my hardware at the bottom of this.)

What I want to know is this: How do I get those modules in my system, so that I have support for my onboard sound, etc.? I had them in /usr/src as .bz2 and .gz files, and when I did the tar commands to them it put them into /usr/src/modules but I don't think they are deb files. Maybe I'm wrong about that. Apparently I need the .deb files from reading TigerOC's post:

Quote:

If you want other modules included with the kernel modules then I gather that if the source files are in the same directory eg /usr/src then they can be included with the kernel modules by appending "\modules_image" after the kernel_image eg fakeroot make-kpkg --append_to_version -486 --initrd \ --revision=rev.01 kernel_image \ modules_image. When you do the install do dpkg -i kernel-image-2.4.22*.deb alsa*.deb etc. Note that i2c is already or should be included in the kernel and therefore does not require anything extra.
I really think it's simple and I'm overcomplicating it or missing something. Here is my hardware, in case you've got the time to help me get it all recognized and running. There's so much that the 2.4.18-bf2.4 kernel doesn't support.

_____________________________________________________________

Asus P4PE/GBL/SATA/1394-CAY (Intel 845PE chipset)
Intel P4 2.4GHz CPU
Kingston 512MB PC2700 (2 sticks)
ATI Radeon 9000 64MB DDR AGP 4X
BroadCom BCM5702 Gigabit LAN
Realtek 8139C PCI nic (used only for install because kernel doesn't detect BroadCom giga lan)
VIA VT6307 IEEE 1394 controller
Onboard sound - Intel 82801DB ADI AD1980 AC '97 (Intel i810)
(2) Maxtor 6Y060L0 60GB ATA/133 7200RPM
Philips 150B4 LCD monitor
Asus CD-S520/A 52X CD-ROM
Sony DRU-500AX DVD +/- RW
Sony 1.44MB floppy
Microlab K2201 PS/2 keyboard
Chic PS/2 optical mouse (because Woody's kernel 2.4.18-bf2.4 has no USB support at startup)
Microsoft Wireless IntelliMouse Explorer (USB - use with new kernel)
HP DeskJet 920C printer
Microtek ScanMaker 4850 (USB 2.0)
Wacom FT-0405-U05 pen tablet (USB 1.1)
ONDATA 128MB USB flash disk (USB 1.1)
Toshiba 40GB USB 2.0 hard drive

TigerOC 10-30-2003 01:18 AM

When you do menuconfig or xconfig there is an option for i2c which can be included directly or as a module (options=y/m/n). alsa is available as a .deb, don't know about cdfs but it could be in file systems and lm-sensors is definitely available as a .deb

Bruce Hill 10-30-2003 04:29 AM

Thanks. I think what I need to do is to go back and find out how to get those as debs and download them that way.

:study:

TigerOC 10-30-2003 05:41 AM

Just re-reading your previous posts - there is a 2.4.22 debian source file available I think under testing. This is the one I used. I have tried the ordinary kernel from kernel.org and while it compiles ok with the debian method the system will not boot the new kernel and is giving all sorts of obscure errors.

Bruce Hill 10-30-2003 06:12 AM

I know this is going to sound lame, but I'm going to ask it, because I've installed Linux a lot of different ways and have yet to actually get it up and running where I can "use my computer to do some work" rather than "work on my computer to use it." And quite frankly, I'm sick of Micro$loth. I want to be free from that demon and use Linux :D

Would you please tell me what is meant by a 2.4.22 debian source file? I have gone to my mirror at ftp://debian.linux.org.tw/debian/poo...e-2.4.22-i386/ and there are files labeled kernel-build, kernel-headers, kernel-image and kernel-pcmcia-modules. The last I know I don't need for my workstation, but the others I don't know. I'm so tired of doing it wrong. The kernel guide I'm using says to download from www.kernel.org but I already got that one and also had trouble booting it. It seems as if the longer I try to use and learn Linux, the less I know :(

Bruce Hill 10-30-2003 06:42 AM

By George, I think I've got it...
 
Hey, I think I've got it ->

ftp://debian.linux.org.tw/debian/poo...4.22-3_all.deb

Wow, don't you just love it when the light comes on?

:rolleyes:

:cool:

TigerOC 10-30-2003 07:45 AM

You can find the debian kernel source here. Unpack in /usr/src

Bruce Hill 10-30-2003 08:11 AM

Thanks. That's one of the files I downloaded earlier :cool: I never knew that resource was available from Debian. Maybe I should go back to Debian.org and just get information from there.

Can you please tell me where to read what modules I need to download, as what, from where, and what I do to get them to work? Or maybe I should compile this new kernel first, and then worry about the other modules I need later. I've read so much from so many places and I'm more confused than I've ever been.

And please, what do you mean by "unpack in /usr/src"? Am I to download it somewhere else, and then do dpkg -i <filename>? Will that put it into /usr/src, or what? It says on the site to "please read the detailed documentation in the file /usr/share/doc/kernel-source-2.4.22/README.headers.gz" but I don't know how that file is going to get there. Will this happen when I unpack it?

It is my desire to get this comp running a Linux distribution so that I can remove the Mirco$loth OS and software from my life. It's been an uphill battle, but I know it can be done! I tried in 1999 and gave up after a few months. This time I will not give up!

TigerOC 10-30-2003 11:41 AM

Go and read and suggest save this howto because it will tell you all you need to know about building kernels and modules the debian way. The man page on kpkg will also help because it tells you how to create header files as well which you may need later if you are installing other things like nvidia.
When downloading (i.e. on the net) it best not to do it as root and therefore I personally save my downloads to a directory called downloads. In this case copy or move the kernel-source deb to /usr/src and then unpack it and will create a new directory for you. You can also add the line to your sources.list and use apt-get install to get it for you.
In regard to dependencies which is what you refer to when you ask where and how - well that is the beauty of debian. apt-get will sort all that out for you providing you provide the origin in your /etc/apt/sources.list. Somethings are not on the official debian site and there you need to add lines to sources.list in order to get them.

Bruce Hill 10-30-2003 03:57 PM

This is my /etc/apt/sources.list ->

#deb ftp://debian.linux.org.tw/debian/ stable main non-free contrib
#deb-src ftp://debian.linux.org.tw/debian/ stable main non-free contrib
#deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
#deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free

#deb http://security.debian.org/ stable/updates main contrib non-free

#deb ftp://debian.linux.org.tw/debian/ testing main non-free contrib
#deb-src ftp://debian.linux.org.tw/debian/ testing main non-free contrib
#deb http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free
#deb-src http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free

deb http://security.debian.org/ testing/updates main contrib non-free

deb ftp://debian.linux.org.tw/debian unstable main non-free contrib
deb-src ftp://debian.linux.org.tw/debian/ unstable main non-free contrib
deb http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free
deb-src ftp://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free

I changed from testing to unstable to apt-get the other files listed in the Debian package link you provided, since the kernel-source was in unstable. Was that correct, or should I have gotten those other packages from testing? And, when should I change it back?

When you say, "When downloading (i.e. on the net) it best not to do it as root and therefore I personally save my downloads to a directory called downloads" I am assuming some things. I can't do apt-get install <packagename> except as root, but when my system boots I login as user mingdao, so that when I download via Mozilla I am not root. Could you explain if I still have this incorrect?

For "You can also add the line to your sources.list and use apt-get install to get it for you," I don't understand. I got kernel-source from ftp://debian.linux.org.tw/debian/poo...source-2.4.22/ ? There are 13 files under that directory. Will it know which one I want?

Let me address this, for I think I confuse you again -> " In regard to dependencies which is what you refer to when you ask where and how - well that is the beauty of debian. apt-get will sort all that out for you providing you provide the origin in your /etc/apt/sources.list." What I meant by where and how are the modules that I need to build. I have an onboard sound chip that isn't supported by kernel 2.4.22 either, and I was told previously that "somethings you should or can only do as modules. PNP sound cards have to be done as modules because they are only in a recognized state after the kernel has finished booting. So for sound support you build modules Oh, and somethings we forgot, useful but not essential is cdfs support, which is available as a module." He also said, "When you come to compile your kernel, in the config you need to say that you will be wanting to build modules for i2c, but do not select any of the modules to be built, since they will be provided by the external i2c module build. Same goes for ALSA. For which you need to get lots of packages:

alsa-base
alsa-headers
alsa-source
alsa-utils
alsaconf
alsamixergui
libasound2

If you ever want to compile yourself some ALSA programs (eg MPlayer which is always best self-complied) then you will need

libasound2-dev

and you should also get

libasound2-doc"

This is documented in the post http://www.linuxquestions.org/questi...+fresh+install

Sorry for the book. When you get tired of helping just let me know :D

I think I already have the document you mentioned, but not the man page about kpkg. I'll be needing to reboot to finish a newsletter in Windblows, since I'm not able to run The Gimp and Scribus yet in Debian. So I'll print those documents while there.

TigerOC 10-31-2003 02:14 AM

Just to clarify some points. I downloaded the debian kernel source because I am running stable and it was just easier to do that than going and altering my sources.list. Quite often you'll find that apps you want are not available as debian packages and you have to get the tar ball. Your sources.list looks fine. To make things a bit simpler for yourself apt-get install synaptic. As root from a consol do synaptic which will give a gui form of dselect. You can then go down the list and select which package(s) you want to install. ALSA is available as a debian package which you can use synaptic for. ALSA will be installed and thereafter you'll have to set it up. With regard to i2c just include it in the kernel as you need it. Modules are used if you are not sure whether you are going to need that support or not such as you are planning to get wireless networking at a future date but don't need it now so you build wireless network support as a module. When you actually install the wireless network you install the module. Hope that makes sense.

Bruce Hill 10-31-2003 02:54 AM

Yes, that makes sense. I didn't know what i2c was for, but I am definitely NOT going to install a wireless network here, so if that's it, I'll just forget all about it.

I have synaptic and know how to use it, so as soon as I fix my messed up grub, I'll get right to it.

Thank you!


All times are GMT -5. The time now is 10:28 PM.