kernel-headers: platform/target patches are not applied

Martin Schiller ms at dev.tdt.de
Thu Jul 27 23:39:54 PDT 2023


Hi Felix,

On 2023-07-27 22:26, Felix Fietkau wrote:
> Hi Martin,
> 
> On 27.07.23 13:23, Martin Schiller wrote:
>> When preparing the kernel sources to build the kernel headers, 
>> currently
>> only the patches from the generic folder are applied, but not from the
>> actual selected target.
>> 
>> This is basically understandable if one assumes that one wants to use 
>> a
>> toolchain for different targets with the same architecture.
>> 
>> But if a target has a kernel patch which also changes the uapi, then
>> this is not considered in the toolchain/kernel-headers and thus when
>> compiling Userspace applications at the moment.
>> 
>> This is currently already the case for the following targets:
>> * ath79
>> * bcm27xx
>> * bcm63xx
>> * ipq40xx
>> * lantiq
>> * realtek
>> 
>> I am currently working on a new target, have now stumbled across this
>> problem and would now like to start a discussion here on how best to
>> solve this now.
>> 
>> I am looking forward to your ideas.
> 
> Packages that depend on target specific UAPI changes can always
> include kernel.mk in the package Makefile, make themselves non-shared
> and pull include files from $(LINUX_DIR)/user_headers
> 
> The default for all other packages should be to not rely on target
> specific UAPI changes.
> 
> - Felix

Yes, that is a viable way.

Thanks Felix for the quick answer!

- Martin



More information about the openwrt-devel mailing list