summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* wic: fix path parsing, use last occurrenceGeorge McCollister2016-07-271-1/+1
| | | | | | | | | | If the path contains 'scripts' more than once the first occurrence will be incorrectly used. Use rfind instead of find to find the last occurrence. (From OE-Core rev: fd544c3ef6ece1e2f9849ee87227efc6d0954e15) Signed-off-by: George McCollister <george.mccollister@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Set correct default branches and branches base for i386, qemu and ↵Humberto Ibarra2016-05-144-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | x86_64 archs Kernel recipes for linux-yocto_4.1 have outdated branches as default, making it impossible to find the right branch if the user picks the default value. The branches_base property uses these outdated branches also. This updates standard/common-pc and standard/common-pc-64 branches to standard/base The fix was tested using 'yocto-bsp create' with each one of the following archs: -i386 -x86_64 -qemu (i386 and x86_64) After the layer was created, it was added to local.conf and the MACHINE was set accordingly. 'bitbake linux-yocto' ran successfully with each configuration tested. [YOCTO #9160] (From meta-yocto rev: 32e3c2d3910c42f12957c874902a01da94a7971a) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: fix default kernel for x86_64 archHumberto Ibarra2016-05-141-1/+1
| | | | | | | | | | | | | | | | | When using x86_64 arch in yocto-bsp the script suggests 4.1 as the default kernel version; however, as soon as the default is picked the script continues processing with 3.19 kernel. This changes the default kernel version to 4.1, which is the right value and matches the script's message. [Yocto #9353] (From meta-yocto rev: 932184bef928d83249c4b4e5dcd36c68d4264cd6) Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: extract: update SRCTREECOVEREDTASKS for kernelMarkus Lehtonen2016-03-201-1/+2
| | | | | | | | | | | | | | | | | | | | | Add 'do_kernel_configme' and 'do_kernel_configcheck' to SRCTREECOVEREDTASKS of kernel packages. These tasks should not be run because kernel meta in the srctree is not necessarily up-to-date or even present which causes build failures and/or invalid kernel config. Especially so because 'do_patch' which is a dependency of 'do_kernel_configme' is not being run. We now store .config in the srctree and 'do_configure' task is able to run successfully. (From OE-Core master rev: 7ce4c18a4ba1ebcb9f46e652a881ace1f21d2292) (From OE-Core rev: 4d879cb8d7384ac4a96f22c1664b8875f2d8f615) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: extract: copy kernel config to srctreeMarkus Lehtonen2016-03-201-0/+6
| | | | | | | | | | | | | | | This makes the correct kernel config to be used when building kernel from srctree (extrernalsrc). If no kernel config is present in the builddir 'do_configure' task copies .config from the srctree. (From OE-Core master rev: 3b516332e038a587685f6e0c14a7f04990bdd6cc) (From OE-Core rev: 32593f2b6a44a7bfdab55aec7e172476020fd4eb) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: rawcopy: Copy source file to build folderNoor Ahsan2016-03-111-3/+4
| | | | | | | | | | | | | | | | | | | | When a file is given using --sourceparams then wic directly use that file instead of copying them to build folder. At time of assembling it os.rename is called which renames all the files to name. In that process the original file is renamed. When image recipe is rebuilt then wic complains about missing file which was renamed in previous build. [YOCTO #8854] (From OE-Core rev: d3dee0f4107156442238c9ea82f742afeeb0665a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (From OE-Core master rev: 33c52b1f2d39feb641465bf42e8b16d0ab22a316) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Set SRCREV meta/machine revisions to AUTOREVLeonardo Sandoval2016-02-0449-152/+152
| | | | | | | | | | | | | | | | By default, checkout to latest revision from the machine branch specified by the user. (From meta-yocto rev: f79a43406b5b323587415380ecffc87527c64653) (From meta-yocto rev: 311e084bb321701624785ce56a1ad23d7b20b396) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a35f79ddd8afe54835ad927b21b8f7cfbd86202a) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Set KTYPE to user selected base branchLeonardo Sandoval2016-02-0421-21/+42
| | | | | | | | | | | | | | | | | | Fixes the hardcode branch name set to KTYPE, where its value is used as a base branch when user decides to create a new branch. Tested on x86_64 architecture. [YOCTO #8630] (From meta-yocto rev: ab895be90a0cae7dfa77a8aab3b19e5571e7e7bc) (From meta-yocto rev: bc5aec2348b2c314953806734a8fbabf798d142c) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9d585b5025187f059f75ffbdc01bda72d17e8a86) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Avoid duplication of user patches ({{=machine}}-user-patches.scc)Leonardo Sandoval2016-02-0428-36/+8
| | | | | | | | | | | | | | | | | | | On linux-yocto-dev or linux-yocto_X.YY bbappend files, the SRC_URI includes {{=machine}}-standard.scc, which in turn includes {{=machine}}-user-parches.scc, thus there is no need to include it again on the corresponding bbappend file. [YOCTO #8486] (From meta-yocto rev: 11c93b5dd8c651df478d4810e1b6ff6ad9fa57e8) (From meta-yocto rev: c1105ff0e65a24f344e5fab17402b1b4fcb1d728) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f674ffa528b06e22d2c70c12f2e17cf308e26173) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Default kernel version to 4.1 on x86_64Leonardo Sandoval2016-02-041-1/+1
| | | | | | | | | | | | | | | | | | On the 3.19 to 4.1 migration, the target x86_64 was not taken into account (no reason, just missing the correspoding update on the kernel-list.noinstall file), so moving it to 4.1 to be align with the rest. (From meta-yocto rev: 283665d9295c3c10f964496dc0110137e358daa6) (From meta-yocto rev: d58d3c5e65294bd6f4f3f780d746e1c3f8678c2b) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9cc221dcb6af71ae8a4faa3297269ae80c7e35dd) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: reset: do clean for multiple recipes at once with -aPaul Eggleton2016-01-151-11/+14
| | | | | | | | | | | | | | | | We need to run the clean for all recipes that are being reset before we start deleting things from the workspace; if we don't, recipes providing dependencies may be missing when we come to clean a recipe later (since we don't and couldn't practically reset them in dependency order). This also improves performance since we have the startup startup time for the clean just once rather than for every recipe. (From OE-Core master rev: c10a2de75a99410eb5338dd6da0e0b0e32bae6f5) (From OE-Core rev: d64a5794098e9ca715a70daa704f571ba97e9912) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-update: fix error checkingPaul Eggleton2016-01-151-7/+6
| | | | | | | | | | | | | | Running "raise" with no arguments here is invalid, we're not in exception handling context. Rather than also adding code to catch the exception I just moved the check out to the parent function from which we can just exit. (From OE-Core master rev: 0164dc66467739b357ab22bf9b8c0845f3eff4a4) (From OE-Core rev: d9c5653f994e0f366c9154a2a988175a9f8e3130) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-update: fix metadata update stepPaul Eggleton2016-01-151-2/+2
| | | | | | | | | | | | | * Clone the correct path - we need .git on the end * Pull from the specified path instead of expecting a remote to be set * up in the repo already (it isn't by default) (From OE-Core master rev: 1a60ee8bd21e156022c928f12bb296ab5caaa766) (From OE-Core rev: a0e1ff92b189681df5cf106dc924e76bb05caf31) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-update: fix not using updateserver config file optionPaul Eggleton2016-01-151-15/+15
| | | | | | | | | | | | | | | We read the updateserver setting from the config file but we never actually used that value - the code then went on to use only the value supplied on the command line. Fix courtesy of Dmitry Rozhkov <dmitry.rozhkov@intel.com> (From OE-Core master rev: 1c85237803038fba539d5b03bf4de39d99380684) (From OE-Core rev: 3940fe87f944bd2067a96b1b6a8c1dc646569690) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: use cp instead of shutil.copytreeEd Bartosh2016-01-151-1/+4
| | | | | | | | | | | | | | | | | | Copied layers with 'cp -a' instead of calling shutil.copytree as copytree fails to copy broken symlinks. More pythonic fix would be to use copytree with 'ignore' parameter, but this could slow down copying complex directory structures. [YOCTO #8825] (From OE-Core master rev: e5b841420b9fdd33829f7665a62cd06a3017f7e6) (From OE-Core rev: fa0424ee742a6b331f1c6462eb69fecba6dc7f86) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix error when extracting source to a specified directoryPaul Eggleton2016-01-151-0/+2
| | | | | | | | | | | | | | | Having fetched the source and unpacked it to a temporary directory, we then move part of it to the destination directory, or if the source is at the top level we move the whole temporary directory, but in the latter case we were later attempting to delete the temporary directory which no longer existed. Clear out the variable so that doesn't happen. (From OE-Core master rev: 91714a52e91cddba5a16c73cf5765d1f47f7856c) (From OE-Core rev: 8b7644fa4cd72b7f80d2aaa3bfcd2efed2402d37) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: detect when specified URL returns a web pagePaul Eggleton2016-01-151-4/+11
| | | | | | | | | | | | | If the user specifies a URL that just returns a web page, then it's probably incorrect (or broken); attempt to detect this and show an error if it's the case. (From OE-Core master rev: 83b1245b2638eb5d314fe663d33cd52a776a34a7) (From OE-Core rev: cf61eff7bbc9afa0eeb1fd481f1d4b75429a1c24) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: prevent attempting to unpack entire DL_DIRPaul Eggleton2016-01-151-0/+4
| | | | | | | | | | | | | | | If you specify a URL ending in /, BitBake's fetcher returns a localpath of ${DL_DIR}, and if you then try to unpack that it will attempt to copy the entire DL_DIR contents to the destination - which at least on my system filled my entire /tmp. Obviously we should fix the fetcher, but at least detect and stop that from happening here for now. (From OE-Core master rev: 7e63a672517518644a37ce006e05b5494c29cf6e) (From OE-Core rev: 623e59b103c1edf3211384d26cc0c83cfd424587) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix do_install handling for makefile-only softwarePaul Eggleton2016-01-151-1/+1
| | | | | | | | | | | | | | | In my testing here it appears make -qn returns an error (exit code 2) whereas make -n doesn't; I can't immediately tell why based on the documentation. We don't actually care for it to be quiet since we're capturing the output, so let's just leave -q off and have this work properly as a result. (From OE-Core master rev: 30c4cd9efdac400d713dff645f23f2627277d75a) (From OE-Core rev: d76191cef76c6c4416a5e635a9424192e16c1090) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: avoid traceback on fetch errorPaul Eggleton2016-01-151-1/+5
| | | | | | | | | | | | | If a fetch error occurs, the fetcher already prints a reasonable error - we don't need the traceback as well, so catch that and exit if it occurs. (From OE-Core master rev: c2cc5abe34169eae92067d97ce1e747e7c1413f5) (From OE-Core rev: b2706b5b311d456e7da5acf02e25f3f8650c50e5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: handle https://....git URLsPaul Eggleton2016-01-151-0/+5
| | | | | | | | | | | | | | | | When you grab a URL for a github repository you'll almost certainly find it in https://github.com/path/to/repository.git format; but bitbake's fetcher can't handle that because it'll see https:// at the start and assume it should use wget to fetch it. If the URL starts with http:// or https:// and the path part ends with .git then assume it's a git repository and adjust it accordingly. (From OE-Core master rev: bdbc4cf41d30eddb8a9ed882dedcc1670ce8fdd6) (From OE-Core rev: 9d41e993a95a7b60f1ed5f8e9ca887fdf393233c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: sdk-update: fix traceback without update server setPaul Eggleton2016-01-151-5/+1
| | | | | | | | | | | | | | | | | | If the SDK update server hasn't been set in the config (when building the extensible SDK this would be set via SDK_UPDATE_URL) and it wasn't specified on the command line then we were failing with a traceback because we didn't pass the default value properly - None is interpreted as no default, meaning raise an exception if no such option exists. Additionally we don't need the try...except anymore either because with a proper default value, NoSectionError is caught as well. (From OE-Core master rev: 9763c1b83362f8445ed6dff2804dd7d282861f79) (From OE-Core rev: b2696869c1428e8ef2a198d2432121ddc2e2034c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: fetch remote repository before checking out new revisionPaul Eggleton2016-01-121-0/+1
| | | | | | | | | | | | | | | | | If we're upgrading a recipe that fetches from git, and we've simply fetched a tarball of the repo instead of directly from the upstream repo (this can happen if you have PREMIRRORS set up as in poky with a core recipe, e.g. kernelshark) then we won't have any new revisions, and the checkout will fail with "fatal: reference is not a tree: <hash>". To avoid this, do a "git fetch" before checking out the new revision. (From OE-Core master rev: c4daebf3fe797a8063dcbc2ab229be2fbedc8134) (From OE-Core rev: 2c8afd6aae775ab10dd30eb890fc410739048d79) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: remove erroneous error when not renaming recipePaul Eggleton2016-01-121-1/+0
| | | | | | | | | | | | | | If we're upgrading a git recipe the recipe file usually won't need renaming; for some unknown reason we were throwing an error here which isn't correct. (From OE-Core master rev: 656348dff9bc9dd1cafc8fff11e5e374e3667f0f) (From OE-Core rev: 9816c0a2ad2c1011e298d734576b531de9947740) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: fix updating PV and SRCREVPaul Eggleton2016-01-121-14/+20
| | | | | | | | | | | | | | | | | This code was clearly never tested. Fix the following issues: * Actually set SRCREV if it's been specified * Enable history tracking and reparse so that we handle if variables are set in an inc file next to the recipe * Use a more accurate check for PV being in the recipe which will work if it's in an inc file next to the recipe (From OE-Core master rev: 8b8f04226ebf464fa61c05ca7af7c6cbda392339) (From OE-Core rev: 105a7c90dac6f43b7c3d1de92827db2db8419112) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: fix removing other recipes from workspace on resetPaul Eggleton2016-01-121-1/+1
| | | | | | | | | | | | | | | | | If you did a "devtool add" followed by "devtool upgrade" and then did a "devtool reset" on the recipe you upgraded, the first recipe would also be deleted from the workspace - this was because we were erroneously adding the entire "recipes" subdirectory and its contents to be tracked for removal on reset. Remove the unnecessary call to os.path.dirname() that caused this. (From OE-Core master rev: 65354e066f87df7d3138adceb22d6a05d1685904) (From OE-Core rev: c44d41b0dec7457c4347a00b21d8b5bd24a9b887) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: include do_patch in SRCTREECOVEREDTASKSTzu-Jung Lee2016-01-121-1/+1
| | | | | | | | | | | | | | The external source of kernel has been patched during the construction of git repository. Include the do_patch task in the SRCTREECOVEREDTASKS. (From OE-Core master rev: 0731c5a9e98f7b7f6e5ada9bbb99acb3f5884516) (From OE-Core rev: e82466ebd9c8b9277255680d5efdd76eabf125b1) Signed-off-by: Tzu-Jung Lee <roylee17@currantlabs.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Typo on the file extensionLeonardo Sandoval2016-01-071-0/+0
| | | | | | | | | | | | | | By mistake, the file initially had a wrong extension name, so changing to the correct one. (From meta-yocto master rev: 32c2278b8fe93429d4cfa097eefccd20157cd3b8) (From meta-yocto rev: 4bc43893cc437e4278f7332b4486a196a7d0315d) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/utils/oe/misc.py: Preserve PATH when running native toolsRandy Witt2015-10-271-4/+16
| | | | | | | | | | | | | | | Previously exec_native_cmd() would remove all items from PATH except for the native sysroot. This can cause issues for the tools that are created using create_wrapper(). Now instead of wiping out the PATH, run a sanity check to check if the command is in the native sysroot. (From OE-Core rev: ba127370e621b5b683d6f454596c3d0c60c13df7) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: handle virtual providersPaul Eggleton2015-10-212-9/+27
| | | | | | | | | | | | | | For modify / extract / upgrade, if the specified "recipe" is not actually a recipe but a virtual target such as virtual/kernel, map it correctly to the actual recipe and make sure we use that name within the workspace. Thanks to Chris Larson for reminding me this was still broken and for a hint on how to fix it. (From OE-Core rev: 1f7752282ffb47d2621030ddb2fa42a5e491d6d2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: extract: fix error handlingPaul Eggleton2015-10-191-0/+8
| | | | | | | | | | | If recipe parsing fails we need to exit out instead of attempting to use the data object that's set to None, which resulted in a traceback. (From OE-Core rev: a46fb1a06be2df00a0bceb4e60ebdecb55b5974c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix change in path structure if --extract-to path existsPaul Eggleton2015-10-071-0/+6
| | | | | | | | | | | | | | | | If the directory specified by --extract-to exists, because we were using shutil.move() to move the temporary extracted directory to the specified path, a subdirectory was being created under that directory instead of moving the contents, which was a different result than if the directory didn't previously exist. We could try to always move the contents but that's complicated when any symlinks are involved; the simplest thing is just to remove the directory (which should be empty anyway) before moving the temporary directory across in its place. (From OE-Core rev: 2880bd23b471c1966661b9f05726faf60f9c0e7e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: avoid updating patches that have not changedPaul Eggleton2015-10-071-3/+26
| | | | | | | | | | | | | | | Use "git cherry" against the original tag that we made when we extracted the source in order to find the revisions that are definitely new. This allows you to modify a commit in the middle of the series and then run devtool update-recipe and not have the subsequent patches unnecessarily modified. Fixes [YOCTO #8388]. (From OE-Core rev: 7baf57ad896112cf2258b3e2c2a1f8b756fb39bc) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: modify: use correct local files directory nameMarkus Lehtonen2015-10-011-1/+1
| | | | | | | | | | | The name of the directory for local source files under srctree is 'oe-local-files', not 'local-files'. Fixes a bug that slipped through in b7ab82485e4514e07ab8a76e554da27ddc92e6c0. (From OE-Core rev: 68cbe684fe6d8fe3a44e47ed85837d09077df6d5) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: enable var history trackingMarkus Lehtonen2015-10-012-3/+3
| | | | | | | | | | | | Enable variable history tracking so that the variables are updated in the correct file - i.e. in the file they are already defined. [YOCTO #7715] (From OE-Core rev: b54796d013c562972e962126400503085281b425) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/bsp/engine: Indent the karch properties when stored into a fileLeonardo Sandoval2015-10-011-1/+1
| | | | | | | | | | Make a bit more human-friendly the karch properties when storing into a file. (From meta-yocto rev: 39292d397658a8e30c73d4cdaced66cb0efa8380) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-bsp: Update templates to 4.1 kernelLeonardo Sandoval2015-10-0122-15/+535
| | | | | | | | | | Add 4.1 kernel support. Old bbapends were not removed, so user still have the option for 3.14/3.19 kernels. (From meta-yocto rev: f47ea7224765a3c3da3a9e0a989173b2b1950cfc) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scrips/lib/bsp/engine: List properties to stdout when output parameter is ↵Leonardo Sandoval2015-10-011-2/+2
| | | | | | | | | | | | | omitted When user wants to output the list of properties for a corresponding architecture and the output parameter is given (--o/-outfile), there is no need to show the properties into the console. (From meta-yocto rev: bd133e2a6e626b4158f5a303d85205de9c66e8f2) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: modify: make bitbake use local files from srctreeMarkus Lehtonen2015-10-011-2/+7
| | | | | | | | | | | | | | | | This change makes it possible to have local files (non-remote SRC_URI files, i.e. files that are located in the "recipe space") under the srctree even if S!=WORKDIR. The files must be placed under the 'local-files' subdirectory. Complements the previous patch that imports local files into srctree. [YOCTO #7602] (From OE-Core rev: b7ab82485e4514e07ab8a76e554da27ddc92e6c0) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: better support for local source filesMarkus Lehtonen2015-10-012-98/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * extract: Copy all local source files (i.e. non-compressed/non-arcived SRC_URI files that have file:// URI prefix) - excluding patches - to the srctree repository. The files will be placed in a subdirectory called 'oe-local-files'. The oe-local-files directory is not committed to the Git repository, but, marked to be ignored by a .gitignore file. The developer can manually add and commit the files to Git if the changes to them need to be tracked. Before this patch, local source files (were copied (and committed) to the srctree repository only in some special cases (basically when S=WORKDIR) when doing devtool-extract. For most of the packages local files were not copied at all. * update-recipe: This patch causes the local files to be 'synced' from the srctree (i.e. from the 'oe-local-files' subdirectory) to the layer. Being 'synced' means that in addition to copying modified files over the original sources, devtool will also handle removing and adding local source files and updating the recipe accordingly. We don't want to create patches against the local source files but rather update them directly. Thus, 'oe-local-file' directory is ignored in patch generation when doing update-recipe, even if committed to Git. This functionality is only enabled if the 'oe-local-files' directory is present in srctree. [YOCTO #7602] (From OE-Core rev: a3bb5bd25b72bd1bcc156dabd0ffa2d9184bb160) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: file mover function that creates target dirMarkus Lehtonen2015-10-011-5/+11
| | | | | | | | | | | | Helper function for replacing a pattern like: target_dir = os.path.dirname(target) bb.utils.mkdirhier(target_dir) shutil.move(source, target) (From OE-Core rev: c09e5b11225a673534594c3642ceead3eb5653a3) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update_recipe: refactor patch generationMarkus Lehtonen2015-10-011-47/+72
| | | | | | | | | | Implement new function that handles patch file generation. The new function also does the discovery of new, updated and deleted patches. (From OE-Core rev: 183812e60e1dce09c77b41a5a927ab7fb6fdcf9d) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: add new patches in correct orderMarkus Lehtonen2015-10-011-1/+1
| | | | | | | | | | When adding multiple new patches append them to SRC_URI in correct order so that they apply correctly. (From OE-Core rev: 819680092c1b49c16f4ab01d135d44311a9dacca) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: use shutil.move instead of os.renameMarkus Lehtonen2015-09-241-1/+1
| | | | | | | | | | Rename fails over filesystem boundaries. (From OE-Core rev: 479c8eb6547c311123ea30c9f06f2d44c6365473) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: runqemu: avoid recipe parsePaul Eggleton2015-09-241-1/+1
| | | | | | | | | | We only need the base configuration to get the variable values we want to get here, there's no need to parse recipes / load the cache. (From OE-Core rev: 84172ff7b325f081dba6430fd27f12e3745838b5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: second fix for running from a different directoryMarkus Lehtonen2015-09-248-12/+16
| | | | | | | | | | | | | | | | | | Do not change change current working directory permanently, but, only for the duration of tinfoil initialization instead. The previous fix caused very unintuitive behavior where using relative paths were solved with respect to the builddir instead of the current working directory. E.g. calling "devtool extract zlib ./zlib" would always create create srctree in ${TOPDIR}/zlib, independent of the users cwd. (From OE-Core rev: 4c7f159b0e17a0475a4a4e9dc4dd012e3d2e6a1f) (From OE-Core rev: 05060699e63cd25d089e83e9aa56c11d5baa8fd8) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add search commandPaul Eggleton2015-09-231-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a subcommand to search to find the target recipe name providing some file or capability. This is implemented by searching on recipe name, package name, description, package contents (file names), and runtime file provides. For example: $ devtool search libGL mesa $ devtool search X11 xextproto libxxf86vm xf86driproto xf86vidmodeproto libxfixes xproto libx11 ... $ devtool search /bin/sed busybox sed This is particularly useful within the extensible SDK but is also made available in devtool alongside the build system. Note of course that because this searches pkgdata, useful results depend upon do_packagedata(_setscene) having executed for the recipe being searched for. (From OE-Core rev: 48cbde0ea77ed20126eceba5feb37c42a9229500) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add basic means of running runqemu within the extensible SDKPaul Eggleton2015-09-231-0/+64
| | | | | | | | | | | | | | | | We ship the runqemu script and if we build QEMU itself within the extensible SDK, then it would be nice to be able to run it. This is a very thin wrapper around runqemu, supplying the machine and image name so the user doesn't need to. (This subcommand is only available within the extensible SDK since it only really makes sense there where it is otherwise hard to run runqemu directly.) Implements [YOCTO #6657]. (From OE-Core rev: abca7a0cac7068ffe6a6b873d0842f804388b621) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool / recipetool: add handling for binary-only packagesPaul Eggleton2015-09-232-0/+23
| | | | | | | | | | | | | Add a means of creating recipes for package files or archives that contain a directory structure to be installed verbatim, for example an rpm file. (We mostly just re-use bin_package here and skip some of the normal build system checks.) This support is available in "recipetool create" and "devtool add" which wraps the former. (From OE-Core rev: 9e0a6b2e6f16185f8032d36b77d40802bc388987) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: build-image: delete bbappend at end of buildPaul Eggleton2015-09-231-30/+23
| | | | | | | | | | | | | | | Upon further reflection, it seems to me that this bbappend ought to just be deleted at the end of the build. This keeps things simple; you never have to remember to delete any files to get back to where you were before with the image. This means we can also drop the slightly awkward message reminding the user how to do that. I've also updated the test to look at the image manifest to determine if the command has worked instead of looking for the (now deleted) bbappend. (From OE-Core rev: f6b90bceaedf9bad3d111e6ca1fa79e59f472c73) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>