1 |
maillog: 17/03/2004-18:55:05(-0500): Peter Johanson types |
2 |
> On Thu, Mar 18, 2004 at 08:47:30AM +0900, Georgi Georgiev wrote: |
3 |
> > maillog: 16/03/2004-10:00:45(-0500): Peter Johanson types |
4 |
> > > 3) config-kernel - A new tool for manipulating a few things relating to |
5 |
> > > your kernel environment. It is purely meant to affect the way your |
6 |
> > > kernels live on your system, and NOT for generating kernels, etc. |
7 |
> > > Features include: |
8 |
> > > - setting a prefix for kernel output (e.g. a new kernel |
9 |
> > > 2.6.4-mm1 will have it's output set to |
10 |
> > > /var/tmp/kernel-output/2.6.4-mm1). Users can choose a new prefix, or |
11 |
> > > disable using koutput using config-kernel. |
12 |
> > |
13 |
> > How exactly is this going to be implemented? Is the tool going to write to a |
14 |
> > config file or create a symlink /usr/src/linux-output for example? Don't forget |
15 |
> |
16 |
> All variables that affect things are going into /etc/env.d/05kernel |
17 |
> |
18 |
> |
19 |
> > that the user would have to still be able to easily compile a kernel on their |
20 |
> > own using the methods they are used to, i.e. make config, make menuconfig, make |
21 |
> |
22 |
> They *will*. Things will be mostly transparent to the user. When a new |
23 |
> kernel is installed, or if a user does "config-kernel --make-koutput |
24 |
> /usr/src/linux-2.6.4" the toplevel makefile is edited to add the line |
25 |
> KBUILD_OUTPUT=/var/tmp/kernel-output/$KV |
26 |
|
27 |
So, this one variable does not go into /etc/env.d/05kernel? In fact, if the |
28 |
variable is set in the environment, there is no need to set it in the makefile |
29 |
as well, right? The environment would override it anyway. |
30 |
|
31 |
> By adding this variable, when someone does: |
32 |
> # make menuconfig |
33 |
> in that source tree, all the output files end up wherever KBUILD_OUTPUT |
34 |
> points to. that's all it takes. You can run all the normal make commands |
35 |
> as normal, but things end up elsewhere. No nasty hacking. The below |
36 |
> stuff is unnessecary. |
37 |
> |
38 |
> When users want to override the output, *then* they can specify things |
39 |
> on the command line. A normal user wanting to build a kernel for some |
40 |
> Alpha box they have can do the following: |
41 |
> $ mkdir ~/kernel-output/2.6.4-alpha |
42 |
> $ cd /usr/src/linux-2.6.4 |
43 |
> $ make ARCH=alpha O=~/kernel-output/2.6.4-alpha menuconfig |
44 |
> $ make ARCH=alpha O=~/kernel-output/2.6.4-alpha |
45 |
> |
46 |
> And they've then built a kernel for an alpha (assuming they have the |
47 |
> toolchain in their PATH, etc, etc) against the sources they had no write |
48 |
> access to. |
49 |
> |
50 |
> This make sense? |
51 |
|
52 |
Sure does. |
53 |
|
54 |
The reason for the nasty hacking is because I wanted to be able to easily |
55 |
rebuild different versions (EXTRAVERSION-s) of a kernel using the same source. |
56 |
Setting KBUILD_OUTPUT only sounds as if someone could easily screw up. I mean, |
57 |
the user would have to run config-kernel *and* edit the version in the Makefile |
58 |
in the original source every time. I think this step could easily be moved to |
59 |
config-kernel. |
60 |
|
61 |
For example, config-kernel could derive the version from the output directory |
62 |
name (if we agree to a naming convention), and edit the versions in the |
63 |
Makefile every time. Or it could require more parameters on the command line? |
64 |
Or it could support optional parameters, and only when they are provided, it |
65 |
could edit the Makefile. It would also have to create a file in the output |
66 |
directory, so the next time, when a user switches back to a previously used |
67 |
KBUILD_OUTPUT directory, the old version is restored automatically. In fact, |
68 |
config-kernel could directly create the first five lines in |
69 |
$KBUILD_OUTPUT/Makefile if the file is not already there, and simply restore |
70 |
the lines if the file is available. |
71 |
|
72 |
I used too many words, but my point was that kernel version and output |
73 |
directory have to be consistent between switches. |
74 |
|
75 |
-- |
76 |
() Georgi Georgiev () Break into jail and claim police brutality. () |
77 |
() chutz@×××.net () () |
78 |
() +81(90)6266-1163 () () |