aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2015-06-18devtool: simplify the logic of determining patches to be removedMarkus Lehtonen
A slight simplification of the code. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-06-18devtool: update-recipe: do rev parsing in a separate functionMarkus Lehtonen
Split out the logic of determining "initial rev" and "update rev" into a separate function. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-06-18devtool: refactor bb task execution into a separate classMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-06-18devtool: fix wrong indentationMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-06-11wic: Move validation of --ptable option to wks parserEd Bartosh
bootloader --ptable option has two valid choices: gpt and msdos Moved this check to wks parser by changing option type to 'choice'. Removed similar checks from 5 other places. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Add help for --part-type and --use-uuid optionsEd Bartosh
Added help for two wks partition options specific to GUID partition table and globally unique identificators (GUID). Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Use partition UUID in directdisk-gptEd Bartosh
Used --use-uuid option for root partition in directdisk-gpt.wks This is useful to have example of image with UUID support. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Set type GUID and UUID for partitionEd Bartosh
Set type GUID and UUID for partition using sgdisk utility. Type GUID can be specified for partition in .wks with --part-type option. UUID is generated when --use-uuid option is specified for partition. [YOCTO #7716] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Add parameter 'uuid' to Image.add_partition methodEd Bartosh
With this parameter it's possible to pass generated UUID into Image class to set it for partition when it's created. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Refactored getting root device nameEd Bartosh
Replaced DirectImageCreator._get_boot_config private method with a 'rootdev' property. Simplified the code and API. Used 'uuid' property instead of incorrectly used 'part_type'. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Fix format stringEd Bartosh
wic crashes with "TypeError: %d format: a number is required, not str" Due to incorrect format used for Wic_PartData.extra_size attribute. Using %s instead of %d should fix the crash. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Generate random uuid for partitionEd Bartosh
'uuid' attribute of partition object is set to generated uuid when --use-uuid option is used for partition in .wks file. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Add --use-uuid partition optionEd Bartosh
Added --use-uuid option to the configuration of wks parser. Processing of this option will be implemented in the following commits. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: pylinted partitionedfs.pyEd Bartosh
Fixed some pylint findings in partitionedfs.py Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: replaced __run_parted with exec_native_cmdEd Bartosh
There is no need for yet another wrapper around exec_native_cmd. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: move checks to exec_native_cmdEd Bartosh
Checked for return code and output of native commands inside exec_native_cmd. Removed similar code from a lot of places where exec_native_cmd is called. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: removed exec_cmd_quiet and exec_native_cmd_quietEd Bartosh
These functions are not used anywhere. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: create directdisk-gpt.wksEd Bartosh
directdisk-gpt is the same as directdisk with only one difference: it uses GPT partition table. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> create mode 100644 scripts/lib/image/canned-wks/directdisk-gpt.wks Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Make _ptable_format publicEd Bartosh
Names with one leasding underscore considered protected in Python. _ptable_format is accessed outside of its class. Made it public by removing underscore. This pylint warning should be fixed now: Access to a protected member _ptable_format of a client class Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Use gptmbr.bin MBR for gpt partitionsEd Bartosh
Used proper syslinux MBR gptmbr.bin for GPT partitons. Added check for unsupported partition formats. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Add gpt to the list of supported partition table formatsEd Bartosh
Only msdos partition table format was supported by wic source plugins. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: check if part_type is set only for msdos partition tableEd Bartosh
Specifying partition type(GUID) makes sense for gpt partition table. Current code checks if part-type is specified and throws exception if it is. This makes sense to do only for msdos partition table. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: set legacy_boot flag for gpt partitionsEd Bartosh
This flag is used to tell special purpose software that the GPT partition may be bootable. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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>