All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed
@ 2015-11-25 22:06 Tom Hochstein
  2015-11-26 11:37 ` Otavio Salvador
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Hochstein @ 2015-11-25 22:06 UTC (permalink / raw)
  To: meta-freescale

Changes to the kernel config can only be applied to the defconfig since
the do_configure_prepend in fsl-kernel-localversion.bbclass throws away
the build/.config file.

Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>
---
 classes/fsl-vivante-kernel-driver-handler.bbclass | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/classes/fsl-vivante-kernel-driver-handler.bbclass b/classes/fsl-vivante-kernel-driver-handler.bbclass
index 740638a..0890cdd 100644
--- a/classes/fsl-vivante-kernel-driver-handler.bbclass
+++ b/classes/fsl-vivante-kernel-driver-handler.bbclass
@@ -51,15 +51,11 @@ fsl_vivante_kernel_driver_handler[eventmask] = "bb.event.RecipePreFinalise"
 
 do_configure_prepend () {
     if [ "${MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT}" = "1" ]; then
-        fsl_viv_handler_defconfig="${WORKDIR}/defconfig"
-        if [ -e ${B}/.config ]; then
-            fsl_viv_handler_defconfig="${B}/.config"
-        fi
-        sed -i "/CONFIG_MXC_GPU_VIV[ =]/d" $fsl_viv_handler_defconfig
         if [ "${MACHINE_USES_VIVANTE_KERNEL_DRIVER_MODULE}" = "1" ]; then
-            echo "# CONFIG_MXC_GPU_VIV is not set" >> $fsl_viv_handler_defconfig
+            new_config="# CONFIG_MXC_GPU_VIV is not set"
         else
-            echo "CONFIG_MXC_GPU_VIV=y" >> $fsl_viv_handler_defconfig
+            new_config="CONFIG_MXC_GPU_VIV=y"
         fi
+        sed -i "s/.*CONFIG_MXC_GPU_VIV.*/$new_config/g" ${WORKDIR}/defconfig
     fi
 }
-- 
2.1.4



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

* Re: [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed
  2015-11-25 22:06 [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed Tom Hochstein
@ 2015-11-26 11:37 ` Otavio Salvador
  2015-12-10  0:44   ` Tom Hochstein
  2015-12-10  0:54   ` Tom Hochstein
  0 siblings, 2 replies; 5+ messages in thread
From: Otavio Salvador @ 2015-11-26 11:37 UTC (permalink / raw)
  To: Tom Hochstein; +Cc: meta-freescale

On Wed, Nov 25, 2015 at 8:06 PM, Tom Hochstein
<tom.hochstein@freescale.com> wrote:
> Changes to the kernel config can only be applied to the defconfig since
> the do_configure_prepend in fsl-kernel-localversion.bbclass throws away
> the build/.config file.
>
> Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>

I agree it can be simplified, but the prepend use here is what we
ought to change. We should use _append so if someone uses the in
source defconfig it will also work.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed
  2015-11-26 11:37 ` Otavio Salvador
@ 2015-12-10  0:44   ` Tom Hochstein
  2015-12-10  0:54   ` Tom Hochstein
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Hochstein @ 2015-12-10  0:44 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

Hi Otavio,

By 'in source defconfig', do you mean one in the recipe, as is done for linux-fslc? The fix does in fact already work for this case. I was actually working with linux-fslc when I discovered the bug.

Also, since kernel.bbclass processes the .config in do_configure, don't we have to use _prepend?

KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
kernel_do_configure() {
	...
	eval ${KERNEL_CONFIG_COMMAND}
}

Tom


-----Original Message-----
From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br] 
Sent: Thursday, November 26, 2015 5:38 AM
To: Hochstein Tom-R60874 <Tom.Hochstein@freescale.com>
Cc: meta-freescale@yoctoproject.org
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed

On Wed, Nov 25, 2015 at 8:06 PM, Tom Hochstein <tom.hochstein@freescale.com> wrote:
> Changes to the kernel config can only be applied to the defconfig 
> since the do_configure_prepend in fsl-kernel-localversion.bbclass 
> throws away the build/.config file.
>
> Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>

I agree it can be simplified, but the prepend use here is what we ought to change. We should use _append so if someone uses the in source defconfig it will also work.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

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

* Re: [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed
  2015-11-26 11:37 ` Otavio Salvador
  2015-12-10  0:44   ` Tom Hochstein
@ 2015-12-10  0:54   ` Tom Hochstein
  2015-12-10 16:40     ` Otavio Salvador
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Hochstein @ 2015-12-10  0:54 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

Oh, and just to be clear, this proposal is a bugfix, not just a simplification. The design as it was would not allow the user to change the kernel config with an incremental build.

Tom

-----Original Message-----
From: Hochstein Tom-R60874 
Sent: Wednesday, December 09, 2015 6:45 PM
To: 'Otavio Salvador' <otavio.salvador@ossystems.com.br>
Cc: meta-freescale@yoctoproject.org
Subject: RE: [meta-freescale] [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed

Hi Otavio,

By 'in source defconfig', do you mean one in the recipe, as is done for linux-fslc? The fix does in fact already work for this case. I was actually working with linux-fslc when I discovered the bug.

Also, since kernel.bbclass processes the .config in do_configure, don't we have to use _prepend?

KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
kernel_do_configure() {
	...
	eval ${KERNEL_CONFIG_COMMAND}
}

Tom


-----Original Message-----
From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br]
Sent: Thursday, November 26, 2015 5:38 AM
To: Hochstein Tom-R60874 <Tom.Hochstein@freescale.com>
Cc: meta-freescale@yoctoproject.org
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed

On Wed, Nov 25, 2015 at 8:06 PM, Tom Hochstein <tom.hochstein@freescale.com> wrote:
> Changes to the kernel config can only be applied to the defconfig 
> since the do_configure_prepend in fsl-kernel-localversion.bbclass 
> throws away the build/.config file.
>
> Signed-off-by: Tom Hochstein <tom.hochstein@freescale.com>

I agree it can be simplified, but the prepend use here is what we ought to change. We should use _append so if someone uses the in source defconfig it will also work.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

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

* Re: [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed
  2015-12-10  0:54   ` Tom Hochstein
@ 2015-12-10 16:40     ` Otavio Salvador
  0 siblings, 0 replies; 5+ messages in thread
From: Otavio Salvador @ 2015-12-10 16:40 UTC (permalink / raw)
  To: Tom Hochstein; +Cc: meta-freescale

On Wed, Dec 9, 2015 at 10:54 PM, Tom Hochstein
<Tom.Hochstein@freescale.com> wrote:
> Oh, and just to be clear, this proposal is a bugfix, not just a simplification. The design as it was would not allow the user to change the kernel config with an incremental build.

What I propose is:

http://patchwork.openembedded.org/patch/109673/

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

end of thread, other threads:[~2015-12-10 16:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 22:06 [meta-fsl-arm][PATCH] fsl-vivante-kernel-driver-handler.bbclass: Fix kernel config when graphics kernel module config is changed Tom Hochstein
2015-11-26 11:37 ` Otavio Salvador
2015-12-10  0:44   ` Tom Hochstein
2015-12-10  0:54   ` Tom Hochstein
2015-12-10 16:40     ` Otavio Salvador

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.