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

New strings for flash-kernel



I'm afraid I'll have to add two new (short) strings to flash-kernel
and change one string.  This is because I've added the ability to make
certain embedded systems bootable that need a special boot image on
disk.  The current messages talk about writing the kernel to flash and
this is not appropriate here and would confuse users.

And comments?

(I looked through d-i to see if there are any strings I could reuse
but I couldn't find anything.)

Index: debian/control
===================================================================
--- debian/control	(revision 53941)
+++ debian/control	(working copy)
@@ -28,4 +28,4 @@
 Provides: bootable-system
 Depends: cdebconf-udeb, installed-base
 XB-Installer-Menu-Item: 7300
-Description: Configure flash to boot the system
+Description: Configure system to make it bootable
Index: debian/flash-kernel-installer.templates
===================================================================
--- debian/flash-kernel-installer.templates	(revision 53940)
+++ debian/flash-kernel-installer.templates	(working copy)
@@ -5,6 +5,13 @@
 # :sl4:
 _Description: Configuring flash memory to boot the system
 
+Template: flash-kernel-installer/progress_disk
+Type: text
+# This item is a progress bar item when an embedded device is
+# configured so it will boot from disk
+# :sl4:
+_Description: Configuring system to make it bootable
+
 Template: flash-kernel-installer/prepare
 Type: text
 # This is "preparing the system" to flash the kernel and initrd
@@ -19,6 +26,14 @@
 # :sl4:
 _Description: Writing the kernel to flash memory
 
+Template: flash-kernel-installer/generating_image
+Type: text
+# This is a progress bar showing up when the system generates a
+# special boot image on disk for some embedded device so they
+# can boot.
+# :sl4:
+_Description: Generating boot image on disk
+
 Template: debian-installer/flash-kernel-installer/title
 Type: text
 #  Main menu item
@@ -26,4 +41,4 @@
 # the flashable memory used by many embedded devices
 # (writing the kernel and initrd to it)
 # :sl4:
-_Description: Configure flash memory to boot the system
+_Description: Configure system to make it bootable
Index: debian/flash-kernel-installer.postinst
===================================================================
--- debian/flash-kernel-installer.postinst	(revision 53940)
+++ debian/flash-kernel-installer.postinst	(working copy)
@@ -16,8 +16,25 @@
 	mount | grep "on /target${1%/} " | cut -d' ' -f1
 }
 
+# Are we writing to flash or constructing an image on disk?
+write_to_flash() {
+	case "$machine" in
+		"HP Media Vault mv2120")
+			return 1
+		;;
+		*)
+			return 0
+		;;
+	esac
+}
 
-db_progress START 0 2 flash-kernel-installer/progress
+machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//')
+
+if write_to_flash; then
+	db_progress START 0 2 flash-kernel-installer/progress
+else
+	db_progress START 0 2 flash-kernel-installer/progress_disk
+fi
 db_progress INFO flash-kernel-installer/prepare
 
 if ! apt-install flash-kernel; then
@@ -30,7 +47,6 @@
 		/target/etc/kernel-img.conf
 fi
 
-machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//')
 case "$machine" in
 	"HP Media Vault mv2120")
 		in-target update-initramfs -u || true
@@ -76,7 +92,11 @@
 esac
 
 db_progress STEP 1
-db_progress INFO flash-kernel-installer/flashing
+if write_to_flash; then
+	db_progress INFO flash-kernel-installer/flashing
+else
+	db_progress INFO flash-kernel-installer/generating_image
+fi
 
 # We need the udev /dev which has the MTD devices
 mount -o bind /dev /target/dev


-- 
Martin Michlmayr
http://www.cyrius.com/


Reply to: