From 00f9fdf27e3407940e1e1130fc9a2dbd191c498a Mon Sep 17 00:00:00 2001
From: Adam Borowski <kilobyte@angband.pl>
Date: Mon, 22 Jun 2015 11:54:10 +0200
Subject: [PATCH] Add x32 support.

---
 build/config/x32.cfg                       | 25 ++++++++++++++++++
 build/config/x32/cdrom-xen.cfg             | 14 ++++++++++
 build/config/x32/cdrom.cfg                 |  7 +++++
 build/config/x32/cdrom/el-torito.cfg       |  7 +++++
 build/config/x32/cdrom/gtk.cfg             | 17 ++++++++++++
 build/config/x32/cdrom/isolinux.cfg        | 14 ++++++++++
 build/config/x32/hd-media.cfg              | 22 ++++++++++++++++
 build/config/x32/hd-media/gtk.cfg          | 16 ++++++++++++
 build/config/x32/monolithic.cfg            |  9 +++++++
 build/config/x32/netboot-gtk.cfg           | 23 ++++++++++++++++
 build/config/x32/netboot-xen.cfg           | 16 ++++++++++++
 build/config/x32/netboot.cfg               | 12 +++++++++
 build/config/x86.cfg                       |  2 +-
 build/pkg-lists/cdrom/isolinux/gtk/x32.cfg |  8 ++++++
 build/pkg-lists/cdrom/isolinux/x32.cfg     | 12 +++++++++
 build/pkg-lists/cdrom/x32.cfg              | 25 ++++++++++++++++++
 build/pkg-lists/hd-media/gtk/x32.cfg       | 10 +++++++
 build/pkg-lists/hd-media/x32.cfg           | 32 +++++++++++++++++++++++
 build/pkg-lists/netboot/gtk/x32.cfg        | 10 +++++++
 build/pkg-lists/netboot/x32.cfg            | 42 ++++++++++++++++++++++++++++++
 debian/control                             | 30 ++++++++++-----------
 21 files changed, 337 insertions(+), 16 deletions(-)
 create mode 100644 build/config/x32.cfg
 create mode 100644 build/config/x32/cdrom-xen.cfg
 create mode 100644 build/config/x32/cdrom.cfg
 create mode 100644 build/config/x32/cdrom/el-torito.cfg
 create mode 100644 build/config/x32/cdrom/gtk.cfg
 create mode 100644 build/config/x32/cdrom/isolinux.cfg
 create mode 100644 build/config/x32/hd-media.cfg
 create mode 100644 build/config/x32/hd-media/gtk.cfg
 create mode 100644 build/config/x32/monolithic.cfg
 create mode 100644 build/config/x32/netboot-gtk.cfg
 create mode 100644 build/config/x32/netboot-xen.cfg
 create mode 100644 build/config/x32/netboot.cfg
 create mode 100644 build/pkg-lists/cdrom/isolinux/gtk/x32.cfg
 create mode 100644 build/pkg-lists/cdrom/isolinux/x32.cfg
 create mode 100644 build/pkg-lists/cdrom/x32.cfg
 create mode 100644 build/pkg-lists/hd-media/gtk/x32.cfg
 create mode 100644 build/pkg-lists/hd-media/x32.cfg
 create mode 100644 build/pkg-lists/netboot/gtk/x32.cfg
 create mode 100644 build/pkg-lists/netboot/x32.cfg

