Package: flash-kernel
Version: 2.37
Severity: minor
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu natty ubuntu-patch

        Hey there

 u-boot's mkimage moved from the uboot-mkimage binary to the u-boot
 binary in Debian unstable; the attached untested patch is an attempt to
 use this new package name while still supporting backports of
 flash-kernel to older releases.

   Cheers,
-- 
Loïc Minier
diff -Nru flash-kernel-2.37/debian/changelog flash-kernel-2.38/debian/changelog
--- flash-kernel-2.37/debian/changelog	2010-11-18 18:09:21.000000000 +0100
+++ flash-kernel-2.38/debian/changelog	2010-12-20 11:10:07.000000000 +0100
@@ -1,3 +1,12 @@
+flash-kernel (2.38) UNRELEASED; urgency=low
+
+  * mkimage moved from the uboot-mkimage to the u-boot package:
+    - update control to suggest u-boot | uboot-mkimage.
+    - update flash-kernel-installer.postinst to use a common function to
+      install mkimage and try installing u-boot in-target first.
+
+ -- Loïc Minier <loic.min...@linaro.org>  Mon, 20 Dec 2010 11:09:34 +0100
+
 flash-kernel (2.37) unstable; urgency=low
 
   * Don't set a default root device when the specified root device
diff -Nru flash-kernel-2.37/debian/control flash-kernel-2.38/debian/control
--- flash-kernel-2.37/debian/control	2010-11-18 18:09:21.000000000 +0100
+++ flash-kernel-2.38/debian/control	2010-12-20 11:07:23.000000000 +0100
@@ -10,7 +10,7 @@
 Package: flash-kernel
 Architecture: arm armel armeb
 Depends: devio, initramfs-tools (>= 0.92f)
-Suggests: uboot-mkimage
+Suggests: u-boot | uboot-mkimage
 Description: utility to make certain embedded devices bootable
  flash-kernel is a script which will put the kernel and initramfs in
  the boot location of embedded devices that don't load the kernel and
diff -Nru flash-kernel-2.37/debian/flash-kernel-installer.postinst flash-kernel-2.38/debian/flash-kernel-installer.postinst
--- flash-kernel-2.37/debian/flash-kernel-installer.postinst	2010-11-18 18:09:21.000000000 +0100
+++ flash-kernel-2.38/debian/flash-kernel-installer.postinst	2010-12-20 11:09:01.000000000 +0100
@@ -20,6 +20,12 @@
 	mount | grep "on /target${1%/} " | tail -n1 | cut -d' ' -f1
 }
 
+install_mkimage() {
+	if ! apt-install u-boot && ! apt-install uboot-mkimage; then
+		error "apt-install u-boot and apt-install uboot-mkimage failed"
+	fi
+}
+
 # Are we writing to flash or constructing an image on disk?
 write_to_flash() {
 	case "$machine" in
@@ -96,30 +102,22 @@
 case "$machine" in
 	"Buffalo Linkstation Pro/Live" | "Buffalo/Revogear Kurobox Pro")
 		in-target update-initramfs -u || true
-		if ! apt-install uboot-mkimage; then
-			error "apt-install uboot-mkimage failed"
-		fi
+		install_mkimage
 	;;
 	"D-Link DNS-323")
 		in-target update-initramfs -u || true
-		if ! apt-install uboot-mkimage; then
-			error "apt-install uboot-mkimage failed"
-		fi
+		install_mkimage
 	;;
 	"GLAN Tank")
 		in-target update-initramfs -u || true
 	;;
 	"GTA02")
 		in-target update-initramfs -u || true
-		if ! apt-install uboot-mkimage; then
-			error "apt-install uboot-mkimage failed"
-		fi
+		install_mkimage
 	;;
 	"HP t5325 Thin Client")
 		in-target update-initramfs -u || true
-		if ! apt-install uboot-mkimage; then
-			error "apt-install uboot-mkimage failed"
-		fi
+		install_mkimage
 	;;
 	"HP Media Vault mv2120")
 		if ! apt-install mv2120-utils; then
@@ -129,9 +127,7 @@
 			log "apt-install mv2120-utils failed"
 		fi
 		in-target update-initramfs -u || true
-		if ! apt-install uboot-mkimage; then
-			error "apt-install uboot-mkimage failed"
-		fi
+		install_mkimage
 		# The firmware loads /boot/uImage from the first partition
 		# but uImage will be in / if a separate boot partition is
 		# used.  In this case, create a /boot/boot -> /boot symlink.
@@ -163,18 +159,14 @@
 	;;
 	"Marvell GuruPlug Reference Board" | "Marvell OpenRD Base Board" | "Marvell OpenRD Client Board" | "Marvell OpenRD Ultimate Board" | "Marvell SheevaPlug Reference Board" | "Marvell eSATA SheevaPlug Reference Board" | "Seagate FreeAgent DockStar")
 		in-target update-initramfs -u || true
-		if ! apt-install uboot-mkimage; then
-			error "apt-install uboot-mkimage failed"
-		fi
+		install_mkimage
 	;;
 	"Thecus N2100" | "Thecus N4100")
 		in-target update-initramfs -u || true
 	;;
 	"QNAP TS-109/TS-209" | "QNAP TS-119/TS-219" | "QNAP TS-409" | "QNAP TS-41x")
 		in-target update-initramfs -u || true
-		if ! apt-install uboot-mkimage; then
-			error "apt-install uboot-mkimage failed"
-		fi
+		install_mkimage
 	;;
 	"Lanner EM7210")
 		in-target update-initramfs -u || true

Reply via email to