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
13 mount
-t tmpfs tmpfs
/dev
-o size
=512K
14 mknod
/dev
/console c
5 1
15 exec >/dev
/console
</dev
/console
2>&1
20 if grep sysfs
/proc
/filesystems
>/dev
/null
; then
21 mount
-t sysfs none
/sys
23 # use a minimal ruleset only for creating device nodes
24 /sbin
/hotplug2
--no-persistent --coldplug --set-rules-file /etc
/hotplug2-init.rules
26 HOTPLUG
="/sbin/hotplug2-dnode"
28 echo "$HOTPLUG" > /proc
/sys
/kernel
/hotplug
31 mount none
/dev
/pts
-t devpts
34 mtdpart
="$(find_mtd_part rootfs_data)"
35 magic
=$
(hexdump $mtdpart -n 4 -e '4/1 "%02x"')
36 [ "$magic" != "deadc0de" ]
39 [ failsafe
!= "$1" ] && {
40 grep rootfs
/proc
/mtd
>/dev
/null
2>/dev
/null
&& {
42 grep rootfs_data
/proc
/mtd
>/dev
/null
2>/dev
/null
&& {
45 echo "switching to jffs2"
46 mount
"$(find_mtd_part rootfs_data)" /jffs
-t jffs2
49 echo "jffs2 not ready yet; using ramdisk"
53 } || mount
-o remount
,rw
/dev
/root
/
This page took 0.05483 seconds and 5 git commands to generate.