diff --git a/build/config/x32.cfg b/build/config/x32.cfg
new file mode 100644
index 0000000..62df865
--- /dev/null
+++ b/build/config/x32.cfg
@@ -0,0 +1,25 @@
+MEDIUM_SUPPORTED = cdrom cdrom-xen netboot netboot-gtk netboot-xen hd-media
+MEDIUM_SUPPORTED_EXTRA = monolithic
+
+# The version of the kernel to use.
+KERNELVERSION = $(LINUX_KERNEL_ABI)-amd64
+KERNELMAJOR = 2.6
+KERNELNAME = vmlinuz
+
+# Not used for amd64.
+#UPX=upx-ucl-beta
+
+# Default syslinux configuration
+SYSLINUX_CFG=standard
+
+# The default video modes
+# These should be kept in sync with win32-loader's preseed line as
+# defined in graphics.nsi around line 58
+VIDEO_MODE="vga=788"
+VIDEO_MODE_GTK="vga=788"
+
+GRUB_EFI=y
+GRUB_PLATFORM=x86_64-efi
+GRUB_EFI_NAME=x64
+
+include config/x86.cfg
diff --git a/build/config/x32/cdrom-xen.cfg b/build/config/x32/cdrom-xen.cfg
new file mode 100644
index 0000000..2b4fd1b
--- /dev/null
+++ b/build/config/x32/cdrom-xen.cfg
@@ -0,0 +1,14 @@
+TYPE=cdrom/gtk
+
+EXTRANAME=cdrom/xen/
+
+MANIFEST-KERNEL = "kernel image for installing under Xen"
+MANIFEST-INITRD = "initrd for installing under Xen"
+MANIFEST-XENCFG = "example Xen configuration"
+
+XEN_INSTALL_METHOD = cdrom
+TARGET = $(KERNEL) $(INITRD) xen_config
+SYMLINK_KERNEL = ../vmlinuz
+SYMLINK_INITRD = ../gtk/initrd.gz
+
+EXTRATARGETS = build_cdrom_gtk
diff --git a/build/config/x32/cdrom.cfg b/build/config/x32/cdrom.cfg
new file mode 100644
index 0000000..5678ba5
--- /dev/null
+++ b/build/config/x32/cdrom.cfg
@@ -0,0 +1,7 @@
+# el-torito is too large at the moment, so is disabled.
+FLAVOUR_SUPPORTED = isolinux gtk #el-torito
+
+MEDIA_TYPE = CD-ROM
+
+# Syslinux configuration
+SYSLINUX_CFG=template
diff --git a/build/config/x32/cdrom/el-torito.cfg b/build/config/x32/cdrom/el-torito.cfg
new file mode 100644
index 0000000..96cf55b
--- /dev/null
+++ b/build/config/x32/cdrom/el-torito.cfg
@@ -0,0 +1,7 @@
+# A bootable image suitable for El Torito CD images.
+
+FLOPPY_SIZE = 2880
+
+TARGET = $(BOOT)
+
+MANIFEST-BOOT = "El Torito boot image for CD"
diff --git a/build/config/x32/cdrom/gtk.cfg b/build/config/x32/cdrom/gtk.cfg
new file mode 100644
index 0000000..b915e3d
--- /dev/null
+++ b/build/config/x32/cdrom/gtk.cfg
@@ -0,0 +1,17 @@
+TARGET = $(INITRD) $(KERNEL) $(DEBIAN_CD_INFO)
+
+MANIFEST-KERNEL = "kernel for use with isolinux to build a CD (graphical)"
+MANIFEST-INITRD = "initrd for use with isolinux to build a CD (graphical)"
+MANIFEST-DEBIAN_CD_INFO = "isolinux help screens for CD (graphical)"
+
+TYPE = cdrom/isolinux/gtk
+
+EXTRANAME = gtk/
+
+KEEP_GI_LANGS = 1
+
+VIDEO_MODE=$(VIDEO_MODE_GTK)
+
+# All images that include cdebconf should include symbols needed by these
+# plugins.
+EXTRAUDEBS += cdebconf-gtk-entropy
diff --git a/build/config/x32/cdrom/isolinux.cfg b/build/config/x32/cdrom/isolinux.cfg
new file mode 100644
index 0000000..3d06000
--- /dev/null
+++ b/build/config/x32/cdrom/isolinux.cfg
@@ -0,0 +1,14 @@
+# A bootable image suitable for isolinux CD images.
+
+TARGET = $(INITRD) $(KERNEL) $(DEBIAN_CD_INFO)
+
+MANIFEST-KERNEL = "kernel for use with isolinux to build a CD"
+MANIFEST-INITRD = "initrd for use with isolinux to build a CD"
+MANIFEST-DEBIAN_CD_INFO = "isolinux config files for CD"
+
+TYPE = cdrom/isolinux
+
+# Add the gtk images on to the isolinux info.
+INITRD_GTK = dest/cdrom/gtk/initrd.gz
+
+EXTRATARGETS = build_cdrom_gtk
diff --git a/build/config/x32/hd-media.cfg b/build/config/x32/hd-media.cfg
new file mode 100644
index 0000000..9e1e49c
--- /dev/null
+++ b/build/config/x32/hd-media.cfg
@@ -0,0 +1,22 @@
+FLAVOUR_SUPPORTED = "" gtk
+
+# Not really a floppy, this is a 953 MiB image, large enough to put a
+# netinst iso in (being able to fit the full CD on it is just a bonus..),
+# and small enough to fit on a low-end memory stick, such as those
+# advertised as being 1 gigabyte in size.
+FLOPPY_SIZE = 976560
+
+DISK_LABEL = "bootable drive"
+MEDIA_TYPE = bootable drive
+
+GZIPPED = .gz
+EXTRANAME = hd-media/
+
+# Add the gtk images on to the bootable image.
+EXTRATARGETS = build_hd-media_gtk
+INITRD_GTK = dest/hd-media/gtk/initrd.gz
+TARGET = $(KERNEL) $(INITRD) $(BOOT)
+
+MANIFEST-BOOT = "1 gb image (compressed) for USB memory stick"
+MANIFEST-INITRD = "for use on USB memory sticks"
+MANIFEST-KERNEL = "for use on USB memory sticks"
diff --git a/build/config/x32/hd-media/gtk.cfg b/build/config/x32/hd-media/gtk.cfg
new file mode 100644
index 0000000..db19305
--- /dev/null
+++ b/build/config/x32/hd-media/gtk.cfg
@@ -0,0 +1,16 @@
+TYPE = hd-media/gtk
+
+EXTRANAME = gtk/
+
+# Only build the gtk initrd and kernel, the bootable image is built by the
+# main hd-media target and includes this initrd.
+EXTRATARGETS = 
+TARGET = $(KERNEL) $(INITRD)
+
+KEEP_GI_LANGS = 1
+
+VIDEO_MODE=$(VIDEO_MODE_GTK)
+
+# All images that include cdebconf should include symbols needed by these
+# plugins.
+EXTRAUDEBS += cdebconf-gtk-entropy
diff --git a/build/config/x32/monolithic.cfg b/build/config/x32/monolithic.cfg
new file mode 100644
index 0000000..0745216
--- /dev/null
+++ b/build/config/x32/monolithic.cfg
@@ -0,0 +1,9 @@
+MEDIA_TYPE = boot image
+
+TARGET = pkg-lists/standard-udebs pkg-lists/kernel-module-udebs $(INITRD) $(KERNEL) $(MINIISO)
+EXTRANAME = $(MEDIUM)/
+
+MANIFEST-INITRD = "initrd"
+MANIFEST-KERNEL = "kernel image"
+MANIFEST-MINIISO = "small bootable CD image for network install"
+
diff --git a/build/config/x32/netboot-gtk.cfg b/build/config/x32/netboot-gtk.cfg
new file mode 100644
index 0000000..144f2fe
--- /dev/null
+++ b/build/config/x32/netboot-gtk.cfg
@@ -0,0 +1,23 @@
+MEDIA_TYPE = netboot image
+
+NETBOOT_DIR_TARGETS = $(TEMP_INITRD) $(TEMP_KERNEL)
+NETBOOT_DIR_LINKS = pxelinux.0 pxelinux.cfg
+
+TYPE = netboot/gtk
+
+TARGET = $(NETBOOT_DIR) $(NETBOOT_TAR) $(MINIISO)
+EXTRANAME = netboot/gtk/
+
+BOOT_SCREEN_DIR = $(NETBOOT_PATH)/boot-screens/
+
+MANIFEST-NETBOOT_DIR = "PXE boot directory for tftp server (graphical installer)"
+MANIFEST-NETBOOT_TAR = "tarball of PXE boot directory (graphical installer)"
+MANIFEST-MINIISO = "not so tiny CD image that boots the graphical netboot installer"
+
+KEEP_GI_LANGS = 1
+
+VIDEO_MODE=$(VIDEO_MODE_GTK)
+
+# All images that include cdebconf should include symbols needed by these
+# plugins.
+EXTRAUDEBS += cdebconf-gtk-entropy
diff --git a/build/config/x32/netboot-xen.cfg b/build/config/x32/netboot-xen.cfg
new file mode 100644
index 0000000..9be7742
--- /dev/null
+++ b/build/config/x32/netboot-xen.cfg
@@ -0,0 +1,16 @@
+TYPE=netboot/gtk
+
+KEEP_GI_LANGS = 1
+
+EXTRANAME=netboot/xen/
+
+MANIFEST-KERNEL = "kernel image for installing under Xen"
+MANIFEST-INITRD = "initrd for installing under Xen"
+MANIFEST-XENCFG = "example Xen configuration"
+
+XEN_INSTALL_METHOD = network
+TARGET = $(KERNEL) $(INITRD) xen_config
+SYMLINK_KERNEL = ../gtk/debian-installer/amd64/linux
+SYMLINK_INITRD = ../gtk/debian-installer/amd64/initrd.gz
+
+EXTRATARGETS = build_netboot-gtk
diff --git a/build/config/x32/netboot.cfg b/build/config/x32/netboot.cfg
new file mode 100644
index 0000000..706b7bb
--- /dev/null
+++ b/build/config/x32/netboot.cfg
@@ -0,0 +1,12 @@
+MEDIA_TYPE = netboot image
+
+NETBOOT_DIR_TARGETS = $(TEMP_INITRD) $(TEMP_KERNEL)
+NETBOOT_DIR_LINKS = pxelinux.0 pxelinux.cfg
+TARGET = $(NETBOOT_DIR) $(NETBOOT_TAR) $(MINIISO)
+EXTRANAME = $(MEDIUM)/
+
+BOOT_SCREEN_DIR = $(NETBOOT_PATH)/boot-screens/
+
+MANIFEST-NETBOOT_DIR = "PXE boot directory for tftp server"
+MANIFEST-NETBOOT_TAR = "tarball of PXE boot directory"
+MANIFEST-MINIISO = "tiny CD image that boots the netboot installer"
diff --git a/build/config/x86.cfg b/build/config/x86.cfg
index a5e82c2..9e39541 100644
--- a/build/config/x86.cfg
+++ b/build/config/x86.cfg
@@ -1,4 +1,4 @@
-# Common configuration and targets for i386 and amd64 systems.
+# Common configuration and targets for i386, amd64 and x32 systems.
 
 # May be needed in rare cases.
 #SYSLINUX_OPTS = -s
