Commit Graph

27 Commits

Author SHA1 Message Date
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Ed Bartosh 9cc4492732 image: Deploy images to IMGDEPLOYDIR
Changed deployment directory from DEPLOY_DIR_IMAGE to
IMGDEPLOYDIR to make sstate machinery to do final deployment and
generate manifest.

Renamed variable deploy_dir to deploy_dir_image in selftest code
to avoid confusion with DEPLOYDIR variable.

Updated the code of rootfs.py:Rootfs class to use IMGDEPLOYDIR variable
as it's now used as a new deployment destination.

(From OE-Core rev: 6d969bacc718e21a5246d4da9bf9639dcae29b02)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-04 00:07:28 +01:00
Jussi Kukkonen 469e56b1a7 image-live, image-vm, wic: Remove fs size workaround
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-06-03 13:13:30 +01:00
Christopher Larson 199b348d1d image-live.bbclass: make the INITRD optional
This aligns with image-vm, and makes sense for wic bootimg-efi images, which
don't actually want any of the live installer bits.

(From OE-Core rev: 3d985512acdf1d7821c410d196fe372221555524)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:33:39 +01:00
Robert Yang 5e360ca135 image-live.bbclass: fix iso + efi only
When the user only builds iso + efi only, the syslinux-native which
provides isohybrid is required to build iso, so add syslinux-native to
DEPENDS.

(From OE-Core rev: dd1db8a578979a16d993a73b6f8a5720f2849932)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09 23:00:44 +01:00
Robert Yang 4d1df2cfe8 image-live.bbclass/image-vm.bbclass: remove duplicated code
Move the common code to live_vm_common.bbclass and remove duplicated ones.

(From OE-Core rev: 4a70cc59a0350f06d4cc48c12c3053a39191ba07)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:37 +01:00
Robert Yang d6d75260fa bootimg.bbclass: merge it into image-live.bbclass
They are doing the same things: create live images, merge them into one
bbclass makes it easy to understand.

