summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-kernel/linux/linux-raspberrypi.inc36
1 files changed, 36 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
index 040cf88..47d7efa 100644
--- a/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -61,7 +61,43 @@ kernel_configure_variable() {
61 fi 61 fi
62} 62}
63 63
64config_setup() {
65 # From kernel.bbclass. Unfortunately, this is needed to support builds that
66 # use devtool. The reason is as follows:
67 #
68 # - In devtool builds, externalsrc.bbclass gets inherited and sets a list of
69 # SRCTREECOVEREDTASKS, which don't get run because they affect the source
70 # tree and, when using devtool, we want the developer's changes to be the
71 # single source of truth. kernel-yocto.bbclass adds do_kernel_configme to
72 # SRCTREECOVEREDTASKS, so it doesn't run in a devtool build., In a normal
73 # non-devtool build, do_kernel_configme creates ${B}.config.
74 #
75 # - Normally (e.g. in linux-yocto), it would be OK that do_kernel_configme
76 # doesn't run, because the first few lines of do_configure in kernel.bbclass
77 # populate ${B}.config from either ${S}.config (if it exists) for custom
78 # developer changes, or otherwise from ${WORDIR}/defconfig.
79 #
80 # - In linux-raspberrypi, we add do_configure_prepend, which tweaks
81 # ${B}.config. Since this runs *before* the kernel.bbclass do_configure,
82 # ${B}.config doesn't yet exist and we hit an error. Thus we need to move
83 # the logic from do_configure up to before our do_configure_prepend. Because
84 # we are copying only a portion of do_configure and not the whole thing,
85 # there is no clean way to do it using OE functionality, so we just
86 # copy-and-paste.
87 if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
88 mv "${S}/.config" "${B}/.config"
89 fi
90
91 # Copy defconfig to .config if .config does not exist. This allows
92 # recipes to manage the .config themselves in do_configure_prepend().
93 if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
94 cp "${WORKDIR}/defconfig" "${B}/.config"
95 fi
96}
97
64do_configure_prepend() { 98do_configure_prepend() {
99 config_setup
100
65 mv -f ${B}/.config ${B}/.config.patched 101 mv -f ${B}/.config ${B}/.config.patched
66 CONF_SED_SCRIPT="" 102 CONF_SED_SCRIPT=""
67 103