diff --git a/build/pkg-lists/cdrom/isolinux/gtk/x32.cfg b/build/pkg-lists/cdrom/isolinux/gtk/x32.cfg
new file mode 100644
index 0000000..50a9b7c
--- /dev/null
+++ b/build/pkg-lists/cdrom/isolinux/gtk/x32.cfg
@@ -0,0 +1,8 @@
+mouse-modules-${kernel:Version}
+xserver-xorg-input-evdev-udeb
+xserver-xorg-video-fbdev-udeb
+
+speakup-modules-${kernel:Version}
+sound-modules-${kernel:Version}
+console-setup-linux-fonts-udeb
+espeakup-udeb
diff --git a/build/pkg-lists/cdrom/isolinux/x32.cfg b/build/pkg-lists/cdrom/isolinux/x32.cfg
new file mode 100644
index 0000000..ebb4c38
--- /dev/null
+++ b/build/pkg-lists/cdrom/isolinux/x32.cfg
@@ -0,0 +1,12 @@
+# This image is based on the regular cdrom image, and gets all the packages
+# from that one too.
+
+# These modules do not fit on the el torito CD initrd.
+pcmcia-storage-modules-${kernel:Version}
+pcmcia-modules-${kernel:Version}
+pcmciautils-udeb
+sata-modules-${kernel:Version}
+pata-modules-${kernel:Version}
+firewire-core-modules-${kernel:Version}
+scsi-modules-${kernel:Version}
+hyperv-modules-${kernel:Version}
diff --git a/build/pkg-lists/cdrom/x32.cfg b/build/pkg-lists/cdrom/x32.cfg
new file mode 100644
index 0000000..8473992
--- /dev/null
+++ b/build/pkg-lists/cdrom/x32.cfg
@@ -0,0 +1,25 @@
+console-setup-pc-ekmap
+fat-modules-${kernel:Version}
+cdrom-core-modules-${kernel:Version}
+input-modules-${kernel:Version}
+fb-modules-${kernel:Version}
+console-setup-udeb
+kbd-udeb
+usb-modules-${kernel:Version}
+serial-modules-${kernel:Version}
+usb-serial-modules-${kernel:Version} ?
+uinput-modules-${kernel:Version} ?
+
+# Support for firewire cdroms (and disks, I think)
+firewire-core-modules-${kernel:Version}
+# Support for usb cdroms
+usb-storage-modules-${kernel:Version}
+# USB and firewire cdroms both need this.
+scsi-core-modules-${kernel:Version}
+# Support for SCSI cdroms on common controllers.
+scsi-common-modules-${kernel:Version}
+
+# also support MMC/SD cards
+mmc-modules-${kernel:Version} ?
+
+acpi-modules-${kernel:Version}
diff --git a/build/pkg-lists/hd-media/gtk/x32.cfg b/build/pkg-lists/hd-media/gtk/x32.cfg
new file mode 100644
index 0000000..3d4fce6
--- /dev/null
+++ b/build/pkg-lists/hd-media/gtk/x32.cfg
@@ -0,0 +1,10 @@
+#include "gtk-linux"
+
+mouse-modules-${kernel:Version}
+xserver-xorg-input-evdev-udeb
+xserver-xorg-video-fbdev-udeb
+
+speakup-modules-${kernel:Version}
+sound-modules-${kernel:Version}
+console-setup-linux-fonts-udeb
+espeakup-udeb
diff --git a/build/pkg-lists/hd-media/x32.cfg b/build/pkg-lists/hd-media/x32.cfg
new file mode 100644
index 0000000..1c27931
--- /dev/null
+++ b/build/pkg-lists/hd-media/x32.cfg
@@ -0,0 +1,32 @@
+console-setup-pc-ekmap
+input-modules-${kernel:Version}
+fb-modules-${kernel:Version}
+console-setup-udeb
+kbd-udeb
+
+# full support for all types of hard drives, and usb devices
+scsi-common-modules-${kernel:Version}
+scsi-modules-${kernel:Version}
+scsi-extra-modules-${kernel:Version}
+usb-modules-${kernel:Version}
+usb-storage-modules-${kernel:Version}
+serial-modules-${kernel:Version}
+usb-serial-modules-${kernel:Version} ?
+uinput-modules-${kernel:Version} ?
+sata-modules-${kernel:Version}
+
+# also support MMC/SD cards
+mmc-modules-${kernel:Version} ?
+
+# So it can find cdroms and the installer will set all that stuff up.
+# Not on the iso.
+cdrom-core-modules-${kernel:Version}
+
+# all the filesystems (feel free to add more!)
+fat-modules-${kernel:Version}
+ext4-modules-${kernel:Version}
+
+# the iso is loop-mounted
+loop-modules-${kernel:Version}
+
+acpi-modules-${kernel:Version}
diff --git a/build/pkg-lists/netboot/gtk/x32.cfg b/build/pkg-lists/netboot/gtk/x32.cfg
new file mode 100644
index 0000000..3d4fce6
--- /dev/null
+++ b/build/pkg-lists/netboot/gtk/x32.cfg
@@ -0,0 +1,10 @@
+#include "gtk-linux"
+
+mouse-modules-${kernel:Version}
+xserver-xorg-input-evdev-udeb
+xserver-xorg-video-fbdev-udeb
+
+speakup-modules-${kernel:Version}
+sound-modules-${kernel:Version}
+console-setup-linux-fonts-udeb
+espeakup-udeb
diff --git a/build/pkg-lists/netboot/x32.cfg b/build/pkg-lists/netboot/x32.cfg
new file mode 100644
index 0000000..70e83ef
--- /dev/null
+++ b/build/pkg-lists/netboot/x32.cfg
@@ -0,0 +1,42 @@
+console-setup-pc-ekmap
+
+bogl-bterm-udeb
+
+nic-modules-${kernel:Version}
+nic-usb-modules-${kernel:Version}
+nic-wireless-modules-${kernel:Version}
+virtio-modules-${kernel:Version}
+hyperv-modules-${kernel:Version}
+usb-modules-${kernel:Version}
+input-modules-${kernel:Version}
+console-setup-udeb
+kbd-udeb
+
+# This is needed for proper display of utf-8.
+fb-modules-${kernel:Version}
+
+# In case they need to load a driver image.
+mountmedia
+media-retriever
+fat-modules-${kernel:Version}
+usb-storage-modules-${kernel:Version}
+mmc-modules-${kernel:Version} ?
+
+# Netboot over pcmcia is unlikely, but one never knows, and this makes
+# pcmcia network interfaces available, as well as making sure pcmcia is
+# available in netboot installs at all.
+nic-pcmcia-modules-${kernel:Version}
+pcmcia-modules-${kernel:Version}
+pcmciautils-udeb
+
+hw-detect
+ethdetect
+netcfg
+
+acpi-modules-${kernel:Version}
+
+# brltty
+brltty-udeb
+serial-modules-${kernel:Version} ?
+usb-serial-modules-${kernel:Version} ?
+uinput-modules-${kernel:Version} ?
diff --git a/debian/control b/debian/control
index f091f80..9cf0f19 100644
--- a/debian/control
+++ b/debian/control
@@ -68,9 +68,9 @@ Build-Depends:
 #		default.)
 	hfsutils [powerpc],
 #		For making bootable HFS USB sticks for powerpc.
