LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   About Kernel after getting patched (https://www.linuxquestions.org/questions/linux-general-1/about-kernel-after-getting-patched-324936/)

small_boy22 05-19-2005 03:50 AM

About Kernel after getting patched
 
Hey, yesterday i just got the 2.6.11.10 patch and i had the 2.6.11.9 source.

So i applied the patch.I have some questions to ask:

1)If i apply the patch once and by mistake apply the same patch again to the patched source will this damage the previously patched files(because they are getting patched again) ???

2)It's kinda boring to make a new .config again so i use the old.Should i copy the old .config to the patched kernel directory by keeping the name .config or should i copy it like .config.old and type "make oldconfig" so that i can have the new options ??
Meaning:

a)Copy old .config to patched kernel source dir as .config
and by typing "make menuconfig" whould i have the new kernel options available ??

b)Copy old .config to patched kernel source dir with name .config.old
and by typing "make oldconfig" whould i have the new kernel options available ??

Which is correct a or b ??
I want to add here that when i apply th kernel patch there is no Makefile to get patched !!weird..


3)Should we "make clean && make mproper" before we compile the patched kernel to be 100% certain that it will work or just re-compiling without "make clean && make mproper" things will work ???


4)After i compile it and give uname -r i get "2.6.11.9" !!!!!!!!!
But then i wrote to an option called "something* about local kernel name" 2.6.11.10 and then when i type uname -r i get "2.6.11.92.6.11.10" !!!

When i give "make menuconfig" at top left it displays "Kernel 2.6.11.9 Configuration" ...damn patches.


5)after applying the 2.6.11.10 patch the kernel source is identical to the one from "linux-2.6.11.10.tar.bz2" ???

trickykid 05-19-2005 09:26 AM

Re: About Kernel after getting patched
 
1)If i apply the patch once and by mistake apply the same patch again to the patched source will this damage the previously patched files(because they are getting patched again) ???

Shouldn't hurt it any from my knowledge, you'd just be applying the same code on top of what you had just done.

2)It's kinda boring to make a new .config again so i use the old.Should i copy the old .config to the patched kernel directory by keeping the name .config or should i copy it like .config.old and type "make oldconfig" so that i can have the new options ??

'make oldconfig' will copy your old config to your new directory, etc.

a)Copy old .config to patched kernel source dir as .config
and by typing "make menuconfig" whould i have the new kernel options available ??

b)Copy old .config to patched kernel source dir with name .config.old
and by typing "make oldconfig" whould i have the new kernel options available ??

Which is correct a or b ??
I want to add here that when i apply th kernel patch there is no Makefile to get patched !!weird..


I don't know what your doing.. all the same code and config files should still be in your existing directory from your previous kernel.. you just applied a patch, so your literally should be using the same src directory to compile from.


3)Should we "make clean && make mproper" before we compile the patched kernel to be 100% certain that it will work or just re-compiling without "make clean && make mproper" things will work ???

You don't have to but it doesn't hurt any. You can run 'make clean' after every step when compiling.


4)After i compile it and give uname -r i get "2.6.11.9" !!!!!!!!!
But then i wrote to an option called "something* about local kernel name" 2.6.11.10 and then when i type uname -r i get "2.6.11.92.6.11.10" !!!


You probably screwed up somewhere..

When i give "make menuconfig" at top left it displays "Kernel 2.6.11.9 Configuration" ...damn patches.

You probably didn't patch it properly.. yup!


5)after applying the 2.6.11.10 patch the kernel source is identical to the one from "linux-2.6.11.10.tar.bz2" ???

Should be, that's the whole point in patching from one version to the next.. it saves time in having to download everything all over again with only applying the changes to the code..

abisko00 05-19-2005 10:07 AM

The thing about .config sounds too confusing to me ;) Here's what I do:
  • - run 'make clean' and/or 'make mrproper' in the kernel source directory
    - patch the kernel (btw: patch will complain if the patch has been applied previously)
    - rename the sources directory to the new kernel version (because that's what it is now)
    - your old .config is still in the kernel source directory. To adapt it to the new sources, run 'make oldconfig', then 'make xconfig' or 'make menuconfig' to make fine adjustments. If .config is not in the source directory (because you ran 'make mrproper'), create a new one by 'make cloneconfig'.
    - check 'Makefile' is the version is entered correctly (should be done by the patch)
    - compile and install your kernel

small_boy22 05-19-2005 10:54 AM

let me tell what i did:

Saved .config to a different dir. Deleted /usr/src/linux-2.6.11.9
Then untared linux-2.6.11.9, applied the patch to it and then coppied back the .config file.
I did this because when i applied the patch if the directory /usr/src/linux-2.6.11.9 before i deleted(the old one with the compiled stuff) i couldn't make it to work properly e.g. having "Kernel 2.6.11.10 Configuration" at the left-top of my screen.This happens propably because the patch cannot find+patch the Makefile.

Thanks for the info guys ill try some more when i get home at night and see the results.


That SlackWare makes me only to read-learn-post-read-learn-read-post... etc.. :) :study: loving it :)

Great distro for learning GNU/Linux :)


All times are GMT -5. The time now is 10:34 AM.