summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* runqemu: Show an error for conflicting graphics optionsRichard Purdie2020-09-021-0/+4
| | | | | | | | | | | | | | The autobuilder managed to pass the nographic option with "sdl gl" due to a problem elsewhere. It would have been useful for runqemu to have errored rather than passing conflicting options to qemu. Add an error for this invalid usecase. (From OE-Core rev: e62c8207fa47ff4e325529ea84e0d51710deaa3c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 377a6ffbcba0d3c5ede470c989756c4d1636873f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Check gtk or sdl option is passed together with gl or gl-es options.Vasyl Vavrychuk2020-08-271-1/+2
| | | | | | | | | | | | | | runqemu help reports that gtk or sdl option is needed with gl or gl-es option. But if user forgot to add gtk or sdl option, then gl or gl-es options were silently skipped. (From OE-Core rev: bec0a45393d968251059f5075add2cf633aecd1a) Signed-off-by: Vasyl Vavrychuk <vvavrychuk@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4d1e93d4bf013bb0c48032bfda43f77c5aba9ecf) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* checklayer: check layer in BBLAYERS before testLee Chee Yang2020-08-072-1/+22
| | | | | | | | | | | | | | | | | | | | | layer under test should absent from BBLAYERS when running yocto-check-layer. This allow to get signatures before layer under test. There are existing steps to add the layer under test to BBLAYERS after getting initial signatures. add steps to check for layer under test in BBLAYERS before running any test, skip test for the layer if the layer under test exist in BBLAYERS. [YOCTO #13176] (From OE-Core rev: a10ff925584406e563edfb4042b44c3e8ea57ce3) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit be02e8dbfb0d1decce125322f9f1e11a649756c0) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/filemap: Fall back to standard copy when no way to get the block mapKevin Hao2020-07-311-1/+27
| | | | | | | | | | | | | | | | | For some filesystems, such as aufs which may be used by docker container, don't support either the SEEK_DATA/HOLE or FIEMAP to get the block map. So add a FileNobmap class to fall back to standard copy when there is no way to get the block map. [Yocto #12988] (From OE-Core rev: 66f9db48bb9d59f08492f0515bc08b6b039aa03f) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7934ed49179242f15b413c0275040a3bb6b68876) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/filemap: Drop the unused get_unmapped_ranges()Kevin Hao2020-07-311-36/+2
| | | | | | | | | | | | This method is not used by any code, so drop it. (From OE-Core rev: 19078f9540c455ccddb6f2986b96562a8186ec35) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6513fd9302b9989f97fc9d95e76e06ad5d266774) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/filemap: Drop the unused block_is_unmapped()Kevin Hao2020-07-311-17/+0
| | | | | | | | | | | | This method is not used by any code, so drop it. (From OE-Core rev: 14cbfc04f4a9da5baba6267daefd54a12a04d56e) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fb62a15349597ee026c67a0bb0a6ca2cc9bfe420) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/recipetool/create.py: fix regex stringsTim Orling2020-07-221-5/+5
| | | | | | | | | | | | | | Python now expects regex strings to be prepended with r. Silence pylint/autopep8 and similar warnings by identifying these regex patterns as... regex patterns. (From OE-Core rev: f8a5db7a6072ddb1be96405fc8b44f595275206d) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0eae98a369d80340e48dc690d09a1364cde97973) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: default to empty string, if LIC_FILES_CHKSUM is not availableBjarne Michelsen2020-07-161-2/+2
| | | | | | | | | | | | | | | | | | | | | [Bug 13971] https://bugzilla.yoctoproject.org/show_bug.cgi?id=13971 A recipe using LICENSE=CLOSED would normally not have LIC_FILES_CHKSUM set. If LIC_FILES_CHKSUM was not set, it would cause `devtool upgrade` to fail. This fixes the issue by defaulting to an empty string if LIC_FILES_CHKSUM is not found. [YOCTO #13971] (From OE-Core rev: 9c7f3281884c50dbd05e2966e2409255c127ebfa) Signed-off-by: Bjarne Michelsen <bjarne_michelsen@hotmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 95e112f0f465868e98285509ea0d1a624a439ac2) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* checklayer: parse LAYERDEPENDS with bb.utils.explode_dep_versions2()Nicolas Dechesne2020-07-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | LAYERDEPENDS is a string of this format: "DEPEND1 (optional version) DEPEND2 (optional version) ..." However when we parse LAYERDEPENDS in _get_layer_collections() we parse it as a simple string, and if any optional versions are there the 'depends' field is wrong. For example, running yocto-check-layer might result in such errors: ERROR: Layer meta-python depends on (>= and isn't found. ERROR: Layer meta-python depends on 12) and isn't found. Let's use bb.utils.explode_dep_versions2() to parse LAYERDEPENDS, and create a string that contains all dependencies, effectively skipping/ignoring any optional versions. [YOCTO #13957] (From OE-Core rev: 819f41906197bb712af37349c0865002bfbd7c9b) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f81f07afc200fe06c5c06ea81a4f8a3a43436faf) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/install-buildtools: Handle new format checksum filesRichard Purdie2020-07-021-1/+1
| | | | | | | | | | | | Autobuilder generated checksum files only have a single space between the sum and the filename, tweak it to account for this. (From OE-Core rev: 877a082b5f3f5ccf8191a2438e7707b419174ea9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d1e71bf5b399372166eb40bb0d99c8fb52231600) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/install-buildtools: Update to 3.2 M1 buildtoolsRichard Purdie2020-07-021-4/+4
| | | | | | | | | | | | | | This fixes issues with openssl certs not working properly which meant error reporting to an error report server was failing. Also, all our downloads are now standarised on "sha256sum" so adjust for that. (From OE-Core rev: bef009c91e8acfc7c1ba3cfd3183f000a02e002b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit bc8b44e19a05f499f5cef049eedbed1fede2e765) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: add QB_ROOTFS_EXTRA_OPT parameterKonrad Weihmann2020-07-021-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | Content of the optional parameter will be appended to the rootfs-device in the qemu configuration, in case QB_ROOTFS_OPT is not specified. By default this is empty. Example use cases are: Defining 'readonly' when using squashfs, so multiple instances of qemu can share the same base image, something that cannot be done by just specifying 'snapshot'. Defining 'bootindex=0' which helps to get past the EFI shell in ovmf-binary. This also enables the use case of running WIC images with EFI bootloader through the testimage.bbclass. (From OE-Core rev: 1a5cb1bd56be2b784208516a7c73c49906c7022f) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e9b8c194636cb5505774a2a71bf54450580dd5b8) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: fix SRCBRANCH not being passed to paramsTuomas Salokanto2020-06-261-0/+1
| | | | | | | | | | | | | | | When explicitly passing a branch using --srcbranch in 'devtool add' or 'recipetool create', the branch name is not included in the params of bb.fetch2.encodeurl and default 'master' branch is used instead. (From OE-Core rev: 50789b582908f78d9bb2b5a05418433ad8074825) Signed-off-by: Tuomas Salokanto <tuomas.salokanto@gmail.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0424df825f1e509faf6cd44403c0736bb91b57c3) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory-collect-srcrevs: sort directoriesDaniel McGregor2020-06-261-0/+1
| | | | | | | | | | | | | | | | | In order to allow consistent output of buildhistory-collect-srcrevs sort the list of directories returned by os.walk. Otherwise the list of SRCREVs is returned in an unspecified order. We save the output of this command on build, so it creates smaller diffs between builds. (From OE-Core rev: 9ca9c0fa320caeb2a1e7a60161c4db66dc0f2030) Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3d7cb207ad4ec3cd5a3064147d3c9b5a1730d0fb) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* install-buildtools: remove hardcoded x86-64 architectureRoss Burton2020-06-261-8/+10
| | | | | | | | | | | | | Remove all instances of the hardcoded 'x86_64' and replace with the current host platform. (From OE-Core rev: cd2c54d8ab545f39f23c5167ba5ca50f732f7cfa) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 52dc6f671ff67a1149be7ef4c65126ea3c907a3d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* install-buildtools: fail if an error occursRoss Burton2020-06-261-0/+2
| | | | | | | | | | | | | Several failure paths were displaying an error message but not returning, so the install process continued and failed further. (From OE-Core rev: deed12d01fa656ee0cf81a6b7b9ed74278e48c50) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit b00e28735b64a781707441ec6187dd7f9240d97a) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: Fix list concatenation when using editAlex Kiernan2020-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | If there are multiple appends, ensure we concatenate compatible things: Traceback (most recent call last): File "/home/akiernan/poky/scripts/recipetool", line 111, in <module> ret = main() File "/home/akiernan/poky/scripts/recipetool", line 100, in main ret = args.func(args) File "/home/akiernan/poky/scripts/lib/recipetool/edit.py", line 38, in edit return scriptutils.run_editor([recipe_path] + appends, logger) TypeError: can only concatenate list (not "tuple") to list (From OE-Core rev: 9a45c7fb2d4491d2d34500acef8ea6dcd4f5d9d4) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4c1e74bdf4922519d168434afd69c9bebcb9bd82) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/log: Add ability to dump ltp logs as well as ptestRichard Purdie2020-06-052-15/+28
| | | | | | | | | | | | Currently only ptest logs are accessible with the log command, this adds support so the ltp logs can be extracted too. (From OE-Core rev: 0b513274a0ae722065cf1a605090000e854e2f81) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 64a2121a875ce128959ee0a62e310d5f91f87b0d) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/report: Remove leftover debuggingRichard Purdie2020-06-051-1/+0
| | | | | | | | | | | | I've long since wondered why there was some odd output in result reports, remove the leftover debug which was causing it. (From OE-Core rev: 10d1d2ffa0906561d65886caee44652242139913) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 66e96bf70753933714ff8edcc13a1f35a052656f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* checklayer: Skip layers without a collectionJoshua Watt2020-06-051-0/+3
| | | | | | | | | | | | | | | As in other places in the file, skip layers that don't define a collection when searching for a layer to resolve a dependency. Fixes KeyError exceptions when attempting to access the layer collections later (From OE-Core rev: ae65adf471a9ad04c6a44bf020a28f1006db106a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 26090a2861ebe21224aaf89d7be0c0a89ca58e48) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/tiny/ksize: Fix for more recent kernelsjan2020-05-221-3/+3
| | | | | | | | | | | | | | | | In the past kernel built object files were named 'built-in.o'. Nowadays it is 'built-in.a'. The script is modified to work with both. I expect it will not happen that there are built-in.a and built-in.o files in the same kernel. (From OE-Core rev: 8a883c3b0773960908491c03c46e7ed320e41dc5) Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/install-buildtools: bump to 3.1 release by defaultTim Orling2020-05-071-3/+3
| | | | | | | | | | | | By default, use the extended buildtools installer from the Yocto Project 3.1 "dunfell" release. (From OE-Core rev: f1d4da322d607a17de6d9c291562b5fd1128fbc6) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "wic: Fix permissions when using exclude or include path"Richard Purdie2020-04-071-19/+3
| | | | | | | | | This reverts commit 36993eea89d1c011397b7692b9b8d61b499d0171. After discussion on the mailing list it was felt these changes were not ready yet. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "wic: Add --embed-rootfs argument"Richard Purdie2020-04-074-31/+1
| | | | | | | | | This reverts commit efdcf94801f6abe8e4099e324d9a3deccd8d4384. After discussion on the mailing list it was felt these changes were not ready yet. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-extract-sdk: fix install debugfs on rootfsAdrian Freihofer2020-04-061-1/+1
| | | | | | | | | | | | | | At least with my current setup and acc. the manual, the images are named like image-dbg.rootfs.tar.bz2. The filter has two bugs: - expects something like -dbg.tar - tar without compression suffix is not allowed (From OE-Core rev: e5fb903db308c508fc44bada89fd0210810301a9) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add --embed-rootfs argumentRicardo Ribalda Delgado2020-04-064-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | This option adds the content of a rootfs on a specific location on the rootfs. It is very useful for making a partition that contains the rootfs for a host and a target Eg: / -> Roofs for the host /export/ -> Rootfs for the target (which will netboot) Although today we support making a partition for "/export" this might not be compatible with some upgrade systems, or we might be limited by the number of partitions. With this patch we can use something like: part / --source rootfs --embed-rootfs target-image /export --embed-rootfs target-image2 /export2 on the .wks file. (From OE-Core rev: efdcf94801f6abe8e4099e324d9a3deccd8d4384) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Fix permissions when using exclude or include pathRicardo Ribalda Delgado2020-04-061-3/+19
| | | | | | | | | | | | | | | | | | | | | When parameters include_path or exclude_path are passed to the rootfs plugin, it will copy the partition content into a folder and make all the modifications there. This is done using copyhardlinktree(), which does not take into consideration the content of the pseudo folder, which contains the information about the right permissions and ownership of the folders. This results in a rootfs owned by the user that is running the wic command (usually UID 1000), which makes some rootfs unbootable. To fix this we copy the content of the pseudo folders to the new folder and modify the pseudo database using the "pseudo -B" command. (From OE-Core rev: 36993eea89d1c011397b7692b9b8d61b499d0171) Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/install-buildtools: refactor for Python 3.4Tim Orling2020-04-051-24/+79
| | | | | | | | | | | | | | | | | | | | | | | | Our least common denominator supported distro is debian-8 which has python 3.4. The whole point of the install-buildtools script is to make it easier on the user to install buildtools tarball. So it needs to run on Python 3.4. The way we checked if the install was successful in the prior version of the script was not workable in python 3.4. Since the environment-setup-... script is currently just exporting environment variables, use os.environ to do the equivalent from values gleaned via regex from the environment-setup-... file. Corrected a couple minor whitespace errors NOTE: License changed to GPL-2.0-only due to inclusion of code copied directly from bitbake/lib/bb/utils.py. This avoids the need to depend on bitbake, which is now Python 3.5+ only. (From OE-Core rev: 869020dac889e9ed79a294f308a87cfd946a68bd) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: align layer plugin pathLee Chee Yang2020-04-022-6/+8
| | | | | | | | | | | | | | | | wic look for external layer source plugin under scripts/lib/ while other tools look for lib/. allow wic to check for source plugin at both scripts/lib/ and lib/ to align with other tools while avoid breaking any existing source plugin in external layer. [YOCTO #13056] (From OE-Core rev: 986baff26bd96a6265f5fe2d631818fff9f66374) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-buildenv-internal: Add pointer to scripts/install-buildtoolsRichard Purdie2020-04-011-1/+1
| | | | | | | | | If the minimum python version isn't met, show a pointer to the new install-buildtools script. (From OE-Core rev: 38e3d5bd3d05ed00a2fc55e3729cb8a6d4e4132f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* install-buildtools: bump default to yocto-3.1_M3, fixesTim Orling2020-04-011-21/+30
| | | | | | | | | | | | | | Add ability to check md5sum (yocto-3.1_M2 and before) or sha256 (yocto-3.1_M3 and beyond). Make regex for path in checksum file optional, since for yocto-3.1_M3 the format is <checksum> <filename>, but prior releases was <checksum> <path><filename> (From OE-Core rev: cb1c98f38755b8340140125064c21e407f39db74) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-buildenv-internal: python 3.5 as min versionTim Orling2020-04-011-4/+4
| | | | | | | | | | | | | | | Python 3.4 is EOL: https://www.python.org/downloads/release/python-3410/ The last supported distro was probably CentOS-7, which has python36 available from epel-7 or scl (as rh-python36) [1] [1] https://www.softwarecollections.org/en/scls/rhscl/rh-python36/ (From OE-Core rev: 20cdec283a2ee39daa2ffaace11daa764ba40606) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/install-buildtools: improvementsTim Orling2020-04-011-4/+9
| | | | | | | | | | | | | | | | | | | | | * Install directory defaults to scripts/../buildtools e.g. --directory is set by default This avoids the user having to type in their sudo password to install in /opt/poky/<installer-version> * Use "." rather than "source" for sourcing the environment script as not all distros (e.g. Debian) have "source" by default. * Add buildtools/ to .gitignore * Fix typos in example usage (--install-version -> --installer-version) [YOCTO #13832] (From OE-Core rev: c6c3a58dbf0ca6c4a41df7ff50fa56d39d7ee23f) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: Reinstate systemd-hwdb-update.serviceAlex Kiernan2020-03-311-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | systemd supports a distribution hwdb.bin in /usr/lib/udev/hwdb.bin, which is used if /etc/udev/hwdb.bin is not present. When generating the install time hwdb, for systemd, ensure that we put it in /usr/lib/udev, which then ensures that at boot time we do not regenerate it, unless the system is marked for update. This allows fragments dropped into /etc/udev/hwdb.d to be processed correctly, but without requiring a first boot time build: root@qemumips:~# systemctl status systemd-hwdb-update.service * systemd-hwdb-update.service - Rebuild Hardware Database Loaded: loaded (/usr/lib/systemd/system/systemd-hwdb-update.service; static; vendor preset: disabled) Active: inactive (dead) Condition: start condition failed at Wed 2020-03-04 15:18:11 UTC; 44s ago |- ConditionPathExists=|!/usr/lib/udev/hwdb.bin was not met |- ConditionPathExists=|/etc/udev/hwdb.bin was not met `- ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d was not met Docs: man:hwdb(7) man:systemd-hwdb(8) (From OE-Core rev: 78ff610e571e4d739326520c391a37ee1f1290ae) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* yocto-check-layer: simple grammatical fixesrpjday@crashcourse.ca2020-03-301-3/+3
| | | | | | | (From OE-Core rev: 15ad048ffa5a80e81b4e04bf98e14e8e23e409f9) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Change nfs to mount via TCPHe Zhe2020-03-291-1/+1
| | | | | | | | | | | | | | Since kernel commit b24ee6c64ca7 ("NFS: allow deprecation of NFS UDP protocol"), NFS UDP has been disabled by default due to the potential data corruption caused by fragmentation during high loads. So now we cannot boot up with nfs mode and default kernel. We'd better turn to use TCP accordingly. (From OE-Core rev: 73a54595d8ddf237d685ea9cb46df0cecac0280d) Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/install-buildtools: add helper script to install buildtoolsTim Orling2020-03-291-0/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For distros such as CentOS-7 where the default buildtools are too old we need to make it easy for users to install a pre-built SDK with all of "build-essentials" included. Other uses may include building older Yocto Project releases with a distro where buildtools are too new. For convenience, the standard buildtools installation is also supported. NOTE: extended buildtools is the default, e.g. --with-extended-buildtools is on by default Example usage (extended buildtools from milestone): (1) using --url and --filename $ install-buildtools \ --url http://downloads.yoctoproject.org/releases/yocto/milestones/yocto-3.1_M2/buildtools \ --filename x86_64-buildtools-extended-nativesdk-standalone-3.0+snapshot-20200122.sh (2) using --base-url, --release, --installer-version and --build-date $ install-buildtools \ --base-url http://downloads.yoctoproject.org/releases/yocto \ --release yocto-3.1_M2 \ --install-version 3.0+snapshot --build-date 202000122 Example usage (standard buildtools from release): (3) using --url and --filename $ install-buildtools --without-extended-buildtools \ --url http://downloads.yoctoproject.org/releases/yocto/yocto-3.0.2/buildtools \ --filename x86_64-buildtools-nativesdk-standalone-3.0.2.sh (4) using --base-url, --release and --installer-version $ install-buildtools --without-extended-buildtools \ --base-url http://downloads.yoctoproject.org/releases/yocto \ --release yocto-3.0.2 \ --install-version 3.0.2 [YOCTO #13832] (From OE-Core rev: 2d0aea6a73c427ce6aa17dc71e0783977a52bb2b) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats-plot.sh: Show spaces and underscores correctly in titles/keysPeter Kjellerstedt2020-03-291-2/+2
| | | | | | | | | | | Spaces were previously converted to dashes, and underscores caused the next character in the title/key to be printed using subscript due to the enhanced string support in gnuplot. (From OE-Core rev: 1719f7062988889b7e24b871dc2f0e50c7bff07e) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats*.sh: fix spacing indentation in the filesLuis Martins2020-03-242-93/+94
| | | | | | | | | | Fix indentation in buildstats.sh and buildstats-plot.sh to convert every line to 4 spaces indentation. (From OE-Core rev: 3971572042ae9bc8226eb92892bb71010287e0a8) Signed-off-by: Luis Martins <luis.martins@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats*.sh: add recipe parameter to scriptsLuis Martins2020-03-242-4/+14
| | | | | | | | | | | | Add option to filter the stats results for a single recipe, allowing to easilly visuality the task resource consumption per recipe. This is specially useful when debugging the performance of the overall bitbake build system. (From OE-Core rev: b4bf898d53af60f5d69b50ec5cdd7f9b3870f2dd) Signed-off-by: Luis Martins <luis.martins@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats*.sh: add accumulate parameter to scriptsLuis Martins2020-03-242-4/+28
| | | | | | | | | | | | Add option to accumulate stats values per recipe, allowing to sum related values such as memory (main process + childs). This is specially useful when debugging the performance of the overall bitbake build system. (From OE-Core rev: e6f1aea6260343cb5194f7f8ab70213b705ab441) Signed-off-by: Luis Martins <luis.martins@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats-plot.sh: filter by taskLuis Martins2020-03-241-2/+8
| | | | | | | | | | | | Extend buildstats-plot.sh script to also accept the name of the tasks as parameter. This value will be passed directly to buildstats.sh is already provides this option. (From OE-Core rev: 495b6d3d85d2d14d54e324d8da43311a23fdfca6) Signed-off-by: Luis Martins <luis.martins@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildstats-plot.sh: fix invoking buildstats.shLuis Martins2020-03-241-1/+1
| | | | | | | | | | | Fix the internal call to buildstats.sh by also providing the buildstats folder location in the system, which might differ from the default location. (From OE-Core rev: 9f4ee2ee8712528ac51ef4ecd17ccde737e8b21d) Signed-off-by: Luis Martins <luis.martins@criticaltechworks.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/direct: reserve 2 sector for extended partitionChee Yang Lee2020-03-241-3/+3
| | | | | | | | | | | | | extended partition should reserve at least 2 unallocated sectors between the start of the extended partition and the start of a logical partition. [YOCTO #13658] (From OE-Core rev: 884c8a0e50a49bdca5e048197a9dc0ff37cc8d1a) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: support multiple NICsAdrian Freihofer2020-03-211-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emulating more than one network interface with runqemu is a bit tricky, but possible. For example, the following leads to an emulated device with eth0 and eth1: QB_NETWORK_DEVICE_prepend = " \ -device virtio-net-device,mac=52:54:00:12:34:03 \ " or QB_NETWORK_DEVICE_append = " \ -device virtio-net-pci,mac=52:54:00:12:34:03 \ " When booting Qemu with two NICs, the kernel does not know which interface the specified ip=192.168.7.... command line argument should be applied. This delays the boot process for a very long time and a guest wihtout IP configuration. This add two new configuraton parameters to runqemu: QB_CMDLINE_IP_SLIRP and QB_CMDLINE_IP_TAP to explicitely specify the ip= kernel command line arguments for tap and slirp mode. Note: Simply adding "::eth0" broke some builds on the Yocto autobuilder. (From OE-Core rev: 59bfdc331c1494c05ab38804b281878a1f571f6d) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/pybootchartgui: Fix to work with python 3.8Richard Purdie2020-03-151-3/+3
| | | | | | | | | time.clock() was removed in python 3.8, use one of its recommended replacements to fix failures on python 3.8 systems. (From OE-Core rev: f1d4ecce7d3968c5e08c268e3329041d4b647cf6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scritpts/tiny/ksize: Cleanup some python2 leftover in ksize.pyjan2020-03-131-3/+3
| | | | | | | | | | Although the script was running with Python3, almost no detailed output was generated. (From OE-Core rev: bd17a7e60264bb40df340fa38c425a7d7372516e) Signed-off-by: Jan Vermaete <jan.vermaete@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-buildenv-internal: Add BB_LOGCONFIGRichard Purdie2020-03-121-1/+2
| | | | | | | | | We should allow the logging configurations to be specificed from the environment, for example for autobuilder setups. (From OE-Core rev: 66c9234b71791d2aab87068496aebdbd4eb1f5e2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine: lets display an error not a tracebackArmin Kuster2020-03-021-1/+4
| | | | | | | | | | | | If the requested partition does not exist in this request "wic ls {path}:pnum" display a nice message not a trackback Also fix displaying the pnum and not "%s" (From OE-Core rev: 15d1722950a22649905cf8a5789d3cfe48a2a892) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine: dump the partition table in JSON format onlyPierre-Jean Texier2020-03-011-1/+1
| | | | | | | | | | | | | | | | | | | since commit 03154d2cf25c1d5ce908da9e72d324004b8d5722 ("sfdisk: add -J between mutually exclusive options") in util-linux [1], the '-J' can't be used with the '-d' option anymore. So, since we're using json format output, drop the '-d' option. Fixes: ERROR: _exec_cmd: <snip>/usr/sbin/sfdisk -dJ <snip>/core-image-minimal-qemux86-64.wic returned '1' instead of 0 output: sfdisk: mutually exclusive arguments: --list-free --json --dump [1] - https://github.com/karelzak/util-linux/commit/03154d2cf25c1d5ce908da9e72d324004b8d5722#diff-31d5cc325380dbdafe64d0e019846f12 (From OE-Core rev: 49e7f3e8e3a775510d8b0e2826a06d000934706b) Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>