All of lore.kernel.org
 help / color / mirror / Atom feed
* Creating a new recipe based on another recipe
@ 2015-09-28 15:30 Stuart Weaver
  2015-09-28 15:46 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Stuart Weaver @ 2015-09-28 15:30 UTC (permalink / raw)
  To: yocto@yoctoproject.org

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

Hi all,

I have a recipe for a package which builds well. I now need to add a patch into certain builds. What is the best way to do this?


1.       Is there a variable I can append the image name to (similar to: SRC_URI_image-name)?


2.       Is there a way of creating a new 'recipe 2' that obtains the details from 'recipe 1' and applies a patch? This way I can then simply add the new recipe into any builds I want and includes any future changes I make to 'recipe 1'. This solution also means not having to continuously reconfigure/recompile the original recipe!



3.       Do I have to do it the hard way and copy the whole .bb file into a new one and make sure everything is in sync when future updates are applied?


Regards,
Stuart Weaver


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

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

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

* Re: Creating a new recipe based on another recipe
  2015-09-28 15:30 Creating a new recipe based on another recipe Stuart Weaver
@ 2015-09-28 15:46 ` Gary Thomas
  2015-09-28 17:59   ` Daniel.
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2015-09-28 15:46 UTC (permalink / raw)
  To: yocto

On 2015-09-28 09:30, Stuart Weaver wrote:
> Hi all,
>
> I have a recipe for a package which builds well. I now need to add a patch into certain builds. What is the best way to do this?
>
> 1.Is there a variable I can append the image name to (similar to:/SRC_URI_image-name/)?//
>
> 2.Is there a way of creating a new ‘recipe 2’ that obtains the details from ‘recipe 1’ and applies a patch? This way I can then simply add the new recipe into any builds I want and
> includes any future changes I make to ‘recipe 1’. This solution also means not having to continuously reconfigure/recompile the original recipe!
>
> 3.Do I have to do it the hard way and copy the whole .bb file into a new one and make sure everything is in sync when future updates are applied?

If it's just a patch, the simplest way is to use something like this:
   SRC_URI_append_XYZ = "file://XYZ.patch"
where XYZ is something which can identify the override.  One example
might be where XYZ is the name of a target board (${MACHINE})

There are many examples of this usage in the Poky/Yocto tree(s)

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: Creating a new recipe based on another recipe
  2015-09-28 15:46 ` Gary Thomas
@ 2015-09-28 17:59   ` Daniel.
  2015-09-28 18:22     ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel. @ 2015-09-28 17:59 UTC (permalink / raw)
  Cc: yocto@yoctoproject.org

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

I think you're searching for .bbappend don't?

http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#using-bbappend-files

Or, maybe, put all the common things in a .inc file, create the recipes,
include the files in recipes. There is also a lot of examples of this:
http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-bsp/hostap/

Cheers,
- dhs

2015-09-28 12:46 GMT-03:00 Gary Thomas <gary@mlbassoc.com>:

> On 2015-09-28 09:30, Stuart Weaver wrote:
>
>> Hi all,
>>
>> I have a recipe for a package which builds well. I now need to add a
>> patch into certain builds. What is the best way to do this?
>>
>> 1.Is there a variable I can append the image name to (similar
>> to:/SRC_URI_image-name/)?//
>>
>> 2.Is there a way of creating a new ‘recipe 2’ that obtains the details
>> from ‘recipe 1’ and applies a patch? This way I can then simply add the new
>> recipe into any builds I want and
>> includes any future changes I make to ‘recipe 1’. This solution also
>> means not having to continuously reconfigure/recompile the original recipe!
>>
>> 3.Do I have to do it the hard way and copy the whole .bb file into a new
>> one and make sure everything is in sync when future updates are applied?
>>
>
> If it's just a patch, the simplest way is to use something like this:
>   SRC_URI_append_XYZ = "file://XYZ.patch"
> where XYZ is something which can identify the override.  One example
> might be where XYZ is the name of a target board (${MACHINE})
>
> There are many examples of this usage in the Poky/Yocto tree(s)
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



-- 
*"Do or do not. There is no try"*
  *Yoda Master*

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

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

* Re: Creating a new recipe based on another recipe
  2015-09-28 17:59   ` Daniel.
@ 2015-09-28 18:22     ` Gary Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2015-09-28 18:22 UTC (permalink / raw)
  To: yocto

On 2015-09-28 11:59, Daniel. wrote:
> I think you're searching for .bbappend don't?

Shouldn't be any need for that - it's his recipe, so he can modify it as he wishes.
One uses .bbappend to made changes/additions to a recipe where you don't want (or
can't) modify the original.

>
> http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#using-bbappend-files
>
> Or, maybe, put all the common things in a .inc file, create the recipes, include the files in recipes. There is also a lot of examples of this:
> http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-bsp/hostap/
>
> Cheers,
> - dhs
>
> 2015-09-28 12:46 GMT-03:00 Gary Thomas <gary@mlbassoc.com <mailto:gary@mlbassoc.com>>:
>
>     On 2015-09-28 09:30, Stuart Weaver wrote:
>
>         Hi all,
>
>         I have a recipe for a package which builds well. I now need to add a patch into certain builds. What is the best way to do this?
>
>         1.Is there a variable I can append the image name to (similar to:/SRC_URI_image-name/)?//
>
>         2.Is there a way of creating a new ‘recipe 2’ that obtains the details from ‘recipe 1’ and applies a patch? This way I can then simply add the new recipe into any builds I
>         want and
>         includes any future changes I make to ‘recipe 1’. This solution also means not having to continuously reconfigure/recompile the original recipe!
>
>         3.Do I have to do it the hard way and copy the whole .bb file into a new one and make sure everything is in sync when future updates are applied?
>
>
>     If it's just a patch, the simplest way is to use something like this:
>        SRC_URI_append_XYZ = "file://XYZ.patch"
>     where XYZ is something which can identify the override.  One example
>     might be where XYZ is the name of a target board (${MACHINE})
>
>     There are many examples of this usage in the Poky/Yocto tree(s)
>
>     --
>     ------------------------------------------------------------
>     Gary Thomas                 |  Consulting for the
>     MLB Associates              |    Embedded world
>     ------------------------------------------------------------
>     --
>     _______________________________________________
>     yocto mailing list
>     yocto@yoctoproject.org <mailto:yocto@yoctoproject.org>
>     https://lists.yoctoproject.org/listinfo/yocto
>
>
>
>
> --
> /"Do or do not. There is no try"/
> ///*Yoda Master*/
>
>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

end of thread, other threads:[~2015-09-28 18:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-28 15:30 Creating a new recipe based on another recipe Stuart Weaver
2015-09-28 15:46 ` Gary Thomas
2015-09-28 17:59   ` Daniel.
2015-09-28 18:22     ` Gary Thomas

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.