Bug 15551 - Linux extensions are not applied to linux-headers package
Summary: Linux extensions are not applied to linux-headers package
Status: RESOLVED MOVED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2023.02
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-27 09:38 UTC by Bradley Gamble
Modified: 2024-06-15 15:08 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments
Example of the difference between the linux and linux-headers trees following an extension being applied. (973 bytes, patch)
2023-04-27 09:38 UTC, Bradley Gamble
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bradley Gamble 2023-04-27 09:38:23 UTC
Created attachment 9586 [details]
Example of the difference between the linux and linux-headers trees following an extension being applied.

Linux extensions are a mechanism for providing new features through modification to the Linux kernel tree. This is usually in the form of patches or new files from an out-of-tree source. (See Buildroot manual section 18.22.2. linux-kernel-extensions).

Currently during a build the Linux extensions are applied to the linux source tree, but not the linux-headers source tree. In comparison, the global and Linux patch directories are applied to both the linux and linux-headers source trees. This can lead issues where the source of the linux-headers does not represent the kernel running on the target - For example, linux-headers is consumed by most C libraries.

I have encountered this when attempting to write a patch that modifies an applied kernel extension. The patch fails to apply to linux-headers as the source files added by the extension do not exist.

This can be reproduced this by enabling a Linux extension (I've tested with fbtft and ev3dev-linux-drivers) and performing a build, then comparing the linux and linux-headers build directories - I have attached a diff example showing the additions in one source tree but not the other.
Comment 1 Yann E. MORIN 2024-06-15 15:08:21 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!