[SCM] live-boot branch, debian-next, updated. debian/2.0_a11-1-1-g4256e2d

Daniel Baumann daniel at debian.org
Sat Jul 3 18:49:31 UTC 2010


The following commit has been merged in the debian-next branch:
commit 4256e2d1416b1d338b740de97a87085d60dab8dd
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Jul 3 20:48:41 2010 +0200

    Adding initial for memdisk support, part 1.

diff --git a/hooks/live b/hooks/live
index cba7120..4f11998 100755
--- a/hooks/live
+++ b/hooks/live
@@ -151,6 +151,13 @@ fi
 # Program: md5sum
 copy_exec /usr/bin/md5sum /bin
 
+# Program: memdisk
+if [ -x /usr/bin/memdiskfind ]
+then
+	copy_exec /usr/bin/memdiskfind
+	manual_add_modules phram mtdblock
+fi
+
 # Program: cpio
 # busybox and klibc lacks --no-absolute-filenames and --sparse, needed for snapshots
 if [ -e "${DESTDIR}/bin/cpio" ]
diff --git a/scripts/live b/scripts/live
index 412094a..5b5a3b9 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1704,6 +1704,20 @@ mountroot ()
 			# Do a local boot from hd
 			livefs_root=${ROOT}
 		else
+			if [ -x /usr/bin/memdiskfind ]
+			then
+				MEMDISK=$(/usr/bin/memdiskfind)
+
+				if [ $? -eq 0 ]
+				then
+					# We found a memdisk, set up phram
+					modprobe phram phram=memdisk,${MEMDISK}
+
+					# Load mtdblock, the memdisk will be /dev/mtdblock0
+					modprobe mtdblock
+				fi
+			fi
+
 			# Scan local devices for the image
 			i=0
 			while [ "$i" -lt 60 ]

-- 
live-boot



More information about the debian-live-changes mailing list