]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
bcm63xx: Add defconfigs.
authorDaniel Dickinson <crazycshore@gmail.com>
Sun, 28 Nov 2010 22:04:19 +0000 (22:04 +0000)
committerDaniel Dickinson <crazycshore@gmail.com>
Sun, 28 Nov 2010 22:04:19 +0000 (22:04 +0000)
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>
SVN-Revision: 24185

target/linux/brcm63xx/base-files.mk [new file with mode: 0644]
target/linux/brcm63xx/base-files/etc/defconfig/generic/network [moved from target/linux/brcm63xx/base-files/etc/config/network with 94% similarity]
target/linux/brcm63xx/base-files/etc/init.d/defconfig [new file with mode: 0755]

diff --git a/target/linux/brcm63xx/base-files.mk b/target/linux/brcm63xx/base-files.mk
new file mode 100644 (file)
index 0000000..d6682bd
--- /dev/null
@@ -0,0 +1,5 @@
+define Package/base-files/install-target
+       rm -f $(1)/etc/config/network
+endef
+
+
similarity index 94%
rename from target/linux/brcm63xx/base-files/etc/config/network
rename to target/linux/brcm63xx/base-files/etc/defconfig/generic/network
index c15fdd81b33884db20927c0d0fab993ebeb5243f..bc2c69b7c98cf930f4d1637c336f226ca92dcfd9 100644 (file)
@@ -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 (executable)
index 0000000..dac9c23
--- /dev/null
@@ -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
+}