3 # initramfs pre-boot init script
4 # Initial version copied from http://whiteboard.ping.se/Android/Debian
6 # Mount the /proc and /sys filesystems
7 /sbin/busybox mount -t proc none /proc
8 /sbin/busybox mount -t sysfs none /sys
9 /sbin/busybox mount -t tmpfs none /dev
11 # Something (what?) needs a few cycles here
17 # Mount the Debian root filesystem, third partition on micro SDcard
18 # We don't care if this fails, we'll handle that later
19 /sbin/busybox mount -t ext4 -o noatime,nodiratime,errors=panic /dev/mmcblk1p3 /debian/
21 # This directory exists in both the initramfs and the Debian fs
22 /sbin/busybox mount -t ramfs ramfs /debian/android
24 # Copy from the initramfs into the new android root
26 /sbin/busybox gunzip -c < /initrd.img | /sbin/busybox cpio -i
28 exec >>/debian/android/log/boot-wrapper.log 2>&1
30 /sbin/busybox echo "`/sbin/busybox date` Booting"
32 /sbin/busybox [ -x /debian/etc/stage2init.sh ] && /sbin/busybox chroot /debian/ /debian/etc/stage2init.sh
34 /sbin/busybox echo "`/sbin/busybox date` Cleaning up boot mounts"
37 /sbin/busybox umount /proc
38 /sbin/busybox umount /sys
39 /sbin/busybox umount /dev
41 /sbin/busybox echo "`/sbin/busybox date` Starting Android's init"
43 # Chroot into /debian/android/ and start Android's init
44 exec /sbin/busybox chroot /debian/android/ /init "$*"