aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2015-06-25runqemu: enable kvm when use tap under sudorbt/qemu_v2Robert Yang
Enable kvm support automatically when use tap interface under sudo, the thought is, if sudo works well, and qemu-native has been built with kvm support, and kvm can be enabled, then enable it, it can be disabled by nokvm option. The previous command: $ runqemu qemux86 kvm may not work since it checks the current user's read/write permission on /dev/kvm and /dev/vhost-net but failed without sudo, it can't use sudo to check them since sudo is not a must, sudo is only required when need create tap interface, this patch can enable it automatically. Enable kvm can improve qemu's performance a lot, when test perl-5.22's lib/warnings.t on qemux86-64, 70 times improved. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-06-25runqemu: disable graphic when no DISPLAY or vncRobert Yang
Disable graphic when no DISPLAY or vnc rather than print an error like: [snip] Could not initialize SDL(No available video device) - exiting [snip] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-06-23python-2.7/3.4-manifest.inc: add missing dependencies for python-netserverHenning Heinold
* SimpleHTTPServer imports shutil so we need definitly python-shell * SocketServer can be run without the threading modul, but I think we should run the full blown stuff, so let us add python-threading * this work was sponsored by sysmocom GmbH Signed-off-by: Henning Heinold <henning@itconsulting-heinold.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23wic: removed unused command line optionEd Bartosh
Removed -i/--infile wic command line option. Removed properties_file and properties arguments of wic_create function. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23wic: code cleanup: superfluous-parensEd Bartosh
Removed unncecessary parents after 'if' 'del' and 'print' keywords. Fixed pyling warning: Unnecessary parens after 'xxx' keyword Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23wic: Return error code when wic fails to invoke commandEd Bartosh
Return 1 if command doesn't exist or wic is called without any commmand. Return result of invoke_command as wic return code. Added tests for unsupported command and no command. Fixed typo in test case test02_createhelp spotted by this fix. [YOCTO #7856] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23wic: Integrated plugin docstrings into 'wic help plugins' outputEd Bartosh
Added mechanism to show docstrings of plugin classes as a part of plugins help page. For missing plugins the following warning message is shown: <class '<plugin class spec>'> is missing docstring. [YOCTO #7118] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23wic: Add missing docstrings to plugin classesEd Bartosh
Docstings from plugin classes are used as part of output of 'wic help plugins'. Adding them makes help page more informative. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23wic: Code cleanup: bad-classmethod-argumentEd Bartosh
Fixed wrong name for the first argument in class methods. Pylint complains about the issue this way: Class method should have 'cls' as first argument Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23wic: Document creation of empty partitionEd Bartosh
Added short explanation of how to create empty pattition to the 'wic help kickstart' output. [YOCTO #7131] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23runqemu-internal: set mutual exclusiveness for serial and nographic optionsJagadeesh Krishnanjanappa
Use "-nographic" option only if "serial" option is not specified. Otherwise we get below error when 'runqemu <kernel_image> <rootfs_image> serial' is executed, (snip) QEMU 2.2.0 monitor - type 'help' for more information (qemu) qemu-system-aarch64: -serial stdio: cannot use stdio by multiple character devices -- CUT -- Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23runqemu-script: define console for qemuarm NFS bootingJagadeesh Krishnanjanappa
Add console=ttyAMA0,115200 as one of the boot parameters for qemuarm, in order to print bootlog messages on the console. Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23runqemu-internal: add support to boot arm64 qemu target via NFSJagadeesh Krishnanjanappa
Add required boot parameters inorder to boot arm64 qemu target via NFS Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23runqemu: fix MACHINE being detected as qemuarm for qemuarm64 kernel imageJagadeesh Krishnanjanappa
Basically, runqemu script autodetects MACHINE type based on the kernel image name; if MACHINE name is not specified. Since 'qemuarm' string is common in both qemuarm amnd qemuarm64 kernel image names, the MACHINE type is considered as 'qemuarm' even when qemuarm64 kernel image name is given in command line. Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-18devtool: deploy: fix preservation of symlinks and permissions/ownershipPaul Eggleton
It turns out that scp can't be used to copy symlinks because it follows them instead of copying them, and this is by design (since it emulates rcp which also behaved this way); the unfortunate result is that symlinks that point to valid files on the host translate into the host file being copied to the target (yuck). The simplest alternative that does not have this undesirable behaviour is to use tar and pipe it over ssh. At the same time, it would be even better if we properly reflect file permissions and ownership on the target that have been established within the pseudo environment. We can do this by executing the copy process under pseudo, which turns out to be quite easy with access to the pseudo environment set up by the build system. Fixes [YOCTO #7868]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-18recipetool: appendfile: fix file command error handlingPaul Eggleton
* It turns out that not all versions of the file command support the -E option - the version in Ubuntu 14.04 doesn't support it for example. This option is supposed to force file to return an error if the file can't be opened - since we can't rely upon it then fall back to looking at the output instead. (The results of this issue were simply that we didn't notice if the file was executable and give a warning, which tripped an oe-selftest failure - so it was minor.) * If we receive an error there's not much point looking at the output to see what type was returned because there wasn't one. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-18recipetool: appendfile: clarify help textPaul Eggleton
Add a long description and tweak some of the argument descriptions so that it's clearer what the appendfile subcommand does and how it works. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-18devtool: use DevtoolError for error handlingMarkus Lehtonen
Use DevtoolError exception more widely for handling error cases. This exception is now caught in the main script and raising it can be used to exit with an error. This hopefully simplifies error handling. The change also makes exit codes more consistent, always returning '1' when an error occurs. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-06-18devtool: remove some unused return valuesMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-06-18devtool: split out 'patch' update mode into a separate functionMarkus Lehtonen
Continue refactoring of update_recipe() by splitting out the 'patch' mode into a separate function. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-06-18devtool: split out 'srcrev' update mode into a separate functionMarkus Lehtonen
Refactor update_recipe() (i.e. the implementation of the update-recipe command) by splitting out the 'srcrev' into a distinct function. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-06-18devtool: slight simplification of path splitting logicMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-06-18devtool: simplify few conditionals a bitMarkus Lehtonen
Just refactor the code. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
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>