diff -u cdrkit-1.1.1/debian/changelog cdrkit-1.1.1/debian/changelog
--- cdrkit-1.1.1/debian/changelog
+++ cdrkit-1.1.1/debian/changelog
@@ -1,3 +1,10 @@
+cdrkit (9:1.1.1-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Support setting the EFI platform ID on El Torito boot images
+
+ -- Steve Langasek <vorlon@debian.org>  Mon,  1 Jan 2007 04:34:42 -0800
+
 cdrkit (9:1.1.1-1) unstable; urgency=medium
 
   * New upstream version
only in patch2:
unchanged:
--- cdrkit-1.1.1.orig/genisoimage/eltorito.c
+++ cdrkit-1.1.1/genisoimage/eltorito.c
@@ -57,7 +57,7 @@
 void	insert_boot_cat(void);
 static	void	get_torito_desc(struct eltorito_boot_descriptor *boot_desc);
 static	void	fill_boot_desc(struct eltorito_defaultboot_entry *boot_desc_entry,
-										struct eltorito_boot_entry_info *boot_entry);
+				struct eltorito_boot_entry_info *boot_entry);
 void	get_boot_entry(void);
 void	new_boot_entry(void);
 static	int	tvd_write(FILE *outfile);
@@ -274,6 +274,7 @@
 	int			i;
 	int			offset;
 	struct eltorito_defaultboot_entry boot_desc_record;
+	struct eltorito_section_header boot_section_header;
 
 	memset(boot_desc, 0, sizeof (*boot_desc));
 	boot_desc->type[0] = 0;
@@ -308,7 +309,10 @@
 	 */
 	memset(&valid_desc, 0, sizeof (valid_desc));
 	valid_desc.headerid[0] = 1;
-	valid_desc.arch[0] = EL_TORITO_ARCH_x86;
+	if (first_boot_entry)
+		valid_desc.arch[0] = first_boot_entry->arch;
+	else
+		valid_desc.arch[0] = EL_TORITO_ARCH_x86;
 
 	/*
 	 * we'll shove start of publisher id into id field,
@@ -353,6 +357,21 @@
 			exit(1);
 #endif
 		}
+		if (current_boot_entry != first_boot_entry) {
+			memset(&boot_section_header, 0,
+			       sizeof(boot_section_header));
+			if (current_boot_entry->next)
+				boot_section_header.final[0] = EL_TORITO_NONFINAL_HEADER;
+			else
+				boot_section_header.final[0] = EL_TORITO_FINAL_HEADER;
+			boot_section_header.arch[0] = current_boot_entry->arch;
+			/* For now we only support selection by arch, so the
+			   entry count is always 1 per header */
+			set_721(boot_section_header.entries, 1);
+			memcpy(de2->table + offset, &boot_section_header,
+			       sizeof (boot_section_header));
+			offset += sizeof (boot_section_header);
+		}
 		fill_boot_desc(&boot_desc_record, current_boot_entry);
 		memcpy(de2->table + offset, &boot_desc_record,
 					sizeof (boot_desc_record));
only in patch2:
unchanged:
--- cdrkit-1.1.1.orig/genisoimage/iso9660.h
+++ cdrkit-1.1.1/genisoimage/iso9660.h
@@ -62,6 +62,7 @@
 #define	EL_TORITO_ARCH_x86	0
 #define	EL_TORITO_ARCH_PPC	1
 #define	EL_TORITO_ARCH_MAC	2
+#define	EL_TORITO_ARCH_EFI	0xEF
 
 #define	EL_TORITO_BOOTABLE	0x88
 #define	EL_TORITO_NOT_BOOTABLE	0
@@ -72,6 +73,9 @@
 #define	EL_TORITO_MEDIA_288FLOP	3
 #define	EL_TORITO_MEDIA_HD	4
 
+#define EL_TORITO_NONFINAL_HEADER	0x90
+#define EL_TORITO_FINAL_HEADER		0x91
+
 struct iso_primary_descriptor {
 	char type			[ISODCL(1,    1)]; /* 711 */
 	char id				[ISODCL(2,    6)];
@@ -181,6 +185,14 @@
 	char pad2			[ISODCL(13,  32)];
 };
 
+/* Section header for subsequent El Torito boot images */
+struct eltorito_section_header {
+	char final			[ISODCL(1,    1)];
+	char arch			[ISODCL(2,    2)];
+	char entries			[ISODCL(3,    4)];
+	char section_id			[ISODCL(5,   32)];
+};
+
 /*
  * XXX JS: The next two structures have odd lengths!
  * Some compilers (e.g. on Sun3/mc68020) padd the structures to even length.
only in patch2:
unchanged:
--- cdrkit-1.1.1.orig/genisoimage/genisoimage.h
+++ cdrkit-1.1.1/genisoimage/genisoimage.h
@@ -291,6 +291,7 @@
 struct eltorito_boot_entry_info {
 	struct eltorito_boot_entry_info *next;
 	char		*boot_image;
+	char		arch;
 	int		not_bootable;
 	int		no_emul_boot;
 	int		hard_disk_boot;
only in patch2:
unchanged:
--- cdrkit-1.1.1.orig/genisoimage/genisoimage.c
+++ cdrkit-1.1.1/genisoimage/genisoimage.c
@@ -425,6 +425,8 @@
 
 #define	OPTION_BOOTMIPSEL   		1230
 
+#define	OPTION_ELTORITO_EFI		1240
+
 #ifdef UDF
 #define	OPTION_UDF			1500
 #endif
@@ -671,6 +673,9 @@
 	{{"mipsel-boot", required_argument, NULL, OPTION_BOOTMIPSEL},
 	'\0', "FILE", "Set mipsel boot image name (relative to image root)", ONE_DASH},
 
+	{{"eltorito-efi", no_argument, NULL, OPTION_ELTORITO_EFI},
+	'\0', NULL, "Mark El Torito boot image for use with EFI (Itanium)", ONE_DASH},
+
 #ifdef JIGDO_TEMPLATE
 	{{"jigdo-jigdo", required_argument, NULL, OPTION_JTJ_OUTPUT},
 	'\0', "FILE", "Produce a jigdo .jigdo file as well as the .iso", ONE_DASH },
@@ -2228,6 +2233,11 @@
 			get_boot_entry();
 			current_boot_entry->boot_info_table = 1;
 			break;
+		case OPTION_ELTORITO_EFI:
+			use_eltorito++;
+			get_boot_entry();
+			current_boot_entry->arch = EL_TORITO_ARCH_EFI;
+			break;
 #ifdef APPLE_HYB
 		case OPTION_HFS_TYPE:
 			deftype = optarg;
