fs/iso9660: add hybrid image support
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 8 Jun 2015 22:21:46 +0000 (00:21 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 14 Jun 2015 21:24:52 +0000 (23:24 +0200)
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>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
fs/iso9660/Config.in
fs/iso9660/iso9660.mk

index 97925b9af6128aa33b4a92631157116ea2c163c3..6f057eaba804c9216a3f8ef6ed1ff3828ccab2ff 100644 (file)
@@ -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"
index 588e07bf8325aec94a18bac074940dc0a8d62921..4f4abea9ff264d212a0f206e9343f749ecf962e2 100644 (file)
@@ -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))