All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH master] kernel .inc: fix the breakage due to S!=B separation in master
@ 2015-02-27 19:49 Denys Dmytriyenko
  2015-02-27 21:29 ` Denys Dmytriyenko
  0 siblings, 1 reply; 2+ messages in thread
From: Denys Dmytriyenko @ 2015-02-27 19:49 UTC (permalink / raw)
  To: meta-ti

From: Denys Dmytriyenko <denys@ti.com>

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 recipes-kernel/linux/multi-kernel.inc    |  7 +++----
 recipes-kernel/linux/setup-defconfig.inc | 20 ++++++++++----------
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/recipes-kernel/linux/multi-kernel.inc b/recipes-kernel/linux/multi-kernel.inc
index b3358f9..5d21d4e 100644
--- a/recipes-kernel/linux/multi-kernel.inc
+++ b/recipes-kernel/linux/multi-kernel.inc
@@ -54,7 +54,7 @@ do_compileconfigs () {
 
         for configname in ${WORKDIR}/configs/* ; do
             # Copy in alternative config
-            cd ${S}
+            cd ${B}
             cp $configname ${WORKDIR}/defconfig
 
             # Build and Install this alternative kernel
@@ -96,7 +96,7 @@ do_compileconfigs () {
 
         # Restore the regular 'defconfig'
         cp ${WORKDIR}/defconfig.save ${WORKDIR}/defconfig
-        cd ${S}
+        cd ${B}
         do_configure
     fi
 }
@@ -106,8 +106,7 @@ do_deploy_append () {
     install -d ${DEPLOYDIR}
 
     # Drop the regular defconfig along side the others for consistency
-    cd ${S}
-    cp .config ${DEPLOYDIR}/config-${PV}-${PR}-${MACHINE}.config
+    cp ${B}/.config ${DEPLOYDIR}/config-${PV}-${PR}-${MACHINE}.config
 
     # add symlink
     cd ${DEPLOYDIR}
diff --git a/recipes-kernel/linux/setup-defconfig.inc b/recipes-kernel/linux/setup-defconfig.inc
index 2c169cd..2b67bfc 100644
--- a/recipes-kernel/linux/setup-defconfig.inc
+++ b/recipes-kernel/linux/setup-defconfig.inc
@@ -11,27 +11,27 @@ do_configure() {
     # Always copy the defconfig file to .config to keep consistency
     # between the case where there is a real config and the in kernel
     # tree config
-    cp ${WORKDIR}/defconfig ${S}/.config
+    cp ${WORKDIR}/defconfig ${B}/.config
 
     echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
     echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
 
     # First, check if pointing to a combined config with config fragments
-    config=`cat ${S}/.config | grep use-combined-config | cut -d= -f2`
+    config=`cat ${B}/.config | grep use-combined-config | cut -d= -f2`
     if [ -n "$config" ]
     then
-        cp $config ${S}/.config
+        cp ${S}/$config ${B}/.config
     fi
 
     # Second, extract any config fragments listed in the defconfig
-    config=`cat ${S}/.config | grep config-fragment | cut -d= -f2`
+    config=`cat ${B}/.config | grep config-fragment | cut -d= -f2`
     if [ -n "$config" ]
     then
         configfrags=""
         for f in $config
         do
             # Check if the config fragment is available
-            if [ ! -e "$f" ]
+            if [ ! -e "${S}/$f" ]
             then
                 echo "Could not find kernel config fragment $f"
                 exit 1
@@ -43,12 +43,12 @@ do_configure() {
     fi
 
     # Third, check if pointing to a known in kernel defconfig
-    config=`cat ${S}/.config | grep use-kernel-config | cut -d= -f2`
+    config=`cat ${B}/.config | grep use-kernel-config | cut -d= -f2`
     if [ -n "$config" ]
     then
-        oe_runmake $config
+        oe_runmake -C ${S} O=${B} $config
     else
-        yes '' | oe_runmake oldconfig
+        yes '' | oe_runmake -C ${S} O=${B} oldconfig
     fi
 
     # Fourth, handle config fragments specified in the recipe
@@ -70,7 +70,7 @@ do_configure() {
     # Now that all the fragments are located merge them
     if [ -n "${KERNEL_CONFIG_FRAGMENTS}" -o -n "$configfrags" ]
     then
-        ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config $configfrags ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
-        yes '' | oe_runmake oldconfig
+        ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config $configfrags ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
+        yes '' | oe_runmake -C ${S} O=${B} oldconfig
     fi
 }
-- 
2.2.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH master] kernel .inc: fix the breakage due to S!=B separation in master
  2015-02-27 19:49 [PATCH master] kernel .inc: fix the breakage due to S!=B separation in master Denys Dmytriyenko
@ 2015-02-27 21:29 ` Denys Dmytriyenko
  0 siblings, 0 replies; 2+ messages in thread
From: Denys Dmytriyenko @ 2015-02-27 21:29 UTC (permalink / raw)
  To: meta-ti

