aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>2021-04-22 18:43:19 +0300
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2021-04-22 18:45:29 +0300
commitccbbcd8be95d663419a3d34e7e3698abafbed943 (patch)
tree9eb7e00646ca7cab7c9d642e48268e9625d6c687
parent7829b0f0f6919053c7f28ab54a97634d26a00106 (diff)
downloadmeta-qcom-ccbbcd8be95d663419a3d34e7e3698abafbed943.tar.gz
meta-qcom-ccbbcd8be95d663419a3d34e7e3698abafbed943.tar.bz2
meta-qcom-ccbbcd8be95d663419a3d34e7e3698abafbed943.zip
linux-linaro-qcom: simplify config handling
Simplify handling of kernel config: - call sed directly from kernel_conf_variable function - split do_confugure into prepend and append functions to be wrapped around kernel_do_configure (removing make oldconfig call) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-rw-r--r--recipes-kernel/linux/linux-linaro-qcom.inc18
1 files changed, 8 insertions, 10 deletions
diff --git a/recipes-kernel/linux/linux-linaro-qcom.inc b/recipes-kernel/linux/linux-linaro-qcom.inc
index d7d8b48..95959c6 100644
--- a/recipes-kernel/linux/linux-linaro-qcom.inc
+++ b/recipes-kernel/linux/linux-linaro-qcom.inc
@@ -27,7 +27,7 @@ KERNEL_CONFIG_FRAGMENTS += "${S}/kernel/configs/distro.config"
require recipes-kernel/linux/linux-qcom-bootimg.inc
kernel_conf_variable() {
- CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
+ sed -e "/CONFIG_$1[ =]/d;" -i ${B}/.config
if test "$2" = "n"
then
echo "# CONFIG_$1 is not set" >> ${B}/.config
@@ -37,18 +37,15 @@ kernel_conf_variable() {
}
do_configure_prepend() {
- echo "" > ${B}/.config
- CONF_SED_SCRIPT=""
-
- kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
- kernel_conf_variable LOCALVERSION_AUTO y
-
if [ -f '${WORKDIR}/defconfig' ]; then
- sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
+ cp '${WORKDIR}/defconfig' '${B}/.config'
else
- sed -e "${CONF_SED_SCRIPT}" < '${KERNEL_DEFCONFIG}' >> '${B}/.config'
+ cp '${KERNEL_DEFCONFIG}' '${B}/.config'
fi
+ kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
+ kernel_conf_variable LOCALVERSION_AUTO y
+
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
@@ -82,7 +79,8 @@ do_configure_prepend() {
# Now that all the fragments are located merge them.
( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
fi
+}
- yes '' | oe_runmake -C ${S} O=${B} oldconfig
+do_configure_append() {
oe_runmake -C ${S} O=${B} savedefconfig && cp ${B}/defconfig ${WORKDIR}/defconfig.saved
}