-	dosfstools [i386 ia64 m68k amd64 armhf arm64],
+	dosfstools [i386 ia64 m68k amd64 armhf arm64 x32],
 #		For creating FAT filesystems with mkfs.msdos.
-#		Of course i386/amd64 use this for floppies, CDs etc.
+#		Of course i386/amd64/x32 use this for floppies, CDs etc.
 #		ia64 uses it for floppies (?)
 #		m68k uses it for atari floppies
 #		armhf uses it for building bootable SD card images
@@ -92,11 +92,11 @@ Build-Depends:
 #	On many arches boot loaders are copied onto or ran on the boot
 #	images in one way or another. There's a reason our mailing list is
 #	still called debian-boot..
-	syslinux [i386 amd64],
-	syslinux-utils [i386 amd64],
-	isolinux [i386 amd64],
-	pxelinux [i386 amd64],
-	syslinux-common (>= 3:6) [i386 amd64],
+	syslinux [i386 amd64 x32],
+	syslinux-utils [i386 amd64 x32],
+	isolinux [i386 amd64 x32],
+	pxelinux [i386 amd64 x32],
+	syslinux-common (>= 3:6) [i386 amd64 x32],
 #		With isohybrid.
 	elilo [ia64],
 	yaboot [powerpc],
@@ -129,8 +129,8 @@ Build-Depends:
 #		Bootloader for m68k/mac machines.
 	apex-nslu2 [armeb armel],
 #		2nd stage bootloader for Linksys NSLU2.
-	grub-efi-amd64-bin [amd64], grub-efi-arm64-bin [arm64], grub-efi-ia32-bin [i386],
-	grub-common [amd64 arm64 i386], xorriso,
+	grub-efi-amd64-bin [amd64 x32], grub-efi-arm64-bin [arm64], grub-efi-ia32-bin [i386],
+	grub-common [amd64 arm64 i386 x32], xorriso,
 #		Used to make EFI bootable images
 	grub-ieee1275-bin [ppc64el],
 #		IEEE1275 bootloader support.
@@ -140,10 +140,10 @@ Build-Depends:
 #		U-boot binaries for armhf systems without u-boot in flash memory
 # 
 # Architecture specific build dependencies:
-	tofrodos [i386 amd64 kfreebsd-i386 kfreebsd-amd64],
+	tofrodos [i386 amd64 kfreebsd-i386 kfreebsd-amd64 x32],
 #		For todos, used on files that need to be accessible from
 #		DOS.
-	mtools [i386 ia64 m68k amd64 armhf arm64 kfreebsd-i386 kfreebsd-amd64 hurd-i386],
+	mtools [i386 ia64 m68k amd64 armhf arm64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 x32],
 #		mcopy is used to put files onto FAT filesystems w/o
 #		mounting them.
 # 
