Robert Moskowitz
2008-Sep-16 12:38 UTC
[CentOS] Kernel source - linux -2.6.18 i386 or i686
As I plow through the Kernel source to figure out why the BEET patch is not working, I notice that there are two similar directories under ~/rpmbuild/BUILD/kernel-2.6.18: linux-2.16.18.i386 and linux-2.16.18.i686 So which one am I suppose to be patching? Currently, the patch starts out with: diff -urN a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c I followed the kernel source setup instructions on the wiki: http://wiki.centos.org/HowTos/I_need_the_Kernel_Source tells me to supply i686 for getting and setting up the source. But http://wiki.centos.org/HowTos/Custom_Kernel has me setting up a .config file with '# i386' as the first line. Now that is a comment, right? So why add such a comment. Perhaps it is NOT a comment? Shesh... Anyway, which directory structure gets used in the rpmbuild: rpmbuild -bb --target=`uname -m` kernel-2.6.spec 2> build-err.log | tee build-out.log Do I add this to the patch?
On Tue, Sep 16, 2008 at 5:38 AM, Robert Moskowitz <rgm at htt-consult.com> wrote:> As I plow through the Kernel source to figure out why the BEET patch is not > working, I notice that there are two similar directories under > ~/rpmbuild/BUILD/kernel-2.6.18: > > linux-2.16.18.i386 and linux-2.16.18.i686 > > So which one am I suppose to be patching? > > Currently, the patch starts out with: > > diff -urN a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c > > I followed the kernel source setup instructions on the wiki: > http://wiki.centos.org/HowTos/I_need_the_Kernel_Source > > tells me to supply i686 for getting and setting up the source. > > But http://wiki.centos.org/HowTos/Custom_Kernel > > has me setting up a .config file with '# i386' as the first line. Now that > is a comment, right? So why add such a comment. Perhaps it is NOT a > comment? Shesh...It is NOT a comment. That line is read during the build procedure for identification of the arch. [code] # now run oldconfig over all the config files for i in *.config do mv $i .config Arch=`head -1 .config | cut -b 3-` make ARCH=$Arch nonint_oldconfig > /dev/null echo "# $Arch" > configs/$i cat .config >> configs/$i done [/code]> Anyway, which directory structure gets used in the rpmbuild: > > rpmbuild -bb --target=`uname -m` kernel-2.6.spec 2> build-err.log | tee > build-out.log > > Do I add this to the patch?You need to add the patch file to the SOURCES directory and edit the .spec file to include that patch. This is explained in the wiki article you referred to. If the build fails, please post relevant portions of the log files so that we can figure out what went wrong. Akemi
Robert Moskowitz
2008-Sep-16 14:49 UTC
[CentOS] Kernel source - linux -2.6.18 i386 or i686
Akemi Yagi wrote:> On Tue, Sep 16, 2008 at 5:38 AM, Robert Moskowitz <rgm at htt-consult.com> wrote: > >> As I plow through the Kernel source to figure out why the BEET patch is not >> working, I notice that there are two similar directories under >> ~/rpmbuild/BUILD/kernel-2.6.18: >> >> linux-2.16.18.i386 and linux-2.16.18.i686 >> >> So which one am I suppose to be patching? >> >> Currently, the patch starts out with: >> >> diff -urN a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c >> >> >> Anyway, which directory structure gets used in the rpmbuild: >> >> rpmbuild -bb --target=`uname -m` kernel-2.6.spec 2> build-err.log | tee >> build-out.log >> >> Do I add this to the patch? >> > > You need to add the patch file to the SOURCES directory and edit the > .spec file to include that patch. This is explained in the wiki > article you referred to.Did that. I believe I followed the instructions to a tee.> If the build fails, please post relevant > portions of the log files so that we can figure out what went wrong.I did that a couple of days ago: Patch #40000 (centos-5.2-hipmod-sleep-beet-and-interfamily-all-in-one.patch): 1 out of 4 hunks FAILED -- saving rejects to file net/ipv4/xfrm4_output.c.rej 2 out of 3 hunks FAILED -- saving rejects to file net/ipv4/esp4.c.rej 1 out of 1 hunk FAILED -- saving rejects to file net/ipv6/udp.c.rej 1 out of 1 hunk FAILED -- saving rejects to file net/ipv6/tcp_ipv6.c.rej 1 out of 1 hunk FAILED -- saving rejects to file net/ipv6/esp6.c.rej 2 out of 2 hunks FAILED -- saving rejects to file net/ipv6/icmp.c.rej 2 out of 2 hunks FAILED -- saving rejects to file net/xfrm/xfrm_state.c.rej 1 out of 2 hunks FAILED -- saving rejects to file include/net/xfrm.h.rej Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] 1 out of 1 hunk ignored -- saving rejects to file include/linux/net.h.rej =================================== Oh, I had tried patching the kernel both as userid me and as root (this is set up as a 'throughaway system', so if I mess up as root, I can just rebuild. The reason for trying with root is one of the developers does all his compiles as root in fc8, so I was trying to see if there was something specific to the setup that was not right for building as non-root. Well anyway, I just checked the system over for one of the 'reject' files: esp4.c.rej As userid me, it is in ~/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.8.i386/net/ipv4. As root it is in /usr/src/redhat/kernel-2.6.18/linux-2.6.8.i686/net/ipv4. Both versions ov esp4.c.rej appear identical.