LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-01-2006, 06:53 PM   #1
e_4
LQ Newbie
 
Registered: Aug 2002
Location: Oklahoma
Posts: 11

Rep: Reputation: 0
Question Possible to compile individual kernel source modules? emu10k1


I searched abit before Im posting this - not sure if it has been asked, if it has sorry

Just wondering, the /usr/src/linux folder has all the drivers, and it has emu10k1 driver folder with the *.h and *.c files, i need to compile it and add it to /lib/modules/2.4.31/drivers/sound/emu10k1

When I installed slack it did not add the emu10k1.o into that folder, so I cannot /sbin/modprobe it and start it up.

Just wondering if its possible to compile just an individual driver/app in the /usr/src/linux without having to compile the entire kernel. Cause when i compile the kernel it doesnt add the file into the directory /lib/modules/... so i can use it

This is what ive been using to compile it

make menuconfig (i have the emu10k1 selected as module)
make dep
make && make modules_install
make install
make bzImage (and copied it to /boot/vmlinuz

But it still does not add the file I need into the folder
Maybe im compiling the kernel wrong, I dunno

Just wondering if its possible to compile an individual driver from /usr/src/linux liks /usr/src/linux/drivers/sound/emu10k1

Tried to do the make, and such in that folder but it never works

Any help is appreciated much

thanks

ae
 
Old 02-01-2006, 07:11 PM   #2
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
first thing you should do is copy the /boot/config file to /usr/src/linux/.config

make sure you name it .config

then add a
make oldconfig
before you do the menuconfig, this make sure you are compiling for the kernel you actually are running on.

then change your line make && make modules_install
to
make && make modules && make modules_install

you were just reinstalling the old modules, you need to make modules to make any new ones first
 
Old 02-01-2006, 09:19 PM   #3
e_4
LQ Newbie
 
Registered: Aug 2002
Location: Oklahoma
Posts: 11

Original Poster
Rep: Reputation: 0
Ok did that and re compiled the kernel (im almost positive it was the same version as each other (it was the source that slack10.2 installed))

did all of that then

make bzImage

i copied that along with the .config file in the /usr/src/linux back to /boot (not sure if that was the right thing to do)

when i rebooted the system, lilo comes up and i select linux, but then the screen goes blank and I cant do anything (not even pass the Linux 3 at lilo to boot into cli mode)

should I just start over and reinstall slack? or any suggestions on fixing this? I already tried taking the backup config file and putting it back in /boot as well as a backup vmlinuz file, but it still is messed up.

The install said when the compile was finished that the boot image was now too big to put on floppy also. I was able to regain access to the files by putting in slack cd1 and booting to its screen -- and then mount /dev/hda2 (where linux is) mounting it to /e

I can gain access to the files but im not sure what to do to fix this. If i am going to have to reinstall thats fine but i need a way to copy my files from the linux disk to my windows partition or burn to cd, but is that even possible to burn to cd from slacks install cd?

I cant get them on my windows partition cause it says ntfs not supported, is there maybe an include command to include it when i boot from the slack cd? --with-ntfs did not work.

any help greatly appreciated

thanks

e4
 
Old 02-01-2006, 09:47 PM   #4
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
no need to start over
just need to get a boot image in the /boot folder that will load your system

the simplest way to do that is boot with disk 1
run setup
then choose the configure option, this will allow you to pick a kernel and it will install and run lilo for you

once you have done that then we can worry about the module
just a note, if all you are doing is making a module you don't have to rebuild the kernel
 
Old 02-01-2006, 10:24 PM   #5
e_4
LQ Newbie
 
Registered: Aug 2002
Location: Oklahoma
Posts: 11

Original Poster
Rep: Reputation: 0
Yeah, all I was really needing to do was install a module for the emu10k1 sound driver (sb live value) and network card sk98lin (marvell card)

but i thought I had to recompile it all just to do that

do i just need to do make modules && make modules_install to install updated modules that i want to add?

id only need to recompile the kernel for the "built in" mods to the kernel that you find in the make menuconfig?

thanks again

e4
 
Old 02-01-2006, 10:28 PM   #6
e_4
LQ Newbie
 
Registered: Aug 2002
Location: Oklahoma
Posts: 11

Original Poster
Rep: Reputation: 0
also, thanks for your advice on reinstalling the boot image

but im getting stuck on this prob

i mount the / filesystem to mnt
mount /dev/hda2 /mnt << like it says somewhere

then goto configure and when it comes to the page that asks where to get the image i click cdrom and it says it cannot find it

i believe when i installed slack in full there was a section it auto dected the cdrom, and since i skipped that, it didnt this time

happen to know the command to make it auto detect the cdrom drives so i can mount them?

thanks again, ill be looking for the answer also but just wanted to post it so i can have more than just my mind on the case

e4
 
Old 02-01-2006, 10:28 PM   #7
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
i'm running slack 10.2 2.6 test kernel, my rc.modules file has the emu10k1 module in it.
yeah if you just want modules that is all you need to do
 
Old 02-01-2006, 10:51 PM   #8
e_4
LQ Newbie
 
Registered: Aug 2002
Location: Oklahoma
Posts: 11

Original Poster
Rep: Reputation: 0
Ok this is kinda annoying need abit more advice, lol

I found that /dev/hdc is the cdrom with the slack install in it
so i did a mount /dev/hdc /cdrom (/cdrom is the dir its looking for the kernel images in)

i do 'ls /cdrom' ,, and all the files are in there from the cdrom
but when i type setup and follow it to the page where it asks what location to install the image from, and i select cdrom it gives the error that it cant find the cdrom, and it was just mounted a min ago

so i ctrl c out of the setup program and ls /cdrom
and its unmounted again

any idea how to keep it mounted so i can install the image?

thanks again

e4
 
Old 02-01-2006, 11:09 PM   #9
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
i feel your pain.
ok other way to do this is boot with disk 1
mkdir anything
mount /dev/hda1 /anything (assuming hda1 is your / partition
chroot /anything
cd /
now mount your cdrom
you should be able to cd to the kernels directory and simply
installpkg kernel.tgz
at this point make sure your /etc/lilo.conf file is pointing to the correct image in /boot
then run
lilo
 
Old 02-01-2006, 11:22 PM   #10
e_4
LQ Newbie
 
Registered: Aug 2002
Location: Oklahoma
Posts: 11

Original Poster
Rep: Reputation: 0
got it a different way
i kinda guess i tricked it into working heh

if anyone ever runs into this prob just (from the root access on slack cd disk 1) rm -rf /cdrom ,,, then goto / and ,,, ln -s /mnt/cdrom cdrom

but before you do that make a dir in /mnt/ called cdrom

the setup prog just follows the link to /mnt/cdrom instead of being directly linked.

anywho, attemping to boot up now, and now i get a gpm invoked from gpm.c
mouse init failed: innappropriate ioctl for device

thanks for all your help so far,

glad i found this site again, really into linux again

e4
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
no modules after kernel compile glorsplitz Slackware 7 09-20-2005 11:26 AM
compiling individual modules irvken Linux - Newbie 1 05-09-2005 12:35 AM
How to compile individual modules in 2.6 kule Linux - General 0 07-16-2004 07:07 AM
Have to modprobe emu10k1 after kernel compile nmoog Slackware 1 01-08-2004 09:20 AM
compile individual kernel module snape Linux - Software 1 06-27-2001 11:25 AM


All times are GMT -5. The time now is 08:09 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration