[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. a42fbad88ee4914fe2429ebbbf846a0d1668839d
Joachim Breitner
mail at joachim-breitner.de
Thu Dec 25 13:57:19 UTC 2008
The following commit has been merged in the master branch:
commit a42fbad88ee4914fe2429ebbbf846a0d1668839d
Author: Mitja Kleider <mitja at mitjakleider.de>
Date: Thu Dec 25 13:10:49 2008 +0100
install.sh: Qi support, single partition
Hello,
I tried the Qi installation and did not succeed. Qi tried booting before
the SD card was ready. It works now after adding "rootdelay=1"
to /boot/append-GTA02.
Openmoko wiki said
> Qi expects the / (root) filesystem to be on the same partition
as /boot.
The second partition was of no use for me anyway, so I modified
install.sh and added a single partition installation option. Patch is
attached.
Merry christmas,
Mitja
diff --git a/install.sh b/install.sh
index 8506851..f419cd9 100755
--- a/install.sh
+++ b/install.sh
@@ -38,6 +38,7 @@ FSO_MIRROR=${FSO_MIRROR:-http://pkg-fso.alioth.debian.org/debian}
FSO_DEVICE=${FSO_DEVICE:-gta02}
QI=${QI:-false}
QI_VERBOSE_BOOT=${QI_VERBOSE_BOOT:-false}
+SINGLE_PART=${SINGLE_PART:-$QI}
### sanity check until the GTA01 installer will be merged
if [ "${FSO_DEVICE}" != gta02 ]; then
@@ -160,6 +161,8 @@ Variables:
(default to false)
QI_VERBOSE_BOOT set this to true if you want to see the kernel messages
do this only when QI=true (default to false)
+ SINGLE_PART set this to true if only one partition should be created
+ this is true by default for QI=true and false if SD_PART1_FS=vfat
Stages:
@@ -233,10 +236,11 @@ Thus, you should continue at your own risk.
Press any key within 5 seconds to quit
__END__
five_seconds_to_quit
+ SINGLE_PART="false"
fi
-# let's the fun start!
+# let the fun start!
echo "Running stage $1"
case $1 in
@@ -374,6 +378,15 @@ p
w
__END__
+elif [ "$SINGLE_PART" = "true" ]; then
+ fdisk $SD_DEVICE <<__END__
+n
+p
+1
+
+
+w
+__END__
else
fdisk $SD_DEVICE <<__END__
n
@@ -392,7 +405,8 @@ fi
echo " * Waiting for partitions to appear"
SLEEP_SECONDS=3
-while ! test -e ${SD_DEVICE}p1 -a -e ${SD_DEVICE}p2; do
+while ! ([ "$SINGLE_PART" = "true" ] && test -e ${SD_DEVICE}p1) ||\
+ test -e ${SD_DEVICE}p1 -a -e ${SD_DEVICE}p2; do
if [ "$SLEEP_SECONDS" = 15 ]; then
echo "E: Partitioning has failed, partitions have not been created"
exit 1
@@ -412,8 +426,12 @@ card_data_warning format
umount_all
echo " * Formatting the microSD card partitions"
-mkfs.$SD_PART1_FS ${SD_DEVICE}p1
-mkfs.ext2 ${SD_DEVICE}p2
+if [ "$SINGLE_PART" = "true" ]; then
+ mkfs.ext2 ${SD_DEVICE}p1
+else
+ mkfs.$SD_PART1_FS ${SD_DEVICE}p1
+ mkfs.ext2 ${SD_DEVICE}p2
+fi
echo "I: microSD card ready"
;;
@@ -425,9 +443,14 @@ mount)
#
echo "Mounting the newly created system"
mkdir -p $INST_DIR
-mount -t ext2 ${SD_DEVICE}p2 $INST_DIR
-mkdir -p $INST_DIR/boot
-mount -t $SD_PART1_FS ${SD_DEVICE}p1 $INST_DIR/boot
+if [ "$SINGLE_PART" = "true" ]; then
+ mount -t ext2 ${SD_DEVICE}p1 $INST_DIR
+ mkdir -p $INST_DIR/boot
+else
+ mount -t ext2 ${SD_DEVICE}p2 $INST_DIR
+ mkdir -p $INST_DIR/boot
+ mount -t $SD_PART1_FS ${SD_DEVICE}p1 $INST_DIR/boot
+fi
echo "I: microSD card partitions mounted"
;;
@@ -573,7 +596,15 @@ echo " * Creating /etc/fstab"
mkdir -p $INST_DIR/mnt/flash
cat > $INST_DIR/etc/fstab <<__END__
rootfs / auto defaults,errors=remount-ro,noatime 0 1
+__END__
+
+if ![ "$SINGLE_PART" = "true" ]; then
+cat >> $INST_DIR/etc/fstab <<__END__
/dev/mmcblk0p1 /boot auto defaults,noatime 0 2
+__END__
+fi
+
+cat >> $INST_DIR/etc/fstab <<__END__
/dev/mtdblock6 /mnt/flash jffs2 defaults,noatime,noauto 0 2
proc /proc proc defaults 0 0
tmpfs /tmp tmpfs defaults,noatime 0 0
@@ -647,13 +678,25 @@ echo "I: Kernel installed"
if [ "$QI" = "true" ]; then
echo "Prepare system for booting with Qi"
- mkdir $INST_DIR/boot/boot
- ln -s ../uImage.bin $INST_DIR/boot/boot/uImage-GTA02.bin
+ BOOT_DIR=$INST_DIR/boot/boot
+ if [ "$SINGLE_PART" = "true" ]; then
+ BOOT_DIR=$INST_DIR/boot
+ ln -s $BOOT_DIR/uImage.bin $BOOT_DIR/uImage-GTA02.bin
+ else
+ mkdir $BOOT_DIR
+ ln -s ../uImage.bin $BOOT_DIR/uImage-GTA02.bin
+ fi
+ if [ "$SINGLE_PART" = "true" ]; then
+ ROOT_PART=${SD_DEVICE}p1
+ else
+ ROOT_PART=${SD_DEVICE}p2
+ fi
+
if [ "$QI_VERBOSE_BOOT" = "true" ]; then
- echo "root=${SD_DEVICE}p2 console=tty0 loglevel=8" >$INST_DIR/boot/boot/append-GTA02
+ echo "root=$ROOT_PART console=tty0 loglevel=8" >$BOOT_DIR/append-GTA02
else
- echo "root=${SD_DEVICE}p2" >$INST_DIR/boot/boot/append-GTA02
+ echo "root=$ROOT_PART rootdelay=1" >$BOOT_DIR/append-GTA02
fi
fi
;;
@@ -753,7 +796,9 @@ unmount)
# Stage unmount
#
echo "Unmounting microSD card partitions"
-umount $INST_DIR/boot
+if ![ "$SINGLE_PART" = "true" ]; then
+ umount $INST_DIR/boot
+fi
umount $INST_DIR
echo "I: microSD card partitions unmounted"
;;
--
Various non-packaged files
More information about the pkg-fso-commits
mailing list