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

Bug#593235: New patch



So, here is a new version of the patch.
Changes:
- Removed U-Boot env related things (now, I have to unblock this bug)
- Removed kernel re-compression (useless)
- Added a quick hack to workaround the padding thing, since #584166
probably won't be accepted upstream (I'll sort that out later).
Index: packages/flash-kernel/debian/control
===================================================================
--- packages/flash-kernel/debian/control	(révision 65159)
+++ packages/flash-kernel/debian/control	(copie de travail)
@@ -23,7 +23,7 @@
 Priority: standard
 XC-Package-Type: udeb
 Architecture: arm armel armeb
-XB-Subarchitecture: iop32x ixp4xx kirkwood orion5x
+XB-Subarchitecture: iop32x ixp4xx kirkwood orion5x s3c24xx
 Provides: bootable-system
 Depends: cdebconf-udeb, installed-base
 XB-Installer-Menu-Item: 7300
Index: packages/flash-kernel/debian/flash-kernel-installer.postinst
===================================================================
--- packages/flash-kernel/debian/flash-kernel-installer.postinst	(révision 65159)
+++ packages/flash-kernel/debian/flash-kernel-installer.postinst	(copie de travail)
@@ -32,6 +32,9 @@
 		"GLAN Tank")
 			return 1
 		;;
+		"GTA02")
+			return 1
+		;;
 		"HP t5325 Thin Client")
 			return 1
 		;;
@@ -106,6 +109,12 @@
 	"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
+	;;
 	"HP t5325 Thin Client")
 		in-target update-initramfs -u || true
 		if ! apt-install uboot-mkimage; then
Index: packages/flash-kernel/debian/flash-kernel-installer.isinstallable
===================================================================
--- packages/flash-kernel/debian/flash-kernel-installer.isinstallable	(révision 65159)
+++ packages/flash-kernel/debian/flash-kernel-installer.isinstallable	(copie de travail)
@@ -2,6 +2,9 @@
 set -e
 
 case "`archdetect`" in
+	arm*/s3c24xx)
+		exit 0
+	;;
 	arm*/iop32x)
 		exit 0
 	;;
Index: packages/flash-kernel/initramfs-tools/hooks/flash_kernel_set_root
===================================================================
--- packages/flash-kernel/initramfs-tools/hooks/flash_kernel_set_root	(révision 65159)
+++ packages/flash-kernel/initramfs-tools/hooks/flash_kernel_set_root	(copie de travail)
@@ -23,6 +23,9 @@
 # device?
 root_type() {
 	case "$1" in
+		"GTA02")
+			echo "override"
+		;;
 		"Buffalo Linkstation Pro/Live")
 			echo "override"
 		;;
Index: packages/flash-kernel/flash-kernel
===================================================================
--- packages/flash-kernel/flash-kernel	(révision 65159)
+++ packages/flash-kernel/flash-kernel	(copie de travail)
@@ -85,6 +85,7 @@
 
 if [ "x$1" = "x--supported" ]; then
 	case "$machine" in
+		"GTA02")				exit 0 ;;
 		"Buffalo Linkstation Pro/Live")		exit 0 ;;
 		"Buffalo/Revogear Kurobox Pro")		exit 0 ;;
 		"D-Link DNS-323")			exit 0 ;;
@@ -141,6 +142,26 @@
 subarch=$(echo "$kfile" | sed -e 's/.*-//')
 
 case "$machine" in
+	"GTA02")
+		check_subarch "s3c24xx"
+		tmpdir="$(mktemp -d)"
+		printf "Generating u-boot image..." >&2
+		cp "$kfile" "$tmpdir/kernel"
+		# Hack to work around a bug in some U-Boot versions:
+		if [ $(($(stat -c '%s' "$tmpdir/kernel") % 4)) -eq 0 ]; then
+			echo >> "$tmpdir/kernel"
+		fi
+		mkimage -A arm -O linux -T multi -C none -n "$desc" -a 0x30008000 \
+			-e 0x30008000 -d "$tmpdir/kernel":"$ifile" "$tmpdir/uImage" >&2 1>/dev/null
+		rm -f "$tmpdir/kernel"
+		echo "done." >&2
+		if [ -e /boot/uImage.bin ]; then
+			echo "Creating backup of /boot/uImage.bin." >&2
+			mv /boot/uImage.bin /boot/uImage.bin.bak
+		fi
+		mv "$tmpdir/uImage" /boot/uImage.bin
+		rmdir $tmpdir
+	;;
 	"Buffalo Linkstation Pro/Live" | "Buffalo/Revogear Kurobox Pro")
 		check_subarch "orion5x"
 		tmpdir="$(mktemp -d)"

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: