2 # Copyright (C) 2006 OpenWrt.org
5 mount none
/proc
-t proc
7 size
=$
(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)?mt-l:s}' /proc
/meminfo
)
8 mount none
/tmp
-t tmpfs
-o size
=$size,nosuid
,nodev
,mode
=1777
10 if grep devfs
/proc
/filesystems
> /dev
/null
; then
11 mount none
/dev
-t devfs
14 HOTPLUG
=/sbin
/hotplug-call
16 mount
-t sysfs none
/sys
17 mount
-t tmpfs tmpfs
/dev
-o size
=512K
18 mknod
/dev
/console c
5 1
20 /sbin
/hotplug2
--no-persistent --coldplug --set-rules-file /etc
/hotplug2-init.rules
26 mkdir
-p /dev
/pts
/dev
/shm
27 mount none
/dev
/pts
-t devpts
29 # the shell really doesn't like having stdin/out closed
30 # that's why we use /dev/pty/m0 and m1 as replacement
31 # for /dev/console if there's no serial console available
32 dd if=/dev
/console of
=/dev
/null bs
=1 count
=0 >/dev
/null
2>/dev
/null || \
35 echo "$HOTPLUG" > /proc
/sys
/kernel
/hotplug
38 mtdpart
="$(find_mtd_part rootfs_data)"
39 magic
=$
(hexdump $mtdpart -n 4 -e '4/1 "%02x"')
40 [ "$magic" != "deadc0de" ]
43 [ failsafe
!= "$1" ] && {
44 grep rootfs
/proc
/mtd
>/dev
/null
2>/dev
/null
&& {
46 grep rootfs_data
/proc
/mtd
>/dev
/null
2>/dev
/null
&& {
49 echo "switching to jffs2"
50 mount
"$(find_mtd_part rootfs_data)" /jffs
-t jffs2
53 echo "jffs2 not ready yet; using ramdisk"
57 } || mount
-o remount
,rw
/dev
/root
/
This page took 0.041755 seconds and 5 git commands to generate.