Jump to content


Photo
- - - - -

patching kernel source


  • Please log in to reply
7 replies to this topic

#1 ruckus2112

ruckus2112

    DDP Fan club member

  • Members
  • 41 posts

Posted 05 June 2009 - 10:45 AM

So I'm trying to path some driver code in fedora.

I downloaded a source rpm and ran rpm -i (kernel rpm filename).

However I have _no clue_ where it put the source files, and thus can't apply my patch.

Anyone know how I can make rpm tell me where it put the files? (I think I've been a bit spoiled by finder's search, without a workable search I have no clue how to find my way around the filesystem)

#2 phasma

phasma

    Hakker addict

  • Members
  • 527 posts
  • Country:
  • Gender:Male
  • Location:Pennsylvania

Posted 05 June 2009 - 11:03 AM

So I'm trying to path some driver code in fedora.

I downloaded a source rpm and ran rpm -i (kernel rpm filename).

However I have _no clue_ where it put the source files, and thus can't apply my patch.

Anyone know how I can make rpm tell me where it put the files? (I think I've been a bit spoiled by finder's search, without a workable search I have no clue how to find my way around the filesystem)

Jump in the shell and use the locate command.

#3 ruckus2112

ruckus2112

    DDP Fan club member

  • Members
  • 41 posts

Posted 05 June 2009 - 12:11 PM

So I'm trying to path some driver code in fedora.

I downloaded a source rpm and ran rpm -i (kernel rpm filename).

However I have _no clue_ where it put the source files, and thus can't apply my patch.

Anyone know how I can make rpm tell me where it put the files? (I think I've been a bit spoiled by finder's search, without a workable search I have no clue how to find my way around the filesystem)

Jump in the shell and use the locate command.


Thanks. I discovered the "problem" was that the wireless drivers were not in fact located in the kernel source. I found the right directory (compat wireless tree), applied the patch, and now am trying to compile the change.

So I go up a directory to the main compat-wireless folder, and run make, and I get this error:

$ sudo make
/bin/sh: line 0: test: -ge: unary operator expected
make -C /lib/modules/2.6.29.1-102.fc11.i586/build
M=/usr/src/compat-wireless-2.6.30-rc6 modules
make: *** /lib/modules/2.6.29.1-102.fc11.i586/build: No such file or
directory.  Stop.
make: *** [modules] Error 2


#4 ruckus2112

ruckus2112

    DDP Fan club member

  • Members
  • 41 posts

Posted 05 June 2009 - 01:37 PM

Note: I have installed the kernel headers and kernel source rpm already, with no change in the error output.

#5 ruckus2112

ruckus2112

    DDP Fan club member

  • Members
  • 41 posts

Posted 05 June 2009 - 02:30 PM

By making the directory manually I now get this error:

[root@localhost compat-wireless-2.6.30-rc6]# make
/bin/sh: line 0: test: -ge: unary operator expected
make -C /lib/modules/2.6.29.1-102.fc11.i586/build
M=/usr/src/compat-wireless-2.6.30-rc6 modules
make[1]: Entering directory `/lib/modules/2.6.29.1-102.fc11.i586/build'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory `/lib/modules/2.6.29.1-102.fc11.i586/build'
make: *** [modules] Error 2

Also I feel I should mention I've already tried installing kernel headers and the source rpm (the two most common solutions I found on google)

#6 mecca_

mecca_

    DDP Fan club member

  • Members
  • 54 posts

Posted 06 June 2009 - 12:02 AM

Anyone know how I can make rpm tell me where it put the files? (I think I've been a bit spoiled by finder's search, without a workable search I have no clue how to find my way around the filesystem)


This should work in fedora:
rpm -ql `rpm -qa | grep kernel-2.6`


make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/2.6.29.1-102.fc11.i586/build'
make: *** [modules] Error 2

Are you sure you installed the correct kernel source\headers? What's the output of
rpm -qa | grep kernel; ls -l /usr/src/; uname -a


#7 ruckus2112

ruckus2112

    DDP Fan club member

  • Members
  • 41 posts

Posted 07 June 2009 - 05:58 PM

That command (rpm -ql `rpm -qa | grep kernel-2.6`) didn't work.

The output of rpm -qa | grep kernel; ls -l /usr/src/; uname -a is:
ernel-2.6.29.1-102.fc11.i586
kernel-headers-2.6.29.1-102.fc11.i586
kernel-firmware-2.6.29.1-102.fc11.noarch
kerneloops-0.12-5.fc11.i586
total 2736
drwxr-xr-x. 7	  1000	  1000	4096 2009-06-07 18:53 compat-wireless-2.6.30-rc6
-rwxr-xr-x. 1 songwhale songwhale 1678784 2009-06-07 18:48 compat-wireless-2.6.30-rc6.tar.bz2
drwxrwxr-x. 5 root	  root		 4096 2009-03-23 10:06 hostapd-0.6.9
-rwxr-xr-x. 1 songwhale songwhale 1089548 2009-06-07 18:48 hostapd-0.6.9.tar.gz
drwxr-xr-x. 2 root	  root		 4096 2009-03-04 08:13 kernels
drwxrwxr-x. 4 root	  root		 4096 2009-01-30 15:39 wireless-regdb-2009.01.30
-rwxr-xr-x. 1 songwhale songwhale   11515 2009-06-07 18:48 wireless-regdb-2009.01.30.tar.bz2
Linux localhost.localdomain 2.6.29.1-102.fc11.i586 #1 SMP Mon Apr 20 15:18:57 EDT 2009 i686 i686 i386 GNU/Linux

thanks for the help

Edited by ruckus2112, 07 June 2009 - 06:00 PM.


#8 phasma

phasma

    Hakker addict

  • Members
  • 527 posts
  • Country:
  • Gender:Male
  • Location:Pennsylvania

Posted 07 June 2009 - 06:20 PM

What message do you get when you run "rpm -ql `rpm -qa | grep kernel-2.6"?




BinRev is hosted by the great people at Lunarpages!