summaryrefslogtreecommitdiffstats
path: root/scripts/lib
Commit message (Collapse)AuthorAgeFilesLines
* classes: Drop now unneeded update_data callsRichard Purdie2017-02-151-1/+0
| | | | | | | | | | Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. (From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: improve parse failure handlingPaul Eggleton2017-02-072-2/+16
| | | | | | | | | | | | | With the move to tinfoil2, the behaviour when parsing failed has changed a bit - exceptions are now raised, so handle these appropriately. Specifically when if parsing the recipe created when running devtool add fails, rename it to .bb.parsefailed so that the user can run bitbake afterwards without parsing being interrupted. (From OE-Core rev: b9592bd3c1ab2155b9f62d18ce593b9c88eff279) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: do not treat numbers in SCM URLs as versionsPaul Eggleton2017-02-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Numbers within SCM (e.g. git) URLs are extremely unlikely to be valid version numbers - more likely they are just part of the name, thus don't try to extract them and use them as the version - doing so causes pretty bad behaviour within devtool: --------- snip --------- $ devtool add https://github.com/inhedron/libtr50 NOTE: Fetching git://github.com/inhedron/libtr50;protocol=https... ... NOTE: Using default source tree path .../build/workspace/sources/libtr ... RecursionError: maximum recursion depth exceeded while calling a Python object --------- snip --------- (This was because ${PV} was being substituted into the URL, but PV's value was being set to include ${SRCPV}, so there was a circular reference.) (From OE-Core rev: 3427508b6ce865654f8bf01a6fc04b83c70315d3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipetool: create: properly handle npm optional dependenciesPaul Eggleton2017-02-071-7/+49
| | | | | | | | | | | | | npm's package.json supports two types of dependencies - optionalDependencies and dependencies; in the code for creating a recipe from a non-npm source (e.g. a git repository) we were not handling optionalDependencies and thus when pointed at a node.js application outside of npm we weren't taking care of all dependencies. (From OE-Core rev: 2b66cb9982d10ce1744d430858eaef3e5a72c8c0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix call of serial_console_form_kargsEd Bartosh2017-02-051-1/+1
| | | | | | | | | | | | As syslinux module has been recently removed and serial_consloe_form_kargs became local API in rootfs_pcbios_ext plugin it should be called without syslinux. prefix. (From OE-Core rev: d701673b658d879726d6cf846a6d5f4173c3b0e5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: isoimage-isohybrid: use wic-tools to get syslinux pathEd Bartosh2017-02-051-1/+1
| | | | | | | | | | | | wic-tools recipe specific sysroot contains syslinux as wic-tools depends on it. Used wic-tools target to get syslinux path should guarantee that syslinux is installed there and can be used. (From OE-Core rev: be8ebac3b055070f690d42836bb0fdad32d29204) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: flatten imager class hierarchyEd Bartosh2017-02-053-191/+55
| | | | | | | | | | | | | | | | | | | | | | | wic code is hard to follow due to deep and twiggy class inheritance tree. Flatten imager tree: wic -> wic_create -> Creator -> DirectPlugin -> DirectImageCreator to wic -> wic_create -> DirectPlugin by removing Creator class and creator module merging DirectImageCreator into DirectPlugin Changed APIs to use the same parameters names. Passed parsed command line options as an object down the stack. (From OE-Core rev: 1e28d512341ce470c7afb256a01e597ab87170ca) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: direct: fix creation of work directoryEd Bartosh2017-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | It was a typo in current code: mktemp was used instead of mkdtemp to create work directory. This is fixed by using mkdtemp. Create work directory as a subdirectory of output directory to make sure both are on the same partition to make moving of result image faster. This also fixes possible disk space issues as mkdtemp uses TMPDIR, TEMP or TMP environment variables to get default value of its 'dir' parameter. Those variables are usually pointing to /tmp, which is not the best location to create huge images. (From OE-Core rev: e6579b4e007ce89000c46c09917fbd3c72f18a73) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: engine: create output dirEd Bartosh2017-02-021-0/+3
| | | | | | | | | | | Make sure output directory exists before creating an image. Create it if it doesn't exist. (From OE-Core rev: e52bfb0e81d3fb2a474f08b2e2b8b89aadc61d14) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: remove syslinux.pyEd Bartosh2017-02-022-59/+37
| | | | | | | | | | This module contains singe function serial_console_form_kargs, which is used only by rootfs_pcbios_ext plugin. Moved it there and removed syslinux module to make it easy to find and mainain plugin code. [YOCTO #10619] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: code cleanupEd Bartosh2017-02-0215-43/+36
| | | | | | | | | | | Fixed indentation, unused imports, trailing lines etc. [YOCTO #10619] (From OE-Core rev: 5fa7768bfb4b6d464c6a812822b0665f52e7bea4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: msger.py: remove unused APIsEd Bartosh2017-02-021-26/+0
| | | | | | | | | | | Removed unused enable_logstderr and disable_logstderr APIs. [YOCTO #10619] (From OE-Core rev: 835f7a5c4c51f3d0d31d0193258b50596ceacb5a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: removed code from __init__.pyEd Bartosh2017-02-021-4/+0
| | | | | | | | | | | | The code deals with non-existing directory and can be removed. [YOCTO #10619] (From OE-Core rev: e148884b8145fad212c4085f2ead5c3e5e3e42a2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: move oe/misc.py one level upEd Bartosh2017-02-0214-20/+20
| | | | | | | | | | | | Flattened directory structure: moved wic/utils/oe/misc.py -> wic/utils/misc.py [YOCTO #10619] (From OE-Core rev: 392532a2748ff2e6412eeb79163662b5168611ce) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: move 2 APIs to wic.engineEd Bartosh2017-02-026-62/+37
| | | | | | | | | | | | Moved find_canned and get_custom_config APIs to engine module. Removed empty wic.utils.misc module. [YOCTO #10619] (From OE-Core rev: 10e9afac46575d3f557b7cb505daa31ce9ce85fa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wci: misc: removed build_name APIEd Bartosh2017-02-021-39/+0
| | | | | | | | | | | This API is not used in wic code. [YOCTO #10619] (From OE-Core rev: 9d14cb8bb8cf9559b7ff0efa03427624c18e2506) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: partition: simlify calling plugin methodsEd Bartosh2017-02-022-51/+25
| | | | | | | | | | | | | Replaced parse_sourceparams function with list comprehension. Used local variables instead of attributes. Moved global variable to the local scope. [YOCTO #10619] (From OE-Core rev: 4adbac84046ff744f1452b5ff4d017d17d2d45e2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: removed test fileEd Bartosh2017-02-021-1/+0
| | | | | | | | | | | This file is not used anywhere in the wic code. [YOCTO #10619] (From OE-Core rev: e3c43ce3261663225aeba50b8c6229577574f9b7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: renamd direct_plugin.py -> direct.pyEd Bartosh2017-02-021-0/+0
| | | | | | | | | | | | | As this files is located in plugins/imager subdirectory it's obvious that it's an imager plugin. Renamed to direct.py to be consistent with plugin naming scheme. [YOCTO #10619] (From OE-Core rev: d5db8c2ee91bdd51bfbb2ebf61aea8ff0378d512) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: simplified code of direct_pluginEd Bartosh2017-02-021-22/+2
| | | | | | | | | | | | Removed unused methods. Got rid of get_default_source_plugin and _full_name methods. [YOCTO #10619] (From OE-Core rev: c5706f71dee531557a6b1290665283b8637fff6e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: pylinted direct_pluginEd Bartosh2017-02-021-15/+7
| | | | | | | | | | | | Fixed wrong continued indentation, unused import and trailing new line pyling warnings. [YOCTO #10619] (From OE-Core rev: e78762a4b52c31357ef29a5b93c53db7190fa4f2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: improve naming in direct_plugin classesEd Bartosh2017-02-021-40/+22
| | | | | | | | | | | Synchronized attribure names in DirectImageCreator and DirectPlugin for better readability. Simplified code, removed unneeded global variable disk_methods. (From OE-Core rev: b87b9ef84791615636424a224f74386a4aa0c2fa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: get rid of __rootfs_dir_to_dict methodEd Bartosh2017-02-021-16/+5
| | | | | | | | | | | | Replaced class method __rootfs_dir_to_dict with a list comprehension. [YOCTO #10619] (From OE-Core rev: 266fd31410771db4c06539f7368c196a6d03000a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: moved content of direct.py to direct_pluginEd Bartosh2017-02-023-418/+380
| | | | | | | | | | | | | This move simplifies directory structure and makes further refactoring easier. The code from direct.py was used only in direct_plugin, so it's safe to move it there. [YOCTO #10619] (From OE-Core rev: a8f5ebb26183faa9af6eb72f4dabfcf83aa1e8d4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: removed conf.py and empty config file.Ed Bartosh2017-02-022-109/+0
| | | | | | | | | Removed as they're not used anymore in wic code. (From OE-Core rev: ffa2f3d7bf883d5add911b7c5d0be2b347733524) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: direct_plugin: stop using config managerEd Bartosh2017-02-022-12/+20
| | | | | | | | | | | | | | | | | | | This is a preparation to removing conf.py and config/wic.conf from the codebase. Got rid of using configmgr global object in direct_plugin and direct modules. It was used to implicitly parse kickstart file and set couple of variables. Replaced usage of configmgr by passing parameters directly to the DirectImageCreator. [YOCTO #10619] (From OE-Core rev: 79191119de010acb107f9392a991108728858441) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: creator: stop using config managerEd Bartosh2017-02-021-19/+0
| | | | | | | | | | | | | | | | | | This is a preparation to removing conf.py and config/wic.conf from the codebase. confmgr object is complicated for no reason and almost useless as all configuration info comes from command line and bitbake variables. It's used it creator.py to store information about output directory, logs and some never used functionality like tmpfs for future use, which doesn't actually happen. [YOCTO #10619] (From OE-Core rev: 702ee7a1fe30d87d55ba9528ae89abff4e294fd9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* isoimage-isohybrid: renamed variable hdd_dirEd Bartosh2017-01-311-4/+4
| | | | | | | | | | Renamed variable hdd_dir to deploy_dir as this variable is assigned to the value of DEPLOY_DIR_IMAGE. (From OE-Core rev: fc84893c319f3e8c72f13c58f25e0b54095c3a49) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* isoimage-isohybrid: use TRANSLATED_TARGET_ARCH instead of MACHINE_ARCHEd Bartosh2017-01-311-4/+4
| | | | | | | | | | | | | | | | isoimage-sihybrid plugin uses MACHINE_ARCH to get the name of initrd image. It doesn't work for all machines, for example for quemux86-64 machine MACHINE_ARCH is quemux86_64 and initrd name is core-image-minimal-initramfs-qemux86-64.cpio.gz Used TRANSLATED_TARGET_ARCH variable to get the initrd image name. Replaced MACHINE_ARCH->TRANSLATED_TARGET_ARCH in WICVARS variable to make it available from <image>.env file. (From OE-Core rev: edf0830412de66eada9ef3f3947ca42e301c5377) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Look for image artifacts in a common locationTom Zanussi2017-01-312-14/+43
| | | | | | | | | | | | | | | | Rather than have each image type look for artifacts in image-specific locations, move towards having them look for artifacts in a common location, in this case DEPLOY_DIR_IMAGE Use the existing deploy.bbclass to have the bootloaders put their binaries in DEPLOY_DIR_IMAGE and then wic will find them and place them in the image (From OE-Core rev: 1c8acea91e775b1b6f8b25e774aaba3e790fc59b) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: isoimage-isohybrid: stop using HDDDIREd Bartosh2017-01-311-8/+2
| | | | | | | | | | | | | | | | | Stop using HDDDIR in isoimage-isohybrid wic plugin. This variable is set by hddimg code, which is going to be removed soon. All required artifacts should be available from ISODIR. wic-image.bbclass has been modified to build iso artifacts, so it should be safe to remove usage of HDDDIR. [YOCTO #10835] (From OE-Core rev: 4ceb0df10db7254b290784cabc5279ffa2b946a4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use INITRD_LIVE in isoimage-isohybridEd Bartosh2017-01-311-1/+1
| | | | | | | | | | | | | | INITRD variable is not set if hddimg is disabled. isoimage-isohybrid can't get correct name for initrd if INITRD variable is not set. Added INITRD_LIVE to WICVARS and used it in isoimage-isohybrid code to get initrd artifact name. Used INITRD if INITRD_LIVE is not set. (From OE-Core rev: c672753be60550b15d5d593c251b61776d5b104d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: partitionedfs: set partition name for gpt partitionsJukka Laitinen2017-01-311-0/+7
| | | | | | | | | | | Set proper gpt partition name for the partitions in case given in the configuration (From OE-Core rev: bc6e6a34f35bd081d828160bab8ee12e770c7e1e) Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: direct.py: get rid of names with two underscoresEd Bartosh2017-01-311-26/+24
| | | | | | | | | | | Attributes with two leading underscores are mangled in Python and used mainly for avoiding name clashes with names from subclasses. They're not needed in most of wic classes. (From OE-Core rev: 2f92c0490f1acf5a6926fc6654ce3b6588ddcc24) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: remove unused API DirectImageCreator.get_disk_namesEd Bartosh2017-01-311-26/+0
| | | | | | | (From OE-Core rev: f77efbe81a5d3d16ecb1872cf237bb3e56c63c39) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: make workdir a temporary directoryEd Bartosh2017-01-311-12/+15
| | | | | | | | | | | | | | | Wic used hardcoded path /var/tmp/wic/ as a work directory, which caused conflicts if two wic instances run in parallel. Made work directory unique and temporary. Moved results from work directory to output directory when they're ready. [YOCTO #10783] (From OE-Core rev: 5d948f04823dedfa26a879aa6a5dc23de2bb9354) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: get rid of baseimager inheritanceEd Bartosh2017-01-312-197/+13
| | | | | | | | | | | | Simplified DirectImageCreator code by removing inheritance from BaseImageCreator. This inheritance doesn't make much sense as DirectImageCreator is the only class that was inherited from BaseImageCreator. (From OE-Core rev: 4e9952514211ef4b9a3731ce915090385f335a31) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: bootimg-pcbios: use wic-tools targetEd Bartosh2017-01-231-1/+1
| | | | | | | | | Used wic-tools target to get location of syslinux. (From OE-Core rev: 5afd7def3b101bb3d650db4d005cb8d36aaf074a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: misc.py: add parameter 'cache' to get_bitbake_varsEd Bartosh2017-01-231-7/+12
| | | | | | | | | | | | This parameter will be used to allow or prevent variable caching. For example, we don't want to cache value of RECIPE_SYSROOT_NATIVE wic-tools variable as we may decide to rebuild wic-tools. (From OE-Core rev: e4269fdb4c3ef06b97df063f8586f74986215c83) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fixed test_iso_image test caseEd Bartosh2017-01-231-4/+1
| | | | | | | | | | | Fixed isoimage-isohybrid plulgin and correspondent wic tet case: - used wic-tools target when getting varlue of STAGING_LIBDIR variable - ensured that image is built with efi and hddimg enabled (From OE-Core rev: 5878484da64c38c7fde45bb06d76e22e608eb022) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fixed recipe nameEd Bartosh2017-01-231-1/+1
| | | | | | | | | | | Renamed grub-efi-native -> grub-efi in NATIVE_RECIPES dictionary as '-native' suffix is added to the recipe name in the code. (From OE-Core rev: cd0e7b20de2de67793d0454f4e5cf6bb6f4a16f7) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* partition.py: use FAKEROOTCMD variable to get path to pseudoEd Bartosh2017-01-231-1/+1
| | | | | | | | | | | | wic used native sysroot to get path to pseudo utility. This approach doesn't work with recipe specific sysroots. Using FAKEROOTCMD should fix the issue. (From OE-Core rev: 03e051d594f285ea3c014d45e9b30028e683c602) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: fix source extraction to work with recipe specific sysrootsPaul Eggleton2017-01-201-1/+15
| | | | | | | | | | | | | | | | | | | | | When extracting source for a recipe within devtool (for extract, modify or upgrade) We need to redirect WORKDIR, STAMPS_DIR etc. under a temporary directory so that: (a) we pick up all files that get unpacked to the WORKDIR, and (b) we don't disturb the existing build However, with recipe-specific sysroots the sysroots for the recipe will be prepared under WORKDIR, and if we used the system temporary directory i.e. usually /tmp) as used by mkdtemp by default, then our attempts to hardlink files into the recipe-specific sysroots will fail on systems where /tmp is a different filesystem, and we'd have to fall back to copying the files which is a waste of time. Put the temp directory under the WORKDIR to prevent that from being a problem. (From OE-Core rev: e10a973cd9390eacb13bdb99693a0622bd3695f5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> [RP: Add needed mkdirhier call] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: partitionedfs: account for non-table partitions when checking if ↵Maciej Borzecki2017-01-191-1/+2
| | | | | | | | | | | | | | logical parititon is needed Commit 8c1c43b7901a9fcd8b279eb4250b08157ad345b7 `wic: Create a logical partition only when it is really mandatory` did not account for partitions that are not present in partition table. (From OE-Core rev: 57b05e924bba7b2fff07a34690474c0fa3046865) Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: _exec_cmd: produce error if exit code is not 0Ed Bartosh2017-01-161-10/+4
| | | | | | | | | | | | | | | | | | Current code doesn't always show error output of the external command and even ignores non-zero exit code. Moved checking of exit code value to the lowest level possible: to _exec_cmd. This should make wic to always check exit code of the external command and issue an error if it's not 0. [YOCTO #10816] (From OE-Core rev: 7f68001579c08509332d633b27b5c2ea9386b6c9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* direct.py: fix getting image nameEd Bartosh2017-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | part.rootfs_dir was used as an image name in the code. However, when multi-rootfs feature is used this attribute points to the name of the rootfs, e.g. if --rootfs command line is rootfs1=core-image-minimal partf.rootfs_dir is 'rootfs1'. The code also fails when image name is not provided in wic commandline. For example, when wic is called with --rootfs-dir=<path> part.rootfs_dir will contain path and wic will crash trying to call bitbake -e <path> to get value of ROOTFS_SIZE variable. Fixed the code by getting image name properly and checking if it's not a path. [YOCTO #10815] (From OE-Core rev: 2e05d9709f1308fc95d3406b8a409ea982c5b474) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* canned-wks: remove mpc8315e-rdb.wksEd Bartosh2017-01-161-6/+0
| | | | | | | | | | This file has been moved to meta-yocto-bsp/wic/ (From OE-Core rev: efa7639b31c51e2874ba61fd68f9e2cb51145eaf) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/isoimage-isohybrid: remove do_stage_partition()Ioan-Adrian Ratiu2017-01-162-49/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The purpouse of this function was to check dependencies for building a hybrid iso and build them using bitbake if not found. Calling bitbake in this context means this wic plugin itself cannot be instrumented inside bitbake recipes which is undesirable, the benefits of this are clear: there is no need to maintain outside scripts to generate an iso using wic and the isohybrid building logic can be further abstracted away into an isohybrid.bbclass in the future which can be easily inherited or something similar. So remove the function and add all dependencies to NATIVE_RECIPES so that wic can print useful errors when they're not built. To automate building the isohybrid image dependencies, add the following somewhere in your image build inheritence hierarcy (or maybe create a bbclass in the future to do these sort of things automatically): DEPENDS += "syslinux syslinux-native cdrtools-native e2fsprogs-native \ parted-native dosfstools-native mtools-native grub-efi-native" (From OE-Core rev: ba4346069ab87f1cf942d1928f911eca6a9d65cd) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: fix parsing of 'bitbake -e' outputEd Bartosh2017-01-161-8/+6
| | | | | | | | | | | | | | Current parsing code can wrongly interpret arbitrary lines that are of 'key=value' format as legitimate bitbake variables. Implemented more strict parsing of key=value pairs using regular expressions. (From OE-Core rev: f0ec387ad40fb9c098ac8d761993bc2bacc76e65) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gummiboot: Remove old gummiboot recipe, related class and wks fileAlejandro Hernandez2017-01-161-11/+0
| | | | | | | | | | | | | | Since the gummiboot project is no longer being maintained and we are using systemd-boot as a replacement instead, we can now clean up all remaining gummiboot files. [YOCTO #10332] (From OE-Core rev: 65eb3f51b70baaf24de871301a7247d5baed00ed) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>