1 |
Ciaran McCreesh said: |
2 |
> Just a friendly reminder that you should really avoid messing around |
3 |
> with /usr/src/linux inside ebuilds. In particular, code like the |
4 |
> following is utterly wrong: |
5 |
<snip> |
6 |
> Don't try to do clever things with /usr/src/linux to determine whether a |
7 |
> kernel has a particular feature. Especially don't go near .config. The |
8 |
> kernel running may not be the kernel in /usr/src/linux. The box in |
9 |
> question might be a chroot setup or a netboot system or a system built |
10 |
> with a crosscompiler, in which case /usr/src/linux* won't exist at all. |
11 |
> The user might be sharing kernel binaries between dozens of identical |
12 |
> boxes and only building on one. The user might be building kernels |
13 |
> in/home to avoid having to build kernels as root or chown a bunch of |
14 |
> stuff. The /usr/src/linux symlink might be out of date. The box might be |
15 |
> building binary packages for a different system. |
16 |
|
17 |
Just a friendly response that kernel modules should build based on |
18 |
${ROOT}/usr/src/linux and not on the running kernel. Also other things |
19 |
that require a kernel should be using that symlink rather than the running |
20 |
kernel. That's how it's been in Gentoo in the past. The rationale is the |
21 |
ability to build things for a (or multiple) non-running kernel(s). |
22 |
|
23 |
The FAQ to which you refer only talks about not using the symlink for your |
24 |
headers, which is an entirely different thing from what I'm getting at. |
25 |
|
26 |
Donnie |
27 |
|
28 |
|
29 |
|
30 |
-- |
31 |
gentoo-dev@g.o mailing list |