[yocto] [meta-raspberrypi][PATCH 1/1] linux-rpi: clean .config in before do_configure step

Piotr Lewicki piotr.lewicki at elfin.de
Fri Dec 16 04:04:19 PST 2016


Previously using bbappend files for linux-raspberrypi recipe did not allow to
use "kernel_configure_variable" function to set kernel config variables.
If user wanted to use it in his bbappend with "do_configure_prepend" it was
cleared afterwards. This patch moves cleaning to a separate step.
I'm unsure about whether CONF_SED_SCRIPT variable gets cleaned here. Please
verify this.

Signed-off-by: Piotr Lewicki <piotr.lewicki at elfin.de>
---
 recipes-kernel/linux/linux-rpi.inc | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/recipes-kernel/linux/linux-rpi.inc b/recipes-kernel/linux/linux-rpi.inc
index 95a9530..c665b9f 100644
--- a/recipes-kernel/linux/linux-rpi.inc
+++ b/recipes-kernel/linux/linux-rpi.inc
@@ -34,11 +34,13 @@ kernel_configure_variable() {
     fi
 }
 
-do_configure_prepend() {
+do_rpi_kconfig_clean() {
     # Clean .config
-    echo "" > ${B}/.config
+    echo -n "" > ${B}/.config
     CONF_SED_SCRIPT=""
+}
 
+do_configure_prepend() {
     # oabi / eabi support
     kernel_configure_variable AEABI y
     if [ "${ARM_KEEP_OABI}" = "1" ] ; then
@@ -124,8 +126,11 @@ do_configure_prepend() {
     # Keep this the last line
     # Remove all modified configs and add the rest to .config
     sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
+    # Clean variable- useful when calling configure step multiple times
+    CONF_SED_SCRIPT=""
 
     yes '' | oe_runmake oldconfig
+
 }
 
 # Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled
@@ -146,3 +151,5 @@ python () {
 
     configfile.close()
 }
+
+addtask rpi_kconfig_clean before do_configure after do_populate_lic
-- 
2.7.4




More information about the yocto mailing list