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 mkdir -pv /debian/android/log/
29 exec >>/debian/android/log/boot-wrapper.log 2>&1
31 /sbin/busybox echo "`/sbin/busybox date` Booting"
33 /sbin/busybox [ -x /debian/etc/stage2init.sh ] && /sbin/busybox chroot /debian/ /debian/etc/stage2init.sh
35 /sbin/busybox echo "`/sbin/busybox date` Cleaning up boot mounts"
38 /sbin/busybox umount /proc
39 /sbin/busybox umount /sys
40 /sbin/busybox umount /dev
42 /sbin/busybox echo "`/sbin/busybox date` Starting Android's init"
44 # Chroot into /debian/android/ and start Android's init
45 exec /sbin/busybox chroot /debian/android/ /init "$*"