@@ -160,17 +160,17 @@ Build-Depends:
 #		Used to encrypt a firmware image so an ARM based device
 #		(Thecus N2100) will accept it. Also useful on other
 #		architectures if SSL_CERTS has been set locally.
-	win32-loader (>= 0.7.2) [i386 amd64 kfreebsd-i386 kfreebsd-amd64 hurd-i386],
+	win32-loader (>= 0.7.2) [i386 amd64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 x32],
 #		Alternative boot method for win32 platforms.
 	makefs [kfreebsd-any],
 #		Used to create an UFS1 filesystem from a directory tree.
-	grub-pc (>= 2.02~beta2~) [kfreebsd-i386 kfreebsd-amd64 hurd-i386],
+	grub-pc (>= 2.02~beta2~) [kfreebsd-i386 kfreebsd-amd64 hurd-i386 x32],
 #		Used as the CD-ROM's bootloader
-	xorriso (>= 1.3.2-1~) [kfreebsd-i386 kfreebsd-amd64 hurd-i386],
+	xorriso (>= 1.3.2-1~) [kfreebsd-i386 kfreebsd-amd64 hurd-i386 x32],
 #               Used by grub-pc to create the CD-ROM images
 	debian-ports-archive-keyring [sh4 sparc64],
 #		Used for architectures hosted on debian-ports.org
-	librsvg2-bin [any-amd64 any-i386],
+	librsvg2-bin [any-amd64 any-i386 x32],
 #		Used to convert splash SVG to splash PNG during build
 
 Package: debian-installer
-- 
2.1.4

