Re: [yocto] Keeping and modifying Source code in Yocto
On Wed, Jul 11, 2018 at 9:28 AM Simon Chamlian wrote: > > I am getting the following error using devtool: > > $ devtool add help > ERROR: Layer directory '/home/jay/sources/poky/meta' does not exist! Please > check BBLAYERS in /home/jay/build/conf/bblayers.conf > > $ whereis devtool > devtool: /opt/PHYTEC_BSPs/yocto_imx7/sources/poky/scripts/devtool > > The paths are completely wrong. > > Any hints? may be there are two different workspaces being mixed here. Probably you should start a fresh shell and setup environment to run bitbake and then be able to run devtool in that shell as well. > > Thanks, > S > > > > > > > On Tue, Jul 10, 2018 at 4:27 AM, ChenQi wrote: >> >> On 07/10/2018 02:18 PM, Paul Eggleton wrote: >>> >>> On Tuesday, 10 July 2018 3:32:56 AM CEST ChenQi wrote: I usually use the following steps when I need to modify source for some purpose. 1. bitbake A (or at least bitbake A -c configure) *2. cd tmp/work/x/A/** **3. make the modification* 4. bitbake A -c compile -f 5. bitbake A If you find the modification useful, make a patch from it. >>> >>> This is the old way of doing it which can under some circumstances result in >>> you losing your changes to the source tree, since the sources under >>> tmp/work/ >>> are only ever intended to be there temporarily. Devtool (as recommend by >>> others on this thread) is designed to enable this workflow in a much safer >>> manner. >>> >>> Cheers, >>> Paul >>> >> Thanks Paul. I'll turn to use devtool. >> >> Best Regards, >> >> Chen Qi >> > > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Keeping and modifying Source code in Yocto
I am getting the following error using devtool: $ devtool add help ERROR: Layer directory '/home/jay/sources/poky/meta' does not exist! Please check BBLAYERS in /home/jay/build/conf/bblayers.conf $ whereis devtool devtool: /opt/PHYTEC_BSPs/yocto_imx7/sources/poky/scripts/devtool The paths are completely wrong. Any hints? Thanks, S On Tue, Jul 10, 2018 at 4:27 AM, ChenQi wrote: > On 07/10/2018 02:18 PM, Paul Eggleton wrote: > >> On Tuesday, 10 July 2018 3:32:56 AM CEST ChenQi wrote: >> >>> I usually use the following steps when I need to modify source for some >>> purpose. >>> >>> 1. bitbake A (or at least bitbake A -c configure) >>> *2. cd tmp/work/x/A/** >>> **3. make the modification* >>> 4. bitbake A -c compile -f >>> 5. bitbake A >>> >>> If you find the modification useful, make a patch from it. >>> >> This is the old way of doing it which can under some circumstances result >> in >> you losing your changes to the source tree, since the sources under >> tmp/work/ >> are only ever intended to be there temporarily. Devtool (as recommend by >> others on this thread) is designed to enable this workflow in a much safer >> manner. >> >> Cheers, >> Paul >> >> Thanks Paul. I'll turn to use devtool. > > Best Regards, > > Chen Qi > > -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Keeping and modifying Source code in Yocto
On 07/10/2018 02:18 PM, Paul Eggleton wrote: On Tuesday, 10 July 2018 3:32:56 AM CEST ChenQi wrote: I usually use the following steps when I need to modify source for some purpose. 1. bitbake A (or at least bitbake A -c configure) *2. cd tmp/work/x/A/** **3. make the modification* 4. bitbake A -c compile -f 5. bitbake A If you find the modification useful, make a patch from it. This is the old way of doing it which can under some circumstances result in you losing your changes to the source tree, since the sources under tmp/work/ are only ever intended to be there temporarily. Devtool (as recommend by others on this thread) is designed to enable this workflow in a much safer manner. Cheers, Paul Thanks Paul. I'll turn to use devtool. Best Regards, Chen Qi -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Keeping and modifying Source code in Yocto
On Tuesday, 10 July 2018 3:32:56 AM CEST ChenQi wrote: > I usually use the following steps when I need to modify source for some > purpose. > > 1. bitbake A (or at least bitbake A -c configure) > *2. cd tmp/work/x/A/** > **3. make the modification* > 4. bitbake A -c compile -f > 5. bitbake A > > If you find the modification useful, make a patch from it. This is the old way of doing it which can under some circumstances result in you losing your changes to the source tree, since the sources under tmp/work/ are only ever intended to be there temporarily. Devtool (as recommend by others on this thread) is designed to enable this workflow in a much safer manner. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Keeping and modifying Source code in Yocto
On Fri, Jul 6, 2018 at 8:20 AM Simon Chamlian wrote: > > Hi, > > Is there a way to keep the source code of a package to be able to modify it > and then compile? > > For example, with LTIB ( Linux Target Image Builder ), it was possible with a > command to extract the source code from a package, make modifications and > then re-compile? > Please use devtool which is aimed at exactly what you want to get done here. https://www.yoctoproject.org/docs/2.6/sdk-manual/sdk-manual.html#sdk-a-closer-look-at-devtool-add > Thanks, > S > > > > > > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Keeping and modifying Source code in Yocto
Hi Simon, I usually use the following steps when I need to modify source for some purpose. 1. bitbake A (or at least bitbake A -c configure) *2. cd tmp/work/x/A/** **3. make the modification* 4. bitbake A -c compile -f 5. bitbake A If you find the modification useful, make a patch from it. Best Regards, Chen Qi On 07/06/2018 11:20 PM, Simon Chamlian wrote: Hi, Is there a way to keep the source code of a package to be able to modify it and then compile? For example, with LTIB ( Linux Target Image Builder ), it was possible with a command to extract the source code from a package, make modifications and then re-compile? Thanks, S -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Keeping and modifying Source code in Yocto
On Fri, Jul 06, 2018 at 09:11:35PM +0200, Ulf Samuelsson wrote: In my current project we have a simplified version in a ”component.bbclass”. It relies on a variable COMPONENT_DIR defined in our local.conf. A recipe located in ”recipe-//_$PV.bb” doing inherit component will find its source code in $COMPONENT_DIR/, making the recipe simpler than that of the externalsrc bbclass. No need for SRC_URI statements. You mean you set S to $COMPONENT_DIR/? If there's no SRC_URI, does fetch run? If not, how does it detect that the source code changed? Marcelo -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Keeping and modifying Source code in Yocto
externalsrc.bbclass? In my current project we have a simplified version in a ”component.bbclass”. It relies on a variable COMPONENT_DIR defined in our local.conf. A recipe located in ”recipe-//_$PV.bb” doing inherit component will find its source code in $COMPONENT_DIR/, making the recipe simpler than that of the externalsrc bbclass. No need for SRC_URI statements. We check out meta layers and the components using repo so the components are always located in $COMPONENTS_DIR. Been thinking of upstreaming this, but I am unsure about the interest. Best Regards, Ulf Samuelsson > 6 juli 2018 kl. 17:27 skrev Tim Hammer : > > >> On Fri, Jul 6, 2018 at 11:20 AM, Simon Chamlian >> wrote: > >> Hi, >> >> Is there a way to keep the source code of a package to be able to modify it >> and then compile? >> >> For example, with LTIB ( Linux Target Image Builder ), it was possible with >> a command to extract the source code from a package, make modifications and >> then re-compile? >> > > I suggest you take a look at the devtool: > https://www.yoctoproject.org/software-item/devtool/ > > https://wiki.yoctoproject.org/wiki/TipsAndTricks/Patching_the_source_for_a_recipe > > >> Thanks, >> S >> >> >> >> >> >> >> -- >> ___ >> yocto mailing list >> yocto@yoctoproject.org >> https://lists.yoctoproject.org/listinfo/yocto >> > > > > -- > > .Tim > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Keeping and modifying Source code in Yocto
On Fri, Jul 6, 2018 at 11:20 AM, Simon Chamlian wrote: > Hi, > > Is there a way to keep the source code of a package to be able to modify > it and then compile? > > For example, with LTIB ( Linux Target Image Builder ), it was possible > with a command to extract the source code from a package, make > modifications and then re-compile? > > I suggest you take a look at the devtool: https://www.yoctoproject.org/software-item/devtool/ https://wiki.yoctoproject.org/wiki/TipsAndTricks/Patching_the_source_for_a_recipe > Thanks, > S > > > > > > > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > > -- .Tim -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Keeping and modifying Source code in Yocto
Hi Simon, > Is there a way to keep the source code of a package to be able to modify it and then compile? Yes, there is. devtool greatly simplifies this type of workflow. Please refer to https://www.yoctoproject.org/docs/2.5/mega-manual/mega-manual.html#using-devtool-in-your-sdk-workflow for details. :rjs On 07/06/2018 08:20 AM, Simon Chamlian wrote: > Hi, > > Is there a way to keep the source code of a package to be able to > modify it and then compile? > > For example, with LTIB ( Linux Target Image Builder ), it was possible > with a command to extract the source code from a package, make > modifications and then re-compile? > > Thanks, > S > > > > > > > -- Rudolf J Streif signature.asc Description: OpenPGP digital signature -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Keeping and modifying Source code in Yocto
Hi, Is there a way to keep the source code of a package to be able to modify it and then compile? For example, with LTIB ( Linux Target Image Builder ), it was possible with a command to extract the source code from a package, make modifications and then re-compile? Thanks, S -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto