Mercurial > hg > aboriginal
changeset 978:63d5c2aef8ef
Make qemu-system-powerpc work with more than 2 disks.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 14 Feb 2010 01:42:18 -0600 |
parents | 8d6fe8ad822d |
children | 88b354c0eee1 |
files | sources/patches/linux-pmacorder.patch sources/targets/powerpc/miniconfig-linux |
diffstat | 2 files changed, 43 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/linux-pmacorder.patch Sun Feb 14 01:42:18 2010 -0600 @@ -0,0 +1,41 @@ +Work around a QEMU bug by reordering the drivers in the Linux kernel. + +See http://lists.gnu.org/archive/html/qemu-devel/2010-02/msg00892.html + +QEMU's -hda and -hdb options initialize drives on a power mac IDE controller, +and its -hdc and -hdd options initialize drives on a cmd646 controller. (They +do this because they expect hdc to be a CDROM and DMA for those doesn't +work right on the pmac controller, so they added a second controller.) + +A non-modular Linux kernel always initialies the cmd646 driver before the +pmac driver, and thus the disks on the cmd646 become /dev/hda and /dev/hdb, +and the pmac ones become /dev/hdc and /dev/hdd. Thus -hda initializes hdc, +and so on, working differently than every other qemu target and confusing our +generic boot script. + +The real fix is in QEMU (making their command line arguments match up +with what the Linux will name the drives), but they won't do it. The Linux +kernel's behavior hasn't changed in 10 years, but here's a patch to do +so, to work around the QEMU bug. + +diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile +index 81df925..d9318a1 100644 +--- a/drivers/ide/Makefile ++++ b/drivers/ide/Makefile +@@ -39,6 +39,7 @@ obj-$(CONFIG_BLK_DEV_ALI15X3) += alim15x3.o + obj-$(CONFIG_BLK_DEV_AMD74XX) += amd74xx.o + obj-$(CONFIG_BLK_DEV_ATIIXP) += atiixp.o + obj-$(CONFIG_BLK_DEV_CELLEB) += scc_pata.o ++obj-$(CONFIG_BLK_DEV_IDE_PMAC) += pmac.o + obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o + obj-$(CONFIG_BLK_DEV_CS5520) += cs5520.o + obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o +@@ -76,8 +77,6 @@ obj-$(CONFIG_IDEPCI_PCIBUS_ORDER) += ide-scan-pci.o + + obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o + +-obj-$(CONFIG_BLK_DEV_IDE_PMAC) += pmac.o +- + obj-$(CONFIG_IDE_H8300) += ide-h8300.o + + obj-$(CONFIG_IDE_GENERIC) += ide-generic.o
--- a/sources/targets/powerpc/miniconfig-linux Sat Feb 06 17:57:15 2010 -0600 +++ b/sources/targets/powerpc/miniconfig-linux Sun Feb 14 01:42:18 2010 -0600 @@ -36,8 +36,9 @@ CONFIG_IDE=y CONFIG_IDE_GD=y CONFIG_IDE_GD_ATA=y +CONFIG_BLK_DEV_IDECD=y CONFIG_IDE_PROC_FS=y -CONFIG_IDEPCI_PCIBUS_ORDER=y +CONFIG_BLK_DEV_CMD64X=y CONFIG_BLK_DEV_IDE_PMAC=y CONFIG_IEEE1394=y CONFIG_IEEE1394_OHCI1394=y