On 5/18/06, Justin Findlay <[EMAIL PROTECTED]> wrote:
When I try to build the 'modules' target with linux it doesn't create the .ko files. It seems to get stuck at 'stage 2', whatever that means, and I am at a loss finding out what exactly stage 2 is, from looking at scripts/Makefile.modpost, and why it doesn't build.
It seems to me that the stage2 is what takes the .o files for all the modules and converts them to .ko files. Here is an example from my kernel build: ------ carcharias linux # make CONFIG_CC_OPTIMIZE_FOR_SIZE=1 V=1 modules rm -f .kernelrelease echo 2.6.16-suspend2-r5 > .kernelrelease if test ! /usr/src/linux-2.6.16-suspend2-r5 -ef /usr/src/linux-2.6.16-suspend2-r5; then \ /bin/sh /usr/src/linux-2.6.16-suspend2-r5/scripts/mkmakefile \ /usr/src/linux-2.6.16-suspend2-r5 /usr/src/linux-2.6.16-suspend2-r5 2 6 \ > /usr/src/linux-2.6.16-suspend2-r5/Makefile; \ echo ' GEN /usr/src/linux-2.6.16-suspend2-r5/Makefile'; \ fi set -e; echo ' CHK include/linux/version.h'; mkdir -p include/linux/; if [ `echo -n "2.6.16-suspend2-r5" | wc -c ` -gt 64 ]; then echo '"2.6.16-suspend2-r5" exceeds 64 characters' >&2; exit 1; fi; (echo \#define UTS_RELEASE \"2.6.16-suspend2-r5\"; echo \#define LINUX_VERSION_CODE `expr 2 \\* 65536 + 6 \\* 256 + 16`; echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; ) < /usr/src/linux-2.6.16-suspend2-r5/Makefile > include/linux/version.h.tmp; if [ -r include/linux/version.h ] && cmp -s include/linux/version.h include/linux/version.h.tmp; then rm -f include/linux/version.h.tmp; else echo ' UPD include/linux/version.h'; mv -f include/linux/version.h.tmp include/linux/version.h; fi CHK include/linux/version.h make -f scripts/Makefile.build obj=scripts/basic rm -rf .tmp_versions mkdir -p .tmp_versions make -f scripts/Makefile.build obj=. mkdir -p arch/i386/kernel/ make -f scripts/Makefile.build obj=scripts make -f scripts/Makefile.build obj=scripts/genksyms make -f scripts/Makefile.build obj=scripts/mod make -f scripts/Makefile.build obj=init ... make -f scripts/Makefile.build obj=lib/zlib_deflate make -f scripts/Makefile.build obj=lib/zlib_inflate make -f scripts/Makefile.build obj=arch/i386/lib Building modules, stage 2. make -rR -f /usr/src/linux-2.6.16-suspend2-r5/scripts/Makefile.modpost scripts/mod/modpost -m -o /usr/src/linux-2.6.16-suspend2-r5/Module.symvers vmlinux arch/i386/kernel/cpuid.o arch/i386/kernel/microcode.o arch/i386/kernel/msr.o arch/i386/oprofile/oprofile.o crypto/arc4.o crypto/michael_mic.o crypto/sha256.o drivers/base/firmware_class.o drivers/block/pktcdvd.o drivers/char/genrtc.o ... ------ There are a lot more "make -f scripts/" lines, and a lot more modules on the modpost command, than what I included here. What is interesting to me is that your build didn't iterate through the other obj= lines that I have.
This happens with either a vanilla-sources or gentoo-sources kernel and doesn't happen when I try to build the gentoo kernel from within another system, like a knoppix liveCD.
Hmm, I see you are building an x86_64 kernel...is this being cross-compiled? Are the other environments x86_64 architecture as well? I guess posting your emerge --info output would be useful here... -Richard -- gentoo-user@gentoo.org mailing list