Re: [oe] Using EXTERNALSRC in practice
Hi Ulf, On Tue, 21 Jun 2016 00:02:12 Ulf Samuelsson wrote: > Den 2016-06-20 kl. 15:58, skrev Jérémy Rosen: > > On 20/06/2016 15:48, Ulf Samuelsson wrote: > >> Den 2016-06-20 kl. 14:37, skrev Jérémy Rosen: > >>> On 20/06/2016 14:08, Ulf Samuelsson wrote: > We have a meta-layer which builds the kernel. > > This contains among other things: > > FILESEXTRAPATHS_prepend_ = "${THIS_DIR}/" > > SRC_URI = "git:///;protocol=ssh;branch=" > SRC_URI += "file://defconfig" > > PV = "...+git${SRCPV}" > SRCREV = "" > ... > > Would like to have an option to build the kernel with external source. > That option should be easy to enable/disable > >>> > >>> [skip the rest] > >>> > >>> What you are describing here is very close to how the devtool works. > >>> I think it can deal with kernel packages in its latest iteration > >>> > >>> did you have a look at that tool ? does it satisfy your need ? if > >>> not, what would it need to do what you want... > >> > >> No, where can I find more information? > > > > The yocto manual has quite a section on that tool > > > >> The customer does not use the latest version of Yocto right now, so > >> that might be a problem, > > > > depends on how old "not the latest" is... but if you can do a sandbox > > with the latest version, you can probably see how devtool works and > > manually do the same thing... > > They use Yocto Layers, but not poky, so devtool is not present. No part of devtool is in poky alone - where did you get this idea? devtool is part of OE-Core, so unless you have a version of OE-Core that's older than fido then you should have it. > Anyway, devtool will generate an absolute path, and I am looking for > a recipe which uses a relative path to allow multiple yocto instances. Right, this isn't what devtool is intended to be used for. externalsrc alone should allow it however - provided you could either use ${THISDIR} or ${COREBASE} as paths if you wanted something relative to where all the metadata is checked out. Note you'll need to use := if you use ${THISDIR} so that it is evaluated when the bbappend is parsed and not at any other time (where the file context might be different). Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre -- ___ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [oe] Using EXTERNALSRC in practice
* Ulf Samuelsson [160621 13:24]: > Den 2016-06-21 kl. 09:27, skrev Jérémy Rosen: > > ${THISDIR} should be what you want, if I understand correctly... > Tried that, but that ended up in the build tree. > The .bb file is located in the build tree, and the .bbappend > is somewhere else. > Don't ask me why, LOL... > I need the directory of the bbappend file. Yes, ${THISDIR} is exactly what you're looking for. Your issue is that you're probably using it like: SOMEVAR = "${THISDIR}/.." Using bitbake and OE, all variables on the right hand side are expanded and evaluated at towards the end of the processing. At that point in time, THISDIR is correct to point to the directory with the .bb-file. You need to immediately expand ${THISDIR} by using: SOMEVAR := "${THISDIR}/.." See for instance the discussion at http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-FILESEXTRAPATHS Cheers, Anders -- Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB -- ___ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [oe] Using EXTERNALSRC in practice
Den 2016-06-21 kl. 09:27, skrev Jérémy Rosen: On 21/06/2016 00:02, Ulf Samuelsson wrote: Den 2016-06-20 kl. 15:58, skrev Jérémy Rosen: On 20/06/2016 15:48, Ulf Samuelsson wrote: Den 2016-06-20 kl. 14:37, skrev Jérémy Rosen: On 20/06/2016 14:08, Ulf Samuelsson wrote: We have a meta-layer which builds the kernel. This contains among other things: FILESEXTRAPATHS_prepend_ = "${THIS_DIR}/" SRC_URI = "git:///;protocol=ssh;branch=" SRC_URI += "file://defconfig" PV = "...+git${SRCPV}" SRCREV = "" ... Would like to have an option to build the kernel with external source. That option should be easy to enable/disable [skip the rest] What you are describing here is very close to how the devtool works. I think it can deal with kernel packages in its latest iteration did you have a look at that tool ? does it satisfy your need ? if not, what would it need to do what you want... No, where can I find more information? The yocto manual has quite a section on that tool The customer does not use the latest version of Yocto right now, so that might be a problem, depends on how old "not the latest" is... but if you can do a sandbox with the latest version, you can probably see how devtool works and manually do the same thing... They use Yocto Layers, but not poky, so devtool is not present. Anyway, devtool will generate an absolute path, and I am looking for a recipe which uses a relative path to allow multiple yocto instances. projects project1 yocto kernelsrc + patchset1 project2 yocto kernelsrc + patchset2 project3 yocto kernelsrc + patchset3 project4 yocto kernelsrc + patchset4 Is there any way I can from inside a bbappend file find out the path to that bbappend file? ${THISDIR} should be what you want, if I understand correctly... Tried that, but that ended up in the build tree. The .bb file is located in the build tree, and the .bbappend is somewhere else. Don't ask me why, LOL... I need the directory of the bbappend file. so It would be good to have an example ".bbappend" to start with. BR Ulf -- ___ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [oe] Using EXTERNALSRC in practice
On 21/06/2016 00:02, Ulf Samuelsson wrote: Den 2016-06-20 kl. 15:58, skrev Jérémy Rosen: On 20/06/2016 15:48, Ulf Samuelsson wrote: Den 2016-06-20 kl. 14:37, skrev Jérémy Rosen: On 20/06/2016 14:08, Ulf Samuelsson wrote: We have a meta-layer which builds the kernel. This contains among other things: FILESEXTRAPATHS_prepend_ = "${THIS_DIR}/" SRC_URI = "git:///;protocol=ssh;branch=" SRC_URI += "file://defconfig" PV = "...+git${SRCPV}" SRCREV = "" ... Would like to have an option to build the kernel with external source. That option should be easy to enable/disable [skip the rest] What you are describing here is very close to how the devtool works. I think it can deal with kernel packages in its latest iteration did you have a look at that tool ? does it satisfy your need ? if not, what would it need to do what you want... No, where can I find more information? The yocto manual has quite a section on that tool The customer does not use the latest version of Yocto right now, so that might be a problem, depends on how old "not the latest" is... but if you can do a sandbox with the latest version, you can probably see how devtool works and manually do the same thing... They use Yocto Layers, but not poky, so devtool is not present. Anyway, devtool will generate an absolute path, and I am looking for a recipe which uses a relative path to allow multiple yocto instances. projects project1 yocto kernelsrc + patchset1 project2 yocto kernelsrc + patchset2 project3 yocto kernelsrc + patchset3 project4 yocto kernelsrc + patchset4 Is there any way I can from inside a bbappend file find out the path to that bbappend file? ${THISDIR} should be what you want, if I understand correctly... so It would be good to have an example ".bbappend" to start with. BR Ulf -- ___ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [oe] Using EXTERNALSRC in practice
Den 2016-06-20 kl. 15:58, skrev Jérémy Rosen: On 20/06/2016 15:48, Ulf Samuelsson wrote: Den 2016-06-20 kl. 14:37, skrev Jérémy Rosen: On 20/06/2016 14:08, Ulf Samuelsson wrote: We have a meta-layer which builds the kernel. This contains among other things: FILESEXTRAPATHS_prepend_ = "${THIS_DIR}/" SRC_URI = "git:///;protocol=ssh;branch=" SRC_URI += "file://defconfig" PV = "...+git${SRCPV}" SRCREV = "" ... Would like to have an option to build the kernel with external source. That option should be easy to enable/disable [skip the rest] What you are describing here is very close to how the devtool works. I think it can deal with kernel packages in its latest iteration did you have a look at that tool ? does it satisfy your need ? if not, what would it need to do what you want... No, where can I find more information? The yocto manual has quite a section on that tool The customer does not use the latest version of Yocto right now, so that might be a problem, depends on how old "not the latest" is... but if you can do a sandbox with the latest version, you can probably see how devtool works and manually do the same thing... They use Yocto Layers, but not poky, so devtool is not present. Anyway, devtool will generate an absolute path, and I am looking for a recipe which uses a relative path to allow multiple yocto instances. projects project1 yocto kernelsrc + patchset1 project2 yocto kernelsrc + patchset2 project3 yocto kernelsrc + patchset3 project4 yocto kernelsrc + patchset4 Is there any way I can from inside a bbappend file find out the path to that bbappend file? so It would be good to have an example ".bbappend" to start with. BR Ulf -- ___ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [oe] Using EXTERNALSRC in practice
On 20/06/2016 15:48, Ulf Samuelsson wrote: Den 2016-06-20 kl. 14:37, skrev Jérémy Rosen: On 20/06/2016 14:08, Ulf Samuelsson wrote: We have a meta-layer which builds the kernel. This contains among other things: FILESEXTRAPATHS_prepend_ = "${THIS_DIR}/" SRC_URI = "git:///;protocol=ssh;branch=" SRC_URI += "file://defconfig" PV = "...+git${SRCPV}" SRCREV = "" ... Would like to have an option to build the kernel with external source. That option should be easy to enable/disable [skip the rest] What you are describing here is very close to how the devtool works. I think it can deal with kernel packages in its latest iteration did you have a look at that tool ? does it satisfy your need ? if not, what would it need to do what you want... No, where can I find more information? The yocto manual has quite a section on that tool The customer does not use the latest version of Yocto right now, so that might be a problem, depends on how old "not the latest" is... but if you can do a sandbox with the latest version, you can probably see how devtool works and manually do the same thing... so It would be good to have an example ".bbappend" to start with. BR Ulf -- ___ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [oe] Using EXTERNALSRC in practice
Den 2016-06-20 kl. 14:37, skrev Jérémy Rosen: On 20/06/2016 14:08, Ulf Samuelsson wrote: We have a meta-layer which builds the kernel. This contains among other things: FILESEXTRAPATHS_prepend_ = "${THIS_DIR}/" SRC_URI = "git:///;protocol=ssh;branch=" SRC_URI += "file://defconfig" PV = "...+git${SRCPV}" SRCREV = "" ... Would like to have an option to build the kernel with external source. That option should be easy to enable/disable [skip the rest] What you are describing here is very close to how the devtool works. I think it can deal with kernel packages in its latest iteration did you have a look at that tool ? does it satisfy your need ? if not, what would it need to do what you want... No, where can I find more information? The customer does not use the latest version of Yocto right now, so that might be a problem, so It would be good to have an example ".bbappend" to start with. BR Ulf -- ___ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [oe] Using EXTERNALSRC in practice
On 20/06/2016 14:08, Ulf Samuelsson wrote: We have a meta-layer which builds the kernel. This contains among other things: FILESEXTRAPATHS_prepend_ = "${THIS_DIR}/" SRC_URI = "git:///;protocol=ssh;branch=" SRC_URI += "file://defconfig" PV = "...+git${SRCPV}" SRCREV = "" ... Would like to have an option to build the kernel with external source. That option should be easy to enable/disable [skip the rest] What you are describing here is very close to how the devtool works. I think it can deal with kernel packages in its latest iteration did you have a look at that tool ? does it satisfy your need ? if not, what would it need to do what you want... -- ___ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel