[pkg-fso-maint] install.sh - vfat part1 supported, wicd remains difficult
Steffen Moeller
steffen_moeller at gmx.de
Sat Feb 21 13:02:45 UTC 2009
Dear all,
firstly, I need to apologise for my ongoing difficulties with git. I am improving, but it
seems like I had used the other tools for too long before. I keep performing changes
on the wrong branches, or at least they are reported there. Hence, you don't get the real
patches here, but only the summaries.
Best,
Steffen
wicd
====
Rather than installing with apt-get, which for some non-understood reasons starts the
wicd, I have added wicd to the list of extra packages to be installed with cdebootstrap.
For some reason unknown to me - but hopefully known to you - this is ignored.
# extra packages for additional software to be installed
case "$WITH_WIFI" in
"wicd")
echo " * added wicd to list of packages to install"
CDEBOOTSTRAP_EXTRA_PACKAGES=$CDEBOOTSTRAP_EXTRA_PACKAGES,wicd
CDEBOOTSTRAP_FLAVOUR=build
;;
"none")
if [ -n "$VERBOSE" ]; then echo "* support for wifi left for manual
installation"; fi
;;
*)
echo
echo "Unsupported Wifi: '$WITH_WIFI'"
echo
exit 1
;;
esac
The configuration is installed as before, but now allows the config file to be already
existing.
case "$WITH_WIFI" in
"wicd")
# the package was already installed via cdebootstrap
echo " * Installing wicd for wifi setup"
if [ -r "$INST_DIR/etc/wicd/manager-settings.conf" ]; then
grep -v ^wired_interface
"$INST_DIR/etc/wicd/manager-settings.conf" > \
"$INST_DIR/etc/wicd/manager-settings.conf"
else
mkdir $INST_DIR/etc/wicd
fi
echo "wired_interface =" >> $INST_DIR/etc/wicd/manager-settings.conf
;;
"none")
# no installation to be performed
;;
*)
;;
esac
and after .xsession was created
case "$WITH_WIFI" in
"wicd")
sed -i '/^exec/iwicd-client --no-animate &' $INST_DIR/root/.xsession
;;
*)
;;
esac
vfat
====
I have tested all variants now, I think, this works nicely. Partition1 can be mounted (to
anything but $INST_DIR/boot) or not, the is installed and copyied over.
@@ -879,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"
More information about the pkg-fso-maint
mailing list