2 # Copyright (C) 2006 OpenWrt.org
5 mount none /proc -t proc
6 size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
7 mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777
9 grep rootfs /proc/mtd >/dev/null 2>/dev/null && {
11 grep rootfs_data /proc/mtd >/dev/null 2>/dev/null && {
13 echo "switching to jffs2"
14 mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2
17 } || mount -o remount,rw /dev/root /
20 mount none /dev/pts -t devpts
21 grep sysfs /proc/filesystems >/dev/null && mount -t sysfs none /sys 2>&-