From 2ce35911df2b85275e9e6204365b51e3f4dfb75d Mon Sep 17 00:00:00 2001 From: cshore Date: Sun, 28 Nov 2010 22:04:19 +0000 Subject: 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24185 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/brcm63xx/base-files/etc/config/network | 19 ------------------- .../brcm63xx/base-files/etc/defconfig/generic/network | 18 ++++++++++++++++++ target/linux/brcm63xx/base-files/etc/init.d/defconfig | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+), 19 deletions(-) delete mode 100644 target/linux/brcm63xx/base-files/etc/config/network create mode 100644 target/linux/brcm63xx/base-files/etc/defconfig/generic/network create mode 100755 target/linux/brcm63xx/base-files/etc/init.d/defconfig (limited to 'target/linux/brcm63xx/base-files') diff --git a/target/linux/brcm63xx/base-files/etc/config/network b/target/linux/brcm63xx/base-files/etc/config/network deleted file mode 100644 index c15fdd81b3..0000000000 --- a/target/linux/brcm63xx/base-files/etc/config/network +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2008 OpenWrt.org - -config interface loopback - option ifname lo - option proto static - option ipaddr 127.0.0.1 - option netmask 255.0.0.0 - -config interface lan - option type bridge - option ifname eth1 - option proto static - option ipaddr 192.168.1.1 - option netmask 255.255.255.0 - option nat 1 - -config interface wan - option ifname eth0 - option proto dhcp diff --git a/target/linux/brcm63xx/base-files/etc/defconfig/generic/network b/target/linux/brcm63xx/base-files/etc/defconfig/generic/network new file mode 100644 index 0000000000..bc2c69b7c9 --- /dev/null +++ b/target/linux/brcm63xx/base-files/etc/defconfig/generic/network @@ -0,0 +1,18 @@ +# Copyright (C) 2008 OpenWrt.org + +config interface loopback + option ifname lo + option proto static + option ipaddr 127.0.0.1 + option netmask 255.0.0.0 + +config interface lan + option type bridge + option ifname eth1 + option proto static + option ipaddr 192.168.1.1 + option netmask 255.255.255.0 + +config interface wan + option ifname eth0 + option proto dhcp 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 +} -- cgit v1.2.3