From patchwork Sun Jan 11 16:49:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylwester Petela X-Patchwork-Id: 427479 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 57259140182 for ; Mon, 12 Jan 2015 03:49:54 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 467D4284602; Sun, 11 Jan 2015 17:47:26 +0100 (CET) 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,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id EA699284566 for ; Sun, 11 Jan 2015 17:46:58 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-wi0-f173.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 11 Jan 2015 17:46:58 +0100 (CET) Received: by mail-wi0-f173.google.com with SMTP id r20so10426760wiv.0 for ; Sun, 11 Jan 2015 08:49:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; bh=vEzZFBLVjN2Zo3sTBo8zp8+HTzS6C24SUY5giZKUIYU=; b=XqoFD8Sz6eY7i9Roa3/y9Ysmp1LIeXrcfE8nXsZGu3JCmapqU0Xed1RLc47hq4X1xC xJLEmvfisye5qKy7xNCF/DgJQoiLsK2OJEWLSLF8qHvXeek1MErP1P2pE5dLgsS7pCzl nxwxyVmZJskD+izf2xVwzj1pf9ziqQ8j3oB1fOkNPzVaQ0KVL2PDWFyj1chMowj6q4Uo 6MRLHMS9JrbgzrPrSgUj7pv/ccmnQSwnUZDlJdAebFQ+IOZVm2Cc5FSYpH9Y6XMFLer1 /vUP/CnYF6Z/jdnIQPbzsOIoZlrE4rdl53c8fEgiRxBKI0T5GaBMXIy4iEv7ssirXNPY iT0A== X-Received: by 10.180.13.7 with SMTP id d7mr23165035wic.57.1420994949837; Sun, 11 Jan 2015 08:49:09 -0800 (PST) Received: from localhost (ers35.neoplus.adsl.tpnet.pl. [83.20.112.35]) by mx.google.com with ESMTPSA id wz5sm18169774wjc.29.2015.01.11.08.49.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 08:49:09 -0800 (PST) Date: Sun, 11 Jan 2015 17:49:13 +0100 From: "Sylwester Petela (ScApi)" To: OpenWRT-devel , Bloic Message-ID: <20150111174913.00005c0b@gmail.com> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.16.6; i586-pc-mingw32msvc) MIME-Version: 1.0 Subject: [OpenWrt-Devel] [PATCH 2/3 v3] [Lantiq] [P2812HNUFX] Add profile and userspace for P2812HNUF1/3, switch from UBI_GLUEBI to UBI_BLOCK 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: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Add profile and userspace for P2812HNUF1/3, switch from UBI_GLUEBI to UBI_BLOCK Signed-off-by: Sylwester Petela --- .../lantiq/base-files/etc/uci-defaults/01_leds | 7 + .../lantiq/base-files/etc/uci-defaults/02_network | 4 +- .../lantiq/base-files/lib/upgrade/platform.sh | 2 +- target/linux/lantiq/image/Makefile | 8 +- target/linux/lantiq/xrx200/config-default | 4 +- target/linux/lantiq/xrx200/profiles/zyxel.mk | 25 +- 6 files changed, 38 insertions(+), 12 deletions(-) diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds index 10ba2a1..3502eb2 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds +++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds @@ -37,6 +37,13 @@ VGV7519) ucidef_set_led_netdev "internet_yellow" "internet_yellow" "internet_yellow" "nas0" ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "pppoe-wan" ;; +P2812HNUF*) + ucidef_set_led_default "power" "power" "power" "0" + ucidef_set_led_default "power2" "power2" "power2" "1" + ucidef_set_led_wlan "wireless_green" "wireless_green" "wireless_green" "phy0radio" + ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0" + ucidef_set_led_netdev "internet_green" "internet_green" "internet_green" "pppoe-wan" + ;; *) ;; esac diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network b/target/linux/lantiq/base-files/etc/uci-defaults/02_network index 1df83a6..f9cac7c 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network +++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network @@ -145,7 +145,9 @@ P2601HNFX) ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t" ;; -P2812HNUFX) +P2812HNUF*) + lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) + wan_mac=$(macaddr_add "$lan_mac" 1) ucidef_set_interface_lan 'eth0.1' ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "0 1 2 4 5 6t" diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh index 84f15c4..1688d3a 100755 --- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh +++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh @@ -7,7 +7,7 @@ platform_check_image() { local board=$(lantiq_board_name) case "$board" in - BTHOMEHUBV2B|BTHOMEHUBV3A ) + BTHOMEHUBV2B|BTHOMEHUBV3A|P2812HNUF* ) nand_do_platform_check $board $1 return $?; ;; diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 623f93b..82f0e6f 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -400,9 +400,11 @@ endif ifeq ($(CONFIG_TARGET_lantiq_xrx200),y) # VR9 -Image/BuildKernel/Profile/P2812HNUFX=$(call Image/BuildKernel/Template,P2812HNUFX) -Image/InstallKernel/Template/P2812HNUFX=$(call Image/InstallKernel/Template,P2812HNUFX) -Image/Build/Profile/P2812HNUFX=$(call Image/Build/$(1),$(1),P2812HNUFX) +Image/BuildKernel/Profile/P2812HNUF1=$(call Image/BuildKernel/Template,P2812HNUF1) +Image/Build/Profile/P2812HNUF1=$(call Image/BuildNAND/$(1),$(1),P2812HNUF1) + +Image/BuildKernel/Profile/P2812HNUF3=$(call Image/BuildKernel/Template,P2812HNUF3) +Image/Build/Profile/P2812HNUF3=$(call Image/BuildNAND/$(1),$(1),P2812HNUF3) Image/BuildKernel/Profile/ARV7519RW22=$(call Image/BuildKernel/Template,ARV7519RW22,$(1)) Image/Build/Profile/ARV7519RW22=$(call Image/Build/$(1),$(1),ARV7519RW22) diff --git a/target/linux/lantiq/xrx200/config-default b/target/linux/lantiq/xrx200/config-default index 09dfbdd..73dad50 100644 --- a/target/linux/lantiq/xrx200/config-default +++ b/target/linux/lantiq/xrx200/config-default @@ -30,9 +30,9 @@ CONFIG_MTD_NAND_XWAY=y # CONFIG_MTD_SM_COMMON is not set CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 -# CONFIG_MTD_UBI_BLOCK is not set +CONFIG_MTD_UBI_BLOCK=y # CONFIG_MTD_UBI_FASTMAP is not set -CONFIG_MTD_UBI_GLUEBI=y +# CONFIG_MTD_UBI_GLUEBI is not set CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_NLS=y CONFIG_PCIE_LANTIQ=y diff --git a/target/linux/lantiq/xrx200/profiles/zyxel.mk b/target/linux/lantiq/xrx200/profiles/zyxel.mk index e758a50..d388368 100644 --- a/target/linux/lantiq/xrx200/profiles/zyxel.mk +++ b/target/linux/lantiq/xrx200/profiles/zyxel.mk @@ -1,5 +1,5 @@ -define Profile/P2812HNUFX - NAME:=ZyXEL P-2812HNU-Fx +define Profile/P2812HNUF1 + NAME:=ZyXEL P-2812HNU-F1 PACKAGES:=kmod-rt2800-pci wpad-mini \ kmod-ltq-deu-vr9 kmod-ltq-hcd-vr9 \ kmod-ltq-vdsl-vr9-mei kmod-ltq-vdsl-vr9 \ @@ -8,7 +8,23 @@ define Profile/P2812HNUFX swconfig endef -P2812HNUFX_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096" -P2812HNUFX_UBI_OPTS:="-m 2048 -p 128KiB -s 512" +P2812HNUF1_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096" +P2812HNUF1_UBI_OPTS:="-m 2048 -p 128KiB -s 512" -$(eval $(call Profile,P2812HNUFX)) +$(eval $(call Profile,P2812HNUF1)) + +define Profile/P2812HNUF3 + NAME:=ZyXEL P-2812HNU-F3 + PACKAGES:=kmod-rt2800-pci wpad-mini \ + kmod-ltq-deu-vr9 kmod-ltq-hcd-vr9 \ + kmod-ltq-vdsl-vr9-mei kmod-ltq-vdsl-vr9 \ + kmod-ltq-atm-vr9 ltq-vdsl-vr9-fw-installer \ + ltq-vdsl-app ppp-mod-pppoa \ + swconfig +endef + +P2812HNUF3_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096" +P2812HNUF3_UBI_OPTS:="-m 2048 -p 128KiB -s 512" + +$(eval $(call Profile,P2812HNUF3)) +