summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* oe-build-perf-report: Fix missing buildstats comparisions2.7_M2Richard Purdie2019-02-111-2/+2
| | | | | | | | | Integers were being compared to strings leading to missing buildstats comparision data. Fix this. (From OE-Core rev: 2dbbf598192ae2b3aa488df042f56aa6c6634a00) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-report: Improve branch comparision handlingRichard Purdie2019-02-111-8/+23
| | | | | | | | | | | | | | | | | When comparing branches, correctly filter the revisions corresponding to the specific branch specified. Also use the commit numbers as a way to gauge spatially related commits for comparision meaning comparisions for out of order build revisions becomes meaninful. This should improve the reporting for autobuilder generated builds. Also improve the branch option help text. (From OE-Core rev: 9f6f4ab6eec9dca07af7f53da5f737a6167bfb38) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-report: Allow commits from different branchesRichard Purdie2019-02-081-0/+5
| | | | | | | | | | | | | The code won't currently allow comparisions of two commits on different branches even if the commits are specified by their hashes. This updates the code to search two branches for any relavent commits, hence allowing comparisions to be made. A particularly useful case is master vs. master-next for example. (From OE-Core rev: 2d835bb1570c515ae501442f3ce19fae8e249b27) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-report: Allow branch without hostnameRichard Purdie2019-02-081-2/+2
| | | | | | | | | | Allow the branch to be set without the hostname option. Previously if hostname wasn't set, branch would be overwritten regardless of whether it was set or not. (From OE-Core rev: 3ec43bf4c6c8f7730a67f63ad4e14903f289014e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib_header_wrapper.h: Use #pragma onceKhem Raj2019-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | | Avoid infinite include loops, especially with bits/wordsize.h which is now possible with the synthesized headers since we now also synthesize bits/wordsize.h itelf for some arches e.g. arm/aarch64 In cases where extra preprocessing tools are used such as clang-tidy e.g. and these tools are not passed the knowledge about architecture then case comes where we enter into header include loop for bits/wordsize.h, since this template does explicitly include bits/wordsize.h To fix this emits the pragma once at beginning of file, this is better solution than include guards, and pragma once is practically supported on all compilers except few e.g. cray c/c++ compiler (From OE-Core rev: 6ab11ac25bb987642d5ca1a07f4bd5f30c66c9c5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* send-error-report: Use https instead of http protocolKhem Raj2019-02-051-3/+3
| | | | | | | | | errors.yp.org can understand https (From OE-Core rev: f540fed0aec24e28eff8522fddbe3cf7ee45e30b) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add --all option to check-upgrade-statusRoss Burton2019-02-021-1/+2
| | | | | | | | | | The default behaviour is to show just recipes needing upgrades, but for automated reports showing all recipes can be useful. (From OE-Core rev: 29e064ac6bd8d1ef74c280bf85bf8428c37ba014) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-git-proxy: Avoid resolving NO_PROXY against local filesJan Kiszka2019-01-311-2/+2
| | | | | | | | | | | NO_PROXY may contain * elements, and if we are unlucky (or want to match all hosts with *), we will pick up local files rather than doing the match in match_host. Quoting helps here. (From OE-Core rev: 7e216e806ca765152fd874e24785f783a3201284) Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: add a command to print an overall list of recipes that can be updatedAlexander Kanavin2019-01-261-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | A sample portion of the output: $ devtool check-upgrade-status ... NOTE: acpid 2.0.30 2.0.31 Ross Burton <ross.burton@intel.com> NOTE: u-boot-fw-utils 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff NOTE: u-boot-tools 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff NOTE: u-boot 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff NOTE: bind 9.11.5 9.13.5 Armin Kuster <akuster808@gmail.com> cannot be updated due to: 9.11 is LTS 2021 NOTE: iproute2 4.19.0 4.20.0 Changhyeok Bae <changhyeok.bae@lge.com> NOTE: ofono 1.25 1.27 Ross Burton <ross.burton@intel.com> NOTE: wpa-supplicant 2.6 2.7 Changhyeok Bae <changhyeok.bae@lge.com> NOTE: base-passwd 3.5.29 3.5.45 Anuj Mittal <anuj.mittal@intel.com> cannot be updated due to: Version 3.5.38 requires cdebconf for update-passwd utility NOTE: busybox 1.29.2 1.30.0 Andrej Valek <andrej.valek@siemens.com> NOTE: dbus-test 1.12.10 1.12.12 Chen Qi <Qi.Chen@windriver.com> NOTE: dbus 1.12.10 1.12.12 Chen Qi <Qi.Chen@windriver.com> NOTE: glib-2.0 2.58.0 2.58.3 Anuj Mittal <anuj.mittal@intel.com> NOTE: glib-networking 2.54.1 2.58.0 Anuj Mittal <anuj.mittal@intel.com> ... (From OE-Core rev: 02284423b6391c77da19912192fc607fedb05e67) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: improve git repo checks before check_commits logicDan Dedrick2019-01-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check_commits logic assumes that both devtool-base and args.branch exist in the git repo that it is operating on. In order to prevent errors at that point it's best to first ensure that both of these refs actually exist. If they don't both exist then the check_commits logic should just be skipped, as it would be if the repo wasn't originally checked out by devtool. Previously if a user removed the args.branch branch from their devtool cloned repo this code would crash on adding the repo with -n. The crash would look like this: Traceback (most recent call last): File "/home/ddedrick/src/poky/scripts/devtool", line 344, in <module> ret = main() File "/home/ddedrick/src/poky/scripts/devtool", line 331, in main ret = args.func(args, config, basepath, workspace) File "/home/ddedrick/src/poky/scripts/lib/devtool/standard.py", line 812, in modify (stdout, _) = bb.process.run('git log devtool-base..%s' % branch, cwd=srctree) File "/home/ddedrick/src/poky/bitbake/lib/bb/process.py", line 178, in run raise ExecutionError(cmd, pipe.returncode, stdout, stderr) bb.process.ExecutionError: Execution of 'git log devtool-base..devtool' failed with exit code 128: fatal: ambiguous argument 'devtool-base..devtool': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' (From OE-Core rev: f13a3490fdb404bbd4c77e45b83540d6deec1358) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: remove duplicate overridesDan Dedrick2019-01-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DEVTOOL_EXTRA_OVERRIDES only needs one entry for each instance of overrides. Previous to these changes it would find every override to SRC_URI and add it to the list. This would duplicate instances where SRC_URI is modified multiple times with the same override like: SRC_URI_append_foo += "file://0001-foo.patch" SRC_URI_append_foo += "file://0002-bar.patch" A bbappend might also overwrite a SRC_URI override, which would also cause multiple instances to occur. When there are multiple instances of the same override in DEVTOOL_EXTRA_OVERRIDES it causes devtool modify to fail when creating override branches. The failure occurs when attempting to create the same override branch a second time and looks like this: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:devtool_post_patch(d) 0003: File: '/build/poky/meta/classes/devtool-source.bbclass', lineno: 202, function: devtool_post_patch 0198: 0199: for override in extra_override_list: 0200: localdata = bb.data.createCopy(d) 0201: if override in default_overrides: *** 0202: bb.process.run('git branch devtool-override-%s %s' % (override, devbranch), cwd=srcsubdir) 0203: else: 0204: # Reset back to the initial commit on a new branch 0205: bb.process.run('git checkout %s -b devtool-override-%s' % (initial_rev, override), cwd=srcsubdir) 0206: # Run do_patch function with the override applied File: '/build/poky/bitbake/lib/bb/process.py', lineno: 178, function: run 0174: if not stderr is None: 0175: stderr = stderr.decode("utf-8") 0176: 0177: if pipe.returncode != 0: *** 0178: raise ExecutionError(cmd, pipe.returncode, stdout, stderr) 0179: return stdout, stderr Exception: bb.process.ExecutionError: Execution of 'git branch devtool-override-foo devtool' failed with exit code 128: fatal: A branch named 'devtool-override-foo' already exists. (From OE-Core rev: 90f667db2219f04e6d61588cd61056d3d8da6d7d) Signed-off-by: Dan Dedrick <ddedrick@lexmark.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/contrib/build-perf-test.sh: Remove itRichard Purdie2019-01-201-400/+0
| | | | | | | | | This is the older script which the code in lib/oeqa/buildperf replaces so delete the obsolete script to avoid confusion. (From OE-Core rev: 9908b7955e75e10d6a1384e4c08417ef534464af) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/contrib/build-perf-test-wrapper.sh: Improve interaction with ↵Richard Purdie2019-01-201-5/+32
| | | | | | | | | | | | | | | | | | | autobuilder automation This tweaks the script to: * Ensure directories exist and can be written to * Allow the downloads directory to be specified * Error early if the phantomjs or optipng dependencies are not installed * Allow the location of the globalres.log file to be specified This means that the main build directory can be destroyed and any state from the script is stored elsewhere allowing it to be triggered automatically from the autobuilder infrastructure. (From OE-Core rev: 1de5fbd484e6a747ae6419ccc89d8c2911b9706b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: sdimage-bootpart: Use mmcblk0 drive instead of bogus mmcblkAlexey Brodkin2019-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently either nobody ever used sdimage-bootpart.wks or fstab was kept untouched due to "--no-fstab-update" usage as some boards like IMX may have, see [1]. Otherwise addition of the following line to the target's fstab: ---------------------->8----------------- /dev/mmcblkp1 /boot vfat defaults 0 0 ---------------------->8----------------- gets us unusable target: ---------------------->8----------------- [* ] A start job is running for dev-mmcblkp1.device (23s / 1min 30s) [ TIME ] Timed out waiting for device dev-mmcblkp1.device. [DEPEND] Dependency failed for /boot. [DEPEND] Dependency failed for Local File Systems. You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or "exit" to boot into default mode. Press Enter for maintenance ---------------------->8----------------- Fix it with use of "mmcblk0" device name. [1] https://lists.yoctoproject.org/pipermail/meta-freescale/2018-February/022156.html (From OE-Core rev: 57a925dbd949e488980b02896106efd82bf47ed2) Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Cc: Maciek Borzecki <maciek.borzecki@gmail.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: allow bitbake variables in kickstarter filesRasmus Villemoes2019-01-141-0/+17
| | | | | | | | | | | | | | | | | | | image_types_wic.bbclass has a mechanism for doing variable substitution on .wks files by simply letting the input file be called .wks.in. However, that doesn't allow using variables in files included via the include directive. This is unfortunate, because lacking either the ability to include other files or variable substitution leads to fragile and error-prone duplication between kickstarter files and recipes/configuration files used for various boards. This adds (somewhat naive) support for variable substitution in all files parsed by wic. The user should add all required variables to WICVARS to get them exported appropriately. (From OE-Core rev: 8a75d614a8a1ff72c4af448ac3e1292d0e1d1a79) Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-git-archive: fix non-existent key referencing errorYeoh Ee Peng2019-01-081-6/+13
| | | | | | | | | | | | | | | | | | | | | | | Without installing gitpython package, oe-git-archive will face error below, where it was referencing key that was non-existent inside metadata object. Traceback (most recent call last): File "<poky_dir>/scripts/oe-git-archive", line 271, in <module> sys.exit(main()) File "<poky_dir>/scripts/oe-git-archive", line 229, in main 'commit_count': metadata['layers']['meta']['commit_count'], KeyError: 'commit_count' Fix this error by adding exception catch when referencing non-existent key (based on inputs provided by Richard Purdie). [YOCTO# 13082] (From OE-Core rev: 9a3cc9b8523b78dda6c3f3f2e12798b2b907d7e5) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-gen-tapdevs: Allow run --help without sudoRobert Yang2019-01-031-8/+19
| | | | | | | | | | | | | | | | | | | | | Then we can get user's UID and GID rather than hardcode to 1000, e.g.: - Without sudo $ runqemu-gen-tapdevs --help [snip] $ sudo ../poky/scripts/runqemu-gen-tapdevs 15220 100 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin [snip] - With sudo $ sudo ../poky/scripts/runqemu-gen-tapdevs --help [snip] $ sudo ../poky/scripts/runqemu-gen-tapdevs 15220 100 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin [snip] (From OE-Core rev: 446e7da7e56f9de3602498b5ef40e9e0f8f71837) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/distro: Remove as using obsolete APIs and need re-implementing sanelyRichard Purdie2018-12-182-252/+0
| | | | | | (From OE-Core rev: 83d0049bb406e09251b368dba9478be71fe2b0a8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: clean up subprocess usageRoss Burton2018-12-151-34/+29
| | | | | | | | | | Where possible pass lists instead of strings, don't use a subshell, and call check*() instead of using Popen directly. (From OE-Core rev: d2374623444752af1ad748ed36b68ea58f629bf6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* patchreview: Various fixes/improvementsRoss Burton2018-12-051-11/+35
| | | | | | | | | | Add various fixes and improvements including the ability to export patch statsitics as json data. (From OE-Core rev: aa4a4b3ca799948047337e006ee9bf482be7b409) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Improve lockfile handling for python with close_fd=TrueRichard Purdie2018-12-011-1/+4
| | | | | | | | | | | | | | | On python versions with close_fds=True (python 3.2 onwards), the tap device lockfile isn't passed to the child process. Since this guards against use of an active interface, we really want this here, so pass it in pass_fds. This means if the parent exits early, the child still holds the lock, avoiding messages like: runqemu - ERROR - Failed to run qemu: qemu-system-x86_64: could not configure /dev/net/tun (tap0): Device or resource busy (From OE-Core rev: 17a0a067d597c445c5892ff9914e91a2187f7e09) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Tidy up lock handling codeRichard Purdie2018-12-011-7/+9
| | | | | | | | | | | | Various tweaks: - Balance up the aquire/release functions - Use debug messge for both acquiring and release message for consistency in logs - Use None instead of an empty string - Reset the value of the field if we don't have the lock any more (From OE-Core rev: 58e48211f7cb44d959b571d449a94291c27535a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Fix logic error causing failures with MACHINE from the ↵Richard Purdie2018-12-011-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | environment MACHINE=qemux86-64 oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2 fails yet oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2 with MACHINE in local.conf would work. It turns out that: runqemu slirp wic.qcow2 qemux86-64 works but: MACHINE=qemux86-64 runqemu slirp wic.qcow2 qemux86-64 does not. The reason are the misplaced return statements in runqemu, its skipping a block of logic when MACHINE is set in the environment when it shouldn't. Fix this. (From OE-Core rev: 98d113ae52cbbc88773a81a17b0933412a8e463b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: fix target-deploy --stripAdrian Freihofer2018-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This is a fixup for: e1ba46109ea4be3d3b310abaf7f2da3c84a83930 devtool deploy-target --strip foo root@192.168.7.2 ended up with: Traceback (most recent call last): File "/home/user/bar_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/ devtool", line 344, in <module> ret = main() File "/home/user/bar_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/ devtool", line 331, in main ret = args.func(args, config, basepath, workspace) File "/home/user/bar_sdk/layers/poky/scripts/lib/devtool/ deploy.py", line 187, in deploy rd.getVar('base_libdir')) TypeError: strip_exbar() missing 1 required positional argument: 'd' (From OE-Core rev: bc349b2d99d74f6d7fb590fd97750e5ff8d6e6c4) Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Remove deprecated imp module usageRichard Purdie2018-11-162-11/+8
| | | | | | | | | The imp module is deprecated, port the code over to use importlib as recently done for bb.utils as well. (From OE-Core rev: 24809582d4850190d87cd8eb8180d0dce215dbdf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: bootimg-efi: add a title source parameterMing Liu2018-11-161-2/+4
| | | | | | | | | | | | | | | | | | Sometimes the users might want to change the title showing on UEFI booting screen, so far it's hard-coded to 'boot'. There is not a easy way to customize it in current design, I tried firstly with '--configfile', but that does not work with --use-uuid, since the later option will generate a UUID and write it to boot config, only when the former option is not enabled. So a new source parameter 'titile' is added in this patch, it defaults to 'boot' to be consistent with the original title. (From OE-Core rev: 37e16188ef3b1b328eb18b3e459c051c9c9f0332) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oepydevshell-internal.py: decode only when readdata is validChangqing Li2018-11-161-1/+3
| | | | | | | | | | | | | | | fix below problem: pydevshell raises exception when maximize the python shell window. when click maximize, rlist of select return ready object, but the pty.read is None, so throw exception of 'NoneType' object has no attribute 'decode', change to only decode when readdata is valid. [YOCTO #11875] (From OE-Core rev: d598f8d48e9b094af99effa7471d613b16ffa817) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* checklayer: generate locked-sigs.inc under builddirChangqing Li2018-11-161-3/+3
| | | | | | | | | | | | | | | yocto-check-layer will find locked-sigs.inc under builddir, but locked-sigs.inc is generated under current bitbake working dir. if run yocto-check-layer outside builddir, we will met error like "No such file or directory: *locked-sigs.inc". change to run bitbake -S under builddir to fix this problem. [YOCTO #12973] (From OE-Core rev: 2ec0bc0b038bc6413978c8f34ef5c0d22b4bc3e7) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/autobuilder-worker-prereq-tests: Shore up qemu testingMichael Halstead2018-11-141-2/+8
| | | | | | | | | | | | | | Check that yocto-autobuilder-helper has been cloned to the correct location. Check that vnc is running using the same script the autobuilder does. Set the DISPLAY enviroment variable to :1 the same way we do when building normally. Make the VM's serial console available so we can log in and power off allowing the tests to continue. (From OE-Core rev: 5fb26ff0b56eebb864fd8f74c015e414476eec43) Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Replace subprocess.run() for compatibiltyMichael Halstead2018-11-141-2/+2
| | | | | | | | | | | subprocess.run() was introduced in Python 3.5. We currently support down to Python 3.4 so I've replaced it with subprocess.check_call() which is available in that version. (From OE-Core rev: 3a09cee5994ce65079dab1042e47e5eed4540bb9) Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Add serialstdio modeRichard Purdie2018-11-141-2/+7
| | | | | | | | | | | | Its currently not possible to have a console available whilst using qemu in graphics mode. This is causing some issues for testing autobuilder bringup so all a "serialstdio" mode to runqemu to accomodate this. The existing serialstdio internal variable is renamed to allow the new user visible option. (From OE-Core rev: 101b70d3c6a0a5a022d96dfdd21500b757c8fada) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/autobuilder-worker-prereq-tests: adjust max_user_watchesMichael Halstead2018-11-071-4/+5
| | | | | | | | | | Temporarily modify path to run as non-privileged user on more distros. Change the recommended value to match what we use on the autobuilder. (From OE-Core rev: 2f86c3f1180ba8bf77301a0bc29c3b290bc28d91) Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use explicit errno importRoss Burton2018-11-071-4/+5
| | | | | | | | | | os.errno doesn't work in Python 3.7 and shouldn't have ever worked, so use import errno explicitly. (From OE-Core rev: 82f9157e84dcaf0ad4292053b09be68c2290d197) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-init-buildenv/base: Relax python version checks in favour of HOSTTOOLS ↵Richard Purdie2018-11-071-10/+1
| | | | | | | | | | | | | | manipulation Several distros are now shipping "python" as python v3 contra to the original python guidelines. This causes users confusion/pain in trying to use our tools. We can just force "python" to "python2" within HOSTTOOLS to avoid this issue and hide the complexity from the user. (From OE-Core rev: b06a6cde5c5503f456f260c773cf126085e18c8d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* udev-hwdb: fix postinstall scripts failures when multilib enabledKai Kang2018-10-251-0/+6
| | | | | | | | | | | | | | When multilib is enabled and both udev-hwdb and ${MLPREFIX}udev-hwdb are installed to image, it fails to run one of their postinstall scripts that they both call ${base_bindir}/udevadm with same user mode qemu. Duplicate udevadm and add postinst-intercept update_udev_hwdb to fix the failures. (From OE-Core rev: d6b737a31a8842cdc770b05e28503c81a691d10d) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/patchreview: tighten patch detectionRoss Burton2018-10-161-1/+1
| | | | | | | | | | Only look in recipes-* folders for patches, to stop finding patches in e.g. meta/lib/oeqa/manual. (From OE-Core rev: ed912e10c61ea9d45ca648e03eebafeebcf7e9b0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: search nonarch STAGING_DATADIR for multilibKai Kang2018-10-161-1/+9
| | | | | | | | | | | | | | | | | | It fails to build multilib image such as lib32-core-image-minimal with wic by set 'IMAGE_FSTYPES = "wic"': | ERROR: Couldn't find correct bootimg_dir, exiting When multilib is enabled, STAGING_DATADIR is expanded with MLPREFIX. But dependencies of images such as syslinux is still populated to nonarch STAGING_DATADIR. Search nonarch STAGING_DATADIR to fix the error. (From OE-Core rev: dbae9a6f9a1c6cc7d4dd680d7bbda3dfa40f3491) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: make engine.py:get_partitions() resilient to parted/dmidecode stderr outputGeoff Parker2018-10-121-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Running wic commands on Debian 10 systems fail in scripts/lib/wic/engine.py:get_partitions() due to new stderr output captured when trying to parse the output from /sbin/parted as a non-root user. The parted command calls the dmidecode utility, which produces this error as a non-root user: /sys/firmware/dmi/tables/smbios_entry_point: Permission denied /dev/mem: Permission denied scripts/lib/wic/engine.py:get_partitions() calls misc.py:exec_cmd(), a subprocess wrapper which returns a combined stderr and sdtdout. These messages to stderr confuse the partition table parser in get_partitions(). This patch has the partition table parser ignore lines before the expected "BYT;" header string. Running wic in Debian 9 does not have this issue. (From OE-Core rev: d6936301d7598b7a783beaae95109555faf6cc17) Signed-off-by: Geoff Parker <geoffhp@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Support for changing the imager.Davis, Michael2018-10-102-1/+3
| | | | | | | | (From OE-Core rev: f24c3538a27388d282a94e2d8a70cd9108d0919c) Signed-off-by: Michael Davis <michael.davis@essvote.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemux86-directdisk: remove mem= parameterAnuj Mittal2018-10-041-1/+1
| | | | | | | | | | | | | | | | | Remove usage of a specific amount of memory and let it be controlled by users. This was the default behaviour before it was changed by commit 3b79d9a78 that switched the wks file to be used for qemux86. Also fixes the bitbake parsing issues seen because of memory starvation using build appliance images. Fixes [YOCTO #12894] (From OE-Core rev: 18d6b668c52dc881cff7b107420e0de527eecce4) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/yocto-check-layer: Don't abort when layer fails to get signaturesAníbal Limón2018-10-041-1/+8
| | | | | | | | | | | When execute in multiple layers like meta-openembedded the execution is aborted when some sublayer fails to get world signatures, so mark it as an error and continue the execution in the remaining sublayers. (From OE-Core rev: c8ab558b4fdc77ab54fbb130078c78d43740b4b8) Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* checklayer: avoid recursive loop in add_layer_dependenciesNicolas Dechesne2018-09-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Layer A and Layer B depend on each other, then we will end up in a recursive loop in function recurse_dependencies(). To avoid such situation before making the recursive function call we check whether or not we have already processed this layer. e.g. without this patch, running this script on layers with dependency loops, we are seeing: $ yocto-check-layer -d /srv/work/oe/meta-openembedded/ INFO: Detected layers: INFO: meta-python: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-python INFO: meta-filesystems: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-filesystems INFO: meta-gnome: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-gnome INFO: meta-xfce: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-xfce INFO: meta-networking: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-networking INFO: meta-initramfs: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-initramfs INFO: meta-oe: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-oe INFO: meta-multimedia: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-multimedia INFO: meta-perl: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-perl INFO: meta-webserver: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-webserver INFO: INFO: Setting up for meta-python(LayerType.SOFTWARE), /srv/work/oe/meta-openembedded/meta-python DEBUG: Processing dependencies core openembedded-layer for layer meta-python. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. ... ... ... [keep repeating] This patch fixes this situation. (From OE-Core rev: 171900b4bcb06416685ce90b63114a10fefe0b94) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: fix handling of SIGTERM and the problem of line wrappingChen Qi2018-09-251-3/+11
| | | | | | | | | | | | | | | | | | | | | The current handling of SIGTERM is incorrect as the process pid returned by Popen call with shell setting to True is actualy the shell instead of the qemu process. So use shlex to split cmd so that we can avoid using shell=True. This ensures the child process is the actual qemu process. Also, as we install a SIGTERM handler, we need handle the situation of qemu terminated by SIGTERM, otherwise we will get ERROR message in such case. Besides, we have a problem that after running qemu, the terminal's behavior is incorrect regarding long lines or long commands. Long commands or long outputs should appear in multiple lines, but they appear in the same line, overriding previous output. Use `tput smam' to fix this problem. (From OE-Core rev: e8acef383767cfd1ef0c3d3c45d9d6eb1c83b3e7) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/autobuilder-worker-prereq-tests: Add to todo listRichard Purdie2018-09-251-0/+3
| | | | | | | | Note further tests needed after encountering issues. (From OE-Core rev: ab7b7e222b88e40f2a5011fc16bbd784e6be55e5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* isoimage-isohybrid: don't include cpio in cpio imageIoan-Adrian Ratiu2018-09-201-4/+3
| | | | | | | | | | | | | | | | | | | Because the find | cpio processes execute in parallel connected via the pipe, and the cpio outputs in the same dir find searches for source files, the cpio will be included in itself partially, depending on how fast the build machine creates the cpio file before cpio gobbles it up. This bloats the ISO image, though compression reduces the .iso file size, once the kernel decompresses the cpio image and boots it live, it uses up to double the RAM memory. Fix this by creating the initrd.cpio file directly inside cr_workdir. (From OE-Core rev: 7a7b29f5f1392f4f87af4f20cda99c66b4789fde) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Introduce the --use-label partition parameterKevin Hao2018-09-134-7/+28
| | | | | | | | | | | We can use this parameter to make the wic use the label to name a partition in /etc/fstab. (From OE-Core rev: 51638edaa00befaed58e2def255d46ae44d9234f) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update_gtk_immodules_cache: update for multilibKai Kang2018-09-131-4/+4
| | | | | | | | | | | | | | | | Postinstall script update_gtk_immodules_cache calls ${bindir}/gtk-query-immodules-${version}. When multilib is enabled, both packages foo and lib32-foo call ${bindir}/gtk-query-immodules-${version} and one of them will fail to run obviously. Duplicate install files gtk-query-immodules-${version} to ${libexecdir} with ${MLPREFIX}. And update update_gtk_immodules_cache calls proper binary. (From OE-Core rev: cad28bd74438d8edbdb02a2d56169e2a55260ca8) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* update_font_cache: update script for multilibKai Kang2018-09-131-1/+1
| | | | | | | | | | | | | | | Packages which inherit fontcache.bbclass call postinstall script update_font_cache. And in update_font_cache, it calls ${bindir}/fc-cache by qemuwrapper. When multilib is enabled, both packages foo and lib32-foo will call ${bindir}/fc-cache and one of them will fail to run obviously. Duplicate install file fc-cache to ${libexecdir} with ${MLPREFIX} and call proper fc-cache in update_font_cache. (From OE-Core rev: 53d8625732b0c8416e367d5eef43863ec2065433) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: squashfs does support partition uuid.Emmanuel Roullit2018-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | wic allows the user to create disk image and reference each created partitions via its partition UUID. squashfs does not support filesystem UUID but it does offer support for partition UUID. $ lsblk -o NAME,FSTYPE,UUID,PARTUUID NAME FSTYPE UUID PARTUUID sda |-sda1 vfat 6078-ACD0 95aa4ffb-741d-4d99-adf6-0358bc890046 |-sda2 squashfs 7d46da2d-29cc-4d5a-9e39-d0381c4abb0c |-sda3 squashfs d4a3e24e-410a-4f2c-8ad5-8f8321de177b |-sda4 ext4 d72ec529-78e4-4cd3-b39b-781b6b1cb47c f3edc990-f4f6-4536-9587-44dae4ceb99f `-sda5 ext4 a0b265aa-e935-40b8-9c6b-e9e58ad3890f 6e72ebaa-29ed-41cd-844c-3f76976cf41d Modifying this constrain allows a user to create squashfs-based rootfs and boot from them with such kernel argument 'root=PARTUUID=7d46da2d-29cc-4d5a-9e39-d0381c4abb0c' Fixes: 2fbdcf4e59c8 ("wic: kparser.py: Check for SquashFS and use-uuid") (From OE-Core rev: a8787bbfdf088b0ef9feb8e6b4230b743bb4086f) Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* build.py: add clean option to 'devtool build' commandChen Qi2018-09-101-1/+6
| | | | | | | | | | | | | | | | | | Add -c (--clean) optiont to 'devtool build' command so that users could easily clean things up when using devtool. I encountered a problem about do_prepare_recipe_sysroot failure when using `devtool build' command and I found myself in a situation where I either have to use `bitbake' command to clean things up or use `rm' to remove the directories under ${WORKDIR}. So add a clean option as it would be helpful when users want to clean things up to prepare an environment for a clean build. (From OE-Core rev: 29d790cdeff19e520a35ec5902d6deaae8665492) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>