freewrt_1_0
freewrt_2_0
|
Last change
on this file since aab9e07 was aab9e07, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago |
|
simplify. fix squashfs images, we only support overlay filesystem at the moment, I will add ramfs as another firmware type later
git-svn-id: svn://www.freewrt.org/trunk/freewrt@375 afb5a338-a214-0410-bd46-81f09a774fd1
|
-
Property mode
set to
100755
|
|
File size:
599 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 |
|
|---|
| 3 | size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
|
|---|
| 4 | mount none /tmp -t tmpfs -o size=$size
|
|---|
| 5 |
|
|---|
| 6 | if [ "$1" != "failsafe" ]; then
|
|---|
| 7 | mtd unlock linux
|
|---|
| 8 | mount | grep jffs2 >&-
|
|---|
| 9 | if [ $? = 0 ] ; then
|
|---|
| 10 | if [ $(cat /proc/mtd | wc -l) = 6 ]; then
|
|---|
| 11 | mtd erase data
|
|---|
| 12 | jffs2root --move --reboot
|
|---|
| 13 | else
|
|---|
| 14 | mount -o remount,rw /dev/root /
|
|---|
| 15 | fi
|
|---|
| 16 | else
|
|---|
| 17 | . /bin/firstboot
|
|---|
| 18 | echo "switching to overlay filesystem"
|
|---|
| 19 | mount /dev/mtdblock/4 /jffs -t jffs2
|
|---|
| 20 | fopivot /jffs /rom
|
|---|
| 21 | fi
|
|---|
| 22 | fi
|
|---|
| 23 |
|
|---|
| 24 | mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
|
|---|
| 25 | mkdir -p /dev/pts
|
|---|
| 26 | mount none /dev/pts -t devpts
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.