aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2019-02-25runqemu-gen-tapdevs: Allow run --help without sudoRobert Yang
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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25runqemu: clean up subprocess usageRoss Burton
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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-02-25scripts/oe-git-archive: fix non-existent key referencing errorYeoh Ee Peng
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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-12-06scripts/runqemu: Improve lockfile handling for python with close_fd=TrueRichard Purdie
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>
2018-12-06scripts/runqemu: Tidy up lock handling codeRichard Purdie
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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-06scripts/runqemu: Replace subprocess.run() for compatibiltyMichael Halstead
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. Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-24wic: isoimage-isohybrid: fix UEFI spec breakageIoan-Adrian Ratiu
It's really good that OE supports multiple EFI_PROVIDERs and that commit 9a1709278de87 ("wic: isoimage-isohybrid: use grub-efi from deploy dir") makes re-use of the grub-efi built image, but we should still respect the standard otherwise the ISO will not boot, so install grub images as boot[x64|ia32].efi not ${PN}-boot[x64|ia32].efi. (From OE-Core rev: 1608129692d92c239b5fb9244b649a32b9009254) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-10-18runqemu: fix handling of SIGTERM and the problem of line wrappingChen Qi
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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-10-18runqemu: exit gracefully with an error message if qemu system is not evaluatedJagadeesh Krishnanjanappa
It solves below error: -- snip -- return 'qemu-system-%s' % qbsys UnboundLocalError: local variable 'qbsys' referenced before assignment -- snip -- [YOCTO #12846] (From OE-Core rev: 519273f54c0b8a6fff36afeb7646d8e37717be22) Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-10-18runqemu: add SIGTERM handler to make sure things are cleaned upChen Qi
Add SIGTERM handler so that runqemu could clean things up correctly when receving such signal. This problem was originally observed when running testimage. On some hosts, after running testimage task, the user has to manually operate on the tap interface (e.g. `sudo ip link del tap0') in order for the next runqemu command to launch successfully. The problem is about runqemu, SIGTERM and network manager on the host. In testimage task, the runqemu process will receive SIGTERM. In such situation, its cleanup() function is not run, resulting in tap interface not cleaned up. On some hosts, the network manager will bring down the tap interface automatically, thus this problem. I saw this problem on Fedora21. I think we'd better just clean up the tap interface ourselves. So this patch adds to runqemu a SIGTERM handler, in which the actual qemu process is terminated and other things cleaned up. (From OE-Core rev: 02709d4709c56f9b9095e3555da35b659b03a8a3) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-10-18checklayer: avoid recursive loop in add_layer_dependenciesNicolas Dechesne
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. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 171900b4bcb06416685ce90b63114a10fefe0b94) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-10-10qemux86-directdisk: remove mem= parameterAnuj Mittal
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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-10-10mkefidisk: fix installation of kernel imageChong Yi Chai
Kernel image can be 'vmlinuz' for 'bzImage' but the script is written to support 'vmlinuz' only. When building with meta-intel on sumo branch, the kernel image is now bzImage and the installation will fail. Add option to install bzImage as well. Signed-off-by: Chong Yi Chai <chong.yi.chai@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-08-29wic/qemux86: don't pass ip parameter to kernel in wksAnuj Mittal
Images that rely on dhcp being used won't have network setup properly otherwise. Fixes [YOCTO #12804] (From OE-Core rev: fb4dd04f65ea78890c1102424765056d93e6ca65) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-08-15multilib_header: recognize BPF as a targetDaniel Díaz
When building with `clang -target bpf` using the multilib_header, a recursion was unavoidable because bits/wordsize.h would #include itself, still lacking a definition for __MHWORDSIZE or __WORDSIZE. (From OE-Core rev: 70b41b3c335a80b4ac243f468f22331d261299db) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15oe-pkgdata-util: package-info: Re-add support for the --extra optionPeter Kjellerstedt
Commit 64d3ce83 broke the --extra option. (From OE-Core rev: cd195bdf5dd2c8ff03c58a63dcabe88b142d2a9c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-08-15oe-pkgdata-util: Make parse_pkgdatafile() support package suffixed varsPeter Kjellerstedt
Support for variables suffixed with package names, e.g., PKGV_foo, was removed in commit 3d2c87c4, which broke support for recipes that set other versions on their packages than what is in ${PV}. (From OE-Core rev: 38f8284212370999e1e7b0f6559f7cd786e80d1a) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-08-15oe-pkgdata-util: lookup-recipe, package-info: Don't finish prematurelyPeter Kjellerstedt
If a package name exists in runtime-rprovides, lookup-recipe and package-info would finish after printing information about that package even if more packages were specified. (From OE-Core rev: 32c2a2ddb1614f978f511dfccb6cc3e9398df841) 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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-08-15devtool/sdk.py: error out in case of downloading file failureChen Qi
It's possible that downloading file from updateserver fails. In this case, we should error out instead of continue. We have users reporting unexpected behavior of 'devtool sdk-update'. When an invalid url is supplied, e.g., `devtool sdk-update http://invalid', the program reports 'Note: Already up-to-date'. This is obviously not expected. We should error out in such case. (From OE-Core rev: 449564783dfb162536a2f772b3a8704973221e0f) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-07-30wic/engine: use up all free space when expanding partitionsAnuj Mittal
Currently we just divide up the free space by the number of partitions that need to be re-sized. This leads to problems when a user has explicitly specified a subset of partitions (but not all) that need to re-sized along with the sizes. As an example, for an image with 3 partitions, if we use: wic write image.wic /dev/sdb --expand 1:10G This would lead to paritions 2 and 3 each being re-sized to one thirds of the free space instead of half. Change the behavior to use up all the free space. (From OE-Core rev: a88f1b5d88dbc5fb28be24b9787d73b9e0cdf183) 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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-07-30wic/engine: fix errors when expanding partitionsAnuj Mittal
The UEFI spec implies that GPT partitions should be assumed to be on a 2048 sector boundary (for a 512 byte sector) and the current logic just divides the free sectors available by the number of partitions that need re-sizing, which may or may not align and the final result might overshoot the limits imposed after alignment. Since we are expanding already aligned partitions, just divide up the free space in multiples of 2048. Also use the exec_cmd wrapper instead of the subprocess call directly. Fixes [YOCTO #12840] (From OE-Core rev: 5eef63f5afdfbab8e30748cb1bf42bf2e6524759) 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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-07-02send-error-report: decode response from serverRobert Yang
Fixed: b'Your entry can be found here: http://<snip>' Now looks like: Your entry can be found here: http://<snip> (From OE-Core rev: 4510973fe12a61c21e12b46b8315c56f91eff5b7) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e4bacbf94a68a5ca8729b7cb2de90382c084fe7f) Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-07-02wic/bootimg-efi.py: recognize initrd when using grubAnuj Mittal
Make sure that we're able to use the initrd value specified in the wks file when using grub-efi bootloader with bootimg-efi wic plugin. Fixes [YOCTO #12689] (From OE-Core rev: f1d5bb1f21e11714357aff4ae7e52421e3756c5a) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-07-02wic/engine.py: improve error message when required tools are missingAnuj Mittal
Instead of showing that command 'None' was found, show the name of actual command that wasn't found on the host machine or at the native sysroot path provided by user. (From OE-Core rev: 3157ebb131e01e74689b1f87a35278350f315e7d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-07-02qemux86-directdisk.wks: remove uvesafb.mode_optionAnuj Mittal
Let this be dictated by the module parameter value being set by qemu machine configuration. (From OE-Core rev: c40b241e8d40c8bc1c9e6065b12e260662f5bba4) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-07-02runqemu-extract-sdk: allow install debugfs on rootfsRobert Yang
Usually, the debugfs' (-dbg.tar.*) work follow is: 1) Install regular rootfs to dir_foo 2) Install debugfs (-dbg.tar.*) to the same dir_foo So we need to allow installing the debugfs on top of the rootfs. (From OE-Core rev: c54147b286d72d7c4f8ca55a5a62f5d27bd5364a) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-06-15recipetool: fixed uncaught NameError exceptionSarah Marsh
When packaging a node application, a `NameError` can be thrown in create_npm.py if an optional npm dependency does not support Linux. (From OE-Core rev: 8293201d98d368d6322eaa960fb3e7cee2ba9368) Signed-off-by: Sarah Marsh <sarah.marsh@arm.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-20wic/imager/direct: Ensure correct ROOTFS_DIR is shownRichard Purdie
This changes the output of "wic create mkefidisk -e core-image-sato" from: The following build artifacts were used to create the image(s): ROOTFS_DIR: /media/build1/poky/build/tmp.wic.ybraavmb/rootfs_copy to: The following build artifacts were used to create the image(s): ROOTFS_DIR: /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs which s much less confusing for the user. [YOCTO #12564] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-13scripts/test-dependencies.sh: removeMartin Jansa
* with RSS used in pyro this script isn't very useful anymore * RSS makes sure that the dependencies are almost always deterministic the only case known to me where dependencies are different based on what was already built in TMPDIR are runtime dependencies resolved by shlibs code in package.bbclass (which is using global pkgdata, not specific to given recipe and its RSS) as described here: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9217#c4 but for this case it's not worth running complete test-dependencies.sh runs Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-04-09yocto-check-layer: add a test for correct setting of ↵Alexander Kanavin
LAYERSERIES_COMPAT_collection [YOCTO #12661] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-07devtool/oeqa: Ensure added layers set LAYERSERIES_COMPATRichard Purdie
Now that we see warnings if LAYERSERIES_COMPAT is unset, the auto generated code from devtool/oeqa needs to set this to avoid warnings which break various tests. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-06crosstap: replace script with new python based implementationVictor Kamensky
New crosstap python implementation is total replacement for crosstap shell script, that has superseding capabilities. New script support cross compiling of SystemTap scripts for user-land, by using supplied image rootfs. Whereas old script could only deal with scripts against kernel. New script has more complex logic and additional capabilities. As invocation interface new script support old "legacy" mode and provides alternative new regular options interface to access additional functionality. Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-04-03recipetool: create: fix port number parsing issueMing Liu
A flaw was found when I run: $ recipetool create "ssh://git@xxx.xxx:7999/xxx.git" the url turned out to be: "git://git@xxx.xxx/7999/xxx.git;protocol=ssh" after parsing, the port number was parsed as part of the path, this is definitely wrong and lead to fetching failures. This issue could be fixed in reformat_git_uri, by filtering out port numbers when formatting ":". Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-29scripts/oe-setup-rpmrepo: remove the scriptYi Zhao
After we switched to RSS, this script was not working for a long time. 'bitbake package-index' can do the same thing and works well. So remove this script. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-19checklayer: remove reference to undefined classAnuj Mittal
LayerError doesn't exist and will lead to an error when this failure code path is hit. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-16scripts/oe-build-perf-report: fix comparing arbitrary commitsMarkus Lehtonen
Fix a crash when generating a txt report and the two commits to be compared were not consecutive (but there were some tested commits between them). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-15build-recipe-list: improvementsRoss Burton
2018-03-12build-recipe-list: build universe instead of worldRoss Burton
Building world means recipes that are excluded from world build for whatever reason get skipped from the manifests, which isn't useful. Instead building universe and pass -k so that the expected dependency failures are not fatal. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-11devtool: add --force-patch-refresh to 'modify' and 'finish' commandsAlexander Kanavin
This is very useful for updating patch context so that any fuzz is eliminated. Simply issue: devtool modify <recipe> devtool finish --force-patch-refresh <recipe> <layer_path> Without this flag, devtool will not deem the commits in the workspace different to patches in the layer, even if the commits have different, up-to-date context line in them. Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-06wic: add wks file to make use of exclude-path functionalityCalifornia Sullivan
Using --exclude-path and a wks.in file we can create an image that takes the /boot/ directory for the boot partition, has an empty /boot/ directory in the rootfs partition. The boot partition gets mounted to /boot/ after startup. Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-03wic: Set a miniumum FAT16 volume size.Paulo Neves
Set a miniumum FAT16 volume size because images are not valid to parted if this minimum value is not respected. The value set is determined experimentally forr a logical sector size of 512. This fixed my local problem but, there may be better solutions. Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-03wic: partition plugin wrongly assumes it is rootfsPaulo Neves
The partition plugin is used as the base for other plugins. One of the methods the plugins use, is the prepare_rootfs method. The prepare_rootfs method wrongly assumes that the value ROOTFS_SIZE from bitbake datastore is relevant to every invocation of prepare_rootfs, which it clearly is not, for example in the bootimg-partition case. This commit adds an optional argument to prepare_rootfs where a caller can tell prepare_rootfs if it is an actual rootfs and whether related rootfs information retrieved from bitbake is valid. The default behavior of this optional argument is to assume that the invocation is an actual rootfs, to maintain compatibility with previous implementations. Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-03wic: Add post operation hook for SourcePluginParthiban Nallathambi
do_post_partition hook is needed if some operations like security signing the parition needs to be done. source plugins can make use of this to implement post operatiosn in do_post_partition. do_post_partition is called after do_prepare_partition if present. Signed-off-by: Parthiban Nallathambi <pn@denx.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-03-01devtool: search: tweak help textPaul Eggleton
* We now match on more than just target recipes, so don't specify that only target recipes are searched. * We're printing the SUMMARY value in addition to the name, so mention that so it's clear where that text is coming from. * Remind users that they should use quotes around the keyword to avoid shell expansion when using regular expressions. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01devtool: search: also look in recipe cachePaul Eggleton
If pkgdata isn't present or is incomplete, then you get either a traceback or you don't see the results you were hoping for. The recipe cache that bitbake collects during startup contains some useful information for each recipe that we could search through as well, and we can access it easily using tinfoil's all_recipes() API function, so add some code that does that. (We still show a warning if pkgdata isn't present, as there are certain dynamic packages that are generated at packaging time that won't show up in the cache). One side-effect of this is that we will start showing non-target recipes - that's actually a good thing, since seeing those is useful, however we exclude nativesdk recipes when in the eSDK to avoid confusion since nativesdk isn't directly applicable there. Fixes [YOCTO #12356]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01devtool: deploy-target: don't specify ssh/scp port unless user doesPaul Eggleton
If the user doesn't specify a port then we should avoid specifying one on the ssh/scp command line in case the user has configured one for the host they are connecting to, which was being overridden unnecessarily. Fixes [YOCTO #12381]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01devtool: finish: fix erroneously creating bbappend for relative pathsPaul Eggleton
After OE-Core rev 5e3fe00a0233d563781849a44f53885b4e924a9c we call os.path.abspath() on the original layer path, but we later compare that to the destination layer path. If that layer path isn't absolute but is effectively the same path, it should be writing to the original recipe but because we weren't making it absolute we were writing a bbappend instead. Call os.path.abspath() on the destination path as well to avoid that. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01devtool: reset: delete bbappend file if _check_preserve() doesn'tPaul Eggleton
If the .devtool_md5 file doesn't contain a reference to the bbappend file (e.g. because devtool was interrupted before it could write that out) then _check_preserve() won't delete it, so we need to delete it separately because otherwise the recipe won't actually be reset. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01devtool: fix poor handling of upgraded BBCLASSEXTENDed recipesPaul Eggleton
Fix two aspects of handling BBCLASSEXTENDed targets (e.g. openssl-native) that have been run through "devtool upgrade": * Fix recipe name not showing up in "devtool status" * Fix "devtool reset" not deleting empty directories under the recipe directory within the workspace, which may lead to problems if you subsequently run "devtool upgrade" on the same target again Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-01oe-init-env: search 'bitbake' outside of oe-coreEnrico Scholz
atm, 'oe-init-build-env' expects 'bitbake' to be within the OE core git repository. This complicates the project setup because you have to manage the 'bitbake' directory or symlink manually (or specify the bitbake location explicitly). Looking for 'bitbake' outside the main git repository will ease project management significantly. Now, you can put everything into git submodules, clone the project with | git clone --recursive ... and continue immediately with | ..../oe-init-build-env E.g. when you had previously | . | |-- build/ | `-- sources/ | `-- org.openembedded.core/ | `-- bitbake -> ../bitbake (where 'bitbake' must be created manually after cloning the project), you can have now | . | |-- build/ | `-- sources/ | |-- bitbake/ | `-- org.openembedded.core/ which is completely managed by 'git'. Patch adds $OEROOT/.. to the search path for 'bitbake' Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>