summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* devtool: standard: Expand SRCREV before using it in _update_recipe_srcrevPeter Kjellerstedt2017-10-161-1/+1
| | | | | | | | | | | | | | | | If SRCREV contains a variable reference, any devtool command that would try to update it would fail. E.g., if SRCREV = "R${PV}", then devtool finish without having committed any changes would fail with: oe.patch.CmdError: Command Error: 'sh -c 'git format-patch R${PV} -o /tmp/oepatchb_doareb -- .'' exited with 0 Output: fatal: bad revision 'R' (From OE-Core rev: 094499c819722ad698ccb64ec65dd439b211c31c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add option to not change fstabFabio Berton2017-09-262-2/+11
| | | | | | | | | | | | | | | | | Create an option to wic doesn't change fstab file, the final fstab file will be same that in rootfs and wic doesn't update file, e.g adding a new mount point. Users can control the fstab file content in base-files recipe. This is useful if you want to only create an partition but not add fstab mount point or add new mount point using label e.g: LABEL=recovery /recovery auto defaults 0 1 (From OE-Core rev: 00420ec42140c1b752132bda190dede85756d157) Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: drop True option to getVar callsMing Liu2017-09-262-8/+8
| | | | | | | | | Search made with the following regex: getVar ?\((.*), True\). (From OE-Core rev: b848c3cb495905605283c57c79f2ed8ca17758db) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: allow multiple /boot partitions with different contentEnrico Scholz2017-09-251-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be useful to have multiple partitions with '--source bootimg-partition' but different content. E.g. for TI AM335x, one boot partition can contain an first stage bootloader ("MLO"), while the real bootloader and kernel plus devicetree are in another one. Patch allows to specify multiple IMAGE_BOOT_FILES with optional "_label-XXX" or "_uuid-XXX" overrides. E.g. with this patch, a .wks file with | part --source bootimg-partition ... --label=mlo --active | part --source bootimg-partition ... --label=boot0 | part --source bootimg-partition ... --label=boot1 and a recipe with | IMAGE_BOOT_FILES_label-mlo = "\ | MLO-${MACHINE}.img;MLO \ | " | | IMAGE_BOOT_FILES_label-boot0 = "\ | u-boot-${MACHINE}.img;u-boot.img \ | zImage \ | " | | IMAGE_BOOT_FILES_label-boot1 = "${IMAGE_BOOT_FILES_label-boot0}" | | WICVARS += " \ | IMAGE_BOOT_FILES_label-mlo \ | IMAGE_BOOT_FILES_label-boot0 \ | IMAGE_BOOT_FILES_label-boot1 \ | " is possible. It will create one partition with the MLO and two redundant ones with the uboot + kernel. (From OE-Core rev: 8c1dec627e9735260516fe8f0b2bfdb0ee70172b) Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: rename yocto-compat-layer to remove "compatible" nomenclaturePaul Eggleton2017-09-217-16/+16
| | | | | | | | | | | | | | | | | | "Yocto Project Compatible" [1] is a programme which requires you meet specific criteria including going through an application process - it is not sufficient simply to run the script we have created here and have it produce no warnings/errors. To avoid people being confused by the fact that this script uses the term "compatible" or variations thereof, substitute usage of that word with "check" instead. The functionality of the script is unchanged. [1] https://www.yoctoproject.org/ecosystem/yocto-project-branding-program (From OE-Core rev: 2a6126a115f10750ea89f95629d3699ad41c5665) 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>
* scripts/oe-build-perf-report: show recipe version changes in html reportMarkus Lehtonen2017-09-182-2/+33
| | | | | | | | | | | | | | | If buildstats are available (for a certain measurement), show recipe version changes between the two builds that are being compared. The information shown includes new and dropped recipes as well as changes in recipe version, revision or epoch. [YOCTO #11382] (From OE-Core rev: 46eb839b51bb1466a9feeb09c9c437d6d45576cc) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/buildstats-diff: move more code to lib/buildstats.pyMarkus Lehtonen2017-09-181-1/+30
| | | | | | | | | | | | | | More refactoring of buildstats-diff script. Move recipe version comparison functionality to scripts/lib/buildstats.py. This patch also compasses some wording changes, i.e. changing 'package' to 'recipe'. [YOCTO #11382] (From OE-Core rev: 2f8942d6830258fcbe1925f12ba1516def32d132) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-build-perf-report: summary of task resource usageMarkus Lehtonen2017-09-182-2/+66
| | | | | | | | | | | | | | | | | Utilize buildstats, if available, and show a summary of the resource usage of bitbake tasks in the html report. The details provided are: - total number of tasks - top 5 resource-hungry tasks (cputime) - top 5 increase in resource usage (cputime) - top 5 decrease in resource usage (cputime) [YOCTO #11381] (From OE-Core rev: ddd9443cb2432af2c15b358bfda708393fa3c417) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/buildstats-diff: move code to lib/buildstats.pyMarkus Lehtonen2017-09-181-0/+301
| | | | | | | | | | | | | | | Move over code from buildstats-diff to new scripts/lib/buildstats.py module in order to share code related to buildstats processing. Also, refactor the code, introducing new classes to make the code readable, maintainable and easier to debug. [YOCTO #11381] (From OE-Core rev: 8a2cd9afc95919737d8e75234e78bbc52e1494a1) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-build-perf-report: tidy up html syntaxMarkus Lehtonen2017-09-181-16/+20
| | | | | | | | | | | | Fix some problems in the html syntax of the generated report: - prevent empty rows in the summary table - add one missing column in the results table (From OE-Core rev: 10883bb49ad2f5309883fd352cf320b2e1648615) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-build-perf-report: add AggregateTestData classMarkus Lehtonen2017-09-181-1/+4
| | | | | | | | | | Making the code a bit more readable. (From OE-Core rev: 25351c7cac167b1a3e8b531e2cdf708192c6fa1f) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: ensure recipes devtool is working on are unlocked within the eSDKPaul Eggleton2017-09-183-11/+56
| | | | | | | | | | | | | | | | | | | | | | | | | Alongside reworking the way devtool extracts source, we now need to ensure that within the extensible SDK where task signatures are locked, the signatures of the tasks for the recipes being worked on get unlocked at the right time or otherwise we'll now get taskhash mismatches when running devtool modify on a recipe that was included in the eSDK such as the kernel (due to a separate bug). The existing mechanism for auto-unlocking recipes was a little weak and was happening too late, so I've reimplemented it so that: (a) it gets triggered immediately when the recipe/append is created (b) we avoid writing to the unlocked signatures file unnecessarily (since it's a global configuration file) and (c) within the eSDK configuration we whitelist SIGGEN_UNLOCKED_RECIPES to avoid unnecessary reparses every time we perform one of the devtool operations that does need to change this list. Fixes [YOCTO #11883] (not the underlying cause, but this manifestation of the issue). (From OE-Core rev: 4e9a0be32fc30fb87d65da7cd1a4015c99533aff) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: rework source extraction so that dependencies are handledPaul Eggleton2017-09-182-147/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since it was first implemented, devtool's source extraction (as used by the devtool modify, extract and upgrade subcommands) ignored other recipe dependencies - so for example if you ran devtool modify on a recipe that fetches from svn or is compressed using xz then it would fail if those dependencies hadn't been built first. Now that we can execute tasks in the normal way (i.e. tinfoil.build_targets()) then we can rework it to use that. This is slightly tricky in that the source extraction needs to insert some logic in between tasks; luckily we can use a helper class that conditionally adds prefuncs to make that possible. Some side-effects / aspects of this change worth noting: * Operations are a little slower because we have to go through the task dependency graph generation and other startup processing. There's not really any way to avoid this though. * devtool extract didn't used to require a workspace, now it does because it needs to create a temporary bbappend for the recipe. (As with other commands the workspace be created on the fly if it doesn't already exist.) * I want any existing sysroot files and stamps to be left alone during extraction since we are running the tasks off to the side, and especially devtool extract should be able to be used without touching these. However, this was hampered by the automatic removal process in sstate.bbclass triggered by bb.event.ReachableStamps when the task signatures change, thus I had to introduce a way to disable this removal on a per-recipe basis (we still want it to function for any dependencies that we aren't working on). To implement this I elected to use a file written to tmp/sstate-control which gets deleted automatically after reading so that there's less chance of stale files affecting future sessions. I could have used a variable but this would have needed to be whitelisted and I'd have to have poked its value in using the setVariable command. Fixes [YOCTO #11198]. (From OE-Core rev: 830dbd66992cbb9e731b48d56fddf8f220349666) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: accept '-' in bitbake variablesEnrico Scholz2017-09-181-1/+1
| | | | | | | | | | | | | | | '-' is valid and common in bitbake variables (e.g. 'FOO_pn-bar'). Accept it and other characters when reading the .env file. Also, allow variables to be empty. (From OE-Core rev: e688ac8e92d2bc451d8b2d437596f630bedccd2c) (From OE-Core rev: 2a69250abf61e51f633033ddb672e8f459191899) Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool/standard: set a preferred provider when adding a new recipe with devtoolJuan M Cruz Alcaraz2017-09-132-0/+45
| | | | | | | | | | | | | | | | | | | | A recipe added with "devtool add" requires to be able to take precedence on recipes previously defined with PREFERRED_PROVIDER. By adding the parameter "--provides" to "devtool add" it is possible to specify an element to be provided by the recipe. A devtool recipe can override a previous PREFERRED_PROVIDER using the layer configuration file in the workspace. E.g. devtool add my-libgl git@git://my-libgl-repository --provides virtual/libgl [YOCTO #10415] (From OE-Core rev: adeea2fe6895898a5e6006e798898f0f5dabd890) Signed-off-by: Juan M Cruz Alcaraz <juan.m.cruz.alcaraz@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: check that user has configured git properlyPaul Eggleton2017-09-111-1/+26
| | | | | | | | | | | | | | | | | | | If user.name or user.email haven't been set then git rebase can't really work properly. Check that the user has set these and error out if not. (Elsewhere we are relying on OE's git patch functionality which forces a dummy OE value - that's OK there as it's completely under OE's control and therefore it's OK for a dummy OE user to be the committer, but here the rebase may require intervention so it's reasonable to have the user's actual name and email on the operation.) Fixes [YOCTO #11947]. (From OE-Core rev: 129a3be07e272013be2db17552c13b4d8cc2cf6e) (From OE-Core rev: 802829f1c38d8c5eee11ba1d9ddd37cf02597f6e) Signed-off-by: paul <paul@peggleto-mobl.ger.corp.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: run bmaptool with native Python3Ed Bartosh2017-09-111-2/+4
| | | | | | | | | | | | | Modified wic code to run bmaptool using native Python3 from wic-tools native sysroot. [YOCTO #11891] (From OE-Core rev: 7fca44e03130c0860cc5df2093902773f426c774) 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>
* wic: update help contentEd Bartosh2017-09-111-32/+32
| | | | | | | | | | | Added ext* partitions to the description of 'wic ls', 'wic cp' and 'wic rm' commands. (From OE-Core rev: fcff05d666e55a017f11851aa4aad6c3ba9d4ff0) 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>
* wic: implement ext fs support for 'wic rm'Ed Bartosh2017-09-111-11/+16
| | | | | | | | | | | Implemented removing files or directories from the ext partition using debugfs tool. (From OE-Core rev: be530b7c7beae6f9fc95eed245cb37066d56581e) 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>
* wic: implement ext fs support for 'wic cp'Ed Bartosh2017-09-111-4/+9
| | | | | | | | | | | Implemented copying files to the ext partition using debugfs tool. (From OE-Core rev: 1a2bc70e6f85f414e7af48489e24c09ff335486d) 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>
* wic: implement ext fs support for 'wic ls'Ed Bartosh2017-09-111-5/+10
| | | | | | | | | | | Implemented listing directory contents for ext file system using debugfs tool. (From OE-Core rev: b591ba6f4d684aef3d7666bbdc678954e3255df5) 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>
* devtool: status: Sort entries before printingOla x Nilsson2017-09-111-1/+1
| | | | | | | | | | Sorted entries are easier to read. (From OE-Core rev: d0a123ec564f6d36977e472f8bc63f9c050ee616) Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linux-yocto: add linux-yocto 4.12 bbappendsLeonardo Sandoval2017-08-3121-14/+592
| | | | | | | | | | | | This allows the yocto-bsp script to pick the 4.12 kernel version when creating a custom BSP. [YOCTO #11995] (From meta-yocto rev: 897c6121404055c4dcb2d9f43f1214d8c99480ea) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scriptutils: fix fetch_url() to use lowercase dummy recipe namePaul Eggleton2017-08-311-1/+1
| | | | | | | | | | | | | | recipetool create (and hence devtool add) and devtool upgrade use fetch_url() which creates a dummy recipe in order to fetch source. Previously the random part of the name was using uppercase characters, and this triggers a QA warning after OE-Core commit 4713f8b2c4f2c74239d284adcf1e59e61aa66576, so use lowercase instead as I really should have in the first place. (From OE-Core rev: b48c48b00e82491d1c69e4d89a79c6242361abec) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: detect Eclipse licensesPaul Eggleton2017-08-311-1/+5
| | | | | | | | | Add detection of EPL 1.0 and EDL 1.0 license files. (From OE-Core rev: 41e7580991f8ad77a57eb7fd292e39f1583109f6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: suppress npm shrinkwrap/lockdown warnings againPaul Eggleton2017-08-311-0/+2
| | | | | | | | | | | | | | Since OE-Core revision 9a47a6690052ef943c0d4760630ee630fb012153 the mechanism we were using to suppress the warnings about NPM_LOCKDOWN and NPM_SHRINKWRAP not being set on the first fetch of the source is no longer available since we are using the normal fetch/unpack tasks to do the job. Use the newly added noverify parameter to suppress the warnings again. (From OE-Core rev: cb083b6f5f6e909b7c85548bcb1a92ca34d0c18a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix SRCPV prefix for non-git SCMsPaul Eggleton2017-08-311-1/+9
| | | | | | | | | | | If you're fetching from an SCM other than git (for example subversion or mercurial) then we need to use a different prefix for the SRCPV in PV instead of +git. (From OE-Core rev: ad1200c8729f21b325d347649f9dd5e5598de93e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: make recently added branch/tag handling git specificPaul Eggleton2017-08-311-2/+2
| | | | | | | | | | | | The branch and tag handling code that was recently added in OE-Core revs ecca596b75cfda2f798a0bdde75f4f774e23a95b and 3afdcbdc9a3e65bc925ec61717784ffec67d529d is specific to git, so only apply it when we're fetching from a git URL. (From OE-Core rev: 5d4bfe6cf788ce971a2e9419bc13492153023681) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add: add explicit srcrev/branch optionsPaul Eggleton2017-08-312-5/+37
| | | | | | | | | | | | | | | | At the moment when fetching source from a git repository you have to know that you can specify the revision and branch in the URL with ';rev=' and ';branch=' respectively, and you can also get thrown off by the shell splitting on the ; character if you forget to surround the URL in quotes. Add explicit -S/--srcrev and -B/--srcbranch options (consistent with devtool upgrade) to make this easier for the user to discover and use. (The rev and branch URL parameters will continue to work, however.) (From OE-Core rev: 2d86cac853d6daa496c0315a5cb0662ebf1165b0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: edit-recipe: fix regressionPaul Eggleton2017-08-311-4/+11
| | | | | | | | | | | | | | OE-Core commit 5a16b3c804c5eca331a1c08a7ce31a54909af105 attempted to use the same function to get the path to a recipe as the new "find-recipe" command it implemented, except that cannot work because (a) it didn't return anything and (b) event if it had tried, a command function can only return an exit code and we don't want that for find-recipe if it succeeded. Split out a separate reusable function for both commands. (From OE-Core rev: d5191840212adbf480961ba6fc68e1ab17e5a77a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: workaround for recipes which apply patches conditional ↵Paul Eggleton2017-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | upon class If we're upgrading a recipe that appends additional patches for, say, class-native, and we're just upgrading the target variant, then when we copied the recipe into the workspace we skipped copying the additional patches for the native variant. This caused warnings because the workspace recipe is preferred. Look at SRC_URI for all variants when copying files to work around this. More work is needed to make it easier to work with recipes that use BBCLASSEXTEND where you need to build more than one variant at once, but this at least fixes the immediate ugliness. (From OE-Core rev: 56bf5e93358187e31160d7893f57906bb3dc7ad7) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: fix handling of non-absolute pathsPaul Eggleton2017-08-311-0/+3
| | | | | | | | | | | | | | | | If your BBLAYERS has non-absolute paths in it (e.g. "${COREBASE}/../something") then none of the paths matched in copy_recipe_files() with the result that no files got copied and you ended up with an error later on because the recipe file couldn't be found at the destination. Fix this as well as adding an explicit check to see if no files got copied - error out earlier if so. Fixes [YOCTO #10981]. (From OE-Core rev: 3861486ad06f90c8644ebab119bbc5ddb9e693ca) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: update-recipe: ensure patches get deleted in srcrev modePaul Eggleton2017-08-311-1/+2
| | | | | | | | | | | | | | | | Patches that we identify as having been "deleted" (i.e. patches in SRC_URI that no longer appear in the git tree) need to be dropped even if we're updating in srcrev mode. This fixes the case where HEAD of the git tree is valid upstream (i.e. no extra commits), but there are patches left over in the recipe, e.g. when we do devtool upgrade and then all of the commits rebased on top of the new branch get skipped. Fixes [YOCTO #11972]. (From OE-Core rev: 350f83dc1e317aeb93539f13966caca6d894f569) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: deploy-target: Support stripped libs and execsTobias Hagelborn2017-08-271-4/+29
| | | | | | | | | | | | | | | | | | | | New devtool deploy-target option --strip which enables deploying stripped binaries, saving some space on target. * Copies the files of ${D} into a new directory and strips them in place * Used oe.package.strip_execs for stripping directory * Added devtool.conf option "strip" for changing default behavior Config example: [Deploy] strip = true [YOCTO #11227] (From OE-Core rev: 7f10c5118793da6ded59ae6e60e796152dbd7ca3) Signed-off-by: Tobias Hagelborn <tobiasha@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: always read image partitionsEd Bartosh2017-08-271-2/+3
| | | | | | | | | | | Got rid of lazy evaluation of self.partitions property. It's not needed because partitions of the source image should be always read. (From OE-Core rev: 1186fd8fd4a4789dc7c60feb86cc9fdd03fee7b3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: implement 'wic write' commandEd Bartosh2017-08-272-0/+186
| | | | | | | | | | | | This command writes image to the media or another file with the possibility to expand partitions to fill free target space. [YOCTO #11278] (From OE-Core rev: ac5fc0d691aad66ac01a5cde34c331c928e9e25a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: extend list of used toolsEd Bartosh2017-08-271-1/+2
| | | | | | | | | | | | | | Added sfdisk, e2fsck, mkswap, resize2fs, mkdosfs to the list of used tools in Disk class. They're going to be used in 'wic write' implementation. Added dependency to util-linux to wic-tools to ensure that sfdisk and mkswap are available from wic-tools native sysroot. (From OE-Core rev: 1add68e4d6150e3038609d8ce7e3cff28fe8fbb8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: added 'fstypes' parameter to Disk.__init__Ed Bartosh2017-08-271-2/+7
| | | | | | | | | | | This parameter specifies list of supported filesystems. So far only 'fat' is supported, but 'wic write' is going to support at least 'fat', 'ext' and 'swap'. (From OE-Core rev: 7cffcdcfdf4f8934d212740a6d7cf136911ebdac) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: convert partition number to intEd Bartosh2017-08-271-2/+2
| | | | | | | | | | Converted partition number to int in order to use it as an index in the list of partitions. (From OE-Core rev: f901f23eb05cd6b86a49ef1b6ec7efaf72f6d685) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: get more info from the 'parted print' outputEd Bartosh2017-08-271-1/+8
| | | | | | | | | | | Got partition type and sector sizes from the output of 'parted print'. This info may be used in the implementation of 'wic write' command. (From OE-Core rev: 5c0926d8efa468177b7cb43a5f06b35058255644) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: reimplement getting paths of used toolsEd Bartosh2017-08-271-27/+9
| | | | | | | | | | | | | | So far every used tool have to have separate property and private attribute in the Disk class. This is too verbose, considering that there will be much more tools used. Reimplemented getting tools paths using custom __getattr__ method. This is much more compact and readable. (From OE-Core rev: d1a831a9870bc31e936eb480485b28f1ffc13080) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix npm license code regressionPaul Eggleton2017-08-231-0/+3
| | | | | | | | | | | | | | OE-Core commit 1df60b09f7a60427795ec828c9c7180e4e52f98c caused a regression in npm handling since it still expected to be able to get the results of the license handling, but this no longer happens until after the npm plugin is called. Thus, call the license handling function ourselves here (which will record this as having been handled so it doesn't get done again later). (From OE-Core rev: 3e408aadaea85b6f192b34d37d508cbaf3cd7164) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix broken import in npm modulePaul Eggleton2017-08-231-1/+1
| | | | | | | | | | | With "import oe" in create_npm.py you get "AttributeError: module 'oe' has no attribute 'package'" when it tries to call oe.package.npm_split_package_dirs(). (From OE-Core rev: 1261900aeac725e5712e0180600753a9d4c67e60) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linux-yocto: Drop 4.1 kernel appendsRichard Purdie2017-08-2314-578/+0
| | | | | | (From meta-yocto rev: ecde92624c27ebe511696b5bcfc83b21efec17d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: allow plugins to set LICENSE and LIC_FILES_CHKSUMPaul Eggleton2017-08-232-80/+79
| | | | | | | | | | | | | | | | | | | | | We were being a bit prescriptive in setting LICENSE and LIC_FILES_CHKSUM. We can't always trust what's in the metadata accompanying some source which plugins will almost always be pulling from, however we do want to allow plugins to set the LICENSE and LIC_FILES_CHKSUM values. Merge what we find in our license file scan with what the plugin sends back. Additionally, plugins can now add a "license" item to the handled list in order to inhibit the normal LICENSE / LIC_FILES_CHKSUM handling if they have already taken care of it completely. Thanks to Mark Horn <mark.d.horn@intel.com> for prompting, testing and fixing this patch. (From OE-Core rev: 1df60b09f7a60427795ec828c9c7180e4e52f98c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: allow plugins to set PN / PV more easilyPaul Eggleton2017-08-231-7/+9
| | | | | | | | | | | | | Previously if we were able to auto-determine the name from the URL, that took precedence over any name that might be set in extravalues by a plugin. Some plugins might be able to get a better idea of the name and thus we should move defaulting of the name further down after the plugins have had a chance to set it. (From OE-Core rev: 3bb979c13463705c4db6c59034661c4cd8100756) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: import: new plugin to import the devtool workspaceLeonardo Sandoval2017-08-232-0/+180
| | | | | | | | | | | | | | | | Takes a tar archive created by 'devtool export' and imports (untars) it into the workspace. Currently the whole tar archive is imported, there is no way to limit what is imported. https://bugzilla.yoctoproject.org/show_bug.cgi?id=10510 [YOCTO #10510] (From OE-Core rev: 2de8ba89ef10fefcc97246dfeb4b8d1e48ee8232) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: append md5sum only if not already presentLeonardo Sandoval2017-08-231-2/+5
| | | | | | | | | | | In case the proposed md5sum to be appended to the .devtool_md5 file is already present, do not append it. (From OE-Core rev: f958c5cba3b0d24ca696b2b707857009c9a7b5b8) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: export: new plugin to export the devtool workspaceLeonardo Sandoval2017-08-231-0/+119
| | | | | | | | | | | | | | | | | | By default, exports the whole workspace (all recipes) including the source code. User can also limit what is exported with --included/--excluded flags. As a result of this operation, a tar archive containing only workspace metadata and its corresponding source code is created, which can be properly imported with 'devtool import'. https://bugzilla.yoctoproject.org/show_bug.cgi?id=10510 [YOCTO #10510] (From OE-Core rev: f9bc3b5101b554a72298266519dbdd1497f262a6) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: upgrade: enable branch checking when revision is providedChang Rebecca Swee Fun2017-08-231-5/+22
| | | | | | | | | | | | | | | | | When devtool upgrade is run on a recipe with revision specified that is not on master branch, and branch isn't set by --srcbranch or -B, then we should get the correct branch and append the branch to the URL. If the revision was found on multiple branches, we will display error to inform user to provide a correct branch and exit. [YOCTO #11484] (From OE-Core rev: 29ced7387a92aed17b7fe93b1654790a981734c1) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>