1 |
On Thu, Mar 22, 2018 at 12:07 AM, Benda Xu <heroxbd@g.o> wrote: |
2 |
> |
3 |
>> builds x86 linux kernel from source code present in /usr/src/linux |
4 |
>> directory of Gentoo liveDVD |
5 |
> |
6 |
> This is not how Gentoo ebuild works, the build should prepare the source |
7 |
> code. |
8 |
> |
9 |
|
10 |
I don't want to derail whatever your goals are here, but IMO an ebuild |
11 |
that actually builds a kernel would be useful. |
12 |
|
13 |
However, such an ebuild shouldn't touch /usr/src. If I were doing a |
14 |
kernel build ebuild I'd have it fetch kernel sources like any other |
15 |
package, then build it in the normal location, with configuration |
16 |
options provided via USE flags or some default config, and then |
17 |
install the final kernel in /boot. |
18 |
|
19 |
I realize that isn't how Gentoo has done it for the last 20 years, but |
20 |
I've always thought that it would make sense to have a way to actually |
21 |
maintain up-do-date kernels in the same manner as any other package, |
22 |
with the /usr/src approach being an also-supported alternative. |
23 |
|
24 |
That said, there are complications. Some kernel modules want prepared |
25 |
(or even built) sources and this approach would clean those after |
26 |
install. Also, we'd probably need to use subslots for initramfs |
27 |
rebuilds or something like that. I suspect this is why it hasn't been |
28 |
done yet. |
29 |
|
30 |
Again, I don't want to derail SoC with this unless there was an intent |
31 |
to actually build a kernel this way... |
32 |
|
33 |
-- |
34 |
Rich |