2 # Copyright (C) 2006 OpenWrt.org
6 mtdpart="$(find_mtd_part linux)"
7 grep Broadcom /proc/cpuinfo >&- || return 1
8 OFFSET="$(($(hexdump -v $mtdpart -s 20 -n 2 -e '"%d"')-1))"
9 return $(hexdump -v $mtdpart -s $OFFSET -n 1 -e '"%d"')
12 if [ "$1" != "failsafe" ]; then
14 mount | grep jffs2 >&-
16 mount -o remount,rw /dev/root /
21 echo "switching to jffs2"
22 mount $(find_mtd_part OpenWrt) /jffs -t jffs2
25 echo "jffs2 not ready yet; using ramdisk"
32 mount none /dev/pts -t devpts 2>&-
33 grep sysfs /proc/filesystems >/dev/null && mount -t sysfs none /sys 2>&-