Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
customizing genkernel/installkernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
krotuss
Apprentice
Apprentice


Joined: 01 Aug 2008
Posts: 246

PostPosted: Wed Oct 16, 2024 11:13 am    Post subject: customizing genkernel/installkernel Reply with quote

Hi,

would it be possible to modify genkernel and installkernel to automate kernel build and install on architecture that is not supported out of the box? For example raspberry raspberry pi. I am interested in automating process described here here. Where it differs most from standard install is that there is extra make 'dtbs' target, and need to copy those dtb files to correct /boot location, rpi also uses different kernel image by default.
I expect that it should be possible and relatively easy, for somebody who knows what he's doing, but I didn't found it in any gentoo rpi guide. I have very little experience with those two packages, so I would be grateful for any advice about how to do it efficiently.
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 436
Location: Nijmegen

PostPosted: Wed Oct 16, 2024 12:12 pm    Post subject: Reply with quote

installkernel is mostly modular and can be customized to do basically anything using plugins. But genkernel does not use installkernel, it has its own kernel installation mechanism.
_________________
OS: Gentoo 6.10.12-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
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1297
Location: Richmond Hill, Canada

PostPosted: Wed Oct 16, 2024 1:58 pm    Post subject: Re: customizing genkernel/installkernel Reply with quote

krotuss wrote:
Hi,

would it be possible to modify genkernel and installkernel to automate kernel build and install on architecture that is not supported out of the box? For example raspberry raspberry pi. I am interested in automating process described here here. Where it differs most from standard install is that there is extra make 'dtbs' target, and need to copy those dtb files to correct /boot location, rpi also uses different kernel image by default.
I expect that it should be possible and relatively easy, for somebody who knows what he's doing, but I didn't found it in any gentoo rpi guide. I have very little experience with those two packages, so I would be grateful for any advice about how to do it efficiently.


Can't say for other arch. but for rpi, the current genkernel and installkernel will require major change in order accommodate rpi specific need.

for example if using source code, the mainline linux source code may be able to use but it is incomplete. so use RasberryPi released source in Gentoo mean it must be sys-kernel/raspberrypi-source which have slyly different naming so need changes in genkernel configuration and the build result store in different location and naming require more changes.

installkernel does not look at raspberrypi-source build result so it will need to know the build process is for rpi in order to know where to look for build result.

and the install destination can change so the automate install procedure need to accommodate changes outside of control.

all and all it is not as easy as you described.

However I believe the "installkernel" is the name that make call when told to install kernel, so you can write a version of your own to target rpi specific.
Back to top
View user's profile Send private message
krotuss
Apprentice
Apprentice


Joined: 01 Aug 2008
Posts: 246

PostPosted: Thu Oct 17, 2024 6:30 pm    Post subject: Re: customizing genkernel/installkernel Reply with quote

pingtoo wrote:

for example if using source code, the mainline linux source code may be able to use but it is incomplete. so use RasberryPi released source in Gentoo mean it must be sys-kernel/raspberrypi-source which have slyly different naming so need changes in genkernel configuration and the build result store in different location and naming require more changes.


I was able to successfully build raspberry kernel using genkernel just by adding --makeopts=dtbs, of course, then I had to manually copy dtb files to boot. Maybe this could be automated by simple postinst script, I am not sure if genkernel supports that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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