Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to handle Kernel with a Binary Host
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Pipeng
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2013
Posts: 95

PostPosted: Tue Jul 02, 2024 9:46 pm    Post subject: How to handle Kernel with a Binary Host Reply with quote

Hi all!, I'm looking on mount a binary host for my laptop, from all the things above that, there is one in particular I can't found.

How do we handle the kernel? The kernel is compiled with genkernel using the config we want (lets skip the already compiled ones), so here comes the issue, to fully have a binary server, also needs to compile the kernel on the server, I found we can use Distcc for this task, just... is there any other options? Like compile in the server, and then just retrieve the new ones to install?

Thx!
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1761

PostPosted: Tue Jul 02, 2024 9:49 pm    Post subject: Reply with quote

Why not make a binpkg of sys-kernel/gentoo-kernel?
Back to top
View user's profile Send private message
Pipeng
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2013
Posts: 95

PostPosted: Tue Jul 02, 2024 10:07 pm    Post subject: Reply with quote

How that can be performed automatically?

the idea is use the custom kernel config/modules and microcodes.

Edited: Maybe I'm confused, does gentoo-kernel actually compiles with genkernel? so any change can be done there and the binpkg will be the same as using gentoo-sources?
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1761

PostPosted: Tue Jul 02, 2024 10:34 pm    Post subject: Reply with quote

sys-kernel/gentoo-kernel builds the kernel like a regular package. It does not use genkernel. See https://wiki.gentoo.org/wiki/Project:Distribution_Kernel.

A binpkg can be made and installed of it like any other package.
Back to top
View user's profile Send private message
Pipeng
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2013
Posts: 95

PostPosted: Tue Jul 02, 2024 10:46 pm    Post subject: Reply with quote

mm, seems very useful, just there is some options I can't found.

From generkernel I use 3 options, parallel compilations, maybe it uses the same make options as make.conf. Firmware folder to be added, and the microcodes ones.

The latest two things, can't found info about them... how can be customized?
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1761

PostPosted: Tue Jul 02, 2024 11:14 pm    Post subject: Reply with quote

The customisation is described in the wiki page I linked. gentoo-kernel builds using your regular make.conf CFLAGS and parallelisation and so on.

The firmware and microcode is handled via Dracut.
Back to top
View user's profile Send private message
Pipeng
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2013
Posts: 95

PostPosted: Wed Jul 03, 2024 2:42 pm    Post subject: Reply with quote

I'm checking dracut, it has a lot of options for modules, but for microcodes, it only allows to include all of them.... no info how to choose the microcodes to use....

Is there anywhere to look info for that?
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1850

PostPosted: Wed Jul 03, 2024 8:40 pm    Post subject: Reply with quote

Pipeng wrote:
I'm checking dracut, it has a lot of options for modules, but for microcodes, it only allows to include all of them.... no info how to choose the microcodes to use....

Is there anywhere to look info for that?


You can use savedconfig to include the necessary firmware and microcode in your kernel.

Best Regards,
Georgi
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 317
Location: Nijmegen

PostPosted: Thu Jul 04, 2024 8:52 am    Post subject: Reply with quote

Pipeng wrote:
I'm checking dracut, it has a lot of options for modules, but for microcodes, it only allows to include all of them.... no info how to choose the microcodes to use....


If "hostonly=yes" is in /etc/dracut.conf then dracut only includes the microcode for your CPU vendor (i.e. only the Intel or AMD microcode instead of both). To narrow it down even further you can omit non-relevant microcodes from installation using USE=savedconfig (AMD) and/or USE=hostonly (Intel) as previous poster also pointed out.
_________________
OS: Gentoo 6.8.10-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
Pipeng
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2013
Posts: 95

PostPosted: Fri Jul 05, 2024 2:51 pm    Post subject: Reply with quote

how is set cpu vendor for the objetive system?
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 317
Location: Nijmegen

PostPosted: Fri Jul 05, 2024 3:08 pm    Post subject: Reply with quote

Pipeng wrote:
how is set cpu vendor for the objetive system?


The microcode and initramfs images are generated locally by /sbin/installkernel, they are not part of the binpkg, so there is no need to tell a build host how you want the microcode/initramfs on the objective systems. If you want to ensure that the kernel is installed the same way on all target systems, simply ensure that the USE flag configuration of sys-kernel/installkernel and dracut's configuration match (you could even be fancy about this and write some ebuild that installs exactly the dracut configuration you want via portage).

There is actually a way to make an initramfs and UKI image that are part of the binpkg by enabling the "generic-uki" USE flag. But as the name of the flag implies, these images will be generic and are not customizable (they ignore local dracut and ukify configuration). So I don't think this is what you are looking for.
_________________
OS: Gentoo 6.8.10-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum