1 |
On Thu, Mar 18, 2004 at 01:56:40PM +0900, Georgi Georgiev wrote: |
2 |
> maillog: 17/03/2004-19:51:12(-0500): Peter Johanson types |
3 |
> > Yeah, It hadn't occured to me to try to incorporate more than one |
4 |
> > EXTRAVERSION compile with this system. Doing things like this would get |
5 |
> > really complicated/messy, but this might be mitigated by making: |
6 |
> > KBUILD_OUTPUT= $KBUILD_OUTPUT_PREFIX/$MAJOR.$MINOR.$PATCHLEVEL$EXTRAVERSION |
7 |
> > So that this happens automagically. whenever you change EXTRAVERSION in |
8 |
> > the toplevel makefile. Only problem with that is the destination |
9 |
> > directory isn't guaranteed to exist if you do this. config-kernel could |
10 |
> > be extended to add a --set-extraversion foo which could handle all those |
11 |
> > particulars though. WOuld this be sufficient? |
12 |
> |
13 |
> If you had in mind that whenever I do |
14 |
> |
15 |
> # config-kernel --set-extraversion /usr/src/linux-build/2.6.4-x2 |
16 |
> |
17 |
> I would get |
18 |
> |
19 |
> # head -5 /usr/src/linux/Makefile |
20 |
> VERSION = 2 |
21 |
> PATCHLEVEL = 6 |
22 |
> SUBLEVEL = 4 |
23 |
> EXTRAVERSION = -x2 |
24 |
> KBUILD_OUTPUT=$(KBUILD_OUTPUT_PREFIX)/$(MAJOR).$(MINOR).$(PATCHLEVEL)$(EXTRAVERSION) |
25 |
> |
26 |
> then I can live with that. I even dare say it would be perfect. Plus, the |
27 |
> output directory would be created by config-kernel, so there is no worry about |
28 |
> it not existing. |
29 |
> |
30 |
|
31 |
Yes, the above is pretty much what i was proposing. Here's how i have it |
32 |
implemented (i'm actually 80% done with the code, gotta tidy up a bit |
33 |
and add the directory creation bits) |
34 |
|
35 |
# config-kernel --set-extraversion -pj1 |
36 |
|
37 |
which would only change the EXTRAVERSION value in |
38 |
/usr/src/linux/Makefile to whatever was chosen. So after this you would |
39 |
have |
40 |
|
41 |
MAJOR = 2 |
42 |
PATCHLEVEL = 6 |
43 |
SUBLEVEL = 4 |
44 |
EXTRAVERSION = -pj1 |
45 |
|
46 |
That's if we don't have any KBUILD_OUTPUT set at all. If that's the case |
47 |
then we're done here. If someone has configured themselves to use |
48 |
koutput, then either kernel-2.eclass or config-kernel --make-koutput |
49 |
will have made our original makefile look something like this (i think |
50 |
referencing the above vars in the KBUILD_OUTPUT line is key to this |
51 |
working): |
52 |
|
53 |
MAJOR = 2 |
54 |
PATCHLEVEL = 6 |
55 |
SUBLEVEL = 4 |
56 |
EXTRAVERSION = -mm1 |
57 |
KBUILD_OUTPUT=/var/tmp/kernel-output/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
58 |
|
59 |
It's not really feasible (or really desirable) to have the prefix part |
60 |
dependant on the environment once it is set for a particular instance of |
61 |
a kernel, IMHO. Once it's set for one kernel, we don't want this |
62 |
kernel's setup changing under our feet if we are doing things elsewhere. |
63 |
When running --set-extraversion with this setup, the exact same change |
64 |
happens as above, but since we have KBUIOD_OUTPUT set, we also make the |
65 |
new directory for the new EXTRAVERSION. |
66 |
|
67 |
This way you can seemlessly change the EXTRAVERSION and have a new |
68 |
output location, etc. |
69 |
|
70 |
|
71 |
> Or did you mean something like |
72 |
> |
73 |
> # config-kernel /usr/src/linux-build/ |
74 |
> |
75 |
> to set the prefix, probably only once, and later |
76 |
> |
77 |
> # config-kernel --set-extraversion -x2 |
78 |
> |
79 |
> to set EXTRAVERSION in /usr/src/linux/Makefile every time I switch kernels? The |
80 |
> output directory can still be created by config-kernel at the second step and |
81 |
> users would need to be advized to always use config-kernel and not change |
82 |
> EXTRAVERSION manually. This is not such a big problem though. |
83 |
> |
84 |
> -- |
85 |
> \ Georgi Georgiev \ "Never give in. Never give in. Never. Never. \ |
86 |
> / chutz@×××.net / Never." -- Winston Churchill / |
87 |
> \ +81(90)6266-1163 \ \ |
88 |
|
89 |
|
90 |
|
91 |
-- |
92 |
Peter Johanson |
93 |
<latexer@g.o> |
94 |
|
95 |
Key ID = 0x6EFA3917 |
96 |
Key fingerprint = A90A 2518 57B1 9D20 9B71 A2FF 8649 439B 6EFA 3917 |