summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
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>
2015-04-19devtool: call parse_recipe with correct argumentsMarkus Lehtonen
Give the correct data object ("config data" instead of "recipe data") as an argument to oe.recipeutils.patch_recipe() Fixes [YOCTO #7595] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-14wic: Print bitbake error outputEd Bartosh
Added bitbake error output to wic error message to make it more descriptive. [YOCTO #6911] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-14wic: use native partedEd Bartosh
Used exec_native_cmd instead of find_binary_path to run parted. Got rid of find_binary_path as it's not used anywhere else. There are several tools wic is trying to find not only in sysroot, but also in host root. Parted is a special as on some distros it's installed in /usr/sbin, which is not in the user's PATH. This makes wic to fail with error "External command 'parted' not found, exiting." [YOCTO #7122] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13oe-init-build-env: fix for build dirs that have spaces in their pathJoshua Lock
Enclose expansions of BUILDDIR in quotes in order to correctly handle paths which include spaces. Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13wic: setup infrastructure for nosetestsEd Bartosh
cd scripts && nosetests runs 3 simple tests and produces nice test coverage report for wic codebase. This infra can be used to test other scripts and modules. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13wic: Add argv argument to mainEd Bartosh
Make it possible to call wic as an API from tests passing command line parameters as arguments to main. This is yet another enabler for wic unit testing. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13wic: Use __file__ instead of sys.argv[0]Ed Bartosh
Using __file__ makes the code work independently of the way it's loaded. In some cases wic can be imported by another program without executing it. sys.argv[0] would not contain path to the wic in such a cases. This is an enabler for unit testing with nose framework. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13wic:code cleanup: No space allowedEd Bartosh
Fixed pylint warning 'No space allowed around keyword argument assignment' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13generate-manifest-2.7.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-04-09wic: make error message more informativeEd Bartosh
Included name of the missing program into the error message produced by exec_native_cmd when program is not found. Removed mentioning of the host programs as this API is not running them anymore. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>