aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/preboot/files/etc/miniboot.sh
diff options
context:
space:
mode:
authorSimon 'Morphis' Busch <morphis@gravedo.de>2010-01-20 18:14:42 +0100
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>2010-01-20 18:14:42 +0100
commitc87ea56a9e59dd4b3ddf67d900f4e14c1168bcd0 (patch)
tree8af6982d99943fbd57dde9acfc59ed25dcff5d38 /recipes/preboot/files/etc/miniboot.sh
parent78c0a878694ec91eb3c793e37642819bc3edc87a (diff)
downloadopenembedded-c87ea56a9e59dd4b3ddf67d900f4e14c1168bcd0.tar.gz
preboot: new recipe; a dual boot solution for the palm pre (WIP)
Diffstat (limited to 'recipes/preboot/files/etc/miniboot.sh')
-rw-r--r--recipes/preboot/files/etc/miniboot.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes/preboot/files/etc/miniboot.sh b/recipes/preboot/files/etc/miniboot.sh
new file mode 100644
index 0000000000..1997ff8646
--- /dev/null
+++ b/recipes/preboot/files/etc/miniboot.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+# Mount proc
+mount -t proc proc /proc -o rw,noexec,nosuid,nodev
+# Mount sys
+mount -t sysfs sys /sys -o rw,noexec,nosuid,nodev
+
+# Mount root rw
+mount / -o remount,rw
+
+# Prep modules
+depmod -A
+
+# Populate /dev
+/etc/init.d/udev start
+
+# Mount everything
+# mount -a
+
+# Setup a proper /tmp using tmpfs
+cat /proc/mounts | grep -q "\s/tmp\s"
+[ "x$?" != "x0" ] && mount -t tmpfs tmpfs /tmp
+
+cat /proc/mounts | grep -q "\s/dev/pts\s"
+[ "x$?" != "x0" ] && mount -t devpts devpts /dev/pts
+
+# Set the hostname
+hostname -F /etc/hostname
+
+# USB gadget configuration
+if [ -e /sys/class/usb_gadget/config_num ]; then
+ echo 5 > /sys/class/usb_gadget/config_num
+fi
+
+# USB network configuration
+ifup -f usb0
+ifconfig usb0 192.168.0.202
+
+# Dropbear ssh service
+/etc/init.d/dropbear start
+
+# Spin relaunching login
+while true; do getty 115200 console; done