[PlanetCCRMA] recompiling kernel after adding a patch: newbie

Fernando Pablo Lopez-Lezcano nando@ccrma.Stanford.EDU
Mon Aug 25 14:56:01 2003


> I found the drivers for my modem,
> but to make them work I have to apply a patch for the modem using the
> two commands:
> #patch -p0 < usb-uhci.patch 
> #patch -p0 < usb-ohci.patch 
>  
> I do this after having copied the patches in the
> /usr/source/linux-2.4.21.1-ll-acpi
>  
> I try to recompile the kernel in the way the majority of guides on
> internet suggest,
> for making effective the changes these patches apply
>  
> make mrproper (if previous attempts made)
>  
> make oldconfig
>  
> make dep
> make clean
> make bzImage
>  
> make modules
> make modules_install
>  
> but at the point of making bzImage, I get errors at the end, the cpu
> cannot find acpi.h, acpi_bus.h and some other file related to acpi,
> which I don't remember.....and a kernel image is not done
>  
> I saw this output searching on the archives of PlanetCCRMA, with 2
> people or more having this result who posted questions, every email
> had no answer,

It's been answered several times... :-)

> but the one with an explanation near to this link
> http://ccrma-www.stanford.edu/planetccrma/software/recompilekernel.html
>  
> so I probably instead going to /usr/src/redhat, but I don't know how
> to modify spec file to add my patch,
> I tried to do 
>  
> cd /usr/src/redhat/SPECS
> rpmbuild -ba kernel-2.4.21-1.ll.acpi.spec

After installing the source rpm for the kernel? You have to install the
source rpm for the kernel and then try to rebuild the kernel from the
spec file. If you get errors please let me know, the source rpm rebuilds
without errors in my case... hmmm, make sure you have disabled
termination of the build in /usr/lib/rpm/redhat/macros, in particular
the value in these two lines should be "0" instead of "1":

%_missing_doc_files_terminate_build    0
%_unpackaged_files_terminate_build    0
 
> but I get errors
>  
> so my answer is how to get out of this situation without quitting :)
> who can help me how to recompile the kernel with the patch added in
> the correct way?

The proper way is to modify the spec file and rebuild, it is not easy, I
know. 

> my system is redhat 9 with the planetCCRMA kernel 2.4.21-1.ll.acpi

Do you know if those patches made it into 2.4.22?
-- Fernando