(From OE-Core rev: bfd4d95210b3f841aa2e7c5a06ac89667523438d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31 23:01:37 +01:00
Robert Yang e0bc781ce0 bootimg.bbclass: only inherit syslinux when pcbios
syslinux.bbclass should not be seen when use efi.

(From OE-Core rev: f994eef0aeae861857756d3cc05c49cca17bd12b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:16 +00:00
Robert Yang 4ebaeb281b bootimg.bbclass: fix settings for grub-efi.bbclass
Fixed:
- Found potential conflicted var LABELS ...
  Set LABELS to "boot install" would build out broken images when build
  vm + live together, use set_live_vm_vars() to fix the problem.

- Use ROOT and LABEL in boot-directdisk.bbclass and image-foo.bbclass,
  they are not only used by syslinux.bbclass, but also grub-efi.bbclass,
  add "SYSLINUX_" prefix would mislead users.

(From OE-Core rev: d7d1e0193c94abb1cd2daf1c298c8c1788f3616d)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-25 10:29:16 +00:00
Robert Yang bb1c719250 syslinux.bbclass: make vm and live can be built together
* The vm image(hdddirect, vmdk, qcow2, vdi) and live image (hddimg, iso)
  couldn't be built together because the following vars settings are
  conflicted:
  - SYSLINUX_ROOT (/dev/sda2 vs /dev/ram0)
  - LABELS (boot vs boot install)
  - INITRD (None vs live install)
  - SYSLINUX_CFG (see above)
  Introduce new vars (SYSLINUX_ROOT_VM/_LIVE, the samilar to others) to
  make them can work together, now we can build all of them together:

  IMAGE_FSTYPES += "live iso hddimg hdddirect vmdk qcow2 vdi"

* Use SYSLINUX_CFG rather than SYSLINUXCFG to keep align with others
  SYSLINUX vars.

* The SYSLINUX_TIMEOUT had been set, but it didn't work since
  AUTO_SYSLINUXMENU wasn't set, this would cause confusions, so also set
  AUTO_SYSLINUXMENU.

* Move SYSLINUX_PROMPT and SYSLINUX_TIMEOUT to syslinux.bbclass rather
  than in separate classes since they are the same.

* Set SYSLINUX_TIMEOUT to 50 to have a unique timeout for syslinux.

[YOCTO #9161]

(From OE-Core rev: e38c94d6bf83ed3ca7f046d9503e81b927487bf2)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-02 23:08:51 +00:00
Robert Yang a87574cd7e image-live/boot-directdisk.bbclass: remove AUTO_SYSLINUXCFG
No one uses it.

(From OE-Core rev: d2eba0a5b67936983ad85766349f7afa4bdb70e8)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28 11:33:02 +00:00
Robert Yang 2d293bd8b3 image.bbclass: fix circular dependency when IMAGE_FSTYPES append hddimg
Fixed:
IMAGE_FSTYPES_append = " hddimg"

$ bitbake -g core-image-minimal-initramfs
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing RunQueue
ERROR: Task /path/to/core-image-minimal-initramfs.bb (do_bootimg) has circular dependency on /path/to/core-image-minimal-initramfs.bb (do_image_complete)
ERROR: Command execution failed: Exited with 1

This is because IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}", and if
IMAGE_FSTYPES append hddimg, then core-image-minimal-initramfs.bb would
be circular dependency:
do_bootimg -> do_image_complete -> do_bootimg.

Now we check and error out.

(From OE-Core rev: 9b48bfbc2f60bdaa792a98485db68699e0635cbe)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-21 09:32:41 +00:00
Richard Purdie ef211a5ca1 bootimg/image-vm/image-live: Improve image dependencies
Now that image generation consists of separate tasks, we can improve
the dependencies in these classes. We can also incorporate the tasks
within do_image_complete instead of do_build so we have a specific task
for when the deploy directory is populated with images.

This fixes various expectations about do_image_completed and the way
I'd tried to use it to fix some sanity test problems.

(From OE-Core rev: 9543c4a9ce0ac7d9ced66fa14e48a1aa7401011e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19 17:24:47 +00:00
Richard Purdie b567235c0c image/image-live: Add back IMAGE_TYPES_MASKED support
IMAGE_TYPES_MASKED support was accidentally removed. The original
idea behind it was to remove some of the hardcoding in the core
image code, so do that for image-live and ensure the dependency
and masked variables correctly reflect the needs of the class.
This means we can remove all the hardcoded special cases since
image-vm already has the needed markup.

(From OE-Core rev: 9a2d4a3b8d7bb1cf7f1fb7fe47d5c002d9941c89)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-15 11:59:42 +00:00
Richard Purdie 3341f3fbee classes: Fix do_rootfs references
After the separation of do_rootfs, some rootfs references need changing
to image_complete.

(From OE-Core rev: 59a5f596ca29b1eb8283706e3c60fbb39f9c2c23)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-11 23:26:29 +00:00
Ming Liu c851096d97 image-live.bbclass: uses IMAGE_LINK_NAME
Uses ${IMAGE_LINK_NAME} instead of ${IMAGE_BASENAME}-${MACHINE}.

(From OE-Core rev: 5f9feffe4cc4c1c084ab266382460e0b8f37e023)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-28 09:25:19 +00:00
Chris Hallinan 3b5d6ffd77 image-live: make SYSLINUX_ROOT changable in image recipes
(From OE-Core rev: 33c3a74b0266c53773d7ca3983f9ff50c00b9000)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-19 17:57:59 +01:00
Juro Bystricky 407d156245 IMAGES_FSTYPES: default to EXT4
The following IMAGES_FSTYPES defaulted to ext3:
"vmdk", "vdi", "qcow2", "live", "iso", "hddimg"

This patch changes the default for those IMAGES_FSTYPES to
ext4 in order to bring the images more in line with other BSPs.

Besides improvements in performance and reliability ext4 provides
additional functionality as well (option to turn off the journaling,
dynamic resizing of VDI volumes etc.).

(From OE-Core rev: 2b56d671d2f0ef22786c97e29e1215eb80c94490)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-16 22:40:51 +01:00
Ed Bartosh ff8ec3db57 image-live: Set syslinux timeout to 5s
Increased syslinux timeout to 5s as default 1s timeout
is not enough to notice syslinux prompt on some devices.

(From OE-Core rev: 165e153f81c5cbd9b7f2fe9a35405617cd94406d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:22 +01:00
Robert Yang e517b08242 image-vmdk.bbclass: use sda rather than hda
The modern kernels may not support IDE (CONFIG_IDE=y), but it should
support SCSI in most of the cases. The boot-directdisk.bbclass uses
sda, too.

Remove an extra space from image-live.bbclass and image-vmdk.bbclass to
not confuse the user.

(From OE-Core rev: 842a797460cd07b779ab588a4ece7e5d4d97417b)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-02 09:26:13 +01:00
Laurentiu Palcu f866b2e4b7 image*.bbclass, bootimg.bbclass: add image type dependencies
The following dependencies were manually added in the image creation
code. However, in order to have an image dependency mechanism in place,
use a new variable, IMAGE_TYPEDEP, to declare that an image type depends
on another being already created.

The following dependencies are added by this commit:

elf -> cpio.gz
live -> ext3
vmdk -> ext3
iso -> ext3
hddimg -> ext3

This commit adds also another new variable: IMAGE_TYPES_MASKED. Currently,
masking out certain types from IMAGE_FSTYPES was hardcoded in the image
creation code.

[YOCTO #5830]

(From OE-Core rev: 5e2796aa28e02ae3a076c6593c6533753720b13d)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-20 14:28:10 +00:00
Koen Kooi e2143b3739 image classes: use PN for depends, not IMAGE_BASE_NAME
Some images override IMAGE_BASE_NAME in the recipe causing targets using image-{live,vmdk} to fail.

(From OE-Core rev: 7e000fef0bf917f27dcad66dd90fae6c155c4d1d)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-24 15:12:28 +00:00
Saul Wold 60597ab063 image-live: Allow LABELS to be modified
This is to allow other image types to set the syslinux labels

(From OE-Core rev: 825e5a552bbaa215c55da4425e78df3c2f1cddaf)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-01 15:51:38 +00:00
Saul Wold 5d04c6e173 image-live: fix SYSLINUX_TIME and add SYSLINUX_ROOT instead of APPEND
(From OE-Core rev: e03d5cbdfc39a835576b16a0beeea6858e983f56)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-23 23:59:39 +00:00
Otavio Salvador cd898bfd96 image-live.bbclass: allow override of initrd image
(From OE-Core rev: 989238c366499aa3420c5594a7e256e50c78cc4b)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-14 13:18:15 +01:00
Otavio Salvador 9d1502bccd image-live.bbclass: allow images to override ROOTFS and INITRD
(From OE-Core rev: e8011abfab79220102e4843d8a91655162140090)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-04 23:11:11 +01:00
Saul Wold ba8a726b7d classes/image*: Revamp creation of live images
This creates a live image as an IMAGE_FSTYPES, thus removing the
need to have additional -live.bb recipes.  To create a live image
one just needs to add live to the IMAGE_FSTYPES list

(From OE-Core rev: b3ff63796cd6629975ff0a726ba18cc168e0a2b2)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 12:02:46 +01:00