[Yaird-devel] Bug#394480: yaird: MMC block device hardware support

Peter Colberg peterco at gmx.net
Sat Oct 21 16:16:23 CEST 2006


Package: yaird
Version: 0.0.12-18
Severity: wishlist
Tags: patch

Hello,

on a system with a built-in SD card reader, running 'yaird --test'
results in the following fatal error:


Hardware modules needed for devices in /sys:
        hda(3:0) in -- at pci0000:00/0000:00:1f.1/ide0/0.0 by --
                [ide-disk]
        mmcblk0(254:0) in -- at pci0000:00/0000:00:1e.0/0000:02:00.1/mmc0:79cc by --
yaird error: unrecognised device: /sys/devices/pci0000:00/0000:00:1e.0/0000:02:00.1/mmc0:79cc
                []
        sda(8:0) in -- at pci0000:00/0000:00:1d.7/usb1/1-4/1-4:1.0/host1/target1:0:0/1:0:0:0 by --
                [sd-mod]
Raid devices:
Loopback devices:
        /dev/loop5(7:5) on /dev/hda with encryption=AES256,multikey=v3
Interpreted Fstab Entries:
        /etc/fstab:4: /proc at proc (proc) with defaults=-
                active: yes
                devno:  --
                path:   --
                name:   --
                hw:     --
                mods:   --
                lvm:    --
        /etc/fstab:5: / at /dev/vg/root (ext3) with defaults=-,errors=remount-ro
                active: yes
                devno:  253:0
                path:   /dev/vg/root
                name:   dm-0
                hw:     --
                mods:   --
                lvm:    [/dev/loop5]
yaird error: unsupported device required: mmcblk0 (fatal)
 


The patch following below adds MMC block device detection to the
Hardware module, yielding support for mounting SD cards at boot time,
for example.

Regards,
Peter
-------------- next part --------------
diff -urN yaird-0.0.12.orig/perl/Hardware.pm yaird-0.0.12/perl/Hardware.pm
--- yaird-0.0.12.orig/perl/Hardware.pm	2006-10-21 14:21:09.000000000 +0200
+++ yaird-0.0.12/perl/Hardware.pm	2006-10-21 15:52:49.000000000 +0200
@@ -163,6 +163,14 @@
 		elsif ($abspath =~ m!/fw-host\d+/[[:xdigit:]]+/[[:xdigit:]]+-\d+$!) {
 			# IEEE1394 device(?); harmless(?)
 		}
+
+		elsif ($abspath =~ m!/mmc\d+:[[:xdigit:]]+$!) {
+			# MMC block device
+			$modules = [ "mmc-block" ];
+		}
+		elsif ($abspath =~ m!/mmc_host:mmc\d+$!) {
+			# MMC host controller; harmless(?)
+		}
 		
 		elsif ($abspath =~ m!/host\d+$!) {
 			# grouping of SCSI devices; harmless.
diff -urN yaird-0.0.12.orig/perl/KConfig.pm yaird-0.0.12/perl/KConfig.pm
--- yaird-0.0.12.orig/perl/KConfig.pm	2006-10-21 14:21:09.000000000 +0200
+++ yaird-0.0.12/perl/KConfig.pm	2006-10-21 15:52:49.000000000 +0200
@@ -205,6 +205,9 @@
 	'sr-mod' => [ 'BLK_DEV_SR' ],
 	'sg' => [ 'CHR_DEV_SG' ],
 
+	# MMC block device driver
+	'mmc-block' => [ 'MMC_BLOCK' ],
+
 	# Compaq Smart Array controllers
 	'cpqarray' => [ 'BLK_CPQ_DA' ],
 	'cciss' => [ 'BLK_CPQ_CISS_DA' ],
diff -urN yaird-0.0.12.orig/perl/Plan.pm yaird-0.0.12/perl/Plan.pm
--- yaird-0.0.12.orig/perl/Plan.pm	2006-10-21 14:21:09.000000000 +0200
+++ yaird-0.0.12/perl/Plan.pm	2006-10-21 15:52:49.000000000 +0200
@@ -907,6 +907,7 @@
              || $name =~ /^sd[a-z]$/
              || $name =~ /^fd\d+$/
 	     || $name =~ /^dasd[a-z]$/
+	     || $name =~ /^mmcblk\d+$/
 	     )
 	{
 		# IDE or SCSI, floppy or dasd


More information about the Yaird-devel mailing list