[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Heikki Vatiainen <hessu@cs.tut.fi>] HPT366 UDMA support for boot disks, here is what I did



Forwarding this over to the i386 kernel maintainer for comment...

Herbert, is it reasonable to patch the kernel this way?  Perhaps the
patch isn't necessary in the newly minted 2.2.13 ?

--- Begin Message ---
Summary:

  The Debian boot disks do not currently support HighPoint HPT366 
  Ultra DMA controllers. This mail describes what I had to do to
  get the Debian boot-floppies to support HPT366.


Background and current situation:

Two days ago our department bought new PCs which happened to have 
HighPoint HTP366 Ultra DMA controllers in them. Here is a brief 
summary of what we got:

  motherboard:
      Abit BE6
  cpu:
      Celeron 466MHz 
  UDMA controller (from dmesg):
      HPT366: onboard version of chipset, pin1=1 pin2=2
      PCI: HPT366: Fixing interrupt 11 pin 2 to ZERO 
      HPT366: IDE controller on PCI bus 00 dev 98
      HPT366: not 100% native mode: will probe irqs later
      ide2: BM-DMA at 0xb800-0xb807, BIOS settings: hde:DMA, hdf:pio
  disks (from dmesg):
      hda: HITACHI DVD-ROM GD-2500, ATAPI CDROM drive
      hde: IBM-DJNA-352030, 19470MB w/1966kB Cache, CHS=39560/16/63, UDMA(66)

After the modifications to the boot-floppies described below, I was
able to do a complete installation which went with no problems. The
machine boots with boot or rescue floppy, but I did not manage to
get lilo to boot it directly from the hard disk. Currently lilo 
stops with LI if I try to boot it from HD.

If someone would like to try the disks, I can make them available
via anonymous ftp.


Creating the disks:

Since the boot floppies do not support HPT366, I had to create the 
disks myself. The first thing was to compile the kernel which I 
did with the steps shown below. The kernel is the normal debian 
2.2.12 kernel with the UDMA patch from 
http://www.kernel.org/pub/linux/kernel/people/hedrick/ applied. 
After the kernel was compiled, it was copied into the local mirror 
for the boot-floppies package.

# apt-get source kernel-source-2.2.12
# cd kernel-source-2.2.12-2.2.12
# patch -p1 < ~/ide.2.2.12+ikd1.19991015.patch
# cp ../../kernel-patch/kernel-patch-2.2.12-i386-2.2.12/i386/config.i386 .
# cp config.i386 .config
# make oldconfig
# diff -u config.i386 .config
--- config.i386 Wed Oct 20 00:34:48 1999
+++ .config     Wed Oct 20 00:36:03 1999
@@ -82,7 +82,9 @@
 #
 # CONFIG_BLK_DEV_HD_IDE is not set
 CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
 CONFIG_BLK_DEV_IDECD=y
+# CONFIG_IDECD_SLOTS is not set
 CONFIG_BLK_DEV_IDETAPE=y
 CONFIG_BLK_DEV_IDEFLOPPY=y
 # CONFIG_BLK_DEV_IDESCSI is not set
@@ -91,13 +93,28 @@
 CONFIG_BLK_DEV_RZ1000=y
 CONFIG_BLK_DEV_IDEPCI=y
 CONFIG_BLK_DEV_IDEDMA=y
+CONFIG_IDEDMA_AUTO=y
+# IDEDMA_NEW_DRIVE_LISTINGS is not set
+IDEDMA_PCI_EXPERIMENTAL=y
 # CONFIG_BLK_DEV_OFFBOARD is not set
-# CONFIG_IDEDMA_AUTO is not set
+CONFIG_BLK_DEV_AEC6210=y
+CONFIG_BLK_DEV_ALI15X3=y
+# CONFIG_BLK_DEV_CMD646 is not set
+CONFIG_BLK_DEV_CY82C693=y
+CONFIG_BLK_DEV_HPT34X=y
+# CONFIG_BLK_DEV_HPT34X_DMA is not set
+CONFIG_BLK_DEV_HPT366=y
+# CONFIG_BLK_DEV_HPT366_SHARED is not set
+CONFIG_BLK_DEV_PIIX=y
+CONFIG_BLK_DEV_PIIX_TUNING=y
+# CONFIG_BLK_DEV_NS87415 is not set
 # CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_PDC202XX=y
