1 |
Hi Rich, |
2 |
|
3 |
Thank you for the input. I had the same puzzle, too. |
4 |
|
5 |
Rich Freeman <rich0@g.o> writes: |
6 |
|
7 |
> On Thu, Mar 22, 2018 at 12:07 AM, Benda Xu <heroxbd@g.o> wrote: |
8 |
>> |
9 |
>>> builds x86 linux kernel from source code present in /usr/src/linux |
10 |
>>> directory of Gentoo liveDVD |
11 |
>> |
12 |
>> This is not how Gentoo ebuild works, the build should prepare the source |
13 |
>> code. |
14 |
> |
15 |
> I don't want to derail whatever your goals are here, but IMO an ebuild |
16 |
> that actually builds a kernel would be useful. |
17 |
> |
18 |
> However, such an ebuild shouldn't touch /usr/src. If I were doing a |
19 |
> kernel build ebuild I'd have it fetch kernel sources like any other |
20 |
> package, then build it in the normal location, with configuration |
21 |
> options provided via USE flags or some default config, and then |
22 |
> install the final kernel in /boot. |
23 |
|
24 |
+1 |
25 |
|
26 |
> I realize that isn't how Gentoo has done it for the last 20 years, but |
27 |
> I've always thought that it would make sense to have a way to actually |
28 |
> maintain up-do-date kernels in the same manner as any other package, |
29 |
> with the /usr/src approach being an also-supported alternative. |
30 |
|
31 |
It's worth to know why we made such a choice. I took the status quo as |
32 |
is and have never thought carefully about it. |
33 |
|
34 |
> That said, there are complications. Some kernel modules want prepared |
35 |
> (or even built) sources and this approach would clean those after |
36 |
> install. |
37 |
|
38 |
We can have a USE flag to control whether the source should be installed |
39 |
along with the image. And those kernel module can claim their |
40 |
dependence on the USE flag. |
41 |
|
42 |
> Also, we'd probably need to use subslots for initramfs rebuilds or |
43 |
> something like that. I suspect this is why it hasn't been done yet. |
44 |
|
45 |
@Alice, any hints from the kernel team? |
46 |
|
47 |
> Again, I don't want to derail SoC with this unless there was an intent |
48 |
> to actually build a kernel this way... |
49 |
|
50 |
Well, thank you! That's why I wanted to keep the technical discussions |
51 |
related to GSOC public. It's always good to have our students to |
52 |
communicate with and learn from experts of Gentoo. Ultimately, the |
53 |
projects should be useful to the Gentoo community. |
54 |
|
55 |
Yours, |
56 |
Benda |