Patchwork kernel,cml1.bbclass: Move menuconfig to cml1

login
register
mail settings
Submitter Noor Ahsan
Date July 29, 2011, 12:24 p.m.
Message ID <1311942290-27217-1-git-send-email-noor_ahsan@mentor.com>
Download mbox | patch
Permalink /patch/8883/
State New, archived
Headers show

Comments

Noor Ahsan - July 29, 2011, 12:24 p.m.
* The menuconfig target exists in places other than the kernel that use kernel style config.

Signed-off-by: Noor, Ahsan <noor_ahsan@mentor.com>
---
 meta/classes/cml1.bbclass   |   12 ++++++++++++
 meta/classes/kernel.bbclass |   15 ---------------
 2 files changed, 12 insertions(+), 15 deletions(-)
Saul Wold - Aug. 2, 2011, 6:36 p.m.
On 07/29/2011 05:24 AM, Noor, Ahsan wrote:
> * The menuconfig target exists in places other than the kernel that use kernel style config.
>
> Signed-off-by: Noor, Ahsan<noor_ahsan@mentor.com>
> ---
>   meta/classes/cml1.bbclass   |   12 ++++++++++++
>   meta/classes/kernel.bbclass |   15 ---------------
>   2 files changed, 12 insertions(+), 15 deletions(-)
>
> diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
> index 79218b4..a747af5 100644
> --- a/meta/classes/cml1.bbclass
> +++ b/meta/classes/cml1.bbclass
> @@ -6,3 +6,15 @@ cml1_do_configure() {
>
>   EXPORT_FUNCTIONS do_configure
>   addtask configure after do_unpack do_patch before do_compile
> +
> +do_menuconfig() {
> +	export TERMWINDOWTITLE="${PN} Configuration"
> +	export SHELLCMDS="make menuconfig"
> +	${TERMCMDRUN}
> +	if [ $? -ne 0 ]; then
> +		oefatal "'${TERMCMD}' not found. Check TERMCMD variable."
> +	fi
> +}
> +do_menuconfig[nostamp] = "1"
> +addtask menuconfig after do_configure
> +
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 9c492a3..25d2629 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -197,21 +197,6 @@ kernel_do_configure() {
>
>   do_configure[depends] += "${INITRAMFS_TASK}"
>
> -do_menuconfig() {
> -        export DISPLAY='${DISPLAY}'
> -        export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
> -        export XAUTHORITY='${XAUTHORITY}'
> -	export TERMWINDOWTITLE="${PN} Kernel Configuration"
> -	export SHELLCMDS="make menuconfig"
> -	${TERMCMDRUN}
> -	if [ $? -ne 0 ]; then
> -		echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable."
> -		exit 1
> -	fi
> -}
> -do_menuconfig[nostamp] = "1"
> -addtask menuconfig after do_configure
> -
>   pkg_postinst_kernel () {
>   	cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
>   }

I think this patch will break the linux-* recipes if someone tries to 
use the menuconfig task.

I think you need to also modify the linux-* recipes that currently 
inherit kernel to also include cmd1

Thanks
	Sau!
Koen Kooi - Aug. 2, 2011, 6:41 p.m.
Op 2 aug. 2011, om 20:36 heeft Saul Wold het volgende geschreven:

> On 07/29/2011 05:24 AM, Noor, Ahsan wrote:
>> * The menuconfig target exists in places other than the kernel that use kernel style config.
>> 
>> Signed-off-by: Noor, Ahsan<noor_ahsan@mentor.com>
>> ---
>>  meta/classes/cml1.bbclass   |   12 ++++++++++++
>>  meta/classes/kernel.bbclass |   15 ---------------
>>  2 files changed, 12 insertions(+), 15 deletions(-)
>> 
>> diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
>> index 79218b4..a747af5 100644
>> --- a/meta/classes/cml1.bbclass
>> +++ b/meta/classes/cml1.bbclass
>> @@ -6,3 +6,15 @@ cml1_do_configure() {
>> 
>>  EXPORT_FUNCTIONS do_configure
>>  addtask configure after do_unpack do_patch before do_compile
>> +
>> +do_menuconfig() {
>> +	export TERMWINDOWTITLE="${PN} Configuration"
>> +	export SHELLCMDS="make menuconfig"
>> +	${TERMCMDRUN}
>> +	if [ $? -ne 0 ]; then
>> +		oefatal "'${TERMCMD}' not found. Check TERMCMD variable."
>> +	fi
>> +}
>> +do_menuconfig[nostamp] = "1"
>> +addtask menuconfig after do_configure
>> +
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index 9c492a3..25d2629 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -197,21 +197,6 @@ kernel_do_configure() {
>> 
>>  do_configure[depends] += "${INITRAMFS_TASK}"
>> 
>> -do_menuconfig() {
>> -        export DISPLAY='${DISPLAY}'
>> -        export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
>> -        export XAUTHORITY='${XAUTHORITY}'
>> -	export TERMWINDOWTITLE="${PN} Kernel Configuration"
>> -	export SHELLCMDS="make menuconfig"
>> -	${TERMCMDRUN}
>> -	if [ $? -ne 0 ]; then
>> -		echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable."
>> -		exit 1
>> -	fi
>> -}
>> -do_menuconfig[nostamp] = "1"
>> -addtask menuconfig after do_configure
>> -
>>  pkg_postinst_kernel () {
>>  	cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
>>  }
> 
> I think this patch will break the linux-* recipes if someone tries to use the menuconfig task.
> 
> I think you need to also modify the linux-* recipes that currently inherit kernel to also include cmd1

or make kernel.bbclass inherit it?
Phil Blundell - Aug. 2, 2011, 6:45 p.m.
On Tue, 2011-08-02 at 11:36 -0700, Saul Wold wrote:
> I think this patch will break the linux-* recipes if someone tries to 
> use the menuconfig task.
> 
> I think you need to also modify the linux-* recipes that currently 
> inherit kernel to also include cmd1

kernel.bbclass already does "inherit cml1" so I think it should be fine.

p.
Saul Wold - Aug. 2, 2011, 6:47 p.m.
On 08/02/2011 11:45 AM, Phil Blundell wrote:
> On Tue, 2011-08-02 at 11:36 -0700, Saul Wold wrote:
>> I think this patch will break the linux-* recipes if someone tries to
>> use the menuconfig task.
>>
>> I think you need to also modify the linux-* recipes that currently
>> inherit kernel to also include cmd1
>
> kernel.bbclass already does "inherit cml1" so I think it should be fine.
>
Thanks, missed that, searched other places, but did not notice it there!

Issue resolved, will pull it now.

Sau!

> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Saul Wold - Aug. 4, 2011, 2:54 p.m.
On 07/29/2011 05:24 AM, Noor, Ahsan wrote:
> * The menuconfig target exists in places other than the kernel that use kernel style config.
>
> Signed-off-by: Noor, Ahsan<noor_ahsan@mentor.com>
> ---
>   meta/classes/cml1.bbclass   |   12 ++++++++++++
>   meta/classes/kernel.bbclass |   15 ---------------
>   2 files changed, 12 insertions(+), 15 deletions(-)
>
> diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
> index 79218b4..a747af5 100644
> --- a/meta/classes/cml1.bbclass
> +++ b/meta/classes/cml1.bbclass
> @@ -6,3 +6,15 @@ cml1_do_configure() {
>
>   EXPORT_FUNCTIONS do_configure
>   addtask configure after do_unpack do_patch before do_compile
> +
> +do_menuconfig() {
> +	export TERMWINDOWTITLE="${PN} Configuration"
> +	export SHELLCMDS="make menuconfig"
> +	${TERMCMDRUN}
> +	if [ $? -ne 0 ]; then
> +		oefatal "'${TERMCMD}' not found. Check TERMCMD variable."
> +	fi
> +}
> +do_menuconfig[nostamp] = "1"
> +addtask menuconfig after do_configure
> +
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 9c492a3..25d2629 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -197,21 +197,6 @@ kernel_do_configure() {
>
>   do_configure[depends] += "${INITRAMFS_TASK}"
>
> -do_menuconfig() {
> -        export DISPLAY='${DISPLAY}'
> -        export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
> -        export XAUTHORITY='${XAUTHORITY}'
> -	export TERMWINDOWTITLE="${PN} Kernel Configuration"
> -	export SHELLCMDS="make menuconfig"
> -	${TERMCMDRUN}
> -	if [ $? -ne 0 ]; then
> -		echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable."
> -		exit 1
> -	fi
> -}
> -do_menuconfig[nostamp] = "1"
> -addtask menuconfig after do_configure
> -
>   pkg_postinst_kernel () {
>   	cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
>   }

Merged into OE-Core

Thanks
	Sau!

Patch

diff --git a/meta/classes/cml1.bbclass b/meta/classes/cml1.bbclass
index 79218b4..a747af5 100644
--- a/meta/classes/cml1.bbclass
+++ b/meta/classes/cml1.bbclass
@@ -6,3 +6,15 @@  cml1_do_configure() {
 
 EXPORT_FUNCTIONS do_configure
 addtask configure after do_unpack do_patch before do_compile
+
+do_menuconfig() {
+	export TERMWINDOWTITLE="${PN} Configuration"
+	export SHELLCMDS="make menuconfig"
+	${TERMCMDRUN}
+	if [ $? -ne 0 ]; then
+		oefatal "'${TERMCMD}' not found. Check TERMCMD variable."
+	fi
+}
+do_menuconfig[nostamp] = "1"
+addtask menuconfig after do_configure
+
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 9c492a3..25d2629 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -197,21 +197,6 @@  kernel_do_configure() {
 
 do_configure[depends] += "${INITRAMFS_TASK}"
 
-do_menuconfig() {
-        export DISPLAY='${DISPLAY}'
-        export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
-        export XAUTHORITY='${XAUTHORITY}'
-	export TERMWINDOWTITLE="${PN} Kernel Configuration"
-	export SHELLCMDS="make menuconfig"
-	${TERMCMDRUN}
-	if [ $? -ne 0 ]; then
-		echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable."
-		exit 1
-	fi
-}
-do_menuconfig[nostamp] = "1"
-addtask menuconfig after do_configure
-
 pkg_postinst_kernel () {
 	cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
 }