summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/README.Debian10
-rw-r--r--debian/changelog825
-rw-r--r--debian/compat1
-rw-r--r--debian/control133
-rw-r--r--debian/copyright62
-rw-r--r--debian/gnumach-common.info1
-rw-r--r--debian/gnumach-common.install1
-rw-r--r--debian/gnumach-dev.docs1
-rw-r--r--debian/gnumach-dev.install1
-rw-r--r--debian/gnumach-image-1.3.99-486-dbg.docs3
-rw-r--r--debian/gnumach-image-1.3.99-486-dbg.install1
-rw-r--r--debian/gnumach-image-1.3.99-486.docs3
-rw-r--r--debian/gnumach-image-1.3.99-486.install1
-rw-r--r--debian/gnumach-image-1.3.99-xen-486-dbg.docs2
-rw-r--r--debian/gnumach-image-1.3.99-xen-486-dbg.install1
-rw-r--r--debian/gnumach-image-1.3.99-xen-486.docs2
-rw-r--r--debian/gnumach-image-1.3.99-xen-486.install1
-rw-r--r--debian/gnumach-image.postinst.in66
-rw-r--r--debian/gnumach-image.postrm.in66
-rw-r--r--debian/gnumach-image.preinst.in61
-rw-r--r--debian/gnumach-image.prerm.in64
-rw-r--r--debian/kernel-image-1.3.99-486-di.install1
-rw-r--r--debian/kernel-image-1.3.99-xen-486-di.install1
-rw-r--r--debian/patches/00_clean_gfdl.patch15
-rw-r--r--debian/patches/10_cdromlock.patch93
-rw-r--r--debian/patches/11_ignore_CSIn.patch15
-rw-r--r--debian/patches/13_ide_dma.patch1085
-rw-r--r--debian/patches/24_pci_irq_fix.patch33
-rw-r--r--debian/patches/40_iopl_mem.patch20
-rw-r--r--debian/patches/50_initrd.patch315
-rw-r--r--debian/patches/60_bigmem.patch15
-rw-r--r--debian/patches/series8
-rwxr-xr-xdebian/rules232
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/options1
-rw-r--r--debian/watch3
36 files changed, 3144 insertions, 0 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..484893c
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,10 @@
+GNU Mach for Debian
+-------------------
+
+This is the GNU version of the Mach microkernel, currently used as the
+basis for the GNU Hurd.
+
+Let us know if you have hardware troubles.
+Compiling a fresh kernel with minimal hardware support is recommended.
+
+GNU Hurd Maintainers <bug-hurd@gnu.org>
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..dc5f84c
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,825 @@
+gnumach (2:1.3.99.dfsg.git20110805-2) UNRELEASED; urgency=low
+
+ * debian/control: Do not make -dbg package depend on the non-dbg packages.
+
+ -- Samuel Thibault <sthibault@debian.org> Tue, 30 Aug 2011 02:36:10 +0200
+
+gnumach (2:1.3.99.dfsg.git20110805-1) unstable; urgency=low
+
+ * New upstream snapshot.
+ * debian/control: build udebs on hurd-i386 only.
+ * debian/patches/13_ide_dma.patch: Do not stop DMA before reading its
+ status.
+ * debian/rules: Add prerm, preinst, postrm, postinst to -dbg kernels too, to
+ update grub list.
+
+ -- Samuel Thibault <sthibault@debian.org> Fri, 05 Aug 2011 11:41:13 +0000
+
+gnumach (2:1.3.99.dfsg.git20110609-1) unstable; urgency=low
+
+ * New upstream snapshot
+ * Bump Standards-Version to 3.9.2 (no change needed)
+
+ -- Samuel Thibault <sthibault@debian.org> Wed, 08 Jun 2011 22:50:30 +0000
+
+gnumach (2:1.3.99.dfsg.git20110305-1) unstable; urgency=low
+
+ [ Samuel Thibault ]
+ * New upstream snapshot
+ - debian/patches/50_initrd.patch: Refresh.
+ * debian/rules: Add rules to build Xen variants of gnumach.
+ * debian/source/options: Enable bz2 compression.
+ * debian/patches/60_bigmem.patch: Add patch to support almost up to 2GiB
+ memory.
+ * debian/rules: Rename /boot/gnumach* into
+ /boot/gnumach-1.3.99-{xen-,}486{,-dbg}
+ * debian/control:
+ - Rename gnumach{,-dbg} into gnumach-image-1.3.99-486{,-dbg} (except in
+ udebs).
+ - Add gnumach-image-1.3.99-xen-486{,-dbg} containing Xen variants of gnumach
+ - Add gnumach-common to contain msgids and info documentation shared by
+ gnumach-image-1.3.99 packages, which now depend on it and replace the
+ previous gnumach package.
+ - Add gnumach-image-{xen-,}486, which depend on
+ gnumach-image-1.3.99-{xen-,}486.
+ - Re-add gnumach{,-dbg} packages, which depend on gnumach-image-486 and
+ gnumach-image-1.3.99-486-dbg, make these packages break grub-pc versions
+ before the one which generate menu entries for all /boot/gnumach* files.
+ - Rename gnumach-udeb into kernel-image-1.3.99-486-di.
+ - Add kernel-image-1.3.99-xen-486-di.
+ - Use Package-Type instead of XC-Package-Type.
+ - Make gnumach packages break glibc versions before the one which can cope
+ with > 1GiB memory support.
+ - Fix upstream URL (Closes: Bug#604257).
+ * debian/rules: Apply package renames in $(pkg{,_xen,_udeb,_dbg,_xen_dbg).
+ * debian/gnumach*.{install,docs}: Rename accordingly.
+ * debian/patches/11_ignore_CSIn.patch: Ignore \E[6n emited by busybox.
+ * debian/gnumach-image.{preinst,postinst,prerm,postrm}: Add script to get
+ e.g. update-grub called.
+
+ -- Samuel Thibault <sthibault@debian.org> Sat, 31 Jul 2010 17:35:20 +0200
+
+gnumach (2:1.3.99.dfsg.git20100732-1) unstable; urgency=low
+
+ [ Samuel Thibault ]
+ * New upstream snapshot.
+ * debian/control
+ - (gnumach-udeb): Add XC- prefix to Package-Type. Add Provides:
+ kernel-image, *-modules.
+ - Remove duplicate priority and section fields.
+ - Add ${misc:Depends}.
+ * debian/patches/40_iopl_mem.patch: Add patch, not enabled yet, to be used
+ instead of 40_iopl_mmap.patch when a new snapshot is taken.
+ * debian/patches/40_iopl_mmap.patch: Add a "mem" alias for the iopl device,
+ since that is what upstream provides.
+ * Now using Standards-Version 3.9.1 (no changes needed).
+ * debian/rules: Remove enable-sis900 as it's now the default.
+ * debian/patches/50_initrd.patch: New patch to add ramdisk support for d-i.
+ * debian/control: Remove Neal and Jeff from Uploaders (Closes: #565164).
+
+ [ Guillem Jover ]
+ * Use any-i386 in binary package Architecture fields.
+ * Update Vcs fields to point to the new git repositories.
+
+ -- Samuel Thibault <sthibault@debian.org> Sat, 31 Jul 2010 17:35:20 +0200
+
+gnumach (2:1.3.99.dfsg.git20091128-1) unstable; urgency=low
+
+ * New upstream git snapshot.
+
+ [ Guillem Jover ]
+ * Update debian/copyright to point to the git repository.
+ * Sync with upstream:
+ - debian/patches/05_halt_on_panic_flag.patch: Remove, merged upstream.
+ - debian/patches/12_sis900.patch: Likewise.
+ - debian/patches/14_alloc_params.patch: Likewise.
+ - debian/patches/15_mem_obj_proxy.patch: Likewise.
+ - debian/patches/16_ide_multsect.patch: Likewise.
+ - debian/patches/20_xmm_support.patch: Likewise.
+ * Switch to source format “3.0 (quilt)”:
+ - Remove quilt from Build-Depends.
+ - Remove quilt.make include from debian/rules.
+ - Remove patch and unpatch targets from debian/rules.
+ - Remove now unneeded debian/README.source.
+ * Do not include ChangeLog.0*, they are not shipped upstream anymore.
+ * Remove Marcus Brinkmann from Uploaders. Closes: #503568
+
+ -- Guillem Jover <guillem@debian.org> Sat, 28 Nov 2009 19:14:15 +0100
+
+gnumach (2:1.3.99.dfsg.cvs20090220-2) unstable; urgency=low
+
+ [ Guillem Jover ]
+ * Change gnumach-dbg section to debug.
+ * Change source and gnumach section to kernel.
+ * Now using Standards-Version 3.8.3.
+
+ [ Samuel Thibault ]
+ * debian/patches/14_alloc_params.patch: reserve 128MiB for virtual memory
+ space. Fixes boot with more than ~900MiB.
+ * debian/patches/20_mmx_support.patch: rename to 20_xmm_support.patch and
+ fix comment: the added support is XMM registers, not MMX.
+ * debian/control: Add myself as uploader.
+
+ -- Guillem Jover <guillem@debian.org> Mon, 08 Jun 2009 22:23:13 +0200
+
+gnumach (2:1.3.99.dfsg.cvs20090220-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - Do not panic in fpintr if we receive the interrupt twice in the same
+ thread. (Closes: #447036)
+
+ [ Samuel Thibault ]
+ * Remove kern/mach_param.h patch from debian/patches/14_alloc_params.patch,
+ increase zone_map_size and maximum number of cached objects.
+
+ [ Guillem Jover ]
+ * Switch to debhelper compatibility level 7.
+ * Use dh_prep instead of “dh_clean -k”.
+ * Remove XC- prefix from Package-Type field.
+ * Sync with upstream:
+ - debian/patches/00_clean_gfdl.patch: Refresh.
+ - debian/patches/05_halt_on_panic_flag.patch: Likewise.
+ - debian/patches/14_alloc_params.patch: Likewise.
+ - debian/patches/15_mem_obj_proxy.patch: Likewise.
+ - debian/patches/20_mmx_support.patch: Likewise.
+
+ -- Guillem Jover <guillem@debian.org> Fri, 20 Feb 2009 03:27:59 +0200
+
+gnumach (2:1.3.99.dfsg.cvs20080708-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - Fix zalloc alignment support, and thus alignment of FPU save area.
+ (Closes: #440068)
+ - Enable multicast for IPv6.
+ - Enable Bus Mastering on triton chipsets.
+ - Fix gcc-4.3 non-inlining. (Closes: #474902)
+ - Fix direction flag on syscall entry. (Closes: #469566)
+ - Fix initialization of RTL8139. (Closes: #469566)
+
+ [ Samuel Thibault ]
+ * Append more agressive caching parameter to
+ debian/patches/14_alloc_params.patch.
+ * New patch to enable IDE multiple sector I/O when the drive can do it.
+ - debian/patches/16_ide_multsect.patch
+ * Clean debian/tmp-dbg.
+
+ [ Guillem Jover ]
+ * Add Homepage field.
+ * Add Vcs-Browser and Vcs-Svn fields.
+ * Remove repository information from debian/copyright as it is now on
+ debian/control.
+ * Refer to GPL-2 from common-licenses instead of just GPL.
+ * Add a README.source.
+ * Now using Standards-Version 3.8.0.
+ * Refresh patches with -pab.
+ * Remove DPATCHLEVEL variable from patches.
+ * Change source and binary packages from Section base to admin.
+ * Mangle the Debian version in the watch file.
+ * Sync with upstream:
+ - debian/patches/00_clean_gfdl.patch: Refresh.
+ - debian/patches/05_halt_on_panic_flag.patch: Likewise.
+ - debian/patches/13_ide_dma.patch: Likewise.
+ - debian/patches/14_alloc_params.patch: Likewise.
+ * Use $(filter ...) instead of $(findstring ...) to extract space separated
+ options from DEB_BUILD_OPTIONS in debian/rules.
+ * Merge check targets into build targets.
+ * Clean up debian/rules:
+ - Run autoreconf on-demand, which fixes a FTBFS when built twice in a
+ row. (Closes: #424353)
+ - Support parallel builds by moving 'patch' dependency from
+ the build to a new pre-patch-* targets that serializes configuration.
+ * Properly clean up autogenerated cruft.
+ * Add Build-Depends on autoconf and automake now that we call autoreconf at
+ build time.
+
+ -- Guillem Jover <guillem@debian.org> Tue, 08 Jul 2008 16:54:06 +0300
+
+gnumach (2:1.3.99.dfsg.cvs20070809-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - debian/patches/90_autoconf_autogen.patch: Regenerated.
+ * Add an autoregen target to ease regenerating the autoconf patch.
+ * Use binary:Version instead of the deprecated Source-Version substvar.
+ * Do not use configure file stamps, use config.status instead.
+
+ -- Guillem Jover <guillem@debian.org> Thu, 09 Aug 2007 01:45:22 +0300
+
+gnumach (2:1.3.99.dfsg.cvs20070526-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - debian/patches/41_io_unlock_ioremove.patch: Removed, fixed upstream.
+ - debian/patches/42_disable_ioperm.patch: Likewise.
+ - debian/patches/43_debvice_port_fix.patch: Likewise.
+ - debian/patches/44_more_ports.patch: Likewise.
+ - debian/patches/45_io_per_task.patch: Likewise.
+ - debian/patches/46_io_device.patch: Likewise.
+ - debian/patches/20_mmx_support.patch: Sync.
+ - debian/patches/90_autoconf_autogen.patch: Regenerated.
+ * Temporarily restore support for memory mapping through the iopl device,
+ so that stuff like X can work again. (Closes: #421135)
+ - debian/patches/40_iopl_mmap.patch: New file.
+ Thanks to Samuel Thibault <samuel.thibault@labri.fr>.
+
+ -- Guillem Jover <guillem@debian.org> Sat, 26 May 2007 10:01:54 +0300
+
+gnumach (2:1.3.99.dfsg.cvs20070405-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - debian/patches/44_more_ports.patch: Sync.
+ - debian/patches/45_io_per_task.patch: Likewise.
+ - debian/patches/05_halt_on_panic_flag.patch
+ - debian/patches/12_sis900.patch: Unfuzzy.
+ - debian/patches/13_ide_dma.patch: Likewise.
+ - debian/patches/14_alloc_params.patch: Likewise.
+ - debian/patches/45_io_per_task.patch: Likewise.
+ - debian/patches/46_io_device.patch: Likewise.
+ - debian/patches/90_autoconf_autogen.patch: Regenerated.
+
+ -- Guillem Jover <guillem@debian.org> Thu, 05 Apr 2007 07:33:38 +0300
+
+gnumach (2:1.3.99.dfsg.cvs20070306-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - Protect the net filter code from being interrupted.
+ (Closes: #396741, #413185)
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
+ - debian/patches/00_clean_gfdl.patch: Sync.
+ - debian/patches/90_autoconf_autogen.patch: Regenerated.
+ * Fixed MMX register support. (Closes: #413177)
+ - debian/patches/20_mmx_support.patch: Updated.
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
+ * Run the test suite after build. (Closes: #390872)
+
+ -- Guillem Jover <guillem@debian.org> Tue, 6 Mar 2007 07:51:30 +0200
+
+gnumach (2:1.3.99.dfsg.cvs20070211-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - debian/patches/22_scsi_inf_loop.patch: Removed, merged upstream.
+ - debian/patches/47_pcmcia_isa.patch: Likewise.
+ - debian/patches/10_cdromlock.patch: Sync.
+ - debian/patches/12_sis900.patch: Likewise.
+ - debian/patches/15_mem_obj_proxy.patch: Likewise.
+ - debian/patches/90_autoconf_autogen.patch: Regenerated.
+ * Add MMX register support.
+ - debian/patches/20_mmx_support.patch: New file.
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
+
+ -- Guillem Jover <guillem@debian.org> Sun, 11 Feb 2007 16:11:00 +0200
+
+gnumach (2:1.3.99.dfsg.1-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - debian/patches/01_gcc-4.1.patch: Removed, merged upstream.
+ - debian/patches/00_clean_gfdl.patch: Sync.
+ - debian/patches/05_halt_on_panic_flag.patch: Likewise.
+ - debian/patches/10_cdromlock.patch: Likewise.
+ - debian/patches/12_sis900.patch: Likewise.
+ - debian/patches/13_ide_dma.patch: Likewise.
+ - debian/patches/14_alloc_params.patch: Likewise.
+ - debian/patches/15_mem_obj_proxy.patch: Likewise.
+ - debian/patches/41_io_unlock_ioremove.patch: Likewise.
+ - debian/patches/42_disable_ioperm.patch: Likewise.
+ - debian/patches/43_debvice_port_fix.patch: Likewise.
+ - debian/patches/44_more_ports.patch: Likewise.
+ - debian/patches/45_io_per_task.patch: Likewise.
+ - debian/patches/46_io_device.patch: Likewise.
+ - debian/patches/47_pcmcia_isa.patch: Disabled, merged upstream.
+ - debian/patches/90_autoconf_autogen.patch: Regenerated.
+ - debian/patches/61_vm_resident-zoned.patch: Disable for now, it's
+ causing problems with current applied patches in CVS.
+ * Adapt to the new automakified build system:
+ - New D and D_DBG variables pointing to the package destination dirs.
+ - Remove debian/rules.options, now unneeded with the default configure
+ options, except for '--enable-sis900' which is not enabled by default.
+ - Pass --prefix and --exec-prefix to configure.
+ - Use DESTDIR instead of passing the prefix and exec_prefix variables.
+ - Call install instead of install-kernel and install-headers for the
+ default build.
+ - Call install-exec instead of install-kernel for the -dbg build.
+ - Use dh_install to install files from D and D_DBG into the proper
+ package dirs.
+ - debian/gnumach-dbg.install: New file.
+ - debian/gnumach-dev.install: Likewise.
+ - debian/gnumach-udeb.install: Likewise.
+ - debian/gnumach.install: Likewise. Install the msgids. (Closes: #365828)
+ * Completely removed the doc/ directory.
+ - Document the removal of the non-free GFDL manual in debian/copyright.
+ - Do not try to build the now non-existent doc/ directory.
+ - Disable dh_installinfo.
+ * Cleanup debian/rules file:
+ - Remove the manual cruft-removal line from the clean target.
+ - Remove the stamp file for the -dbg build.
+ - Merge the install-gnumach-dbg and install-gnumach targets into install.
+
+ -- Guillem Jover <guillem@debian.org> Tue, 14 Nov 2006 05:11:48 +0200
+
+gnumach (1:20060826.dfsg.1-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - Disable wavelan driver as it does not build anymore with the updated
+ Linux header files.
+ - Make gnumach-dbg Depend on gnumach with the exact same version, due
+ to an interface change in the networking code, to drag it as well.
+ - debian/patches/05_halt_on_panic_flag.patch: Sync.
+ - debian/patches/10_cdromlock.patch: Likewise.
+ - debian/patches/12_sis900.patch: Likewise.
+ - debian/patches/13_ide_dma.patch: Likewise.
+ - debian/patches/61_vm_resident-zoned.patch: Likewise.
+ - debian/patches/90_autoconf_autogen.patch: Likewise.
+ - debian/patches/23_ps2_mouse.patch: Removed, integrated upstream.
+ - debian/patches/50_mem_limit.patch: Likewise.
+ * Switch to quilt:
+ - debian/control: Add quilt (>= 0.40) to Build-Depends.
+ - debian/patches/series: New file.
+ - debian/patch.mk: Removed.
+ - debian/rules: Include '/usr/share/quilt/quilt.make' instead of
+ 'debian/patch.mk'. Change clean to a single colon target and make it
+ depend on patch.
+ * Now using Standards-Version 3.7.2 (no changes needed).
+ * Fix an unused field optimization with gcc 4.1 which was causing the
+ descriptor initialization to do it partially.
+ - debian/patches/01_gcc-4.1.patch: New file.
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
+ * Enable PCMCIA ISA support.
+ - debian/patches/47_pcmcia_isa.patch: New file.
+ Thanks to Stefan Siegl <stesie@brokenpipe.de>.
+ * Enable all PCMCIA options.
+
+ -- Guillem Jover <guillem@debian.org> Thu, 31 Aug 2006 04:43:57 +0300
+
+gnumach (1:20060408.dfsg.1-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - Fix I/O problem with Hurd console and X.
+
+ -- Guillem Jover <guillem@debian.org> Sat, 8 Apr 2006 19:35:22 +0300
+
+gnumach (1:20060402.dfsg.1-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - Remove GFDL license and the manual licensed with it.
+ - debian/patches/00_clean_gfdl.patch: Do not build the manual.
+ - debian/patches/11_nic_update.patch: Removed, integrated upstream.
+ - debian/patches/16_net_apricot_stack_of.patch: Likewise.
+ - debian/patches/17_net_gcc_4.0.patch: Likewise.
+ - debian/patches/20_ide_disable_irqs.patch: Likewise.
+ - debian/patches/21_pata_off_by_one_irq.patch: Likewise.
+ - debian/patches/31_tls_ldt.patch: Likewise.
+ - debian/patches/40_user-tss.patch: Likewise.
+ - debian/patches/00_build_make_beta.patch: Removed, fixed upstream
+ - debian/patches/12_sis900.patch: Sync.
+ - debian/patches/13_ide_dma.patch: Likewise.
+ - debian/patches/15_mem_obj_proxy.patch: Likewise.
+ - debian/patches/41_io_unlock_ioremove.patch: Likewise.
+ - debian/patches/42_disable_ioperm.patch: Likewise.
+ - debian/patches/44_more_ports.patch: Likewise.
+ - debian/patches/45_io_per_task.patch: Likewise.
+ - debian/patches/46_io_device.patch: Likewise.
+ - debian/patches/50_mem_limit.patch: Likewise.
+ - debian/patches/90_autoconf_autogen.patch: Likewise.
+ * Fix -H kernel command line argument to halt on panic. (Closes: #184624)
+ - debian/patches/05_halt_on_panic_flag.patch: New file.
+ Thanks to Soeren D. Schulze <soeren.d.schulze@gmx.de>.
+ * Do not allow PCI IRQ's higher than 16.
+ - debian/patches/patches/24_pci_irq_fix.patch: New file.
+ Thanks to Gianluca Guida <glguida@gmail.com>.
+ * Make the Linux device drivers use dynamic memory allocation via the
+ glue code.
+ - debian/patches/61_vm_resident-zoned.patch: New file.
+ Thanks to Gianluca Guida <glguida@gmail.com>.
+ * Build with -fno-strict-aliasing.
+ * Remove Build-Depend on the new POSIX compliant make, it should work on
+ old versions as well now.
+ * Remove the no longer needed texinfo Buil-Depends, and comment out the
+ mach.info from debian/gnumach.info.
+
+ -- Guillem Jover <guillem@debian.org> Sun, 2 Apr 2006 17:30:25 +0300
+
+gnumach (1:20050801-4) unstable; urgency=low
+
+ * Actually enable the io access disabling patch.
+ - debian/patches/42_disable_ioperm.disabled: Rename to ...
+ - debian/patches/42_disable_ioperm.patch: ... this.
+ * Check for correct return code from pcibios in de4x5 SCSI driver, which
+ was making it loop infinitely if probed.
+ - debian/patches/22_scsi_inf_loop.patch: New file.
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
+ * Fix PS2 mouse command drivers reception, affecting among others its
+ correct detection.
+ - debian/patches/23_ps2_mouse.patch: New file.
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
+ * Build-Depend on the new POSIX compliant make.
+
+ -- Guillem Jover <guillem@debian.org> Mon, 16 Jan 2006 05:40:33 +0200
+
+gnumach (1:20050801-3) unstable; urgency=low
+
+ * Fix build failure with latest make 3.81 beta and the new POSIX behaviour
+ related to new line vs shell command.
+ - debian/patches/00_build_make_beta.patch: New file.
+ Thanks to Alfred M. Szmidt <ams@gnu.org>.
+ * Added ChangeLog entries.
+ - debian/patches/13_ide_dma.patch: Modify
+ - debian/patches/14_alloc_params.patch: Likewise.
+ * Fix io port access. (Closes: #46709)
+ - debian/patches/40_user-tss.patch: New file.
+ - debian/patches/41_io_unlock_ioremove.patch: Likewise.
+ - debian/patches/42_disable_ioperm.disabled: Likewise.
+ - debian/patches/43_debvice_port_fix.patch: Likewise.
+ - debian/patches/44_more_ports.patch: Likewise.
+ - debian/patches/45_io_per_task.patch: Likewise.
+ - debian/patches/46_io_device.patch: Likewise.
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
+ * Fix memory limit, that was causing panics when having roughly more than
+ 768 MiB of physical memory. (Closes: #226609)
+ - debian/patches/50_mem_limit.patch: New file.
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
+
+ -- Guillem Jover <guillem@debian.org> Thu, 12 Jan 2006 00:54:05 +0200
+
+gnumach (1:20050801-2) unstable; urgency=low
+
+ * Added a watch file.
+ * Fix segmentation fault on boot. The apricot net driver was trashing the
+ stack when reading the MAC address from the io port. (Closes: #340389)
+ - debian/patches/16_net_apricot_stack_of.patch: New file.
+ Thanks to Sergio Lopez <koro@sinrega.org>.
+ * Fix invalid lvalue errors with gcc-4.0 in ne2k-pci driver.
+ - debian/patches/11_nic_update.patch: Split into ...
+ - debian/pacthes/17_net_gcc_4.0.patch: ... here.
+ Thanks to Thomas Schwinge <tschwinge@gnu.org>.
+
+ -- Guillem Jover <guillem@debian.org> Mon, 28 Nov 2005 03:46:36 +0200
+
+gnumach (1:20050801-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - debian/patches/00_autoconf_update.patch: Remove, integrated upstream.
+ - debian/patches/11_nic_update.patch: Rediff.
+ - debian/patches/90_autoconf_autogen.patch: Regenerate.
+ * No need to rename Drivers.in to configure.ac anymore.
+ * Add DPATCHLEVEL and ChangeLog entry.
+ - debian/patches/12_sis900.patch: Update.
+ * Disable IDE interrupts when the driver requests that through
+ request_irq().
+ - debian/patches/20_ide_disable_irqs.patch: New file.
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
+ * Fix an off-by-one bug in the PATA probe function.
+ - debian/patches/21_pata_off_by_one_irq.patch: New file.
+ Thanks to Sergio Lopez <koro@sinrega.org>.
+ * Set correct values for %gs and %fs when entering kernel mode. Make sure
+ to always copy the master LDT when the user does not have a modified one.
+ - debian/patches/31_tls_ldt.patch: New file.
+ Thanks to Jeroen Dekkers <jeroen@dekkers.cx>.
+ * Now using Standards-Version 3.6.2 (no changes needed).
+ * Wrap lines in debian/control fields (knowingly breaking policy).
+ * Upgrade to debhelper compat version 5.
+ * Update FSF's address.
+
+ -- Guillem Jover <guillem@debian.org> Thu, 10 Nov 2005 06:01:36 +0200
+
+gnumach (1:20050501-4) unstable; urgency=low
+
+ * Add proxy memory objets.
+ - debian/patches/15_mem_obj_proxy.patch.
+ Thanks to Marcus Brinkmann <marcus@gnu.org>.
+
+ -- Guillem Jover <guillem@debian.org> Wed, 8 Jun 2005 02:01:42 +0300
+
+gnumach (1:20050501-3) unstable; urgency=low
+
+ * Provide a udeb package.
+ - Depend on debhelper >= 4.2.
+ * Cleaned debian/rules:
+ - Merge install-gnumach-dev target with install-gnumach.
+ - Add PHONY targets.
+ - Remove unused all target.
+
+ -- Guillem Jover <guillem@debian.org> Thu, 2 Jun 2005 22:14:40 +0300
+
+gnumach (1:20050501-2) unstable; urgency=low
+
+ * Add a system stabilizer patch.
+ - debian/patches/14_alloc_params.patch.
+ Thanks to Neal H. Walfield <neal@cs.uml.edu>.
+ * Reverse the meaning of --enable-ide-forcedma.
+ - debian/patches/13_ide_dma.patch.
+ Thanks to Sergio López <koro@menteslibres.org> for noticing.
+
+ -- Guillem Jover <guillem@debian.org> Sat, 14 May 2005 20:42:29 +0300
+
+gnumach (1:20050501-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ - debian/patches/12_fixes_gcc-3.4.patch: Remove upstream integrated patch.
+ - debian/patches/14_disable_fpe.patch: Likewise.
+ - debian/patches/15_disable_qlogic_firmware.patch: Likewise.
+ - debian/patches/16_enable_debug.patch: Likewise.
+ - debian/patches/17_fix_double_free.patch: Likewise.
+ - debian/patches/18_linux_printk_buffer_overrun.patch: Likewise.
+ - debian/patches/19_cpu_detect.patch: Likewise.
+ - debian/patches/20_glue_block_assert.patch: Likewise.
+ - debian/patches/10_cdromlock.patch: Rediff.
+ - debian/patches/90_autoconf_autogen.patch: Regenerate.
+ * Add support for SiS 900 NIC.
+ - debian/patches/12_sis900.patch: New file.
+ Thanks to Andreas B. Mundt <andi.mundt@web.de>.
+ * Move configure drivers list to debian/rules.options.
+
+ -- Guillem Jover <guillem@debian.org> Sun, 1 May 2005 20:29:08 +0300
+
+gnumach (1:20040915.dfsg.1-2) unstable; urgency=low
+
+ * Fix a typo in natsemi driver enable command. (Closes: #293950)
+ Thanks to Regis Boudin <regis.boudin@gmail.com>.
+ * Sync patches with latest ones sent to upstream.
+ * Remove leftover assert on the block glue code.
+ * Fix Subversion repository address.
+
+ -- Guillem Jover <guillem@debian.org> Thu, 10 Feb 2005 06:19:15 +0100
+
+gnumach (1:20040915.dfsg.1-1) unstable; urgency=low
+
+ * Repackage upstream source to remove binary only data. (Closes: #252323)
+ - i386/i386/fpe.b: Remove binary without source.
+ - i386/i386/fpe.b_elf: Likewise.
+ - linux/src/drivers/scsi/qlogicisp_asm.c: Likewise.
+ * Disable floating point emulation usage.
+ * Disable qlogicisp firmware loading.
+ * Change "ifdef DEBUG" to "ifndef NDEBUG" for asserts and other low
+ footprint debugging stuff, so building with asserts enabled by default.
+ * Fix double free and memory loss probing partition table.
+ Thanks to Neal H. Walfield <neal@cs.uml.edu>.
+ * Fix possible buffer overrun on linux printk.
+ Thanks to Neal H. Walfield <neal@cs.uml.edu>.
+ * Fix cpu detection code.
+ * Do not use stamp files for build targets.
+
+ -- Guillem Jover <guillem@debian.org> Mon, 22 Nov 2004 04:50:50 +0100
+
+gnumach (1:20040915-1) unstable; urgency=low
+
+ * New upstream CVS snapshot.
+ * Changed Maintainer address.
+ * Added former implicit maintainers to Uploaders.
+ * Added myself to Uploaders.
+ * Cleaned and updated debian/copyright file.
+ * Honour DEB_BUILD_OPTIONS.
+ * Split patches into debian/patches/.
+ * Allow to build natively on non GNU/Hurd systems.
+ * Enable i386, kfreebsd-i386 and knetbsd-i386 on all packages.
+ * Move gnumach-dev to binary-arch in debian/rules.
+ * Switched to debhelper.
+ * Now using Standards-Version 3.6.1.
+ * Update autoconf.
+ Based on a patch by Neal H. Walfield <neal@cs.uml.edu>, thanks.
+ * Update NICs from Linux.
+ Thanks to Alfred M. Szmidt <ams@kemisten.nu> and
+ Arief M. Utama <arief_mulya@yahoo.com>.
+ * Add newer IDE DMA support.
+ Thanks to Sergio López <koro@menteslibres.org>.
+ * Fix build failures for gcc-3.4.
+
+ -- Guillem Jover <guillem@debian.org> Mon, 25 Oct 2004 09:53:30 +0200
+
+gnumach (1:20040229-1) unstable; urgency=low
+
+ * Update to CVS 20040229.
+ * debian/control: Add texinfo to build dependencies.
+ * debian/control: Add myself as uploader.
+ * Patches applied to CVS code: cdromlock.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sun, 29 Feb 2004 21:43:12 +0200
+
+gnumach (1:20020421-1) unstable; urgency=low
+
+ * Update to CVS 20020421.
+ * Patches applied to CVS code: cdromlock.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sun, 21 Apr 2002 18:53:13 +0200
+
+gnumach (1:20011013-1) unstable; urgency=low
+
+ * Update to CVS 20011013.
+ * Patches applied to CVS code: cdromlock.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sat, 13 Oct 2001 00:21:15 +0200
+
+gnumach (1:20011005-2) unstable; urgency=low
+
+ * Update to CVS 20011005.
+ * Patches applied to CVS code: cdromlock.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Fri, 5 Oct 2001 21:14:51 +0200
+
+gnumach (1:20010918-1) unstable; urgency=low
+
+ * Update to CVS 2001918.
+ * Patches applied to CVS code: cdromlock.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Tue, 18 Sep 2001 23:15:17 +0200
+
+gnumach (1:20010818-1) unstable; urgency=low
+
+ * Update to CVS 20010718.
+ * Patches applied to CVS code: cdromlock.
+ The other patches are in CVS now.
+
+ * Wading through the bug list, there are some old bugs
+ fixed long ago, closes: #37954, #47948, #85302, #45792
+ * debian/rules: Make it build via direct invocation, submitted
+ by Robert Bihlmeyer, closes: #101697.
+
+ * control: New package gnumach-dbg. This kernel is not stripped and includes the
+ kernel-level debugger.
+ * debian/rules: Build this package.
+
+ -- Marcus Brinkmann <brinkmd@debian.de> Sat, 18 Aug 2001 02:15:06 +0200
+
+gnumach (1:20010718-1) unstable; urgency=low
+
+ * Update to CVS 20010718.
+ * Patches applied to CVS code: cdromlock, color, kbd_enqueu.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Wed, 18 Jul 2001 22:10:20 +0200
+
+gnumach (1:1.2-11) unstable; urgency=low
+
+ * debian/rules (stamp-configure): Add ncr53c8xx driver.
+ * Update to CVS 20010528.
+ * Patches applied to CVS code: cdromlock, color, kbd_enqueu.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sun, 27 May 2001 14:14:12 +0200
+
+gnumach (1:1.2-10) unstable; urgency=low
+
+ * debian/rules (stamp-configure): Disable eatadma driver, which
+ prevents booting on some AMD K7 motherboards. Reported by
+ Robert Bihlmeyer <robbe@orcus.priv.at>.
+ * Update to CVS 20010429, which contains support for high baud rates
+ (B57600, B115200).
+ * Patches applied to CVS code: cdromlock, color, kbd_enqueu.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sun, 29 Apr 2001 21:41:34 +0200
+
+gnumach (1:1.2-9) unstable; urgency=low
+
+ * Update to CVS 20010111, which contains a new interface for
+ block devices with a large number of blocks.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Thu, 11 Jan 2001 23:45:49 +0100
+
+gnumach (1:1.2-8) unstable; urgency=low
+
+ * Applied patch by Alexey Dejneka <adejneka@comail.ru> to fix CD ROM
+ locking problem.
+ * debian/control: Add mig and sharutils to list of build dependencies
+ (sharutils for uudecode for fpu emu), closes: #74794.
+ * linux/src/drivers/net/tulip.c: Update from Linux 2.2.17, thanks
+ Jason Henry Parker <jasonp@uq.net.au>
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sun, 26 Nov 2000 03:46:08 +0100
+
+gnumach (1:1.2-7) unstable; urgency=low
+
+ * Update to CVS 20000929, which contains a fix for comX.
+ * debian/rules: Drop --enable-lpr, which doesn't work.
+ Drop --enable-com, which is already enforced.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Fri, 29 Sep 2000 20:24:54 +0200
+
+gnumach (1:1.2-5) unstable; urgency=low
+
+ * Update to CVS 20000817, which contains a fix for
+ linux/dev/glue/block.c.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Thu, 17 Aug 2000 03:22:30 +0200
+
+gnumach (1:1.2-4) unstable; urgency=low
+
+ * Add color support to gnumach. Set TERM to mach-color to get the full
+ effect. Thanks to Juli-Manel Merino Vidal <jmmv@mail.com> for working
+ out the mapping between ANSI color codes and the bits to poke into the
+ attribute.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Tue, 8 Aug 2000 21:00:50 +0200
+
+gnumach (1:1.2-3) unstable; urgency=low
+
+ * Snapshot from CVS 20000703.
+ * i386/i386at/kd.c: Receive 0xE0 scan codes (patch by Kalle Olavi Niemitalo).
+ * Patch to get it compile with gcc-2.95.1 or newer
+ ( by "Weil, Stefan 3732 EPE-24" <Stefan.Weil@de.heidelberg.com>
+ and Igor Khavkine <i_khavki@alcor.concordia.ca>)
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Mon, 3 Jul 2000 21:05:42 +0200
+
+gnumach (1:1.2-2) unstable; urgency=low
+
+ * Snapshot from CVS 19990907.
+ * Reenable all network interfaces, because the problem is fixed.
+ * Gzip gnumach binary.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Wed, 8 Sep 1999 00:15:39 +0200
+
+gnumach (1:1.2-1) unstable; urgency=low
+
+ * Snapshot from CVS 19990725.
+ * Start from official 1.2 release.
+ * Remove some network card drivers that seems to have no autodetection in
+ order to get a maximum set of cards enabled that allows GNU Mach to detect
+ at least one.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Mon, 26 Jul 1999 01:31:31 +0200
+
+gnumach (1:1.1.92-5) unstable; urgency=low
+
+ * Snapshot from CVS 19990616.
+ * Marks dummy network driver still there.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Thu, 17 Jun 1999 16:53:50 +0200
+
+gnumach (1:1.1.92-4) unstable; urgency=low
+
+ * Snapshot from CVS 19990602.
+ * Marks dummy network driver still there.
+ * Replaced linux/dev/drivers/block/genhd.c to avoid a bug.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sat, 5 Jun 1999 00:59:43 +0200
+
+gnumach (1:1.1.92-2) unstable; urgency=low
+
+ * Snapshot from CVS 19990524.
+ * Applied Marks dummy network driver.
+ * Enabled thousands more devices.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Mon, 24 May 1999 18:00:19 +0200
+
+gnumach (1:1.1.92-1) unstable; urgency=low
+
+ * Snapshot from CVS 19990507.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Fri, 7 May 1999 20:46:06 +0200
+
+gnumach (1:1.1.90-2) unstable; urgency=low
+
+ * Fix package administration information to reflect that maintainership
+ has been transferred to bug-hurd@gnu.org.
+ * Merge a few configuration fixes from Marcus Brinkmann.
+ * Install include files into /usr/include, for the benefit of people
+ without the /usr symlink.
+
+ -- Gordon Matzigkeit <bug-hurd@gnu.org> Wed, 17 Feb 1999 16:50:54 -0600
+
+gnumach (1:1.1.90-1) unstable; urgency=low
+
+ * New version from OKUJI Yoshinori.
+ * Use DEB_{BUILD,HOST}_GNU_TYPE, in accordance with Marcus's new
+ cross-build proposal.
+
+ -- Gordon Matzigkeit <gord@debian.org> Tue, 11 Feb 1999 22:14:01 -0600
+
+gnumach (19990116-1) unstable; urgency=low
+
+ * New version from OKUJI Yoshinori.
+ * Added kmsg.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Mon, 18 Jan 1999 17:11:58 +0100
+
+gnumach (19981118-2) unstable; urgency=low
+
+ * Split into gnumach and gnumach-dev.
+ * Added keyboard patch by Tudor Hulubei <tudor@cs.unh.edu> to fix some
+ keybord issues.
+ * Bumped Standards: version to 2.5.0.0.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sun, 3 Jan 1999 13:53:28 +0100
+
+gnumach (19981118-1) unstable; urgency=low
+
+ * New version from OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>.
+ This is not a new upstream version, but includes the Linux 2.0.36 driver.
+ * Strip the kernel.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sat, 19 Dec 1998 05:27:30 +0100
+
+gnumach (19981025-1) unstable; urgency=low
+
+ * New upstream snapshot.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sat, 7 Nov 1998 18:56:53 +0100
+
+gnumach (1.1.3-2) unstable; urgency=low
+
+ * Added CPU_TYPE_{I486,PENTIUM,PENTIUMPRO,POWERPC} to
+ ./include/mach/machine.h. This is needed for latest hurd release.
+ * Changed description (thank you, Santiagio).
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sat, 1 Aug 1998 21:33:31 +0200
+
+gnumach (1.1.3-1) unstable; urgency=low
+
+ * Initial Version.
+
+ -- Marcus Brinkmann <brinkmd@debian.org> Sat, 1 Aug 1998 21:33:31 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7f8f011
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..82b62b6
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,133 @@
+Source: gnumach
+Section: kernel
+Priority: optional
+Maintainer: GNU Hurd Maintainers <debian-hurd@lists.debian.org>
+Uploaders: Guillem Jover <guillem@debian.org>,
+ Samuel Thibault <sthibault@debian.org>
+Homepage: http://www.gnu.org/software/hurd/microkernel/mach/gnumach.html
+Vcs-Browser: http://git.debian.org/?p=pkg-hurd/gnumach.git
+Vcs-Git: git://git.debian.org/pkg-hurd/gnumach.git
+Build-Depends: debhelper (>= 7), mig, sharutils,
+ autoconf, automake
+Standards-Version: 3.9.2
+
+Package: gnumach
+Architecture: any-i386
+Depends: ${misc:Depends}, gnumach-image-1-486
+Breaks: grub-pc (<< 1.98+20100527-1)
+Description: Dummy transition package for gnumach-image-*
+ This is a dummy package to ease the transition to gnumach-image-*
+ package names. It can be purged safely after upgrade.
+
+Package: gnumach-dbg
+Section: debug
+Priority: extra
+Architecture: any-i386
+Depends: ${misc:Depends}, gnumach (= ${binary:Version}), gnumach-image-1.3.99-486-dbg
+Breaks: grub-pc (<< 1.98+20100527-1)
+Description: Dummy transition package for gnumach-image-*-dbg
+ This is a dummy package to ease the transition to gnumach-image-*dbg
+ package names. It can be purged safely after upgrade.
+
+Package: gnumach-image-1-486
+Architecture: any-i386
+Depends: ${misc:Depends}, gnumach-image-1.3.99-486
+Description: The GNU version of the Mach microkernel
+ This package depends on the latest GNU Mach kernel for use on PCs
+ with a 486, Pentium or compatible processor.
+
+Package: gnumach-image-1-xen-486
+Architecture: any-i386
+Depends: ${misc:Depends}, gnumach-image-1.3.99-xen-486
+Description: The GNU version of the Mach microkernel
+ This package depends on the latest GNU Mach kernel for use on PCs
+ with a 486, Pentium or compatible processor.
+ .
+ This kernel is for use in unprivileged (domU) Xen domains.
+
+Package: gnumach-image-1.3.99-486
+Architecture: any-i386
+Depends: ${misc:Depends}
+Provides: gnumach-image
+Breaks: libc0.3 (<< 2.10.1-3)
+Description: The GNU version of the Mach microkernel
+ This is the Utah Mach microkernel used by the Hurd.
+
+Package: gnumach-image-1.3.99-xen-486
+Architecture: any-i386
+Depends: ${misc:Depends}
+Provides: gnumach-image
+Breaks: libc0.3 (<< 2.10.1-3)
+Description: The GNU version of the Mach microkernel for Xen
+ This is the Utah Mach microkernel used by the Hurd.
+ .
+ The version in this package is compiled with Xen support.
+
+Package: kernel-image-1.3.99-486-di
+XB-Kernel-Version: 1.3.99-486
+Package-Type: udeb
+Provides: kernel-image, floppy-modules, ide-modules, input-modules, nic-modules, nic-pcmcia-modules, nic-wireless-modules, pcmcia-modules, scsi-modules, serial-modules
+Section: debian-installer
+Architecture: hurd-i386
+Depends: ${misc:Depends}, hurd-udeb
+Description: The GNU version of the Mach microkernel for the Debian installer
+ This is the Utah Mach microkernel used by the Hurd for the Debian
+ Installer boot images. It does _not_ provide a usable kernel for
+ your full Debian system.
+
+Package: kernel-image-1.3.99-xen-486-di
+XB-Kernel-Version: 1.3.99-xen-486
+Package-Type: udeb
+Provides: kernel-image, input-modules, nic-modules
+Section: debian-installer
+Architecture: hurd-i386
+Depends: ${misc:Depends}, hurd-udeb
+Description: The GNU version of the Mach microkernel for the Debian installer
+ This is the Utah Mach microkernel used by the Hurd for the Debian
+ Installer boot images. It does _not_ provide a usable kernel for
+ your full Debian system.
+
+Package: gnumach-image-1.3.99-486-dbg
+Section: debug
+Priority: extra
+Provides: gnumach
+Architecture: any-i386
+Depends: ${misc:Depends}
+Description: The GNU version of the Mach microkernel for debugging
+ This is the Utah Mach microkernel used by the Hurd.
+ .
+ The version in this package is identical to the version found in the
+ gnumach package, except that it is not stripped and has the
+ kernel-level debugger compiled in.
+
+Package: gnumach-image-1.3.99-xen-486-dbg
+Section: debug
+Priority: extra
+Provides: gnumach
+Architecture: any-i386
+Depends: ${misc:Depends}
+Description: The GNU version of the Mach microkernel for Xen for debugging
+ This is the Utah Mach microkernel used by the Hurd.
+ .
+ The version in this package is identical to the version found in the
+ gnumach-xen package, except that it is not stripped and has the
+ kernel-level debugger compiled in.
+
+Package: gnumach-common
+Section: devel
+Architecture: all
+Depends: ${misc:Depends}
+Replaces: gnumach (<< 2:1.3.99.dfsg.git20110227-1)
+Breaks: gnumach (<< 2:1.3.99.dfsg.git20110227-1)
+Description: The GNU version of the Mach microkernel, common files.
+ These are common files along the Utah Mach microkernel used by the Hurd.
+ .
+ It notably provides useful messages IDs for rpctrace.
+
+Package: gnumach-dev
+Section: devel
+Architecture: any-i386
+Depends: ${misc:Depends}
+Description: The GNU version of the Mach microkernel
+ These are the header files for the Utah Mach microkernel used by the Hurd.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..813d368
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,62 @@
+This package was originally debianized by Marcus Brinkmann
+<brinkmd@debian.org> on Sat, 1 Aug 1998 21:26:37 +0200
+
+It is currently maintained by its upstream authors, who can be reached
+via <bug-hurd@gnu.org>.
+
+It was downloaded from:
+
+ <git://git.sv.gnu.org/hurd/gnumach.git>
+
+License statement:
+
+Please look at the source files for individual copyrights. They are covered
+by either of the following copyrights:
+
+The doc/ directory contained the manual which was under the GFDL, and was
+thus removed from the original tarball, and it repacked.
+
+Most of these files are licensed under the following terms:
+
+ Mach Operating System
+ Copyright (c) 1993-1989 Carnegie Mellon University
+ All Rights Reserved.
+
+ Permission to use, copy, modify and distribute this software and its
+ documentation is hereby granted, provided that both the copyright
+ notice and this permission notice appear in all copies of the
+ software, derivative works or modified versions, and any portions
+ thereof, and that both notices appear in supporting documentation.
+
+ CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+
+ Carnegie Mellon requests users of this software to return to
+
+ Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ School of Computer Science
+ Carnegie Mellon University
+ Pittsburgh PA 15213-3890
+
+ any improvements or extensions that they make and grant Carnegie Mellon
+ the rights to redistribute these changes.
+
+Some of these files are licensed under the following terms:
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 dated June, 1991.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in '/usr/share/common-licenses/GPL-2'.
+
diff --git a/debian/gnumach-common.info b/debian/gnumach-common.info
new file mode 100644
index 0000000..87c8231
--- /dev/null
+++ b/debian/gnumach-common.info
@@ -0,0 +1 @@
+#build/doc/mach.info*
diff --git a/debian/gnumach-common.install b/debian/gnumach-common.install
new file mode 100644
index 0000000..fc04c04
--- /dev/null
+++ b/debian/gnumach-common.install
@@ -0,0 +1 @@
+usr/share/msgids
diff --git a/debian/gnumach-dev.docs b/debian/gnumach-dev.docs
new file mode 100644
index 0000000..edc0071
--- /dev/null
+++ b/debian/gnumach-dev.docs
@@ -0,0 +1 @@
+NEWS
diff --git a/debian/gnumach-dev.install b/debian/gnumach-dev.install
new file mode 100644
index 0000000..e43b95c
--- /dev/null
+++ b/debian/gnumach-dev.install
@@ -0,0 +1 @@
+usr/include
diff --git a/debian/gnumach-image-1.3.99-486-dbg.docs b/debian/gnumach-image-1.3.99-486-dbg.docs
new file mode 100644
index 0000000..4b4e16d
--- /dev/null
+++ b/debian/gnumach-image-1.3.99-486-dbg.docs
@@ -0,0 +1,3 @@
+README
+NEWS
+i386/README-Drivers
diff --git a/debian/gnumach-image-1.3.99-486-dbg.install b/debian/gnumach-image-1.3.99-486-dbg.install
new file mode 100644
index 0000000..36ef4c3
--- /dev/null
+++ b/debian/gnumach-image-1.3.99-486-dbg.install
@@ -0,0 +1 @@
+boot
diff --git a/debian/gnumach-image-1.3.99-486.docs b/debian/gnumach-image-1.3.99-486.docs
new file mode 100644
index 0000000..4b4e16d
--- /dev/null
+++ b/debian/gnumach-image-1.3.99-486.docs
@@ -0,0 +1,3 @@
+README
+NEWS
+i386/README-Drivers
diff --git a/debian/gnumach-image-1.3.99-486.install b/debian/gnumach-image-1.3.99-486.install
new file mode 100644
index 0000000..36ef4c3
--- /dev/null
+++ b/debian/gnumach-image-1.3.99-486.install
@@ -0,0 +1 @@
+boot
diff --git a/debian/gnumach-image-1.3.99-xen-486-dbg.docs b/debian/gnumach-image-1.3.99-xen-486-dbg.docs
new file mode 100644
index 0000000..9eafbe1
--- /dev/null
+++ b/debian/gnumach-image-1.3.99-xen-486-dbg.docs
@@ -0,0 +1,2 @@
+README
+NEWS
diff --git a/debian/gnumach-image-1.3.99-xen-486-dbg.install b/debian/gnumach-image-1.3.99-xen-486-dbg.install
new file mode 100644
index 0000000..36ef4c3
--- /dev/null
+++ b/debian/gnumach-image-1.3.99-xen-486-dbg.install
@@ -0,0 +1 @@
+boot
diff --git a/debian/gnumach-image-1.3.99-xen-486.docs b/debian/gnumach-image-1.3.99-xen-486.docs
new file mode 100644
index 0000000..9eafbe1
--- /dev/null
+++ b/debian/gnumach-image-1.3.99-xen-486.docs
@@ -0,0 +1,2 @@
+README
+NEWS
diff --git a/debian/gnumach-image-1.3.99-xen-486.install b/debian/gnumach-image-1.3.99-xen-486.install
new file mode 100644
index 0000000..36ef4c3
--- /dev/null
+++ b/debian/gnumach-image-1.3.99-xen-486.install
@@ -0,0 +1 @@
+boot
diff --git a/debian/gnumach-image.postinst.in b/debian/gnumach-image.postinst.in
new file mode 100644
index 0000000..c44672b
--- /dev/null
+++ b/debian/gnumach-image.postinst.in
@@ -0,0 +1,66 @@
+#! /bin/sh
+# postinst script
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+KERNEL_IMG_CONF="/etc/kernel-img.conf"
+RELEASE="@RELEASE@"
+VERSION="@VERSION@"
+
+case "$1" in
+ configure)
+ # Sanitize and quote maintainer script parameters
+ for p in "$@"; do
+ q="$(echo "$p" | sed -e "s/'/'\\''/g")"
+ DEB_MAINT_PARAMS="$DEB_MAINT_PARAMS '$q'"
+ done
+ export DEB_MAINT_PARAMS
+
+ # Run /etc/kernel-img.conf postinst hook if defined
+ postinst_hook=$(sed '/^\s*postinst_hook/!d;s/.*=\s*//' $KERNEL_IMG_CONF 2>/dev/null || true)
+ if [ -n "$postinst_hook" ] ; then
+ echo "Running postinst hook script $postinst_hook." 1>&2
+ $postinst_hook "$RELEASE" "/boot/gnumach-$RELEASE.gz"
+ fi
+
+ # Run /etc/kernel/postinst.d/ hooks if they exist
+ if [ -d "/etc/kernel/postinst.d" ] ; then
+ run-parts --verbose --exit-on-error \
+ --arg=$RELEASE \
+ --arg=/boot/gnumach-$RELEASE.gz \
+ /etc/kernel/postinst.d
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/gnumach-image.postrm.in b/debian/gnumach-image.postrm.in
new file mode 100644
index 0000000..1513cad
--- /dev/null
+++ b/debian/gnumach-image.postrm.in
@@ -0,0 +1,66 @@
+#!/bin/sh
+# postrm script
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+KERNEL_IMG_CONF="/etc/kernel-img.conf"
+RELEASE="@RELEASE@"
+VERSION="@VERSION@"
+
+case "$1" in
+ remove)
+ # Sanitize and quote maintainer script parameters
+ for p in "$@"; do
+ q="$(echo "$p" | sed -e "s/'/'\\''/g")"
+ DEB_MAINT_PARAMS="$DEB_MAINT_PARAMS '$q'"
+ done
+ export DEB_MAINT_PARAMS
+
+ # Run /etc/kernel-img.conf postrm hook if defined
+ postrm_hook=$(sed '/^\s*postrm_hook/!d;s/.*=\s*//' $KERNEL_IMG_CONF 2>/dev/null || true)
+ if [ -n "$postrm_hook" ] ; then
+ echo "Running postrm hook script $postrm_hook." 1>&2
+ $postrm_hook "$RELEASE" "/boot/gnumach-$RELEASE.gz"
+ fi
+
+ # Run /etc/kernel/postrm.d/ hooks if they exist
+ if [ -d "/etc/kernel/postrm.d" ]; then
+ echo "Running /etc/kernel/postrm.d hooks..." 1>&2
+ run-parts --verbose --exit-on-error \
+ --arg=$RELEASE \
+ --arg=/boot/gnumach-$RELEASE.gz \
+ /etc/kernel/postrm.d
+ fi
+ ;;
+
+ purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/gnumach-image.preinst.in b/debian/gnumach-image.preinst.in
new file mode 100644
index 0000000..eab4f73
--- /dev/null
+++ b/debian/gnumach-image.preinst.in
@@ -0,0 +1,61 @@
+#!/bin/sh
+# preinst script
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+KERNEL_IMG_CONF="/etc/kernel-img.conf"
+RELEASE="@RELEASE@"
+VERSION="@VERSION@"
+
+case "$1" in
+ install|upgrade)
+ # Sanitize and quote maintainer script parameters
+ for p in "$@"; do
+ q="$(echo "$p" | sed -e "s/'/'\\''/g")"
+ DEB_MAINT_PARAMS="$DEB_MAINT_PARAMS '$q'"
+ done
+ export DEB_MAINT_PARAMS
+
+ # Run preinst hook if defined
+ preinst_hook=$(sed '/^\s*preinst_hook/!d;s/.*=\s*//' $KERNEL_IMG_CONF 2>/dev/null || true)
+ if [ -n "$preinst_hook" ] ; then
+ echo "Running preinst hook script $preinst_hook." 1>&2
+ $preinst_hook "$RELEASE" "/boot/gnumach-$RELEASE.gz"
+ fi
+
+ # Run /etc/kernel/preinst.d/ hooks if they exist
+ if [ -d "/etc/kernel/preinst.d" ]; then
+ echo "Running /etc/kernel/preinst.d hooks..." 1>&2
+ run-parts --verbose --exit-on-error \
+ --arg=$RELEASE \
+ --arg=/boot/gnumach-$RELEASE.gz \
+ /etc/kernel/preinst.d
+ fi
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/gnumach-image.prerm.in b/debian/gnumach-image.prerm.in
new file mode 100644
index 0000000..c82616c
--- /dev/null
+++ b/debian/gnumach-image.prerm.in
@@ -0,0 +1,64 @@
+#!/bin/sh
+# prerm script
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+KERNEL_IMG_CONF="/etc/kernel-img.conf"
+RELEASE="@RELEASE@"
+VERSION="@VERSION@"
+
+case "$1" in
+ remove)
+ # Sanitize and quote maintainer script parameters
+ for p in "$@"; do
+ q="$(echo "$p" | sed -e "s/'/'\\''/g")"
+ DEB_MAINT_PARAMS="$DEB_MAINT_PARAMS '$q'"
+ done
+ export DEB_MAINT_PARAMS
+
+ # Run prerm hook if defined
+ prerm_hook=$(sed '/^\s*prerm_hook/!d;s/.*=\s*//g' $KERNEL_IMG_CONF 2>/dev/null || true)
+ if [ -n "$prerm_hook" ] ; then
+ echo "Running prerm hook script $prerm_hook." 1>&2
+ $prerm_hook "$RELEASE" "/boot/gnumach-$RELEASE.gz"
+ fi
+
+ # Run /etc/kernel/prerm.d/ hooks if they exist
+ if [ -d "/etc/kernel/prerm.d" ]; then
+ echo "Running /etc/kernel/prerm.d hooks..." 1>&2
+ run-parts --verbose --exit-on-error \
+ --arg=$RELEASE \
+ --arg=/boot/gnumach-$RELEASE.gz \
+ /etc/kernel/prerm.d
+ fi
+ ;;
+
+ failed-upgrade|upgrade|deconfigure)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/kernel-image-1.3.99-486-di.install b/debian/kernel-image-1.3.99-486-di.install
new file mode 100644
index 0000000..36ef4c3
--- /dev/null
+++ b/debian/kernel-image-1.3.99-486-di.install
@@ -0,0 +1 @@
+boot
diff --git a/debian/kernel-image-1.3.99-xen-486-di.install b/debian/kernel-image-1.3.99-xen-486-di.install
new file mode 100644
index 0000000..36ef4c3
--- /dev/null
+++ b/debian/kernel-image-1.3.99-xen-486-di.install
@@ -0,0 +1 @@
+boot
diff --git a/debian/patches/00_clean_gfdl.patch b/debian/patches/00_clean_gfdl.patch
new file mode 100644
index 0000000..05e2a87
--- /dev/null
+++ b/debian/patches/00_clean_gfdl.patch
@@ -0,0 +1,15 @@
+Mach's GFDL documentation is not DFSG-free, we need to drop the build rules.
+
+Index: b/Makefile.am
+===================================================================
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -117,7 +117,7 @@ include Makefrag.am
+ include tests/Makefrag.am
+
+ # Documentation.
+-include doc/Makefrag.am
++#include doc/Makefrag.am
+
+ #
+ # Kernel Image
diff --git a/debian/patches/10_cdromlock.patch b/debian/patches/10_cdromlock.patch
new file mode 100644
index 0000000..436f97c
--- /dev/null
+++ b/debian/patches/10_cdromlock.patch
@@ -0,0 +1,93 @@
+Index: b/linux/dev/glue/block.c
+===================================================================
+--- a/linux/dev/glue/block.c
++++ b/linux/dev/glue/block.c
+@@ -789,6 +789,7 @@ static struct block_data *open_list;
+ extern struct device_emulation_ops linux_block_emulation_ops;
+
+ static io_return_t device_close (void *);
++static io_return_t device_close_forced (void *, int);
+
+ /* Return a send right for block device BD. */
+ static ipc_port_t
+@@ -1164,6 +1165,7 @@ out:
+ {
+ ipc_kobject_set (bd->port, IKO_NULL, IKOT_NONE);
+ ipc_port_dealloc_kernel (bd->port);
++ *devp = IP_NULL;
+ }
+ kfree ((vm_offset_t) bd, sizeof (struct block_data));
+ bd = NULL;
+@@ -1174,18 +1176,16 @@ out:
+ bd->open_count = 1;
+ bd->next = open_list;
+ open_list = bd;
++ *devp = &bd -> device;
+ }
+
+- if (IP_VALID (reply_port))
+- ds_device_open_reply (reply_port, reply_port_type, err, dev_to_port (bd));
+- else if (! err)
++ if (!IP_VALID (reply_port) && ! err)
+ device_close (bd);
+-
+- return MIG_NO_REPLY;
++ return err;
+ }
+
+ static io_return_t
+-device_close (void *d)
++device_close_forced (void *d, int force)
+ {
+ struct block_data *bd = d, *bdp, **prev;
+ struct device_struct *ds = bd->ds;
+@@ -1202,7 +1202,7 @@ device_close (void *d)
+ }
+ ds->busy = 1;
+
+- if (--bd->open_count == 0)
++ if (force || --bd->open_count == 0)
+ {
+ /* Wait for pending I/O to complete. */
+ while (bd->iocount > 0)
+@@ -1245,6 +1245,13 @@ device_close (void *d)
+ return D_SUCCESS;
+ }
+
++static io_return_t
++device_close (void *d)
++{
++ return device_close_forced (d, 0);
++}
++
++
+ #define MAX_COPY (VM_MAP_COPY_PAGE_LIST_MAX << PAGE_SHIFT)
+
+ /* Check block BN and size COUNT for I/O validity
+@@ -1704,6 +1711,17 @@ device_get_status (void *d, dev_flavor_t
+ return D_INVALID_OPERATION;
+ }
+
++
++static void
++device_no_senders (mach_no_senders_notification_t *ns)
++{
++ device_t dev;
++
++ dev = dev_port_lookup((ipc_port_t) ns->not_header.msgh_remote_port);
++ assert(dev);
++ device_close_forced (dev->emul_data, 1);
++}
++
+ struct device_emulation_ops linux_block_emulation_ops =
+ {
+ NULL,
+@@ -1719,7 +1737,7 @@ struct device_emulation_ops linux_block_
+ device_get_status,
+ NULL,
+ NULL,
+- NULL,
++ device_no_senders,
+ NULL,
+ NULL
+ };
diff --git a/debian/patches/11_ignore_CSIn.patch b/debian/patches/11_ignore_CSIn.patch
new file mode 100644
index 0000000..4536672
--- /dev/null
+++ b/debian/patches/11_ignore_CSIn.patch
@@ -0,0 +1,15 @@
+diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
+index eaeea1b..03c1e06 100644
+--- a/i386/i386at/kd.c
++++ b/i386/i386at/kd.c
+@@ -1754,6 +1754,10 @@ u_char *cp;
+ kd_erase(number[0]);
+ esc_spt = esc_seq;
+ break;
++ case 'n':
++ /* Ignore status/cursor report request */
++ esc_spt = esc_seq;
++ break;
+ case '\0':
+ break; /* not enough yet */
+ default:
diff --git a/debian/patches/13_ide_dma.patch b/debian/patches/13_ide_dma.patch
new file mode 100644
index 0000000..ff1dacd
--- /dev/null
+++ b/debian/patches/13_ide_dma.patch
@@ -0,0 +1,1085 @@
+Do not --enable-ide-forcedma by default, it's too dangerous on non-DMA
+supporting hardware.
+
+2004-09-17 Sergio Lopez <koro@sinrega.org>
+
+
+Index: b/linux/src/drivers/block/ide.c
+===================================================================
+--- a/linux/src/drivers/block/ide.c
++++ b/linux/src/drivers/block/ide.c
+@@ -3594,9 +3594,6 @@ static void ide_probe_promise_20246(void
+ hwif->ctl_port = io[tmp + 1] + 2;
+ hwif->noprobe = 0;
+ }
+-#ifdef CONFIG_BLK_DEV_TRITON
+- ide_init_promise (bus, fn, &ide_hwifs[2], &ide_hwifs[3], io[4]);
+-#endif /* CONFIG_BLK_DEV_TRITON */
+ }
+
+ #endif /* CONFIG_PCI */
+@@ -3629,6 +3626,9 @@ static void probe_for_hwifs (void)
+ ide_probe_pci (PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371_0, &ide_init_triton, 1);
+ ide_probe_pci (PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_1, &ide_init_triton, 0);
+ ide_probe_pci (PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB, &ide_init_triton, 0);
++ ide_probe_pci (PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5513, &ide_init_triton, 0);
++ ide_probe_pci (PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, &ide_init_triton, 0);
++ ide_probe_pci (PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229, &ide_init_triton, 0);
+ #endif /* CONFIG_BLK_DEV_TRITON */
+ ide_probe_promise_20246();
+ }
+@@ -3703,8 +3703,9 @@ int ide_init (void)
+
+ init_ide_data ();
+ /*
+- * Probe for special "known" interface chipsets
++ * Probe for special "known" interface chipsets.
+ */
++
+ probe_for_hwifs ();
+
+ /*
+Index: b/linux/src/drivers/block/ide.h
+===================================================================
+--- a/linux/src/drivers/block/ide.h
++++ b/linux/src/drivers/block/ide.h
+@@ -429,7 +429,8 @@ typedef void (ide_selectproc_t) (ide_dri
+ typedef enum { ide_unknown, ide_generic, ide_triton,
+ ide_cmd640, ide_dtc2278, ide_ali14xx,
+ ide_qd6580, ide_umc8672, ide_ht6560b,
+- ide_promise, ide_promise_udma }
++ ide_promise, ide_hpt343, ide_udma,
++ ide_ultra66 }
+ hwif_chipset_t;
+
+ typedef struct hwif_s {
+Index: b/linux/src/drivers/block/triton.c
+===================================================================
+--- a/linux/src/drivers/block/triton.c
++++ b/linux/src/drivers/block/triton.c
+@@ -1,107 +1,20 @@
+ /*
+ * linux/drivers/block/triton.c Version 1.13 Aug 12, 1996
++ * Version 1.13a June 1998 - new chipsets
++ * Version 1.13b July 1998 - DMA blacklist
++ * Version 1.14 June 22, 1999
+ *
++ * Copyright (c) 1998-1999 Andre Hedrick
+ * Copyright (c) 1995-1996 Mark Lord
+ * May be copied or modified under the terms of the GNU General Public License
+ */
+
+ /*
+- * This module provides support for the Bus Master IDE DMA function
+- * of the Intel PCI Triton I/II chipsets (i82371FB or i82371SB).
+- *
+- * Pretty much the same code will work for the OPTi "Viper" chipset.
+- * Look for DMA support for this in linux kernel 2.1.xx, when it appears.
+- *
+- * DMA is currently supported only for hard disk drives (not cdroms).
+- *
+- * Support for cdroms will likely be added at a later date,
+- * after broader experience has been obtained with hard disks.
+- *
+- * Up to four drives may be enabled for DMA, and the Triton chipset will
+- * (hopefully) arbitrate the PCI bus among them. Note that the i82371 chip
+- * provides a single "line buffer" for the BM IDE function, so performance of
+- * multiple (two) drives doing DMA simultaneously will suffer somewhat,
+- * as they contest for that resource bottleneck. This is handled transparently
+- * inside the i82371 chip.
+- *
+- * By default, DMA support is prepared for use, but is currently enabled only
+- * for drives which support multi-word DMA mode2 (mword2), or which are
+- * recognized as "good" (see table below). Drives with only mode0 or mode1
+- * (single or multi) DMA should also work with this chipset/driver (eg. MC2112A)
+- * but are not enabled by default. Use "hdparm -i" to view modes supported
+- * by a given drive.
+- *
+- * The hdparm-2.4 (or later) utility can be used for manually enabling/disabling
+- * DMA support, but must be (re-)compiled against this kernel version or later.
+- *
+- * To enable DMA, use "hdparm -d1 /dev/hd?" on a per-drive basis after booting.
+- * If problems arise, ide.c will disable DMA operation after a few retries.
+- * This error recovery mechanism works and has been extremely well exercised.
+- *
+- * IDE drives, depending on their vintage, may support several different modes
+- * of DMA operation. The boot-time modes are indicated with a "*" in
+- * the "hdparm -i" listing, and can be changed with *knowledgeable* use of
+- * the "hdparm -X" feature. There is seldom a need to do this, as drives
+- * normally power-up with their "best" PIO/DMA modes enabled.
+- *
+- * Testing was done with an ASUS P55TP4XE/100 system and the following drives:
+- *
+- * Quantum Fireball 1080A (1Gig w/83kB buffer), DMA mode2, PIO mode4.
+- * - DMA mode2 works well (7.4MB/sec), despite the tiny on-drive buffer.
+- * - This drive also does PIO mode4, at about the same speed as DMA mode2.
+- * An awesome drive for the price!
+- *
+- * Fujitsu M1606TA (1Gig w/256kB buffer), DMA mode2, PIO mode4.
+- * - DMA mode2 gives horrible performance (1.6MB/sec), despite the good
+- * size of the on-drive buffer and a boasted 10ms average access time.
+- * - PIO mode4 was better, but peaked at a mere 4.5MB/sec.
+- *
+- * Micropolis MC2112A (1Gig w/508kB buffer), drive pre-dates EIDE and ATA2.
+- * - DMA works fine (2.2MB/sec), probably due to the large on-drive buffer.
+- * - This older drive can also be tweaked for fastPIO (3.7MB/sec) by using
+- * maximum clock settings (5,4) and setting all flags except prefetch.
+- *
+- * Western Digital AC31000H (1Gig w/128kB buffer), DMA mode1, PIO mode3.
+- * - DMA does not work reliably. The drive appears to be somewhat tardy
+- * in deasserting DMARQ at the end of a sector. This is evident in
+- * the observation that WRITEs work most of the time, depending on
+- * cache-buffer occupancy, but multi-sector reads seldom work.
+- *
+- * Testing was done with a Gigabyte GA-586 ATE system and the following drive:
+- * (Uwe Bonnes - bon@elektron.ikp.physik.th-darmstadt.de)
+- *
+- * Western Digital AC31600H (1.6Gig w/128kB buffer), DMA mode2, PIO mode4.
+- * - much better than its 1Gig cousin, this drive is reported to work
+- * very well with DMA (7.3MB/sec).
+- *
+- * Other drives:
+- *
+- * Maxtor 7540AV (515Meg w/32kB buffer), DMA modes mword0/sword2, PIO mode3.
+- * - a budget drive, with budget performance, around 3MB/sec.
+- *
+- * Western Digital AC2850F (814Meg w/64kB buffer), DMA mode1, PIO mode3.
+- * - another "caviar" drive, similar to the AC31000, except that this one
+- * worked with DMA in at least one system. Throughput is about 3.8MB/sec
+- * for both DMA and PIO.
+- *
+- * Conner CFS850A (812Meg w/64kB buffer), DMA mode2, PIO mode4.
+- * - like most Conner models, this drive proves that even a fast interface
+- * cannot improve slow media. Both DMA and PIO peak around 3.5MB/sec.
+- *
+- * Maxtor 71260AT (1204Meg w/256kB buffer), DMA mword0/sword2, PIO mode3.
+- * - works with DMA, on some systems (but not always on others, eg. Dell),
+- * giving 3-4MB/sec performance, about the same as mode3.
+- *
+- * If you have any drive models to add, email your results to: mlord@pobox.com
+- * Keep an eye on /var/adm/messages for "DMA disabled" messages.
+- *
+- * Some people have reported trouble with Intel Zappa motherboards.
+- * This can be fixed by upgrading the AMI BIOS to version 1.00.04.BS0,
+- * available from ftp://ftp.intel.com/pub/bios/10004bs0.exe
+- * (thanks to Glen Morrell <glen@spin.Stanford.edu> for researching this).
+- *
+- * And, yes, Intel Zappa boards really *do* use the Triton IDE ports.
++ * This module provides support for Bus Master IDE DMA functions in various
++ * motherboard chipsets and PCI controller cards.
++ * Please check /Documentation/ide.txt and /Documentation/udma.txt for details.
+ */
++
+ #include <linux/config.h>
+ #include <linux/types.h>
+ #include <linux/kernel.h>
+@@ -116,10 +29,24 @@
+
+ #include <asm/io.h>
+ #include <asm/dma.h>
++#include <asm/irq.h>
+
+ #include "ide.h"
+
+ #undef DISPLAY_TRITON_TIMINGS /* define this to display timings */
++#undef DISPLAY_APOLLO_TIMINGS /* define this for extensive debugging information */
++#undef DISPLAY_ALI15X3_TIMINGS /* define this for extensive debugging information */
++
++#if defined(CONFIG_PROC_FS)
++#include <linux/stat.h>
++#include <linux/proc_fs.h>
++#ifdef DISPLAY_APOLLO_TIMINGS
++#include <linux/via_ide_dma.h>
++#endif
++#ifdef DISPLAY_ALI15X3_TIMINGS
++#include <linux/ali_ide_dma.h>
++#endif
++#endif
+
+ /*
+ * good_dma_drives() lists the model names (from "hdparm -i")
+@@ -132,6 +59,27 @@ const char *good_dma_drives[] = {"Microp
+ NULL};
+
+ /*
++ * bad_dma_drives() lists the model names (from "hdparm -i")
++ * of drives which supposedly support (U)DMA but which are
++ * known to corrupt data with this interface under Linux.
++ *
++ * Note: the list was generated by statistical analysis of problem
++ * reports. It's not clear if there are problems with the drives,
++ * or with some combination of drive/controller or what.
++ *
++ * You can forcibly override this if you wish. This is the kernel
++ * 'Tread carefully' list.
++ *
++ * Finally see http://www.wdc.com/quality/err-rec.html if you have
++ * one of the listed drives.
++ */
++const char *bad_dma_drives[] = {"WDC AC11000H",
++ "WDC AC22100H",
++ "WDC AC32500H",
++ "WDC AC33100H",
++ NULL};
++
++/*
+ * Our Physical Region Descriptor (PRD) table should be large enough
+ * to handle the biggest I/O request we are likely to see. Since requests
+ * can have no more than 256 sectors, and since the typical blocksize is
+@@ -150,6 +98,8 @@ const char *good_dma_drives[] = {"Microp
+ #define PRD_BYTES 8
+ #define PRD_ENTRIES (PAGE_SIZE / (2 * PRD_BYTES))
+ #define DEFAULT_BMIBA 0xe800 /* in case BIOS did not init it */
++#define DEFAULT_BMCRBA 0xcc00 /* VIA's default value */
++#define DEFAULT_BMALIBA 0xd400 /* ALI's default value */
+
+ /*
+ * dma_intr() is the handler for disk read/write DMA interrupts
+@@ -244,23 +194,57 @@ static int build_dmatable (ide_drive_t *
+ return 1; /* let the PIO routines handle this weirdness */
+ }
+
++/*
++ * We will only enable drives with multi-word (mode2) (U)DMA capabilities,
++ * and ignore the very rare cases of drives that can only do single-word
++ * (modes 0 & 1) (U)DMA transfers. We also discard "blacklisted" hard disks.
++ */
+ static int config_drive_for_dma (ide_drive_t *drive)
+ {
++#ifndef CONFIG_BLK_DEV_FORCE_DMA
+ const char **list;
+ struct hd_driveid *id = drive->id;
++#endif
++
++#ifdef CONFIG_BLK_DEV_FORCE_DMA
++ drive->using_dma = 1;
++ return 0;
++#else
++ if (HWIF(drive)->chipset == ide_hpt343) {
++ drive->using_dma = 0; /* no DMA */
++ return 1; /* DMA disabled */
++ }
+
+ if (id && (id->capability & 1)) {
+- /* Enable DMA on any drive that has UltraDMA (mode 0/1/2) enabled */
+- if (id->field_valid & 4) /* UltraDMA */
+- if ((id->dma_ultra & (id->dma_ultra >> 8) & 7)) {
++ /* Consult the list of known "bad" drives */
++ list = bad_dma_drives;
++ while (*list) {
++ if (!strcmp(*list++,id->model)) {
++ drive->using_dma = 0; /* no DMA */
++ printk("ide: Disabling DMA modes on %s drive (%s).\n", drive->name, id->model);
++ return 1; /* DMA disabled */
++ }
++ }
++ /* Enable DMA on any drive that has mode 4 or 2 UltraDMA enabled */
++ if (id->field_valid & 4) { /* UltraDMA */
++ /* Enable DMA on any drive that has mode 4 UltraDMA enabled */
++ if (((id->dma_ultra & 0x1010) == 0x1010) &&
++ (id->word93 & 0x2000) &&
++ (HWIF(drive)->chipset == ide_ultra66)) {
+ drive->using_dma = 1;
+- return 0; /* dma enabled */
++ return 0; /* DMA enabled */
++ } else
++ /* Enable DMA on any drive that has mode 2 UltraDMA enabled */
++ if ((id->dma_ultra & 0x404) == 0x404) {
++ drive->using_dma = 1;
++ return 0; /* DMA enabled */
+ }
+- /* Enable DMA on any drive that has mode2 DMA (multi or single) enabled */
++ }
++ /* Enable DMA on any drive that has mode2 DMA enabled */
+ if (id->field_valid & 2) /* regular DMA */
+- if ((id->dma_mword & 0x404) == 0x404 || (id->dma_1word & 0x404) == 0x404) {
++ if ((id->dma_mword & 0x404) == 0x404) {
+ drive->using_dma = 1;
+- return 0; /* dma enabled */
++ return 0; /* DMA enabled */
+ }
+ /* Consult the list of known "good" drives */
+ list = good_dma_drives;
+@@ -272,6 +256,7 @@ static int config_drive_for_dma (ide_dri
+ }
+ }
+ return 1; /* DMA not enabled */
++#endif
+ }
+
+ /*
+@@ -387,22 +372,260 @@ static void init_triton_dma (ide_hwif_t
+ }
+
+ /*
++ * Set VIA Chipset Timings for (U)DMA modes enabled.
++ */
++static int set_via_timings (byte bus, byte fn, byte post, byte flush)
++{
++ byte via_config = 0;
++ int rc = 0;
++
++ /* setting IDE read prefetch buffer and IDE post write buffer */
++ if ((rc = pcibios_read_config_byte(bus, fn, 0x41, &via_config)))
++ return (1);
++ if ((rc = pcibios_write_config_byte(bus, fn, 0x41, via_config | post)))
++ return (1);
++
++ /* setting Channel read and End-of-sector FIFO flush: */
++ if ((rc = pcibios_read_config_byte(bus, fn, 0x46, &via_config)))
++ return (1);
++ if ((rc = pcibios_write_config_byte(bus, fn, 0x46, via_config | flush)))
++ return (1);
++
++ return (0);
++}
++
++static int setup_aladdin (byte bus, byte fn)
++{
++ byte confreg0 = 0, confreg1 = 0, progif = 0;
++ int errors = 0;
++
++ if (pcibios_read_config_byte(bus, fn, 0x50, &confreg1))
++ goto veryspecialsettingserror;
++ if (!(confreg1 & 0x02))
++ if (pcibios_write_config_byte(bus, fn, 0x50, confreg1 | 0x02))
++ goto veryspecialsettingserror;
++
++ if (pcibios_read_config_byte(bus, fn, 0x09, &progif))
++ goto veryspecialsettingserror;
++ if (!(progif & 0x40)) {
++ /*
++ * The way to enable them is to set progif
++ * writable at 0x4Dh register, and set bit 6
++ * of progif to 1:
++ */
++ if (pcibios_read_config_byte(bus, fn, 0x4d, &confreg0))
++ goto veryspecialsettingserror;
++ if (confreg0 & 0x80)
++ if (pcibios_write_config_byte(bus, fn, 0x4d, confreg0 & ~0x80))
++ goto veryspecialsettingserror;
++ if (pcibios_write_config_byte(bus, fn, 0x09, progif | 0x40))
++ goto veryspecialsettingserror;
++ if (confreg0 & 0x80)
++ if (pcibios_write_config_byte(bus, fn, 0x4d, confreg0))
++ errors++;
++ }
++
++ if ((pcibios_read_config_byte(bus, fn, 0x09, &progif)) || (!(progif & 0x40)))
++ goto veryspecialsettingserror;
++
++ printk("ide: ALI15X3: enabled read of IDE channels state (en/dis-abled) %s.\n",
++ errors ? "with Error(s)" : "Succeeded" );
++ return 1;
++veryspecialsettingserror:
++ printk("ide: ALI15X3: impossible to enable read of IDE channels state (en/dis-abled)!\n");
++ return 0;
++}
++
++void set_promise_hpt343_extra (unsigned short device, unsigned int bmiba)
++{
++ switch(device) {
++ case PCI_DEVICE_ID_PROMISE_20246:
++ if(!check_region((bmiba+16), 16))
++ request_region((bmiba+16), 16, "PDC20246");
++ break;
++ case PCI_DEVICE_ID_PROMISE_20262:
++ if (!check_region((bmiba+48), 48))
++ request_region((bmiba+48), 48, "PDC20262");
++ break;
++ case PCI_DEVICE_ID_TTI_HPT343:
++ if(!check_region((bmiba+16), 16))
++ request_region((bmiba+16), 16, "HPT343");
++ break;
++ default:
++ break;
++ }
++}
++
++#define HPT343_PCI_INIT_REG 0x80
++
++/*
+ * ide_init_triton() prepares the IDE driver for DMA operation.
+ * This routine is called once, from ide.c during driver initialization,
+- * for each triton chipset which is found (unlikely to be more than one).
++ * for each BM-DMA chipset which is found (rarely more than one).
+ */
+ void ide_init_triton (byte bus, byte fn)
+ {
+- int rc = 0, h;
+- int dma_enabled = 0;
+- unsigned short pcicmd;
+- unsigned int bmiba, timings;
++ byte bridgebus, bridgefn, bridgeset = 0, hpt34x_flag = 0;
++ unsigned char irq = 0;
++ int dma_enabled = 0, rc = 0, h;
++ unsigned short io[6], count = 0, step_count = 0, pass_count = 0;
++ unsigned short pcicmd, vendor, device, class;
++ unsigned int bmiba, timings, reg, tmp;
++ unsigned int addressbios = 0;
++ unsigned long flags;
++ unsigned index;
++
++#if defined(DISPLAY_APOLLO_TIMINGS) || defined(DISPLAY_ALI15X3_TIMINGS)
++ bmide_bus = bus;
++ bmide_fn = fn;
++#endif /* DISPLAY_APOLLO_TIMINGS || DISPLAY_ALI15X3_TIMINGS */
++
++/*
++ * We pick up the vendor, device, and class info for selecting the correct
++ * controller that is supported. Since we can access this routine more than
++ * once with the use of onboard and off-board EIDE controllers, a method
++ * of determining "who is who for what" is needed.
++ */
++
++ pcibios_read_config_word (bus, fn, PCI_VENDOR_ID, &vendor);
++ pcibios_read_config_word (bus, fn, PCI_DEVICE_ID, &device);
++ pcibios_read_config_word (bus, fn, PCI_CLASS_DEVICE, &class);
++ pcibios_read_config_byte (bus, fn, PCI_INTERRUPT_LINE, &irq);
++
++ switch(vendor) {
++ case PCI_VENDOR_ID_INTEL:
++ printk("ide: Intel 82371 ");
++ switch(device) {
++ case PCI_DEVICE_ID_INTEL_82371_0:
++ printk("PIIX (single FIFO) ");
++ break;
++ case PCI_DEVICE_ID_INTEL_82371SB_1:
++ printk("PIIX3 (dual FIFO) ");
++ break;
++ case PCI_DEVICE_ID_INTEL_82371AB:
++ printk("PIIX4 (dual FIFO) ");
++ break;
++ default:
++ printk(" (unknown) 0x%04x ", device);
++ break;
++ }
++ printk("DMA Bus Mastering IDE ");
++ break;
++ case PCI_VENDOR_ID_SI:
++ printk("ide: SiS 5513 (dual FIFO) DMA Bus Mastering IDE ");
++ break;
++ case PCI_VENDOR_ID_VIA:
++ printk("ide: VIA VT82C586B (split FIFO) UDMA Bus Mastering IDE ");
++ break;
++ case PCI_VENDOR_ID_TTI:
++ /*PCI_CLASS_STORAGE_UNKNOWN == class */
++ if (device == PCI_DEVICE_ID_TTI_HPT343) {
++ pcibios_write_config_byte(bus, fn, HPT343_PCI_INIT_REG, 0x00);
++ pcibios_read_config_word(bus, fn, PCI_COMMAND, &pcicmd);
++ hpt34x_flag = (pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0;
++#if 1
++ if (!hpt34x_flag) {
++ save_flags(flags);
++ cli();
++ pcibios_write_config_word(bus, fn, PCI_COMMAND, pcicmd & ~PCI_COMMAND_IO);
++ pcibios_read_config_dword(bus, fn, PCI_BASE_ADDRESS_4, &bmiba);
++ pcibios_write_config_dword(bus, fn, PCI_BASE_ADDRESS_0, bmiba | 0x20);
++ pcibios_write_config_dword(bus, fn, PCI_BASE_ADDRESS_1, bmiba | 0x34);
++ pcibios_write_config_dword(bus, fn, PCI_BASE_ADDRESS_2, bmiba | 0x28);
++ pcibios_write_config_dword(bus, fn, PCI_BASE_ADDRESS_3, bmiba | 0x3c);
++ pcibios_write_config_word(bus, fn, PCI_COMMAND, pcicmd);
++ bmiba = 0;
++ restore_flags(flags);
++ }
++#endif
++ pcibios_write_config_byte(bus, fn, PCI_LATENCY_TIMER, 0x20);
++ goto hpt343_jump_in;
++ } else {
++ printk("ide: HPTXXX did == 0x%04X unsupport chipset error.\n", device);
++ return;
++ }
++ case PCI_VENDOR_ID_PROMISE:
++ /*
++ * I have been able to make my Promise Ultra33 UDMA card change class.
++ * It has reported as both PCI_CLASS_STORAGE_RAID and PCI_CLASS_STORAGE_IDE.
++ * Since the PCI_CLASS_STORAGE_RAID mode should automatically mirror the
++ * two halves of the PCI_CONFIG register data, but sometimes it forgets.
++ * Thus we guarantee that they are identical, with a quick check and
++ * correction if needed.
++ * PDC20246 (primary) PDC20247 (secondary) IDE hwif's.
++ *
++ * PDC20262 Promise Ultra66 UDMA.
++ *
++ * Note that Promise "stories,fibs,..." about this device not being
++ * capable of ATAPI and AT devices.
++ */
++ if (class != PCI_CLASS_STORAGE_IDE) {
++ unsigned char irq_mirror = 0;
++
++ pcibios_read_config_byte(bus, fn, (PCI_INTERRUPT_LINE)|0x80, &irq_mirror);
++ if (irq != irq_mirror) {
++ pcibios_write_config_byte(bus, fn, (PCI_INTERRUPT_LINE)|0x80, irq);
++ }
++ }
++ case PCI_VENDOR_ID_ARTOP:
++ /* PCI_CLASS_STORAGE_SCSI == class */
++ /*
++ * I have found that by stroking rom_enable_bit on both the AEC6210U/UF and
++ * PDC20246 controller cards, the features desired are almost guaranteed
++ * to be enabled and compatible. This ROM may not be registered in the
++ * config data, but it can be turned on. Registration failure has only
++ * been observed if and only if Linux sets up the pci_io_address in the
++ * 0x6000 range. If they are setup in the 0xef00 range it is reported.
++ * WHY??? got me.........
++ */
++hpt343_jump_in:
++ printk("ide: %s UDMA Bus Mastering ",
++ (device == PCI_DEVICE_ID_ARTOP_ATP850UF) ? "AEC6210" :
++ (device == PCI_DEVICE_ID_PROMISE_20246) ? "PDC20246" :
++ (device == PCI_DEVICE_ID_PROMISE_20262) ? "PDC20262" :
++ (hpt34x_flag && (device == PCI_DEVICE_ID_TTI_HPT343)) ? "HPT345" :
++ (device == PCI_DEVICE_ID_TTI_HPT343) ? "HPT343" : "UNKNOWN");
++ pcibios_read_config_dword(bus, fn, PCI_ROM_ADDRESS, &addressbios);
++ if (addressbios) {
++ pcibios_write_config_byte(bus, fn, PCI_ROM_ADDRESS, addressbios | PCI_ROM_ADDRESS_ENABLE);
++ printk("with ROM enabled at 0x%08x", addressbios);
++ }
++ /*
++ * This was stripped out of 2.1.XXX kernel code and parts from a patch called
++ * promise_update. This finds the PCI_BASE_ADDRESS spaces and makes them
++ * available for configuration later.
++ * PCI_BASE_ADDRESS_0 hwif0->io_base
++ * PCI_BASE_ADDRESS_1 hwif0->ctl_port
++ * PCI_BASE_ADDRESS_2 hwif1->io_base
++ * PCI_BASE_ADDRESS_3 hwif1->ctl_port
++ * PCI_BASE_ADDRESS_4 bmiba
++ */
++ memset(io, 0, 6 * sizeof(unsigned short));
++ for (reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4) {
++ pcibios_read_config_dword(bus, fn, reg, &tmp);
++ if (tmp & PCI_BASE_ADDRESS_SPACE_IO)
++ io[count++] = tmp & PCI_BASE_ADDRESS_IO_MASK;
++ }
++ break;
++ case PCI_VENDOR_ID_AL:
++ save_flags(flags);
++ cli();
++ for (index = 0; !pcibios_find_device (PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, index, &bridgebus, &bridgefn); ++index) {
++ bridgeset = setup_aladdin(bus, fn);
++ }
++ restore_flags(flags);
++ printk("ide: ALI15X3 (dual FIFO) DMA Bus Mastering IDE ");
++ break;
++ default:
++ return;
++ }
++
++ printk("\n Controller on PCI bus %d function %d\n", bus, fn);
+
+- printk("ide: i82371 PIIX (Triton) on PCI bus %d function %d\n", bus, fn);
+ /*
+ * See if IDE and BM-DMA features are enabled:
+ */
+- if ((rc = pcibios_read_config_word(bus, fn, 0x04, &pcicmd)))
++ if ((rc = pcibios_read_config_word(bus, fn, PCI_COMMAND, &pcicmd)))
+ goto quit;
+ if ((pcicmd & 1) == 0) {
+ printk("ide: ports are not enabled (BIOS)\n");
+@@ -426,21 +649,29 @@ void ide_init_triton (byte bus, byte fn)
+ */
+ int try_again = 1;
+ do {
+- if ((rc = pcibios_read_config_dword(bus, fn, 0x20, &bmiba)))
++ if ((rc = pcibios_read_config_dword(bus, fn, PCI_BASE_ADDRESS_4, &bmiba)))
+ goto quit;
+ bmiba &= 0xfff0; /* extract port base address */
+ if (bmiba) {
+ dma_enabled = 1;
+ break;
+ } else {
+- printk("ide: BM-DMA base register is invalid (0x%04x, PnP BIOS problem)\n", bmiba);
+- if (inb(DEFAULT_BMIBA) != 0xff || !try_again)
++ printk("ide: BM-DMA base register is invalid (0x%04x, PnP BIOS problem)\n", bmiba);
++ if (inb(((vendor == PCI_VENDOR_ID_AL) ? DEFAULT_BMALIBA :
++ (vendor == PCI_VENDOR_ID_VIA) ? DEFAULT_BMCRBA :
++ DEFAULT_BMIBA)) != 0xff || !try_again)
+ break;
+- printk("ide: setting BM-DMA base register to 0x%04x\n", DEFAULT_BMIBA);
+- if ((rc = pcibios_write_config_word(bus, fn, 0x04, pcicmd&~1)))
++ printk("ide: setting BM-DMA base register to 0x%04x\n",
++ ((vendor == PCI_VENDOR_ID_AL) ? DEFAULT_BMALIBA :
++ (vendor == PCI_VENDOR_ID_VIA) ? DEFAULT_BMCRBA :
++ DEFAULT_BMIBA));
++ if ((rc = pcibios_write_config_word(bus, fn, PCI_COMMAND, pcicmd&~1)))
+ goto quit;
+- rc = pcibios_write_config_dword(bus, fn, 0x20, DEFAULT_BMIBA|1);
+- if (pcibios_write_config_word(bus, fn, 0x04, pcicmd|5) || rc)
++ rc = pcibios_write_config_dword(bus, fn, 0x20,
++ ((vendor == PCI_VENDOR_ID_AL) ? DEFAULT_BMALIBA :
++ (vendor == PCI_VENDOR_ID_VIA) ? DEFAULT_BMCRBA :
++ DEFAULT_BMIBA)|1);
++ if (pcibios_write_config_word(bus, fn, PCI_COMMAND, pcicmd|5) || rc)
+ goto quit;
+ }
+ } while (try_again--);
+@@ -449,89 +680,308 @@ void ide_init_triton (byte bus, byte fn)
+ /*
+ * See if ide port(s) are enabled
+ */
+- if ((rc = pcibios_read_config_dword(bus, fn, 0x40, &timings)))
+- goto quit;
+- if (!(timings & 0x80008000)) {
+- printk("ide: neither port is enabled\n");
++ if ((rc = pcibios_read_config_dword(bus, fn,
++ (vendor == PCI_VENDOR_ID_PROMISE) ? 0x50 :
++ (vendor == PCI_VENDOR_ID_ARTOP) ? 0x54 :
++ (vendor == PCI_VENDOR_ID_SI) ? 0x48 :
++ (vendor == PCI_VENDOR_ID_AL) ? 0x08 :
++ 0x40, &timings)))
+ goto quit;
+- }
++ /*
++ * We do a vendor check since the Ultra33/66 and AEC6210
++ * holds their timings in a different location.
++ */
++#if 0
++ printk("ide: timings == %08x\n", timings);
++#endif
++ /*
++ * The switch preserves some stuff that was original.
++ */
++ switch(vendor) {
++ case PCI_VENDOR_ID_INTEL:
++ if (!(timings & 0x80008000)) {
++ printk("ide: INTEL: neither port is enabled\n");
++ goto quit;
++ }
++ break;
++ case PCI_VENDOR_ID_VIA:
++ if(!(timings & 0x03)) {
++ printk("ide: VIA: neither port is enabled\n");
++ goto quit;
++ }
++ break;
++ case PCI_VENDOR_ID_AL:
++ timings <<= 16;
++ timings >>= 24;
++ if (!(timings & 0x30)) {
++ printk("ide: ALI15X3: neither port is enabled\n");
++ goto quit;
++ }
++ break;
++ case PCI_VENDOR_ID_SI:
++ timings <<= 8;
++ timings >>= 24;
++ if (!(timings & 0x06)) {
++ printk("ide: SIS5513: neither port is enabled\n");
++ goto quit;
++ }
++ break;
++ case PCI_VENDOR_ID_PROMISE:
++ printk(" (U)DMA Burst Bit %sABLED " \
++ "Primary %s Mode " \
++ "Secondary %s Mode.\n",
++ (inb(bmiba + 0x001f) & 1) ? "EN" : "DIS",
++ (inb(bmiba + 0x001a) & 1) ? "MASTER" : "PCI",
++ (inb(bmiba + 0x001b) & 1) ? "MASTER" : "PCI" );
++#if 0
++ if (!(inb(bmiba + 0x001f) & 1)) {
++ outb(inb(bmiba + 0x001f)|0x01, (bmiba + 0x001f));
++ printk(" (U)DMA Burst Bit Forced %sABLED.\n",
++ (inb(bmiba + 0x001f) & 1) ? "EN" : "DIS");
++ }
++#endif
++ break;
++ case PCI_VENDOR_ID_ARTOP:
++ case PCI_VENDOR_ID_TTI:
++ default:
++ break;
++ }
+
+ /*
+ * Save the dma_base port addr for each interface
+ */
+ for (h = 0; h < MAX_HWIFS; ++h) {
++ ide_hwif_t *hwif = &ide_hwifs[h];
++ byte channel = ((h == 1) || (h == 3) || (h == 5)) ? 1 : 0;
++
++ /*
++ * This prevents the first contoller from accidentally
++ * initalizing the hwif's that it does not use and block
++ * an off-board ide-pci from getting in the game.
++ */
++ if ((step_count >= 2) || (pass_count >= 2)) {
++ goto quit;
++ }
++
++#if 0
++ if (hwif->chipset == ide_unknown)
++ printk("ide: index == %d channel(%d)\n", h, channel);
++#endif
++
++#ifdef CONFIG_BLK_DEV_OFFBOARD
++ /*
++ * This is a forced override for the onboard ide controller
++ * to be enabled, if one chooses to have an offboard ide-pci
++ * card as the primary booting device. This beasty is
++ * for offboard UDMA upgrades with hard disks, but saving
++ * the onboard DMA2 controllers for CDROMS, TAPES, ZIPS, etc...
++ */
++ if (((vendor == PCI_VENDOR_ID_INTEL) ||
++ (vendor == PCI_VENDOR_ID_SI) ||
++ (vendor == PCI_VENDOR_ID_VIA) ||
++ (vendor == PCI_VENDOR_ID_AL)) && (h >= 2)) {
++ hwif->io_base = channel ? 0x170 : 0x1f0;
++ hwif->ctl_port = channel ? 0x376 : 0x3f6;
++ hwif->irq = channel ? 15 : 14;
++ hwif->noprobe = 0;
++ }
++#endif /* CONFIG_BLK_DEV_OFFBOARD */
++ /*
++ * If the chipset is listed as "ide_unknown", lets get a
++ * hwif while they last. This does the first check on
++ * the current availability of the ide_hwifs[h] in question.
++ */
++ if (hwif->chipset != ide_unknown) {
++ continue;
++ } else if (vendor == PCI_VENDOR_ID_INTEL) {
++ unsigned short time;
+ #ifdef DISPLAY_TRITON_TIMINGS
+- byte s_clks, r_clks;
+- unsigned short devid;
++ byte s_clks, r_clks;
++ unsigned short devid;
+ #endif /* DISPLAY_TRITON_TIMINGS */
+- ide_hwif_t *hwif = &ide_hwifs[h];
+- unsigned short time;
+- if (hwif->io_base == 0x1f0) {
+- time = timings & 0xffff;
+- if ((time & 0x8000) == 0) /* interface enabled? */
+- continue;
+- hwif->chipset = ide_triton;
+- if (dma_enabled)
+- init_triton_dma(hwif, bmiba);
+- } else if (hwif->io_base == 0x170) {
+- time = timings >> 16;
+- if ((time & 0x8000) == 0) /* interface enabled? */
++ pass_count++;
++ if (hwif->io_base == 0x1f0) {
++ time = timings & 0xffff;
++ if ((time & 0x8000) == 0) /* interface enabled? */
++ continue;
++ hwif->chipset = ide_triton;
++ if (dma_enabled)
++ init_triton_dma(hwif, bmiba);
++ step_count++;
++ } else if (hwif->io_base == 0x170) {
++ time = timings >> 16;
++ if ((time & 0x8000) == 0) /* interface enabled? */
++ continue;
++ hwif->chipset = ide_triton;
++ if (dma_enabled)
++ init_triton_dma(hwif, bmiba + 8);
++ step_count++;
++ } else {
+ continue;
+- hwif->chipset = ide_triton;
+- if (dma_enabled)
+- init_triton_dma(hwif, bmiba + 8);
+- } else
+- continue;
++ }
+ #ifdef DISPLAY_TRITON_TIMINGS
+- s_clks = ((~time >> 12) & 3) + 2;
+- r_clks = ((~time >> 8) & 3) + 1;
+- printk(" %s timing: (0x%04x) sample_CLKs=%d, recovery_CLKs=%d\n",
+- hwif->name, time, s_clks, r_clks);
+- if ((time & 0x40) && !pcibios_read_config_word(bus, fn, 0x02, &devid)
+- && devid == PCI_DEVICE_ID_INTEL_82371SB_1)
+- {
+- byte stime;
+- if (pcibios_read_config_byte(bus, fn, 0x44, &stime)) {
+- if (hwif->io_base == 0x1f0) {
+- s_clks = ~stime >> 6;
+- r_clks = ~stime >> 4;
++ s_clks = ((~time >> 12) & 3) + 2;
++ r_clks = ((~time >> 8) & 3) + 1;
++ printk(" %s timing: (0x%04x) sample_CLKs=%d, recovery_CLKs=%d\n",
++ hwif->name, time, s_clks, r_clks);
++ if ((time & 0x40) && !pcibios_read_config_word(bus, fn, PCI_DEVICE_ID, &devid)
++ && devid == PCI_DEVICE_ID_INTEL_82371SB_1) {
++ byte stime;
++ if (pcibios_read_config_byte(bus, fn, 0x44, &stime)) {
++ if (hwif->io_base == 0x1f0) {
++ s_clks = ~stime >> 6;
++ r_clks = ~stime >> 4;
++ } else {
++ s_clks = ~stime >> 2;
++ r_clks = ~stime;
++ }
++ s_clks = (s_clks & 3) + 2;
++ r_clks = (r_clks & 3) + 1;
++ printk(" slave: sample_CLKs=%d, recovery_CLKs=%d\n",
++ s_clks, r_clks);
++ }
++ }
++ print_triton_drive_flags (0, time & 0xf);
++ print_triton_drive_flags (1, (time >> 4) & 0xf);
++#endif /* DISPLAY_TRITON_TIMINGS */
++ } else if (vendor == PCI_VENDOR_ID_SI) {
++ pass_count++;
++ if (hwif->io_base == 0x1f0) {
++ if ((timings & 0x02) == 0)
++ continue;
++ hwif->chipset = ide_triton;
++ if (dma_enabled)
++ init_triton_dma(hwif, bmiba);
++ step_count++;
++ } else if (hwif->io_base == 0x170) {
++ if ((timings & 0x04) == 0)
++ continue;
++ hwif->chipset = ide_triton;
++ if (dma_enabled)
++ init_triton_dma(hwif, bmiba + 8);
++ step_count++;
++ } else {
++ continue;
++ }
++ } else if (vendor == PCI_VENDOR_ID_VIA) {
++ pass_count++;
++ if (hwif->io_base == 0x1f0) {
++ if ((timings & 0x02) == 0)
++ continue;
++ hwif->chipset = ide_triton;
++ if (dma_enabled)
++ init_triton_dma(hwif, bmiba);
++ if (set_via_timings(bus, fn, 0xc0, 0xa0))
++ goto quit;
++#ifdef DISPLAY_APOLLO_TIMINGS
++ proc_register_dynamic(&proc_root, &via_proc_entry);
++#endif /* DISPLAY_APOLLO_TIMINGS */
++ step_count++;
++ } else if (hwif->io_base == 0x170) {
++ if ((timings & 0x01) == 0)
++ continue;
++ hwif->chipset = ide_triton;
++ if (dma_enabled)
++ init_triton_dma(hwif, bmiba + 8);
++ if (set_via_timings(bus, fn, 0x30, 0x50))
++ goto quit;
++ step_count++;
++ } else {
++ continue;
++ }
++ } else if (vendor == PCI_VENDOR_ID_AL) {
++ byte ideic, inmir;
++ byte irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6,
++ 1, 11, 0, 12, 0, 14, 0, 15 };
++
++ if (bridgeset) {
++ pcibios_read_config_byte(bridgebus, bridgefn, 0x58, &ideic);
++ ideic = ideic & 0x03;
++ if ((channel && ideic == 0x03) || (!channel && !ideic)) {
++ pcibios_read_config_byte(bridgebus, bridgefn, 0x44, &inmir);
++ inmir = inmir & 0x0f;
++ hwif->irq = irq_routing_table[inmir];
++ } else if (channel && !(ideic & 0x01)) {
++ pcibios_read_config_byte(bridgebus, bridgefn, 0x75, &inmir);
++ inmir = inmir & 0x0f;
++ hwif->irq = irq_routing_table[inmir];
++ }
++ }
++ pass_count++;
++ if (hwif->io_base == 0x1f0) {
++ if ((timings & 0x20) == 0)
++ continue;
++ hwif->chipset = ide_triton;
++ if (dma_enabled)
++ init_triton_dma(hwif, bmiba);
++ outb(inb(bmiba+2) & 0x60, bmiba+2);
++ if (inb(bmiba+2) & 0x80)
++ printk("ALI15X3: simplex device: DMA forced\n");
++#ifdef DISPLAY_ALI15X3_TIMINGS
++ proc_register_dynamic(&proc_root, &ali_proc_entry);
++#endif /* DISPLAY_ALI15X3_TIMINGS */
++ step_count++;
++ } else if (hwif->io_base == 0x170) {
++ if ((timings & 0x10) == 0)
++ continue;
++ hwif->chipset = ide_triton;
++ if (dma_enabled)
++ init_triton_dma(hwif, bmiba + 8);
++ outb(inb(bmiba+10) & 0x60, bmiba+10);
++ if (inb(bmiba+10) & 0x80)
++ printk("ALI15X3: simplex device: DMA forced\n");
++ step_count++;
++ } else {
++ continue;
++ }
++ } else if ((vendor == PCI_VENDOR_ID_PROMISE) ||
++ (vendor == PCI_VENDOR_ID_ARTOP) ||
++ (vendor == PCI_VENDOR_ID_TTI)) {
++ pass_count++;
++ if (vendor == PCI_VENDOR_ID_TTI) {
++ if ((!hpt34x_flag) && (h < 2)) {
++ goto quit;
++ } else if (hpt34x_flag) {
++ hwif->io_base = channel ? (bmiba + 0x28) : (bmiba + 0x20);
++ hwif->ctl_port = channel ? (bmiba + 0x3e) : (bmiba + 0x36);
+ } else {
+- s_clks = ~stime >> 2;
+- r_clks = ~stime;
++ goto io_temps;
++ }
++ } else {
++io_temps:
++ tmp = channel ? 2 : 0;
++ hwif->io_base = io[tmp];
++ hwif->ctl_port = io[tmp + 1] + 2;
++ }
++ hwif->irq = irq;
++ hwif->noprobe = 0;
++
++ if (device == PCI_DEVICE_ID_ARTOP_ATP850UF) {
++ hwif->serialized = 1;
++ }
++
++ if ((vendor == PCI_VENDOR_ID_PROMISE) ||
++ (vendor == PCI_VENDOR_ID_TTI)) {
++ set_promise_hpt343_extra(device, bmiba);
++ }
++
++ if (dma_enabled) {
++ if ((!check_region(bmiba, 8)) && (!channel)) {
++ hwif->chipset = ((vendor == PCI_VENDOR_ID_TTI) && !hpt34x_flag) ? ide_hpt343 :
++ (device == PCI_DEVICE_ID_PROMISE_20262) ? ide_ultra66 : ide_udma;
++ init_triton_dma(hwif, bmiba);
++ step_count++;
++ } else if ((!check_region((bmiba + 0x08), 8)) && (channel)) {
++ hwif->chipset = ((vendor == PCI_VENDOR_ID_TTI) && !hpt34x_flag) ? ide_hpt343 :
++ (device == PCI_DEVICE_ID_PROMISE_20262) ? ide_ultra66 : ide_udma;
++ init_triton_dma(hwif, bmiba + 8);
++ step_count++;
++ } else {
++ continue;
+ }
+- s_clks = (s_clks & 3) + 2;
+- r_clks = (r_clks & 3) + 1;
+- printk(" slave: sample_CLKs=%d, recovery_CLKs=%d\n",
+- s_clks, r_clks);
+ }
+ }
+- print_triton_drive_flags (0, time & 0xf);
+- print_triton_drive_flags (1, (time >> 4) & 0xf);
+-#endif /* DISPLAY_TRITON_TIMINGS */
+ }
+
+-quit: if (rc) printk("ide: pcibios access failed - %s\n", pcibios_strerror(rc));
+-}
+-
+-void ide_init_promise (byte bus, byte fn, ide_hwif_t *hwif0, ide_hwif_t *hwif1, unsigned short dma)
+-{
+- int rc;
+- unsigned short pcicmd;
+- unsigned int bmiba = 0;
+-
+- printk("ide: Enabling DMA for Promise Technology IDE Ultra-DMA 33 on PCI bus %d function %d, port 0x%04x\n", bus, fn, dma);
+- if ((rc = pcibios_read_config_word(bus, fn, 0x04, &pcicmd)) || (pcicmd & 1) == 0 || (pcicmd & 4) == 0)
+- goto abort;
+- if ((rc = pcibios_read_config_dword(bus, fn, 0x20, &bmiba)))
+- goto abort;
+- bmiba &= 0xfff0; /* extract port base address */
+- if (bmiba != dma || !bmiba)
+- goto abort;
+- hwif0->chipset = ide_promise_udma;
+- hwif1->chipset = ide_promise_udma;
+- init_triton_dma(hwif0, bmiba);
+- init_triton_dma(hwif1, bmiba + 0x08);
+- return;
+-abort:
+- printk(KERN_WARNING "ide: Promise/33 not configured correctly (BIOS)\n");
++ quit: if (rc) printk("ide: pcibios access failed - %s\n", pcibios_strerror(rc));
+ }
+Index: b/linux/src/include/linux/hdreg.h
+===================================================================
+--- a/linux/src/include/linux/hdreg.h
++++ b/linux/src/include/linux/hdreg.h
+@@ -92,11 +92,12 @@ struct hd_geometry {
+ #define HDIO_GETGEO 0x0301 /* get device geometry */
+ #define HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */
+ #define HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */
+-#define HDIO_GET_IDENTITY 0x0307 /* get IDE identification info */
++#define HDIO_OBSOLETE_IDENTITY 0x0307 /* OBSOLETE, DO NOT USE: returns 142 bytes */
+ #define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */
+ #define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */
+ #define HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */
+ #define HDIO_GET_DMA 0x030b /* get use-dma flag */
++#define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */
+ #define HDIO_DRIVE_CMD 0x031f /* execute a special drive command */
+
+ /* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */
+@@ -166,14 +167,54 @@ struct hd_driveid {
+ unsigned short word79;
+ unsigned short word80;
+ unsigned short word81;
+- unsigned short word82;
+- unsigned short word83;
++ unsigned short command_sets; /* bits 0:Smart 1:Security 2:Removable 3:PM */
++ unsigned short word83; /* bits 14:Smart Enabled 13:0 zero */
+ unsigned short word84;
+ unsigned short word85;
+ unsigned short word86;
+ unsigned short word87;
+ unsigned short dma_ultra;
+- unsigned short reserved[167];
++ unsigned short word89; /* reserved (word 89) */
++ unsigned short word90; /* reserved (word 90) */
++ unsigned short word91; /* reserved (word 91) */
++ unsigned short word92; /* reserved (word 92) */
++ unsigned short word93; /* reserved (word 93) */
++ unsigned short word94; /* reserved (word 94) */
++ unsigned short word95; /* reserved (word 95) */
++ unsigned short word96; /* reserved (word 96) */
++ unsigned short word97; /* reserved (word 97) */
++ unsigned short word98; /* reserved (word 98) */
++ unsigned short word99; /* reserved (word 99) */
++ unsigned short word100; /* reserved (word 100) */
++ unsigned short word101; /* reserved (word 101) */
++ unsigned short word102; /* reserved (word 102) */
++ unsigned short word103; /* reserved (word 103) */
++ unsigned short word104; /* reserved (word 104) */
++ unsigned short word105; /* reserved (word 105) */
++ unsigned short word106; /* reserved (word 106) */
++ unsigned short word107; /* reserved (word 107) */
++ unsigned short word108; /* reserved (word 108) */
++ unsigned short word109; /* reserved (word 109) */
++ unsigned short word110; /* reserved (word 110) */
++ unsigned short word111; /* reserved (word 111) */
++ unsigned short word112; /* reserved (word 112) */
++ unsigned short word113; /* reserved (word 113) */
++ unsigned short word114; /* reserved (word 114) */
++ unsigned short word115; /* reserved (word 115) */
++ unsigned short word116; /* reserved (word 116) */
++ unsigned short word117; /* reserved (word 117) */
++ unsigned short word118; /* reserved (word 118) */
++ unsigned short word119; /* reserved (word 119) */
++ unsigned short word120; /* reserved (word 120) */
++ unsigned short word121; /* reserved (word 121) */
++ unsigned short word122; /* reserved (word 122) */
++ unsigned short word123; /* reserved (word 123) */
++ unsigned short word124; /* reserved (word 124) */
++ unsigned short word125; /* reserved (word 125) */
++ unsigned short word126; /* reserved (word 126) */
++ unsigned short word127; /* reserved (word 127) */
++ unsigned short security; /* bits 0:suuport 1:enabled 2:locked 3:frozen */
++ unsigned short reserved[127];
+ };
+
+ #ifdef __KERNEL__
+Index: b/linux/configfrag.ac
+===================================================================
+--- a/linux/configfrag.ac
++++ b/linux/configfrag.ac
+@@ -140,6 +140,11 @@ AC_Linux_DRIVER_qemu([ide],
+ [IDE disk controllers],
+ [CONFIG_BLK_DEV_IDE])
+
++AC_ARG_ENABLE([ide-forcedma],
++ AS_HELP_STRING([--enable-ide-forcedma], [enable forced use of DMA on IDE]),
++ [test x"$enableval" = xno ||
++ AC_DEFINE([CONFIG_BLK_DEV_FORCE_DMA], [1], [Force DMA on IDE block devices])])
++
+ dnl SCSI controllers.
+
+ AC_Linux_DRIVER([53c78xx],
diff --git a/debian/patches/24_pci_irq_fix.patch b/debian/patches/24_pci_irq_fix.patch
new file mode 100644
index 0000000..cba0cab
--- /dev/null
+++ b/debian/patches/24_pci_irq_fix.patch
@@ -0,0 +1,33 @@
+My laptop's motherboard set its RTL8139 NIC IRQ at a value that is not
+included in the range 0<=x<16 and it's not 255.
+
+GNU Mach can't handle that, and when I try a 'devprobe eth0' I get a
+panic due to a failed assert (irq < 16). This patch tell GNU Mach to
+ignore this kind of IRQ.
+
+The real solution for this problem would be an PCI IRQ Router, which
+is what I am going to port/implement in Mach soon. For now, this patch
+helps by both removing the failed assert and by noticing the user that
+the device is not being used for unassigned IRQ.
+
+
+2006-01-28 Gianluca Guida <glguida@gmail.com>
+
+ * linux/src/drivers/net/pci-scan.c (pci_drv_register): Skip device
+ if we are getting an invalid IRQ >= 16 and different from 255 (it
+ happens in some motherboard).
+
+
+Index: b/linux/src/drivers/net/pci-scan.c
+===================================================================
+--- a/linux/src/drivers/net/pci-scan.c
++++ b/linux/src/drivers/net/pci-scan.c
+@@ -347,7 +347,7 @@ int pci_drv_register(struct drv_id_info
+ pci_tbl[chip_idx].name, pciaddr, irq);
+
+ if ( ! (pci_flags & PCI_UNUSED_IRQ) &&
+- (irq == 0 || irq == 255)) {
++ (irq == 0 || irq >= 16)) {
+ if (pci_bus == 32) /* Broken CardBus activation. */
+ printk(KERN_WARNING "Resources for CardBus device '%s' have"
+ " not been allocated.\n"
diff --git a/debian/patches/40_iopl_mem.patch b/debian/patches/40_iopl_mem.patch
new file mode 100644
index 0000000..1050493
--- /dev/null
+++ b/debian/patches/40_iopl_mem.patch
@@ -0,0 +1,20 @@
+The mem device provides direct memory access (needed e.g. for Xorg), but
+some packages (Xorg, notably) are still using the iopl device. TODO:
+drop this patch when xserver-xorg >= 1.9.99.1 enters unstable (and break
+previous versions).
+
+diff --git a/i386/i386at/conf.c b/i386/i386at/conf.c
+index d51b5ee..88e753c 100644
+--- a/i386/i386at/conf.c
++++ b/i386/i386at/conf.c
+@@ -135,6 +135,10 @@ struct dev_ops dev_name_list[] =
+ nodev, nodev, nodev, memmmap,
+ nodev, nulldev, nulldev, 0,
+ nodev },
++ { "iopl", nulldev, nulldev, nodev,
++ nodev, nodev, nodev, memmmap,
++ nodev, nulldev, nulldev, 0,
++ nodev },
+ #endif /* MACH_HYP */
+
+ #ifdef MACH_KMSG
diff --git a/debian/patches/50_initrd.patch b/debian/patches/50_initrd.patch
new file mode 100644
index 0000000..448df19
--- /dev/null
+++ b/debian/patches/50_initrd.patch
@@ -0,0 +1,315 @@
+Jérémie Koenig <jk@jk.fr.eu.org>
+Add ramdisk support for d-i.
+
+Index: gnumach/Makefrag.am
+===================================================================
+--- gnumach.orig/Makefrag.am 2010-06-12 03:44:45.000000000 +0200
++++ gnumach/Makefrag.am 2010-06-12 03:45:00.000000000 +0200
+@@ -275,6 +275,8 @@
+ device/net_io.c \
+ device/net_io.h \
+ device/param.h \
++ device/ramdisk.c \
++ device/ramdisk.h \
+ device/subrs.c \
+ device/subrs.h \
+ device/tty.h
+Index: gnumach/i386/i386at/conf.c
+===================================================================
+--- gnumach.orig/i386/i386at/conf.c 2010-06-12 03:44:45.000000000 +0200
++++ gnumach/i386/i386at/conf.c 2010-06-12 03:45:00.000000000 +0200
+@@ -29,6 +29,7 @@
+
+ #include <mach/machine/vm_types.h>
+ #include <device/conf.h>
++#include <device/ramdisk.h>
+
+ extern int timeopen(), timeclose();
+ extern vm_offset_t timemmap();
+@@ -127,6 +128,8 @@
+ nodev },
+ #endif /* MACH_HYP */
+
++ RAMDISK_DEV_OPS,
++
+ #ifdef MACH_KMSG
+ { kmsgname, kmsgopen, kmsgclose, kmsgread,
+ nodev, kmsggetstat, nodev, nomap,
+Index: gnumach/kern/boot_script.c
+===================================================================
+--- gnumach.orig/kern/boot_script.c 2010-06-12 03:44:45.000000000 +0200
++++ gnumach/kern/boot_script.c 2010-06-12 03:45:00.000000000 +0200
+@@ -88,12 +88,20 @@
+ return boot_script_prompt_task_resume (cmd);
+ }
+
++/* Create an initial ramdisk */
++static int
++ramdisk_create (struct cmd *cmd, int *val)
++{
++ return boot_script_ramdisk_create (cmd, (char **) val);
++}
++
+ /* List of builtin symbols. */
+ static struct sym builtin_symbols[] =
+ {
+ { "task-create", VAL_FUNC, (int) create_task, VAL_TASK, 0 },
+ { "task-resume", VAL_FUNC, (int) resume_task, VAL_NONE, 1 },
+ { "prompt-task-resume", VAL_FUNC, (int) prompt_resume_task, VAL_NONE, 1 },
++ { "ramdisk-create", VAL_FUNC, (int) ramdisk_create, VAL_STR, 0 },
+ };
+ #define NUM_BUILTIN (sizeof (builtin_symbols) / sizeof (builtin_symbols[0]))
+
+Index: gnumach/kern/bootstrap.c
+===================================================================
+--- gnumach.orig/kern/bootstrap.c 2010-06-12 03:44:44.000000000 +0200
++++ gnumach/kern/bootstrap.c 2010-06-12 03:45:00.000000000 +0200
+@@ -48,6 +48,7 @@
+ #include <vm/vm_kern.h>
+ #include <vm/vm_user.h>
+ #include <device/device_port.h>
++#include <device/ramdisk.h>
+
+ #if MACH_KDB
+ #include <machine/db_machdep.h>
+@@ -776,6 +773,23 @@
+ }
+
+ int
++boot_script_ramdisk_create (struct cmd *cmd, char **name)
++{
++ struct multiboot_module *mod = cmd->hook;
++ vm_size_t size = mod->mod_end - mod->mod_start;
++ kern_return_t rc;
++ int no;
++
++ rc = ramdisk_create (size, (void *) phystokv (mod->mod_start), &no);
++ if (rc != KERN_SUCCESS)
++ return BOOT_SCRIPT_MACH_ERROR;
++
++ *name = boot_script_malloc (RAMDISK_NAMESZ);
++ sprintf(*name, RAMDISK_NAME "%d", no);
++ return 0;
++}
++
++int
+ boot_script_task_create (struct cmd *cmd)
+ {
+ kern_return_t rc = task_create(TASK_NULL, FALSE, &cmd->task);
+Index: gnumach/device/ramdisk.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gnumach/device/ramdisk.c 2010-06-12 05:02:54.000000000 +0200
+@@ -0,0 +1,160 @@
++#include <mach/vm_param.h>
++#include <machine/vm_param.h>
++#include <vm/vm_kern.h>
++#include <vm/vm_user.h>
++#include <device/device_types.h>
++#include <device/ds_routines.h>
++#include <device/conf.h>
++#include <device/ramdisk.h>
++#include <kern/printf.h>
++#include <string.h>
++
++static struct ramdisk {
++ void *data;
++ vm_size_t size;
++} ramdisk[RAMDISK_MAX];
++
++static int ramdisk_num = 0;
++
++/* Initial ramdisks are created from the boot scripts */
++int ramdisk_create(vm_size_t size, const void *initdata, int *out_no)
++{
++ struct ramdisk *rd = &ramdisk[ramdisk_num];
++ int err;
++
++ if(ramdisk_num >= RAMDISK_MAX)
++ return -1;
++
++ /* allocate the memory */
++ rd->size = round_page(size);
++ err = kmem_alloc(kernel_map, (vm_offset_t *) &rd->data, rd->size);
++ if(err != KERN_SUCCESS)
++ return err;
++
++ /* initialize */
++ if(initdata)
++ memcpy(rd->data, initdata, rd->size);
++ else
++ memset(rd->data, 0, rd->size);
++
++ /* report */
++ if(out_no) *out_no = ramdisk_num;
++ printf("%s%d: %lu bytes @%p\n", RAMDISK_NAME, ramdisk_num,
++ (unsigned long) rd->size, rd->data);
++
++ ramdisk_num++;
++ return KERN_SUCCESS;
++}
++
++/* On d_open() we just check whether the ramdisk exists */
++int ramdisk_open(int dev, int mode, io_req_t ior)
++{
++ return (dev < ramdisk_num) ? D_SUCCESS : D_NO_SUCH_DEVICE;
++}
++
++/* d_getstat() is used to query the device characteristics */
++int ramdisk_getstat(int dev, dev_flavor_t flavor, dev_status_t status,
++ mach_msg_type_number_t *status_count)
++{
++ switch(flavor) {
++ case DEV_GET_SIZE:
++ status[DEV_GET_SIZE_DEVICE_SIZE] = ramdisk[dev].size;
++ status[DEV_GET_SIZE_RECORD_SIZE] = RAMDISK_BLOCKSZ;
++ *status_count = DEV_GET_SIZE_COUNT;
++ return D_SUCCESS;
++
++ case DEV_GET_RECORDS:
++ status[DEV_GET_RECORDS_DEVICE_RECORDS]
++ = ramdisk[dev].size / RAMDISK_BLOCKSZ;
++ status[DEV_GET_RECORDS_RECORD_SIZE] = RAMDISK_BLOCKSZ;
++ *status_count = DEV_GET_RECORDS_COUNT;
++ return D_SUCCESS;
++ }
++ return D_INVALID_OPERATION;
++}
++
++/* TODO: implement freeramdisk with setstat() ? */
++
++/* Check the given io request and compute a pointer to the ramdisk data and the
++ * amount to be handled. */
++static int ramdisk_ioreq(int dev, io_req_t ior, void **data, int *amt)
++{
++ vm_offset_t ofs = ior->io_recnum * RAMDISK_BLOCKSZ;
++ if(ofs >= ramdisk[dev].size)
++ return D_INVALID_RECNUM;
++
++ *data = (char*) ramdisk[dev].data + ofs;
++ *amt = ior->io_count;
++ if(ofs + *amt > ramdisk[dev].size)
++ *amt = ramdisk[dev].size - ofs;
++
++ return KERN_SUCCESS;
++}
++
++/* Copy data from a vm_map_copy by mapping it temporarily. */
++static int mem_map_cpy(void *dst, vm_map_copy_t src, int amt)
++{
++ vm_offset_t srcaddr;
++ int err;
++
++ err = vm_map_copyout(device_io_map, &srcaddr, src);
++ if (err != KERN_SUCCESS)
++ return err;
++
++ memcpy(dst, (void *) srcaddr, amt);
++ vm_deallocate(device_io_map, srcaddr, amt);
++ return KERN_SUCCESS;
++}
++
++int ramdisk_read(int dev, io_req_t ior)
++{
++ void *data;
++ int amt, err;
++
++ err = ramdisk_ioreq(dev, ior, &data, &amt);
++ if(err != KERN_SUCCESS)
++ return err;
++
++ err = device_read_alloc (ior, ior->io_count);
++ if (err != KERN_SUCCESS)
++ return err;
++
++ memcpy(ior->io_data, data, amt);
++ ior->io_residual = ior->io_count - amt;
++
++ return D_SUCCESS;
++}
++
++int ramdisk_write(int dev, io_req_t ior)
++{
++ void *data;
++ int amt, err;
++
++ err = ramdisk_ioreq(dev, ior, &data, &amt);
++ if(err != KERN_SUCCESS)
++ return err;
++
++ if (!(ior->io_op & IO_INBAND)) {
++ /* Out-of-band data is transmitted as a vm_map_copy */
++ err = mem_map_cpy(data, (vm_map_copy_t) ior->io_data, amt);
++ if(err != KERN_SUCCESS)
++ return err;
++ } else {
++ /* In-band data can be accessed directly */
++ memcpy(data, ior->io_data, amt);
++ }
++
++ ior->io_residual = ior->io_count - amt;
++ return D_SUCCESS;
++}
++
++vm_offset_t ramdisk_mmap(int dev, vm_offset_t off, vm_prot_t prot)
++{
++ if(dev >= ramdisk_num)
++ return -1;
++ if(off >= ramdisk[dev].size)
++ return -1;
++
++ return pmap_phys_to_frame(kvtophys((vm_offset_t) ramdisk[dev].data + off));
++}
++
+Index: gnumach/device/ramdisk.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gnumach/device/ramdisk.h 2010-06-12 03:45:00.000000000 +0200
+@@ -0,0 +1,47 @@
++#ifndef _KERN_RAMDISK_H_
++#define _KERN_RAMDISK_H_
++
++#include <vm/pmap.h>
++#include <device/io_req.h>
++#include <device/conf.h>
++
++/* Maximum number of ramdisk devices */
++#define RAMDISK_MAX 4
++
++/* The block size used (userspace requires 512) */
++#define RAMDISK_BLOCKSZ 512
++
++/* Name associated to the ramdisk major */
++#define RAMDISK_NAME "rd"
++#define RAMDISK_NAMESZ (sizeof RAMDISK_NAME + sizeof (int) * 3 + 1)
++
++/* Create a new ramdisk of the given size. On success, if out_no and/or out_ptr
++ * are not NULL, the device number and pointer to the ramdisk's data are stored
++ * there. Returns D_SUCCESS or D_NO_MEMORY. */
++int ramdisk_create(vm_size_t size, const void *initdata, int *out_no);
++
++/* Device operations */
++int ramdisk_open(int, int, io_req_t);
++int ramdisk_getstat(int, dev_flavor_t, dev_status_t, mach_msg_type_number_t *);
++int ramdisk_read(int, io_req_t);
++int ramdisk_write(int, io_req_t);
++vm_offset_t ramdisk_mmap(int, vm_offset_t, vm_prot_t);
++
++/* dev_ops initializer to be used from <machine>/conf.c */
++#define RAMDISK_DEV_OPS { \
++ .d_name = RAMDISK_NAME, \
++ .d_open = ramdisk_open, \
++ .d_close = nulldev, \
++ .d_read = ramdisk_read, \
++ .d_write = ramdisk_write, \
++ .d_getstat = ramdisk_getstat, \
++ .d_setstat = nodev, \
++ .d_mmap = ramdisk_mmap, \
++ .d_async_in = nodev, \
++ .d_reset = nulldev, \
++ .d_port_death = nulldev, \
++ .d_subdev = 0, \
++ .d_dev_info = nodev, \
++ }
++
++#endif
diff --git a/debian/patches/60_bigmem.patch b/debian/patches/60_bigmem.patch
new file mode 100644
index 0000000..b0dd482
--- /dev/null
+++ b/debian/patches/60_bigmem.patch
@@ -0,0 +1,15 @@
+Push kernel/user limit to 2GiB, so Mach can address up to close to 2GiB memory.
+This makes glibc's local-bigmem.diff patch mandatory.
+
+diff --git a/i386/include/mach/i386/vm_param.h b/i386/include/mach/i386/vm_param.h
+index 6d7c5f3..839ae68 100644
+--- a/i386/include/mach/i386/vm_param.h
++++ b/i386/include/mach/i386/vm_param.h
+@@ -73,6 +73,6 @@
+ with that.
+ */
+ #define VM_MIN_ADDRESS (0)
+-#define VM_MAX_ADDRESS (0xc0000000UL)
++#define VM_MAX_ADDRESS (0x80000000UL)
+
+ #endif /* _MACH_I386_VM_PARAM_H_ */
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6b728b7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,8 @@
+00_clean_gfdl.patch
+10_cdromlock.patch
+11_ignore_CSIn.patch
+13_ide_dma.patch
+24_pci_irq_fix.patch
+40_iopl_mem.patch
+50_initrd.patch
+60_bigmem.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..307567f
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,232 @@
+#!/usr/bin/make -f
+#
+# Based on the work by Marcus Brinkmann <brinkmd@debian.org>
+# Rewritten by Guillem Jover <guillem@debian.org>
+#
+
+FULL_VERSION := $(shell dpkg-parsechangelog | grep ^Version: | sed -e 's/^.*: //g')
+NOEPOCH_VERSION := $(shell echo $(FULL_VERSION) | sed -e 's/.*://g')
+TAR_VERSION := $(shell echo $(NOEPOCH_VERSION) | sed -e 's/-.*//g')
+VERSION := $(shell echo $(TAR_VERSION) | sed -e 's/\.dfsg.*//g')
+MAJOR := $(shell echo $(VERSION) | sed -e 's/\..*//g')
+DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+
+MACHINE := 486
+
+pkg := gnumach-image-$(VERSION)-$(MACHINE)
+pkg_xen := gnumach-image-$(VERSION)-xen-$(MACHINE)
+pkg_udeb := kernel-image-$(VERSION)-$(MACHINE)-di
+pkg_xen_udeb := kernel-image-$(VERSION)-xen-$(MACHINE)-di
+pkg_dbg := gnumach-image-$(VERSION)-$(MACHINE)-dbg
+pkg_xen_dbg := gnumach-image-$(VERSION)-xen-$(MACHINE)-dbg
+pkg_common := gnumach-common
+pkg_dev := gnumach-dev
+
+D := $(CURDIR)/debian/tmp
+D_UDEB := $(D)-udeb
+D_XEN := $(D)-xen
+D_XEN_UDEB := $(D)-xen-udeb
+D_DBG := $(D)-dbg
+D_XEN_DBG := $(D)-xen-dbg
+
+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+
+CFLAGS = -Wall -g -pipe -fno-strict-aliasing
+
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+drivers :=
+
+common_configure := \
+ CFLAGS="$(CFLAGS)" \
+ --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
+ --prefix=/usr \
+ --exec-prefix=/
+
+configure: configure.ac
+ autoreconf -fi
+
+build/config.status: configure
+ dh_testdir
+
+ -mkdir build
+ cd build && ../configure $(drivers) \
+ $(common_configure)
+
+build-xen/config.status: configure
+ dh_testdir
+
+ -mkdir build-xen
+ cd build-xen && ../configure \
+ $(common_configure) \
+ --enable-platform=xen
+
+build-dbg/config.status: configure
+ dh_testdir
+
+ -mkdir build-dbg
+ cd build-dbg && ../configure --enable-kdb $(drivers) \
+ $(common_configure) \
+
+build-xen-dbg/config.status: configure
+ dh_testdir
+
+ -mkdir build-xen-dbg
+ cd build-xen-dbg && ../configure --enable-kdb \
+ $(common_configure) \
+ --enable-platform=xen
+
+build: build-gnumach-std build-gnumach-xen build-gnumach-dbg build-gnumach-xen-dbg
+
+build-gnumach-std: build/config.status
+ dh_testdir
+
+ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ $(MAKE) -C build
+else
+ $(MAKE) -C build check
+endif
+
+build-gnumach-xen: build-xen/config.status
+ dh_testdir
+
+ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ $(MAKE) -C build-xen
+else
+ $(MAKE) -C build-xen check
+endif
+
+build-gnumach-dbg: build-dbg/config.status
+ dh_testdir
+
+ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ $(MAKE) -C build-dbg
+else
+ $(MAKE) -C build-dbg check
+endif
+
+build-gnumach-xen-dbg: build-xen-dbg/config.status
+ dh_testdir
+
+ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ $(MAKE) -C build-xen-dbg
+else
+ $(MAKE) -C build-xen-dbg check
+endif
+
+clean:
+ dh_testdir
+
+ rm -f machine
+ rm -rf build build-xen build-dbg build-xen-dbg $(D_UDEB) $(D_XEN_UDEB) $(D_XEN) $(D_DBG) $(D_XEN_DBG)
+
+ # Clean up autogenerated cruft
+ rm -rf autom4te.cache build-aux
+ rm -f aclocal.m4 config.h.in configure INSTALL Makefile.in
+ find -name '*~' -o -name '*.rej' -o -name '*.orig' | xargs rm -f
+
+ rm -f debian/gnumach-image-*.preinst
+ rm -f debian/gnumach-image-*.prerm
+ rm -f debian/gnumach-image-*.postinst
+ rm -f debian/gnumach-image-*.postrm
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_prep -a
+ -rm -rf $(D_DBG)
+ dh_installdirs -a
+
+ $(MAKE) -C build install \
+ DESTDIR=$(D)
+
+ $(MAKE) -C build-xen install \
+ DESTDIR=$(D_XEN)
+
+ $(MAKE) -C build-dbg install-exec \
+ DESTDIR=$(D_DBG) \
+
+ $(MAKE) -C build-xen-dbg install-exec \
+ DESTDIR=$(D_XEN_DBG) \
+
+ mkdir -p $(D_UDEB)/boot
+ cp $(D)/boot/gnumach $(D_UDEB)/boot/
+ mv $(D)/boot/gnumach $(D)/boot/gnumach-$(VERSION)-$(MACHINE)
+ mkdir -p $(D_XEN_UDEB)/boot
+ cp $(D_XEN)/boot/gnumach $(D_XEN_UDEB)/boot/
+ mv $(D_XEN)/boot/gnumach $(D_XEN)/boot/gnumach-$(VERSION)-xen-$(MACHINE)
+ mv $(D_DBG)/boot/gnumach $(D_DBG)/boot/gnumach-$(VERSION)-$(MACHINE)-dbg
+ mv $(D_XEN_DBG)/boot/gnumach $(D_XEN_DBG)/boot/gnumach-$(VERSION)-xen-$(MACHINE)-dbg
+
+ifeq ($(DEB_HOST_ARCH_OS),hurd)
+ for script in preinst prerm postinst postrm ; do \
+ for prefix in "" -xen ; do \
+ for suffix in "" -dbg ; do \
+ sed -e "s/@VERSION@/$(VERSION)/g" \
+ -e "s/@RELEASE@/$(VERSION)$$prefix-$(MACHINE)$$suffix/g" \
+ debian/gnumach-image.$$script.in \
+ > debian/gnumach-image-$(VERSION)$$prefix-$(MACHINE)$$suffix.$$script ; \
+ done ; \
+ done ; \
+ done
+endif
+
+binary: binary-indep binary-arch
+
+binary-indep: install
+ dh_testdir
+ dh_testroot
+
+ dh_install -i --sourcedir=$(D)
+
+ dh_installdocs -i
+ dh_installchangelogs -i -k ChangeLog
+# dh_installinfo -a
+
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+binary-arch: install
+ dh_testdir
+ dh_testroot
+
+ dh_install -a -N$(pkg_udeb) -N$(pkg_xen) -N$(pkg_xen_udeb) -N$(pkg_dbg) -N$(pkg_xen_dbg) --sourcedir=$(D)
+ dh_install -p$(pkg_udeb) --sourcedir=$(D_UDEB)
+ dh_install -p$(pkg_xen) --sourcedir=$(D_XEN)
+ dh_install -p$(pkg_xen_udeb) --sourcedir=$(D_XEN_UDEB)
+ dh_install -p$(pkg_dbg) --sourcedir=$(D_DBG)
+ dh_install -p$(pkg_xen_dbg) --sourcedir=$(D_XEN_DBG)
+
+ dh_installdocs -a
+ dh_installchangelogs -a -k ChangeLog
+
+ dh_link -a
+ dh_strip -a -N$(pkg_dbg) -N$(pkg_xen_dbg)
+ dh_compress -a -N$(pkg) -N$(pkg_udeb) -N$(pkg_xen) -N$(pkg_xen_udeb) -N$(pkg_dbg) -N$(pkg_xen_dbg)
+ dh_compress -p$(pkg) boot/gnumach-$(VERSION)-$(MACHINE)
+ dh_compress -p$(pkg_udeb) boot/gnumach
+ dh_compress -p$(pkg_xen) boot/gnumach-$(VERSION)-xen-$(MACHINE)
+ dh_compress -p$(pkg_xen_udeb) boot/gnumach
+ dh_compress -p$(pkg_dbg) boot/gnumach-$(VERSION)-$(MACHINE)-dbg
+ dh_compress -p$(pkg_xen_dbg) boot/gnumach-$(VERSION)-xen-$(MACHINE)-dbg
+ dh_fixperms -a
+ dh_installdeb -a
+ dh_gencontrol -a
+ dh_md5sums -a
+ dh_builddeb -a
+
+.PHONY: build build-gnumach-std build-gnumach-xen build-gnumach-dbg build-gnumach-xen-dbg clean
+.PHONY: install binary binary-indep binary-arch
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..8f04d6d
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1 @@
+compression = "bzip2"
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..30c8f17
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\.dfsg\.cvs\d+$// \
+http://ftp.gnu.org/gnu/gnumach/ gnumach-(.*)\.tar\.gz debian uupdate