aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2017-03-28devtool: open kconfig fragment in binary modeStephano Cetola
When devtool writes to the kconfig fragment, it writes the output of the diff command returned from pipe.communicate(). This function returns binary objects. We should open the kconfig fragment file in binary mode if we expect to write binary objects to it. [YOCTO #11171] Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27wic: fix generation of partition UUIDEd Bartosh
Partition UUID for msdos partitioning is based on a 4 bytes long system identifier. Wic uses random number to generate system identifier. For the numbers starting with 0 partition uuid is shorter, which makes wic images non-bootable as kernel expects 8 charactest in PARTUUID parameter. Padded system identifier with '0' when generating partition UUID to make it always 8 characters long. This should fix the boot issue. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26scripts/wic: fix typoRobert Yang
roofs -> rootfs Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26build-perf-test-wrapper.sh: store buildstats under git-notesMarkus Lehtonen
In order to dramatically reduce the data footprint of the result branches. This makes cloning/pulling result repositories a lot faster. Buildstats can still be accessed, when needed by doing git fetch refs/notes/buildstats/*:refs/notes/buildstats/* [YOCTO #10582] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26scripts/oe-git-archive: implement --notesMarkus Lehtonen
Option for adding git-notes to the commit. [YOCTO #10582] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26scripts/oe-git-archive: implement --excludeMarkus Lehtonen
May be used for excluding certain files from the commit. [YOCTO #10582] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26scripts/oe-git-archive: fix pushingMarkus Lehtonen
Git arguments were badly laid out. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26oe-build-perf-test: pack all buildstat in one fileMarkus Lehtonen
Write out all buildstats into one big json file, instead of using multiple per-measurement files. Individual buildstats will be indexed using "<test_name>.<measurement_name>" as the key. Also, changes the per-testcase working directories into temporary directories that will be removed after test execution as there are no more per-testcase data files to store permanently. [YOCTO #10582] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-24wic: use kernel_dir to find systemd-efi bootloaderEd Bartosh
Fixed test failure caused by using bootimg_dir path instead of kernel_dir to find systemd-efi bootloader: FAIL: test_systemd_bootdisk (oeqa.selftest.wic.Wic) ... FileNotFoundError: [Errno 2] No such file or directory: 'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23runqemu-gen-tapdevs: fix file path in exampleChen Qi
Fix the path in example so that '/usr/bin/tunctl' could be found under this path. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-22wic: improve getting syslinux pathEd Bartosh
Used wic-tools STAGING_DATADIR if syslinux can't be found in default bootimg_dir. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22wic: remove empty plugin methodsEd Bartosh
Removed do_install_disk and do_configure_partition methods from bootimage-partition, fsimage and rawcopy plugins as they're empy and not used. [YOCTO #10618] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22wic: use STAGING_DATADIR as a default for bootimg_dirEd Bartosh
Default value for bootimg_dir was not set in main wic script unlike the rest of artifacts: kernel_dir, roofts_dir and native_sysroot. Set it to the value of STAGING_DATADIR for consistency and to avoid confusion of wic plugin developers. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22wic: fix bug in sparse_copyEd Bartosh
sparse_copy creates output file that is smaller than input file when input file ends with unmapped blocks. Used truncate(<input file size>) when output file is created to ensure the size of output file will always be equal to the size of input file. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22wic: use kernel_dir instead of bootimg_dirEd Bartosh
bootimg_dir is usually set to the value of STAGING_DATADIR and kernel_dir - to the value of DEPLOY_DIR_IMAGE, so usage of kernel_dir is more logical in bootimg-efi, bootimg-partition and rawcopy plugins. Replaced usage of bootimg_dir to kernel_dir in 3 above mentioned plugins that use DEPLOY_DIR_IMAGE as a default artifact location. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22wic: don't set creator.bootimg_dir in pluginsEd Bartosh
Changing bootimg_dir in plugins is a dangerous hack as this value comes from wic command line and can be used by multiple plugins. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22wic: remove rootfs_pcbios_ext pluginEd Bartosh
Removed broken unused plugin. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-21scripts/yocto-compat-layer.py: Handle layer dependencies when testAníbal Limón
If some layer depends on other tries to find layer dependency, if the layer dependency isn't found avoid to test the layer and notice the user. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21scripts/yocto-compat-layer.py: Add option to disable layer autodiscoveryAníbal Limón
Sometimes there is a need to only analyze the layer specified by the command line, the new option -n will disable autodiscovery of layers and only will try to test specified layers. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21scripts/lib/compatlayer: Remove require of meta- in layer dir nameAníbal Limón
The layers isn't required to have a dirctory name start with meta- so remove the validation. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21scripts/compatlayer: Add exclude of meta-world-pkgdata on get_signaturesAníbal Limón
The meta-world-pkgdata recipe can be modified when a layer is added may be can add recipes to world target, so exclude by default. [YOCTO #11162] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21scripts/yocto-compat-layer.py: Make output log argument optionalAníbal Limón
Only create a log file when --output-log option is specified, since logger is dumping to stdout by default is better to let the user decide if a log needs to be created. [YOCTO #11160] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21scripts/yocto-compat-layer.py: Dump log to stdout instead of stderrAníbal Limón
The common unix tools uses stdout as standard for log output, by default python logging uses stderr if not stream is specified. [YOCTO #11160] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21scriptutils: Add support for specify stream on logger_createAníbal Limón
It is a good idea to let the script to choose what stream wants to dump the logging output. [YOCTO #11160] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21wic: partition.py: Add fsck to avoid corrupt EXT file systemsDaniel Schultz
This patch avoids the creation of a corrupt EXT file system. Since there are no checks if a EXT file system was successfully created, this should add to prevent possible system failures. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21gen-lockedsig-cache: catch os.link errorbrian avery
We do a hard link to speed up sdk creation but if your sstate-cache is across a file system boundary, this tries and fails. This patch catches that error and does a copy instead. Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21devtool: tidy up handling of parse failuresPaul Eggleton
Since the tinfoil2 refactoring, if an error occurred during parsing, we were showing a traceback and not correctly exiting (since we weren't calling shutdown()). Fix both of these issues. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21wic/partionedfs: Avoid reserving space for non-existing ext. partitionKristian Amlie
We don't need the gap that the extended partition occupies if we already know that we have less than five partitions. Saves up to one full alignment of space. Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21devtool/recipetill: npm install of devDependenciesAnders Darander
Web applications built using e.g. angular2, usually requires that the packages in devDependencies are available. Thus, add an option '--fetch-dev' to both devtool add and recipetool, to add npm packages in devDependencies to DEPENDS. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-21runqemu: output network configurationEd Bartosh
runqemu adds network configuration parameters to the kernel command line to configure guest networking. This works only for the images that run with external kernel using qemu -kernel parameter. It doesn't work for the images that use bootloader to boot kernel as -kernel parameter is not used and network configuration is not possible to get. Added host and guest ip addresses and netmask of tap link to the runqemu output. This should allow external programs that execute runqemu to get network configuration. [YOCTO #10833] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16runqemu: only boot ramfs when specifiedRobert Yang
This can fix a problem: IMAGE_FSTYPES += "iso" $ bitbake core-image-minimal $ runqemu qemux86 It may boot core-image-minimal-initramfs rather than core-image-minimal, this is not what we want usually. This patch makes it avoid booting ramfs when there are other choices, or when it is specified, for example, "runqemu qemux86 ramfs" Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16runqemu: add -h and --helpRobert Yang
Fixed: $ runqemu -h runqemu - INFO - Assuming MACHINE = -h runqemu - INFO - Running MACHINE=-h bitbake -e... [snip] Exception: FSTYPE is NULL! [YOCTO #10941] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16runqemu: improve when no machine specifiedRobert Yang
Fixed: $ runqemu core-image-minimal [snip] Exception: FSTYPE is NULL! [snip] Get DEPLOY_DIR_IMAGE from "bitbake -e" to make it work. [YOCTO #10471] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16runqemu: independent network and rootfs setupJuro Bystricky
Presently, runqemu sets up rootfs as part of network setup. In case there is no network desired we will end up without rootfs as well. This patch sets up network and rootfs independently. It is also possible to bypass setup of rootfs if QB_ROOTFS is set to "none". Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16yocto-compat-layer: improve error handling in signature creationPatrick Ohly
When "bitbake -k -S none world" failed, the error printed by yocto-compat-layer.py contained the stack trace multiple times and did not contain the stderr output from bitbake, making the error hard to understand and debug: INFO: ====================================================================== INFO: ERROR: test_signatures (common.CommonCompatLayer) INFO: ---------------------------------------------------------------------- INFO: Traceback (most recent call last): File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 144, in get_signatures stderr=subprocess.PIPE) File "/usr/lib/python3.4/subprocess.py", line 620, in check_output raise CalledProcessError(retcode, process.args, output=output) subprocess.CalledProcessError: Command 'bitbake -k -S none world' returned non-zero exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/fast/work/poky/scripts/lib/compatlayer/cases/common.py", line 51, in test_signatures curr_sigs = get_signatures(self.td['builddir'], failsafe=True) File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 149, in get_signatures raise RuntimeError(msg) RuntimeError: Traceback (most recent call last): File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 144, in get_signatures stderr=subprocess.PIPE) File "/usr/lib/python3.4/subprocess.py", line 620, in check_output raise CalledProcessError(retcode, process.args, output=output) subprocess.CalledProcessError: Command 'bitbake -k -S none world' returned non-zero exit status 1 Loading cache...done. Loaded 1328 entries from dependency cache. NOTE: Resolving any missing task queue dependencies NOTE: Runtime target 'zlib-qat' is unbuildable, removing... Missing or unbuildable dependency chain was: ['zlib-qat'] ... Summary: There were 5 ERROR messages shown, returning a non-zero exit code. The yocto-compat-layer.log was incomplete, it only had the first part without the command output. stderr was missing due to stderr=subprocess.PIPE. Instead of the complicated try/except construct it's better to check the return code ourselves and raise just a single exception. The output (both on stderr and in the yocto-compat-layer.log) now is: INFO: ====================================================================== INFO: ERROR: test_signatures (common.CommonCompatLayer) INFO: ---------------------------------------------------------------------- INFO: Traceback (most recent call last): File "/fast/work/poky/scripts/lib/compatlayer/cases/common.py", line 51, in test_signatures curr_sigs = get_signatures(self.td['builddir'], failsafe=True) File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 147, in get_signatures raise RuntimeError(msg) RuntimeError: Generating signatures failed. This might be due to some parse error and/or general layer incompatibilities. Command: bitbake -k -S none world Output: Loading cache...done. Loaded 1328 entries from dependency cache. NOTE: Resolving any missing task queue dependencies ERROR: Nothing PROVIDES 'qat16' (but /fast/work/meta-intel/common/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb DEPENDS on or otherwise requires it) ERROR: qat16 was skipped: incompatible with machine qemux86 (not in COMPATIBLE_MACHINE) ... Missing or unbuildable dependency chain was: ['openssl-qat-dev'] ... Summary: There were 5 ERROR messages shown, returning a non-zero exit code. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-13scripts/oe-setup-rpmrepo: replace createrepo with createrepo_cAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-13scripts/rpm2cpio.sh: replace 5.x version with 4.x versionAlexander Kanavin
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2017-03-11wic/direct.py: Avoid exception if using multiple rawcopy/no-table entries.Kristian Amlie
If we are both having a bootloader and a U-Boot environment file, we can end up with two entries using "--source rawcopy" and "--no-table", and since they reuse the same file [1], their cleanup handlers will try to delete the same file twice. So make sure we only do it once. [1] Although they reuse the same file, the resulting output is correct, so it appears the file is accessed in properly sequential order. Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-10runqemu-gen-tapdevs: Improve help text with an exampleRichard Purdie
Figuring how the correct commandline isn't trivial, improve the help text with RSS in mind. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-10wic: filemap: Fixed spared_copy skipDaniel Schultz
This patches removes the empty space in front of the copied file which was skipped. Without this reduction it's not possible to place a partition with rawcopy and skip parameter on a desired alignment. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-10wic: plugins: rawcopy: Fixed wrong variable typeDaniel Schultz
Without the int() function this variable will be a string. This will led to a error in Filemap on line 545 due wrong types. > [...] > File > ".../poky/scripts/lib/wic/filemap.py", line 545, in sparse_copy > if start < skip < end: > TypeError: unorderable types: int() < str() Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-08relocate_sdk.py: skip debug files from relocationNikunj Kela
Debug files only have debug symbols hence don't need to be relocated. Relocation script throws errors when run on the debug files. This change skips these files that have zero size. (From OE-Core rev: 132e8bfd499c713eb63075fd6380317b60f0bd27) Signed-off-by: Nikunj Kela <nkela@cisco.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-07crosstap: Changes to support Recipe specific sysrootSaul Wold
The crosstap script needed to be updated for recipe specific sysroot changes including adding support for finding the systemtap binaries. [YOCTO #10990] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04yocto-compat-layer.py: Add script to YP Compatible Layer validationAníbal Limón
The yocto-compat-layer script serves as a tool to validate the alignament of a layer with YP Compatible Layers Programme [1], is based on an RFC sent to the ML to enable automatic testing of layers [2] that wants to be YP Compatible. The tool takes an layer (or set of layers) via command line option -l and detects what kind of layer is distro, machine or software and then executes a set of tests against the layer in order to validate the compatibility. The tests currently implemented are: common.test_readme: Test if a README file exists in the layer and isn't empty. common.test_parse: Test for execute bitbake -p without errors. common.test_show_environment: Test for execute bitbake -e without errors. common.test_signatures: Test executed in BSP and DISTRO layers to review doesn't comes with recipes that changes the signatures. bsp.test_bsp_defines_machines: Test if a BSP layers has machines configurations. bsp.test_bsp_no_set_machine: Test the BSP layer to doesn't set machine at adding layer. distro.test_distro_defines_distros: Test if a DISTRO layers has distro configurations. distro.test_distro_no_set_distro: Test the DISTRO layer to doesn't set distro at adding layer. Example of usage: $ source oe-init-build-env $ yocto-compat-layer.py LAYER_DIR [YOCTO #10596] [1] https://www.yoctoproject.org/webform/yocto-project-compatible-registration [2] https://lists.yoctoproject.org/pipermail/yocto-ab/2016-October/001801.html Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04build-perf-test-wrapper.sh: support xml report formatMarkus Lehtonen
Add new command line option '-x' that enbles xml-formatted reports. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04scripts/runqemu: avoid overridden user input for bootparamsDmitry Rozhkov
Currently runqemu hardcodes the "ip=" kernel boot parameter when configuring QEMU to use tap or slirp networking. This makes the guest system to have a network interface pre-configured by kernel and causes systemd to fail renaming the interface to whatever pleases it: Feb 21 10:10:20 intel-corei7-64 systemd-udevd[201]: Error changing net interface name 'eth0' to 'enp0s3': Device or resource busy, Always append user input for kernel boot params after the ones added by the script. This way user input has priority over runqemu's default params. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04scripts/runqemu: Add always ttyS1 when no serial options are specifiedAníbal Limón
We always wants ttyS0 and ttyS1 in qemu machines (see SERIAL_CONSOLES), if not serial or serialtcp options was specified only ttyS0 is created and sysvinit shows an error trying to enable ttyS1: INIT: Id "S1" respawning too fast: disabled for 5 minutes [YOCTO #10491] (From OE-Core rev: 3a0efbbe6bb5a7f0fb3df0f6052b11e56788405f) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04scripts/lib/create_npm: handle Public Domain licensesAnders Darander
Rewrite Public Domain as PD, as that's what the place holder in meta/files/common_licenses is called. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04scripts/lib/create_npm: handle AND and OR in licensesAnders Darander
Handle npm packages with multiple licenses (AND and OR). Prior to this, AND and OR were treated as licensed in their own. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-03-04scripts/lib/create_npm: rewrite see license in eulaAnders Darander
Rewrite the 'SEE LICENSE IN EULA' to a single string (without spaces), to avoid splitting the string later on. (Otherwise, each word gets split, and assumed to be a license on it's own. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>