+PDC202XX_FORCE_BURST_BIT=y
+# PDC202XX_FORCE_MASTER_MODE is not set
+CONFIG_BLK_DEV_SIS5513=y
 # CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_VIA82C586 is not set
-# CONFIG_BLK_DEV_CMD646 is not set
+CONFIG_BLK_DEV_VIA82CXXX=y
 # CONFIG_IDE_CHIPSETS is not set
 CONFIG_BLK_DEV_PS2=y
 
@@ -144,6 +161,7 @@
 CONFIG_PARIDE_KTTI=m
 CONFIG_PARIDE_ON20=m
 CONFIG_PARIDE_ON26=m
+CONFIG_BLK_DEV_IDE_MODES=y
 CONFIG_BLK_CPQ_DA=m
 # CONFIG_BLK_DEV_HD is not set
 
@@ -937,3 +955,4 @@
 # Kernel hacking
 #
 # CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_KERNEL_DEBUGGING is not set


# make-kpkg --revision=udma.0.5 kernel_image
# cp ../kernel-image-2.2.12_2.2.12-4_i386.deb /root/boot-floppies/mirror/dists/potato/main/binary-i386/base/kernel-image-2.2.12_2.2.12-4.deb


In order to get the /dev/hde device to detected and used, I had to 
apply these patches against files in the boot-floppies package. 
The boot-floppies package was retrieved with anonymous CVS at 
about 08:00 UTC this morning (1999-10-20).

The patches are against basdisks.sh, lowmemrd.sh, rootdisks.sh and 
utilities/libfdisk/fdisk.c. The lowmemrd.sh was patched just for 
the completness sake.

--- basedisks.sh.orig	Sat Oct 16 21:04:51 1999
+++ basedisks.sh	Wed Oct 20 15:53:17 1999
@@ -103,13 +103,13 @@
 		(cd $B/dev; /dev/MAKEDEV loop std generic hdc hdd hde hdf hdg hdh sdc sdd sde sdf sdg sdh )
 		;;
 	i386)
-		(cd $B/dev; /dev/MAKEDEV generic-i386 loop hdc hdd sdc sdd sde sdf sdg sdh scd-all isdn-io sonycd mcd mcdx cdu535 lmscd sbpcd aztcd bpcd)
+		(cd $B/dev; /dev/MAKEDEV generic-i386 loop hdc hdd hde hdf hdg hdh sdc sdd sde sdf sdg sdh scd-all isdn-io sonycd mcd mcdx cdu535 lmscd sbpcd aztcd bpcd)
 		;;
 	m68k)
-		(cd $B/dev; /dev/MAKEDEV std generic-m68k hdc hdd sdc sdd sde sdf adc add ade adf loop scd-all)
+		(cd $B/dev; /dev/MAKEDEV std generic-m68k hdc hdd hde hdf hdg hdh sdc sdd sde sdf adc add ade adf loop scd-all)
 		;;
 	powerpc)
-		(cd $B/dev; /dev/MAKEDEV generic-powerpc loop hdc hdd sdc sdd sde sdf sdg sdh isdn-io )
+		(cd $B/dev; /dev/MAKEDEV generic-powerpc loop hdc hdd hde hdf hdg hdh sdc sdd sde sdf sdg sdh isdn-io )
 		;;
 	sparc)
 		(cd $B/dev; /dev/MAKEDEV generic-sparc loop sdc sdd sde sdf sdg sdh )



--- lowmemrd.sh.orig	Sat Oct 16 21:04:51 1999
+++ lowmemrd.sh	Wed Oct 20 15:54:27 1999
@@ -39,7 +39,7 @@
 mount -t minix -o loop $floppy $mnt
 
 mkdir $mnt/dev
