Message ID | 1433802108-14351-14-git-send-email-thomas.petazzoni@free-electrons.com |
---|---|
State | Accepted |
Headers | show |
Thomas, All, On 2015-06-09 00:21 +0200, Thomas Petazzoni spake thusly: > This commit adds a new option, which allows, when isolinux is used as > the bootloader, to generate an "hybrid" ISO image. Such images can > either be booted from CD-ROM or from USB keys. It simply uses the > isohybrid tool provided by syslinux. > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Regards, Yann E. MORIN. > --- > fs/iso9660/Config.in | 9 +++++++++ > fs/iso9660/iso9660.mk | 8 ++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/fs/iso9660/Config.in b/fs/iso9660/Config.in > index 97925b9..6f057ea 100644 > --- a/fs/iso9660/Config.in > +++ b/fs/iso9660/Config.in > @@ -58,6 +58,15 @@ config BR2_TARGET_ROOTFS_ISO9660_INITRD > contain a kernel image, an initrd image (unless an initramfs > linked into the kernel is used) and the bootloader. > > +config BR2_TARGET_ROOTFS_ISO9660_HYBRID > + bool "Build hybrid image" > + depends on BR2_TARGET_ROOTFS_ISO9660_ISOLINUX > + help > + Enable this option to build an hybrid image, i.e an image > + which can either be booted from a CD-ROM or from a device > + which BIOS considers a hard disk or ZIP disk, e.g. a USB key > + or similar. > + > endif > > comment "iso image needs a Linux kernel and one of grub or isolinux to be built" > diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk > index 588e07b..4f4abea 100644 > --- a/fs/iso9660/iso9660.mk > +++ b/fs/iso9660/iso9660.mk > @@ -140,4 +140,12 @@ define ROOTFS_ISO9660_CMD > -o $@ $(ROOTFS_ISO9660_TARGET_DIR) > endef > > +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y) > +define ROOTFS_ISO9660_GEN_HYBRID > + $(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@ > +endef > + > +ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID > +endif > + > $(eval $(call ROOTFS_TARGET,iso9660)) > -- > 2.1.0 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
Thomas, All, On 2015-06-09 00:21 +0200, Thomas Petazzoni spake thusly: > This commit adds a new option, which allows, when isolinux is used as > the bootloader, to generate an "hybrid" ISO image. Such images can > either be booted from CD-ROM or from USB keys. It simply uses the > isohybrid tool provided by syslinux. > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Regards, Yann E. MORIN. > --- > fs/iso9660/Config.in | 9 +++++++++ > fs/iso9660/iso9660.mk | 8 ++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/fs/iso9660/Config.in b/fs/iso9660/Config.in > index 97925b9..6f057ea 100644 > --- a/fs/iso9660/Config.in > +++ b/fs/iso9660/Config.in > @@ -58,6 +58,15 @@ config BR2_TARGET_ROOTFS_ISO9660_INITRD > contain a kernel image, an initrd image (unless an initramfs > linked into the kernel is used) and the bootloader. > > +config BR2_TARGET_ROOTFS_ISO9660_HYBRID > + bool "Build hybrid image" > + depends on BR2_TARGET_ROOTFS_ISO9660_ISOLINUX > + help > + Enable this option to build an hybrid image, i.e an image > + which can either be booted from a CD-ROM or from a device > + which BIOS considers a hard disk or ZIP disk, e.g. a USB key > + or similar. > + > endif > > comment "iso image needs a Linux kernel and one of grub or isolinux to be built" > diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk > index 588e07b..4f4abea 100644 > --- a/fs/iso9660/iso9660.mk > +++ b/fs/iso9660/iso9660.mk > @@ -140,4 +140,12 @@ define ROOTFS_ISO9660_CMD > -o $@ $(ROOTFS_ISO9660_TARGET_DIR) > endef > > +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y) > +define ROOTFS_ISO9660_GEN_HYBRID > + $(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@ > +endef > + > +ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID > +endif > + > $(eval $(call ROOTFS_TARGET,iso9660)) > -- > 2.1.0 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
Dear Thomas, Sorry for the late answer. 2015-06-09 0:21 GMT+02:00 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y) > +define ROOTFS_ISO9660_GEN_HYBRID > + $(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@ > +endef > + > +ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID My understanding is that _POST_GEN_HOOKS has been skipped in the v2 patch series, so this does not work. Is that correct? Regards, Noé Rubinstein.
Noé, On Mon, 27 Jul 2015 11:24:16 +0200, Noé RUBINSTEIN wrote: > 2015-06-09 0:21 GMT+02:00 Thomas Petazzoni > <thomas.petazzoni@free-electrons.com>: > > +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y) > > +define ROOTFS_ISO9660_GEN_HYBRID > > + $(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@ > > +endef > > + > > +ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID > > My understanding is that _POST_GEN_HOOKS has been skipped in the v2 > patch series, so this does not work. Is that correct? Oops, you are absolutely right. I guess we simply need to do something like: ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y) define ROOTFS_ISO9660_GEN_HYBRID $(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@ endef endif define ROOTFS_ISO9660_CMD $(HOST_DIR)/usr/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -o $@ $(ROOTFS_ISO9660_TARGET_DIR) $(ROOTFS_ISO9660_GEN_HYBRID) endef Can you try this, and if it works, send the corresponding patch? Thanks a lot! Thomas
diff --git a/fs/iso9660/Config.in b/fs/iso9660/Config.in index 97925b9..6f057ea 100644 --- a/fs/iso9660/Config.in +++ b/fs/iso9660/Config.in @@ -58,6 +58,15 @@ config BR2_TARGET_ROOTFS_ISO9660_INITRD contain a kernel image, an initrd image (unless an initramfs linked into the kernel is used) and the bootloader. +config BR2_TARGET_ROOTFS_ISO9660_HYBRID + bool "Build hybrid image" + depends on BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + help + Enable this option to build an hybrid image, i.e an image + which can either be booted from a CD-ROM or from a device + which BIOS considers a hard disk or ZIP disk, e.g. a USB key + or similar. + endif comment "iso image needs a Linux kernel and one of grub or isolinux to be built" diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk index 588e07b..4f4abea 100644 --- a/fs/iso9660/iso9660.mk +++ b/fs/iso9660/iso9660.mk @@ -140,4 +140,12 @@ define ROOTFS_ISO9660_CMD -o $@ $(ROOTFS_ISO9660_TARGET_DIR) endef +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y) +define ROOTFS_ISO9660_GEN_HYBRID + $(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@ +endef + +ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID +endif + $(eval $(call ROOTFS_TARGET,iso9660))
This commit adds a new option, which allows, when isolinux is used as the bootloader, to generate an "hybrid" ISO image. Such images can either be booted from CD-ROM or from USB keys. It simply uses the isohybrid tool provided by syslinux. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- fs/iso9660/Config.in | 9 +++++++++ fs/iso9660/iso9660.mk | 8 ++++++++ 2 files changed, 17 insertions(+)