r1377 - in trunk/utils/initrd-tools: . debian
Joshua Kwan
joshk@haydn.debian.org
Sat, 28 Aug 2004 20:40:11 -0600
Author: joshk
Date: 2004-08-27 04:46:33 -0600 (Fri, 27 Aug 2004)
New Revision: 1377
Modified:
trunk/utils/initrd-tools/debian/changelog
trunk/utils/initrd-tools/mkinitrd
Log:
quick hack to get mkinitrd working better for ESP users across the board
Modified: trunk/utils/initrd-tools/debian/changelog
===================================================================
--- trunk/utils/initrd-tools/debian/changelog 2004-08-27 10:15:20 UTC (rev 1376)
+++ trunk/utils/initrd-tools/debian/changelog 2004-08-27 10:46:33 UTC (rev 1377)
@@ -1,3 +1,11 @@
+initrd-tools (0.1.74) UNRELEASED; urgency=high
+
+ * Joshua Kwan
+ - Educate mkinitrd about different arches, allowing us to internally
+ disambiguate all the different esp drivers.
+
+ -- Joshua Kwan <joshk@triplehelix.org> Fri, 27 Aug 2004 03:45:56 -0700
+
initrd-tools (0.1.73) unstable; urgency=low
* Martin Michlmayr
Modified: trunk/utils/initrd-tools/mkinitrd
===================================================================
--- trunk/utils/initrd-tools/mkinitrd 2004-08-27 10:15:20 UTC (rev 1376)
+++ trunk/utils/initrd-tools/mkinitrd 2004-08-27 10:46:33 UTC (rev 1377)
@@ -473,6 +473,27 @@
echo "$PROG: Cannot determine SCSI module" >&2
exit 1
fi
+
+ # Educate mkinitrd about different arches..
+ case "$(dpkg --print-architecture)" in
+ mips) ARCH_ESP=jazz_esp ;;
+ mipsel) ARCH_ESP=dec_esp ;;
+ m68k)
+ if [ ! -f /proc/hardware ]; then
+ echo "$PROG: Cannot determine m68k variant" >&2
+ exit 1
+ fi
+
+ case "$(grep ^Model: /proc/hardware | sed 's/Model:[ ]*//')" in
+ # Archdetect in sh!
+ Sun\ 3*) ARCH_ESP=sun3x_esp ;;
+ Macintosh) ARCH_ESP=mac_esp ;;
+ Amiga) ARCH_ESP=mca_53c9x ;;
+ esac
+ ;;
+ sparc | sparc64) ARCH_ESP=esp ;;
+ esac
+
find /proc/scsi -type d -mindepth 1 -maxdepth 1 \
-printf "%f\n" | sed '
/^ide-scsi$/d
@@ -504,12 +525,7 @@
s/^esp-blz2060$/blz2060/; t
s/^esp-cyberstorm$/cyberstorm/; t
s/^esp-cyberstormII$/cyberstormII/; t
- s/^esp$/dec_esp\
-esp\
-jazz_esp\
-mac_esp\
-mca_53c9x\
-sun3x_esp/; t
+ s/^esp$/'$ARCH_ESP'/; t
s/^esp-fastlane$/fastlane/; t
s/^GVP11$/gvp11/; t
s/^53c94$/mac53c94/; t