Commit Graph

17 Commits

Author SHA1 Message Date
Jonathan Liu d299444adc boot-directdisk: avoid loop in MBR disk signature generation
Instead of looping until the generated signature is non-zero, just
return 'ffffffff' if it's zero. This avoids an infinite loop if the
generated signature is always zero.

(From OE-Core rev: 34c74ba45c04efc2dd998545bf7a31d7b06a0ee0)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04 18:26:50 +01:00
Jonathan Liu df18dc084e boot-directdisk: ensure generated MBR disk signature is non-zero
A zero MBR disk signature is generally seen as no signature and
another partitioning program might install a new signature.

(From OE-Core rev: b6cafb1fcd6c168f8f4a4d2d5c74f3b425f156f3)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-30 22:11:58 +01:00
Jason Wessel 0ac89346de boot-directdisk.bbclass: Fix media generation problems with vmdk
The various populate methods need to accept a path as an argument vs
using hard expanded variables.  In the case of the boot-directdisk
class it uses a different path for HDDDIR but it gets eclipsed by the
the class definition at the point in time ${HDDDIR} gets expanded.

The logical fix is to pass the arguments to the functions as opposed
to using globally expanded variables from the class definitions.

This patch changes 3 things:
1) syslinux_hddimg_populate takes an argument for the destination
2) syslinux_iso_populate takes an argument for the destination
3) populate is changed to boot_direct_populate because there
   was a conflict with it overriding the populate in bootimg.bbclass

[YOCTO #3994]

(From OE-Core rev: 63d164b755b984021f7e3cdba7280918ded6e821)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-30 22:11:56 +01:00
João Henrique Ferreira de Freitas 707da95b4a boot-directdisk: Allow for EFI-only boot direct disk images
Condition building PCBIOS legacy images on MACHINE_FEATURES containing "pcbios"
    or not containing "efi". This ensures existing BSPs will continue to get the
    old PCBIOS legacy-only images. New BSPs can add "efi", "pcbios", or both. The
    images created likewise support one or the other or both.

(From OE-Core rev: c58aceee7dc243467dd87f07ccc61859f8d945e6)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:29:42 +01:00
Jonathan Liu 1d5d93101e boot-directdisk: use awk instead of echo -ne for dash compatibility
The echo command is a dash shell built-in and does not support the
-n and -e options so use awk instead.

This fixes the partition table being corrupted when writing the MBR
disk signature into the image.

[YOCTO #4859]

(From OE-Core rev: 1928f46e8e9f281e3e64f916048cc9314e125150)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-24 11:35:36 +01:00
Jonathan Liu b52d2bb46e boot-directdisk: allow specifying custom MBR disk signature
This introduces a DISK_SIGNATURE variable that allows controlling the
32-bit MBR disk signature. By default it is set to an automatically
generated disk signature but it may by overridden in the image recipe
by setting DISK_SIGNATURE to a 8 digit hex string.

This DISK_SIGNATURE variable can also be used in the image recipe to
specify the root by UUID using:
SYSLINUX_ROOT = "root=PARTUUID=${DISK_SIGNATURE}-02"

Specifying the root by UUID allows the kernel to locate the root
filesystem even if the device name changes (e.g. /dev/hda2, /dev/hdb2 or
/dev/sdb2 instead of /dev/sda2) due to differences in hardware
configuration.

(From OE-Core rev: 4382a419b4c90312d22aa55ff535b45bcf704716)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Acked-by: Darren hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-13 18:23:33 +01:00
Jonathan Liu f5b103ff47 boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflicts
These variables should not be shared with other image classes.
The bootimg class also has an HDDDIR variable that could be overwritten
if executing concurrently in the same image recipe.

(From OE-Core rev: 94c83fa26af104d28aa4e6951bcb109bb0c82265)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:46 +03:00
Jonathan Liu badd718253 syslinux: Update to 4.06
Patches are now part of upstream or no longer needed.
Added new util-linux dependency for isohybrid.
Paths updated to reflect directory structure changes.
Add CFLAGS and LDFLAGS overrides.

[YOCTO #4438]

(From OE-Core rev: 17e7ac0c5e75245d17a90e5cc49ade3d18a168ba)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16 00:09:46 +03:00
Robert Yang 843e422879 boot-directdisk/bootimg/image-vmdk: remove more nostamps for image generation
We have removed the nostamps for do_rootfs and do_build, so it seems
reasonable to remove the stamps for do_bootimg, do_bootdirectdisk and
do_vmdkimg.

The current problem is that the do_vmdkimg always re-run, but the
do_rootfs may not, so the code like below in the do_rootfs function
doesn't re-run and cause problems (the symlink exists when the
do_vmdkimg creates the symlink again):

    if d.getVar('IMAGE_LINK_NAME', True):
        cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"

(From OE-Core rev: 45c7dab5d51065c7b24ab5292f8e9d3104eb0626)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 10:25:29 +01:00
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Richard Purdie 99203edda6 boot-directdisk: Fix kernel location after STAGING_KERNEL_DIR change
This catches up with the STAGING_KERNEL_DIR location change
and uses the correct variable to future proof this issue.

[YOCTO #2783]

(From OE-Core rev: 28715eff6dff3415b1d7b0be8cbb465c417e307f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-18 22:50:14 +01:00
Saul Wold 394445fdf9 boot-directdisk: remove the default setting of SYSLINUXCFG and SYSLINUXMENU
These two should get setup in {S} and installed into {HDDDIR}, by
having them defined with {HDDDIR} they try to get created when the
directory does not exist yet.

(From OE-Core rev: 215ea5ea8b97270a3602b3f20469226a56442552)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-11 12:08:13 +01:00
Saul Wold 337fbed734 boot-directdisk: Fix Block Calcuation
This also changes the timeout to be settable

The block calcuation was not correctly rounding, see comment

Thanks to Darren Hart for fixing this.

Cc: Darren Hart <dvhart@linux.intel.com>
(From OE-Core rev: 53ae1737611e10e7fef815e8fde9e22165aa1047)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-27 13:26:36 +01:00
Saul Wold 136d9cd07d boot-directdisk: Use correct SYSLINUX_TIMEOUT and SYSLINUX_ROOT instead of APPEND
(From OE-Core rev: 1284230ad554f8607cb02b054fdd74017ae7c861)

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
Tom Zanussi a90914c60a boot-directdisk: fix bzImage source location
Fixes yocto [BUGID #876]

boot-directdisk.class looks in the wrong location for the bzImage to
install.  Make it look in the right place.

(From OE-Core rev: 173d04ea828e7f790ede40929c8ffd7340b4c077)

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 12:26:48 +01:00
Richard Purdie f89cd3158a bootimg/boot-directdisk.bbclass: Update afer syslinux changes, fix mbr.bin location and fix dependencies
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 14:09:06 +00:00
Richard Purdie 027c167878 boot-directdisk.bbclass: Add direct disk image creation class
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 11:44:25 +00:00