3 if [ -n "$DEBUG" ]; then
8 [ -e $LOG ] || busybox mknod $LOG c 1 3
12 busybox mount -t proc proc /proc
13 busybox mount -t sysfs sys /sys
17 export PATH=$PATH:/system/bin
19 if [ -n "$DEBUG" ]; then
20 mknod /dev/tty2 c 4 2 && openvt
21 mknod /dev/tty3 c 4 3 && openvt
24 echo -n Detecting Android...
29 for device in /dev/sr* /dev/sd[a-z]*; do
30 mount $device /mnt || continue
32 if [ ! -e ramdisk.img -o ! -e system.img ]; then
36 mount -t tmpfs tmpfs /android
38 zcat /mnt/$SRC/ramdisk.img | cpio -id > /dev/null
39 mount -o loop,ro /mnt/$SRC/system.img /sfs
40 if [ -e /sfs/system.img ]; then
41 mount -o loop,ro /sfs/system.img system
43 mount --move /sfs system
46 mount -t tmpfs tmpfs cache
47 echo " found at $device"
50 mountpoint -q /android && break
53 if [ -n "$DEBUG" ]; then
54 echo -e "\nType 'exit' to continue booting...\n"
59 ln -s android/system /
61 ln -s ../system/lib/modules /lib
63 if [ -n "$DATA" ]; then
65 elif [ -d /mnt/$SRC/data ]; then
66 mount --bind /mnt/$SRC/data data
68 mount -t tmpfs tmpfs data
70 if [ -n "$SDCARD" ]; then
72 elif [ -d /mnt/$SRC/sdcard ]; then
73 mount --bind /mnt/$SRC/sdcard sdcard
75 mount -t tmpfs tmpfs sdcard
79 for s in `ls /scripts/* /mnt/$SRC/scripts/*`; do
83 for m in $ALL_MODULES; do
87 [ -n "$INSTALL" ] && install_hd
89 if [ -n "$DEBUG" ]; then
90 echo -e "\nUse Alt-F1/F2/F3 to switch between virtual consoles"
91 echo -e "Type 'exit' to enter Android...\n"
93 # FIXME: all error messages in the shell are sent to $LOG
97 exec switch_root /android /init
100 sh # aviod kernel panic