export PATH=$PATH:/system/bin
-if [ -n "$DEBUG" ]; then
+if [ -n "$DEBUG" -o -n "$INSTALL" ]; then
mknod /dev/tty2 c 4 2 && openvt
mknod /dev/tty3 c 4 3 && openvt
fi
mdev -s
for device in /dev/sr* /dev/sd[a-z]*; do
- mount -o ro $device /mnt || continue
+ # FIXME: any way to mount ntfs gracefully?
+ mount -o ro $device /mnt || \
+ mount.ntfs-3g -o rw $device /mnt || \
+ continue
cd /mnt/$SRC
if [ ! -e ramdisk.img -o ! \( -e system.img -o -e system.sfs \) ]; then
+ cd /
umount /mnt
continue
fi
ln -s ../system/lib/modules /lib
+if [ -n "$INSTALL" ]; then
+ cd /
+ zcat /mnt/$SRC/install.img | cpio -iud > /dev/null
+fi
+
if [ -n "$DEBUG" -o -n "$BUSYBOX" ]; then
mv /bin /lib .
system/bin/ln -s android/lib /lib
source $s
done
-load_modules
-
-[ -n "$INSTALL" ] && install_hd
+detect_hardware
+do_install
+load_modules
mount_data
mount_sdcard
exec switch_root /android /init
fi
-sh # aviod kernel panic
+sh # avoid kernel panic