All of lore.kernel.org
 help / color / mirror / Atom feed
* running task only for native but not target?
@ 2015-03-12 19:05 Koehler, Yannick (HP Networking)
  2015-03-13  9:01 ` Paul Eggleton
  0 siblings, 1 reply; 5+ messages in thread
From: Koehler, Yannick (HP Networking) @ 2015-03-12 19:05 UTC (permalink / raw)
  To: yocto

I have a package that produce a binary that I need for native, and an C header file that I need for target.

I put the following do_install function to install appropriately the bin or header according to the class:

	do_install_append_class-target () {
	        install -d ${D}${includedir}
	        install -m 0755 ${S}/ifrpc.h ${D}${includedir}
	}

	do_install_append_class-native() {
	        install -d ${D}${bindir}
	        install -m 0755 ${S}/ifrpcgen ${D}${bindir}
	}

but is there a way for me to disable do_patch/do_configure/do_compile only when building for the target?  I have tried the following without success:

	do_configure_class-target[noexec] = "1"
	do_patch_class-target[noexec] = "1"
	do_compile_class-target[noexec] = "1"

It appears the OVERRIDES do not apply here, any hint on how I can achieve this?

--
Yannick Koehler




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

* Re: running task only for native but not target?
  2015-03-12 19:05 running task only for native but not target? Koehler, Yannick (HP Networking)
@ 2015-03-13  9:01 ` Paul Eggleton
  2015-03-13 11:46   ` Koehler, Yannick (HP Networking)
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2015-03-13  9:01 UTC (permalink / raw)
  To: Koehler, Yannick (HP Networking); +Cc: yocto

Hi Yannick,

On Thursday 12 March 2015 19:05:13 Koehler, Yannick wrote:
> I have a package that produce a binary that I need for native, and an C
> header file that I need for target.
> 
> I put the following do_install function to install appropriately the bin or
> header according to the class:
> 
> 	do_install_append_class-target () {
> 	        install -d ${D}${includedir}
> 	        install -m 0755 ${S}/ifrpc.h ${D}${includedir}
> 	}
> 
> 	do_install_append_class-native() {
> 	        install -d ${D}${bindir}
> 	        install -m 0755 ${S}/ifrpcgen ${D}${bindir}
> 	}
> 
> but is there a way for me to disable do_patch/do_configure/do_compile only
> when building for the target?  I have tried the following without success:
> 
> 	do_configure_class-target[noexec] = "1"
> 	do_patch_class-target[noexec] = "1"
> 	do_compile_class-target[noexec] = "1"
> 
> It appears the OVERRIDES do not apply here, any hint on how I can achieve
> this?

Probably the easiest way would be to just null out the tasks just for the 
target class i.e.

do_configure_class-target () {
   :
}

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: running task only for native but not target?
  2015-03-13  9:01 ` Paul Eggleton
@ 2015-03-13 11:46   ` Koehler, Yannick (HP Networking)
  2015-03-13 11:50     ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Koehler, Yannick (HP Networking) @ 2015-03-13 11:46 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto

Hi Paul,

  Thanks, yes that is likely to work, I will try it.  I was looking for a more Yocto-like solution using the overriding stuff but it seems the overriding doesn't apply in this particular situation.

Yannick Koehler

-----Message d'origine-----
De : Paul Eggleton [mailto:paul.eggleton@linux.intel.com] 
Envoyé : March-13-15 5:02 AM
À : Koehler, Yannick (HP Networking)
Cc : yocto@yoctoproject.org
Objet : Re: [yocto] running task only for native but not target?

Hi Yannick,

On Thursday 12 March 2015 19:05:13 Koehler, Yannick wrote:
> I have a package that produce a binary that I need for native, and an 
> C header file that I need for target.
> 
> I put the following do_install function to install appropriately the 
> bin or header according to the class:
> 
> 	do_install_append_class-target () {
> 	        install -d ${D}${includedir}
> 	        install -m 0755 ${S}/ifrpc.h ${D}${includedir}
> 	}
> 
> 	do_install_append_class-native() {
> 	        install -d ${D}${bindir}
> 	        install -m 0755 ${S}/ifrpcgen ${D}${bindir}
> 	}
> 
> but is there a way for me to disable do_patch/do_configure/do_compile 
> only when building for the target?  I have tried the following without success:
> 
> 	do_configure_class-target[noexec] = "1"
> 	do_patch_class-target[noexec] = "1"
> 	do_compile_class-target[noexec] = "1"
> 
> It appears the OVERRIDES do not apply here, any hint on how I can 
> achieve this?

Probably the easiest way would be to just null out the tasks just for the target class i.e.

do_configure_class-target () {
   :
}

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: running task only for native but not target?
  2015-03-13 11:46   ` Koehler, Yannick (HP Networking)
@ 2015-03-13 11:50     ` Burton, Ross
  2015-03-13 12:48       ` Koehler, Yannick (HP Networking)
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2015-03-13 11:50 UTC (permalink / raw)
  To: Koehler, Yannick (HP Networking); +Cc: Paul Eggleton, yocto

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

On 13 March 2015 at 11:46, Koehler, Yannick (HP Networking) <
yannick.koehler@hp.com> wrote:

>   Thanks, yes that is likely to work, I will try it.  I was looking for a
> more Yocto-like solution using the overriding stuff but it seems the
> overriding doesn't apply in this particular situation.
>

An alternative solution would be to build everything all the time, and
package correctly so that you don't install unrequired binaries on the
target.

Ross

[-- Attachment #2: Type: text/html, Size: 863 bytes --]

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

* Re: running task only for native but not target?
  2015-03-13 11:50     ` Burton, Ross
@ 2015-03-13 12:48       ` Koehler, Yannick (HP Networking)
  0 siblings, 0 replies; 5+ messages in thread
From: Koehler, Yannick (HP Networking) @ 2015-03-13 12:48 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Paul Eggleton, yocto

I believe this is the actual solution I am using, the tasks are always executed but my install steps differ and only install the appropriate file, which in turn I believe generate appropriate packages.  That works too, but I do not want to get into issues where the build on the target fails due to arch issue and having to pull unnecessary dependency packages on my target and lost cpu cycle.  But it would still work, which is why I am using it but looking for an alternative.
 
Yannick Koehler

De : Burton, Ross [mailto:ross.burton@intel.com] 
Envoyé : March-13-15 7:51 AM
À : Koehler, Yannick (HP Networking)
Cc : Paul Eggleton; yocto@yoctoproject.org
Objet : Re: [yocto] running task only for native but not target?


On 13 March 2015 at 11:46, Koehler, Yannick (HP Networking) <yannick.koehler@hp.com> wrote:
  Thanks, yes that is likely to work, I will try it.  I was looking for a more Yocto-like solution using the overriding stuff but it seems the overriding doesn't apply in this particular situation.

An alternative solution would be to build everything all the time, and package correctly so that you don't install unrequired binaries on the target.

Ross 

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

end of thread, other threads:[~2015-03-13 12:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 19:05 running task only for native but not target? Koehler, Yannick (HP Networking)
2015-03-13  9:01 ` Paul Eggleton
2015-03-13 11:46   ` Koehler, Yannick (HP Networking)
2015-03-13 11:50     ` Burton, Ross
2015-03-13 12:48       ` Koehler, Yannick (HP Networking)

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.