Skip to content

Linux#92

Merged
jkloetzke merged 3 commits intoBobBuildTool:masterfrom
sixtyfourktec:linux
May 16, 2025
Merged

Linux#92
jkloetzke merged 3 commits intoBobBuildTool:masterfrom
sixtyfourktec:linux

Conversation

@sixtyfourktec
Copy link
Contributor

No description provided.

@sixtyfourktec sixtyfourktec force-pushed the linux branch 3 times, most recently from 88af018 to 9c4e042 Compare May 12, 2025 14:30
Copy link
Member

@jkloetzke jkloetzke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

I'm wondering if we could not just put all the functions into the linux" class with the exception of linux::menuconfig`. They just declare functions so they could be in one class without interfering with each other...

Building linux is a common task required in most projects. Right now,
the kernel::linux recipe can be used for that. However, this builds a
fixed version from kernel.org, which will be not correct in a lot of
cases. Especially if one builds a project for a specific arm board, the
upstream kernel is most of the time not usable. Vendors of those boards
tend to provided there own BSP's, including a modified linux version. On
top of that, sometimes it is also required to make modifications which a
project specific.

In those cases I don't want to copy the linux.yaml all the time and make
local modifications. Instead provide a set of base class helper
functions, which make the task of compiling a linux kernel (and all
dependent task, like dtb handling) only a matter of adding a couple of
lines to the custom linux kernel recipe.

The new classes also add support by providing functions for a kmod
distribution. This allows building external kernel mode drivers against
the kernel in use.
@sixtyfourktec
Copy link
Contributor Author

sixtyfourktec commented May 15, 2025

Nice.

I'm wondering if we could not just put all the functions into the linux" class with the exception of linux::menuconfig`. They just declare functions so they could be in one class without interfering with each other...

modules.yaml also has a tool dependency. So we decided to keep this structure.

Copy link
Member

@jkloetzke jkloetzke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I still found two small things, though...

Switch the default kernel::linux recipe to use the new linux classes.
This also serves as an example on how they can be used.
Make it possible to override the linux kernel used in a project. Just
set CONFIG_SELECT_LINUX to your linux package. This recipe needs to
provide targets as seen in the virtual::kernel::linux package. For a
template on how this can look like, see the documentation in
classes/linux.yaml or recipes/kernel/linux.yaml.

Any recipe that has a dependency on the linux kernel should depend on
one of the targets defined here. This is especially true for any
external linux kernel mode driver.
@jkloetzke jkloetzke merged commit e4019ad into BobBuildTool:master May 16, 2025
1 check passed
@jkloetzke
Copy link
Member

Thanks!

@sixtyfourktec sixtyfourktec deleted the linux branch May 19, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants