summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
AgeCommit message (Collapse)Author
2022-08-12scripts: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present and add license identifiers as MIT if there isn't one. (From OE-Core rev: deb3ccec53e0bd63bc4235cf2b0d3fc781687361) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-08isoimage-isohybrid.py: Support adding files/dirsChaitanya Vadrevu
Add "payload_dir" parameter so user can add other files/dirs to the ISO. (From OE-Core rev: bbe84a33c81066fee96dd28a4009d8404b51e642) Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-10isoimage-isohybrid.py: Parameterize ESP partition sizeHaris Okanovic
Add "esp_extra_blocks" plugin parameter so that caller may change ESP's free space from the default 100 blocks. (From OE-Core rev: db4be094b0d6741ca4f9e2cbb499fc9c224fa690) Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-10isoimage-isohybrid.py: Parameterize ESP labelHaris Okanovic
Add "esp_label" plugin parameter so that caller may override default ESP partition label 'EFIimg'. (From OE-Core rev: 6b3b9042a55d47205b16ef792f93a9bb240fd7cb) Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-17wic: add support for kernel with initramfs bundledChee Yang Lee
when INITRAMFS_IMAGE_BUNDLE and INITRAMFS_IMAGE are set, wic should look for kernel with initramfs image bundled. Include required variable MACHINE, INITRAMFS_IMAGE_BUNDLE, INITRAMFS_IMAGE, INITRAMFS_LINK_NAME and KERNEL_IMAGETYPE in WICVARS. No longer require default value for variable kernel as KERNEL_IMAGETYPE is not optional variable and included in WICVARS. image_types_wic to inherit kernel-artifact-names to obtain default INITRAMFS_LINK_NAME when INITRAMFS_IMAGE_BUNDLE are set. update wic.Wic2.test_image_env test case to filter optional variable INITRAMFS_LINK_NAME, INITRAMFS_IMAGE and INITRAMFS_IMAGE_BUNDLE. (From OE-Core rev: bac984fbb2d5ad5d13ba3275c8a3e878d8753c58) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-11wic/plugins: kernel image refer to KERNEL_IMAGETYPEChee Yang Lee
replaced hardcoded kernel image with KERNEL_IMAGETYPE. set kernel image to "bzImage" incase KERNEL_IMAGETYPE not set. (From OE-Core rev: 88a9fef761c5e67b2964fedc85a7e8ad37067564) Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-20isoimage-isohybrid: don't include cpio in cpio imageIoan-Adrian Ratiu
Because the find | cpio processes execute in parallel connected via the pipe, and the cpio outputs in the same dir find searches for source files, the cpio will be included in itself partially, depending on how fast the build machine creates the cpio file before cpio gobbles it up. This bloats the ISO image, though compression reduces the .iso file size, once the kernel decompresses the cpio image and boots it live, it uses up to double the RAM memory. Fix this by creating the initrd.cpio file directly inside cr_workdir. (From OE-Core rev: 7a7b29f5f1392f4f87af4f20cda99c66b4789fde) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29isoimage-isohybrid: Fix variable namesAlexandru Vasiu
initrd.cpio is created in initrd_dir, not in cr_workdir. Gzip will let initrd.cpio uncompressed if the path is not found. Also, grub_image variable doesn't exist, grub_src_image should be used instead. (From OE-Core rev: c88875b568a66297b1d3df380c590f20796c57f6) Signed-off-by: Alexandru Vasiu <alexandru.vasiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-29isoimage-isohybrid: Fix creating initrd.cpioAlexandru Vasiu
Only bsdcpio works with numbers for option -R to specify user:group, while GNU cpio doesn't. Debian use GNU cpio so without this change, you cannot create ISO images without installing bsdcpio. (From OE-Core rev: 7c6ba368006ca94ecc0daac7b1c5e0fbe4236daf) Signed-off-by: Alexandru Vasiu <alexandru.vasiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-29wic: isoimage-isohybrid: debloat image of redundant rootfsIoan-Adrian Ratiu
There's no reason to have that rootfs.img filesystem in the image: it's not used for anything because both the EFI and legacy boot paths use the /initrd which contains the same contents as the rootfs.img, only compressed. It was probably forgotten in there :) My iso went down from 224 to 94 mb. Tested using UEFI/legacy boots on CD-roms, usb dongle and qemu VM's. (From OE-Core rev: 4c784379524cb12807ef87a02ef1514ed45c1cc3) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-29wic: isoimage-isohybrid: fix UEFI spec breakageIoan-Adrian Ratiu
It's really good that OE supports multiple EFI_PROVIDERs and that commit 9a1709278de87 ("wic: isoimage-isohybrid: use grub-efi from deploy dir") makes re-use of the grub-efi built image, but we should still respect the standard otherwise the ISO will not boot, so install grub images as boot[x64|ia32].efi not ${PN}-boot[x64|ia32].efi. (From OE-Core rev: 1608129692d92c239b5fb9244b649a32b9009254) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17wic: isoimage-isohybrid: use grub-efi from deploy dirEd Bartosh
isoimage-isohybrid plugin tries to build grub-efi in its working directory if it can't find efi binary. Wic should avoid doing anything in working directories of other recipes. It should use artifacts from the image deployment directory instead. (From OE-Core rev: 9a1709278de877085a8d92f6361624e279a603bf) 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>
2017-07-17wic: isoimage-isohybrid: check result of glob()Ed Bartosh
isoimage-isohybrid plugin uses result of glob call to get path to initrd image. When glob returns empty list the plugin crashes with IndexError. Checking if result of glob call is not empty should fix the breakage. (From OE-Core rev: ad02f253f08a3da3fa5c86ae4f6ba7f94b070578) 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>
2017-07-17wic: isoimage: do not remove temp directoryEd Bartosh
Removed isodir subrdirectory instead of removing temporary working directory as working directory can contain copy of rootfs partition and shouldn't be removed by any plugin. (From OE-Core rev: fc12ce9d1b92cc0104cf456af1e3d5f146b9219d) 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>
2017-07-17wic: get rid of using wic-toolsEd Bartosh
At the moment, when building images with IMAGE_FSTYPES=wic one ends up depending on wic-tools and thus syslinux and grub-efi even when not using those at all. Ideally, building an image with wic should only build the tools and components really needed. The problem is that "wic-tools" is needed also for the manual invocations of wic, in which case everything that might be needed has to be built in advance. Replaced dependency on wic-tools with dependency to a much shorter set of tools that wic uses almost for any image: 'parted', 'gptfdisk', 'dosfstools' and 'mtools'. [YOCTO #11552] (From OE-Core rev: 33ca15b94dbe7204c556c4b5526edd529f6d85f4) 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>
2017-06-23wic: flatten directory structureEd Bartosh
Moved misc.py from wic/utils/ to wic/ Removed wic/utils directory (From OE-Core rev: df906f3caa0721756f5ed48fa657e62e05ae2aa3) 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>
2017-06-03isoimage-isohybrid: don't use TRANSLATED_TARGET_ARCHEd Bartosh
isoimage-isohybrid plugin fails with this error when trying to find initrd image: initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, target_arch, image_type))[0] IndexError: list index out of range as it uses TRANSLATED_TARGET_ARCH value as part of the image. This approach stopped to work due to changes in oe core code. initrd file name is made using MACHINE variable. wic can't get value of this variable as it's not included into bitbake -e output. Used basename of deploy dir as MACHINE value to fix the breakage. (From OE-Core rev: cfbb3cc1279ea88ca3e2867f8a409c5120aa1f05) (From OE-Core rev: e26fa1c34c33ffdc678f8073dade0126aff08b40) 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>
2017-03-04wic: move WicError to lib/wic/__init__.pyEd Bartosh
Removed unused exceptions from error.py Moved definition of WicError to lib/wic/__init__.py (From OE-Core rev: 15442d072bb6d93bd9b941726f93262503053da5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04wic: raise WicError in wic pluginsEd Bartosh
Replaced sys.exit with raising WicError in wic plugins. (From OE-Core rev: 92e8c81c941597eb2b4b61d5c28833e4826888f8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-04wic: use wic logger in wic source pluginsEd Bartosh
Replaced msger with wic logger in wic source plugins. (From OE-Core rev: 19a868e9ad12fb27a7f713685d12f3d310fd6961) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15wic: move disk operations to PartitionImage classEd Bartosh
Disk operations were spread over DirectPlugin, DiskImage and Image code making the code hard to understand. Renamed Image class to PartitionedImage. Removed DiskImage class. Moved disk operations to PartitionedImage. There was an implicit support for multiple disks: if different devices were specified in .wks file (e.g. --ondisk sda and --ondisk sdb), wic would theoretically generate multiple images. This is quite confusing option and the code supporting it was broken for a long time. The same effect (multiple output images) can be achieved in obvious and clear way - by using multiple .wks files. This functionality was removed. PartitionedImage works only with one image. This makes the code less complex and easier to maintain. (From OE-Core rev: 4dc9dbfc7fbc16d349a019e8973d50905cd28244) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05wic: isoimage-isohybrid: use wic-tools to get syslinux pathEd Bartosh
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>
2017-02-02wic: code cleanupEd Bartosh
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>
2017-02-02wic: move oe/misc.py one level upEd Bartosh
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>
2017-02-02wic: move 2 APIs to wic.engineEd Bartosh
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>
2017-01-31isoimage-isohybrid: renamed variable hdd_dirEd Bartosh
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>
2017-01-31isoimage-isohybrid: use TRANSLATED_TARGET_ARCH instead of MACHINE_ARCHEd Bartosh
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>
2017-01-31wic: Look for image artifacts in a common locationTom Zanussi
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>
2017-01-31wic: isoimage-isohybrid: stop using HDDDIREd Bartosh
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>
2017-01-31wic: use INITRD_LIVE in isoimage-isohybridEd Bartosh
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>
2017-01-23wic: fixed test_iso_image test caseEd Bartosh
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>
2017-01-16wic/isoimage-isohybrid: remove do_stage_partition()Ioan-Adrian Ratiu
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>
2016-06-03image-live, image-vm, wic: Remove fs size workaroundJussi Kukkonen
Since mtools has been patched to live with filesystems with sizes not divisible by sectors-per-track, we no longer need to try to set the size based on our guess of the sectors-per-track dosfstools is going to use. (From OE-Core rev: 334e32af88b310ff1ed950d127a6dedeb460f8d0) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29wic: isoimage-isohybrid: fix splash file pathsIoan-Adrian Ratiu
os.path.join discards the cr_workdir var contents if the path of the second arguments is absolute. (From OE-Core rev: dba099d77dcc66b239523a55f3ed26784f9a662a) 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>
2016-04-29wic: isoimage-isohybrid: add grubefi configfile supportIoan-Adrian Ratiu
The latest wic kickstart refactoring introduced a bootloader option "--configfile" which lets wks' specify a custom grub.cfg for use while booting. This is very useful for creating stuff like boot menus. This change lets isoimage-isohybrid use --configfile; if this option is not specified in a wks, it generates a default cfg as before. (From OE-Core rev: bf673a769514b13558ad9c785ae4da3a5adfd1e0) 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>
2016-04-03wic/isoimage-isohybrid.py: change cpio generated uid&gid to rootIoan-Adrian Ratiu
By default cpio preserves the uid&guid's of the original user which leads to host contamination and boot failures because commands like mount from initramfs expect to be run by root and the original host user might not even exist on the target. (From OE-Core rev: 28910ee2eacc15cf42b5e58bd43b3bd15c34eb97) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03wic/isoimage-isohybrid.py: use glob to find initramfs locationIoan-Adrian Ratiu
Some filenames can omit 'initramfs', or use other names. This makes detection more flexible by using only the image name, machine arch and image type in a glob wildcard. (From OE-Core rev: ca516f5907a661606c35e1ca5c2ece9fc79c77ea) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-07isoimage-isohybrid.py: fix cpio working directoryIoan-Adrian Ratiu
Take `pwd` to be <initial-dir>. The %s path is relative to it. The value of %s is "output_folder/build". The current code works as follows: Changing directory to %s and finding the sources (after cd'ing) to cpio with output redirection to %s/initrd.cpio triggers the following error "Error: exec_cmd: cd output_folder/build/INITRD && find . | cpio -o -H newc >output_folder/build/initrd.cpio returned '1' instead of 0" This happens because after the cd, `pwd` is <initial-dir>/%s and by the redirect we write the result to to <initial-dir>/%s/%s/initrd.cpio which obviously does not exist. Fix this by getting the sources with "find %s" instead of "cd && find ." (From OE-Core rev: 07fa4783566d22d46ce719a621eee5404932dbbe) 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>
2016-02-04wic: isoimage-isohybrid: check for syslinux-nativeMihaly Varga
.iso image creation fails if during the image creation syslinux is baked and syslinux-native is not. Added new check to verify if both syslinux and syslinux-native are baked and bake them if these are not installed. (From OE-Core rev: fd5749832960ad3b85697c2878490d6f008982a3) Signed-off-by: Mihaly Varga <mihaly.varga@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19wic: removed unused importsEd Bartosh
Removed imports of wic.kickstart from plugins as they're not used in the code. (From OE-Core rev: 33d8784470c506fabcf9627e754628cdea61dd07) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-18wic: get rid of set_size and set_source_file settersEd Bartosh
Used size and source_file attributes instead of using setters. It's more pythonic, clear an consistent. (From OE-Core rev: 7cf236047fa5d0d947fd214181c9a63ccb2509ac) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-18wic: get rid of get_rootfs and set_rootfsEd Bartosh
Got rid of get_rootfs and set_rootfs java-like getter and setter. Renamed rootfs to rootfs_dir to be consistent with the name of kickstart parameter --rootfs-dir. (From OE-Core rev: 51ec52a62ce49d1a1a83489379990f78cfe849f9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-18wic: get rid of get_timeout getterEd Bartosh
Used bootloader.timeout instead of kickstart.get_timeout getter. Accessing attributes instead of getting them with getters is more pythonic, shorter and readable. It also more consistent as most of partition and bootloader attributes are used this way. This change also takes care of appendLine bootloader attribute: it's renamed to bootloader.append attribute provided by new parser. (From OE-Core rev: 8088caeff5bf4ee9279b47a69c9f1e5537909601) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-03wic: fix short variable namesEd Bartosh
Made short variable names longer and more readable. Fixed pylint warnings "Invalid variable name" and "Invalid argument name". (From OE-Core rev: 872cb0d5d79b26f34e6b35d7be8870d245021be4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-24wic: Add plugin for hybrid iso imageMihaly Varga
This plugin creates a hybrid, legacy and EFI bootable ISO image. The generated image can be used on optical media as well as USB media. Legacy boot uses syslinux and EFI boot uses grub or gummiboot (not implemented yet) as bootloader. The plugin creates the directories required by bootloaders and populates them by creating and configuring the bootloader files. The plugin adds an image file to the iso which contains the directory tree of the rootfs folder specified by the --rootfs argument or by the IMAGE_ROOTFS bitbake variable. Using the isohybryd tool, the created .iso image is enhanced by a MBR for booting from disk storage devices, consequently the provided iso image could be copyed directly by dd comand onto USB drive or could be burned to an optical media by using a suitable image burner. The plugin depends on parted, e2fstools, syslinux, grub, cdrtools, dosfstools and mtools program. Some of the functions in this plugin were inspired from bootimg-efi.py and bootimg-pcbios.py plugins implemented by Tom Zanussi. (From OE-Core rev: 289c534b5d990e22e5547496f5f84cc9721ce3ee) Signed-off-by: Mihaly Varga <mihaly.varga@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>