Gentoo Archives: gentoo-sparc

From: Kumba <kumba@g.o>
To: gentoo-sparc@l.g.o
Subject: Re: [gentoo-sparc] Kernel 2.6.x config for SUN Blade 100
Date: Sun, 30 Oct 2005 23:34:38
Message-Id: 43655850.70204@gentoo.org
In Reply to: Re: [gentoo-sparc] Kernel 2.6.x config for SUN Blade 100 by jim@amarooas.com.au
1 jim@××××××××××××.au wrote:
2 >
3 > This is about building a kernel for sunblade 100 but remember I am not on
4 > gentoo, and am building upstream sources.
5 >
6 > Maybe your build system takes care of all this stuff for you?
7
8 The "build system" used for source trees used in portage primarily handles
9 unpacking, patching, and installing to /usr/src. After that, it's up to the
10 user to build the kernel themselves. We have an optional utility, genkernel,
11 for automating the kernel build system, but it's more commonly found in the
12 x86-side of things, and more used for building release media.
13
14
15 > The main thing is that a .config is not needed, as it is generated from the
16 > supplied sources and adapts itself to the build platform. It is OK for sunblade
17 > 100 "out of the box" subject to the following changes. Following updates and
18 > corrects previous posts done from memory
19
20 The .config file is actually generated by menuconfig after it runs. It
21 shouldn't exist in a properly cleaned tree (i.e., make mrproper). It's
22 generally created from the defconfig files that (iirc) are found in the
23 arch/<arch> directory under the kernel tree when the user selects it.
24
25
26
27 > In the end I got 2 errors.
28 >
29 > drivers/sbus/char/envctrl.c:41: error: static declaration of 'errno'
30 > follows non-static declaration
31 > include/linux/unistd.h:4: error: previous declaration of 'errno' was here
32 >
33 > and the "patch" actually just edit the file to remove that line:
34 >
35 > drivers/sbus/char/envctrl.c
36 > -static int errno;
37 > +//static int errno;
38 >
39 > Did same for drivers/sbus/char/bbc_envctrl.c
40 >
41 > That is quite useless except to quickly continue the building. The end result is
42 > a warning about those two modules during make modules_install.
43 >
44 > WARNING: /lib/modules/2.6.13.4/kernel/drivers/sbus/char/envctrl.ko needs unknow
45 > n symbol errno
46 > WARNING: /lib/modules/2.6.13.4/kernel/drivers/sbus/char/bbc.ko needs unknown sy
47 > mbol errno
48
49 It sounds like drivers/sbus/char/envctrl.c needs a uniquely-named errno
50 variable, or someone should check to see if the one imported from unistd.h is
51 usable in that context.
52
53 After for the symbol references, EXPORT_SYMBOL usually fixes those, but I do not
54 believe it is applicable for variables.
55
56
57 > If you have to do this next step make sure you do not overwrite anything!
58 > make install did not work. I just renamed them vmlinux-2.6.13.4 and
59 > System.map-2.6.13.4 and copied .config to config-2.6.13.4 and then copied those
60 > into /boot.
61
62 2.6 kernels can have the config built in and visible as /proc/config.gz. Also,
63 you do use `make image` and not `make vmlinux` for sparc64 kernels, right?
64
65
66 > and ran yaird from /boot
67 > yaird --verbose --output=/boot/initrd.img-2.6.13.4 2.6.13.4
68
69 Initrd's are becoming somewhat deprecated by initramfs. There are a number of
70 ways to build/use this, though, so it can be a little bit trickier than an initrd.
71
72
73
74 --Kumba
75
76 --
77 Gentoo/MIPS Team Lead
78 Gentoo Foundation Board of Trustees
79
80 "Such is oft the course of deeds that move the wheels of the world: small hands
81 do them because they must, while the eyes of the great are elsewhere." --Elrond
82 --
83 gentoo-sparc@g.o mailing list

Replies

Subject Author
Re: [gentoo-sparc] Kernel 2.6.x config for SUN Blade 100 jim@××××××××××××.au