mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-04 20:11:04 +02:00
fix(cros-kernel2.eclass): Disable OUTOFTREE_BUILD when src is dirty.
If OUTOFTREE_BUILD=1 (currently disabled but that will change) the kernel will use the existing checkout as the source tree rather than cloning another tree. If someone built anything in that tree and .config exists the build will fail complaining that the source isn't clean. Instead of failing just disable OUTOFTREE and emit a warning. OUTOFTREE combined with INCREMENTAL makes successive kernel builds pretty much no-ops (just re-linking modules and bzImage).
This commit is contained in:
parent
c83821a102
commit
0c0df75d69
@ -129,6 +129,14 @@ kmake() {
|
||||
}
|
||||
|
||||
cros-kernel2_src_unpack() {
|
||||
local srclocal="${CROS_WORKON_LOCALDIR[0]}/${CROS_WORKON_LOCALNAME[0]}"
|
||||
local srcpath="${CROS_WORKON_SRCROOT}/${srclocal}"
|
||||
if [[ -f "${srcpath}/.config" || -d "${srcpath}/include/config" ]]; then
|
||||
ewarn "Local kernel source is not clean, disabling OUTOFTREE_BUILD"
|
||||
elog "Please run 'make mrproper' in ${srclocal}"
|
||||
CROS_WORKON_OUTOFTREE_BUILD=0
|
||||
fi
|
||||
|
||||
cros-workon_src_unpack
|
||||
|
||||
local config="$(find_defconfig)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user