Find the answer to your Linux question:
Results 1 to 8 of 8
I've been having this problem for a while now, but I'm finally getting around to figuring it out. Whenever I try to patch the kernel I get the following message: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390

    kernel wont patch, ok now the version number is the same


    I've been having this problem for a while now, but I'm finally getting around to figuring it out. Whenever I try to patch the kernel I get the following message:
    Code:
    patch -p1 < /usr/src/linux/patch-2.6.7 
    can't find file to patch at input line 4
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was&#58;
    --------------------------
    |diff -Nru a/CREDITS b/CREDITS
    |--- a/CREDITS  Tue Jun 15 22&#58;20&#58;42 2004
    |+++ b/CREDITS  Tue Jun 15 22&#58;20&#58;42 2004
    --------------------------
    File to patch&#58;
    What am I doing wrong? I've searched around a lot but couldn't find anything. Thanks in advance.

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    What's your CWD when you attempt this, and where is the kernel you wish to patch located?

  3. #3
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    First I tried it from /usr/src and I want to patch /usr/src/linux. Then I moved it into /usr/src/linux and tried it again from /usr/src.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    If you run with -p1, you probably want to cd into the kernel source.
    -p1 removes path elements up until the first slash it finds, so in this case, "a/CREDITS" becomes just "CREDITS". Thus, in order for it to find CREDITS, you'll need to be in that directory.

  5. #5
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    Yet again Dolda you have my answers, thanks a lot!

    EDIT: Ok uname -a shows the kernel version is still 2.6.6. I built the kernel and copied the bzImage over, and doing make menuconfig shows that it is indeed 2.6.7, any ideas?

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Maybe it just didn't alter the Makefile for some reason? Check the first lines of the top Makefile - the ones setting the VERSION, PATCHLEVEL and SUBLEVEL variables. They are the variables that get used in contructing the uname response.

  7. #7
    Linux User
    Join Date
    Jun 2003
    Location
    Huntington Beach, CA
    Posts
    390
    VERSION = 2
    PATCHLEVEL = 6
    SUBLEVEL = 7

    Hmm...

  8. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    That's weird... did you make clean before attempting to recompile the kernel image?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •