aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2017-11-10runqemu: print command search result when not foundrbt/runqemuRobert Yang
This makes debug easier. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-11-08oe-build-perf-report-email.py: add images as MIME objectsMarkus Lehtonen
Add images as separate MIME objects instead of directly embedding images in the html (as base64 encoded pngs). This makes the emails better suited for certain email servers/clients. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08wic: Update canned-wks for systemd to use UUID everywhereTom Rini
With systemd, the mounting of the swap partition is handled via systemd and will mount it, regardless of if PARTUUID is parsed or not. systemd has a runtime dependency on util-linux-mount so PARTUUID for regular mount points will be handled correctly. Make all partitions that we add to the image make use of UUIDs for maximum portability. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08wic: When using --use-uuid make sure that we update the fstab with PARTUUIDTom Rini
When we have been told to use the UUID we should also update the fstab to make use of PARTUUID instead of hard-coding the device in question. This will make the resulting image much more portable. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-08scripts/contrib/bbvars.py: Rewrite to use tinfoilAmanda Brindle
Use tinfoil to collect all variable names globally and in each recipe. No longer show the count of variables if they are undocumented. Fixes [YOCTO #2086] Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05wic: add 'part-name' argument for naming GPT partitionsArtur Mądrzak
The WIC's 'part' can now give a name for GPT partition in WKS file. It's similar to '--label', but is naming partintions instead file systems. It's required by some bootloaders to partitions have specified names. Signed-off-by: Artur Mądrzak <artur@madrzak.eu> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05runqemu: correct rootfs setup to boot an ide hddimgThomas Perrot
vm_drive variable is malformed when the drive type is an ide device. Signed-off-by: Thomas Perrot <thomas.perrot@tupi.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05wic: misc.py: Use mmd from mtools instead of syslinuxSaul Wold
mtools already provides a suite of msdos utilities, switch to this one also. This could allow for future changes to reduce wic's dependecies. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05wic: misc.py: Added more mtools binariesSaul Wold
This fixes the issue that if you don't have mtools installed on the host thus causing host contamination, that the correct binaries would be selected from the native sysroot. [YOCTO #12173] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-05runqemu: Add riscv support for qemu machinesKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-11-03oe-buildenv-internal: Fix finding build directoryRichard Purdie
The intent of the env setup scripts is to set BBPATH to point at the build directory. This means if the user changes directory, bitbake can still find the original build directory. The default bblayers.conf files reset BBPATH to the correct components so this is safe and restores the behaviour the script was intended to have. [YOCTO #12163] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-16devtool: standard: Expand SRCREV before using it in _update_recipe_srcrevPeter Kjellerstedt
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' Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-10-06oe-pkgdata-util: add unescape option to read-valueRoss Burton
Some fields are multiline values which have been escaped, so add an option to unescape the \n and \t. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-25wic: Add option to not change fstabFabio Berton
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 Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-25scripts: drop True option to getVar callsMing Liu
Search made with the following regex: getVar ?\((.*), True\). Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-22wic: allow multiple /boot partitions with different contentEnrico Scholz
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. Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-21oe-build-perf-report-email.py: add cc and bcc optionsJoshua Lock
Enable carbon copy and blind carbon copy recipients for the performance report emails. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-21scripts: rename yocto-compat-layer to remove "compatible" nomenclaturePaul Eggleton
"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 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/oe-build-perf-report: show recipe version changes in html reportMarkus Lehtonen
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] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/buildstats-diff: move more code to lib/buildstats.pyMarkus Lehtonen
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] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/oe-build-perf-report: summary of task resource usageMarkus Lehtonen
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] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/buildstats-diff: move code to lib/buildstats.pyMarkus Lehtonen
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] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/oe-build-perf-report: tidy up html syntaxMarkus Lehtonen
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 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/oe-build-perf-report: provide valid title in the html reportMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/oe-build-perf-report: remove dead codeMarkus Lehtonen
Some leftover from an early prototype. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/oe-build-perf-report: use --hostname in --listMarkus Lehtonen
Makes it possible to list test results for certain host only, instead of always listing all results from all hosts. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/oe-build-perf-report: fix handling of --history-lengthMarkus Lehtonen
Don't crash if 'left' revision is older than the range of commits specified with '--history-length'. In this case the 'left' revision takes precedence. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/oe-build-perf-report: add AggregateTestData classMarkus Lehtonen
Making the code a bit more readable. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18scripts/oe-build-perf-report: fix dumping buildstatsMarkus Lehtonen
Fix a misbehavior when some of the buildstats are missing. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-18devtool: ensure recipes devtool is working on are unlocked within the eSDKPaul Eggleton
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). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-09-18devtool: rework source extraction so that dependencies are handledPaul Eggleton
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]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-09-17wic: accept '-' in bitbake variablesEnrico Scholz
'-' 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) 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>
2017-09-13devtool/standard: set a preferred provider when adding a new recipe with devtoolJuan M Cruz Alcaraz
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] Signed-off-by: Juan M Cruz Alcaraz <juan.m.cruz.alcaraz@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11devtool: upgrade: check that user has configured git properlyPaul Eggleton
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) Signed-off-by: paul <paul@peggleto-mobl.ger.corp.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11scripts/buildhistory-diff: use of argparse instead of optparseDaniela Plascencia
Optparse is deprecated since version 2.7 and won't be developed further. Argparse should be used instead as it provides better tools for parsing and handling arguments. [YOCTO #9635] Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11wic: run bmaptool with native Python3Ed Bartosh
Modified wic code to run bmaptool using native Python3 from wic-tools native sysroot. [YOCTO #11891] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11wic: update help contentEd Bartosh
Added ext* partitions to the description of 'wic ls', 'wic cp' and 'wic rm' commands. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11wic: implement ext fs support for 'wic rm'Ed Bartosh
Implemented removing files or directories from the ext partition using debugfs tool. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11wic: implement ext fs support for 'wic cp'Ed Bartosh
Implemented copying files to the ext partition using debugfs tool. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11wic: implement ext fs support for 'wic ls'Ed Bartosh
Implemented listing directory contents for ext file system using debugfs tool. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11yocto-compat-layer.py: Fix trace when layers can't be processedMark Hatle
When all of the requested layers have unsatisfied dependencies, an error can occur. Check for the condition to avoid the traceback: Traceback (most recent call last): File "../scripts/yocto-compat-layer.py", line 203, in <module> ret = main() File "../scripts/yocto-compat-layer.py", line 194, in main if not results[layer_name].wasSuccessful(): AttributeError: 'NoneType' object has no attribute 'wasSuccessful' Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11devtool: status: Sort entries before printingOla x Nilsson
Sorted entries are easier to read. Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-31scriptutils: fix fetch_url() to use lowercase dummy recipe namePaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31recipetool: create: detect Eclipse licensesPaul Eggleton
Add detection of EPL 1.0 and EDL 1.0 license files. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31recipetool: create: suppress npm shrinkwrap/lockdown warnings againPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31recipetool: create: fix SRCPV prefix for non-git SCMsPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31recipetool: create: make recently added branch/tag handling git specificPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31devtool: add: add explicit srcrev/branch optionsPaul Eggleton
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.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31devtool: edit-recipe: fix regressionPaul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31devtool: upgrade: workaround for recipes which apply patches conditional ↵Paul Eggleton
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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>