Actually, this change is generic enough and works fine on daisy, where B==S


On Fri, Feb 27, 2015 at 02:49:37PM -0500, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@ti.com>
> 
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  recipes-kernel/linux/multi-kernel.inc    |  7 +++----
>  recipes-kernel/linux/setup-defconfig.inc | 20 ++++++++++----------
>  2 files changed, 13 insertions(+), 14 deletions(-)
> 
> diff --git a/recipes-kernel/linux/multi-kernel.inc b/recipes-kernel/linux/multi-kernel.inc
> index b3358f9..5d21d4e 100644
> --- a/recipes-kernel/linux/multi-kernel.inc
> +++ b/recipes-kernel/linux/multi-kernel.inc
> @@ -54,7 +54,7 @@ do_compileconfigs () {
>  
>          for configname in ${WORKDIR}/configs/* ; do
>              # Copy in alternative config
> -            cd ${S}
> +            cd ${B}
>              cp $configname ${WORKDIR}/defconfig
>  
>              # Build and Install this alternative kernel
> @@ -96,7 +96,7 @@ do_compileconfigs () {
>  
>          # Restore the regular 'defconfig'
>          cp ${WORKDIR}/defconfig.save ${WORKDIR}/defconfig
> -        cd ${S}
> +        cd ${B}
>          do_configure
>      fi
>  }
> @@ -106,8 +106,7 @@ do_deploy_append () {
>      install -d ${DEPLOYDIR}
>  
>      # Drop the regular defconfig along side the others for consistency
> -    cd ${S}
> -    cp .config ${DEPLOYDIR}/config-${PV}-${PR}-${MACHINE}.config
> +    cp ${B}/.config ${DEPLOYDIR}/config-${PV}-${PR}-${MACHINE}.config
>  
>      # add symlink
>      cd ${DEPLOYDIR}
> diff --git a/recipes-kernel/linux/setup-defconfig.inc b/recipes-kernel/linux/setup-defconfig.inc
> index 2c169cd..2b67bfc 100644
> --- a/recipes-kernel/linux/setup-defconfig.inc
> +++ b/recipes-kernel/linux/setup-defconfig.inc
> @@ -11,27 +11,27 @@ do_configure() {
>      # Always copy the defconfig file to .config to keep consistency
>      # between the case where there is a real config and the in kernel
>      # tree config
> -    cp ${WORKDIR}/defconfig ${S}/.config
> +    cp ${WORKDIR}/defconfig ${B}/.config
>  
>      echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
>      echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
>  
>      # First, check if pointing to a combined config with config fragments
> -    config=`cat ${S}/.config | grep use-combined-config | cut -d= -f2`
> +    config=`cat ${B}/.config | grep use-combined-config | cut -d= -f2`
>      if [ -n "$config" ]
>      then
> -        cp $config ${S}/.config
> +        cp ${S}/$config ${B}/.config
>      fi
>  
>      # Second, extract any config fragments listed in the defconfig
> -    config=`cat ${S}/.config | grep config-fragment | cut -d= -f2`
> +    config=`cat ${B}/.config | grep config-fragment | cut -d= -f2`
>      if [ -n "$config" ]
>      then
>          configfrags=""
>          for f in $config
>          do
>              # Check if the config fragment is available
> -            if [ ! -e "$f" ]
> +            if [ ! -e "${S}/$f" ]
>              then
>                  echo "Could not find kernel config fragment $f"
>                  exit 1
> @@ -43,12 +43,12 @@ do_configure() {
>      fi
>  
>      # Third, check if pointing to a known in kernel defconfig
> -    config=`cat ${S}/.config | grep use-kernel-config | cut -d= -f2`
> +    config=`cat ${B}/.config | grep use-kernel-config | cut -d= -f2`
>      if [ -n "$config" ]
>      then
> -        oe_runmake $config
> +        oe_runmake -C ${S} O=${B} $config
>      else
> -        yes '' | oe_runmake oldconfig
> +        yes '' | oe_runmake -C ${S} O=${B} oldconfig
>      fi
>  
>      # Fourth, handle config fragments specified in the recipe
> @@ -70,7 +70,7 @@ do_configure() {
>      # Now that all the fragments are located merge them
>      if [ -n "${KERNEL_CONFIG_FRAGMENTS}" -o -n "$configfrags" ]
>      then
> -        ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${S} ${S}/.config $configfrags ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
> -        yes '' | oe_runmake oldconfig
> +        ( cd ${WORKDIR} && ${S}/scripts/kconfig/merge_config.sh -m -r -O ${B} ${B}/.config $configfrags ${KERNEL_CONFIG_FRAGMENTS} 1>&2 )
> +        yes '' | oe_runmake -C ${S} O=${B} oldconfig
>      fi
>  }
> -- 
> 2.2.0
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-27 21:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27 19:49 [PATCH master] kernel .inc: fix the breakage due to S!=B separation in master Denys Dmytriyenko
2015-02-27 21:29 ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.