Trying to apply patches to the current kernel and recompile, however it fails on:
[code]
CC [M] crypto/xor.o
CC block/elevator.o
CC block/blk-core.o
CC block/blk-tag.o
CC block/blk-sysfs.o
CC block/blk-barrier.o
CC block/blk-settings.o
CC block/blk-ioc.o
CC block/blk-map.o
cc1: warnings being treated as errors
block/blk-map.c: In function â__blk_rq_map_kern_sgâ:
block/blk-map.c:397: error: âresâ may be used uninitialized in this function
make[1]: *** [block/blk-map.o] Error 1
make: *** [block] Error 2
[/code]
Steps to recompile:
Prepare..
[code]
# yum install rpm-build redhat-rpm-config unifdef
# su - user
# cd
# mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# echo '%_topdir %(echo $HOME)/rpmbuild' > .rpmmacros
# rpm -ihttp://mirror.centos.org/centos/6/updates/SRPMS/kernel-2.6.32-71.29.1.el6.src.rpm
# cd ~/rpmbuild/SPECS
# rpmbuild -bp --target=`uname -m` kernel.spec 2> prep-err.log | tee prep-out.log
[/code]
then i copy my kernel source to /usr/src/kernels
[code]
#cp -Rf /home/raph/kernel/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.x86_64 /usr/src/kernels/
[/code]
I apply my patches, in this case it's for SCST, then try copy my current 2.6.32-71-29.1 running .config
[code]
#cp /boot/config-`uname -r` ./.config
[/code]
now here comes the failure.. trying to make
[code]
make && make modules
.........
CC [M] crypto/xor.o
CC block/elevator.o
CC block/blk-core.o
CC block/blk-tag.o
CC block/blk-sysfs.o
CC block/blk-barrier.o
CC block/blk-settings.o
CC block/blk-ioc.o
CC block/blk-map.o
cc1: warnings being treated as errors
block/blk-map.c: In function â__blk_rq_map_kern_sgâ:
block/blk-map.c:397: error: âresâ may be used uninitialized in this function
make[1]: *** [block/blk-map.o] Error 1
make: *** [block] Error 2
[/code]
I get the same error if I DONT apply the SCST kernel patches .. any ideas? has anyone successfully re-compiled this kernel for centos? thanks so much in advanced!
can''t recompile kernel 2.6.32-71.29.1.el6.x86_64
Re: can''t recompile kernel 2.6.32-71.29.1.el6.x86_64
I set res to -EINVAL:
int res = -EINVAL;
since it is possible to return from __blk_rq_map_kern_sg without ever touching res.
I was going to set it to 0, but that might mean success. didn't look into it much though.
int res = -EINVAL;
since it is possible to return from __blk_rq_map_kern_sg without ever touching res.
I was going to set it to 0, but that might mean success. didn't look into it much though.
Re: can''t recompile kernel 2.6.32-71.29.1.el6.x86_64
[quote]
gmcc78 wrote:
I set res to -EINVAL:
int res = -EINVAL;
since it is possible to return from __blk_rq_map_kern_sg without ever touching res.
I was going to set it to 0, but that might mean success. didn't look into it much though.[/quote]
Thanks for your reply - still trying to figure this out (aka stumped). Not to sound silly here but I have no idea what you're talking about.. are there make arguments to add? or specific file to modify to "set res to -EIVAL:".
thanks again!
gmcc78 wrote:
I set res to -EINVAL:
int res = -EINVAL;
since it is possible to return from __blk_rq_map_kern_sg without ever touching res.
I was going to set it to 0, but that might mean success. didn't look into it much though.[/quote]
Thanks for your reply - still trying to figure this out (aka stumped). Not to sound silly here but I have no idea what you're talking about.. are there make arguments to add? or specific file to modify to "set res to -EIVAL:".
thanks again!
Re: can''t recompile kernel 2.6.32-71.29.1.el6.x86_64
I had the same problem, and changing the
int res;
to
int res = -EINVAL;
in the scst_exec_req_fifo-2.6.32.patch fixes the problem.
But now i have another error, that comes from applying the put_page_callback-2.6.32.patch :
/root/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.x86_64/usr/include/linux/net.h:23: included file 'linux/mm.h' is not exported
make[3]: *** [/root/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.x86_64/usr/include/linux/.check] Error 123
make[2]: *** [linux] Error 2
make[1]: *** [headers_check] Error 2
make: *** [vmlinux] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.GR3tgG (%build)
int res;
to
int res = -EINVAL;
in the scst_exec_req_fifo-2.6.32.patch fixes the problem.
But now i have another error, that comes from applying the put_page_callback-2.6.32.patch :
/root/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.x86_64/usr/include/linux/net.h:23: included file 'linux/mm.h' is not exported
make[3]: *** [/root/rpmbuild/BUILD/kernel-2.6.32-71.29.1.el6/linux-2.6.32-71.29.1.el6.x86_64/usr/include/linux/.check] Error 123
make[2]: *** [linux] Error 2
make[1]: *** [headers_check] Error 2
make: *** [vmlinux] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.GR3tgG (%build)
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
can''t recompile kernel 2.6.32-71.29.1.el6.x86_64
[b]mvrk[/b] please review the recommended reading to understand why you should not hijack threads as you have done. Please start a new Topic for your issue to get the attention you need, providing a link to this one if required for context.