-(cd $mnt/dev; /dev/MAKEDEV fd0 fd1 hda hdb hdc hdd sda sdb sdc sdd)
+(cd $mnt/dev; /dev/MAKEDEV fd0 fd1 hda hdb hdc hdd hde hdf hdg hdh sda sdb sdc sdd)
 mknod $mnt/dev/tty1 c 4 1
 mkdir $mnt/proc
 mkdir $mnt/mnt


--- rootdisk.sh.orig	Wed Oct 20 09:05:21 1999
+++ rootdisk.sh	Wed Oct 20 15:55:51 1999
@@ -191,13 +191,13 @@
 		boot_floppies_dev="std tty1 tty2 tty3 tty4 ttyS0 ttyS1 ttyS2 ttyS3 lp fd fd0 fd1 xda xdb eda edb hda hdb hdc hdd hde hdf hdg hdh sda sdb sdc sdd sde sdf sdg sdh initrd rtc loop scd0 scd1 scd2 scd3 sonycd mcd mcdx cdu535 lmscd sbpcd aztcd bpcd"
 		;;
 	m68k)
-		boot_floppies_dev="std tty1 tty2 tty3 tty4 ttyS0 ttyS1 fd fd0 fd1 hda hdb hdc hdd sda sdb sdc sdd sde sdf sdh ada adb adc add ade adf fb initrd rtc loop scd0 scd1 scd2 scd3"
+		boot_floppies_dev="std tty1 tty2 tty3 tty4 ttyS0 ttyS1 fd fd0 fd1 hda hdb hdc hdd hde hdf hdg hdh sda sdb sdc sdd sde sdf sdh ada adb adc add ade adf fb initrd rtc loop scd0 scd1 scd2 scd3"
 		;;
 	powerpc)
-		boot_floppies_dev="std tty1 tty2 tty3 tty4 ttyS0 ttyS1 ttyS2 ttyS3 lp fd fd0-bare fd1-bare hda hdb hdc hdd sda sdb sdc sdd sde sdf sdg sdh scd0 scd1 scd2 scd3 st0 st1 initrd rtc loop adb fb"
+		boot_floppies_dev="std tty1 tty2 tty3 tty4 ttyS0 ttyS1 ttyS2 ttyS3 lp fd fd0-bare fd1-bare hda hdb hdc hdd hde hdf hdg hdh sda sdb sdc sdd sde sdf sdg sdh scd0 scd1 scd2 scd3 st0 st1 initrd rtc loop adb fb"
 		;;
 	sparc)
-		boot_floppies_dev="std tty1 tty2 tty3 tty4 ttyS0 ttyS1 ttyS2 ttyS3 lp fd fd0-bare fd1-bare hda hdb hdc hdd sda sdb sdc sdd sde sdf sdg sdh scd0 scd1 st0 st1 initrd rtc loop"
+		boot_floppies_dev="std tty1 tty2 tty3 tty4 ttyS0 ttyS1 ttyS2 ttyS3 lp fd fd0-bare fd1-bare hda hdb hdc hdd hde hdf hdg hdh sda sdb sdc sdd sde sdf sdg sdh scd0 scd1 st0 st1 initrd rtc loop"
 		# for serial console on 2.0 kernel
 		# (not created by makedev anymore)
 		mknod $R/dev/cua0 c 5 64



--- fdisk.c.orig        Thu Oct  7 01:59:40 1999
+++ fdisk.c     Wed Oct 20 13:17:18 1999
@@ -879,7 +879,7 @@
     char *dev_pattern;
     char start, end;
 } trylist[] = {
-    { "/dev/hd", 'a', 'd' },
+    { "/dev/hd", 'a', 'h' },
     { "/dev/sd", 'a', 'h' },
 #if #cpu (i386)
     { "/dev/ed", 'a', 'd' },



// Heikki
-- 
Heikki Vatiainen                  * hessu@cs.tut.fi
Tampere University of Technology  * Tampere, Finland



-- 
To UNSUBSCRIBE, email to debian-boot-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



--- End Message ---
-- 
.....Adam Di Carlo....adam@onShore.com.....<URL:http://www.onShore.com/>

Reply to: