[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. a59c6b9f491d549c9d1d0c025c0d71cfe9b2b735

Steffen Moeller steffen_moeller at gmx.de
Sat Feb 21 12:50:32 UTC 2009


The following commit has been merged in the master branch:
commit e96a9f9a4fef05e2a47e65d7b8f24e1a8bd08c4e
Author: Steffen Moeller <steffen_moeller at gmx.de>
Date:   Sat Feb 21 13:05:49 2009 +0100

    Properly dealing with vfat first partition.

diff --git a/install.sh b/install.sh
index 81df3d4..a6a1608 100755
--- a/install.sh
+++ b/install.sh
@@ -871,21 +871,67 @@ echo "I: System configured"
 # Stage kernel
 #
 action_kernel () {
-echo "Installing kernel package"
-
-if [ "$SD_PART1_FS" = "vfat" ]; then
-	echo "E: when using $SD_PART1_FS as filesystem for the first microSD card"
-	echo "   partition, you should manully install the kernel, since dpkg"
-	echo "   does not support non-POSIX filesystems:"
-	echo "     http://bugs.debian.org/bug=315493"
-	exit 1
-fi
-
-chroot $INST_DIR /bin/sh -e <<__END_CHROOT__
-apt-get --yes install linux-image-2.6.28-openmoko-gta02
+	echo "Installing kernel package"
+
+	intern_cmd="apt-get --yes install linux-image-2.6.28-openmoko-gta02"
+
+	if [ "$SD_PART1_FS" = "vfat" ]; then
+		intern_bootmountpoint=$(mount | grep "^${SD_DEVICE}p1"| cut -f3 -d\ )
+		if [ -z "$intern_bootmountpoint" -o "boot" != "$(basename "$intern_bootmountpoint")" ]; then
+			echo " * installing to /boot"
+			chroot $INST_DIR $intern_cmd
+			echo " * cleaning apt cache"
+			chroot $INST_DIR apt-get clean
+			echo " * copying /boot/uImage.bin to first partition"
+			if [ -z "$intern_bootmountpoint" ]; then
+				if [ -n "$VERBOSE" ]; then
+					echo "    Mounting first partition to /mnt/tmp_first_part_$$";
+				fi
+				mkdir /mnt/tmp_first_part_$$
+				mount ${SD_DEVICE}p1 /mnt/tmp_first_part_$$
+
+				if [ -n "$VERBOSE" ]; then
+					echo "    Copying $INST_DIR/boot/uImage.bin to /mnt/tmp_first_part_$$/"
+				fi
+				cp "$INST_DIR/boot/uImage.bin" "/mnt/tmp_first_part_$$/"
+
+				if [ -n "$VERBOSE" ]; then
+					echo "    Unmounting first partition from /mnt/tmp_first_part_$$"
+				fi
+				umount /mnt/tmp_first_part_$$
+				rmdir /mnt/tmp_first_part_$$
+			else 
+				if [ -n "$VERBOSE" ]; then
+					echo "    Found first partitional already mounted to '$intern_bootmountpoint'."
+				fi
+				if [ -n "$VERBOSE" ]; then
+					echo "    Copying $INST_DIR/boot/uImage.bin to '$intern_bootmountpoint/'."
+				fi
+				cp "$INST_DIR/boot/uImage.bin" "$intern_bootmountpoint/"
+			fi
+			
+		else
+			echo "W: when using $SD_PART1_FS as filesystem for the first microSD card"
+			echo "   partition, you should manually install the kernel, since dpkg"
+			echo "   does not support non-POSIX filesystems:"
+			echo "     http://bugs.debian.org/bug=315493"
+			echo
+			echo "   Make sure, the first partition is not mounted to the /boot"
+			echo "   directory. Then "
+			echo "      $intern_cmd"
+			echo "   and copy /boot/uImage.bin to your first partition. When no longer"
+			echo "   mounted to /boot, you may also rerun '$0 --part1-fs vfat kernel'."
+			return 0
+		fi
+	else
+		chroot $INST_DIR /bin/sh -e <<__END_CHROOT__
+$intern_cmd
 apt-get clean
 __END_CHROOT__
-echo "I: Kernel installed"
+	fi
+
+	echo "I: Kernel installed"
+
 
 if [ "$QI" = "true" ]; then
 	echo "Prepare system for booting with Qi"

-- 
Various non-packaged files



More information about the pkg-fso-commits mailing list