[OpenWrt-Devel] [PATCH] arc770/axs101: mimic real wireless router

Alexey Brodkin Alexey.Brodkin at synopsys.com
Fri Apr 8 14:18:40 EDT 2016


Even though ARC SDP board has only 1 wired connection (eth0)
and barely might be treated as a full-scale router we're mimicking
that so the one ond only eth0 wired interface is wan and wlan0
serves its own network behind NAT.

For that we enable firewall and DNS server on the board and rearranging
interfaces: eth0 becomes wan, wlan0 is leff in lan but gets its
internal static IP address (192.168.1.1).

Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
---
 target/linux/arc770/base-files/etc/board.d/02_network | 3 ++-
 target/linux/arc770/generic/profiles/00-default.mk    | 2 +-
 target/linux/arc770/generic/profiles/02-axs101.mk     | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/target/linux/arc770/base-files/etc/board.d/02_network b/target/linux/arc770/base-files/etc/board.d/02_network
index dabc539..da53f91 100755
--- a/target/linux/arc770/base-files/etc/board.d/02_network
+++ b/target/linux/arc770/base-files/etc/board.d/02_network
@@ -10,7 +10,8 @@ board_config_update
 
 case "$( arc_board_name )" in
 "arc-sdp"*)
-	ucidef_set_interface_lan "eth0" "dhcp"
+	ucidef_set_interface_wan "eth0" "dhcp"
+	ucidef_set_interface_lan "wlan0"
 	;;
 esac
 
diff --git a/target/linux/arc770/generic/profiles/00-default.mk b/target/linux/arc770/generic/profiles/00-default.mk
index c30317a..88fd96b 100644
--- a/target/linux/arc770/generic/profiles/00-default.mk
+++ b/target/linux/arc770/generic/profiles/00-default.mk
@@ -7,7 +7,7 @@
 
 define Profile/Default
 	NAME:=Default Profile (all drivers)
-	PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini
+	PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini firewall dnsmasq
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/arc770/generic/profiles/02-axs101.mk b/target/linux/arc770/generic/profiles/02-axs101.mk
index 56a97e5..7525066 100644
--- a/target/linux/arc770/generic/profiles/02-axs101.mk
+++ b/target/linux/arc770/generic/profiles/02-axs101.mk
@@ -7,7 +7,7 @@
 
 define Profile/axs101
 	NAME:=Synopsys DesignWare AXS101
-	PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini
+	PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini firewall dnsmasq
 endef
 
 define Profile/axs101/Description
-- 
2.5.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list