From patchwork Tue Apr 21 01:18:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Olivari X-Patchwork-Id: 462951 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 7C8C1140142 for ; Tue, 21 Apr 2015 11:19:04 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 526E5280226; Tue, 21 Apr 2015 03:17:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8562F280226 for ; Tue, 21 Apr 2015 03:17:42 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_FROM_MX=-3.1; rate: -7.6 Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 21 Apr 2015 03:17:42 +0200 (CEST) Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id BBB85140368; Tue, 21 Apr 2015 01:18:37 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id AA375140366; Tue, 21 Apr 2015 01:18:37 +0000 (UTC) Received: from mathieu-linux.qca.qualcomm.com (c-24-6-118-23.hsd1.ca.comcast.net [24.6.118.23]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mathieu@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 07C24140366; Tue, 21 Apr 2015 01:18:36 +0000 (UTC) From: Mathieu Olivari To: blogic@openwrt.org, kaloz@openwrt.org Date: Mon, 20 Apr 2015 18:18:29 -0700 Message-Id: <1429579109-23073-3-git-send-email-mathieu@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1429579109-23073-1-git-send-email-mathieu@codeaurora.org> References: <1429579109-23073-1-git-send-email-mathieu@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH 3/3] ipq806x: add db149 support to OpenWrt init scripts X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" DB149 is a IPQ8064 based platform. This patch adds the init scripts to detect it, configure the network accordingly, and generate a flashable image for it. Signed-off-by: Mathieu Olivari --- target/linux/ipq806x/base-files/etc/uci-defaults/network | 6 ++++++ target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 +++ target/linux/ipq806x/image/Makefile | 1 + 3 files changed, 10 insertions(+) diff --git a/target/linux/ipq806x/base-files/etc/uci-defaults/network b/target/linux/ipq806x/base-files/etc/uci-defaults/network index 34e9fe4..354cea9 100755 --- a/target/linux/ipq806x/base-files/etc/uci-defaults/network +++ b/target/linux/ipq806x/base-files/etc/uci-defaults/network @@ -22,6 +22,12 @@ ap148) ucidef_add_switch_vlan "switch0" "1" "6 1 2 3 4" ucidef_add_switch_vlan "switch0" "2" "0 5" ;; +db149) + ucidef_set_interfaces_lan_wan "eth1 eth2 eth3" "eth0" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "6 1 2 3 4" + ucidef_add_switch_vlan "switch0" "2" "0 5" + ;; *) echo "Unsupported hardware. Network interfaces not intialized" ;; diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh b/target/linux/ipq806x/base-files/lib/ipq806x.sh index 7c47fa2..2790f3f 100644 --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh @@ -17,6 +17,9 @@ ipq806x_board_detect() { *"AP148") name="ap148" ;; + *"DB149") + name="db149" + ;; esac [ -z "$name" ] && name="unknown" diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 77d191f..e2346e6 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -22,6 +22,7 @@ endef define Image/BuildKernel $(CP) $(LINUX_DIR)/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf $(call Image/BuildKernel/FIT,qcom-ipq8064-ap148) + $(call Image/BuildKernel/FIT,qcom-ipq8064-db149) endef define Image/Build/squashfs