summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Brateau <etienne.brateau@gmail.com>2022-09-24 02:02:52 +0200
committerDamien Zammit <damien@zamaudio.com>2023-06-24 00:00:11 +1000
commita50f734aac32c40d070439177205ea10caece792 (patch)
treed21e28bc5e5dcd7ac8613ff99357fd6e874a945f
parent2c5b365967e2c81f10057d4e1cc692643cc1d13d (diff)
Update patches to be able to have ahcisata and piixde compiled together
With this commit, rumpdisk needs to be build with "rumpdev_ahcisata rumpdev_piixide rumpdev_ata". Message-Id: <20220924000252.18017-1-etienne.brateau@gmail.com>
-rw-r--r--debian/changelog5
-rw-r--r--debian/librumpdev-disk-dev.install3
-rw-r--r--debian/librumpdev-disk0.install1
-rw-r--r--debian/patches/ahcisata-atapi.diff26
-rw-r--r--debian/patches/ahcisata-rump.diff108
-rw-r--r--debian/patches/ata-rump.diff290
-rw-r--r--debian/patches/piixide-rump.diff115
-rw-r--r--debian/patches/series2
8 files changed, 315 insertions, 235 deletions
diff --git a/debian/changelog b/debian/changelog
index 22519988..766ba374 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
rumpkernel (0~20211031-2) UNRELEASED; urgency=medium
+ [ Samuel Thibault ]
* debian/rules: Set BSDOBJDIR to $(CURDIR)/obj.
* debian/patches/idtype_t.diff: Fix build with glibc 2.36 that doesn't get
idtype_t magically defined.
+ [ Etienne Brateau ]
+ * Move ata code from rumpdev_ahcisata to a new rumpdev_ata so it can be used
+ from both rumpdev_ahcisata and rumpdev_piixide.
+
-- Samuel Thibault <sthibault@debian.org> Thu, 17 Feb 2022 00:01:26 +0000
rumpkernel (0~20211031-1) unreleased; urgency=medium
diff --git a/debian/librumpdev-disk-dev.install b/debian/librumpdev-disk-dev.install
index a0081834..e6d638ea 100644
--- a/debian/librumpdev-disk-dev.install
+++ b/debian/librumpdev-disk-dev.install
@@ -1,6 +1,9 @@
usr/lib/librumpdev_disk.a
usr/lib/librumpdev_disk_pic.a
usr/lib/librumpdev_disk.so
+usr/lib/librumpdev_ata.a
+usr/lib/librumpdev_ata_pic.a
+usr/lib/librumpdev_ata.so
usr/lib/librumpdev_umass.a
usr/lib/librumpdev_umass_pic.a
usr/lib/librumpdev_umass.so
diff --git a/debian/librumpdev-disk0.install b/debian/librumpdev-disk0.install
index 96eb3560..85f6df97 100644
--- a/debian/librumpdev-disk0.install
+++ b/debian/librumpdev-disk0.install
@@ -1,5 +1,6 @@
usr/lib/librumpdev_disk.so.*
usr/lib/librumpdev_umass.so.*
+usr/lib/librumpdev_ata.so.*
usr/lib/librumpdev_ahcisata.so.*
usr/lib/librumpdev_piixide.so.*
usr/lib/librumpdev_scsipi.so.*
diff --git a/debian/patches/ahcisata-atapi.diff b/debian/patches/ahcisata-atapi.diff
deleted file mode 100644
index 48d89240..00000000
--- a/debian/patches/ahcisata-atapi.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-TODO: merge with ahcisata-rump.diff?
-
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/AHCISATA.ioconf
-===================================================================
---- rumpkernel.orig/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/AHCISATA.ioconf
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/AHCISATA.ioconf
-@@ -16,4 +16,5 @@ ata_hl* at atabus? drive ?
- wd* at ata_hl?
-
- # ATAPI support
--atapi* at ahcisata?
-+atapibus* at ahcisata?
-+cd* at atapibus? drive ? flags 0x0000
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/Makefile
-===================================================================
---- rumpkernel.orig/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/Makefile
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/Makefile
-@@ -11,7 +11,7 @@ IOCONF= AHCISATA.ioconf
- SRCS+= ahcisata_pci.c
- SRCS+= sata_subr.c satafis_subr.c
- SRCS+= ahcisata_core.c
--SRCS+= atapi_wdc.c atapi_base.c
-+SRCS+= atapi_wdc.c atapi_base.c cd.c
- SRCS+= wd.c ata.c ata_wdc.c ata_subr.c ata_recovery.c
- SRCS+= wdc.c
-
diff --git a/debian/patches/ahcisata-rump.diff b/debian/patches/ahcisata-rump.diff
index 03266c29..6a5a6aa6 100644
--- a/debian/patches/ahcisata-rump.diff
+++ b/debian/patches/ahcisata-rump.diff
@@ -43,31 +43,25 @@ Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/AHCISATA.ioc
===================================================================
--- /dev/null
+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/AHCISATA.ioconf
-@@ -0,0 +1,19 @@
+@@ -0,0 +1,11 @@
+ioconf ahcisata
+
+include "conf/files"
-+include "dev/ata/files.ata"
++#include "dev/ata/files.ata"
+include "dev/pci/files.pci"
+include "rump/dev/files.rump"
+
+pseudo-root pci*
+
+# AHCI support
-+ahcisata* at pci? dev ? function ?
-+atabus* at ahcisata? channel ?
-+ata_hl* at atabus? drive ?
-+
-+# Disks
-+wd* at ata_hl?
-+
-+# ATAPI support
-+atapi* at ahcisata?
++ahcisata* at pci? dev ? function ? flags 0x0000
Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/Makefile
===================================================================
--- /dev/null
+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/Makefile
-@@ -0,0 +1,21 @@
+@@ -0,0 +1,20 @@
++RUMPTOP=${TOPRUMP}
++
+.PATH: ${.CURDIR}/../../../../dev/pci \
+ ${.CURDIR}/../../../../dev/ata \
+ ${.CURDIR}/../../../../dev/scsipi \
@@ -77,98 +71,12 @@ Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/Makefile
+COMMENT=AHCI support with SATA && ATAPI
+
+IOCONF= AHCISATA.ioconf
++RUMP_COMPONENT=ioconf
+
+SRCS+= ahcisata_pci.c
+SRCS+= sata_subr.c satafis_subr.c
+SRCS+= ahcisata_core.c
-+SRCS+= atapi_wdc.c atapi_base.c
-+SRCS+= wd.c ata.c ata_wdc.c ata_subr.c ata_recovery.c
-+SRCS+= wdc.c
-+
-+SRCS+= ahcisata_component.c
+
++.include "${RUMPTOP}/Makefile.rump"
+.include <bsd.lib.mk>
+.include <bsd.klinks.mk>
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/ahcisata_component.c
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/ahcisata_component.c
-@@ -0,0 +1,40 @@
-+#include <sys/param.h>
-+#include <sys/conf.h>
-+#include <sys/device.h>
-+#include <sys/kmem.h>
-+#include <sys/stat.h>
-+
-+#include "ioconf.c"
-+
-+#include <rump-sys/kern.h>
-+#include <rump-sys/vfs.h>
-+
-+RUMP_COMPONENT(RUMP_COMPONENT_DEV)
-+{
-+ extern struct bdevsw wd_bdevsw;
-+ extern struct cdevsw wd_cdevsw;
-+ devmajor_t bmaj, cmaj;
-+
-+ config_init_component(cfdriver_ioconf_ahcisata,
-+ cfattach_ioconf_ahcisata, cfdata_ioconf_ahcisata);
-+
-+ bmaj = cmaj = -1;
-+ FLAWLESSCALL(devsw_attach("wd", &wd_bdevsw, &bmaj, &wd_cdevsw, &cmaj));
-+
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd0", 'a',
-+ bmaj, 0, 8));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd0", 'a',
-+ cmaj, 0, 8));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd1", 'a',
-+ bmaj, 8, 8));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd1", 'a',
-+ cmaj, 8, 8));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd2", 'a',
-+ bmaj, 16, 8));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd2", 'a',
-+ cmaj, 16, 8));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd3", 'a',
-+ bmaj, 24, 8));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd3", 'a',
-+ cmaj, 24, 8));
-+}
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/opt_wd.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/opt_wd.h
-@@ -0,0 +1 @@
-+
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/ataraid.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/ataraid.h
-@@ -0,0 +1 @@
-+
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/opt_ata.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/opt_ata.h
-@@ -0,0 +1 @@
-+
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/opt_wdc.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/opt_wdc.h
-@@ -0,0 +1,3 @@
-+#define NWD 1
-+#define NSATA 1
-+#define WDC_NO_IDS
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/sata.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/sata.h
-@@ -0,0 +1 @@
-+
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/sata_pmp.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_ahcisata/sata_pmp.h
-@@ -0,0 +1 @@
-+
diff --git a/debian/patches/ata-rump.diff b/debian/patches/ata-rump.diff
new file mode 100644
index 00000000..2dfa5740
--- /dev/null
+++ b/debian/patches/ata-rump.diff
@@ -0,0 +1,290 @@
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/ATA.ioconf
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/ATA.ioconf
+@@ -0,0 +1,29 @@
++ioconf ata
++
++include "conf/files"
++include "dev/ata/files.ata"
++include "dev/pci/files.pci"
++include "rump/dev/files.rump"
++
++pseudo-root ahcisata*
++pseudo-root piixide*
++pseudo-root atapi*
++
++
++# ATA (IDE) bus support
++atabus* at ahcisata? channel?
++atabus* at piixide? channel?
++#ata_hl* at atabus? drive?
++
++# IDE drives
++wd* at atabus? drive? flags 0x0000
++
++# ATAPI devices
++# flags have the same meanig as for IDE drives.
++atapibus* at atapi? channel?
++atapibus* at ahcisata? channel?
++atapibus* at piixide? channel?
++cd* at atapibus? drive ? flags 0x0000 #ATAPI CD-ROM drives
++sd* at atapibus? drive ? flags 0x0000 #ATAPI disk drives
++st* at atapibus? drive ? flags 0x0000 #ATAPI tape drives
++uk* at atapibus? drive ? flags 0x0000 #ATAPI unkown
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/Makefile
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/Makefile
+@@ -0,0 +1,20 @@
++RUMPTOP=${TOPRUMP}
++
++.PATH: ${.CURDIR}/../../../../dev/pci \
++ ${.CURDIR}/../../../../dev/ata \
++ ${.CURDIR}/../../../../dev/scsipi \
++ ${.CURDIR}/../../../../dev/ic
++
++LIB= rumpdev_ata
++COMMENT=ATA && ATAPI
++IOCONF= ATA.ioconf
++
++SRCS+= atapi_wdc.c atapi_base.c cd.c
++SRCS+= wd.c ata.c ata_wdc.c ata_subr.c ata_recovery.c
++SRCS+= wdc.c
++
++SRCS+= ata_component.c
++
++.include "${RUMPTOP}/Makefile.rump"
++.include <bsd.lib.mk>
++.include <bsd.klinks.mk>
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/ata_component.c
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/ata_component.c
+@@ -0,0 +1,51 @@
++#include <sys/param.h>
++#include <sys/conf.h>
++#include <sys/device.h>
++#include <sys/kmem.h>
++#include <sys/stat.h>
++
++#include "ioconf.c"
++
++#include <rump-sys/kern.h>
++#include <rump-sys/vfs.h>
++
++
++RUMP_COMPONENT(RUMP_COMPONENT_DEV)
++{
++ extern struct bdevsw wd_bdevsw, cd_bdevsw;
++ extern struct cdevsw wd_cdevsw, cd_cdevsw;
++ devmajor_t bmaj, cmaj;
++
++ config_init_component(cfdriver_ioconf_ata,
++ cfattach_ioconf_ata, cfdata_ioconf_ata);
++
++ bmaj = cmaj = -1;
++ int err = devsw_attach("wd", &wd_bdevsw, &bmaj, &wd_cdevsw, &cmaj);
++ if (err != 0) { panic("devsw_attach failed with error %i", err);}
++
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd0", 'a',
++ bmaj, 0, 4));
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd0", 'a',
++ cmaj, 0, 4));
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd1", 'a',
++ bmaj, 8, 4));
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd1", 'a',
++ cmaj, 8, 4));
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd2", 'a',
++ bmaj, 16, 4));
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd2", 'a',
++ cmaj, 16, 4));
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd3", 'a',
++ bmaj, 24, 4));
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd3", 'a',
++ cmaj, 24, 4));
++/* Borked
++ bmaj = cmaj = -1;
++ FLAWLESSCALL(devsw_attach("cd", &cd_bdevsw, &bmaj, &cd_cdevsw, &cmaj));
++
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/cd0", 'a',
++ bmaj, 0, 1));
++ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rcd0", 'a',
++ cmaj, 0, 1));
++*/
++}
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/ataraid.h
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/ataraid.h
+@@ -0,0 +1 @@
++
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/locators.h
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/locators.h
+@@ -0,0 +1,119 @@
++#define WSKBDDEVCF_CONSOLE 0
++#define WSKBDDEVCF_CONSOLE_DEFAULT -1
++#define WSKBDDEVCF_MUX 1
++#define WSKBDDEVCF_MUX_DEFAULT 1
++#define WSKBDDEVCF_NLOCS 2
++#define PCKBPORTCF_SLOT 0
++#define PCKBPORTCF_SLOT_DEFAULT -1
++#define PCKBPORTCF_NLOCS 1
++#define MLXCF_UNIT 0
++#define MLXCF_UNIT_DEFAULT -1
++#define MLXCF_NLOCS 1
++#define WSMOUSEDEVCF_MUX 0
++#define WSMOUSEDEVCF_MUX_DEFAULT 0
++#define WSMOUSEDEVCF_NLOCS 1
++#define CPCBUSCF_ADDR 0
++#define CPCBUSCF_IRQ 1
++#define CPCBUSCF_IRQ_DEFAULT -1
++#define CPCBUSCF_NLOCS 2
++#define IHIDBUSCF_REPORTID 0
++#define IHIDBUSCF_REPORTID_DEFAULT -1
++#define IHIDBUSCF_NLOCS 1
++#define NVMECF_NSID 0
++#define NVMECF_NSID_DEFAULT -1
++#define NVMECF_NLOCS 1
++#define PCMCIABUSCF_CONTROLLER 0
++#define PCMCIABUSCF_CONTROLLER_DEFAULT -1
++#define PCMCIABUSCF_SOCKET 1
++#define PCMCIABUSCF_SOCKET_DEFAULT -1
++#define PCMCIABUSCF_NLOCS 2
++#define FLASHBUSCF_OFFSET 0
++#define FLASHBUSCF_OFFSET_DEFAULT 0
++#define FLASHBUSCF_SIZE 1
++#define FLASHBUSCF_SIZE_DEFAULT 0
++#define FLASHBUSCF_READONLY 2
++#define FLASHBUSCF_READONLY_DEFAULT 0
++#define FLASHBUSCF_DYNAMIC 3
++#define FLASHBUSCF_DYNAMIC_DEFAULT 0
++#define FLASHBUSCF_NLOCS 4
++#define PUCCF_PORT 0
++#define PUCCF_PORT_DEFAULT -1
++#define PUCCF_NLOCS 1
++#define PCICF_DEV 0
++#define PCICF_DEV_DEFAULT -1
++#define PCICF_FUNCTION 1
++#define PCICF_FUNCTION_DEFAULT -1
++#define PCICF_NLOCS 2
++#define GPIBDEVCF_ADDRESS 0
++#define GPIBDEVCF_ADDRESS_DEFAULT -1
++#define GPIBDEVCF_NLOCS 1
++#define WSBELLDEVCF_CONSOLE 0
++#define WSBELLDEVCF_CONSOLE_DEFAULT -1
++#define WSBELLDEVCF_MUX 1
++#define WSBELLDEVCF_MUX_DEFAULT 1
++#define WSBELLDEVCF_NLOCS 2
++#define PCIBUSCF_BUS 0
++#define PCIBUSCF_BUS_DEFAULT -1
++#define PCIBUSCF_NLOCS 1
++#define WSDISPLAYDEVCF_KBDMUX 0
++#define WSDISPLAYDEVCF_KBDMUX_DEFAULT 1
++#define WSDISPLAYDEVCF_NLOCS 1
++#define MIICF_PHY 0
++#define MIICF_PHY_DEFAULT -1
++#define MIICF_NLOCS 1
++#define SPICF_SLAVE 0
++#define SPICF_SLAVE_DEFAULT -1
++#define SPICF_NLOCS 1
++#define WSEMULDISPLAYDEVCF_CONSOLE 0
++#define WSEMULDISPLAYDEVCF_CONSOLE_DEFAULT -1
++#define WSEMULDISPLAYDEVCF_KBDMUX 1
++#define WSEMULDISPLAYDEVCF_KBDMUX_DEFAULT 1
++#define WSEMULDISPLAYDEVCF_NLOCS 2
++#define AACCF_UNIT 0
++#define AACCF_UNIT_DEFAULT -1
++#define AACCF_NLOCS 1
++#define SCSICF_CHANNEL 0
++#define SCSICF_CHANNEL_DEFAULT -1
++#define SCSICF_NLOCS 1
++#define HDAUDIOBUSCF_NID 0
++#define HDAUDIOBUSCF_NID_DEFAULT -1
++#define HDAUDIOBUSCF_NLOCS 1
++#define TWACF_UNIT 0
++#define TWACF_UNIT_DEFAULT -1
++#define TWACF_NLOCS 1
++#define ATACF_CHANNEL 0
++#define ATACF_CHANNEL_DEFAULT -1
++#define ATACF_NLOCS 1
++#define CACCF_UNIT 0
++#define CACCF_UNIT_DEFAULT -1
++#define CACCF_NLOCS 1
++#define FDTCF_PASS 0
++#define FDTCF_PASS_DEFAULT 10
++#define FDTCF_NLOCS 1
++#define AMRCF_UNIT 0
++#define AMRCF_UNIT_DEFAULT -1
++#define AMRCF_NLOCS 1
++#define TWECF_UNIT 0
++#define TWECF_UNIT_DEFAULT -1
++#define TWECF_NLOCS 1
++#define IICCF_ADDR 0
++#define IICCF_ADDR_DEFAULT -1
++#define IICCF_NLOCS 1
++#define ATA_HLCF_DRIVE 0
++#define ATA_HLCF_DRIVE_DEFAULT -1
++#define ATA_HLCF_NLOCS 1
++#define GPIOCF_OFFSET 0
++#define GPIOCF_OFFSET_DEFAULT -1
++#define GPIOCF_MASK 1
++#define GPIOCF_MASK_DEFAULT 0
++#define GPIOCF_FLAG 2
++#define GPIOCF_FLAG_DEFAULT 0
++#define GPIOCF_NLOCS 3
++#define ICPCF_UNIT 0
++#define ICPCF_UNIT_DEFAULT -1
++#define ICPCF_NLOCS 1
++#define ATARAIDCF_VENDTYPE 0
++#define ATARAIDCF_VENDTYPE_DEFAULT -1
++#define ATARAIDCF_UNIT 1
++#define ATARAIDCF_UNIT_DEFAULT -1
++#define ATARAIDCF_NLOCS 2
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/opt_ata.h
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/opt_ata.h
+@@ -0,0 +1 @@
++
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/opt_wd.h
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/opt_wd.h
+@@ -0,0 +1 @@
++
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/opt_wdc.h
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/opt_wdc.h
+@@ -0,0 +1,3 @@
++#define NWD 1
++#define NSATA 1
++#define WDC_NO_IDS
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/sata.h
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/sata.h
+@@ -0,0 +1 @@
++
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/sata_pmp.h
+===================================================================
+--- /dev/null
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libata/sata_pmp.h
+@@ -0,0 +1 @@
++
+Index: rumpkernel/buildrump.sh/src/sys/rump/dev/Makefile.rumpdevcomp
+===================================================================
+--- rumpkernel.orig/buildrump.sh/src/sys/rump/dev/Makefile.rumpdevcomp
++++ rumpkernel/buildrump.sh/src/sys/rump/dev/Makefile.rumpdevcomp
+@@ -1,7 +1,7 @@
+ # $NetBSD: Makefile.rumpdevcomp,v 1.25 2020/04/04 17:20:16 christos Exp $
+ #
+
+-RUMPDEVCOMP= audio bpf cgd disk dm drvctl fss md \
++RUMPDEVCOMP= ata audio bpf cgd disk dm drvctl fss md \
+ pad pud putter raidframe rnd scsipi sysmon vnd wscons \
+ opencrypto
+
diff --git a/debian/patches/piixide-rump.diff b/debian/patches/piixide-rump.diff
index fd605b70..b02e892a 100644
--- a/debian/patches/piixide-rump.diff
+++ b/debian/patches/piixide-rump.diff
@@ -14,7 +14,9 @@ Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/Makefile
===================================================================
--- /dev/null
+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/Makefile
-@@ -0,0 +1,19 @@
+@@ -0,0 +1,18 @@
++RUMPTOP=${TOPRUMP}
++
+.PATH: ${.CURDIR}/../../../../dev/pci \
+ ${.CURDIR}/../../../../dev/ata \
+ ${.CURDIR}/../../../../dev/scsipi \
@@ -24,21 +26,18 @@ Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/Makefile
+COMMENT=PIIX IDE & ATAPI support
+
+IOCONF= PIIXIDE.ioconf
++RUMP_COMPONENT=ioconf
+
+SRCS+= pciide_common.c piixide.c
-+SRCS+= wd.c ata.c ata_wdc.c ata_subr.c ata_recovery.c
-+SRCS+= atapi_wdc.c atapi_base.c cd.c
-+SRCS+= wdc.c
-+
-+SRCS+= piixide_component.c
+
++.include "${RUMPTOP}/Makefile.rump"
+.include <bsd.lib.mk>
+.include <bsd.klinks.mk>
Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/PIIXIDE.ioconf
===================================================================
--- /dev/null
+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/PIIXIDE.ioconf
-@@ -0,0 +1,20 @@
+@@ -0,0 +1,11 @@
+ioconf piixide
+
+include "conf/files"
@@ -49,104 +48,4 @@ Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/PIIXIDE.iocon
+pseudo-root pci*
+
+# PIIX support
-+piixide* at pci? dev ? function ?
-+
-+# IDE support
-+atabus* at piixide? channel ?
-+ata_hl* at atabus? drive ?
-+wd* at ata_hl?
-+
-+# ATAPI support
-+atapibus* at piixide? channel ?
-+cd* at atapibus? drive ? flags 0x0000
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/opt_wd.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/opt_wd.h
-@@ -0,0 +1 @@
-+
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/ataraid.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/ataraid.h
-@@ -0,0 +1 @@
-+
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/opt_ata.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/opt_ata.h
-@@ -0,0 +1 @@
-+#define ATADEBUG
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/opt_wdc.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/opt_wdc.h
-@@ -0,0 +1,2 @@
-+#define NWD 1
-+#define WDC_NO_IDS
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/piixide_component.c
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/piixide_component.c
-@@ -0,0 +1,49 @@
-+#include <sys/param.h>
-+#include <sys/conf.h>
-+#include <sys/device.h>
-+#include <sys/kmem.h>
-+#include <sys/stat.h>
-+
-+#include "ioconf.c"
-+
-+#include <rump-sys/kern.h>
-+#include <rump-sys/vfs.h>
-+
-+RUMP_COMPONENT(RUMP_COMPONENT_DEV)
-+{
-+ extern struct bdevsw wd_bdevsw, cd_bdevsw;
-+ extern struct cdevsw wd_cdevsw, cd_cdevsw;
-+ devmajor_t bmaj, cmaj;
-+
-+ config_init_component(cfdriver_ioconf_piixide,
-+ cfattach_ioconf_piixide, cfdata_ioconf_piixide);
-+
-+ bmaj = cmaj = -1;
-+ FLAWLESSCALL(devsw_attach("wd", &wd_bdevsw, &bmaj, &wd_cdevsw, &cmaj));
-+
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd0", 'a',
-+ bmaj, 0, 4));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd0", 'a',
-+ cmaj, 0, 4));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd1", 'a',
-+ bmaj, 8, 4));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd1", 'a',
-+ cmaj, 8, 4));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd2", 'a',
-+ bmaj, 16, 4));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd2", 'a',
-+ cmaj, 16, 4));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/wd3", 'a',
-+ bmaj, 24, 4));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rwd3", 'a',
-+ cmaj, 24, 4));
-+/* Borked
-+ bmaj = cmaj = -1;
-+ FLAWLESSCALL(devsw_attach("cd", &cd_bdevsw, &bmaj, &cd_cdevsw, &cmaj));
-+
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFBLK, "/dev/cd0", 'a',
-+ bmaj, 0, 1));
-+ FLAWLESSCALL(rump_vfs_makedevnodes(S_IFCHR, "/dev/rcd0", 'a',
-+ cmaj, 0, 1));
-+*/
-+}
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/sata.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/sata.h
-@@ -0,0 +1 @@
-+
-Index: rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/sata_pmp.h
-===================================================================
---- /dev/null
-+++ rumpkernel/buildrump.sh/src/sys/rump/dev/lib/libpci_piixide/sata_pmp.h
-@@ -0,0 +1 @@
-+
++piixide* at pci? dev ? function ? flags 0x0000
diff --git a/debian/patches/series b/debian/patches/series
index a0ceaa43..5654d354 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
path_max.diff
+ata-rump.diff
piixide-rump.diff
ahcisata-rump.diff
busspaceunmap-rump.diff
@@ -6,7 +7,6 @@ memory-range.diff
gnumach-update
rumpuser-rng-debug.diff
machirqdev.diff
-ahcisata-atapi.diff
dealloc.diff
netbsd-build.diff
no-virtio-rump.diff