Patchwork bootimg.bbclass: Tweak iso images to become hybrid images

login
register
mail settings
Submitter Richard Purdie
Date April 19, 2012, 10:02 p.m.
Message ID <1334872962.3028.2.camel@ted>
Download mbox | patch
Permalink /patch/26161/
State Accepted
Commit 9a946554e4843841c2ec3cbb2575e80d0ccdc29f
Headers show

Comments

Richard Purdie - April 19, 2012, 10:02 p.m.
From: Damien Lespiau <damien.lespiau@intel.com>

This allows iso images to be written to usb keys and booted on systems which
have a BIOS which support this. There is no real down side to tweaking the iso
images in this way.

[YOCTO #1763 partial]

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
Darren Hart - April 23, 2012, 3:37 p.m.
On 04/19/2012 03:02 PM, Richard Purdie wrote:
> From: Damien Lespiau <damien.lespiau@intel.com>
> 
> This allows iso images to be written to usb keys and booted on systems which
> have a BIOS which support this. There is no real down side to tweaking the iso
> images in this way.

I like the idea, but there does appear to be one potential downside.
From the syslinux isolinux.txt documentation:

"The ISO 9660 filesystem is encapsulated in a partition (which starts
at offset zero, which may confuse some systems.)"

How many different systems and firmware has this been tested on?

I think it is a worthwhile patch, but we should be aware of the above in
case a regression is reported. In such an event, it seems a
NO_ISO_HYBRID flag could be set by the machine.conf to revert to the
older behavior.

--
Darren

> 
> [YOCTO #1763 partial]
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
> index f4981d8..370b378 100644
> --- a/meta/classes/bootimg.bbclass
> +++ b/meta/classes/bootimg.bbclass
> @@ -103,6 +103,8 @@ build_iso() {
>  			-r ${ISODIR}
>  	fi
>  
> +	isohybrid ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso
> +
>  	cd ${DEPLOY_DIR_IMAGE}
>  	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso
>  	ln -s ${IMAGE_NAME}.iso ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso
> 
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Otavio Salvador - April 23, 2012, 5:14 p.m.
On Mon, Apr 23, 2012 at 12:37, Darren Hart <dvhart@linux.intel.com> wrote:
> How many different systems and firmware has this been tested on?
>
> I think it is a worthwhile patch, but we should be aware of the above in
> case a regression is reported. In such an event, it seems a
> NO_ISO_HYBRID flag could be set by the machine.conf to revert to the
> older behavior.

and please, do it in 1.3 only.
Richard Purdie - April 24, 2012, 8:47 a.m.
On Mon, 2012-04-23 at 08:37 -0700, Darren Hart wrote:
> 
> On 04/19/2012 03:02 PM, Richard Purdie wrote:
> > From: Damien Lespiau <damien.lespiau@intel.com>
> > 
> > This allows iso images to be written to usb keys and booted on systems which
> > have a BIOS which support this. There is no real down side to tweaking the iso
> > images in this way.
> 
> I like the idea, but there does appear to be one potential downside.
> From the syslinux isolinux.txt documentation:
> 
> "The ISO 9660 filesystem is encapsulated in a partition (which starts
> at offset zero, which may confuse some systems.)"
> 
> How many different systems and firmware has this been tested on?
> 
> I think it is a worthwhile patch, but we should be aware of the above in
> case a regression is reported. In such an event, it seems a
> NO_ISO_HYBRID flag could be set by the machine.conf to revert to the
> older behavior.

Agreed, I think we should try this and see if there are any problems
reported. I tested a few machines here and it seemed to work on most of
them but this was with a USB key, not a CD image. This is probably our
more common use case though.

Cheers,

Richard

Patch

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index f4981d8..370b378 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -103,6 +103,8 @@  build_iso() {
 			-r ${ISODIR}
 	fi
 
+	isohybrid ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso
+
 	cd ${DEPLOY_DIR_IMAGE}
 	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso
 	ln -s ${IMAGE_NAME}.iso ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso