summaryrefslogtreecommitdiff
path: root/package/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/bin/board_detect14
-rwxr-xr-xpackage/base-files/files/etc/init.d/boot1
-rwxr-xr-xpackage/base-files/files/etc/init.d/done10
-rw-r--r--package/base-files/files/etc/rc.local21
-rw-r--r--package/base-files/files/lib/preinit/80_mount_root7
-rwxr-xr-xpackage/base-files/files/sbin/firstboot8
6 files changed, 44 insertions, 17 deletions
diff --git a/package/base-files/files/bin/board_detect b/package/base-files/files/bin/board_detect
deleted file mode 100755
index ee04b9e..0000000
--- a/package/base-files/files/bin/board_detect
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-[ -d "/etc/board.d/" -a ! -f "/etc/board.json" ] && {
- for a in `ls /etc/board.d/*`; do
- [ -x $a ] || continue;
- $(. $a)
- done
-}
-
-[ -f "/etc/board.json" ] || return 1
-[ -f "/etc/config/network" ] || {
- touch /etc/config/network
- /bin/config_generate
-}
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot
index f10db13..b1272f4 100755
--- a/package/base-files/files/etc/init.d/boot
+++ b/package/base-files/files/etc/init.d/boot
@@ -46,7 +46,6 @@ boot() {
}
rm -f /tmp/wireless.tmp
- /bin/board_detect
uci_apply_defaults
# temporary hack until configd exists
diff --git a/package/base-files/files/etc/init.d/done b/package/base-files/files/etc/init.d/done
index b254aff..04d1b5d 100755
--- a/package/base-files/files/etc/init.d/done
+++ b/package/base-files/files/etc/init.d/done
@@ -3,7 +3,15 @@
START=95
boot() {
- [ -d /tmp/root ] && mount_root done
+ [ -d /tmp/root ] && {
+ cat /proc/cpuinfo | grep 7623
+ if [ "$?" == "0" ]; then
+ mount_root2 done;
+ else
+ mount_root done;
+ fi
+ }
+ block mount
# process user commands
[ -f /etc/rc.local ] && {
diff --git a/package/base-files/files/etc/rc.local b/package/base-files/files/etc/rc.local
index 5639477..e392d53 100644
--- a/package/base-files/files/etc/rc.local
+++ b/package/base-files/files/etc/rc.local
@@ -1,4 +1,25 @@
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
+case `cat /proc/cpuinfo | grep MT76` in
+ *7621*)
+ CONFIG_RALINK_MT7621=y
+ ;;
+ *7623*)
+ CONFIG_ARCH_MT7623=y
+ ;;
+esac
+if [ "$CONFIG_RALINK_MT7621" = "y" ]; then
+echo 2048 > /proc/sys/vm/min_free_kbytes
+#echo 2 > /proc/sys/vm/overcommit_memory
+#echo 50 > /proc/sys/vm/overcommit_ratio
+fi
+block mount
+
+# add nat rule manually
+
+smp.sh wifi
+hwnat-enable.sh
+bridge-add.sh
+
exit 0
diff --git a/package/base-files/files/lib/preinit/80_mount_root b/package/base-files/files/lib/preinit/80_mount_root
index 0292d82..88128bd 100644
--- a/package/base-files/files/lib/preinit/80_mount_root
+++ b/package/base-files/files/lib/preinit/80_mount_root
@@ -3,7 +3,12 @@
# Copyright (C) 2010 Vertical Communications
do_mount_root() {
- mount_root
+ cat /proc/cpuinfo | grep 7623
+ if [ "$?" == "0" ]; then
+ mount_root2
+ else
+ mount_root
+ fi
boot_run_hook preinit_mount_root
[ -f /sysupgrade.tgz ] && {
echo "- config restore -"
diff --git a/package/base-files/files/sbin/firstboot b/package/base-files/files/sbin/firstboot
index 081febb..04976a3 100755
--- a/package/base-files/files/sbin/firstboot
+++ b/package/base-files/files/sbin/firstboot
@@ -1,3 +1,11 @@
#!/bin/sh
/sbin/jffs2reset
+
+cat /proc/cmdline | grep block2mtd > /dev/null
+emmc=$?
+echo $emmc
+[ "$emmc" == "0" ] && {
+ echo "emmc board, need reboot";
+ reboot -f;
+}