diff options
| author | Darren Hart <dvhart@linux.intel.com> | 2011-02-08 14:31:23 -0800 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-02-09 22:44:52 +0000 |
| commit | ba163a43789e2e776737a7da11217796b6c0e362 (patch) | |
| tree | e752a1de89a7a20e29f03d1b29b5cf301d18a646 | |
| parent | 8d1b4fe2876f04ae7d5bb4818654d98f1afef91e (diff) | |
| download | poky-ba163a43789e2e776737a7da11217796b6c0e362.tar.gz | |
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>
| -rw-r--r-- | meta/classes/kernel.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 59de148cc8..2ae2dcbe5c 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
| @@ -188,8 +188,12 @@ sysroot_stage_all_append() { | |||
| 188 | sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel | 188 | sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | |||
| 192 | kernel_do_configure() { | 191 | kernel_do_configure() { |
| 192 | # Copy defconfig to .config if .config does not exist. This allows | ||
| 193 | # recipes to manage the .config themselves in do_configure_prepend(). | ||
| 194 | if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${S}/.config" ]; then | ||
| 195 | cp "${WORKDIR}/defconfig" "${S}/.config" | ||
| 196 | fi | ||
| 193 | yes '' | oe_runmake oldconfig | 197 | yes '' | oe_runmake oldconfig |
| 194 | } | 198 | } |
| 195 | 199 | ||
