kernel.bbclass: use defconfig if it exists
It is common enough to want to apply a defconfig if the inheriting recipe provides it. If the file exists in the $WORKDIR, copy it over to ${S}/.config provided the target does not already exist. This allows for recipes derived from kernel.bbclass to manage the .config on their own, such as linux.inc. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
parent
8d1b4fe287
commit
ba163a4378
|
@ -188,8 +188,12 @@ sysroot_stage_all_append() {
|
||||||
sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel
|
sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
kernel_do_configure() {
|
kernel_do_configure() {
|
||||||
|
# Copy defconfig to .config if .config does not exist. This allows
|
||||||
|
# recipes to manage the .config themselves in do_configure_prepend().
|
||||||
|
if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${S}/.config" ]; then
|
||||||
|
cp "${WORKDIR}/defconfig" "${S}/.config"
|
||||||
|
fi
|
||||||
yes '' | oe_runmake oldconfig
|
yes '' | oe_runmake oldconfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue