aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dickinson <daniel@cshore.neomailbox.net>2010-11-28 22:04:19 +0000
committerDaniel Dickinson <daniel@cshore.neomailbox.net>2010-11-28 22:04:19 +0000
commitf78d9eebba91795a613bdea426d5cc24ec37bb92 (patch)
treebbb3b41eb3048447c66523ebb930224aac981752
parentd2fb3cf3f728b197ea9d5f33412c3ce5c993cdfd (diff)
downloadupstream-f78d9eebba91795a613bdea426d5cc24ec37bb92.tar.gz
upstream-f78d9eebba91795a613bdea426d5cc24ec37bb92.tar.bz2
upstream-f78d9eebba91795a613bdea426d5cc24ec37bb92.zip
bcm63xx: Add defconfigs.
Port the mechanism for different default configurations from ar71xx and use the old configuration as the default configuration. This should have no functional differences to before. While we are at it, remove the obsolete nat option. Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24185 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/brcm63xx/base-files.mk5
-rw-r--r--target/linux/brcm63xx/base-files/etc/defconfig/generic/network (renamed from target/linux/brcm63xx/base-files/etc/config/network)1
-rwxr-xr-xtarget/linux/brcm63xx/base-files/etc/init.d/defconfig18
3 files changed, 23 insertions, 1 deletions
diff --git a/target/linux/brcm63xx/base-files.mk b/target/linux/brcm63xx/base-files.mk
new file mode 100644
index 0000000000..d6682bd388
--- /dev/null
+++ b/target/linux/brcm63xx/base-files.mk
@@ -0,0 +1,5 @@
+define Package/base-files/install-target
+ rm -f $(1)/etc/config/network
+endef
+
+
diff --git a/target/linux/brcm63xx/base-files/etc/config/network b/target/linux/brcm63xx/base-files/etc/defconfig/generic/network
index c15fdd81b3..bc2c69b7c9 100644
--- a/target/linux/brcm63xx/base-files/etc/config/network
+++ b/target/linux/brcm63xx/base-files/etc/defconfig/generic/network
@@ -12,7 +12,6 @@ config interface lan
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
- option nat 1
config interface wan
option ifname eth0
diff --git a/target/linux/brcm63xx/base-files/etc/init.d/defconfig b/target/linux/brcm63xx/base-files/etc/init.d/defconfig
new file mode 100755
index 0000000000..dac9c23440
--- /dev/null
+++ b/target/linux/brcm63xx/base-files/etc/init.d/defconfig
@@ -0,0 +1,18 @@
+#!/bin/sh /etc/rc.common
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+
+START=05
+
+start() {
+ local board=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
+
+ [ ! -d /etc/defconfig/$board ] && board="generic"
+
+ for f in $( ls /etc/defconfig/$board ); do
+ if [ ! -e /etc/config/$f ]; then
+ cp /etc/defconfig/$board/$f /etc/config/
+ fi
+ done
+}