aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2015-06-08scripts/jhbuild: removeRoss Burton
Remove the jhbuild2oe script and the copies of very old GNOME modulesets as nobody has used them for a long time. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-08python3: fix pyconfig.h installation on targetAlejandro Hernandez
The file pyconfig.h wasnt being deployed on target, causing an error when importing some libraries that required it, this patch fixes python3 manifest to include this file and fix the issue. [YOCTO #7764] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
2015-06-05scripts/combo-layer: Fix exit codes and tty handlingRichard Purdie
If combo-layer is called from a non-interactive context we should exit with a correct error code rather than try and drop to a shell. This patch cleans up a few error case exit codes as well as detecting and handling non-interactive usage. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-27wic: refactored processing of wic exceptionsEd Bartosh
All wic exceptions are now inherited from new base exception class WicError. It makes them easy to maintain and catch. Processing of exceptions is done this way: Known wic exceptions cause wic to print error message to stdout. Unknown exceptions are not catched anymore and produce standard python traceback. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-27wic: do not strip tracebackEd Bartosh
Printing only first 5 levels of wic traceback makes it almost useless as the most valuable part of it is stripped. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-23wic: Make sure file exists before removing itEd Bartosh
Bunch of os.remove calls were added to the partition.py lately. They're causing wic to fail with OSError: [Errno 2] No such file or directory if file doesn't exist. Added check for file existence to all recently added calls of os.remove. That should fix this regression. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-21combo-layer: handle unset dest_dir in sanity_check()Patrick Ohly
The previous "clean up dest_dir checking" patch (f8cdbe7497) improved handling of empty dest_dir but made handling of unset dest_dir worse: instead showing the "Option dest_dir is not defined for component ..." error, it fails with a Python exception. Avoid that by providing a sane fallback for the unset case. With that change, dest_dir is no longer strictly required, but the check for it is kept to ensure that a combo-layer.conf also works with older combo-layer versions. [Yocto #7773] Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-19devtool: update-recipe: add option to write changes to bbappendPaul Eggleton
Quite often what you want to do having made customisations to a piece of software is to apply those customisations in your own layer rather than in the original recipe. Thus, add a -a/--append option to the update-recipe subcommand which allows you to specify the layer to write a bbappend into. The bbappend will be created at the appropriate path within the specified layer directory (which may or may not be in your bblayers.conf) or if one already exists it will be updated appropriately. (This re-uses code written for recipetool appendfile.) Implements [YOCTO #7587]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-19recipetool: add appendfile subcommandPaul Eggleton
Locating which recipe provides a file in an image that you want to modify and then figuring out how to bbappend the recipe in order to replace it can be a tedious process. Thus, add a new appendfile subcommand to recipetool, providing the ability to create a bbappend file to add/replace any file in the target system. Without the -r option, it will search for the recipe packaging the specified file (using pkgdata from previously built recipes). The bbappend will be created at the appropriate path within the specified layer directory (which may or may not be in your bblayers.conf) or if one already exists it will be updated appropriately. Fairly extensive oe-selftest tests are also provided. Implements [YOCTO #6447]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-19devtool / recipetool: ensure bb.note() gets printedPaul Eggleton
Most of the time when bb.note() gets called we want to see the output, so ensure the level is set appropriately depending on the command line options instead of being fixed at warning. (We don't want to see the notes for fetch/unpack/patch though as they are too verbose). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-16wic: remove intermediate partitionsAlexandre Belloni
Remove intermediate partitions that may have been created by a previous wic invocation. Those partitions are causing issues on some systems. In particular vfat partition creation is hanging on mcopy execution on Fedora. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-15devtool: if workspace layer exists, still ensure it's in bblayers.confPaul Eggleton
When we run devtool, if the workspace layer already exists but isn't in bblayers.conf (perhaps because it was previously created but subsequently removed from bblayers.conf by the user) then we should add it and notify the user, otherwise devtool operations won't work. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-05-15devtool: deploy-target: use tinfoil instead of bitbake -ePaul Eggleton
Using tinfoil here is quicker and tidier than shelling out to bitbake -e and interpreting its output. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-05-15devtool: fix build env command execution error handlingPaul Eggleton
If we execute an external command, we ought to prepare for the possibility that it can fail and handle the failure appropriately. We can especially expect this to happen when running bitbake in this scenario. Ensure we return the appropriate exit code to the calling process. Fixes [YOCTO #7757]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-05-15devtool: deploy plugin: fix bad indentationMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-05-15devtool: add missing docstringsMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-05-15devtool: rename unused variablesMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-05-15devtool: remove unused imports / re-importsMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-05-15devtool: extract: remove patches when S=WORKDIRMarkus Lehtonen
Before this change, all files from the recipe (SRC_URI), including patches, were added to to srctree repository when S==WORKDIR. The patch files are useless as they are automatically applied on top of the srctree by devtool. This change causes devtool extract to not commit these unnecessary (and possibly confusing) patch file(s) into srctree repository. [YOCTO #7602] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-05-15python3: Upgrade from 3.4.2 to 3.4.3Alejandro Hernandez
Modifies: python3-native_3.4.2.bb -> python3-native_3.4.3.bb: Updates checksums, LICENSE did not change, dates were updated. python3_3.4.2.bb -> python3_3.4.3.bb: Updates checksums, LICENSE did not change, dates were updated. generate-manifest-3.4.py: fixes asyncio and net-tools. python-3.4-manifest.inc: fixes asyncio and net-tools. This upgrade contains a fix for CVE-2014-9365. Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-09combo-layer: improve merge commit handlingPatrick Ohly
When the head of a branch is a merge commit, combo-layer did not record that commit as last_revision because it only considers applied patches, and the merge commit never gets applied. This causes problems when the merge commit leads to multiple patches and the commit id that gets recorded only reaches some of these patches. The next run then will try to re-apply the other patches. This special case is now detected and dealt with by bumping last_revision to the branch commit. The behavior where the head is a normal commit is intentionally not changed, because some users might prefer the traditional behavior. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-07devtool: fix for rename of gcc-sourcePaul Eggleton
After OE-Core commit 67db7182faf6742b0d971d61d8c5ba34f69d2e12, PV is appended to the end of the gcc-source PN, thus we need to handle that in devtool and the corresponding test. Part of the fix for [YOCTO #7729]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-07runqemu-internal: correctly set format for root FS as rawCristian Iorga
qemu guesses via probing the format of root FS, but gives a warning and restricts write operations on block 0. So fix it by setting correctly the format as raw. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-05generate-manifest-3.4.py: Add fractions to ${PN}-numbersTim Orling
python-cryptography requires fractions module which is currently unpackaged. Signed-off-by: Tim Orling <TicoTimo@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-05python3: Upgrade from 3.3.3 to 3.4.2Alejandro Hernandez
Modifies: python3-native_3.3.3.bb -> python3-native_3.4.2.bb: Updates checksums, version, patches and SRC_URIs to use xz format, LICENSE did not change, dates were updated, adds fix for ctypes/libffi needed for pip <- required since Python 3.4 (see PEP #453). python3_3.3.3.bb -> python3_3.4.2.bb: Updates checksums, version, patches and SRC_URIs to use xz format, adds fix for ctypes/libffi, fixes oe_multilib_header() call, adds python3-core as RDEPENDS to python3-misc to avoid QA issue. generate-manifest-3.4.py - > generate-manifest-3.4.py: fixes reprlib, adds _sitebuiltins and _collections_abc <- formerly part of collections, separated since 3.4 python-3.3-manifest.inc -> python-3.4-manifest.inc Rebases: 12-distutils-prefix-is-inside-staging-area.patch python-3.3-multilib.patch 04-default-is-optimized.patch avoid-ncursesw-include-path.patch Deletes (fixed upstream): fix-ast.h-dependency.patch python3-fix-build-error-with-Readline-6.3.patch 06-ctypes-libffi-fix-configure.patch remove_sqlite_rpath.patch [YOCTO #6857] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
2015-05-03wic: Add plugin for single partition diskAdrian Freihofer
The wic plugin creates a disk image containig one ext2/3/4 partition. No additional boot partition is required. Syslinux is installed into the image. The target device is a legacy BIOS PC. Purpose of this plugin: Other avaliable plugins create a fat partition for /boot and an ext partition for rootfs. Current linux-yocto kernel packages are not compatible with this disk layout. The boot partition is not mounted by default, hence the kernel is installed into rootfs and not into boot partition. A kernel update ends up in a bricked device. The old kernel which is still in boot likely does not even boot with updated kernel modules from /. Even if the boot partition is mounted during the kernel update the update will fail. The kernel package installs a symbolic link which is not supported by the fat partition. Creating just one ext partition for boot and rootfs solves all issues related to package based kernel updates on the device. The plugin depends on syslinux-nomtools a user space installer for syslinux on ext filesystems. Thanks to Robert Yang who implemented syslinux-nomtools and supported the implementation of this plugin. Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-03wic tests: Move wic tests to oe-selftest infraEd Bartosh
Modified existing wic test modules to work with oe-selftest infrastructure. $ oe-selftest --run-tests wic ... test01_help (oeqa.selftest.wic.Wic) Test wic --help ... ok test02_createhelp (oeqa.selftest.wic.Wic) Test wic create --help ... ok test03_listhelp (oeqa.selftest.wic.Wic) Test wic list --help ... ok test04_build_image_name (oeqa.selftest.wic.Wic) Test wic create directdisk --image-name core-image-minimal ... ok test05_build_artifacts (oeqa.selftest.wic.Wic) Test wic create directdisk providing all artifacts. ... ok ---------------------------------------------------------------------- Ran 5 tests in 6.434s OK Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-03wic tests: Add docstrings to test methodsEd Bartosh
Docstrings make nosetests output more clear: Test wic create --help ... ok Test wic --help ... ok Test wic list --help ... ok Test wic create directdisk providing all artifacts. ... ok Test wic create directdisk --image-name core-image-minimal ... ok Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-03wic tests: Add functional tests for directdiskEd Bartosh
Added 2 simple functional test cases to check if wic is able to produce images using directdisk.wks Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-01recipetool: allow specifying SRCREV via rev= in URIPaul Eggleton
Provide a means to set SRCREV immediately by using rev= in the URI; if it is specified then it is removed before setting SRC_URI and SRCREV is set to the same value instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-05-01devtool: add: use the appropriate file naming and versioning for SCM recipesPaul Eggleton
* Recipes that fetch from git, svn or hg by OpenEmbedded convention should normally be named with this as a suffix, since PV is meant to be set appropriately within the recipe, so follow this. In order to make this work we need to be able to have the version independent from the file name, so add a -V option to recipetool create to allow this to be specified. * If -V is specified on the devtool add command line, ensure at PV gets set to include this version. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-05-01devtool: add: add an option to fetch remote sourcePaul Eggleton
Add a -f/--fetch option to fetch a remote URI (into the already specified source tree path) and set this as SRC_URI within the recipe. This simply wraps around the existing functionality in recipetool. Implements [YOCTO #7644]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-05-01recipetool: ensure git clone is standalone when extractingPaul Eggleton
If -x is specified and the specified URI was a git repository, we need to ensure that the resulting clone is a sandalone and not one that has pointers into the temporary fetch location or DL_DIR (since the git fetcher does a local clone with -s). Split out the code from devtool that already does this for "devtool modify -x" and reuse that. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-05-01recipetool: avoid second-level subdir when extractingPaul Eggleton
When -x was specified, we were getting the normal unpack subdirectory which we don't really want - if there's only one subdirectory unpacked then we should effectively copy just it to the extraction path, not as a subdirectory under it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-04-27mkefidisk.sh: be more explicit with device errorPaul Eggleton
* Specify whether the device can't be found or can't be written to * Give a hint to use sudo Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27mkefidisk.sh: fix hanging on non-writeable devicePaul Eggleton
If cleanup() is called early on, as happens when the device isn't writeable, then none of the mount point variables are set; thus the script was calling grep with only one argument and appeared to hang since it was waiting for input on stdin. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27mkefidisk.sh: use script mode when running partedPaul Eggleton
This avoids parted showing prompts and thus effectively hanging the script in in the case of initially malformed disks. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27devtool: update-recipe: check if source tree is a git repositoryPaul Eggleton
If you've done "devtool add" (or "devtool modify" without -x) then it's possible that the external source tree is not a git repository, so we should handle that case here instead of printing a traceback. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27devtool: update-recipe: handle unversioned bbappendsPaul Eggleton
Use the proper bbappend file name, don't just assume it will have a version suffix (because it won't if the original recipe doesn't). Fixes [YOCTO #7651]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27devtool: reset: avoid errors in case file no longer existsPaul Eggleton
If you manually delete files in the workspace layer (which you really shouldn't) it was possible to get yourself into the situation where you couldn't reset because we were attempting to check if the file had been modified and erroring out if it couldn't be opened. If the file's not there anymore there's not much point checking if it needs to be preserved, just skip it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27devtool: add: use correct bbappend file name with -V optionPaul Eggleton
We weren't adding the version into the bbappend file name when -V was specified which meant that building or resetting failed. Also adjust one of the tests so that we're testing devtool add both with and without this option. Fixes [YOCTO #7647]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27devtool: handle . in recipe namePaul Eggleton
Names such as glib-2.0 are valid (and used) recipe names, so we need to support them. Fixes [YOCTO #7643]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27devtool: include bbappends in recipe parsingMarkus Lehtonen
In order to get correct metadata, SRCREV for example. Fixes [YOCTO #7648]. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27devtool: modify: implement --no-same-dirMarkus Lehtonen
This option can be used to have a separate build directory, in order to keep the srctree directory clean for packages that do not need to be built in the source directory. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27devtool: modify: use B=S if that is the default for the recipeMarkus Lehtonen
Makes the build succeed for packages which do not support separate build directory, e.g. zlib. The same outcome could be achieved with the --same-dir option, but, it's generally hard to tell if a random package would need that option. The negative side effect of this patch is that dev srctree (of some packages that build fine without this modification) gets dirtied by build artefacts. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-24wic: code cleanup: wildcard importsEd Bartosh
Here is what PEP8(Style Guide for Python Code) says about this: Wildcard imports (from <module> import *) should be avoided, as they make it unclear which names are present in the namespace, confusing both readers and many automated tools. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-24wic: code cleanup: undefined variablesEd Bartosh
Fixed forgoten imports Wic_PartData and ImageError. Removed unused and undefined variable syslinux_conf. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-24devtool: force use of bash when running build within extensible SDKPaul Eggleton
Ubuntu's default dash shell causes oe-init-build-env to behave a bit differently - (a) it can't pick up the OE root directory and (b) it can't see any build directory specified as a command-line argument (since dash doesn't pass through any arguments specified to sourced scripts). We could work around these but doing so requires some internal knowledge of the script; a much simpler fix is just to force running the command under bash since it's expected to be installed on every distro. Thanks to Chen Qi <Qi.Chen@windriver.com> for this fix. Fixes [YOCTO #7614]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-21fontcache: allow to pass different fontconfig cache dirMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-19wic: try to find bitbake using find_executable APIEd Bartosh
Current wic code was assuming that bitbake directory is on the same level as scripts, which is not the case for oe classic. Using find_executable bitbake location should be determined better as this API uss $PATH to search for executables. Fixes [YOCTO #7621] Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>