Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] linux make modules fails
Date: Fri, 19 May 2006 04:13:42
Message-Id: 7573e9640605182054v21a8b6f0u2ab5f8dcc1dada76@mail.gmail.com
In Reply to: [gentoo-user] linux make modules fails by Justin Findlay
1 On 5/18/06, Justin Findlay <jfindlay@×××××.com> wrote:
2 > When I try to build the 'modules' target with linux it doesn't create
3 > the .ko files. It seems to get stuck at 'stage 2', whatever that
4 > means, and I am at a loss finding out what exactly stage 2 is, from
5 > looking at scripts/Makefile.modpost, and why it doesn't build.
6
7 It seems to me that the stage2 is what takes the .o files for all the
8 modules and converts them to .ko files. Here is an example from my
9 kernel build:
10
11 ------
12 carcharias linux # make CONFIG_CC_OPTIMIZE_FOR_SIZE=1 V=1 modules
13 rm -f .kernelrelease
14 echo 2.6.16-suspend2-r5 > .kernelrelease
15 if test ! /usr/src/linux-2.6.16-suspend2-r5 -ef
16 /usr/src/linux-2.6.16-suspend2-r5; then \
17 /bin/sh /usr/src/linux-2.6.16-suspend2-r5/scripts/mkmakefile
18 \
19 /usr/src/linux-2.6.16-suspend2-r5
20 /usr/src/linux-2.6.16-suspend2-r5 2 6 \
21 > /usr/src/linux-2.6.16-suspend2-r5/Makefile;
22 \
23 echo ' GEN
24 /usr/src/linux-2.6.16-suspend2-r5/Makefile'; \
25 fi
26 set -e; echo ' CHK include/linux/version.h'; mkdir -p
27 include/linux/; if [ `echo -n "2.6.16-suspend2-r5" | wc -c ` -gt
28 64 ]; then echo '"2.6.16-suspend2-r5" exceeds 64 characters' >&2; exit
29 1; fi; (echo \#define UTS_RELEASE \"2.6.16-suspend2-r5\"; echo
30 \#define LINUX_VERSION_CODE `expr 2 \\* 65536 + 6 \\* 256 + 16`; echo
31 '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; ) <
32 /usr/src/linux-2.6.16-suspend2-r5/Makefile >
33 include/linux/version.h.tmp; if [ -r include/linux/version.h ] && cmp
34 -s include/linux/version.h include/linux/version.h.tmp; then rm -f
35 include/linux/version.h.tmp; else echo ' UPD
36 include/linux/version.h'; mv -f include/linux/version.h.tmp
37 include/linux/version.h; fi
38 CHK include/linux/version.h
39 make -f scripts/Makefile.build obj=scripts/basic
40 rm -rf .tmp_versions
41 mkdir -p .tmp_versions
42 make -f scripts/Makefile.build obj=.
43 mkdir -p arch/i386/kernel/
44 make -f scripts/Makefile.build obj=scripts
45 make -f scripts/Makefile.build obj=scripts/genksyms
46 make -f scripts/Makefile.build obj=scripts/mod
47 make -f scripts/Makefile.build obj=init
48 ...
49 make -f scripts/Makefile.build obj=lib/zlib_deflate
50 make -f scripts/Makefile.build obj=lib/zlib_inflate
51 make -f scripts/Makefile.build obj=arch/i386/lib
52 Building modules, stage 2.
53 make -rR -f /usr/src/linux-2.6.16-suspend2-r5/scripts/Makefile.modpost
54 scripts/mod/modpost -m -o
55 /usr/src/linux-2.6.16-suspend2-r5/Module.symvers vmlinux
56 arch/i386/kernel/cpuid.o arch/i386/kernel/microcode.o
57 arch/i386/kernel/msr.o arch/i386/oprofile/oprofile.o crypto/arc4.o
58 crypto/michael_mic.o crypto/sha256.o drivers/base/firmware_class.o
59 drivers/block/pktcdvd.o drivers/char/genrtc.o
60 ...
61 ------
62
63 There are a lot more "make -f scripts/" lines, and a lot more modules
64 on the modpost command, than what I included here.
65
66 What is interesting to me is that your build didn't iterate through
67 the other obj= lines that I have.
68
69 > This happens with either a vanilla-sources or gentoo-sources kernel
70 > and doesn't happen when I try to build the gentoo kernel from within
71 > another system, like a knoppix liveCD.
72
73 Hmm, I see you are building an x86_64 kernel...is this being
74 cross-compiled? Are the other environments x86_64 architecture as
75 well? I guess posting your emerge --info output would be useful
76 here...
77
78 -Richard
79
80 --
81 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] linux make modules fails Justin Findlay <jfindlay@×××××.com>
Re: [gentoo-user] linux make modules fails Justin Findlay <jfindlay@×××××.com>