Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 771324

Summary: kernel-build.eclass: use SYSROOT for configs
Product: Gentoo Linux Reporter: David Michael <fedora.dm0>
Component: EclassesAssignee: Distribution Kernel Project <dist-kernel>
Status: CONFIRMED ---    
Severity: normal CC: dist-kernel
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description David Michael 2021-02-18 18:23:55 UTC
The eclass takes config fragments from BROOT:

https://github.com/gentoo/gentoo/blob/master/eclass/kernel-build.eclass#L220

This uses the same config files for the native system and cross-compiled kernels.  I think it should search SYSROOT for these build-time files, which allows for different configs for different targets.

I'm not sure the best way to express the path, maybe it has to do something like this to account for empty SYSROOT but nonempty EPREFIX:

test -n "${SYSROOT}" &&
local user_configs=( "${ESYSROOT}"/etc/kernel/config.d/*.config ) ||
local user_configs=( "${BROOT}"/etc/kernel/config.d/*.config )