Skip to contentSkip to conversation

yocto Digest, Vol 60, Issue 78

DISCUSSION Stuart Weaver 3 participants 3 messages Sep 29, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Many thanks for your answers Gary/Daniel,

Gary- I've tried:

		 SRC_URI_append_image-name2 = "file://XYZ.patch"
	But no luck, when building the image it seems to skip over it with no patching occurring. I can't use the ${MACHINE} variable as the two images will be for the same ${MACHINE}

Daniel- with a .bbappend, to my knowledge I wouldn't be able to include it to just one image.

My "perfect" solution would be to find a variable out there that will copy/refer to a current recipe and add the details into the new recipe with it's own ${S} etc... Of course I could just copy one to another, but then there's the problem of updating files later on. Therefore, unless there is another option that I haven't considered, I might look at refactoring everything into a .inc file and have two different recipe names of which I can then include seperately in the respective images.

Many Thanks,
Stuart Weaver

Quoted 74 lines · Daniel.
Quoted 1 line

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.

Quoted 2 lines

http://www.yoctoproject.org/docs/current/dev-manual/dev-

manual.html#us

Quoted 3 lines

ing-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:

Quoted 7 lines

http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-bsp/hosta
p/

Cheers,
- dhs

2015-09-28 12:46 GMT-03:00 Gary Thomas <[email protected]

<mailto:[email protected]>>:

Quoted 6 lines · Stuart Weaver

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?

Quoted 5 lines

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

Quoted 2 lines

want and
includes any future changes I make to ?recipe 1?. This solution also

means not having to continuously reconfigure/recompile the original recipe!

Quoted 2 lines

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?

Quoted 23 lines

    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
    [email protected] <mailto:[email protected]>
    https://lists.yoctoproject.org/listinfo/yocto
Quoted 5 lines

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

Quoted 5 lines

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

Regards,
Stuart Weaver

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

#2 lore raw
Quoted 7 lines · Stuart Weaver

Many thanks for your answers Gary/Daniel,

Gary- I've tried:
SRC_URI_append_image-name2 = "file://XYZ.patch”

the override you are deploying is wrong so this assignment in effect is noop.

SRC_URI_append = “ file://XYX.patch” is what will work. you can place this in a bbappend in your own layer or you can add the same to main recipe as a patch on top. if you need to use overrides then make sure

SRC_URI_append_<override> is used and override is one of items in OVERRIDES variable to check the overrides you have you can

bitbake -e busybox | grep -e “^VERRIDES=“

which should give you a list of overrides separated by ‘:’

Quoted 104 lines
	But no luck, when building the image it seems to skip over it with no patching occurring. I can't use the ${MACHINE} variable as the two images will be for the same ${MACHINE}

Daniel- with a .bbappend, to my knowledge I wouldn't be able to include it to just one image.

My "perfect" solution would be to find a variable out there that will copy/refer to a current recipe and add the details into the new recipe with it's own ${S} etc... Of course I could just copy one to another, but then there's the problem of updating files later on. Therefore, unless there is another option that I haven't considered, I might look at refactoring everything into a .inc file and have two different recipe names of which I can then include seperately in the respective images.

Many Thanks,
Stuart Weaver

Quoted 74 lines · Daniel.
Quoted 1 line

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.

Quoted 2 lines

http://www.yoctoproject.org/docs/current/dev-manual/dev-

manual.html#us

Quoted 3 lines

ing-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:

Quoted 7 lines

http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-bsp/hosta
p/

Cheers,
- dhs

2015-09-28 12:46 GMT-03:00 Gary Thomas <[email protected]

<mailto:[email protected]>>:

Quoted 6 lines · Stuart Weaver

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?

Quoted 5 lines

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

Quoted 2 lines

want and
includes any future changes I make to ?recipe 1?. This solution also

means not having to continuously reconfigure/recompile the original recipe!

Quoted 2 lines

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?

Quoted 23 lines

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
   [email protected] <mailto:[email protected]>
   https://lists.yoctoproject.org/listinfo/yocto
Quoted 5 lines

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

Quoted 5 lines

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

Regards,
Stuart Weaver

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com
______________________________________________________________________
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#3 lore raw
In reply to Stuart Weaver
Quoted 5 lines · Stuart Weaver

Many thanks for your answers Gary/Daniel,

Gary- I've tried:

		 SRC_URI_append_image-name2 = "file://XYZ.patch"
	But no luck, when building the image it seems to skip over it with no patching occurring. I can't use the ${MACHINE} variable as the two images will be for the same ${MACHINE}

Sorry, I didn't see this because of the [misleading] subject :-( Next time, either reply to the [single] message directly, or at least modify the subject line to match the current thread.

You're command is incorrect - there is a big difference between "_" and "-" when it comes to bitbake parsing. Try this:
SRC_URI_append_image_name2 = "file://XYZ.patch"

                      ^

Notice this uses underscore (_) not hyphen (-)

Quoted 99 lines

Daniel- with a .bbappend, to my knowledge I wouldn't be able to include it to just one image.

My "perfect" solution would be to find a variable out there that will copy/refer to a current recipe and add the details into the new recipe with it's own ${S} etc... Of course I could just copy one to another, but then there's the problem of updating files later on. Therefore, unless there is another option that I haven't considered, I might look at refactoring everything into a .inc file and have two different recipe names of which I can then include seperately in the respective images.

Many Thanks,
Stuart Weaver

Quoted 74 lines · Daniel.
Quoted 1 line

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.

Quoted 2 lines

http://www.yoctoproject.org/docs/current/dev-manual/dev-

manual.html#us

Quoted 3 lines

ing-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:

Quoted 7 lines

http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-bsp/hosta
p/

Cheers,
- dhs

2015-09-28 12:46 GMT-03:00 Gary Thomas <[email protected]

<mailto:[email protected]>>:

Quoted 6 lines · Stuart Weaver

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?

Quoted 5 lines

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

Quoted 2 lines

want and
includes any future changes I make to ?recipe 1?. This solution also

means not having to continuously reconfigure/recompile the original recipe!

Quoted 2 lines

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?

Quoted 23 lines

     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
     [email protected] <mailto:[email protected]>
     https://lists.yoctoproject.org/listinfo/yocto
Quoted 5 lines

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

Quoted 5 lines

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

Regards,
Stuart Weaver

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

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------