From john at phrozen.org Fri Apr 1 02:59:20 2016 From: john at phrozen.org (John Crispin) Date: Fri, 1 Apr 2016 08:59:20 +0200 Subject: [OpenWrt-Devel] [PATCH] ramips: rt3352 usbphy fix in dts-file In-Reply-To: <56F432CD.7040900@yandex.ru> References: <56F432CD.7040900@yandex.ru> Message-ID: <56FE1C48.9060707@phrozen.org> Hi, does not apply, please fix and resend John On 24/03/2016 19:32, serge wrote: > Add missing rt3352 usb phy. Need to backport into CC. > > > Signed-Off-By: Serge Vasilugin > > diff --git a/target/linux/ramips/dts/rt3352.dtsi > b/target/linux/ramips/dts/rt3352.dtsi > index cfa0db6..0932b52 100644 > --- a/target/linux/ramips/dts/rt3352.dtsi > +++ b/target/linux/ramips/dts/rt3352.dtsi > @@ -252,8 +252,9 @@ > interrupts = <17>; > }; > > - usbphy { > + usbphy: usbphy { > compatible = "ralink,rt3352-usbphy"; > + #phy-cells = <1>; > > resets = <&rstctrl 22 &rstctrl 25>; > reset-names = "host", "device"; > @@ -273,6 +274,9 @@ > compatible = "generic-ehci"; > reg = <0x101c0000 0x1000>; > > + phys = <&usbphy 1>; > + phy-names = "usb"; > + > interrupt-parent = <&intc>; > interrupts = <18>; > > @@ -283,6 +287,9 @@ > compatible = "generic-ohci"; > reg = <0x101c1000 0x1000>; > > + phys = <&usbphy 1>; > + phy-names = "usb"; > + > interrupt-parent = <&intc>; > interrupts = <18>; > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From noltari at gmail.com Fri Apr 1 06:18:12 2016 From: noltari at gmail.com (=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=) Date: Fri, 1 Apr 2016 12:18:12 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] download: add @GITHUB download facility Message-ID: <1459505893-22035-1-git-send-email-noltari@gmail.com> Define a new alias (@GITHUB) for downloading raw github repository files Signed-off-by: ?lvaro Fern?ndez Rojas --- include/download.mk | 2 +- scripts/download.pl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/download.mk b/include/download.mk index 63af908..a359514 100644 --- a/include/download.mk +++ b/include/download.mk @@ -13,7 +13,7 @@ DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED) define dl_method $(strip \ $(if $(2),$(2), \ - $(if $(filter @APACHE/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ + $(if $(filter @APACHE/% @GITHUB/% @GNOME/% @GNU/% @KERNEL/% @SF/% @SAVANNAH/% ftp://% http://% https://% file://%,$(1)),default, \ $(if $(filter git://%,$(1)),git, \ $(if $(filter svn://%,$(1)),svn, \ $(if $(filter cvs://%,$(1)),cvs, \ diff --git a/scripts/download.pl b/scripts/download.pl index 20f38f1..a1bd013 100755 --- a/scripts/download.pl +++ b/scripts/download.pl @@ -182,6 +182,11 @@ foreach my $mirror (@ARGV) { push @mirrors, "http://mirrors.ocf.berkeley.edu/apache/$1"; push @mirrors, "http://mirror.cc.columbia.edu/pub/software/apache/$1"; push @mirrors, "http://ftp.jaist.ac.jp/pub/apache/$1"; + } elsif ($mirror =~ /^\@GITHUB\/(.+)$/) { + # give github a few more tries (different mirrors) + for (1 .. 5) { + push @mirrors, "https://raw.githubusercontent.com/$1"; + } } elsif ($mirror =~ /^\@GNU\/(.+)$/) { push @mirrors, "http://ftpmirror.gnu.org/$1"; push @mirrors, "http://ftp.gnu.org/pub/gnu/$1"; -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From noltari at gmail.com Fri Apr 1 06:18:13 2016 From: noltari at gmail.com (=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=) Date: Fri, 1 Apr 2016 12:18:13 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] brcmfmac43430-firmware: switch to @GITHUB download alias In-Reply-To: <1459505893-22035-1-git-send-email-noltari@gmail.com> References: <1459505893-22035-1-git-send-email-noltari@gmail.com> Message-ID: <1459505893-22035-2-git-send-email-noltari@gmail.com> Signed-off-by: ?lvaro Fern?ndez Rojas --- package/firmware/brcmfmac43430-firmware/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/firmware/brcmfmac43430-firmware/Makefile b/package/firmware/brcmfmac43430-firmware/Makefile index 6e78e9d..e4a1152 100644 --- a/package/firmware/brcmfmac43430-firmware/Makefile +++ b/package/firmware/brcmfmac43430-firmware/Makefile @@ -11,7 +11,7 @@ PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk BRCMFMAC43430_SDIO_REV:=54bab3d6a6d43239c71d26464e6e10e5067ffea7 -BRCMFMAC43430_SDIO_URL:=https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/$(BRCMFMAC43430_SDIO_REV)/brcm80211/brcm/ +BRCMFMAC43430_SDIO_URL:=@GITHUB/RPi-Distro/firmware-nonfree/$(BRCMFMAC43430_SDIO_REV)/brcm80211/brcm/ BRCMFMAC43430_SDIO_FILE:=brcmfmac43430-sdio-$(BRCMFMAC43430_SDIO_REV) define Download/brcmfmac43430_sdio_bin -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kaloz at openwrt.org Fri Apr 1 08:25:10 2016 From: kaloz at openwrt.org (Imre Kaloz) Date: Fri, 01 Apr 2016 14:25:10 +0200 Subject: [OpenWrt-Devel] [PATCH 0/8] [ipq806x] Add basic support for Linksys EA8500 In-Reply-To: References: Message-ID: Hi Adrian, On Fri, 01 Apr 2016 02:35:20 +0200, Adrian Panella wrote: > From: Adrian Panella > > > > This patchset adds support for the Linksys AC2600 EA8500 router. Does networking work for you? I have a patchset for the ea8500 I didn't push because of that. Thanks, Imre _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kaloz at openwrt.org Fri Apr 1 08:35:56 2016 From: kaloz at openwrt.org (Imre Kaloz) Date: Fri, 01 Apr 2016 14:35:56 +0200 Subject: [OpenWrt-Devel] [RFC 1/2] Add support for the apm821xx Device Target In-Reply-To: <1459475170-1628-2-git-send-email-chrisrblake93@gmail.com> References: <1459475170-1628-1-git-send-email-chrisrblake93@gmail.com> <1459475170-1628-2-git-send-email-chrisrblake93@gmail.com> Message-ID: Hi Chris, On Fri, 01 Apr 2016 03:46:09 +0200, Chris Blake wrote: > This adds a new target for PowerPC APM821xx (464-based) boards, as well > as adds support for the booke-wdt watchdog package. > > Signed-off-by: Chris Blake Not bad at all for first try :) > diff --git a/include/target.mk b/include/target.mk > index 76fbd99..6d036a0 100644 > --- a/include/target.mk > +++ b/include/target.mk > @@ -253,6 +253,7 @@ ifeq ($(DUMP),1) > CPU_CFLAGS_8540:=-mcpu=8540 > CPU_CFLAGS_405:=-mcpu=405 > CPU_CFLAGS_440:=-mcpu=440 > + CPU_CFLAGS_464:=-mcpu=464 > endif > ifeq ($(ARCH),sparc) > CPU_TYPE = sparc These guys do have an FPU, so please go with CPU_CFLAGS_464fp:=-mcpu=464fp > --- /dev/null > +++ b/target/linux/apm821xx/Makefile > @@ -0,0 +1,30 @@ > +# > +# Copyright (C) 2016 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License > v2. > +# See /LICENSE for more information. > +# > +include $(TOPDIR)/rules.mk > + > +ARCH:=powerpc > +BOARD:=apm821xx > +BOARDNAME:=AppliedMicro APM821xx > +CPU_TYPE:=464 464fp > +FEATURES:=squashfs nand rtc ramdisk fpu > +CONFIG_BLUESTONE=y I doubt we support that here. > +CONFIG_BOOKE=y > +CONFIG_BOUNCE=y > +CONFIG_CANYONLANDS=n "is not set". Please refresh the config file using the buildsystem. > --- /dev/null > +++ b/target/linux/apm821xx/generic/target.mk > @@ -0,0 +1,12 @@ > +# > +# Copyright (C) 2016 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License > v2. > +# See /LICENSE for more information. > +# > + > +BOARDNAME:=Generic > + > +define Target/Description > + Build firmware images for generic APM821xx based boards. > +endef There's not reason to create any subtargets for now. Imre _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kaloz at openwrt.org Fri Apr 1 08:39:50 2016 From: kaloz at openwrt.org (Imre Kaloz) Date: Fri, 01 Apr 2016 14:39:50 +0200 Subject: [OpenWrt-Devel] [RFC 2/2] Add support for the Meraki MR24 In-Reply-To: <1459475170-1628-3-git-send-email-chrisrblake93@gmail.com> References: <1459475170-1628-1-git-send-email-chrisrblake93@gmail.com> <1459475170-1628-3-git-send-email-chrisrblake93@gmail.com> Message-ID: On Fri, 01 Apr 2016 03:46:10 +0200, Chris Blake wrote: > This patch adds support for the Meraki MR24 Access point to the apm821xx > target. More info on the device can be found at > https://wiki.openwrt.org/toh/meraki/mr24 > > Signed-off-by: Chris Blake > --- /dev/null > +++ b/target/linux/apm821xx/dts/MR24.dts > @@ -0,0 +1,433 @@ > +/* > + * Device Tree Source for Meraki MR24 (Ikarem) > + * > + * Copyright (C) 2016 Chris Blake > + * > + * Based on Cisco Meraki GPL Release r23-20150601 MR24 DTS > + * > + * This file is licensed under the terms of the GNU General Public > + * License version 2. This program is licensed "as is" without > + * any warranty of any kind, whether express or implied. > + */ > + > +/dts-v1/; > + > +/ { > + #address-cells = <2>; > + #size-cells = <1>; > + model = "Meraki MR24 Access Point"; > + compatible = "apm,bluestone"; This should be "meraki,ikarem" if that's the codename for the box. > diff --git > a/target/linux/apm821xx/patches-4.4/700-powerpc_ibm_phy_add_ar8035.patch > b/target/linux/apm821xx/patches-4.4/700-powerpc_ibm_phy_add_ar8035.patch > diff --git > a/target/linux/apm821xx/patches-4.4/800-ppc4xx-rng-fix-crash-during-init.patch > b/target/linux/apm821xx/patches-4.4/800-ppc4xx-rng-fix-crash-during-init.patch These should be part of "1/2". Thanks, Imre _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Fri Apr 1 08:41:47 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Fri, 1 Apr 2016 14:41:47 +0200 Subject: [OpenWrt-Devel] [RFC] ar71xx: Reset QCA955x SGMII link on speed change Message-ID: <1459514507-20044-1-git-send-email-sven@open-mesh.com> From: Sven Eckelmann The SGMII link of the QCA955x seems to be unstable when the PHY changes the link speed. Reseting the SGMII and the PHY management control seems to resolve this problem. This was observed with an AR8033 and QCA9558 The code of this RFC is not meant to be an actual patch. It should show what the u-boot for QCA955x does and what seemed to work(tm) in my limited tests. It would be interesting to know whether this was also noticed by other people and how they fixed it (when they fixed it). If it is already known than it would maybe good to find a better way to integrate it with ag71xx. Right now it just uses the set_speed callback to start the reset. Signed-off-by: Sven Eckelmann --- .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 110 +++++++++++++++++++++ .../601-MIPS-ath79-add-more-register-defines.patch | 2 +- .../601-MIPS-ath79-add-more-register-defines.patch | 2 +- 3 files changed, 112 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c index b43c80a..01c25b2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -373,6 +373,20 @@ static void ar934x_set_speed_ge0(int speed) iounmap(base); } +#define QCA955X_GMAC_REG_SGMII_RESET 0x14 +#define QCA955X_GMAC_REG_MR_AN_CONTROL 0x1C +#define QCA955X_GMAC_REG_SGMII_DEBUG 0x58 +#define SGMII_LINK_WAR_MAX_TRY 20 + +#define QCA955X_GMAC_REG_MR_AN_CONTROL_AN_ENABLE BIT(12) +#define QCA955X_GMAC_REG_MR_AN_CONTROL_PHY_RESET BIT(15) + +#define QCA955X_GMAC_REG_SGMII_RESET_HW_RX_125M_N BIT(4) +#define QCA955X_GMAC_REG_SGMII_RESET_TX_125M_N BIT(3) +#define QCA955X_GMAC_REG_SGMII_RESET_RX_125M_N BIT(2) +#define QCA955X_GMAC_REG_SGMII_RESET_TX_CLK_N BIT(1) +#define QCA955X_GMAC_REG_SGMII_RESET_RX_CLK_N BIT(0) + static void qca955x_set_speed_xmii(int speed) { void __iomem *base; @@ -381,6 +395,100 @@ static void qca955x_set_speed_xmii(int speed) base = ioremap_nocache(AR71XX_PLL_BASE, AR71XX_PLL_SIZE); __raw_writel(val, base + QCA955X_PLL_ETH_XMII_CONTROL_REG); iounmap(base); + + // TODO: find out if something like qca955x_reset_xmii(); is needed +} + +static void qca955x_reset_sgmii(void) +{ + void __iomem *base; + int count = 0; + u32 status; + u32 t; + + base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE); + + /* WARNING ugly PoC code ahead */ + printk("Resetting SGMII link\n"); + + t = QCA955X_GMAC_REG_MR_AN_CONTROL_AN_ENABLE | + QCA955X_GMAC_REG_MR_AN_CONTROL_PHY_RESET; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + udelay(10); + + t = QCA955X_GMAC_REG_MR_AN_CONTROL_AN_ENABLE; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + + t = 0; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + udelay(10); + + t = QCA955X_GMAC_REG_SGMII_RESET_HW_RX_125M_N; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + udelay(10); + + t = QCA955X_GMAC_REG_SGMII_RESET_HW_RX_125M_N | + QCA955X_GMAC_REG_SGMII_RESET_RX_125M_N; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + udelay(10); + + t = QCA955X_GMAC_REG_SGMII_RESET_HW_RX_125M_N | + QCA955X_GMAC_REG_SGMII_RESET_TX_125M_N | + QCA955X_GMAC_REG_SGMII_RESET_RX_125M_N; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + udelay(10); + + t = QCA955X_GMAC_REG_SGMII_RESET_HW_RX_125M_N | + QCA955X_GMAC_REG_SGMII_RESET_TX_125M_N | + QCA955X_GMAC_REG_SGMII_RESET_RX_125M_N | + QCA955X_GMAC_REG_SGMII_RESET_RX_CLK_N; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + udelay(10); + + t = QCA955X_GMAC_REG_SGMII_RESET_HW_RX_125M_N | + QCA955X_GMAC_REG_SGMII_RESET_TX_125M_N | + QCA955X_GMAC_REG_SGMII_RESET_RX_125M_N | + QCA955X_GMAC_REG_SGMII_RESET_RX_CLK_N | + QCA955X_GMAC_REG_SGMII_RESET_TX_CLK_N; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + udelay(10); + + /* TODO this should be an rmw */ + t = __raw_readl(base + QCA955X_GMAC_REG_MR_AN_CONTROL); + t &= ~QCA955X_GMAC_REG_MR_AN_CONTROL_PHY_RESET; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + udelay(100); + + status = __raw_readl(base + QCA955X_GMAC_REG_SGMII_DEBUG); + status &= 0xff; + while (status != 0xf && status != 0x10) { + printk("state %#02x\n", status); + /* TODO this should be an rmw */ + t = __raw_readl(base + QCA955X_GMAC_REG_MR_AN_CONTROL); + t |= QCA955X_GMAC_REG_MR_AN_CONTROL_PHY_RESET; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + + udelay(100); + + /* TODO this should be an rmw */ + t = __raw_readl(base + QCA955X_GMAC_REG_MR_AN_CONTROL); + t &= ~QCA955X_GMAC_REG_MR_AN_CONTROL_PHY_RESET; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + + if (count++ >= SGMII_LINK_WAR_MAX_TRY) { + printk("Max resets limit reached exiting...\n"); + break; + } + + mdelay(10); + + status = __raw_readl(base + QCA955X_GMAC_REG_SGMII_DEBUG); + status &= 0xff; + } + + printk("Reached count %d\n", count); + + iounmap(base); } static void qca955x_set_speed_sgmii(int speed) @@ -401,6 +509,8 @@ static void qca956x_set_speed_sgmii(int speed) base = ioremap_nocache(AR71XX_PLL_BASE, AR71XX_PLL_SIZE); __raw_writel(val, base + QCA955X_PLL_ETH_SGMII_CONTROL_REG); iounmap(base); + + qca955x_reset_sgmii(); } static void ath79_set_speed_dummy(int speed) diff --git a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch index 0126f6a..2da1048 100644 --- a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch +++ b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch @@ -47,7 +47,7 @@ #define QCA955X_PCI_CTRL_SIZE 0x100 +#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000) -+#define QCA955X_GMAC_SIZE 0x40 ++#define QCA955X_GMAC_SIZE 0x64 #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000) #define QCA955X_WMAC_SIZE 0x20000 #define QCA955X_EHCI0_BASE 0x1b000000 diff --git a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch index 0126f6a..2da1048 100644 --- a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch +++ b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch @@ -47,7 +47,7 @@ #define QCA955X_PCI_CTRL_SIZE 0x100 +#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000) -+#define QCA955X_GMAC_SIZE 0x40 ++#define QCA955X_GMAC_SIZE 0x64 #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000) #define QCA955X_WMAC_SIZE 0x20000 #define QCA955X_EHCI0_BASE 0x1b000000 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chrisrblake93 at gmail.com Fri Apr 1 09:26:46 2016 From: chrisrblake93 at gmail.com (Chris Blake) Date: Fri, 1 Apr 2016 08:26:46 -0500 Subject: [OpenWrt-Devel] [RFC 1/2] Add support for the apm821xx Device Target In-Reply-To: References: <1459475170-1628-1-git-send-email-chrisrblake93@gmail.com> <1459475170-1628-2-git-send-email-chrisrblake93@gmail.com> Message-ID: Hey Imre, On Fri, Apr 1, 2016 at 7:35 AM, Imre Kaloz wrote: > Hi Chris, > > On Fri, 01 Apr 2016 03:46:09 +0200, Chris Blake > >> +CONFIG_BLUESTONE=y > > > I doubt we support that here. > From my understanding, Bluestone is the dev board for the apm821xx, so for dependencies shouldn't this be selected? > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kaloz at openwrt.org Fri Apr 1 09:32:11 2016 From: kaloz at openwrt.org (Imre Kaloz) Date: Fri, 01 Apr 2016 15:32:11 +0200 Subject: [OpenWrt-Devel] [RFC 1/2] Add support for the apm821xx Device Target In-Reply-To: References: <1459475170-1628-1-git-send-email-chrisrblake93@gmail.com> <1459475170-1628-2-git-send-email-chrisrblake93@gmail.com> Message-ID: On Fri, 01 Apr 2016 15:26:46 +0200, Chris Blake wrote: > Hey Imre, > > On Fri, Apr 1, 2016 at 7:35 AM, Imre Kaloz wrote: >> Hi Chris, >> >> On Fri, 01 Apr 2016 03:46:09 +0200, Chris Blake >> >> >>> +CONFIG_BLUESTONE=y >> >> >> I doubt we support that here. >> > > From my understanding, Bluestone is the dev board for the apm821xx, so > for dependencies shouldn't this be selected? Nope, as we don't support it. Imre _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From vasilugin at yandex.ru Fri Apr 1 10:24:12 2016 From: vasilugin at yandex.ru (serge) Date: Fri, 01 Apr 2016 20:24:12 +0600 Subject: [OpenWrt-Devel] [PATCH v2] ramips: rt3352 usbphy fix in dts-file Message-ID: <56FE848C.1050408@yandex.ru> Add missing rt3352 usb phy. Fix ticket #20499. Need backport into CC Signed-Off-By:Serge Vasilugin diff --git a/target/linux/ramips/dts/rt3352.dtsi b/target/linux/ramips/dts/rt3352.dtsi index cfa0db6..0932b52 100644 --- a/target/linux/ramips/dts/rt3352.dtsi +++ b/target/linux/ramips/dts/rt3352.dtsi @@ -252,8 +252,9 @@ interrupts = <17>; }; - usbphy { + usbphy: usbphy { compatible = "ralink,rt3352-usbphy"; + #phy-cells = <1>; resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; @@ -273,6 +274,9 @@ compatible = "generic-ehci"; reg = <0x101c0000 0x1000>; + phys = <&usbphy 1>; + phy-names = "usb"; + interrupt-parent = <&intc>; interrupts = <18>; @@ -283,6 +287,9 @@ compatible = "generic-ohci"; reg = <0x101c1000 0x1000>; + phys = <&usbphy 1>; + phy-names = "usb"; + interrupt-parent = <&intc>; interrupts = <18>; --- serge _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Alexey.Brodkin at synopsys.com Fri Apr 1 10:39:02 2016 From: Alexey.Brodkin at synopsys.com (Alexey Brodkin) Date: Fri, 1 Apr 2016 17:39:02 +0300 Subject: [OpenWrt-Devel] [PATCH] arc770: build kmod-ath9k-htc wpad-mini by default Message-ID: <1459521542-2111-1-git-send-email-abrodkin@synopsys.com> AXS101 beind a development board lacks built-in wireles inerfaces. So we have to use external USB dongles to turn the board into wireless router. The best USB Wi-Fi dongles to work in AP-mode seem to be based on ath9k-htc chipset. And so with that change we add support of mentioned dongles in default and axs101 builds. Signed-off-by: Alexey Brodkin --- target/linux/arc770/generic/profiles/00-default.mk | 2 +- target/linux/arc770/generic/profiles/02-axs101.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/arc770/generic/profiles/00-default.mk b/target/linux/arc770/generic/profiles/00-default.mk index b12ceb1..c30317a 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 + PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini 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 60cf0fc..56a97e5 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 + PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini endef define Profile/axs101/Description -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Alexey.Brodkin at synopsys.com Fri Apr 1 10:43:25 2016 From: Alexey.Brodkin at synopsys.com (Alexey Brodkin) Date: Fri, 1 Apr 2016 17:43:25 +0300 Subject: [OpenWrt-Devel] [PATCH] arc770: enable unaligned access handling simulation in software Message-ID: <1459521805-16197-1-git-send-email-abrodkin@synopsys.com> This enables misaligned access handling by software in Linux kernel. With some wireless drivers (ath9k-htc and mt7601u for example) we see misaligned accesses here and there and to cope with that without fixing stuff in the drivers we're just gracefully handling it on ARC. Signed-off-by: Alexey Brodkin --- target/linux/arc770/config-4.4 | 5 ++-- ...rc-enable-unaligned-access-in-kernel-mode.patch | 31 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 target/linux/generic/patches-4.4/333-arc-enable-unaligned-access-in-kernel-mode.patch diff --git a/target/linux/arc770/config-4.4 b/target/linux/arc770/config-4.4 index c8f021d..87fd7e3 100644 --- a/target/linux/arc770/config-4.4 +++ b/target/linux/arc770/config-4.4 @@ -19,7 +19,7 @@ CONFIG_ARC_DBG=y # CONFIG_ARC_DBG_TLB_MISS_COUNT is not set # CONFIG_ARC_DBG_TLB_PARANOIA is not set CONFIG_ARC_DW2_UNWIND=y -# CONFIG_ARC_EMUL_UNALIGNED is not set +CONFIG_ARC_EMUL_UNALIGNED=y # CONFIG_ARC_FPU_SAVE_RESTORE is not set CONFIG_ARC_HAS_DCACHE=y # CONFIG_ARC_HAS_DCCM is not set @@ -162,7 +162,8 @@ CONFIG_SRCU=y CONFIG_STACKTRACE=y CONFIG_STMMAC_ETH=y CONFIG_STMMAC_PLATFORM=y -# CONFIG_SUNXI_SRAM is not set +CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW=y +CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN=y CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_USB_SUPPORT=y diff --git a/target/linux/generic/patches-4.4/333-arc-enable-unaligned-access-in-kernel-mode.patch b/target/linux/generic/patches-4.4/333-arc-enable-unaligned-access-in-kernel-mode.patch new file mode 100644 index 0000000..76a9ce8 --- /dev/null +++ b/target/linux/generic/patches-4.4/333-arc-enable-unaligned-access-in-kernel-mode.patch @@ -0,0 +1,31 @@ +From af737b55fc7c61f17da9ae89fba536e0a9338e98 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Mon, 14 Mar 2016 17:26:34 +0300 +Subject: [PATCH] arc: enable unaligned access in kernel mode + +This enables misaligned access handling even in kernel mode. +Some wireless drivers (ath9k-htc and mt7601u) use misaligned accesses +here and there and to cope with that without fixing stuff in the drivers +we're just gracefully handling it on ARC. + +Signed-off-by: Alexey Brodkin +--- + arch/arc/kernel/unaligned.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c +index abd961f..0b0cc97 100644 +--- a/arch/arc/kernel/unaligned.c ++++ b/arch/arc/kernel/unaligned.c +@@ -206,7 +206,7 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs, + char buf[TASK_COMM_LEN]; + + /* handle user mode only and only if enabled by sysadmin */ +- if (!user_mode(regs) || !unaligned_enabled) ++ if (!unaligned_enabled) + return 1; + + if (no_unaligned_warning) { +-- +2.5.0 + -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chrisrblake93 at gmail.com Fri Apr 1 11:17:27 2016 From: chrisrblake93 at gmail.com (Chris Blake) Date: Fri, 1 Apr 2016 10:17:27 -0500 Subject: [OpenWrt-Devel] [RFC 2/2] Add support for the Meraki MR24 In-Reply-To: References: <1459475170-1628-1-git-send-email-chrisrblake93@gmail.com> <1459475170-1628-3-git-send-email-chrisrblake93@gmail.com> Message-ID: Hey Imre, On Fri, Apr 1, 2016 at 7:39 AM, Imre Kaloz wrote: > On Fri, 01 Apr 2016 03:46:10 +0200, Chris Blake > wrote: > >> This patch adds support for the Meraki MR24 Access point to the apm821xx >> target. More info on the device can be found at >> https://wiki.openwrt.org/toh/meraki/mr24 >> >> Signed-off-by: Chris Blake > > >> --- /dev/null >> +++ b/target/linux/apm821xx/dts/MR24.dts >> @@ -0,0 +1,433 @@ >> +/* >> + * Device Tree Source for Meraki MR24 (Ikarem) >> + * >> + * Copyright (C) 2016 Chris Blake >> + * >> + * Based on Cisco Meraki GPL Release r23-20150601 MR24 DTS >> + * >> + * This file is licensed under the terms of the GNU General Public >> + * License version 2. This program is licensed "as is" without >> + * any warranty of any kind, whether express or implied. >> + */ >> + >> +/dts-v1/; >> + >> +/ { >> + #address-cells = <2>; >> + #size-cells = <1>; >> + model = "Meraki MR24 Access Point"; >> + compatible = "apm,bluestone"; > > > This should be "meraki,ikarem" if that's the codename for the box. > From my understanding this should stay as "apm,bluestone" as this is what the dts was based on, and needs to stay set for the platform code to work: http://lxr.free-electrons.com/source/arch/powerpc/platforms/44x/ppc44x_simple.c#L43 So not sure why setting this to "meraki,ikarem" would be the best plan of action, as then patches would be needed for the above code, and possibly more drivers. (still new to the ppc arch and dts files, so please correct me if I am wrong here). > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From psidhu at gateworks.com Fri Apr 1 14:56:32 2016 From: psidhu at gateworks.com (Pushpal Sidhu) Date: Fri, 1 Apr 2016 11:56:32 -0700 Subject: [OpenWrt-Devel] [PATCH 4/8] caldata-utils: new package to manipulate ath10k In-Reply-To: References: Message-ID: Hi, On Thu, Mar 31, 2016 at 6:48 PM, Adrian Panella wrote: > > > From df9a676bb3ba225f0fd6621dbaeec945baf3153d Mon Sep 17 00:00:00 2001 > From: Adrian Panella > Date: Wed, 30 Mar 2016 23:31:06 -0600 > Subject: [PATCH 12/15] caldata-utils: new package to manipulate ath10k > calibration data > > Signed-off-by: Adrian Panella > --- > package/utils/caldata-utils/Makefile | 60 +++++++++ > package/utils/caldata-utils/src/Makefile | 8 ++ > package/utils/caldata-utils/src/caldata.c | 213 ++++++++++++++++++++++++++++++ > package/utils/caldata-utils/src/caldata.h | 42 ++++++ > package/utils/caldata-utils/src/utils.c | 72 ++++++++++ > 5 files changed, 395 insertions(+) > create mode 100644 package/utils/caldata-utils/Makefile > create mode 100644 package/utils/caldata-utils/src/Makefile > create mode 100644 package/utils/caldata-utils/src/caldata.c > create mode 100644 package/utils/caldata-utils/src/caldata.h > create mode 100644 package/utils/caldata-utils/src/utils.c > > diff --git a/package/utils/caldata-utils/Makefile b/package/utils/caldata-utils/Makefile > new file mode 100644 > index 0000000..eff7761 > --- /dev/null > +++ b/package/utils/caldata-utils/Makefile > @@ -0,0 +1,60 @@ > +# > +# Copyright (C) 2006-2010 OpenWrt.org > +# Copyright (C) 2016 Adrian Panella > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +include $(TOPDIR)/rules.mk > + > +PKG_NAME:=caldata-utils > +PKG_RELEASE:=1 > + > +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) > +PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone > + > +include $(INCLUDE_DIR)/package.mk > + > +ifdef CONFIG_USE_UCLIBC > + LIBARGP="-largp" > +endif > + > +ifdef CONFIG_USE_MUSL > + LIBARGP="-largp" > +endif > + > + > +define Package/caldata-utils > + SECTION:=utils > + CATEGORY:=Utilities > + TITLE:=Utility to manipulate calibration data for ath10k > + MAINTAINER:=Adrian Panella > +endef > + > +define Package/caldata-utils/description > + This package contains an utility to manipulate calibration data for ath10k drivers. > + It enables to extract from MTD partition or file and to patch MAC address fixing the checksum. > +endef > + > +define Build/Prepare > + mkdir -p $(PKG_BUILD_DIR) > + $(CP) ./src/* $(PKG_BUILD_DIR)/ > +endef > + > +define Build/Configure > +endef > + > +define Build/Compile > + $(MAKE) -C $(PKG_BUILD_DIR) \ > + CC="$(TARGET_CC)" \ > + CFLAGS="$(TARGET_CFLAGS) -Wall" \ > + LDFLAGS="$(TARGET_LDFLAGS) $(LIBARGP)" > +endef > + > +define Package/caldata-utils/install > + $(INSTALL_DIR) $(1)/usr/sbin > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/caldata $(1)/usr/sbin/ > +endef > + > +$(eval $(call BuildPackage,caldata-utils)) > diff --git a/package/utils/caldata-utils/src/Makefile b/package/utils/caldata-utils/src/Makefile > new file mode 100644 > index 0000000..57ab936 > --- /dev/null > +++ b/package/utils/caldata-utils/src/Makefile > @@ -0,0 +1,8 @@ > + > +all: caldata > + > +caldata: caldata.c utils.c > + $(CC) $(CFLAGS) -o $@ caldata.c utils.c $(LDFLAGS) > + > +clean: > + rm caldata > diff --git a/package/utils/caldata-utils/src/caldata.c b/package/utils/caldata-utils/src/caldata.c > new file mode 100644 > index 0000000..d5391d5 > --- /dev/null > +++ b/package/utils/caldata-utils/src/caldata.c > @@ -0,0 +1,213 @@ > +/* > + * > + * Copyright (C) 2016 Adrian Panella > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version 2 > + * of the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. > + */ > + > +/* > + * > + * caldata > + * > + * Utility to manipulate calibration data for ath10k drivers. > + * It enables to extract from MTD partition or file and to patch MAC address fixing the checksum. > + * > + */ > + > + > +#include > +#include > +#include > + > +#include "caldata.h" > + > + > +/* Parse a single option. */ > +static error_t parse_opt (int key, char *arg, struct argp_state *state) > +{ > + struct arguments *arguments = state->input; > + > + switch (key) > + { > + case 'i': > + arguments->input_file = arg; > + break; > + > + case 'f': > + arguments->output_file = arg; > + break; > + > + case 'o': > + sscanf(arg,"%li", &arguments->offset); > + break; > + > + case 's': > + sscanf(arg,"%li", &arguments->size); > + break; > + > + case 'a': > + > + if(!isMAC(arg)) > + argp_error(state,"address is not a valid MAC address"); > + > + arguments->macaddr = arg; > + break; > + > + case 'v': > + arguments->verify = 1; > + break; > + > + case ARGP_KEY_END: //all options processed, verify consistency > + > + if(!arguments->input_file) > + argp_error(state,"No input file or partition specified."); > + > + if(!arguments->verify && !arguments->output_file) > + argp_error(state, "Must specify either -f FILE or -v."); > + > + break; > + > + default: > + return ARGP_ERR_UNKNOWN; > + } > + return 0; > +} > + > + > +int loadfile(char *file, void **data, int offset, int size) { > + *data=NULL; > + char *source = NULL; > + > + > + char mtdpath[32]; > + FILE *fp=NULL; > + > + //try input as partition > + int mtdnr = getMTD(file); > + if(mtdnr>=0) { > + sprintf(mtdpath, "/dev/mtdblock%d", mtdnr); > + fp = fopen(mtdpath, "rb"); > + } > + //try as file > + if(!fp) > + fp = fopen(file, "rb"); > + > + if (fp != NULL) { > + /* Go to the end of the file. */ > + if (fseek(fp, 0L, SEEK_END) == 0) { > + /* Get the size of the file. */ > + long filesize = ftell(fp); > + if (filesize == -1) { > + fclose(fp); > + return -1; } > + > + size= size ? size : (filesize - offset); > + if(size + offset > filesize) { > + fputs("Offset + size gets past EOF", stderr); > + fclose(fp); > + exit(1);} > + > + source = malloc(size + 1); > + > + /* offset from the start of the file. */ > + if (fseek(fp, offset, SEEK_SET) != 0) { > + free(source); > + fclose(fp); > + return -1;} > + > + /* Read file into memory. */ > + size_t newLen = fread(source, sizeof(char), size, fp); > + if (newLen == 0) { > + free(source); > + fclose(fp); > + return -1; > + } > + else { > + fclose(fp); > + *data=source; > + return size; > + } > + } > + } > + return -1; > +} > + > +int main (int argc, char **argv) > +{ > + struct arguments arguments; > + unsigned short ret=0; > + > + /* Default values. */ > + arguments.input_file = NULL; > + arguments.output_file = NULL; > + arguments.offset = 0; > + arguments.size = 0; > + arguments.macaddr = NULL; > + arguments.verify = 0; > + > + /* Parse arguments and validate*/ > + argp_parse (&argp, argc, argv, 0, 0, &arguments); > + > + > + // read input data > + unsigned short *data; > + int data_len=loadfile(arguments.input_file,(void **)&data, arguments.offset, arguments.size); > + > + if(data_len<0) { > + fputs("Error reading input file/partition.\n", stderr); > + exit(1); > + } > + > + unsigned char *mac=(unsigned char *)data+6; > + > + if(arguments.verify) { > + > + printf("Size: %d\n", data[0]); > + printf("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); > + ret=checksum(data, data[0]) ? 1 : 0; > + printf("Checksum: 0x%04x (%s)\n", data[1], ret ? "ERROR" : "OK"); > + if(ret) > + fputs("Calibration data checksum error\n", stderr); > + > + free(data); > + exit(ret); > + } > + > + if(arguments.macaddr) { > + sscanf(arguments.macaddr,"%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", &mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]); > + data[1]=0; > + data[1]=checksum(data, data[0]); > + } > + > + FILE *fp=fopen(arguments.output_file,"wb"); > + > + if(!fp) { > + fputs("Error opening output file\n", stderr); > + free(data); > + exit(1); > + } > + > + if(fwrite(data, data_len, 1, fp)!=1) { > + fputs("Error writing output file\n", stderr); > + free(data); > + fclose(fp); > + exit(1); > + } > + > + > + fclose(fp); > + free(data); > + exit(0); > +} > diff --git a/package/utils/caldata-utils/src/caldata.h b/package/utils/caldata-utils/src/caldata.h > new file mode 100644 > index 0000000..27c8175 > --- /dev/null > +++ b/package/utils/caldata-utils/src/caldata.h > @@ -0,0 +1,42 @@ > + > +/* Documentation */ > +const char *argp_program_version = "caldata utils 1.0"; > +static char doc[] = "caldata - Utility to manipulate calibration data for ath10k"; > +static char args_doc[] = "ARG1 ARG2"; > + > +/* Options */ > +static struct argp_option options[] = { > + {"input", 'i', "PARTITION/FILE", 0, "Read from PARTITION or FILE" }, > + {"output", 'f', "FILE", 0, "Output to FILE." }, > + {"offset", 'o', "BYTES", 0, "Skip first BYTES" }, > + {"size", 's', "BYTES", 0, "Size of data to read"}, > + {"maddress", 'a', "ADDRESS", 0, "new MAC address to assign"}, > + {"verify", 'v', 0, 0, "Only verify input, no output"}, > + { 0 } > +}; > + > +/* Used by main to communicate with parse_opt. */ > +struct arguments > +{ > + char *input_file; > + char *output_file; > + > + long int offset; > + long int size; > + char *macaddr; > + int newmac[6]; > + > + int verify; > +}; > + > +static error_t parse_opt (int key, char *arg, struct argp_state *state); > + > +static struct argp argp = { options, parse_opt, args_doc, doc }; > + > + > +// Utils > + > +int isMAC(char *s); > +int getMTD(char *name); > +unsigned short checksum(void *caldata, int size); > + > diff --git a/package/utils/caldata-utils/src/utils.c b/package/utils/caldata-utils/src/utils.c > new file mode 100644 > index 0000000..d8bda63 > --- /dev/null > +++ b/package/utils/caldata-utils/src/utils.c > @@ -0,0 +1,72 @@ > +/* > + * > + * Copyright (C) 2016 Adrian Panella > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version 2 > + * of the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. > + */ > + > +#include > +#include > +#include > +#include > + > +int isMAC(char *s) { > + int i; > + for(i = 0; i < 17; i++) { > + if(i % 3 != 2 && !isxdigit(s[i])) > + return 0; > + if(i % 3 == 2 && s[i] != ':') > + return 0; > + } > + if(s[17] != '\0') > + return 0; > + return 1; > +} > + > + > +int getMTD(char *name) > +{ > + int device = -1; > + int dev; > + char part[32]; > + FILE *fp = fopen("/proc/mtd", "rb"); > + if (!fp) > + return -1; > + while (!feof(fp) && fscanf(fp, "%*[^0-9]%d: %*s %*s \"%[^\"]\"", &dev, part) == 2) { > + if (!strcmp(part, name)) { > + device = dev; > + break; > + } > + } > + fclose(fp); > + return device; > +} > + > + > +unsigned short checksum(void *caldata, int size) > +{ > + unsigned short *ptr = (unsigned short *)caldata; > + unsigned short crc = 0; > + int i; > + > + for (i = 0; i < size; i += 2) { > + crc ^= *ptr; > + ptr++; > + } > + crc = ~crc; > + return crc; > +} > + > + > -- > 1.9.1 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel I'm not convinced this should go into the core packages, but instead to https://github.com/openwrt/packages. - Pushpal _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ianchi74 at outlook.com Fri Apr 1 16:01:50 2016 From: ianchi74 at outlook.com (Adrian Panella) Date: Fri, 1 Apr 2016 14:01:50 -0600 Subject: [OpenWrt-Devel] [PATCH 4/8] caldata-utils: new package to manipulate ath10k In-Reply-To: References: Message-ID: So far I find it essential to make ath10k work on EA8500 with the right mac address (and perhaps on other routers using QCA99x0), and so a prerequisite for that profile. That was why I proposed it in the core packages. More or less like the uboot-env utilities, which are also a prerequisite for this profile. Or perhaps like the "oseama" or "rbcfg" packages in other platforms. Most of the functionality could be covered easily with a script and was my first attempt, but I couldn't find a way to code in a sh script the checksum calculation function to be able to patch the calibration data; and so ended writing it as a C helper utility. Basically the essential part is the small checksum function in utils.c. If you help me with some ideas, I can try to refactor it into a script. -----Original Message----- From: Pushpal Sidhu [mailto:psidhu at gateworks.com] Sent: viernes, 01 de abril de 2016 12:57 p.m. To: Adrian Panella Cc: OpenWrt Development List; John Crispin Subject: Re: [OpenWrt-Devel] [PATCH 4/8] caldata-utils: new package to manipulate ath10k Hi, On Thu, Mar 31, 2016 at 6:48 PM, Adrian Panella wrote: > > > From df9a676bb3ba225f0fd6621dbaeec945baf3153d Mon Sep 17 00:00:00 2001 > From: Adrian Panella > Date: Wed, 30 Mar 2016 23:31:06 -0600 > Subject: [PATCH 12/15] caldata-utils: new package to manipulate ath10k > calibration data > > Signed-off-by: Adrian Panella > --- > package/utils/caldata-utils/Makefile | 60 +++++++++ > package/utils/caldata-utils/src/Makefile | 8 ++ > package/utils/caldata-utils/src/caldata.c | 213 > ++++++++++++++++++++++++++++++ package/utils/caldata-utils/src/caldata.h | 42 ++++++ > package/utils/caldata-utils/src/utils.c | 72 ++++++++++ > 5 files changed, 395 insertions(+) > create mode 100644 package/utils/caldata-utils/Makefile > create mode 100644 package/utils/caldata-utils/src/Makefile > create mode 100644 package/utils/caldata-utils/src/caldata.c > create mode 100644 package/utils/caldata-utils/src/caldata.h > create mode 100644 package/utils/caldata-utils/src/utils.c > > diff --git a/package/utils/caldata-utils/Makefile > b/package/utils/caldata-utils/Makefile > new file mode 100644 > index 0000000..eff7761 > --- /dev/null > +++ b/package/utils/caldata-utils/Makefile > @@ -0,0 +1,60 @@ > +# > +# Copyright (C) 2006-2010 OpenWrt.org # Copyright (C) 2016 Adrian > +Panella # # This is free software, licensed under the GNU General > +Public License v2. > +# See /LICENSE for more information. > +# > + > +include $(TOPDIR)/rules.mk > + > +PKG_NAME:=caldata-utils > +PKG_RELEASE:=1 > + > +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) > +PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone > +USE_MUSL:argp-standalone > + > +include $(INCLUDE_DIR)/package.mk > + > +ifdef CONFIG_USE_UCLIBC > + LIBARGP="-largp" > +endif > + > +ifdef CONFIG_USE_MUSL > + LIBARGP="-largp" > +endif > + > + > +define Package/caldata-utils > + SECTION:=utils > + CATEGORY:=Utilities > + TITLE:=Utility to manipulate calibration data for ath10k > + MAINTAINER:=Adrian Panella endef > + > +define Package/caldata-utils/description This package contains an > +utility to manipulate calibration data for ath10k drivers. > + It enables to extract from MTD partition or file and to patch MAC address fixing the checksum. > +endef > + > +define Build/Prepare > + mkdir -p $(PKG_BUILD_DIR) > + $(CP) ./src/* $(PKG_BUILD_DIR)/ > +endef > + > +define Build/Configure > +endef > + > +define Build/Compile > + $(MAKE) -C $(PKG_BUILD_DIR) \ > + CC="$(TARGET_CC)" \ > + CFLAGS="$(TARGET_CFLAGS) -Wall" \ > + LDFLAGS="$(TARGET_LDFLAGS) $(LIBARGP)" > +endef > + > +define Package/caldata-utils/install > + $(INSTALL_DIR) $(1)/usr/sbin > + $(INSTALL_BIN) $(PKG_BUILD_DIR)/caldata $(1)/usr/sbin/ endef > + > +$(eval $(call BuildPackage,caldata-utils)) > diff --git a/package/utils/caldata-utils/src/Makefile > b/package/utils/caldata-utils/src/Makefile > new file mode 100644 > index 0000000..57ab936 > --- /dev/null > +++ b/package/utils/caldata-utils/src/Makefile > @@ -0,0 +1,8 @@ > + > +all: caldata > + > +caldata: caldata.c utils.c > + $(CC) $(CFLAGS) -o $@ caldata.c utils.c $(LDFLAGS) > + > +clean: > + rm caldata > diff --git a/package/utils/caldata-utils/src/caldata.c > b/package/utils/caldata-utils/src/caldata.c > new file mode 100644 > index 0000000..d5391d5 > --- /dev/null > +++ b/package/utils/caldata-utils/src/caldata.c > @@ -0,0 +1,213 @@ > +/* > + * > + * Copyright (C) 2016 Adrian Panella > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version 2 > + * of the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. > + */ > + > +/* > + * > + * caldata > + * > + * Utility to manipulate calibration data for ath10k drivers. > + * It enables to extract from MTD partition or file and to patch MAC address fixing the checksum. > + * > + */ > + > + > +#include > +#include > +#include > + > +#include "caldata.h" > + > + > +/* Parse a single option. */ > +static error_t parse_opt (int key, char *arg, struct argp_state > +*state) { > + struct arguments *arguments = state->input; > + > + switch (key) > + { > + case 'i': > + arguments->input_file = arg; > + break; > + > + case 'f': > + arguments->output_file = arg; > + break; > + > + case 'o': > + sscanf(arg,"%li", &arguments->offset); > + break; > + > + case 's': > + sscanf(arg,"%li", &arguments->size); > + break; > + > + case 'a': > + > + if(!isMAC(arg)) > + argp_error(state,"address is not a valid MAC address"); > + > + arguments->macaddr = arg; > + break; > + > + case 'v': > + arguments->verify = 1; > + break; > + > + case ARGP_KEY_END: //all options processed, verify consistency > + > + if(!arguments->input_file) > + argp_error(state,"No input file or partition > + specified."); > + > + if(!arguments->verify && !arguments->output_file) > + argp_error(state, "Must specify either -f FILE or -v."); > + > + break; > + > + default: > + return ARGP_ERR_UNKNOWN; > + } > + return 0; > +} > + > + > +int loadfile(char *file, void **data, int offset, int size) { > + *data=NULL; > + char *source = NULL; > + > + > + char mtdpath[32]; > + FILE *fp=NULL; > + > + //try input as partition > + int mtdnr = getMTD(file); > + if(mtdnr>=0) { > + sprintf(mtdpath, "/dev/mtdblock%d", mtdnr); > + fp = fopen(mtdpath, "rb"); > + } > + //try as file > + if(!fp) > + fp = fopen(file, "rb"); > + > + if (fp != NULL) { > + /* Go to the end of the file. */ > + if (fseek(fp, 0L, SEEK_END) == 0) { > + /* Get the size of the file. */ > + long filesize = ftell(fp); > + if (filesize == -1) { > + fclose(fp); > + return -1; } > + > + size= size ? size : (filesize - offset); > + if(size + offset > filesize) { > + fputs("Offset + size gets past EOF", stderr); > + fclose(fp); > + exit(1);} > + > + source = malloc(size + 1); > + > + /* offset from the start of the file. */ > + if (fseek(fp, offset, SEEK_SET) != 0) { > + free(source); > + fclose(fp); > + return -1;} > + > + /* Read file into memory. */ > + size_t newLen = fread(source, sizeof(char), size, fp); > + if (newLen == 0) { > + free(source); > + fclose(fp); > + return -1; > + } > + else { > + fclose(fp); > + *data=source; > + return size; > + } > + } > + } > + return -1; > +} > + > +int main (int argc, char **argv) > +{ > + struct arguments arguments; > + unsigned short ret=0; > + > + /* Default values. */ > + arguments.input_file = NULL; > + arguments.output_file = NULL; > + arguments.offset = 0; > + arguments.size = 0; > + arguments.macaddr = NULL; > + arguments.verify = 0; > + > + /* Parse arguments and validate*/ > + argp_parse (&argp, argc, argv, 0, 0, &arguments); > + > + > + // read input data > + unsigned short *data; > + int data_len=loadfile(arguments.input_file,(void **)&data, > + arguments.offset, arguments.size); > + > + if(data_len<0) { > + fputs("Error reading input file/partition.\n", stderr); > + exit(1); > + } > + > + unsigned char *mac=(unsigned char *)data+6; > + > + if(arguments.verify) { > + > + printf("Size: %d\n", data[0]); > + printf("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); > + ret=checksum(data, data[0]) ? 1 : 0; > + printf("Checksum: 0x%04x (%s)\n", data[1], ret ? "ERROR" : "OK"); > + if(ret) > + fputs("Calibration data checksum error\n", stderr); > + > + free(data); > + exit(ret); > + } > + > + if(arguments.macaddr) { > + sscanf(arguments.macaddr,"%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx", &mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]); > + data[1]=0; > + data[1]=checksum(data, data[0]); > + } > + > + FILE *fp=fopen(arguments.output_file,"wb"); > + > + if(!fp) { > + fputs("Error opening output file\n", stderr); > + free(data); > + exit(1); > + } > + > + if(fwrite(data, data_len, 1, fp)!=1) { > + fputs("Error writing output file\n", stderr); > + free(data); > + fclose(fp); > + exit(1); > + } > + > + > + fclose(fp); > + free(data); > + exit(0); > +} > diff --git a/package/utils/caldata-utils/src/caldata.h > b/package/utils/caldata-utils/src/caldata.h > new file mode 100644 > index 0000000..27c8175 > --- /dev/null > +++ b/package/utils/caldata-utils/src/caldata.h > @@ -0,0 +1,42 @@ > + > +/* Documentation */ > +const char *argp_program_version = "caldata utils 1.0"; static char > +doc[] = "caldata - Utility to manipulate calibration data for > +ath10k"; static char args_doc[] = "ARG1 ARG2"; > + > +/* Options */ > +static struct argp_option options[] = { > + {"input", 'i', "PARTITION/FILE", 0, "Read from PARTITION or FILE" }, > + {"output", 'f', "FILE", 0, "Output to FILE." }, > + {"offset", 'o', "BYTES", 0, "Skip first BYTES" }, > + {"size", 's', "BYTES", 0, "Size of data to read"}, > + {"maddress", 'a', "ADDRESS", 0, "new MAC address to assign"}, > + {"verify", 'v', 0, 0, "Only verify input, no output"}, > + { 0 } > +}; > + > +/* Used by main to communicate with parse_opt. */ struct arguments { > + char *input_file; > + char *output_file; > + > + long int offset; > + long int size; > + char *macaddr; > + int newmac[6]; > + > + int verify; > +}; > + > +static error_t parse_opt (int key, char *arg, struct argp_state > +*state); > + > +static struct argp argp = { options, parse_opt, args_doc, doc }; > + > + > +// Utils > + > +int isMAC(char *s); > +int getMTD(char *name); > +unsigned short checksum(void *caldata, int size); > + > diff --git a/package/utils/caldata-utils/src/utils.c > b/package/utils/caldata-utils/src/utils.c > new file mode 100644 > index 0000000..d8bda63 > --- /dev/null > +++ b/package/utils/caldata-utils/src/utils.c > @@ -0,0 +1,72 @@ > +/* > + * > + * Copyright (C) 2016 Adrian Panella > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version 2 > + * of the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. > + */ > + > +#include > +#include > +#include > +#include > + > +int isMAC(char *s) { > + int i; > + for(i = 0; i < 17; i++) { > + if(i % 3 != 2 && !isxdigit(s[i])) > + return 0; > + if(i % 3 == 2 && s[i] != ':') > + return 0; > + } > + if(s[17] != '\0') > + return 0; > + return 1; > +} > + > + > +int getMTD(char *name) > +{ > + int device = -1; > + int dev; > + char part[32]; > + FILE *fp = fopen("/proc/mtd", "rb"); > + if (!fp) > + return -1; > + while (!feof(fp) && fscanf(fp, "%*[^0-9]%d: %*s %*s \"%[^\"]\"", &dev, part) == 2) { > + if (!strcmp(part, name)) { > + device = dev; > + break; > + } > + } > + fclose(fp); > + return device; > +} > + > + > +unsigned short checksum(void *caldata, int size) { > + unsigned short *ptr = (unsigned short *)caldata; > + unsigned short crc = 0; > + int i; > + > + for (i = 0; i < size; i += 2) { > + crc ^= *ptr; > + ptr++; > + } > + crc = ~crc; > + return crc; > +} > + > + > -- > 1.9.1 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel I'm not convinced this should go into the core packages, but instead to https://github.com/openwrt/packages. - Pushpal _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ianchi74 at outlook.com Fri Apr 1 19:48:22 2016 From: ianchi74 at outlook.com (Adrian Panella) Date: Fri, 1 Apr 2016 17:48:22 -0600 Subject: [OpenWrt-Devel] [PATCH 0/8] [ipq806x] Add basic support for Linksys EA8500 In-Reply-To: References: Message-ID: Hi Imre, networking seems to be working for me. So far I have done only basic testing. Can access the router from lan and wlan. No permormance test done, though. If you have a repo you can share with your patchset, I could gladly compare to take advantage of both works. Krgds Adrian > From: Imre Kaloz > > Hi Adrian, > > On Fri, 01 Apr 2016 02:35:20 +0200, Adrian Panella outlook.com> > wrote: > > > From: Adrian Panella > > > > > > > > This patchset adds support for the Linksys AC2600 EA8500 router. > > Does networking work for you? I have a patchset for the ea8500 I didn't > push because of that. > > > Thanks, > > Imre > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sat Apr 2 08:36:10 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sat, 2 Apr 2016 14:36:10 +0200 Subject: [OpenWrt-Devel] [PATCH] kernel: remove full cache flush in fuse_copy_do() for MIPS Message-ID: <1459600570-8496-1-git-send-email-hauke@hauke-m.de> This patch was introduced in commit r16412 for the brcm47xx target only and then moved to generic in commit r32395. It was initially added because of ticket #5186 and should fix some problems with fuse file systems and MIPS caches. The commit comment in r32395 says that this a generic problem in MIPS CPUs, but does not name any specifics about that. There was a fix added to kernel 2.6.21 in commit commit 7575a49f20 "[MIPS] Implement flush_anon_page()." that should fix this problem, but that was already available before both commits were done to OpenWrt. I just tested fuse with ntfs.3g without this patch on a BCM4704 (BMIPS3300 V0.6) SoC and haven't seen any problems. Someone reported that removing this patch improves some fuse operations by 5 times on some modern MIPS cores. My test was only a simple "dd if=/dev/zero of=/mnt/zero bs=5000" to an USB stick. This patch removes the patch to OpenWrt, because I assume that it is not needed any more. If someone knows more about a better test scenario or sees problem with removing this patch, please report back. Signed-off-by: Hauke Mehrtens --- .../patches-3.18/309-mips_fuse_workaround.patch | 32 ---------------------- .../patches-4.1/309-mips_fuse_workaround.patch | 32 ---------------------- .../patches-4.4/309-mips_fuse_workaround.patch | 32 ---------------------- 3 files changed, 96 deletions(-) delete mode 100644 target/linux/generic/patches-3.18/309-mips_fuse_workaround.patch delete mode 100644 target/linux/generic/patches-4.1/309-mips_fuse_workaround.patch delete mode 100644 target/linux/generic/patches-4.4/309-mips_fuse_workaround.patch diff --git a/target/linux/generic/patches-3.18/309-mips_fuse_workaround.patch b/target/linux/generic/patches-3.18/309-mips_fuse_workaround.patch deleted file mode 100644 index 934b119..0000000 --- a/target/linux/generic/patches-3.18/309-mips_fuse_workaround.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/arch/mips/mm/cache.c -+++ b/arch/mips/mm/cache.c -@@ -38,6 +38,7 @@ void (*__flush_cache_vunmap)(void); - - void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); - EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range); -+EXPORT_SYMBOL(__flush_cache_all); - void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size); - - /* MIPS specific cache operations */ ---- a/fs/fuse/dev.c -+++ b/fs/fuse/dev.c -@@ -20,6 +20,9 @@ - #include - #include - #include -+#ifdef CONFIG_MIPS -+#include -+#endif - - MODULE_ALIAS_MISCDEV(FUSE_MINOR); - MODULE_ALIAS("devname:fuse"); -@@ -749,6 +752,9 @@ static int fuse_copy_fill(struct fuse_co - static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size) - { - unsigned ncpy = min(*size, cs->len); -+#ifdef CONFIG_MIPS -+ __flush_cache_all(); -+#endif - if (val) { - void *pgaddr = kmap_atomic(cs->pg); - void *buf = pgaddr + cs->offset; diff --git a/target/linux/generic/patches-4.1/309-mips_fuse_workaround.patch b/target/linux/generic/patches-4.1/309-mips_fuse_workaround.patch deleted file mode 100644 index 7a3aa34..0000000 --- a/target/linux/generic/patches-4.1/309-mips_fuse_workaround.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/arch/mips/mm/cache.c -+++ b/arch/mips/mm/cache.c -@@ -38,6 +38,7 @@ void (*__flush_cache_vunmap)(void); - - void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); - EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range); -+EXPORT_SYMBOL(__flush_cache_all); - void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size); - - /* MIPS specific cache operations */ ---- a/fs/fuse/dev.c -+++ b/fs/fuse/dev.c -@@ -19,6 +19,9 @@ - #include - #include - #include -+#ifdef CONFIG_MIPS -+#include -+#endif - - MODULE_ALIAS_MISCDEV(FUSE_MINOR); - MODULE_ALIAS("devname:fuse"); -@@ -816,6 +819,9 @@ static int fuse_copy_fill(struct fuse_co - static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size) - { - unsigned ncpy = min(*size, cs->len); -+#ifdef CONFIG_MIPS -+ __flush_cache_all(); -+#endif - if (val) { - void *pgaddr = kmap_atomic(cs->pg); - void *buf = pgaddr + cs->offset; diff --git a/target/linux/generic/patches-4.4/309-mips_fuse_workaround.patch b/target/linux/generic/patches-4.4/309-mips_fuse_workaround.patch deleted file mode 100644 index 14d7962..0000000 --- a/target/linux/generic/patches-4.4/309-mips_fuse_workaround.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/arch/mips/mm/cache.c -+++ b/arch/mips/mm/cache.c -@@ -39,6 +39,7 @@ void (*__flush_cache_vunmap)(void); - - void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); - EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range); -+EXPORT_SYMBOL(__flush_cache_all); - void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size); - - /* MIPS specific cache operations */ ---- a/fs/fuse/dev.c -+++ b/fs/fuse/dev.c -@@ -19,6 +19,9 @@ - #include - #include - #include -+#ifdef CONFIG_MIPS -+#include -+#endif - - MODULE_ALIAS_MISCDEV(FUSE_MINOR); - MODULE_ALIAS("devname:fuse"); -@@ -802,6 +805,9 @@ static int fuse_copy_fill(struct fuse_co - static int fuse_copy_do(struct fuse_copy_state *cs, void **val, unsigned *size) - { - unsigned ncpy = min(*size, cs->len); -+#ifdef CONFIG_MIPS -+ __flush_cache_all(); -+#endif - if (val) { - void *pgaddr = kmap_atomic(cs->pg); - void *buf = pgaddr + cs->offset; -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From knaack.h at gmx.de Sat Apr 2 18:28:07 2016 From: knaack.h at gmx.de (Hartmut Knaack) Date: Sun, 3 Apr 2016 00:28:07 +0200 Subject: [OpenWrt-Devel] [PATCH] CC:ar71xx: backport support for Netgear WPN824N Message-ID: <57004777.2010408@gmx.de> Add support for Netgear WPN824N. Hardware specs: * AR7240, 4 LAN ports, 1 WAN port * AR9285 WLAN * 32 MB RAM * 4 MB Flash * 16 LEDs (LAN, WAN and Power/Status contain two LEDs for dual color effect) * 3 Buttons (not supported) Signed-off-by: Hartmut Knaack --- Development Thread: https://forum.openwrt.org/viewtopic.php?id=30388 Test result: https://forum.openwrt.org/viewtopic.php?pid=313815#p313815 Wiki Page: https://wiki.openwrt.org/toh/netgear/wpn824n --- target/linux/ar71xx/base-files/etc/diag.sh | 3 +- .../ar71xx/base-files/etc/uci-defaults/01_leds | 20 +++- .../ar71xx/base-files/etc/uci-defaults/02_network | 3 +- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../lib/preinit/05_set_preinit_iface_ar71xx | 1 + .../ar71xx/base-files/lib/upgrade/platform.sh | 3 +- .../ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c | 124 ++++++++++++++++++++- target/linux/ar71xx/generic/profiles/netgear.mk | 10 ++ target/linux/ar71xx/image/Makefile | 1 + .../patches-3.18/907-MIPS-ath79-add-WPN824N.patch | 21 ++++ .../files/drivers/mtd/mtdsplit/mtdsplit_uimage.c | 2 + 11 files changed, 185 insertions(+), 6 deletions(-) create mode 100644 target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-WPN824N.patch diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 89fe53c..178825a 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -324,7 +324,8 @@ get_status_led() { wnr2000 | \ wnr2200 |\ wnr612-v2 |\ - wnr1000-v2) + wnr1000-v2 |\ + wpn824n) status_led="netgear:green:power" ;; wp543) diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 5241db2..3b43011 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -563,7 +563,25 @@ wnr2000-v4) ucidef_set_led_switch "lan3" "LAN3" "netgear:amber:lan3" "switch0" "0x08" ucidef_set_led_switch "lan4" "LAN4" "netgear:amber:lan4" "switch0" "0x10" ucidef_set_led_usbdev "usb" "USB" "netgear:amber:status" "1-1" - ;; + ;; + +wpn824n) + ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "netgear:blue:wlan" "phy0tpt" + ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "netgear:amber:lan1" "switch0" "0x02" + ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "netgear:amber:lan2" "switch0" "0x04" + ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "netgear:amber:lan3" "switch0" "0x08" + ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" "switch0" "0x10" + ucidef_set_led_default "lan1green" "LAN1 (green)" "netgear:green:lan1" "0" + ucidef_set_led_default "lan2green" "LAN2 (green)" "netgear:green:lan2" "0" + ucidef_set_led_default "lan3green" "LAN3 (green)" "netgear:green:lan3" "0" + ucidef_set_led_default "lan4green" "LAN4 (green)" "netgear:green:lan4" "0" + ucidef_set_led_default "wan-green" "WAN (green)" "netgear:green:wan" "0" + ucidef_set_led_default "wps1" "WPS1" "netgear:blue:wps1" "0" + ucidef_set_led_default "wps2" "WPS2" "netgear:blue:wps2" "0" + ucidef_set_led_default "status" "STATUS" "netgear:amber:status" "0" + ucidef_set_led_default "test" "TEST" "netgear:amber:test" "0" + ;; wzr-hp-ag300h) ucidef_set_led_default "diag" "DIAG" "buffalo:red:diag" "0" diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 8143d2d..9a7e01e 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -230,7 +230,8 @@ wnr2000-v3 |\ wnr2000-v4 |\ wnr2200 |\ wnr612-v2 |\ -wnr1000-v2) +wnr1000-v2 |\ +wpn824n) ucidef_set_interfaces_lan_wan "eth1" "eth0" ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4" diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 0b2857d..c8b9893 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -896,6 +896,9 @@ ar71xx_board_detect() { *"WNR1000 V2") name="wnr1000-v2" ;; + *WPN824N) + name="wpn824n" + ;; *WRT160NL) name="wrt160nl" ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx index f11ea8c..113af58 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx +++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx @@ -39,6 +39,7 @@ set_preinit_iface() { wnr2200 |\ wnr612-v2 |\ wnr1000-v2 |\ + wpn824n |\ wpe72) ifname=eth1 ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 8dea48f..ea7ee27 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -401,7 +401,8 @@ platform_check_image() { wndr3700 | \ wnr2000-v3 | \ wnr612-v2 | \ - wnr1000-v2) + wnr1000-v2 | \ + wpn824n) local hw_magic hw_magic="$(ar71xx_get_mtd_part_magic firmware)" diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c index 2e14782..205c2e7 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c @@ -1,7 +1,8 @@ /* - * NETGEAR WNR2000v3/WNR612v2/WNR1000v2 board support + * NETGEAR WNR2000v3/WNR612v2/WNR1000v2/WPN824N board support * - * Copytight (C) 2013 Mathieu Olivari + * Copyright (C) 2015 Hartmut Knaack + * Copyright (C) 2013 Mathieu Olivari * Copyright (C) 2008-2009 Gabor Juhos * Copyright (C) 2008 Imre Kaloz * Copyright (C) 2008-2009 Andy Boyett @@ -15,6 +16,8 @@ #include #include +#include /* needed to disable switch LEDs */ +#include "common.h" /* needed to disable switch LEDs */ #include "dev-ap9x-pci.h" #include "dev-eth.h" @@ -34,6 +37,29 @@ #define WNR1000V2_GPIO_LED_PWR_AMBER 1 #define WNR1000V2_GPIO_LED_PWR_GREEN 11 +/* Connected through AR7240 */ +#define WPN824N_GPIO_LED_WAN_AMBER 0 +#define WPN824N_GPIO_LED_STATUS_AMBER 1 +#define WPN824N_GPIO_LED_LAN1_AMBER 6 /* AR724X_GPIO_FUNC_JTAG_DISABLE */ +#define WPN824N_GPIO_LED_LAN2_AMBER 7 /* AR724X_GPIO_FUNC_JTAG_DISABLE */ +#define WPN824N_GPIO_LED_LAN3_AMBER 8 /* AR724X_GPIO_FUNC_JTAG_DISABLE */ +#define WPN824N_GPIO_LED_LAN4_AMBER 12 +#define WPN824N_GPIO_LED_LAN1_GREEN 13 +#define WPN824N_GPIO_LED_LAN2_GREEN 14 +#define WPN824N_GPIO_LED_LAN3_GREEN 15 /* AR724X_GPIO_FUNC_CLK_OBS3_EN */ +#define WPN824N_GPIO_LED_LAN4_GREEN 16 +#define WPN824N_GPIO_LED_WAN_GREEN 17 + +/* Connected through AR9285 */ +#define WPN824N_WGPIO_LED_PWR_GREEN 0 +#define WPN824N_WGPIO_LED_WLAN_BLUE 1 +#define WPN824N_WGPIO_LED_WPS1_BLUE 5 +#define WPN824N_WGPIO_LED_WPS2_BLUE 9 +#define WPN824N_WGPIO_LED_TEST_AMBER 10 +#define WPN824N_WGPIO_BTN_PUSH 6 /* currently unused */ +#define WPN824N_WGPIO_BTN_RESET 7 /* currently unused */ +#define WPN824N_WGPIO_BTN_WLAN 8 /* currently unused */ + #define WNR2000V3_KEYS_POLL_INTERVAL 20 /* msecs */ #define WNR2000V3_KEYS_DEBOUNCE_INTERVAL (3 * WNR2000V3_KEYS_POLL_INTERVAL) @@ -73,6 +99,78 @@ static struct gpio_led wnr1000v2_leds_gpio[] __initdata = { } }; +static struct gpio_led wpn824n_leds_gpio[] __initdata = { + { + .name = "netgear:amber:wan", + .gpio = WPN824N_GPIO_LED_WAN_AMBER, + .active_low = 1, + }, { + .name = "netgear:amber:status", + .gpio = WPN824N_GPIO_LED_STATUS_AMBER, + .active_low = 1, + }, { + .name = "netgear:amber:lan1", + .gpio = WPN824N_GPIO_LED_LAN1_AMBER, + .active_low = 1, + }, { + .name = "netgear:amber:lan2", + .gpio = WPN824N_GPIO_LED_LAN2_AMBER, + .active_low = 1, + }, { + .name = "netgear:amber:lan3", + .gpio = WPN824N_GPIO_LED_LAN3_AMBER, + .active_low = 1, + }, { + .name = "netgear:amber:lan4", + .gpio = WPN824N_GPIO_LED_LAN4_AMBER, + .active_low = 1, + }, { + .name = "netgear:green:lan1", + .gpio = WPN824N_GPIO_LED_LAN1_GREEN, + .active_low = 1, + }, { + .name = "netgear:green:lan2", + .gpio = WPN824N_GPIO_LED_LAN2_GREEN, + .active_low = 1, + }, { + .name = "netgear:green:lan3", + .gpio = WPN824N_GPIO_LED_LAN3_GREEN, + .active_low = 1, + }, { + .name = "netgear:green:lan4", + .gpio = WPN824N_GPIO_LED_LAN4_GREEN, + .active_low = 1, + }, { + .name = "netgear:green:wan", + .gpio = WPN824N_GPIO_LED_WAN_GREEN, + .active_low = 1, + } +}; + +static struct gpio_led wpn824n_wmac_leds_gpio[] = { + { + .name = "netgear:green:power", + .gpio = WPN824N_WGPIO_LED_PWR_GREEN, + .active_low = 1, + }, { + .name = "netgear:blue:wlan", + .gpio = WPN824N_WGPIO_LED_WLAN_BLUE, + .active_low = 1, + }, { + .name = "netgear:blue:wps1", + .gpio = WPN824N_WGPIO_LED_WPS1_BLUE, + .active_low = 1, + }, { + .name = "netgear:blue:wps2", + .gpio = WPN824N_WGPIO_LED_WPS2_BLUE, + .active_low = 1, + }, { + .name = "netgear:amber:test", + .gpio = WPN824N_WGPIO_LED_TEST_AMBER, + .active_low = 1, + } +}; + static struct gpio_keys_button wnr2000v3_gpio_keys[] __initdata = { { .desc = "wps", @@ -138,3 +236,25 @@ static void __init wnr1000v2_setup(void) } MIPS_MACHINE(ATH79_MACH_WNR1000_V2, "WNR1000V2", "NETGEAR WNR1000 V2", wnr1000v2_setup); + +static void __init wpn824n_setup(void) +{ + ath79_gpio_function_setup(AR724X_GPIO_FUNC_JTAG_DISABLE, + AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN | + AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN | + AR724X_GPIO_FUNC_CLK_OBS3_EN); + + wnr_common_setup(); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(wpn824n_leds_gpio), + wpn824n_leds_gpio); + + ap9x_pci_setup_wmac_led_pin(0, WPN824N_WGPIO_LED_WLAN_BLUE); + ap9x_pci_setup_wmac_leds(0, wpn824n_wmac_leds_gpio, + ARRAY_SIZE(wpn824n_wmac_leds_gpio)); +} + +MIPS_MACHINE(ATH79_MACH_WPN824N, "WPN824N", "NETGEAR WPN824N", wpn824n_setup); diff --git a/target/linux/ar71xx/generic/profiles/netgear.mk b/target/linux/ar71xx/generic/profiles/netgear.mk index 16b1087..ca22a18 100644 --- a/target/linux/ar71xx/generic/profiles/netgear.mk +++ b/target/linux/ar71xx/generic/profiles/netgear.mk @@ -82,3 +82,13 @@ define Profile/WNR2200/Description endef $(eval $(call Profile,WNR2200)) + +define Profile/WPN824N + NAME:=NETGEAR WPN824N +endef + +define Profile/WPN824N/Description + Package set optimized for the NETGEAR WPN824N +endef + +$(eval $(call Profile,WPN824N)) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 4336697..07ec8dc 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1958,6 +1958,7 @@ $(eval $(call SingleProfile,Netgear,64kraw,REALWNR612V2,wnr612v2,WNR612V2,ttyS0, $(eval $(call SingleProfile,Netgear,64kraw,N150R,n150r,WNR612V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303631,N150R,"",)) $(eval $(call SingleProfile,Netgear,64kraw,REALWNR1000V2,wnr1000v2,WNR1000V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x31303031,WNR1000V2,"",)) $(eval $(call SingleProfile,Netgear,64kraw,WNR1000V2_VC,wnr1000v2-vc,WNR1000V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x31303030,WNR1000V2-VC,"",)) +$(eval $(call SingleProfile,Netgear,64kraw,WPN824N,wpn824n,WPN824N,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x31313030,WPN824N,"" NA,)) $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM2P,om2p,,,,OM2P)) $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM5P,om5p,,,,OM5P)) diff --git a/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-WPN824N.patch b/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-WPN824N.patch new file mode 100644 index 0000000..2f0c964 --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-WPN824N.patch @@ -0,0 +1,21 @@ +--- a/arch/mips/ath79/Kconfig ++++ b/arch/mips/ath79/Kconfig +@@ -741,7 +741,7 @@ config ATH79_MACH_WNR2000 + select ATH79_DEV_WMAC + + config ATH79_MACH_WNR2000_V3 +- bool "NETGEAR WNR2000 V3/WNR612 v2/WNR1000 v2 board support" ++ bool "NETGEAR WNR2000 V3/WNR612 v2/WNR1000 v2/WPN824N board support" + select SOC_AR724X + select ATH79_DEV_AP9X_PCI if PCI + select ATH79_DEV_ETH +--- a/arch/mips/ath79/machtypes.h ++++ b/arch/mips/ath79/machtypes.h +@@ -204,6 +204,7 @@ enum ath79_mach_type { + ATH79_MACH_WNR2200, /* NETGEAR WNR2200 */ + ATH79_MACH_WNR612_V2, /* NETGEAR WNR612 v2 */ + ATH79_MACH_WNR1000_V2, /* NETGEAR WNR1000 v2 */ ++ ATH79_MACH_WPN824N, /* NETGEAR WPN824N */ + ATH79_MACH_WP543, /* Compex WP543 */ + ATH79_MACH_WPE72, /* Compex WPE72 */ + ATH79_MACH_WPJ344, /* Compex WPJ344 */ diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c index 2602f98..b815869 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c @@ -252,6 +252,7 @@ static struct mtd_part_parser uimage_generic_parser = { #define FW_MAGIC_WNR1000V2_VC 0x31303030 #define FW_MAGIC_WNDR3700 0x33373030 #define FW_MAGIC_WNDR3700V2 0x33373031 +#define FW_MAGIC_WPN824N 0x31313030 static ssize_t uimage_verify_wndr3700(u_char *buf, size_t len) { @@ -266,6 +267,7 @@ static ssize_t uimage_verify_wndr3700(u_char *buf, size_t len) case FW_MAGIC_WNR2200: case FW_MAGIC_WNDR3700: case FW_MAGIC_WNDR3700V2: + case FW_MAGIC_WPN824N: break; case FW_MAGIC_WNR2000V4: expected_type = IH_TYPE_KERNEL; -- 2.7.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kaloz at openwrt.org Sun Apr 3 07:05:16 2016 From: kaloz at openwrt.org (Imre Kaloz) Date: Sun, 03 Apr 2016 13:05:16 +0200 Subject: [OpenWrt-Devel] [PATCH 0/8] [ipq806x] Add basic support for Linksys EA8500 In-Reply-To: References: Message-ID: Hi Adrian, On Sat, 02 Apr 2016 01:48:22 +0200, Adrian Panella wrote: > Hi Imre, > > networking seems to be working for me. > So far I have done only basic testing. Can access the router from lan > and wlan. > No permormance test done, though. > > If you have a repo you can share with your patchset, I could gladly > compare to take advantage of both works. I'll have time for this today, but the weird part is that comparing the dts I made and the one you submitted I see no difference when it comes to ethernet configuration. Could you post your dmesg and the contents of the devinfo partition? Thanks, Imre _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chrisrblake93 at gmail.com Sun Apr 3 10:16:49 2016 From: chrisrblake93 at gmail.com (Chris Blake) Date: Sun, 3 Apr 2016 09:16:49 -0500 Subject: [OpenWrt-Devel] Fwd: [RFC 1/2] Add support for the apm821xx Device Target In-Reply-To: References: <1459475170-1628-1-git-send-email-chrisrblake93@gmail.com> <1459475170-1628-2-git-send-email-chrisrblake93@gmail.com> Message-ID: Hello Imre, On Fri, Apr 1, 2016 at 8:32 AM, Imre Kaloz wrote: > On Fri, 01 Apr 2016 15:26:46 +0200, Chris Blake > wrote: > >> Hey Imre, >> >> On Fri, Apr 1, 2016 at 7:35 AM, Imre Kaloz wrote: >>> >>> Hi Chris, >>> >>> On Fri, 01 Apr 2016 03:46:09 +0200, Chris Blake >>> >>>> +CONFIG_BLUESTONE=y >>> >>> >>> >>> I doubt we support that here. >>> >> >> From my understanding, Bluestone is the dev board for the apm821xx, so >> for dependencies shouldn't this be selected? > > > Nope, as we don't support it. > > > Imre > I did some testing, and it seems that images fail to boot without this set in the kernel config, with the following error: [ 0.979336] Freeing unused kernel memory: 140K (c03b1000 - c03d4000) [ 0.986659] Bad trap at PC: b7e0f60c, SR: 2d000, vector=2010 [ 0.992337] init[1]: unhandled signal 5 at 00000000 nip b7e0f60c lr b7e0f5c8 code 0 [ 1.000192] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000005 [ 1.000192] [ 1.009293] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000005 [ 1.009293] It's interesting, as we select all of the same configs that are set by CONFIG_BLUESTONE [0], except for APM821xx, even though we already enable the settings set by APM821xx [1], but PPC_FPU needs to be selected by a config to be enabled [2]. Because of this, I believe for the apm821xx target we will need to leave this selected unless you have any ideas. We could do a kernel patch to add a new CONFIG_IKAREM target, but then this would need to be done for every device added to this target, which is why I think just leaving CONFIG_BLUESTONE enabled would be the best plan of action. [0]: https://github.com/torvalds/linux/blob/v4.4/arch/powerpc/platforms/44x/Kconfig#L20 [1]: https://github.com/torvalds/linux/blob/v4.4/arch/powerpc/platforms/44x/Kconfig#L346 [2]: https://github.com/torvalds/linux/blob/v4.4/arch/powerpc/platforms/Kconfig.cputype#L169 Thanks, Chris Blake _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Sun Apr 3 10:31:17 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Sun, 3 Apr 2016 23:31:17 +0900 Subject: [OpenWrt-Devel] [PATCH] ramips: fix for Planex MZK-WDPR (lcd control gpio). Message-ID: <1459693877-12098-1-git-send-email-tochiro.srchack@gmail.com> add lcd control gpio pin for Planex MZK-WDPR. LCD board initial timming is GPIO control. Signed-off-by: YuheiOKAWA --- target/linux/ramips/dts/MZK-WDPR.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target/linux/ramips/dts/MZK-WDPR.dts b/target/linux/ramips/dts/MZK-WDPR.dts index ba9ae85..1746949 100644 --- a/target/linux/ramips/dts/MZK-WDPR.dts +++ b/target/linux/ramips/dts/MZK-WDPR.dts @@ -73,4 +73,14 @@ otg at 101c0000 { status = "okay"; }; + + gpio-export { + compatible = "gpio-export"; + + lcd_ctrl1 { + gpio-export,name = "lcd_ctrl1"; + gpio-export,output = <0>; + gpios = <&gpio0 1 0>; + }; + }; }; -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From damian.kaczkowski at gmail.com Sun Apr 3 10:44:41 2016 From: damian.kaczkowski at gmail.com (Damian Kaczkowski) Date: Sun, 3 Apr 2016 16:44:41 +0200 Subject: [OpenWrt-Devel] syn_flood v/s synflood_protect in firewall default config In-Reply-To: <003401d18b10$8e7e8950$ab7b9bf0$@codeaurora.org> References: <003401d18b10$8e7e8950$ab7b9bf0$@codeaurora.org> Message-ID: On 31 March 2016 at 07:45, Naresh Kumar Mehta wrote: > From https://wiki.openwrt.org/doc/uci/firewall, syn_flood is obsoleted by > synflood_protect but I still see syn_flood in > https://dev.openwrt.org/browser/trunk/package/network/config/firewall/files/firewall.config. > Does it mean we missed to update default value in firewall.config or > documentation is going faster than code. > +1 I spot that too a while ago. This should be clarified by devs. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Sun Apr 3 13:01:28 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Sun, 3 Apr 2016 19:01:28 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: fix nondeterministic hangs during bootconsole/console handover Message-ID: <14a3dd3be7ac46153d18908fe73cdbdf4b12e67c.1459702794.git.mschiffer@universe-factory.net> Reconfiguring the UART when the FIFO is not empty may cause the boot to hang. This hang is extremely suspectible to timing differences; recompiling the kernel with the same configuration, but different UTS_VERSION timestamps can yield images that hang more or less often. Sometimes images are produced that hang reproducibly. This patch should also make it into one of the next linux-stable releases, but it's better to get this fixed as soon as possible. Fixes #21773, #21857. Signed-off-by: Matthias Schiffer --- CC is affected as well (and the patch applies cleanly to 3.18.x). ...make-bootconsole-wait-for-both-THRE-and-T.patch | 54 ++++++++++++++++++++++ ...make-bootconsole-wait-for-both-THRE-and-T.patch | 54 ++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.1/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch create mode 100644 target/linux/ar71xx/patches-4.4/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch diff --git a/target/linux/ar71xx/patches-4.1/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch b/target/linux/ar71xx/patches-4.1/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch new file mode 100644 index 0000000..7be14ab --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch @@ -0,0 +1,54 @@ +From f1ba020af5076172c9d29006a747ccf40027fedc Mon Sep 17 00:00:00 2001 +Message-Id: +From: Matthias Schiffer +Date: Thu, 24 Mar 2016 15:34:05 +0100 +Subject: [PATCH] MIPS: ath79: make bootconsole wait for both THRE and TEMT + +This makes the ath79 bootconsole behave the same way as the generic 8250 +bootconsole. + +Also waiting for TEMT (transmit buffer is empty) instead of just THRE +(transmit buffer is not full) ensures that all characters have been +transmitted before the real serial driver starts reconfiguring the serial +controller (which would sometimes result in garbage being transmitted.) +This change does not cause a visible performance loss. + +In addition, this seems to fix a hang observed in certain configurations on +many AR7xxx/AR9xxx SoCs during autoconfig of the real serial driver. + +A more complete follow-up patch will disable 8250 autoconfig for ath79 +altogether (the serial controller is detected as a 16550A, which is not +fully compatible with the ath79 serial, and the autoconfig may lead to +undefined behavior on ath79.) + +Cc: +Signed-off-by: Matthias Schiffer +--- + arch/mips/ath79/early_printk.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/arch/mips/ath79/early_printk.c b/arch/mips/ath79/early_printk.c +index b955faf..d1adc59 100644 +--- a/arch/mips/ath79/early_printk.c ++++ b/arch/mips/ath79/early_printk.c +@@ -31,13 +31,15 @@ static inline void prom_putchar_wait(void __iomem *reg, u32 mask, u32 val) + } while (1); + } + ++#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) ++ + static void prom_putchar_ar71xx(unsigned char ch) + { + void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE)); + +- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE); ++ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY); + __raw_writel(ch, base + UART_TX * 4); +- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE); ++ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY); + } + + static void prom_putchar_ar933x(unsigned char ch) +-- +2.7.4 + diff --git a/target/linux/ar71xx/patches-4.4/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch b/target/linux/ar71xx/patches-4.4/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch new file mode 100644 index 0000000..7be14ab --- /dev/null +++ b/target/linux/ar71xx/patches-4.4/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch @@ -0,0 +1,54 @@ +From f1ba020af5076172c9d29006a747ccf40027fedc Mon Sep 17 00:00:00 2001 +Message-Id: +From: Matthias Schiffer +Date: Thu, 24 Mar 2016 15:34:05 +0100 +Subject: [PATCH] MIPS: ath79: make bootconsole wait for both THRE and TEMT + +This makes the ath79 bootconsole behave the same way as the generic 8250 +bootconsole. + +Also waiting for TEMT (transmit buffer is empty) instead of just THRE +(transmit buffer is not full) ensures that all characters have been +transmitted before the real serial driver starts reconfiguring the serial +controller (which would sometimes result in garbage being transmitted.) +This change does not cause a visible performance loss. + +In addition, this seems to fix a hang observed in certain configurations on +many AR7xxx/AR9xxx SoCs during autoconfig of the real serial driver. + +A more complete follow-up patch will disable 8250 autoconfig for ath79 +altogether (the serial controller is detected as a 16550A, which is not +fully compatible with the ath79 serial, and the autoconfig may lead to +undefined behavior on ath79.) + +Cc: +Signed-off-by: Matthias Schiffer +--- + arch/mips/ath79/early_printk.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/arch/mips/ath79/early_printk.c b/arch/mips/ath79/early_printk.c +index b955faf..d1adc59 100644 +--- a/arch/mips/ath79/early_printk.c ++++ b/arch/mips/ath79/early_printk.c +@@ -31,13 +31,15 @@ static inline void prom_putchar_wait(void __iomem *reg, u32 mask, u32 val) + } while (1); + } + ++#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) ++ + static void prom_putchar_ar71xx(unsigned char ch) + { + void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE)); + +- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE); ++ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY); + __raw_writel(ch, base + UART_TX * 4); +- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE); ++ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY); + } + + static void prom_putchar_ar933x(unsigned char ch) +-- +2.7.4 + -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ianchi74 at outlook.com Sun Apr 3 13:12:14 2016 From: ianchi74 at outlook.com (Adrian Panella) Date: Sun, 3 Apr 2016 12:12:14 -0500 Subject: [OpenWrt-Devel] [PATCH 0/8] [ipq806x] Add basic support for Linksys EA8500 In-Reply-To: References: Message-ID: Hi Imre, here I attach devinfo and dmseg. I also copy kernel log, as I do have a warning with pcie2 there. Its unrelated to ethernet, but I'm still trying to fix it: DEVINFO: root at OpenWrt:/# cat /dev/mtd12 cert_region=US default_passphrase=8mh3mb6wyq default_ssid=Linksys05820 deviceType=urn:home-linksys-com:device:Router:1 devinfo_version=20140721.1 hw_mac_addr=C0:56:27:27:1F:D9 hw_revision=1 hw_version=XB manufacturer=Linksys, LLC manufacturerURL=http://www.linksys.com manufacturer_date=2015/09/19 mfg_data_version=1 modelDescription=Simultaneous Dual-Band Wireless-AC Gigabit Router modelNumber=EA8500 serial_number=16T10C69505820 sw_version=v0.0.6 tc_passphrase=8mH3Mb6wYQCZYH2EkRLtUYwKu0OvMP6TCMWWxbTT1d0Xs2kbR5UvdODVNZQjzVA tc_ssid=15c8lkbrZDC7wyifIUHDJrSyBFjnGDfF uuid_key=0246C456-1DD3-11B2-8B16-C05627271FD9 wps_device_pin=61700710 DMSEG: Thu Mar 31 06:35:08 2016 kern.info kernel: [ 4.986273] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver Thu Mar 31 06:35:08 2016 kern.info kernel: [ 4.989103] ohci-platform: OHCI generic platform driver Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.491133] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.491180] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.495790] xhci-hcd xhci-hcd.0.auto: irq 142, io mem 0x11000000 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.503686] hub 1-0:1.0: USB hub found Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.509340] hub 1-0:1.0: 1 port detected Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.513180] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.516955] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.522807] hub 2-0:1.0: USB hub found Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.529815] hub 2-0:1.0: 1 port detected Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.533956] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.537710] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.543244] xhci-hcd xhci-hcd.1.auto: irq 237, io mem 0x10000000 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.550992] hub 3-0:1.0: USB hub found Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.556861] hub 3-0:1.0: 1 port detected Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.560562] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.564502] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.570216] hub 4-0:1.0: USB hub found Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.577354] hub 4-0:1.0: 1 port detected Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 5.581928] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wps[0]' - status (0) Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 5.581941] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/power[0]' - status (0) Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 5.581952] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wifi[0]' - status (0) Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 5.581965] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wps[0]' - status (0) Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 5.582061] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/power[0]' - status (0) Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 5.582134] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wifi[0]' - status (0) Thu Mar 31 06:35:08 2016 kern.info kernel: [ 5.583619] usbcore: registered new interface driver usb-storage Thu Mar 31 06:35:08 2016 user.info kernel: [ 5.743345] init: - preinit - Thu Mar 31 06:35:08 2016 kern.notice kernel: [ 9.218507] UBIFS: background thread "ubifs_bgt0_1" started, PID 81 Thu Mar 31 06:35:08 2016 kern.notice kernel: [ 9.352817] UBIFS: recovery needed Thu Mar 31 06:35:08 2016 kern.notice kernel: [ 9.543046] UBIFS: recovery completed Thu Mar 31 06:35:08 2016 kern.notice kernel: [ 9.543158] UBIFS: mounted UBI device 0, volume 1, name "rootfs_data" Thu Mar 31 06:35:08 2016 kern.notice kernel: [ 9.545828] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes Thu Mar 31 06:35:08 2016 kern.notice kernel: [ 9.552169] UBIFS: FS size: 12951552 bytes (12 MiB, 102 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs) Thu Mar 31 06:35:08 2016 kern.notice kernel: [ 9.561425] UBIFS: reserved for root: 611733 bytes (597 KiB) Thu Mar 31 06:35:08 2016 kern.notice kernel: [ 9.570876] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 04F095CF-14F0-454E-ABCB-3C9ABB91DB4F, small LPT model Thu Mar 31 06:35:08 2016 user.info kernel: [ 9.583292] mount_root: switching to jffs2 overlay Thu Mar 31 06:35:08 2016 user.info kernel: [ 9.951259] procd: - early - Thu Mar 31 06:35:08 2016 user.info kernel: [ 9.951321] procd: - watchdog - Thu Mar 31 06:35:08 2016 user.info kernel: [ 10.605817] procd: - ubus - Thu Mar 31 06:35:08 2016 user.info kernel: [ 11.645716] procd: - init - Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.150493] ntfs: driver 2.1.31 [Flags: R/O MODULE]. Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.153531] tun: Universal TUN/TAP device driver, 1.6 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.154518] tun: (C) 1999-2004 Max Krasnyansky Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.163300] ip6_tables: (C) 2000-2006 Netfilter Core Team Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.171856] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.171882] Backport generated by backports.git backports-20151218-0-g2f58d9d Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.194478] ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142) Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.195227] ath10k_pci 0000:01:00.0: pci irq msi interrupts 1 irq_mode 0 reset_mode 0 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.496257] ath10k_pci 0000:01:00.0: qca99x0 hw2.0 target 0x01000000 chip_id 0x003b01ff sub 168c:0002 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.496295] ath10k_pci 0000:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 12.505943] ath10k_pci 0000:01:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01 Thu Mar 31 06:35:08 2016 kern.warn kernel: [ 14.552433] ath10k_pci 0000:01:00.0: unable to read from the device Thu Mar 31 06:35:08 2016 kern.err kernel: [ 14.552460] ath10k_pci 0000:01:00.0: could not execute otp for board id check: -110 Thu Mar 31 06:35:08 2016 kern.err kernel: [ 14.557502] ath10k_pci 0000:01:00.0: failed to get board id from otp: -110 Thu Mar 31 06:35:08 2016 kern.err kernel: [ 14.557502] , ignored Thu Mar 31 06:35:08 2016 kern.err kernel: [ 14.565674] ath10k_pci 0000:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0040,subsystem-vendor=168c,subsystem-device=0002 from ath10k/QCA99X0/hw2.0/board-2.bin Thu Mar 31 06:35:08 2016 kern.info kernel: [ 14.584024] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 7e56fd07 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 15.978250] ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1 Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 16.035623] ath: EEPROM regdomain: 0x0 Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 16.035630] ath: EEPROM indicates default country code should be used Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 16.035636] ath: doing EEPROM country->regdmn map search Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 16.035644] ath: country maps to regdmn code: 0x3a Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 16.035651] ath: Country alpha2 being used: US Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 16.035657] ath: Regpair used: 0x3a Thu Mar 31 06:35:08 2016 kern.info kernel: [ 16.039332] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142) Thu Mar 31 06:35:08 2016 kern.info kernel: [ 16.040106] ath10k_pci 0001:01:00.0: pci irq msi interrupts 1 irq_mode 0 reset_mode 0 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 16.175838] ath10k_pci 0001:01:00.0: qca99x0 hw2.0 target 0x01000000 chip_id 0x003b01ff sub 168c:0002 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 16.175874] ath10k_pci 0001:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 16.185739] ath10k_pci 0001:01:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01 Thu Mar 31 06:35:08 2016 kern.warn kernel: [ 18.232442] ath10k_pci 0001:01:00.0: unable to read from the device Thu Mar 31 06:35:08 2016 kern.err kernel: [ 18.232468] ath10k_pci 0001:01:00.0: could not execute otp for board id check: -110 Thu Mar 31 06:35:08 2016 kern.err kernel: [ 18.237510] ath10k_pci 0001:01:00.0: failed to get board id from otp: -110 Thu Mar 31 06:35:08 2016 kern.err kernel: [ 18.237510] , ignored Thu Mar 31 06:35:08 2016 kern.err kernel: [ 18.245347] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0040,subsystem-vendor=168c,subsystem-device=0002 from ath10k/QCA99X0/hw2.0/board-2.bin Thu Mar 31 06:35:08 2016 kern.info kernel: [ 18.254712] ath10k_pci 0001:01:00.0: board_file api 1 bmi_id N/A crc32 7e56fd07 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.653687] ath10k_pci 0001:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1 Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 19.716178] ath: EEPROM regdomain: 0x0 Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 19.716186] ath: EEPROM indicates default country code should be used Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 19.716193] ath: doing EEPROM country->regdmn map search Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 19.716202] ath: country maps to regdmn code: 0x3a Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 19.716209] ath: Country alpha2 being used: US Thu Mar 31 06:35:08 2016 kern.debug kernel: [ 19.716215] ath: Regpair used: 0x3a Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.724461] u32 classifier Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.724481] input device check on Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.726054] Actions configured Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.730701] Mirror/redirect action on Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.736119] nf_conntrack version 0.5.0 (7523 buckets, 30092 max) Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.739611] ip_tables: (C) 2000-2006 Netfilter Core Team Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.824663] usbcore: registered new interface driver ums-alauda Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.825346] usbcore: registered new interface driver ums-cypress Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.830068] usbcore: registered new interface driver ums-datafab Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.836357] usbcore: registered new interface driver ums-freecom Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.842383] usbcore: registered new interface driver ums-isd200 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.848303] usbcore: registered new interface driver ums-jumpshot Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.853992] usbcore: registered new interface driver ums-karma Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.860325] usbcore: registered new interface driver ums-sddr09 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.866016] usbcore: registered new interface driver ums-sddr55 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.871818] usbcore: registered new interface driver ums-usbat Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.889070] xt_time: kernel timezone is -0000 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.893315] PPP generic driver version 2.4.2 Thu Mar 31 06:35:08 2016 kern.info kernel: [ 19.894029] NET: Registered protocol family 24 Thu Mar 31 06:35:09 2016 user.notice : 'radio0' is disabled Thu Mar 31 06:35:09 2016 user.notice : 'radio1' is disabled Thu Mar 31 06:35:09 2016 user.notice : 'radio0' is disabled Thu Mar 31 06:35:09 2016 user.notice : 'radio1' is disabled Thu Mar 31 06:35:09 2016 authpriv.info dropbear[542]: Not backgrounding Thu Mar 31 06:35:09 2016 kern.info kernel: [ 22.945241] eth0: device MAC address 00:06:3b:01:41:00 Thu Mar 31 06:35:09 2016 kern.info kernel: [ 22.960202] device eth0.1 entered promiscuous mode Thu Mar 31 06:35:09 2016 kern.info kernel: [ 22.960226] device eth0 entered promiscuous mode Thu Mar 31 06:35:09 2016 kern.info kernel: [ 22.967086] br-lan: port 1(eth0.1) entered forwarding state Thu Mar 31 06:35:09 2016 kern.info kernel: [ 22.968679] br-lan: port 1(eth0.1) entered forwarding state Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'lan' is enabled Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'lan' is setting up now Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'lan' is now up Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'loopback' is enabled Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'loopback' is setting up now Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'loopback' is now up Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'wan' is enabled Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'wan6' is enabled Thu Mar 31 06:35:09 2016 daemon.notice netifd: Bridge 'br-lan' link is up Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'lan' has link connectivity Thu Mar 31 06:35:09 2016 daemon.notice netifd: Network device 'eth0' link is up Thu Mar 31 06:35:09 2016 daemon.notice netifd: VLAN 'eth0.1' link is up Thu Mar 31 06:35:09 2016 daemon.notice netifd: Network device 'lo' link is up Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'loopback' has link connectivity Thu Mar 31 06:35:09 2016 daemon.notice netifd: VLAN 'eth0.2' link is up Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'wan' has link connectivity Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'wan' is setting up now Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'wan6' has link connectivity Thu Mar 31 06:35:09 2016 daemon.notice netifd: Interface 'wan6' is setting up now Thu Mar 31 06:35:10 2016 daemon.notice netifd: wan (677): udhcpc (v1.24.1) started Thu Mar 31 06:35:10 2016 daemon.notice netifd: wan (677): Sending discover... Thu Mar 31 06:35:10 2016 daemon.err insmod: module is already loaded - xt_multiport Thu Mar 31 06:35:10 2016 daemon.err insmod: module is already loaded - xt_comment Thu Mar 31 06:35:10 2016 daemon.err insmod: module is already loaded - xt_length Thu Mar 31 06:35:10 2016 user.notice firewall: Reloading firewall due to ifup of lan (br-lan) Thu Mar 31 06:35:11 2016 daemon.err insmod: module is already loaded - xt_multiport Thu Mar 31 06:35:11 2016 daemon.err insmod: module is already loaded - xt_comment Thu Mar 31 06:35:11 2016 daemon.err insmod: module is already loaded - xt_length Thu Mar 31 06:35:11 2016 kern.info kernel: [ 24.942486] ipq806x-gmac-dwmac 37200000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off Thu Mar 31 06:35:11 2016 kern.info kernel: [ 24.962260] br-lan: port 1(eth0.1) entered forwarding state Thu Mar 31 06:35:12 2016 user.notice : mv: can't rename '/etc/collectd.conf': Invalid argument Thu Mar 31 06:35:12 2016 user.notice : ln: /etc/collectd.conf: File exists Thu Mar 31 06:35:13 2016 daemon.info procd: - init complete - Thu Mar 31 06:35:13 2016 daemon.notice netifd: wan (677): Sending discover... Thu Mar 31 06:35:13 2016 daemon.warn odhcpd[500]: DHCPV6 SOLICIT IA_NA from 000476e1971449c37edcc8e5bdb7340357e9 on br-lan: ok fd7e:151:2a7f::eec/128 Thu Mar 31 06:35:14 2016 daemon.warn odhcpd[500]: DHCPV6 REQUEST IA_NA from 000476e1971449c37edcc8e5bdb7340357e9 on br-lan: ok fd7e:151:2a7f::eec/128 Thu Mar 31 06:35:16 2016 daemon.notice netifd: wan (677): Sending discover... Thu Mar 31 06:35:23 2016 daemon.warn odhcpd[500]: DHCPV6 SOLICIT IA_NA from 000100011c3ca12c6451069fdb33 on br-lan: ok fd7e:151:2a7f::78c/128 Thu Mar 31 06:35:33 2016 daemon.info dnsmasq[1168]: started, version 2.75 cachesize 150 Thu Mar 31 06:35:33 2016 daemon.info dnsmasq[1168]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC loop-detect inotify Thu Mar 31 06:35:33 2016 daemon.info dnsmasq[1168]: DNS service limited to local subnets Thu Mar 31 06:35:33 2016 daemon.info dnsmasq-dhcp[1168]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h Thu Mar 31 06:35:33 2016 daemon.info dnsmasq[1168]: using nameserver 10.190.2.50#53 Thu Mar 31 06:35:33 2016 daemon.info dnsmasq[1168]: using local addresses only for domain lan Thu Mar 31 06:35:33 2016 daemon.warn dnsmasq[1168]: no servers found in /tmp/resolv.conf.auto, will retry Thu Mar 31 06:35:33 2016 daemon.info dnsmasq[1168]: read /etc/hosts - 4 addresses Thu Mar 31 06:35:33 2016 daemon.info dnsmasq[1168]: read /tmp/hosts/dhcp - 1 addresses Thu Mar 31 06:35:33 2016 daemon.info dnsmasq-dhcp[1168]: read /etc/ethers - 0 addresses Thu Mar 31 06:35:41 2016 daemon.info dnsmasq-dhcp[1168]: DHCPDISCOVER(br-lan) 10.0.2.15 08:00:27:da:9d:50 Thu Mar 31 06:35:41 2016 daemon.info dnsmasq-dhcp[1168]: DHCPOFFER(br-lan) 192.168.1.148 08:00:27:da:9d:50 Thu Mar 31 06:35:41 2016 daemon.info dnsmasq-dhcp[1168]: DHCPREQUEST(br-lan) 192.168.1.148 08:00:27:da:9d:50 Thu Mar 31 06:35:41 2016 daemon.info dnsmasq-dhcp[1168]: DHCPACK(br-lan) 192.168.1.148 08:00:27:da:9d:50 adrian-VirtualBox Thu Mar 31 06:35:55 2016 daemon.info dnsmasq-dhcp[1168]: DHCPDISCOVER(br-lan) 64:51:06:9f:db:33 Thu Mar 31 06:35:55 2016 daemon.info dnsmasq-dhcp[1168]: DHCPOFFER(br-lan) 192.168.1.159 64:51:06:9f:db:33 Thu Mar 31 06:35:55 2016 daemon.info dnsmasq-dhcp[1168]: DHCPREQUEST(br-lan) 192.168.1.159 64:51:06:9f:db:33 Thu Mar 31 06:35:55 2016 daemon.warn dnsmasq-dhcp[1168]: Ignoring domain ternium.techint.net for DHCP host name ternp309711 Thu Mar 31 06:35:55 2016 daemon.info dnsmasq-dhcp[1168]: DHCPACK(br-lan) 192.168.1.159 64:51:06:9f:db:33 ternp309711 Thu Mar 31 06:35:55 2016 daemon.warn odhcpd[500]: DHCPV6 SOLICIT IA_NA from 000100011c3ca12c6451069fdb33 on br-lan: ok fd7e:151:2a7f::78c/128 Thu Mar 31 06:35:55 2016 daemon.warn odhcpd[500]: DHCPV6 REQUEST IA_NA from 000100011c3ca12c6451069fdb33 on br-lan: ok fd7e:151:2a7f::78c/128 Thu Mar 31 06:35:55 2016 daemon.info dnsmasq[1168]: read /etc/hosts - 4 addresses Thu Mar 31 06:35:55 2016 daemon.info dnsmasq[1168]: read /tmp/hosts/odhcpd - 2 addresses Thu Mar 31 06:35:55 2016 daemon.info dnsmasq[1168]: read /tmp/hosts/dhcp - 1 addresses Thu Mar 31 06:35:55 2016 daemon.info dnsmasq-dhcp[1168]: read /etc/ethers - 0 addresses Thu Mar 31 06:35:55 2016 daemon.info dnsmasq[1168]: read /etc/hosts - 4 addresses Thu Mar 31 06:35:55 2016 daemon.info dnsmasq[1168]: read /tmp/hosts/odhcpd - 2 addresses Thu Mar 31 06:35:55 2016 daemon.info dnsmasq[1168]: read /tmp/hosts/dhcp - 1 addresses Thu Mar 31 06:35:55 2016 daemon.info dnsmasq-dhcp[1168]: read /etc/ethers - 0 addresses Thu Mar 31 06:35:58 2016 daemon.info dnsmasq-dhcp[1168]: DHCPINFORM(br-lan) 192.168.1.159 64:51:06:9f:db:33 Thu Mar 31 06:35:58 2016 daemon.info dnsmasq-dhcp[1168]: DHCPACK(br-lan) 192.168.1.159 64:51:06:9f:db:33 ternp309711 KLOG [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 3.18.26 (adrian at adrian-VirtualBox) (gcc version 5.2.0 (OpenWrt GCC 5.2.0 r48754) ) #5 SMP PREEMPT Thu Mar 31 19:26:30 UTC 2016 [ 0.000000] CPU: ARMv7 Processor [512f04d0] revision 0 (ARMv7), cr=10c5787d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache [ 0.000000] Machine model: Linksys EA8500 WiFi Router [ 0.000000] Ignoring memory range 0x41500000 - 0x42000000 [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] On node 0 totalpages: 122880 [ 0.000000] free_area_init_node: node 0, pgdat c0729d80, node_mem_map ddc39000 [ 0.000000] Normal zone: 960 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 122880 pages, LIFO batch:31 [ 0.000000] PERCPU: Embedded 9 pages/cpu @ddc16000 s7360 r8192 d21312 u36864 [ 0.000000] pcpu-alloc: s7360 r8192 d21312 u36864 alloc=9*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 121920 [ 0.000000] Kernel command line: console=ttyMSM0,115200n8 mangled_rootblock=16 [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Memory: 481332K/491520K available (3566K kernel code, 258K rwdata, 1448K rodata, 192K init, 290K bss, 10188K reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xffe00000 (2048 kB) [ 0.000000] vmalloc : 0xde800000 - 0xff000000 ( 520 MB) [ 0.000000] lowmem : 0xc0000000 - 0xde000000 ( 480 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0208000 - 0xc06eddf0 (5016 kB) [ 0.000000] .init : 0xc06ee000 - 0xc071e000 ( 192 kB) [ 0.000000] .data : 0xc071e000 - 0xc075e8d0 ( 259 kB) [ 0.000000] .bss : 0xc075e8d0 - 0xc07a7110 ( 291 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 [ 0.000000] NR_IRQS:16 nr_irqs:16 16 [ 0.000009] sched_clock: 32 bits at 6MHz, resolution 160ns, wraps every 687194767200ns [ 0.000025] Switching to timer-based delay loop, resolution 160ns [ 0.000179] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS (lpj=62500) [ 0.000202] pid_max: default: 32768 minimum: 301 [ 0.000361] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000379] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000987] CPU: Testing write buffer coherency: ok [ 0.001274] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.001788] Setting up static identity map for 0x422129c8 - 0x42212a20 [ 0.084119] CPU1: Booted secondary processor [ 0.084245] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.084363] Brought up 2 CPUs [ 0.084386] SMP: Total of 2 processors activated (25.00 BogoMIPS). [ 0.084396] CPU: All CPU(s) started in SVC mode. [ 0.098321] VFP support v0.3: implementor 51 architecture 0 part 4d variant 2 rev 0 [ 0.098843] pinctrl core: initialized pinctrl subsystem [ 0.099309] regulator-dummy: no parameters [ 0.107261] NET: Registered protocol family 16 [ 0.107538] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.134566] cpuidle: using governor ladder [ 0.165583] cpuidle: using governor menu [ 0.179486] gpiochip_add: registered GPIOs 0 to 68 on device: 800000.pinmux [ 0.179508] GPIO chip 800000.pinmux: created GPIO range 0->68 ==> 800000.pinmux PIN 0->68 [ 0.181128] qcom_rpm 108000.rpm: RPM firmware 3.0.16777342 [ 0.181198] qcom_rpm 108000.rpm: failed to mark ack irq as wakeup [ 0.181263] qcom_rpm 108000.rpm: failed to mark wakeup irq as wakeup [ 0.208949] smb208-s1a: 1050 <--> 1150 mV [ 0.209315] smb208-s1b: 1050 <--> 1150 mV [ 0.209658] smb208-s2a: 800 <--> 1250 mV [ 0.210027] smb208-s2b: 800 <--> 1250 mV [ 0.210549] pps_core: LinuxPPS API ver. 1 registered [ 0.210564] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [ 0.210611] PTP clock support registered [ 0.212055] Switched to clocksource dg_timer [ 0.213658] NET: Registered protocol family 2 [ 0.214464] TCP established hash table entries: 4096 (order: 2, 16384 bytes) [ 0.214506] TCP bind hash table entries: 4096 (order: 3, 32768 bytes) [ 0.214561] TCP: Hash tables configured (established 4096 bind 4096) [ 0.214610] TCP: reno registered [ 0.214634] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.214657] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.214907] NET: Registered protocol family 1 [ 0.214986] PCI: CLS 0 bytes, default 64 [ 0.216467] futex hash table entries: 512 (order: 3, 32768 bytes) [ 0.225580] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.225612] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.226614] msgmni has been set to 940 [ 0.228289] io scheduler noop registered [ 0.228314] io scheduler deadline registered (default) [ 0.229745] qcom-pcie 1b500000.pci: GPIO lookup for consumer perst [ 0.229764] qcom-pcie 1b500000.pci: using device tree for GPIO lookup [ 0.229785] of_get_named_gpiod_flags: can't parse 'perst-gpios' property of node '/soc/pci at 1b500000[0]' [ 0.229812] of_get_named_gpiod_flags: parsed 'perst-gpio' property of node '/soc/pci at 1b500000[0]' - status (0) [ 0.229883] 1b500000.pci supply vdda not found, using dummy regulator [ 0.229983] 1b500000.pci supply vdda_phy not found, using dummy regulator [ 0.230072] 1b500000.pci supply vdda_refclk not found, using dummy regulator [ 0.260175] qcom-pcie 1b500000.pci: PCI host bridge to bus 0000:00 [ 0.260200] pci_bus 0000:00: root bus resource [io 0xfe00000-0xfffff] (bus address [0x1fc00000-0xfefffff]) [ 0.260217] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fdfffff] [ 0.260236] pci_bus 0000:00: root bus resource [bus 00-ff] [ 0.260294] pci 0000:00:00.0: [17cb:0101] type 01 class 0x060400 [ 0.260452] pci 0000:00:00.0: supports D1 [ 0.260468] pci 0000:00:00.0: PME# supported from D0 D1 D3hot [ 0.260836] PCI: bus0: Fast back to back transfers disabled [ 0.261215] pci 0000:01:00.0: [168c:0040] type 00 class 0x028000 [ 0.261428] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit] [ 0.262498] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold [ 0.262955] PCI: bus1: Fast back to back transfers disabled [ 0.262979] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01 [ 0.263156] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x081fffff] [ 0.263183] pci 0000:01:00.0: BAR 0: assigned [mem 0x08000000-0x081fffff 64bit] [ 0.263300] pci 0000:00:00.0: PCI bridge to [bus 01] [ 0.263326] pci 0000:00:00.0: bridge window [mem 0x08000000-0x081fffff] [ 0.263871] aer 0000:00:00.0:pcie02: service driver aer loaded [ 0.264186] qcom-pcie 1b700000.pci: GPIO lookup for consumer perst [ 0.264203] qcom-pcie 1b700000.pci: using device tree for GPIO lookup [ 0.264220] of_get_named_gpiod_flags: can't parse 'perst-gpios' property of node '/soc/pci at 1b700000[0]' [ 0.264242] of_get_named_gpiod_flags: parsed 'perst-gpio' property of node '/soc/pci at 1b700000[0]' - status (0) [ 0.264312] 1b700000.pci supply vdda not found, using dummy regulator [ 0.264409] 1b700000.pci supply vdda_phy not found, using dummy regulator [ 0.264501] 1b700000.pci supply vdda_refclk not found, using dummy regulator [ 0.294614] qcom-pcie 1b700000.pci: PCI host bridge to bus 0001:00 [ 0.294638] pci_bus 0001:00: root bus resource [io 0x31e10000-0xfffff] (bus address [0x63c00000-0x31eeffff]) [ 0.294654] pci_bus 0001:00: root bus resource [mem 0x2e000000-0x31dfffff] [ 0.294671] pci_bus 0001:00: root bus resource [bus 00-ff] [ 0.294724] pci 0001:00:00.0: [17cb:0101] type 01 class 0x060400 [ 0.294858] pci 0001:00:00.0: supports D1 [ 0.294873] pci 0001:00:00.0: PME# supported from D0 D1 D3hot [ 0.295216] PCI: bus0: Fast back to back transfers disabled [ 0.295574] pci 0001:01:00.0: [168c:0040] type 00 class 0x028000 [ 0.295781] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit] [ 0.296759] pci 0001:01:00.0: PME# supported from D0 D3hot D3cold [ 0.297212] PCI: bus1: Fast back to back transfers disabled [ 0.297232] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01 [ 0.297474] pci 0001:00:00.0: BAR 8: assigned [mem 0x2e000000-0x2e1fffff] [ 0.297498] pci 0001:01:00.0: BAR 0: assigned [mem 0x2e000000-0x2e1fffff 64bit] [ 0.297610] pci 0001:00:00.0: PCI bridge to [bus 01] [ 0.297631] pci 0001:00:00.0: bridge window [mem 0x2e000000-0x2e1fffff] [ 0.298077] aer 0001:00:00.0:pcie02: service driver aer loaded [ 0.298384] qcom-pcie 1b900000.pci: GPIO lookup for consumer perst [ 0.298402] qcom-pcie 1b900000.pci: using device tree for GPIO lookup [ 0.298420] of_get_named_gpiod_flags: can't parse 'perst-gpios' property of node '/soc/pci at 1b900000[0]' [ 0.298441] of_get_named_gpiod_flags: parsed 'perst-gpio' property of node '/soc/pci at 1b900000[0]' - status (0) [ 0.298513] 1b900000.pci supply vdda not found, using dummy regulator [ 0.298606] 1b900000.pci supply vdda_phy not found, using dummy regulator [ 0.298690] 1b900000.pci supply vdda_refclk not found, using dummy regulator [ 0.432115] qcom-pcie 1b900000.pci: link initialization failed [ 0.433942] ------------[ cut here ]------------ [ 0.433973] WARNING: CPU: 0 PID: 1 at drivers/clk/qcom/clk-branch.c:97 clk_branch_toggle+0x130/0x13c() [ 0.433984] pcie2_phy_clk status stuck at 'on' [ 0.433994] Modules linked in: [ 0.434024] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.18.26 #5 [ 0.434065] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 0.434093] [] (show_stack) from [] (dump_stack+0x84/0xc4) [ 0.434122] [] (dump_stack) from [] (warn_slowpath_common+0x6c/0x88) [ 0.434142] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [ 0.434166] [] (warn_slowpath_fmt) from [] (clk_branch_toggle+0x130/0x13c) [ 0.434200] [] (clk_branch_toggle) from [] (__clk_disable+0x4c/0x64) [ 0.434228] [] (__clk_disable) from [] (clk_disable.part.1+0x18/0x24) [ 0.434250] [] (clk_disable.part.1) from [] (qcom_pcie_disable_resources_v0+0x6c/0xb8) [ 0.434270] [] (qcom_pcie_disable_resources_v0) from [] (dw_pcie_host_init+0x5e0/0x680) [ 0.434288] [] (dw_pcie_host_init) from [] (qcom_pcie_probe+0x404/0x48c) [ 0.434308] [] (qcom_pcie_probe) from [] (platform_drv_probe+0x44/0xac) [ 0.434339] [] (platform_drv_probe) from [] (really_probe+0xd4/0x214) [ 0.434361] [] (really_probe) from [] (__driver_attach+0x74/0x98) [ 0.434382] [] (__driver_attach) from [] (bus_for_each_dev+0x4c/0xa0) [ 0.434404] [] (bus_for_each_dev) from [] (bus_add_driver+0xd8/0x1f0) [ 0.434426] [] (bus_add_driver) from [] (driver_register+0xa8/0xec) [ 0.434458] [] (driver_register) from [] (do_one_initcall+0x118/0x1f0) [ 0.434483] [] (do_one_initcall) from [] (kernel_init_freeable+0x130/0x1dc) [ 0.434513] [] (kernel_init_freeable) from [] (kernel_init+0x8/0xfc) [ 0.434535] [] (kernel_init) from [] (ret_from_fork+0x14/0x34) [ 0.434568] ---[ end trace fbd97ed824810f3a ]--- [ 0.434879] qcom-pcie 1b900000.pci: PCI host bridge to bus 0002:00 [ 0.434902] pci_bus 0002:00: root bus resource [io 0x35e20000-0xfffff] (bus address [0x6bc00000-0x35edffff]) [ 0.434918] pci_bus 0002:00: root bus resource [mem 0x32000000-0x35dfffff] [ 0.434937] pci_bus 0002:00: root bus resource [bus 00-ff] [ 0.434996] PCI: bus0: Fast back to back transfers enabled [ 0.437821] gsbi 16300000.gsbi: GSBI port protocol: 6 crci: 0 [ 0.439316] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled [ 0.440402] msm_serial 16340000.serial: msm_serial: detected port #0 [ 0.440513] msm_serial 16340000.serial: uartclk = 1843200 [ 0.440593] 16340000.serial: ttyMSM0 at MMIO 0x16340000 (irq = 184, base_baud = 115200) is a MSM [ 0.440655] msm_serial: console setup on port #0 [ 1.345164] console [ttyMSM0] enabled [ 1.349974] msm_serial: driver initialized [ 1.356078] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xa1 [ 1.357210] nand: AMD/Spansion S34MS01G2 [ 1.363817] nand: 128MiB, SLC, page size: 2048, OOB size: 64 [ 1.367630] Scanning device for bad blocks [ 1.814132] random: nonblocking pool is initialized [ 2.131491] 18 ofpart partitions found on MTD device qcom-nandc [ 2.131526] Creating 18 MTD partitions on "qcom-nandc": [ 2.136332] 0x000000000000-0x000000040000 : "SBL1" [ 2.142573] 0x000000040000-0x000000180000 : "MIBIB" [ 2.147199] 0x000000180000-0x0000002c0000 : "SBL2" [ 2.151981] 0x0000002c0000-0x000000540000 : "SBL3" [ 2.156922] 0x000000540000-0x000000660000 : "DDRCONFIG" [ 2.161609] 0x000000660000-0x000000780000 : "SSD" [ 2.166790] 0x000000780000-0x000000a00000 : "TZ" [ 2.171631] 0x000000a00000-0x000000c80000 : "RPM" [ 2.176356] 0x000000c80000-0x000000dc0000 : "art" [ 2.180871] 0x000000dc0000-0x000000ec0000 : "APPSBL" [ 2.185656] 0x000000ec0000-0x000000f00000 : "u_env" [ 2.190588] 0x000000f00000-0x000000f40000 : "s_env" [ 2.195266] 0x000000f40000-0x000000f80000 : "devinfo" [ 2.200064] 0x000000f80000-0x000003780000 : "kernel1" [ 2.205409] 0x000001280000-0x000003780000 : "rootfs1" [ 2.210361] 0x000003780000-0x000005f80000 : "kernel2" [ 2.215464] 0x000003a80000-0x000005f80000 : "ubi" [ 2.220387] 0x000005f80000-0x000008000000 : "syscfg" [ 2.226162] libphy: Fixed MDIO Bus: probed [ 2.229491] of_get_named_gpiod_flags: parsed 'gpios' property of node '/soc/mdio[0]' - status (0) [ 2.229517] of_get_named_gpiod_flags: parsed 'gpios' property of node '/soc/mdio[1]' - status (0) [ 2.229538] of_get_named_gpiod_flags: can't parse 'gpios' property of node '/soc/mdio[2]' [ 2.229683] libphy: GPIO Bitbanged MDIO: probed [ 2.254349] switch0: Atheros AR8337 rev. 2 switch registered on gpio-0 [ 2.472118] stmmac - user ID: 0x10, Synopsys ID: 0x37 [ 2.472146] Ring mode enabled [ 2.476251] DMA HW capability register supported [ 2.479098] Enhanced/Alternate descriptors [ 2.483871] Enabled extended descriptors [ 2.487865] RX Checksum Offload Engine supported (type 2) [ 2.492032] TX Checksum insertion supported [ 2.497480] Wake-Up On Lan supported [ 2.501921] Enable RX Mitigation via HW Watchdog Timer [ 2.507060] stmmac - user ID: 0x10, Synopsys ID: 0x37 [ 2.510436] Ring mode enabled [ 2.515741] DMA HW capability register supported [ 2.518593] Enhanced/Alternate descriptors [ 2.523367] Enabled extended descriptors [ 2.527360] RX Checksum Offload Engine supported (type 2) [ 2.531529] TX Checksum insertion supported [ 2.536999] Wake-Up On Lan supported [ 2.541403] Enable RX Mitigation via HW Watchdog Timer [ 2.545763] i2c /dev entries driver [ 2.551188] Speed bin: 0 [ 2.553496] PVS bin: 1 [ 2.556652] platform cpufreq-krait.0: Driver cpufreq-krait requests probe deferral [ 2.560418] L2 @ QSB rate. Forcing new rate. [ 2.566244] L2 @ 387500 KHz [ 2.570471] CPU0 @ 800000 KHz [ 2.572930] CPU1 @ QSB rate. Forcing new rate. [ 2.576062] CPU1 @ 384000 KHz [ 2.580752] TCP: cubic registered [ 2.584370] NET: Registered protocol family 10 [ 2.588186] NET: Registered protocol family 17 [ 2.591073] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this. [ 2.595560] 8021q: 802.1Q VLAN Support v1.8 [ 2.608361] Registering SWP/SWPB emulation handler [ 2.621139] UBI: auto-attach mtd16 [ 2.621160] UBI: attaching mtd16 to ubi0 [ 2.996860] UBI: scanning is finished [ 3.011916] UBI: attached mtd16 (name "ubi", size 37 MiB) to ubi0 [ 3.011941] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes [ 3.017063] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 [ 3.023806] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096 [ 3.030523] UBI: good PEBs: 296, bad PEBs: 0, corrupted PEBs: 0 [ 3.037272] UBI: user volume: 2, internal volumes: 1, max. volumes count: 128 [ 3.043081] UBI: max/mean erase counter: 3/2, WL threshold: 4096, image sequence number: 1517402195 [ 3.050319] UBI: available PEBs: 0, total reserved PEBs: 296, PEBs reserved for bad PEB handling: 20 [ 3.059389] UBI: background thread "ubi_bgt0d" started, PID 44 [ 3.060304] UBI: ubiblock0_0 created from ubi0:0(rootfs) [ 3.060308] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem [ 3.060322] drivers/rtc/hctosys.c: unable to open rtc device (rtc0) [ 3.061079] device-tree: Duplicate name in testcase-data, renamed to "duplicate-name#1" [ 3.061924] ### dt-test ### start of selftest - you will see error messages [ 3.062326] /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1 [ 3.062330] /testcase-data/phandle-tests/consumer-a: could not get #phandle-cells-missing for /testcase-data/phandle-tests/provider1 [ 3.062338] /testcase-data/phandle-tests/consumer-a: could not find phandle [ 3.062346] /testcase-data/phandle-tests/consumer-a: could not find phandle [ 3.062351] /testcase-data/phandle-tests/consumer-a: arguments longer than property [ 3.062357] /testcase-data/phandle-tests/consumer-a: arguments longer than property [ 3.062945] irq: no irq domain found for /testcase-data/interrupts/intc0 ! [ 3.063991] ### dt-test ### end of selftest - 115 passed, 0 failed [ 3.171063] VFS: Mounted root (squashfs filesystem) readonly on device 254:0. [ 3.173811] Freeing unused kernel memory: 192K (c06ee000 - c071e000) [ 3.721234] init: Console is alive [ 3.721360] init: - watchdog - [ 4.541365] usbcore: registered new interface driver usbfs [ 4.541436] usbcore: registered new interface driver hub [ 4.545909] usbcore: registered new device driver usb [ 4.557716] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/wifi[0]' - status (0) [ 4.557736] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/reset[0]' - status (0) [ 4.557751] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-keys/wps[0]' - status (0) [ 4.557898] genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 355 [ 4.557987] gpio-keys gpio-keys: failed to request irq:355 for gpio:67 [ 4.564841] genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 356 [ 4.571159] gpio-keys gpio-keys: failed to request irq:356 for gpio:68 [ 4.579170] genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 353 [ 4.585575] gpio-keys gpio-keys: failed to request irq:353 for gpio:65 [ 4.595938] SCSI subsystem initialized [ 4.602500] libata version 3.00 loaded. [ 4.604735] ahci 29000000.sata: forcing PORTS_IMPL to 0x1 [ 4.604788] ahci 29000000.sata: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode [ 4.609114] ahci 29000000.sata: flags: ncq sntf pm led clo only pmp pio slum part ccc apst [ 4.618365] scsi host0: ahci_platform [ 4.626075] ata1: SATA max UDMA/133 mmio [mem 0x29000000-0x2900017f] port 0x100 irq 241 [ 4.972723] ata1: SATA link down (SStatus 0 SControl 300) [ 4.974512] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 4.977533] ehci-platform: EHCI generic platform driver [ 4.986273] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 4.989103] ohci-platform: OHCI generic platform driver [ 5.491133] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller [ 5.491180] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1 [ 5.495790] xhci-hcd xhci-hcd.0.auto: irq 142, io mem 0x11000000 [ 5.503686] hub 1-0:1.0: USB hub found [ 5.509340] hub 1-0:1.0: 1 port detected [ 5.513180] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller [ 5.516955] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2 [ 5.522807] hub 2-0:1.0: USB hub found [ 5.529815] hub 2-0:1.0: 1 port detected [ 5.533956] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller [ 5.537710] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3 [ 5.543244] xhci-hcd xhci-hcd.1.auto: irq 237, io mem 0x10000000 [ 5.550992] hub 3-0:1.0: USB hub found [ 5.556861] hub 3-0:1.0: 1 port detected [ 5.560562] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller [ 5.564502] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4 [ 5.570216] hub 4-0:1.0: USB hub found [ 5.577354] hub 4-0:1.0: 1 port detected [ 5.581928] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wps[0]' - status (0) [ 5.581941] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/power[0]' - status (0) [ 5.581952] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wifi[0]' - status (0) [ 5.581965] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wps[0]' - status (0) [ 5.582061] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/power[0]' - status (0) [ 5.582134] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio-leds/wifi[0]' - status (0) [ 5.583619] usbcore: registered new interface driver usb-storage [ 5.743345] init: - preinit - [ 9.218507] UBIFS: background thread "ubifs_bgt0_1" started, PID 81 [ 9.352817] UBIFS: recovery needed [ 9.543046] UBIFS: recovery completed [ 9.543158] UBIFS: mounted UBI device 0, volume 1, name "rootfs_data" [ 9.545828] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes [ 9.552169] UBIFS: FS size: 12951552 bytes (12 MiB, 102 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs) [ 9.561425] UBIFS: reserved for root: 611733 bytes (597 KiB) [ 9.570876] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 04F095CF-14F0-454E-ABCB-3C9ABB91DB4F, small LPT model [ 9.583292] mount_root: switching to jffs2 overlay [ 9.951259] procd: - early - [ 9.951321] procd: - watchdog - [ 10.605817] procd: - ubus - [ 11.645716] procd: - init - [ 12.150493] ntfs: driver 2.1.31 [Flags: R/O MODULE]. [ 12.153531] tun: Universal TUN/TAP device driver, 1.6 [ 12.154518] tun: (C) 1999-2004 Max Krasnyansky [ 12.163300] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 12.171856] Loading modules backported from Linux version v4.4-rc5-1913-gc8fdf68 [ 12.171882] Backport generated by backports.git backports-20151218-0-g2f58d9d [ 12.194478] ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142) [ 12.195227] ath10k_pci 0000:01:00.0: pci irq msi interrupts 1 irq_mode 0 reset_mode 0 [ 12.496257] ath10k_pci 0000:01:00.0: qca99x0 hw2.0 target 0x01000000 chip_id 0x003b01ff sub 168c:0002 [ 12.496295] ath10k_pci 0000:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1 [ 12.505943] ath10k_pci 0000:01:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01 [ 14.552433] ath10k_pci 0000:01:00.0: unable to read from the device [ 14.552460] ath10k_pci 0000:01:00.0: could not execute otp for board id check: -110 [ 14.557502] ath10k_pci 0000:01:00.0: failed to get board id from otp: -110 [ 14.557502] , ignored [ 14.565674] ath10k_pci 0000:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0040,subsystem-vendor=168c,subsystem-device=0002 from ath10k/QCA99X0/hw2.0/board-2.bin [ 14.584024] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 7e56fd07 [ 15.978250] ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1 [ 16.035623] ath: EEPROM regdomain: 0x0 [ 16.035630] ath: EEPROM indicates default country code should be used [ 16.035636] ath: doing EEPROM country->regdmn map search [ 16.035644] ath: country maps to regdmn code: 0x3a [ 16.035651] ath: Country alpha2 being used: US [ 16.035657] ath: Regpair used: 0x3a [ 16.039332] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142) [ 16.040106] ath10k_pci 0001:01:00.0: pci irq msi interrupts 1 irq_mode 0 reset_mode 0 [ 16.175838] ath10k_pci 0001:01:00.0: qca99x0 hw2.0 target 0x01000000 chip_id 0x003b01ff sub 168c:0002 [ 16.175874] ath10k_pci 0001:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1 [ 16.185739] ath10k_pci 0001:01:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01 [ 18.232442] ath10k_pci 0001:01:00.0: unable to read from the device [ 18.232468] ath10k_pci 0001:01:00.0: could not execute otp for board id check: -110 [ 18.237510] ath10k_pci 0001:01:00.0: failed to get board id from otp: -110 [ 18.237510] , ignored [ 18.245347] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0040,subsystem-vendor=168c,subsystem-device=0002 from ath10k/QCA99X0/hw2.0/board-2.bin [ 18.254712] ath10k_pci 0001:01:00.0: board_file api 1 bmi_id N/A crc32 7e56fd07 [ 19.653687] ath10k_pci 0001:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1 [ 19.716178] ath: EEPROM regdomain: 0x0 [ 19.716186] ath: EEPROM indicates default country code should be used [ 19.716193] ath: doing EEPROM country->regdmn map search [ 19.716202] ath: country maps to regdmn code: 0x3a [ 19.716209] ath: Country alpha2 being used: US [ 19.716215] ath: Regpair used: 0x3a [ 19.724461] u32 classifier [ 19.724481] input device check on [ 19.726054] Actions configured [ 19.730701] Mirror/redirect action on [ 19.736119] nf_conntrack version 0.5.0 (7523 buckets, 30092 max) [ 19.739611] ip_tables: (C) 2000-2006 Netfilter Core Team [ 19.824663] usbcore: registered new interface driver ums-alauda [ 19.825346] usbcore: registered new interface driver ums-cypress [ 19.830068] usbcore: registered new interface driver ums-datafab [ 19.836357] usbcore: registered new interface driver ums-freecom [ 19.842383] usbcore: registered new interface driver ums-isd200 [ 19.848303] usbcore: registered new interface driver ums-jumpshot [ 19.853992] usbcore: registered new interface driver ums-karma [ 19.860325] usbcore: registered new interface driver ums-sddr09 [ 19.866016] usbcore: registered new interface driver ums-sddr55 [ 19.871818] usbcore: registered new interface driver ums-usbat [ 19.889070] xt_time: kernel timezone is -0000 [ 19.893315] PPP generic driver version 2.4.2 [ 19.894029] NET: Registered protocol family 24 [ 22.945241] eth0: device MAC address 00:06:3b:01:41:00 [ 22.960202] device eth0.1 entered promiscuous mode [ 22.960226] device eth0 entered promiscuous mode [ 22.967086] br-lan: port 1(eth0.1) entered forwarding state [ 22.968679] br-lan: port 1(eth0.1) entered forwarding state [ 24.942486] ipq806x-gmac-dwmac 37200000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 24.962260] br-lan: port 1(eth0.1) entered forwarding state On 03/04/16 06:05, Imre Kaloz wrote: > Hi Adrian, > > On Sat, 02 Apr 2016 01:48:22 +0200, Adrian Panella > wrote: > >> Hi Imre, >> >> networking seems to be working for me. >> So far I have done only basic testing. Can access the router from lan >> and wlan. >> No permormance test done, though. >> >> If you have a repo you can share with your patchset, I could gladly >> compare to take advantage of both works. > > I'll have time for this today, but the weird part is that comparing > the dts I made and the one you submitted I see no difference when it > comes to ethernet configuration. > > Could you post your dmesg and the contents of the devinfo partition? > > > Thanks, > > Imre > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From leroi.lists at gmail.com Sun Apr 3 14:45:59 2016 From: leroi.lists at gmail.com (Roman Yeryomin) Date: Sun, 3 Apr 2016 21:45:59 +0300 Subject: [OpenWrt-Devel] [PATCH 1/5] ramips: mt7621: fix initramfs image for ubnt-erx Message-ID: <1459709159-25524-1-git-send-email-roman@advem.lv> Signed-off-by: Roman Yeryomin --- target/linux/ramips/image/mt7621.mk | 66 +++++++++++-------------------------- 1 file changed, 20 insertions(+), 46 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 745611f..76b4e48 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -11,51 +11,28 @@ define Build/seama-seal $(call Build/seama,-s $@.seama $(1)) endef -define Build/ubnt-erx-factory-compat - echo '21001:6' > $@.compat - $(TAR) -cf $@ --transform='s/^.*/compat/' $@.compat - $(RM) $@.compat -endef - -define Build/ubnt-erx-factory-kernel +define Build/ubnt-erx-factory-image if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) ]; then \ - $(TAR) -rf $@ --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \ + echo '21001:6' > $(1).compat; \ + $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \ + \ + $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \ + md5sum --binary $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) | awk '{print $$1}'> $(1).md5; \ + $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp.md5/' $(1).md5; \ + \ + echo "dummy" > $(1).rootfs; \ + $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp/' $(1).rootfs; \ \ - md5sum --binary $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) | awk '{print $$1}'> $@.md5; \ - $(TAR) -rf $@ --transform='s/^.*/vmlinux.tmp.md5/' $@.md5; \ - $(RM) $@.md5; \ + md5sum --binary $(1).rootfs | awk '{print $$1}'> $(1).md5; \ + $(TAR) -rf $(1) --transform='s/^.*/squashfs.tmp.md5/' $(1).md5; \ + \ + echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $(1).version; \ + $(TAR) -rf $(1) --transform='s/^.*/version.tmp/' $(1).version; \ + \ + $(CP) $(1) $(BIN_DIR)/; \ fi endef -define Build/ubnt-erx-factory-rootfs - echo "dummy" > $@.rootfs - $(TAR) -rf $@ --transform='s/^.*/squashfs.tmp/' $@.rootfs - - md5sum --binary $@.rootfs | awk '{print $$1}'> $@.md5 - $(TAR) -rf $@ --transform='s/^.*/squashfs.tmp.md5/' $@.md5 - $(RM) $@.md5 - $(RM) $@.rootfs -endef - -define Build/ubnt-erx-factory-version - echo '$(BOARD) $(VERSION_CODE) $(VERSION_NUMBER)' > $@.version - $(TAR) -rf $@ --transform='s/^.*/version.tmp/' $@.version - $(RM) $@.version -endef - -# We need kernel+initrams fit into kernel partition -define Build/ubnt-erx-factory-check-size - @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$($(TAR) -xf $@ vmlinux.tmp -O | wc -c)" ] || { \ - echo "WARNING: Initramfs kernel for image $@ is too big (kernel size: $$($(TAR) -xf $@ vmlinux.tmp -O | wc -c), max size $(1))" >&2; \ - $(RM) -f $@; \ - } - - @[ "$$($(TAR) -xf $@ vmlinux.tmp -O | wc -c)" -gt 0 ] || { \ - echo "WARNING: Kernel for image $@ not found" >&2; \ - $(RM) -f $@; \ - } -endef - ifeq ($(SUBTARGET),mt7621) TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 sap-g3200u3 ubnt-erx witi wf-2881 zbt-wg2626 endif @@ -134,12 +111,9 @@ define Device/ubnt-erx FILESYSTEMS := squashfs KERNEL_SIZE := 3145728 KERNEL := $(KERNEL_DTB) | uImage lzma - IMAGES := sysupgrade.tar $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),factory-initramfs.tar) - IMAGE/factory-initramfs.tar := ubnt-erx-factory-compat | \ - ubnt-erx-factory-kernel | \ - ubnt-erx-factory-rootfs | \ - ubnt-erx-factory-version | \ - ubnt-erx-factory-check-size $$(KERNEL_SIZE) + IMAGES := sysupgrade.tar + KERNEL_INITRAMFS := $$(KERNEL) | check-size $$(KERNEL_SIZE) | \ + ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.tar := sysupgrade-nand endef -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From leroi.lists at gmail.com Sun Apr 3 14:46:51 2016 From: leroi.lists at gmail.com (Roman Yeryomin) Date: Sun, 3 Apr 2016 21:46:51 +0300 Subject: [OpenWrt-Devel] [PATCH 2/5] ramips: mt7621: add a device to TARGET_DEVICES after it's definition Message-ID: <1459709211-25570-1-git-send-email-roman@advem.lv> Signed-off-by: Roman Yeryomin --- target/linux/ramips/image/mt7621.mk | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 76b4e48..628954f 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -33,29 +33,29 @@ define Build/ubnt-erx-factory-image fi endef -ifeq ($(SUBTARGET),mt7621) - TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 sap-g3200u3 ubnt-erx witi wf-2881 zbt-wg2626 -endif - define Device/mt7621 DTS := MT7621 IMAGE_SIZE := $(ralink_default_fw_size_4M) endef +TARGET_DEVICES += mt7621 define Device/wsr-600 DTS := WSR-600 IMAGE_SIZE := $(ralink_default_fw_size_16M) endef +TARGET_DEVICES += wsr-600 define Device/re6500 DTS := RE6500 endef +TARGET_DEVICES += re6500 define Device/wsr-1166 DTS := WSR-1166 IMAGE/sysupgrade.bin := trx | pad-rootfs IMAGE_SIZE := $(ralink_default_fw_size_16M) endef +TARGET_DEVICES += wsr-1166 define Device/dir-860l-b1 DTS := DIR-860L-B1 @@ -71,30 +71,36 @@ define Device/dir-860l-b1 seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb" | \ check-size $$$$(IMAGE_SIZE) endef +TARGET_DEVICES += dir-860l-b1 define Device/firewrt DTS := FIREWRT IMAGE_SIZE := $(ralink_default_fw_size_16M) endef +TARGET_DEVICES += firewrt define Device/pbr-m1 DTS := PBR-M1 IMAGE_SIZE := $(ralink_default_fw_size_16M) endef +TARGET_DEVICES += pbr-m1 define Device/sap-g3200u3 DTS := SAP-G3200U3 endef +TARGET_DEVICES += sap-g3200u3 define Device/witi DTS := WITI IMAGE_SIZE := $(ralink_default_fw_size_16M) endef +TARGET_DEVICES += witi define Device/zbt-wg2626 DTS := ZBT-WG2626 IMAGE_SIZE := $(ralink_default_fw_size_16M) endef +TARGET_DEVICES += zbt-wg2626 define Device/wf-2881 DTS := WF-2881 @@ -105,6 +111,7 @@ define Device/wf-2881 KERNEL := $(KERNEL_DTB) | pad-offset 131072 64 | uImage lzma IMAGE/sysupgrade.bin := append-kernel | append-ubi | check-size $$$$(IMAGE_SIZE) endef +TARGET_DEVICES += wf-2881 define Device/ubnt-erx DTS := UBNT-ERX @@ -116,6 +123,7 @@ define Device/ubnt-erx ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar IMAGE/sysupgrade.tar := sysupgrade-nand endef +TARGET_DEVICES += ubnt-erx # FIXME: is this still needed? define Image/Prepare -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From leroi.lists at gmail.com Sun Apr 3 14:47:18 2016 From: leroi.lists at gmail.com (Roman Yeryomin) Date: Sun, 3 Apr 2016 21:47:18 +0300 Subject: [OpenWrt-Devel] [PATCH 3/5] ramips: enable device profiling by dts Message-ID: <1459709238-25616-1-git-send-email-roman@advem.lv> Signed-off-by: Roman Yeryomin --- target/linux/ramips/image/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index ddd67a2..6e0349f 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -32,6 +32,7 @@ KERNEL_LOADADDR := $(loadaddr-y) KERNEL_DTB = kernel-bin | patch-dtb | lzma define Device/Default + PROFILES = Default $$(DTS) KERNEL_DEPENDS = $$(wildcard ../dts/$$(DTS).dts) KERNEL := $(KERNEL_DTB) | uImage lzma IMAGES := sysupgrade.bin -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From leroi.lists at gmail.com Sun Apr 3 14:47:35 2016 From: leroi.lists at gmail.com (Roman Yeryomin) Date: Sun, 3 Apr 2016 21:47:35 +0300 Subject: [OpenWrt-Devel] [PATCH 4/5] ramips: mt7621: sync MQmaker WiTi profile name to dts name Message-ID: <1459709255-25662-1-git-send-email-roman@advem.lv> Signed-off-by: Roman Yeryomin --- target/linux/ramips/mt7621/profiles/mqmaker.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/ramips/mt7621/profiles/mqmaker.mk b/target/linux/ramips/mt7621/profiles/mqmaker.mk index ae35e7d..a9c79df 100644 --- a/target/linux/ramips/mt7621/profiles/mqmaker.mk +++ b/target/linux/ramips/mt7621/profiles/mqmaker.mk @@ -5,7 +5,7 @@ # See /LICENSE for more information. # -define Profile/witi +define Profile/WITI NAME:=MQmaker WiTi FEATURES+=rtc PACKAGES:=\ @@ -14,7 +14,7 @@ define Profile/witi kmod-rtc-pcf8563 kmod-i2c-mt7621 endef -define Profile/witi/Description +define Profile/WITI/Description Package set compatible with MQmaker WiTi board. endef -$(eval $(call Profile,witi)) +$(eval $(call Profile,WITI)) -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From leroi.lists at gmail.com Sun Apr 3 14:47:53 2016 From: leroi.lists at gmail.com (Roman Yeryomin) Date: Sun, 3 Apr 2016 21:47:53 +0300 Subject: [OpenWrt-Devel] [PATCH 5/5] ramips: mt7621: fix Ubiquiti EdgeRouter X profile Message-ID: <1459709273-25708-1-git-send-email-roman@advem.lv> Remove unnecessary packages to reduce image size so it fits in initramfs (to enable upgrading from factory firmware). Signed-off-by: Roman Yeryomin --- target/linux/ramips/mt7621/profiles/ubnt.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/mt7621/profiles/ubnt.mk b/target/linux/ramips/mt7621/profiles/ubnt.mk index b66b206..3f1af02 100644 --- a/target/linux/ramips/mt7621/profiles/ubnt.mk +++ b/target/linux/ramips/mt7621/profiles/ubnt.mk @@ -8,7 +8,8 @@ define Profile/UBNT-ERX NAME:=Ubiquiti EdgeRouter X FEATURES+=nand -usb - PACKAGES:=-kmod-mt76 -wpad-mini -kmod-cfg80211 + PACKAGES:=-kmod-mt76 -kmod-rt2800-pci -kmod-cfg80211 \ + -wpad-mini -iwinfo endef define Profile/UBNT-ERX/Description -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chrisrblake93 at gmail.com Sun Apr 3 20:56:25 2016 From: chrisrblake93 at gmail.com (Chris Blake) Date: Sun, 3 Apr 2016 20:56:25 -0400 Subject: [OpenWrt-Devel] [PATCH 0/2] Add support for a apm821xx target & the Cisco Meraki MR24 Message-ID: <1459731387-16624-1-git-send-email-chrisrblake93@gmail.com> These RFC patches were recommended by Imre Kaloz [0] to add support for the apm821xx SoC to support a subset of devices. Original discussion for these patches can be found at [1], and the previous RFC can be found at [2]. [0]: https://lists.openwrt.org/pipermail/openwrt-devel/2016-March/040626.html [1]: https://lists.openwrt.org/pipermail/openwrt-devel/2016-March/040615.html [2]: https://lists.openwrt.org/pipermail/openwrt-devel/2016-April/040641.html Chris Blake (2): Add support for the apm821xx Device Target Add support for the Cisco Meraki MR24 include/target.mk | 1 + package/kernel/linux/modules/other.mk | 2 +- target/linux/apm821xx/Makefile | 29 ++ .../linux/apm821xx/base-files/etc/board.d/01_leds | 25 ++ .../apm821xx/base-files/etc/board.d/02_network | 25 ++ target/linux/apm821xx/base-files/etc/diag.sh | 37 ++ target/linux/apm821xx/base-files/lib/apm821xx.sh | 39 ++ .../lib/preinit/03_preinit_do_apm821xx.sh | 12 + .../lib/preinit/05_set_iface_mac_apm821xx | 17 + .../lib/preinit/05_set_preinit_iface_apm821xx | 12 + .../apm821xx/base-files/lib/upgrade/merakinand.sh | 65 ++++ .../apm821xx/base-files/lib/upgrade/platform.sh | 55 +++ target/linux/apm821xx/config-4.4 | 305 +++++++++++++++ target/linux/apm821xx/dts/MR24.dts | 433 +++++++++++++++++++++ target/linux/apm821xx/image/Makefile | 81 ++++ .../200-add-meraki-mr24-ikarem-support.patch | 31 ++ .../700-powerpc_ibm_phy_add_ar8035.patch | 41 ++ .../800-ppc4xx-rng-fix-crash-during-init.patch | 117 ++++++ target/linux/apm821xx/profiles/00-default.mk | 16 + target/linux/apm821xx/profiles/meraki.mk | 17 + tools/firmware-utils/src/mkmerakifw.c | 10 + 21 files changed, 1369 insertions(+), 1 deletion(-) create mode 100644 target/linux/apm821xx/Makefile create mode 100755 target/linux/apm821xx/base-files/etc/board.d/01_leds create mode 100755 target/linux/apm821xx/base-files/etc/board.d/02_network create mode 100755 target/linux/apm821xx/base-files/etc/diag.sh create mode 100755 target/linux/apm821xx/base-files/lib/apm821xx.sh create mode 100644 target/linux/apm821xx/base-files/lib/preinit/03_preinit_do_apm821xx.sh create mode 100644 target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx create mode 100644 target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx create mode 100755 target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh create mode 100755 target/linux/apm821xx/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/apm821xx/config-4.4 create mode 100644 target/linux/apm821xx/dts/MR24.dts create mode 100644 target/linux/apm821xx/image/Makefile create mode 100644 target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch create mode 100644 target/linux/apm821xx/patches-4.4/700-powerpc_ibm_phy_add_ar8035.patch create mode 100644 target/linux/apm821xx/patches-4.4/800-ppc4xx-rng-fix-crash-during-init.patch create mode 100644 target/linux/apm821xx/profiles/00-default.mk create mode 100644 target/linux/apm821xx/profiles/meraki.mk -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chrisrblake93 at gmail.com Sun Apr 3 20:56:26 2016 From: chrisrblake93 at gmail.com (Chris Blake) Date: Sun, 3 Apr 2016 20:56:26 -0400 Subject: [OpenWrt-Devel] [PATCH 1/2] Add support for the apm821xx Device Target In-Reply-To: <1459731387-16624-1-git-send-email-chrisrblake93@gmail.com> References: <1459731387-16624-1-git-send-email-chrisrblake93@gmail.com> Message-ID: <1459731387-16624-2-git-send-email-chrisrblake93@gmail.com> This adds a new target for PowerPC APM821xx (464-based) boards, as well as adds support for the booke-wdt watchdog package. Signed-off-by: Chris Blake --- include/target.mk | 1 + package/kernel/linux/modules/other.mk | 2 +- target/linux/apm821xx/Makefile | 29 ++ .../apm821xx/base-files/etc/board.d/02_network | 22 ++ .../lib/preinit/03_preinit_do_apm821xx.sh | 12 + .../lib/preinit/05_set_preinit_iface_apm821xx | 12 + target/linux/apm821xx/config-4.4 | 298 +++++++++++++++++++++ target/linux/apm821xx/image/Makefile | 24 ++ .../700-powerpc_ibm_phy_add_ar8035.patch | 41 +++ .../800-ppc4xx-rng-fix-crash-during-init.patch | 117 ++++++++ target/linux/apm821xx/profiles/00-default.mk | 16 ++ 11 files changed, 573 insertions(+), 1 deletion(-) create mode 100644 target/linux/apm821xx/Makefile create mode 100755 target/linux/apm821xx/base-files/etc/board.d/02_network create mode 100644 target/linux/apm821xx/base-files/lib/preinit/03_preinit_do_apm821xx.sh create mode 100644 target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx create mode 100644 target/linux/apm821xx/config-4.4 create mode 100644 target/linux/apm821xx/image/Makefile create mode 100644 target/linux/apm821xx/patches-4.4/700-powerpc_ibm_phy_add_ar8035.patch create mode 100644 target/linux/apm821xx/patches-4.4/800-ppc4xx-rng-fix-crash-during-init.patch create mode 100644 target/linux/apm821xx/profiles/00-default.mk diff --git a/include/target.mk b/include/target.mk index 76fbd99..5bdb7bf 100644 --- a/include/target.mk +++ b/include/target.mk @@ -253,6 +253,7 @@ ifeq ($(DUMP),1) CPU_CFLAGS_8540:=-mcpu=8540 CPU_CFLAGS_405:=-mcpu=405 CPU_CFLAGS_440:=-mcpu=440 + CPU_CFLAGS_464fp:=-mcpu=464fp endif ifeq ($(ARCH),sparc) CPU_TYPE = sparc diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 528d32f..6624353 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -517,7 +517,7 @@ $(eval $(call KernelPackage,wdt-orion)) define KernelPackage/booke-wdt SUBMENU:=$(OTHER_MENU) TITLE:=PowerPC Book-E Watchdog Timer - DEPENDS:=@(TARGET_mpc85xx||TARGET_ppc40x||TARGET_ppc44x) + DEPENDS:=@(TARGET_apm821xx||TARGET_mpc85xx||TARGET_ppc40x||TARGET_ppc44x) KCONFIG:=CONFIG_BOOKE_WDT FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/booke_wdt.ko AUTOLOAD:=$(call AutoLoad,50,booke_wdt,1) diff --git a/target/linux/apm821xx/Makefile b/target/linux/apm821xx/Makefile new file mode 100644 index 0000000..d48dab0 --- /dev/null +++ b/target/linux/apm821xx/Makefile @@ -0,0 +1,29 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +ARCH:=powerpc +BOARD:=apm821xx +BOARDNAME:=AppliedMicro APM821xx +CPU_TYPE:=464fp +FEATURES:=squashfs nand rtc fpu ramdisk +MAINTAINER:=Imre Kaloz + +KERNEL_PATCHVER:=4.4 + +include $(INCLUDE_DIR)/target.mk + +KERNELNAME:=uImage + +DEFAULT_PACKAGES += \ + kmod-leds-gpio kmod-booke-wdt wpad-mini + +define Target/Description + Build images for AppliedMicro APM821xx based boards. +endef + +$(eval $(call BuildTarget)) diff --git a/target/linux/apm821xx/base-files/etc/board.d/02_network b/target/linux/apm821xx/base-files/etc/board.d/02_network new file mode 100755 index 0000000..c7d067b --- /dev/null +++ b/target/linux/apm821xx/base-files/etc/board.d/02_network @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Copyright (C) 2016 OpenWrt.org +# + +. /lib/functions/system.sh +. /lib/functions/uci-defaults.sh +. /lib/apm821xx.sh + +board_config_update + +board=$(apm821xx_board_name) + +case "$board" in +*) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/apm821xx/base-files/lib/preinit/03_preinit_do_apm821xx.sh b/target/linux/apm821xx/base-files/lib/preinit/03_preinit_do_apm821xx.sh new file mode 100644 index 0000000..53ca2f5 --- /dev/null +++ b/target/linux/apm821xx/base-files/lib/preinit/03_preinit_do_apm821xx.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# +# Copyright (C) 2016 OpenWrt.org +# + +do_apm821xx() { + . /lib/apm821xx.sh + + apm821xx_board_detect +} + +boot_hook_add preinit_main do_apm821xx diff --git a/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx b/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx new file mode 100644 index 0000000..5ccd8b6 --- /dev/null +++ b/target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx @@ -0,0 +1,12 @@ +#!/bin/sh +# +# Copyright (C) 2016 OpenWrt.org +# + +. /lib/apm821xx.sh + +apm821xx_set_preinit_iface() { + ifname=eth0 +} + +boot_hook_add preinit_main apm821xx_set_preinit_iface diff --git a/target/linux/apm821xx/config-4.4 b/target/linux/apm821xx/config-4.4 new file mode 100644 index 0000000..0c1657b --- /dev/null +++ b/target/linux/apm821xx/config-4.4 @@ -0,0 +1,298 @@ +# CONFIG_40x is not set +CONFIG_44x=y +CONFIG_4xx=y +CONFIG_4xx_SOC=y +# CONFIG_ADVANCED_OPTIONS is not set +# CONFIG_ARCHES is not set +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y +CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_ARCH_HAS_DMA_SET_COHERENT_MASK=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +CONFIG_ARCH_HAS_ILOG2_U32=y +CONFIG_ARCH_HAS_SG_CHAIN=y +CONFIG_ARCH_HAS_WALK_MEMORY=y +CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y +# CONFIG_ARCH_RANDOM is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +CONFIG_AT803X_PHY=y +CONFIG_AUDIT_ARCH=y +# CONFIG_BAMBOO is not set +CONFIG_BCH=y +# CONFIG_BLUESTONE is not set +CONFIG_BOOKE=y +CONFIG_BOUNCE=y +# CONFIG_CANYONLANDS is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMDLINE="rootfstype=squashfs noinitrd" +CONFIG_CMDLINE_BOOL=y +CONFIG_CONSISTENT_SIZE=0x00200000 +CONFIG_CPU_BIG_ENDIAN=y +CONFIG_CRC16=y +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_DEV_PPC4XX=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_LZO=y +CONFIG_CRYPTO_MD5_PPC=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_SHA1_PPC=y +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_XZ=y +CONFIG_DECOMPRESS_GZIP=y +# CONFIG_DEFAULT_UIMAGE is not set +CONFIG_DTC=y +# CONFIG_E200 is not set +CONFIG_EARLY_PRINTK=y +# CONFIG_EBONY is not set +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +# CONFIG_EIGER is not set +# CONFIG_EPAPR_BOOT is not set +CONFIG_EXTRA_TARGETS="uImage" +# CONFIG_FSL_ULI1575 is not set +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CMOS_UPDATE=y +# CONFIG_GENERIC_CSUM is not set +CONFIG_GENERIC_IO=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_MSI_IRQ=y +CONFIG_GENERIC_NVRAM=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +# CONFIG_GENERIC_TBSYNC is not set +CONFIG_GENERIC_TIME_VSYSCALL_OLD=y +# CONFIG_GEN_RTC is not set +# CONFIG_GE_FPGA is not set +# CONFIG_GLACIER is not set +CONFIG_GPIOLIB=y +CONFIG_GPIO_DEVRES=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +# CONFIG_HAS_RAPIDIO is not set +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set +CONFIG_HAVE_ARCH_AUDITSYSCALL=y +# CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_HAVE_BPF_JIT=y +CONFIG_HAVE_DEBUG_KMEMLEAK=y +CONFIG_HAVE_DEBUG_STACKOVERFLOW=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set +CONFIG_HAVE_GENERIC_RCU_GUP=y +CONFIG_HAVE_IDE=y +CONFIG_HAVE_IOREMAP_PROT=y +CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_HAVE_MEMBLOCK_NODE_MAP=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y +CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_PPC4XX=y +CONFIG_HZ=1000 +# CONFIG_HZ_100 is not set +CONFIG_HZ_1000=y +CONFIG_HZ_PERIODIC=y +CONFIG_IBM_EMAC=y +CONFIG_IBM_EMAC_POLL_WEIGHT=32 +CONFIG_IBM_EMAC_RXB=128 +CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256 +CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0 +CONFIG_IBM_EMAC_TXB=128 +# CONFIG_ICON is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_IOMMU_HELPER is not set +# CONFIG_IPIC is not set +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_IRQ_WORK=y +CONFIG_ISA_DMA_API=y +# CONFIG_KATMAI is not set +CONFIG_KERNEL_START=0xc0000000 +CONFIG_LIBFDT=y +CONFIG_LOWMEM_SIZE=0x30000000 +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +# CONFIG_MATH_EMULATION is not set +CONFIG_MDIO_BOARDINFO=y +# CONFIG_MMIO_NVRAM is not set +CONFIG_MODULES_USE_ELF_RELA=y +# CONFIG_MPIC is not set +# CONFIG_MPIC_U3_HT_IRQS is not set +# CONFIG_MPIC_WEIRD is not set +CONFIG_MTD_CFI_ADV_OPTIONS=y +# CONFIG_MTD_CFI_GEOMETRY is not set +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_BCH=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_NAND_ECC_BCH=y +CONFIG_MTD_NAND_ECC_SMC=y +CONFIG_MTD_NAND_NDFC=y +CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_SPLIT_UIMAGE_FW=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_BEB_LIMIT=20 +CONFIG_MTD_UBI_BLOCK=y +# CONFIG_MTD_UBI_FASTMAP is not set +# CONFIG_MTD_UBI_GLUEBI is not set +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_NEED_DMA_MAP_STATE=y +# CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK is not set +CONFIG_NEED_PER_CPU_KM=y +CONFIG_NEED_SG_DMA_LENGTH=y +# CONFIG_NONSTATIC_KERNEL is not set +CONFIG_NOT_COHERENT_CACHE=y +CONFIG_NO_BOOTMEM=y +CONFIG_NR_IRQS=512 +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_ADDRESS_PCI=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_MDIO=y +CONFIG_OF_MTD=y +CONFIG_OF_NET=y +CONFIG_OF_PCI=y +CONFIG_OF_PCI_IRQ=y +CONFIG_OF_RESERVED_MEM=y +CONFIG_OLD_SIGACTION=y +CONFIG_OLD_SIGSUSPEND=y +CONFIG_PAGE_OFFSET=0xc0000000 +CONFIG_PCI=y +CONFIG_PCIEAER=y +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_BUS_ADDR_T_64BIT=y +CONFIG_PCI_DISABLE_COMMON_QUIRKS=y +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_MSI=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +CONFIG_PHYSICAL_START=0x00000000 +CONFIG_PHYS_64BIT=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_PPC=y +CONFIG_PPC32=y +CONFIG_PPC44x_SIMPLE=y +CONFIG_PPC4xx_GPIO=y +# CONFIG_PPC4xx_HSTA_MSI is not set +# CONFIG_PPC4xx_MSI is not set +CONFIG_PPC4xx_OCM=y +# CONFIG_PPC4xx_PCI_EXPRESS is not set +# CONFIG_PPC64 is not set +# CONFIG_PPC_47x is not set +# CONFIG_PPC_85xx is not set +# CONFIG_PPC_8xx is not set +# CONFIG_PPC_970_NAP is not set +CONFIG_PPC_ADV_DEBUG_DACS=2 +CONFIG_PPC_ADV_DEBUG_DAC_RANGE=y +CONFIG_PPC_ADV_DEBUG_DVCS=2 +CONFIG_PPC_ADV_DEBUG_IACS=4 +CONFIG_PPC_ADV_DEBUG_REGS=y +# CONFIG_PPC_BOOK3S_32 is not set +# CONFIG_PPC_CELL is not set +# CONFIG_PPC_CELL_NATIVE is not set +# CONFIG_PPC_COPRO_BASE is not set +CONFIG_PPC_DCR=y +# CONFIG_PPC_DCR_MMIO is not set +CONFIG_PPC_DCR_NATIVE=y +# CONFIG_PPC_DOORBELL is not set +# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EPAPR_HV_PIC is not set +# CONFIG_PPC_I8259 is not set +# CONFIG_PPC_ICP_HV is not set +# CONFIG_PPC_ICP_NATIVE is not set +# CONFIG_PPC_ICS_RTAS is not set +CONFIG_PPC_INDIRECT_PCI=y +CONFIG_PPC_LIB_RHEAP=y +CONFIG_PPC_MMU_NOHASH=y +# CONFIG_PPC_MM_SLICES is not set +# CONFIG_PPC_MPC106 is not set +# CONFIG_PPC_P7_NAP is not set +CONFIG_PPC_PCI_CHOICE=y +# CONFIG_PPC_RTAS is not set +CONFIG_PPC_UDBG_16550=y +CONFIG_PPC_WERROR=y +# CONFIG_PPC_XICS is not set +# CONFIG_PQ2ADS is not set +CONFIG_PTE_64BIT=y +# CONFIG_RAINIER is not set +CONFIG_RAS=y +# CONFIG_RCU_STALL_COMMON is not set +CONFIG_RD_GZIP=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +# CONFIG_SAM440EP is not set +CONFIG_SCHED_HRTICK=y +# CONFIG_SCHED_INFO is not set +# CONFIG_SCSI_DMA is not set +# CONFIG_SEQUOIA is not set +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SIMPLE_GPIO=y +CONFIG_SPARSE_IRQ=y +CONFIG_SRCU=y +# CONFIG_STRICT_MM_TYPECHECKS is not set +# CONFIG_SWIOTLB is not set +CONFIG_SYSCTL_EXCEPTION_TRACE=y +# CONFIG_TAISHAN is not set +CONFIG_TASK_SIZE=0xc0000000 +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_UBIFS_FS=y +# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_XZ=y +CONFIG_UBIFS_FS_ZLIB=y +CONFIG_USB_SUPPORT=y +CONFIG_VDSO32=y +# CONFIG_WARP is not set +CONFIG_WORD_SIZE=32 +# CONFIG_XILINX_SYSACE is not set +# CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set +CONFIG_XZ_DEC_BCJ=y +CONFIG_XZ_DEC_POWERPC=y +# CONFIG_YOSEMITE is not set +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile new file mode 100644 index 0000000..a9608e7 --- /dev/null +++ b/target/linux/apm821xx/image/Makefile @@ -0,0 +1,24 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/image.mk + +IMAGE_PROFILE:=$(if $(PROFILE),$(PROFILE),Default) + +DEVICE_VARS += DTS IMAGE_SIZE + +define Device/Default + BOARDNAME := + DEVICE_PROFILE = $$(BOARDNAME) + PROFILES = Default $$(DEVICE_PROFILE) + KERNEL_DEPENDS = $$(wildcard ../dts/$$(DTS).dts) + KERNEL := kernel-bin | lzma | uImage lzma + KERNEL_INITRAMFS := kernel-bin | lzma | uImage lzma +endef +TARGET_DEVICES += Default + +$(eval $(call BuildImage)) diff --git a/target/linux/apm821xx/patches-4.4/700-powerpc_ibm_phy_add_ar8035.patch b/target/linux/apm821xx/patches-4.4/700-powerpc_ibm_phy_add_ar8035.patch new file mode 100644 index 0000000..b0c1eeb --- /dev/null +++ b/target/linux/apm821xx/patches-4.4/700-powerpc_ibm_phy_add_ar8035.patch @@ -0,0 +1,41 @@ +--- a/drivers/net/ethernet/ibm/emac/phy.c ++++ b/drivers/net/ethernet/ibm/emac/phy.c +@@ -470,12 +470,38 @@ static struct mii_phy_def m88e1112_phy_d + .ops = &m88e1112_phy_ops, + }; + ++static int ar8035_init(struct mii_phy *phy) ++{ ++ phy_write(phy, 0x1d, 0x5); /* Address debug register 5 */ ++ phy_write(phy, 0x1e, 0x2d47); /* ?? Value copied from u-boot */ ++ phy_write(phy, 0x1d, 0xb); /* Address hib ctrl */ ++ phy_write(phy, 0x1e, 0xbc20); /* Another poorly documented register */ ++ ++ return 0; ++} ++ ++static struct mii_phy_ops ar8035_phy_ops = { ++ .init = ar8035_init, ++ .setup_aneg = genmii_setup_aneg, ++ .setup_forced = genmii_setup_forced, ++ .poll_link = genmii_poll_link, ++ .read_link = genmii_read_link, ++}; ++ ++static struct mii_phy_def ar8035_phy_def = { ++ .phy_id = 0x004dd070, ++ .phy_id_mask = 0xfffffff0, ++ .name = "Atheros 8035 Gigabit Ethernet", ++ .ops = &ar8035_phy_ops, ++}; ++ + static struct mii_phy_def *mii_phy_table[] = { + &et1011c_phy_def, + &cis8201_phy_def, + &bcm5248_phy_def, + &m88e1111_phy_def, + &m88e1112_phy_def, ++ &ar8035_phy_def, + &genmii_phy_def, + NULL + }; diff --git a/target/linux/apm821xx/patches-4.4/800-ppc4xx-rng-fix-crash-during-init.patch b/target/linux/apm821xx/patches-4.4/800-ppc4xx-rng-fix-crash-during-init.patch new file mode 100644 index 0000000..6eed32f --- /dev/null +++ b/target/linux/apm821xx/patches-4.4/800-ppc4xx-rng-fix-crash-during-init.patch @@ -0,0 +1,117 @@ +From 2159e200fcb68f88a94b1d5570d6000c100133a8 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Fri, 25 Mar 2016 19:00:05 +0100 +Subject: [PATCH] ppc4xx-rng: fix crash during init + +This patch fixes a crash that happens in the ppc4xx-rng driver +when accessing the main crypto core to enable the true random +number generator. + +Signed-off-by: Christian Lamparter +--- + drivers/char/hw_random/ppc4xx-rng.c | 42 --------------------------------- + drivers/crypto/amcc/crypto4xx_core.c | 1 + + drivers/crypto/amcc/crypto4xx_reg_def.h | 1 + + 3 files changed, 2 insertions(+), 42 deletions(-) + +diff --git a/drivers/char/hw_random/ppc4xx-rng.c b/drivers/char/hw_random/ppc4xx-rng.c +index c0db438..a9a8a29 100644 +--- a/drivers/char/hw_random/ppc4xx-rng.c ++++ b/drivers/char/hw_random/ppc4xx-rng.c +@@ -17,9 +17,6 @@ + #include + #include + +-#define PPC4XX_TRNG_DEV_CTRL 0x60080 +- +-#define PPC4XX_TRNGE 0x00020000 + #define PPC4XX_TRNG_CTRL 0x0008 + #define PPC4XX_TRNG_CTRL_DALM 0x20 + #define PPC4XX_TRNG_STAT 0x0004 +@@ -51,40 +48,6 @@ static int ppc4xx_rng_data_read(struct hwrng *rng, u32 *data) + return 4; + } + +-static int ppc4xx_rng_enable(int enable) +-{ +- struct device_node *ctrl; +- void __iomem *ctrl_reg; +- int err = 0; +- u32 val; +- +- /* Find the main crypto device node and map it to turn the TRNG on */ +- ctrl = of_find_compatible_node(NULL, NULL, "amcc,ppc4xx-crypto"); +- if (!ctrl) +- return -ENODEV; +- +- ctrl_reg = of_iomap(ctrl, 0); +- if (!ctrl_reg) { +- err = -ENODEV; +- goto out; +- } +- +- val = in_le32(ctrl_reg + PPC4XX_TRNG_DEV_CTRL); +- +- if (enable) +- val |= PPC4XX_TRNGE; +- else +- val = val & ~PPC4XX_TRNGE; +- +- out_le32(ctrl_reg + PPC4XX_TRNG_DEV_CTRL, val); +- iounmap(ctrl_reg); +- +-out: +- of_node_put(ctrl); +- +- return err; +-} +- + static struct hwrng ppc4xx_rng = { + .name = MODULE_NAME, + .data_present = ppc4xx_rng_data_present, +@@ -100,10 +63,6 @@ static int ppc4xx_rng_probe(struct platform_device *dev) + if (!rng_regs) + return -ENODEV; + +- err = ppc4xx_rng_enable(1); +- if (err) +- return err; +- + out_le32(rng_regs + PPC4XX_TRNG_CTRL, PPC4XX_TRNG_CTRL_DALM); + ppc4xx_rng.priv = (unsigned long) rng_regs; + +@@ -117,7 +76,6 @@ static int ppc4xx_rng_remove(struct platform_device *dev) + void __iomem *rng_regs = (void __iomem *) ppc4xx_rng.priv; + + hwrng_unregister(&ppc4xx_rng); +- ppc4xx_rng_enable(0); + iounmap(rng_regs); + + return 0; +diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c +index 62134c8..cb0b262 100644 +--- a/drivers/crypto/amcc/crypto4xx_core.c ++++ b/drivers/crypto/amcc/crypto4xx_core.c +@@ -90,6 +90,7 @@ static void crypto4xx_hw_init(struct crypto4xx_device *dev) + writel(ring_ctrl.w, dev->ce_base + CRYPTO4XX_RING_CTRL); + device_ctrl = readl(dev->ce_base + CRYPTO4XX_DEVICE_CTRL); + device_ctrl |= PPC4XX_DC_3DES_EN; ++ device_ctrl |= PPC4XX_TRNGE; + writel(device_ctrl, dev->ce_base + CRYPTO4XX_DEVICE_CTRL); + writel(dev->gdr_pa, dev->ce_base + CRYPTO4XX_GATH_RING_BASE); + writel(dev->sdr_pa, dev->ce_base + CRYPTO4XX_SCAT_RING_BASE); +diff --git a/drivers/crypto/amcc/crypto4xx_reg_def.h b/drivers/crypto/amcc/crypto4xx_reg_def.h +index 5f5fbc0..914efc6 100644 +--- a/drivers/crypto/amcc/crypto4xx_reg_def.h ++++ b/drivers/crypto/amcc/crypto4xx_reg_def.h +@@ -124,6 +124,7 @@ + #define PPC4XX_BYTE_ORDER 0x22222 + #define PPC4XX_INTERRUPT_CLR 0x3ffff + #define PPC4XX_PRNG_CTRL_AUTO_EN 0x3 ++#define PPC4XX_TRNGE 0x00020000 + #define PPC4XX_DC_3DES_EN 1 + #define PPC4XX_INT_DESCR_CNT 4 + #define PPC4XX_INT_TIMEOUT_CNT 0 +-- +2.8.0.rc3 + diff --git a/target/linux/apm821xx/profiles/00-default.mk b/target/linux/apm821xx/profiles/00-default.mk new file mode 100644 index 0000000..acd1fdf --- /dev/null +++ b/target/linux/apm821xx/profiles/00-default.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/Default + NAME:=Default Profile (all drivers) + PACKAGES:=kmod-usb-core kmod-usb2 kmod-usb2-fsl +endef + +define Profile/Default/Description + Default package set compatible with most boards. +endef +$(eval $(call Profile,Default)) -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chrisrblake93 at gmail.com Sun Apr 3 20:56:27 2016 From: chrisrblake93 at gmail.com (Chris Blake) Date: Sun, 3 Apr 2016 20:56:27 -0400 Subject: [OpenWrt-Devel] [PATCH 2/2] Add support for the Cisco Meraki MR24 In-Reply-To: <1459731387-16624-1-git-send-email-chrisrblake93@gmail.com> References: <1459731387-16624-1-git-send-email-chrisrblake93@gmail.com> Message-ID: <1459731387-16624-3-git-send-email-chrisrblake93@gmail.com> This patch adds support for the Cisco Meraki MR24 Access point to the apm821xx target. More info on the device can be found at https://wiki.openwrt.org/toh/meraki/mr24 Signed-off-by: Chris Blake --- .../linux/apm821xx/base-files/etc/board.d/01_leds | 25 ++ .../apm821xx/base-files/etc/board.d/02_network | 3 + target/linux/apm821xx/base-files/etc/diag.sh | 37 ++ target/linux/apm821xx/base-files/lib/apm821xx.sh | 39 ++ .../lib/preinit/05_set_iface_mac_apm821xx | 17 + .../apm821xx/base-files/lib/upgrade/merakinand.sh | 65 ++++ .../apm821xx/base-files/lib/upgrade/platform.sh | 55 +++ target/linux/apm821xx/config-4.4 | 11 +- target/linux/apm821xx/dts/MR24.dts | 433 +++++++++++++++++++++ target/linux/apm821xx/image/Makefile | 57 +++ .../200-add-meraki-mr24-ikarem-support.patch | 31 ++ target/linux/apm821xx/profiles/meraki.mk | 17 + tools/firmware-utils/src/mkmerakifw.c | 10 + 13 files changed, 798 insertions(+), 2 deletions(-) create mode 100755 target/linux/apm821xx/base-files/etc/board.d/01_leds create mode 100755 target/linux/apm821xx/base-files/etc/diag.sh create mode 100755 target/linux/apm821xx/base-files/lib/apm821xx.sh create mode 100644 target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx create mode 100755 target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh create mode 100755 target/linux/apm821xx/base-files/lib/upgrade/platform.sh create mode 100644 target/linux/apm821xx/dts/MR24.dts create mode 100644 target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch create mode 100644 target/linux/apm821xx/profiles/meraki.mk diff --git a/target/linux/apm821xx/base-files/etc/board.d/01_leds b/target/linux/apm821xx/base-files/etc/board.d/01_leds new file mode 100755 index 0000000..a94871f --- /dev/null +++ b/target/linux/apm821xx/base-files/etc/board.d/01_leds @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Copyright (C) 2016 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/apm821xx.sh + +board_config_update + +board=$(apm821xx_board_name) + +case "$board" in +mr24) + ucidef_set_led_netdev "wan" "WAN" "mr24:green:wan" "eth0" + ucidef_set_led_wlan "wlan1" "WLAN1" "mr24:green:wifi1" "phy0assoc" + ucidef_set_led_wlan "wlan2" "WLAN2" "mr24:green:wifi2" "phy0assoc" + ucidef_set_led_wlan "wlan3" "WLAN3" "mr24:green:wifi3" "phy0assoc" + ucidef_set_led_wlan "wlan4" "WLAN4" "mr24:green:wifi4" "phy0tpt" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/apm821xx/base-files/etc/board.d/02_network b/target/linux/apm821xx/base-files/etc/board.d/02_network index c7d067b..9738b4e 100755 --- a/target/linux/apm821xx/base-files/etc/board.d/02_network +++ b/target/linux/apm821xx/base-files/etc/board.d/02_network @@ -12,6 +12,9 @@ board_config_update board=$(apm821xx_board_name) case "$board" in +mr24) + ucidef_set_interface_lan "eth0" + ;; *) ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; diff --git a/target/linux/apm821xx/base-files/etc/diag.sh b/target/linux/apm821xx/base-files/etc/diag.sh new file mode 100755 index 0000000..787d0e1 --- /dev/null +++ b/target/linux/apm821xx/base-files/etc/diag.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# +# Copyright (C) 2016 OpenWrt.org +# + +. /lib/functions/leds.sh +. /lib/apm821xx.sh + +get_status_led() { + case $(apm821xx_board_name) in + mr24) + status_led="mr24:green:power" + ;; + esac +} + +set_state() { + get_status_led + + case "$1" in + preinit) + status_led_blink_preinit + ;; + + failsafe) + status_led_blink_failsafe + ;; + + preinit_regular) + status_led_blink_preinit_regular + ;; + + done) + status_led_on + ;; + esac +} diff --git a/target/linux/apm821xx/base-files/lib/apm821xx.sh b/target/linux/apm821xx/base-files/lib/apm821xx.sh new file mode 100755 index 0000000..cfb1536 --- /dev/null +++ b/target/linux/apm821xx/base-files/lib/apm821xx.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Copyright (C) 2016 OpenWrt.org +# + +APM821XX_BOARD_NAME= +APM821XX_MODEL= + +apm821xx_board_detect() { + local model + local name + + model=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /model/ {print $2}' /proc/cpuinfo) + + case "$model" in + *"Meraki MR24 Access Point") + name="mr24" + ;; + esac + + [ -z "$name" ] && name="unknown" + + [ -z "$APM821XX_BOARD_NAME" ] && APM821XX_BOARD_NAME="$name" + [ -z "$APM821XX_MODEL" ] && APM821XX_MODEL="$model" + + [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" + + echo "$APM821XX_BOARD_NAME" > /tmp/sysinfo/board_name + echo "$APM821XX_MODEL" > /tmp/sysinfo/model +} + +apm821xx_board_name() { + local name + + [ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name) + [ -z "$name" ] && name="unknown" + + echo "$name" +} diff --git a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx new file mode 100644 index 0000000..773a761 --- /dev/null +++ b/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Copyright (C) 2016 OpenWrt.org +# + +. /lib/apm821xx.sh + +preinit_set_mac_address() { + case $(apm821xx_board_name) in + mr24) + mac_lan=$(mtd_get_mac_binary_ubi board-config 102) + [ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan" + ;; + esac +} + +boot_hook_add preinit_main preinit_set_mac_address diff --git a/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh b/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh new file mode 100755 index 0000000..5861d97 --- /dev/null +++ b/target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh @@ -0,0 +1,65 @@ +#!/bin/sh +# +# Copyright (C) 2016 Chris Blake +# +# Custom upgrade script for Meraki NAND devices (ex. MR24) +# Based on merakinand.sh from the ar71xx target +# +. /lib/apm821xx.sh +. /lib/functions.sh + +merakinand_do_kernel_check() { + local board_name="$1" + local tar_file="$2" + local image_magic_word=`(tar xf $tar_file sysupgrade-$board_name/kernel -O 2>/dev/null | dd bs=1 count=4 skip=0 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"')` + + # What is our kernel magic string? + case "$board_name" in + "mr24") + [ "$image_magic_word" == "8e73ed8a" ] && { + echo "pass" && return 0 + } + ;; + esac + + exit 1 +} + +merakinand_do_platform_check() { + local board_name="$1" + local tar_file="$2" + local control_length=`(tar xf $tar_file sysupgrade-$board_name/CONTROL -O | wc -c) 2> /dev/null` + local file_type="$(identify_tar $2 sysupgrade-$board_name/root)" + local kernel_magic="$(merakinand_do_kernel_check $1 $2)" + + case "$board_name" in + "mr24") + [ "$control_length" = 0 -o "$file_type" != "squashfs" -o "$kernel_magic" != "pass" ] && { + echo "Invalid sysupgrade file for $board_name" + return 1 + } + ;; + *) + echo "Unsupported device $board_name"; + return 1 + ;; + esac + + return 0 +} + +merakinand_do_upgrade() { + local tar_file="$1" + local board_name="$(cat /tmp/sysinfo/board_name)" + + # Do we need to do any platform tweaks? + case "$board_name" in + "mr24") + nand_do_upgrade $1 + ;; + *) + echo "Unsupported device $board_name"; + exit 1 + ;; + esac +} diff --git a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh new file mode 100755 index 0000000..f927a79 --- /dev/null +++ b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh @@ -0,0 +1,55 @@ +# +# Copyright (C) 2016 OpenWrt.org +# + +. /lib/apm821xx.sh + +PART_NAME=firmware +RAMFS_COPY_DATA=/lib/apm821xx.sh + +platform_check_image() { + local board=$(apm821xx_board_name) + + [ "$#" -gt 1 ] && return 1 + + case "$board" in + mr24) + merakinand_do_platform_check $board $1 + return $?; + ;; + + esac + + echo "Sysupgrade is not yet supported on $board." + return 1 +} + +platform_pre_upgrade() { + local board=$(apm821xx_board_name) + + case "$board" in + mr24) + merakinand_do_upgrade "$1" + ;; + esac +} + +platform_do_upgrade() { + local board=$(apm821xx_board_name) + + case "$board" in + *) + default_do_upgrade "$ARGV" + ;; + esac +} + +disable_watchdog() { + killall watchdog + ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && { + echo 'Could not disable watchdog' + return 1 + } +} + +append sysupgrade_pre_upgrade disable_watchdog diff --git a/target/linux/apm821xx/config-4.4 b/target/linux/apm821xx/config-4.4 index 0c1657b..dffb84a 100644 --- a/target/linux/apm821xx/config-4.4 +++ b/target/linux/apm821xx/config-4.4 @@ -3,6 +3,7 @@ CONFIG_44x=y CONFIG_4xx=y CONFIG_4xx_SOC=y # CONFIG_ADVANCED_OPTIONS is not set +CONFIG_APM821xx=y # CONFIG_ARCHES is not set CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y @@ -133,12 +134,16 @@ CONFIG_HZ=1000 CONFIG_HZ_1000=y CONFIG_HZ_PERIODIC=y CONFIG_IBM_EMAC=y +CONFIG_IBM_EMAC_EMAC4=y CONFIG_IBM_EMAC_POLL_WEIGHT=32 +CONFIG_IBM_EMAC_RGMII=y CONFIG_IBM_EMAC_RXB=128 CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256 CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0 +CONFIG_IBM_EMAC_TAH=y CONFIG_IBM_EMAC_TXB=128 # CONFIG_ICON is not set +CONFIG_IKAREM=y CONFIG_INITRAMFS_SOURCE="" # CONFIG_IOMMU_HELPER is not set # CONFIG_IPIC is not set @@ -217,9 +222,9 @@ CONFIG_PPC32=y CONFIG_PPC44x_SIMPLE=y CONFIG_PPC4xx_GPIO=y # CONFIG_PPC4xx_HSTA_MSI is not set -# CONFIG_PPC4xx_MSI is not set +CONFIG_PPC4xx_MSI=y CONFIG_PPC4xx_OCM=y -# CONFIG_PPC4xx_PCI_EXPRESS is not set +CONFIG_PPC4xx_PCI_EXPRESS=y # CONFIG_PPC64 is not set # CONFIG_PPC_47x is not set # CONFIG_PPC_85xx is not set @@ -240,6 +245,7 @@ CONFIG_PPC_DCR_NATIVE=y # CONFIG_PPC_DOORBELL is not set # CONFIG_PPC_EARLY_DEBUG is not set # CONFIG_PPC_EPAPR_HV_PIC is not set +CONFIG_PPC_FPU=y # CONFIG_PPC_I8259 is not set # CONFIG_PPC_ICP_HV is not set # CONFIG_PPC_ICP_NATIVE is not set @@ -249,6 +255,7 @@ CONFIG_PPC_LIB_RHEAP=y CONFIG_PPC_MMU_NOHASH=y # CONFIG_PPC_MM_SLICES is not set # CONFIG_PPC_MPC106 is not set +CONFIG_PPC_MSI_BITMAP=y # CONFIG_PPC_P7_NAP is not set CONFIG_PPC_PCI_CHOICE=y # CONFIG_PPC_RTAS is not set diff --git a/target/linux/apm821xx/dts/MR24.dts b/target/linux/apm821xx/dts/MR24.dts new file mode 100644 index 0000000..1e186e6 --- /dev/null +++ b/target/linux/apm821xx/dts/MR24.dts @@ -0,0 +1,433 @@ +/* + * Device Tree Source for Meraki MR24 (Ikarem) + * + * Copyright (C) 2016 Chris Blake + * + * Based on Cisco Meraki GPL Release r23-20150601 MR24 DTS + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + */ + +/dts-v1/; + +/ { + #address-cells = <2>; + #size-cells = <1>; + model = "Meraki MR24 Access Point"; + compatible = "meraki,ikarem"; + dcr-parent = <&{/cpus/cpu at 0}>; + + aliases { + ethernet0 = &EMAC0; + serial0 = &UART0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu at 0 { + device_type = "cpu"; + model = "PowerPC,apm821xx"; + reg = <0x00000000>; + clock-frequency = <0>; /* Filled in by U-Boot */ + timebase-frequency = <0>; /* Filled in by U-Boot */ + i-cache-line-size = <32>; + d-cache-line-size = <32>; + i-cache-size = <32768>; + d-cache-size = <32768>; + dcr-controller; + dcr-access-method = "native"; + next-level-cache = <&L2C0>; + }; + }; + + memory { + device_type = "memory"; + reg = <0x00000000 0x00000000 0x00000000>; /* Filled in by U-Boot */ + }; + + UIC0: interrupt-controller0 { + compatible = "ibm,uic"; + interrupt-controller; + cell-index = <0>; + dcr-reg = <0x0c0 0x009>; + #address-cells = <0>; + #size-cells = <0>; + #interrupt-cells = <2>; + }; + + UIC1: interrupt-controller1 { + compatible = "ibm,uic"; + interrupt-controller; + cell-index = <1>; + dcr-reg = <0x0d0 0x009>; + #address-cells = <0>; + #size-cells = <0>; + #interrupt-cells = <2>; + interrupts = <0x1e 0x4 0x1f 0x4>; /* cascade */ + interrupt-parent = <&UIC0>; + }; + + UIC2: interrupt-controller2 { + compatible = "ibm,uic"; + interrupt-controller; + cell-index = <2>; + dcr-reg = <0x0e0 0x009>; + #address-cells = <0>; + #size-cells = <0>; + #interrupt-cells = <2>; + interrupts = <0xa 0x4 0xb 0x4>; /* cascade */ + interrupt-parent = <&UIC0>; + }; + + UIC3: interrupt-controller3 { + compatible = "ibm,uic"; + interrupt-controller; + cell-index = <3>; + dcr-reg = <0x0f0 0x009>; + #address-cells = <0>; + #size-cells = <0>; + #interrupt-cells = <2>; + interrupts = <0x10 0x4 0x11 0x4>; /* cascade */ + interrupt-parent = <&UIC0>; + }; + + /* KPH check the following */ + OCM: ocm at 400040000 { + compatible = "ibm,ocm"; + status = "okay"; + cell-index = <1>; + /* configured in U-Boot */ + reg = <4 0x00040000 0x8000>; /* 32K */ + }; + + SDR0: sdr { + compatible = "ibm,sdr-apm821xx"; + dcr-reg = <0x00e 0x002>; + }; + + CPR0: cpr { + compatible = "ibm,cpr-apm821xx"; + dcr-reg = <0x00c 0x002>; + }; + + L2C0: l2c { + compatible = "ibm,l2-cache-apm82181", "ibm,l2-cache"; + dcr-reg = <0x020 0x008 + 0x030 0x008>; + cache-line-size = <32>; + cache-size = <262144>; + interrupt-parent = <&UIC1>; + interrupts = <11 1>; + }; + + /* kph check the below */ + CPM0: cpm { + compatible = "ibm,cpm-apm821xx", "ibm,cpm"; + cell-index = <0>; + dcr-reg = <0x160 0x003>; + pm-cpu = <0x02000000>; + pm-doze = <0x302570F0>; + pm-nap = <0x302570F0>; + pm-deepsleep = <0x302570F0>; + pm-iic-device = <&IIC0>; + pm-emac-device = <&EMAC0>; + }; + + plb { + compatible = "ibm,plb4"; + #address-cells = <2>; + #size-cells = <1>; + ranges; + clock-frequency = <0>; /* Filled in by U-Boot */ + + SDRAM0: sdram { + compatible = "ibm,sdram-apm821xx"; + dcr-reg = <0x010 0x002>; + }; + + /* kph check the below */ + CRYPTO: crypto at 180000 { + compatible = "amcc,ppc460ex-crypto", "amcc,ppc4xx-crypto"; + reg = <4 0x00180000 0x80400>; + interrupt-parent = <&UIC0>; + interrupts = <0x1d 0x4>; + }; + + /* kph check the below */ + PKA: pka at 114000 { + device_type = "pka"; + compatible = "ppc4xx-pka", "amcc,ppc4xx-pka"; + reg = <4 0x00114000 0x4000>; + interrupt-parent = <&UIC0>; + interrupts = <0x14 0x2>; + }; + + /* kph check the below */ + TRNG: trng at 110000 { + compatible = "ppc4xx-trng", "amcc,ppc460ex-rng"; + reg = <4 0x00110000 0x50>; + interrupt-parent = <&UIC1>; + interrupts = <0x3 0x2>; + }; + + MAL0: mcmal { + compatible = "ibm,mcmal2"; + descriptor-memory = "ocm"; + dcr-reg = <0x180 0x062>; + num-tx-chans = <1>; + num-rx-chans = <1>; + #address-cells = <0>; + #size-cells = <0>; + interrupt-parent = <&UIC2>; + interrupts = < /*TXEOB*/ 0x6 0x4 + /*RXEOB*/ 0x7 0x4 + /*SERR*/ 0x3 0x4 + /*TXDE*/ 0x4 0x4 + /*RXDE*/ 0x5 0x4>; + }; + + POB0: opb { + compatible = "ibm,opb"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0xb0000000 0x00000004 0xb0000000 0x50000000>; + clock-frequency = <0>; /* Filled in by U-Boot */ + + EBC0: ebc { + compatible = "ibm,ebc"; + dcr-reg = <0x012 0x002>; + #address-cells = <2>; + #size-cells = <1>; + clock-frequency = <0>; /* Filled in by U-Boot */ + /* ranges property is supplied by U-Boot */ + ranges = < 0x00000003 0x00000000 0xe0000000 0x8000000>; + interrupts = <0x6 0x4>; + interrupt-parent = <&UIC1>; + + /* Ikarem has 32MB of NAND */ + ndfc at 1,0 { + compatible = "ibm,ndfc"; + reg = <00000003 00000000 00000400>; + ccr = <0x00001000>; + bank-settings = <0x80002222>; + #address-cells = <1>; + #size-cells = <1>; + /* 32 MiB NAND Flash */ + nand { + #address-cells = <1>; + #size-cells = <1>; + partition at 0 { + label = "u-boot"; + reg = <0x00000000 0x00170000>; + read-only; + }; + partition at 170000 { + label = "oops"; + reg = <0x00170000 0x00010000>; + }; + partition at 180000 { + label = "ubi"; + reg = <0x00180000 0x01e80000>; + }; + }; + }; + }; + + UART0: serial at ef600400 { + device_type = "serial"; + compatible = "ns16550"; + reg = <0xef600400 0x00000008>; + virtual-reg = <0xef600400>; + clock-frequency = <0>; /* Filled in by U-Boot */ + current-speed = <0>; /* Filled in by U-Boot */ + interrupt-parent = <&UIC0>; + interrupts = <0x1 0x4>; + }; + + GPIO0: gpio at ef600b00 { + compatible = "ibm,ppc4xx-gpio"; + reg = <0xef600b00 0x00000048>; + #gpio-cells = <2>; + gpio-controller; + }; + + gpio-leds { + compatible = "gpio-leds"; + power-green { + label = "mr24:green:power"; + gpios = <&GPIO0 18 1>; + }; + power-orange { + label = "mr24:orange:power"; + gpios = <&GPIO0 19 1>; + }; + lan { + label = "mr24:green:wan"; + gpios = <&GPIO0 17 1>; + }; + ssi-0 { + label = "mr24:green:wifi1"; + gpios = <&GPIO0 23 1>; + }; + ssi-1 { + label = "mr24:green:wifi2"; + gpios = <&GPIO0 22 1>; + }; + ssi-2 { + label = "mr24:green:wifi3"; + gpios = <&GPIO0 21 1>; + }; + ssi-3 { + label = "mr24:green:wifi4"; + gpios = <&GPIO0 20 1>; + }; + }; + + gpio_keys_polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <60>; /* 3 * 20 = 60ms */ + autorepeat; + button at 1 { + label = "Reset button"; + linux,code = <0x198>; /* KEY_RESTART */ + gpios = <&GPIO0 16 1>; + }; + }; + + IIC0: i2c at ef600700 { + compatible = "ibm,iic"; + reg = <0xef600700 0x00000014>; + interrupt-parent = <&UIC0>; + interrupts = <0x2 0x4>; + #address-cells = <1>; + #size-cells = <0>; + /* Boot ROM is at 0x52-0x53, do not touch */ + /* Unknown chip at 0x6e, not sure what it is */ + }; + + IIC1: i2c at ef600800 { + compatible = "ibm,iic"; + reg = <0xef600800 0x00000014>; + interrupt-parent = <&UIC0>; + interrupts = <0x3 0x4>; + }; + + RGMII0: emac-rgmii at ef601500 { + compatible = "ibm,rgmii"; + reg = <0xef601500 0x00000008>; + has-mdio; + }; + + TAH0: emac-tah at ef601350 { + compatible = "ibm,tah"; + reg = <0xef601350 0x00000030>; + }; + + EMAC0: ethernet at ef600c00 { + device_type = "network"; + compatible = "ibm,emac-apm821xx", "ibm,emac4sync"; + interrupt-parent = <&EMAC0>; + interrupts = <0x0 0x1>; + #interrupt-cells = <1>; + #address-cells = <0>; + #size-cells = <0>; + interrupt-map = ; + reg = <0xef600c00 0x000000c4>; + local-mac-address = [000000000000]; /* Filled in by U-Boot */ + mal-device = <&MAL0>; + mal-tx-channel = <0>; + mal-rx-channel = <0>; + cell-index = <0>; + max-frame-size = <9000>; + rx-fifo-size = <16384>; + tx-fifo-size = <2048>; + phy-mode = "rgmii"; + phy-map = <0x00000000>; + rgmii-device = <&RGMII0>; + rgmii-channel = <0>; + tah-device = <&TAH0>; + tah-channel = <0>; + has-inverted-stacr-oc; + has-new-stacr-staopc; + }; + }; + + PCIE0: pciex at d00000000 { + device_type = "pci"; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + compatible = "ibm,plb-pciex-apm821xx", "ibm,plb-pciex"; + primary; + port = <0x0>; /* port number */ + reg = <0x0000000d 0x00000000 0x20000000 /* Config space access */ + 0x0000000c 0x08010000 0x00001000>; /* Registers */ + dcr-reg = <0x100 0x020>; + sdr-base = <0x300>; + + /* Outbound ranges, one memory and one IO, + * later cannot be changed + */ + ranges = <0x02000000 0x00000000 0x80000000 0x0000000e 0x00000000 0x00000000 0x80000000 + 0x02000000 0x00000000 0x00000000 0x0000000f 0x00000000 0x00000000 0x00100000 + 0x01000000 0x00000000 0x00000000 0x0000000f 0x80000000 0x00000000 0x00010000>; + + /* Inbound 2GB range starting at 0 */ + dma-ranges = <0x42000000 0x0 0x0 0x0 0x0 0x0 0x80000000>; + + /* This drives busses 40 to 0x7f */ + bus-range = <0x40 0x7f>; + + /* Legacy interrupts (note the weird polarity, the bridge seems + * to invert PCIe legacy interrupts). + * We are de-swizzling here because the numbers are actually for + * port of the root complex virtual P2P bridge. But I want + * to avoid putting a node for it in the tree, so the numbers + * below are basically de-swizzled numbers. + * The real slot is on idsel 0, so the swizzling is 1:1 + */ + interrupt-map-mask = <0x0 0x0 0x0 0x7>; + interrupt-map = < + 0x0 0x0 0x0 0x1 &UIC3 0xc 0x4 /* swizzled int A */ + 0x0 0x0 0x0 0x2 &UIC3 0xd 0x4 /* swizzled int B */ + 0x0 0x0 0x0 0x3 &UIC3 0xe 0x4 /* swizzled int C */ + 0x0 0x0 0x0 0x4 &UIC3 0xf 0x4 /* swizzled int D */>; + }; + + MSI: ppc4xx-msi at C10000000 { + compatible = "amcc,ppc4xx-msi", "ppc4xx-msi"; + reg = < 0xC 0x10000000 0x100 + 0xC 0x10000000 0x100>; + sdr-base = <0x36C>; + msi-data = <0x00004440>; + msi-mask = <0x0000ffe0>; + interrupts =<0 1 2 3 4 5 6 7>; + interrupt-parent = <&MSI>; + #interrupt-cells = <1>; + #address-cells = <0>; + #size-cells = <0>; + msi-available-ranges = <0x0 0x100>; + interrupt-map = < + 0 &UIC3 0x18 1 + 1 &UIC3 0x19 1 + 2 &UIC3 0x1A 1 + 3 &UIC3 0x1B 1 + 4 &UIC3 0x1C 1 + 5 &UIC3 0x1D 1 + 6 &UIC3 0x1E 1 + 7 &UIC3 0x1F 1 + >; + }; + }; + + chosen { + linux,stdout-path = "/plb/opb/serial at ef600400"; + }; +}; diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index a9608e7..69f9fb7 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -11,6 +11,46 @@ IMAGE_PROFILE:=$(if $(PROFILE),$(PROFILE),Default) DEVICE_VARS += DTS IMAGE_SIZE +define Image/cpiogz + ( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9n >$(KDIR_TMP)/$(IMG_PREFIX)-rootfs.cpio.gz ) +endef + +define Build/copy-file + cat "$(1)" > "$@" +endef + +define Build/MerakiAdd-dtb + $(call Image/BuildDTB,../dts/$(DTS).dts,$@.dtb) + ( \ + dd if=$@.dtb bs=$(DTB_SIZE) conv=sync; \ + dd if=$@ bs=$(BLOCKSIZE) conv=sync; \ + ) > $@.new + @mv $@.new $@ +endef + +define Build/MerakiAdd-initramfs + $(call Image/cpiogz) + + -$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) -O linux -T ramdisk \ + -C gzip -n "$(PROFILE) OpenWRT rootfs" \ + -d $(KDIR_TMP)/$(IMG_PREFIX)-rootfs.cpio.gz \ + $(KDIR_TMP)/$(IMG_PREFIX)-uramdisk.image.gz + + ( \ + dd if=$@ bs=1k conv=sync; \ + dd if=$(KDIR_TMP)/$(IMG_PREFIX)-uramdisk.image.gz bs=$(BLOCKSIZE) conv=sync; \ + ) > $@.new + @mv $@.new $@ +endef + +define Build/MerakiNAND + -$(STAGING_DIR_HOST)/bin/mkmerakifw \ + -B $(BOARDNAME) -s \ + -i $@ \ + -o $@.new + @cp $@.new $@ +endef + define Device/Default BOARDNAME := DEVICE_PROFILE = $$(BOARDNAME) @@ -21,4 +61,21 @@ define Device/Default endef TARGET_DEVICES += Default +define Device/mr24 + BOARDNAME = MR24 + BLOCKSIZE := 64k + IMAGES := sysupgrade.tar + DTS := MR24 + DTB_SIZE := 63k + KERNEL_SIZE := 2048k + IMAGE_SIZE := 8191k + KERNEL_ENTRY := 0x00000000 + KERNEL_LOADADDR := 0x00000000 + KERNEL := kernel-bin | gzip | uImage gzip | MerakiAdd-dtb | MerakiNAND + KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux | gzip | uImage gzip | MerakiAdd-dtb | pad-to 2047k | MerakiAdd-initramfs | MerakiNAND + IMAGE/sysupgrade.tar := sysupgrade-nand + +endef +TARGET_DEVICES += mr24 + $(eval $(call BuildImage)) diff --git a/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch b/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch new file mode 100644 index 0000000..45892f2 --- /dev/null +++ b/target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch @@ -0,0 +1,31 @@ +--- a/arch/powerpc/platforms/44x/Kconfig ++++ b/arch/powerpc/platforms/44x/Kconfig +@@ -40,6 +40,19 @@ config EBONY + help + This option enables support for the IBM PPC440GP evaluation board. + ++config IKAREM ++ bool "Ikarem" ++ depends on 44x ++ default n ++ select PPC44x_SIMPLE ++ select APM821xx ++ select PCI_MSI ++ select PPC4xx_MSI ++ select PPC4xx_PCI_EXPRESS ++ select IBM_EMAC_RGMII ++ help ++ This option enables support for the Cisco Meraki MR24 (Ikarem) Access Point. ++ + config SAM440EP + bool "Sam440ep" + depends on 44x +--- a/arch/powerpc/platforms/44x/ppc44x_simple.c ++++ b/arch/powerpc/platforms/44x/ppc44x_simple.c +@@ -62,6 +62,7 @@ static char *board[] __initdata = { + "amcc,sequoia", + "amcc,taishan", + "amcc,yosemite", ++ "meraki,ikarem", + "mosaixtech,icon" + }; diff --git a/target/linux/apm821xx/profiles/meraki.mk b/target/linux/apm821xx/profiles/meraki.mk new file mode 100644 index 0000000..c22a485 --- /dev/null +++ b/target/linux/apm821xx/profiles/meraki.mk @@ -0,0 +1,17 @@ +# +# Copyright (C) 2016 Chris Blake (chrisrblake93 at gmail.com) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/MR24 + NAME:=Meraki MR24 + PACKAGES:=kmod-spi-gpio kmod-gpio-button-hotplug swconfig kmod-ath9k +endef + +define Profile/MR24/description + Package set optimized for the Cisco Meraki MR24 Access Point. +endef + +$(eval $(call Profile,MR24)) diff --git a/tools/firmware-utils/src/mkmerakifw.c b/tools/firmware-utils/src/mkmerakifw.c index 241bb33..61b81c6 100644 --- a/tools/firmware-utils/src/mkmerakifw.c +++ b/tools/firmware-utils/src/mkmerakifw.c @@ -62,6 +62,16 @@ static const struct board_info boards[] = { 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09}, }, { + .id = "mr24", + .description = "Meraki MR24 Access Point", + .magic = 0x8e73ed8a, + .imagelen = 0x00800000, + .statichash = {0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff}, + }, { + /* terminating entry */ } }; -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zajec5 at gmail.com Mon Apr 4 02:50:10 2016 From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=) Date: Mon, 4 Apr 2016 08:50:10 +0200 Subject: [OpenWrt-Devel] [PATCH 0/8] [ipq806x] Add basic support for Linksys EA8500 In-Reply-To: References: Message-ID: Hi Adrian, First of all, please DON'T send your e-mails as HTML ones (text/html). On 1 April 2016 at 02:35, Adrian Panella wrote: > This patchset adds support for the Linksys AC2600 EA8500 router. You should use a proper prefix for all your patches. E.g. bootargs: Add mangled bootargs for ATAG to DTB should be: ipq806x: bootargs: Add mangled bootargs for ATAG to DTB _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Mon Apr 4 05:09:23 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Mon, 04 Apr 2016 11:09:23 +0200 Subject: [OpenWrt-Devel] [RFC] ar71xx: Reset QCA955x SGMII link on speed change In-Reply-To: <1459514507-20044-1-git-send-email-sven@open-mesh.com> References: <1459514507-20044-1-git-send-email-sven@open-mesh.com> Message-ID: <2346013.fkrCfbxBLS@bentobox> On Friday 01 April 2016 14:41:47 Sven Eckelmann wrote: [...] > static void qca955x_set_speed_xmii(int speed) > { > void __iomem *base; > @@ -381,6 +395,100 @@ static void qca955x_set_speed_xmii(int speed) > base = ioremap_nocache(AR71XX_PLL_BASE, AR71XX_PLL_SIZE); > __raw_writel(val, base + QCA955X_PLL_ETH_XMII_CONTROL_REG); > iounmap(base); > + > + // TODO: find out if something like qca955x_reset_xmii(); is needed > +} I was told that the GMAC0 also needs some special bits set to fix some problems when switching between different half/full duplex speeds. The only thing I was told is that qca955x_soc_gmac_set_link requires athr_reg_rmw_set(0xb900023c, 0x68000001); Of course, it is not for QCAs current driver (which is a heavily modified driver from OpenWrt) but their old one https://github.com/Existed/ethernet_driver/blob/3bde1bb60d31d78fee14cce0d8ea9539d8227a0d/qca955x.c#L587 I know that this register is IG_ACL_CSR for GMAC0 and BIT(0) is IG_ACL_DISABLE and should only disable the ingress ACL. But I have absolutely no idea what BIT(27), BIT(29) and BIT(30) are. Does anyone know what these bits are? I personally don't have yet feedback if this change really helps. But a equally bad hack as the earlier one (sgmii) would be: --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -387,6 +387,15 @@ static void ar934x_set_speed_ge0(int speed) #define QCA955X_GMAC_REG_SGMII_RESET_TX_CLK_N BIT(1) #define QCA955X_GMAC_REG_SGMII_RESET_RX_CLK_N BIT(0) +#define QCA955X_GE0_BASE 0x19000000 +#define QCA955X_GE0_SIZE 0x2F0 + +#define QCA955X_GE0_IG_ACL_CSR 0x23C +#define QCA955X_GE0_IG_ACL_DISABLE BIT(0) +#define QCA955X_GE0_IG_ACL_MAGIC0 BIT(27) +#define QCA955X_GE0_IG_ACL_MAGIC1 BIT(29) +#define QCA955X_GE0_IG_ACL_MAGIC2 BIT(30) + static void qca955x_set_speed_xmii(int speed) { void __iomem *base; @@ -396,7 +405,14 @@ static void qca955x_set_speed_xmii(int speed) __raw_writel(val, base + QCA955X_PLL_ETH_XMII_CONTROL_REG); iounmap(base); - // TODO: find out if something like qca955x_reset_xmii(); is needed + /* WARNING ugly PoC code ahead */ + base = ioremap_nocache(QCA955X_GE0_BASE, QCA955X_GE0_SIZE); + val = QCA955X_GE0_IG_ACL_DISABLE | + QCA955X_GE0_IG_ACL_MAGIC0 | + QCA955X_GE0_IG_ACL_MAGIC1 | + QCA955X_GE0_IG_ACL_MAGIC2; + __raw_writel(val, base + QCA955X_GE0_IG_ACL_CSR); + iounmap(base); } static void qca955x_reset_sgmii(void) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part. URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.engberg.lists at pyret.net Mon Apr 4 06:08:56 2016 From: daniel.engberg.lists at pyret.net (Daniel Engberg) Date: Mon, 4 Apr 2016 12:08:56 +0200 Subject: [OpenWrt-Devel] ramips: Disable the SD driver by default on MT7621 Message-ID: <57023D38.9080107@pyret.net> The SD driver has been a long and dragging issue on the MT7621 platforms as it hasn't worked for months resulting in unbootable devices. Until it's fixed, disable it in the default profiles. Reports / Discussed here: https://dev.openwrt.org/ticket/21392 https://dev.openwrt.org/ticket/21834 https://dev.openwrt.org/ticket/21995 https://forum.openwrt.org/viewtopic.php?id=59092 Signed-off-by: Daniel Engberg --- diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk b/target/linux/ramips/mt7621/profiles/firefly.mk index bc50ab4..9797527 100644 --- a/target/linux/ramips/mt7621/profiles/firefly.mk +++ b/target/linux/ramips/mt7621/profiles/firefly.mk @@ -8,7 +8,7 @@ define Profile/FIREWRT NAME:=Firefly FireWRT PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid kmod-sdhci-mt7620 \ + kmod-usb-core kmod-usb3 kmod-usb-hid \ kmod-ledtrig-usbdev endef diff --git a/target/linux/ramips/mt7621/profiles/misc.mk b/target/linux/ramips/mt7621/profiles/misc.mk index ee25b95..06a9d44 100644 --- a/target/linux/ramips/mt7621/profiles/misc.mk +++ b/target/linux/ramips/mt7621/profiles/misc.mk @@ -9,7 +9,7 @@ define Profile/PBR-M1 NAME:=PBR-M1 Device FEATURES+=rtc PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid kmod-sdhci-mt7620 \ + kmod-usb-core kmod-usb3 kmod-usb-hid \ kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci \ kmod-rtc-pcf8563 endef diff --git a/target/linux/ramips/mt7621/profiles/mqmaker.mk b/target/linux/ramips/mt7621/profiles/mqmaker.mk index ae35e7d..8acc116 100644 --- a/target/linux/ramips/mt7621/profiles/mqmaker.mk +++ b/target/linux/ramips/mt7621/profiles/mqmaker.mk @@ -9,7 +9,7 @@ define Profile/witi NAME:=MQmaker WiTi FEATURES+=rtc PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid kmod-sdhci-mt7620 \ + kmod-usb-core kmod-usb3 kmod-usb-hid \ kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci \ kmod-rtc-pcf8563 kmod-i2c-mt7621 endef diff --git a/target/linux/ramips/mt7621/profiles/zbt.mk b/target/linux/ramips/mt7621/profiles/zbt.mk index 07131d1..0073645 100644 --- a/target/linux/ramips/mt7621/profiles/zbt.mk +++ b/target/linux/ramips/mt7621/profiles/zbt.mk @@ -8,7 +8,7 @@ define Profile/ZBT-WG2626 NAME:=ZBT-WG2626 Device PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-sdhci-mt7620 \ + kmod-usb-core kmod-usb3 \ kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci endef _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Mon Apr 4 12:24:38 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Mon, 04 Apr 2016 18:24:38 +0200 Subject: [OpenWrt-Devel] [RFC] ar71xx: Reset QCA955x SGMII link on speed change In-Reply-To: <1459514507-20044-1-git-send-email-sven@open-mesh.com> References: <1459514507-20044-1-git-send-email-sven@open-mesh.com> Message-ID: <2320020.yht3Hohr09@bentobox> On Friday 01 April 2016 14:41:47 Sven Eckelmann wrote: > From: Sven Eckelmann > > The SGMII link of the QCA955x seems to be unstable when the PHY changes the > link speed. Reseting the SGMII and the PHY management control seems to > resolve this problem. > > This was observed with an AR8033 and QCA9558 > > The code of this RFC is not meant to be an actual patch. It should show > what the u-boot for QCA955x does and what seemed to work(tm) in my limited > tests. It would be interesting to know whether this was also noticed by > other people and how they fixed it (when they fixed it). > > If it is already known than it would maybe good to find a better way to > integrate it with ag71xx. Right now it just uses the set_speed callback to > start the reset. > > Signed-off-by: Sven Eckelmann > --- Just did a search in the codeaurora repository. I found at least some extra information: * SGMII reset code (like in this "RFC"/u-boot): https://us.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?id=38de68c74bac2147250ce21879a6f1a7adda5d49 * The IG_ACL_CSR (AG71XX_REG_IG_ACL) change from my second hack: https://us.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?id=7e0e30d4a5e40927a9fa005a0c9ee9c7e16dc020 (the information about the chip family is not that easily available in the original OpenWrt driver. so it is not that easy to implement without adding more stuff to pdata - but easy when the pdata can also be modified at the same time) * The "description" of the SGMII_DEBUG register can be found in the u-boot sources (955x.h) https://us.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?id=96779a2ee2470c15135dc1a7aa80d20eced4dc89 Kind regards, Sven _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zioproto at gmail.com Mon Apr 4 16:34:23 2016 From: zioproto at gmail.com (Saverio Proto) Date: Mon, 4 Apr 2016 22:34:23 +0200 Subject: [OpenWrt-Devel] 15.05.1 - Chaos Calmer In-Reply-To: <56E9A88C.5060409@einfach.org> References: <56E94C5D.1030302@openwrt.org> <56E9A88C.5060409@einfach.org> Message-ID: > Great! Thanks for your good work! > Could you please add a tag for 15.05.1 in the git repo? That would be great. I am trying to git bisect a bug and I have no idea on top of what commit is 15.05.1 built. thank you :) Saverio _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From br1 at einfach.org Mon Apr 4 16:38:39 2016 From: br1 at einfach.org (Bruno Randolf) Date: Mon, 4 Apr 2016 21:38:39 +0100 Subject: [OpenWrt-Devel] 15.05.1 - Chaos Calmer In-Reply-To: References: <56E94C5D.1030302@openwrt.org> <56E9A88C.5060409@einfach.org> Message-ID: <5702D0CF.5010107@einfach.org> On 04/04/2016 09:34 PM, Saverio Proto wrote: >> Great! Thanks for your good work! >> Could you please add a tag for 15.05.1 in the git repo? > > That would be great. I am trying to git bisect a bug and I have no > idea on top of what commit is 15.05.1 built. There is a tag for it already: https://github.com/openwrt/openwrt/tags bruno _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From psidhu at gateworks.com Mon Apr 4 17:43:11 2016 From: psidhu at gateworks.com (Pushpal Sidhu) Date: Mon, 4 Apr 2016 14:43:11 -0700 Subject: [OpenWrt-Devel] [PATCH 0/2] Fix PCI for cns3xxx platform Message-ID: <1459806193-16454-1-git-send-email-psidhu@gateworks.com> Currently, PCI does not work on the cns3xxx platform due to several bugs. Krzysztof Ha?asa has authored two patches which fix some regressions. Links to the discussion can be found here: * http://www.spinics.net/lists/arm-kernel/msg490185.html (in the next/fixes-non-critical for ARM) * http://www.spinics.net/lists/linux-pci/msg49796.html (currently pending) Note that I executed 'make target/linux/refresh' to put the patches into the proper 'OpenWrt' format. Pushpal Sidhu (2): cns3xxx: backport pci fix for cns3xxx_write_config cns3xxx: set both MPS 'and' MRSS to 128 target/linux/cns3xxx/patches-4.4/033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch | 19 +++++++++++++++++++ .../cns3xxx/patches-4.4/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch | 23 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) - Pushpal _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From psidhu at gateworks.com Mon Apr 4 17:43:12 2016 From: psidhu at gateworks.com (Pushpal Sidhu) Date: Mon, 4 Apr 2016 14:43:12 -0700 Subject: [OpenWrt-Devel] [PATCH 1/2] cns3xxx: backport pci fix for cns3xxx_write_config In-Reply-To: <1459806193-16454-1-git-send-email-psidhu@gateworks.com> References: <1459806193-16454-1-git-send-email-psidhu@gateworks.com> Message-ID: <1459806193-16454-2-git-send-email-psidhu@gateworks.com> Fix is required to properly set pci config bits. Original Patch: https://patchwork.ozlabs.org/patch/596170/ Signed-off-by: Pushpal Sidhu --- .../033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 target/linux/cns3xxx/patches-4.4/033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch diff --git a/target/linux/cns3xxx/patches-4.4/033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch b/target/linux/cns3xxx/patches-4.4/033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch new file mode 100644 index 0000000..3f5ab06 --- /dev/null +++ b/target/linux/cns3xxx/patches-4.4/033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch @@ -0,0 +1,19 @@ +--- a/arch/arm/mach-cns3xxx/pcie.c ++++ b/arch/arm/mach-cns3xxx/pcie.c +@@ -220,13 +220,13 @@ static void cns3xxx_write_config(struct + u32 mask = (0x1ull << (size * 8)) - 1; + int shift = (where % 4) * 8; + +- v = readl_relaxed(base + (where & 0xffc)); ++ v = readl_relaxed(base); + + v &= ~(mask << shift); + v |= (val & mask) << shift; + +- writel_relaxed(v, base + (where & 0xffc)); +- readl_relaxed(base + (where & 0xffc)); ++ writel_relaxed(v, base); ++ readl_relaxed(base); + } + + static void __init cns3xxx_pcie_hw_init(struct cns3xxx_pcie *cnspci) -- 2.7.2 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From psidhu at gateworks.com Mon Apr 4 17:43:13 2016 From: psidhu at gateworks.com (Pushpal Sidhu) Date: Mon, 4 Apr 2016 14:43:13 -0700 Subject: [OpenWrt-Devel] [PATCH 2/2] cns3xxx: set both MPS 'and' MRSS to 128 In-Reply-To: <1459806193-16454-1-git-send-email-psidhu@gateworks.com> References: <1459806193-16454-1-git-send-email-psidhu@gateworks.com> Message-ID: <1459806193-16454-3-git-send-email-psidhu@gateworks.com> Fixes some DMA issues with this platform. Because this isn't currently accepted, and can potentially disrupt other platforms (as read in commit log), I will leave this cns3xxx specific. Original Patch: https://patchwork.ozlabs.org/patch/600024/ Signed-off-by: Pushpal Sidhu --- ...ER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 target/linux/cns3xxx/patches-4.4/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch diff --git a/target/linux/cns3xxx/patches-4.4/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch b/target/linux/cns3xxx/patches-4.4/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch new file mode 100644 index 0000000..208c80a --- /dev/null +++ b/target/linux/cns3xxx/patches-4.4/130-Extend-PCIE_BUS_PEER2PEER-to-set-MRSS-128-to-fix-CNS3xxx-BM-DMA..patch @@ -0,0 +1,23 @@ +--- a/drivers/pci/probe.c ++++ b/drivers/pci/probe.c +@@ -1924,7 +1924,8 @@ static void pcie_write_mrrs(struct pci_d + /* In the "safe" case, do not configure the MRRS. There appear to be + * issues with setting MRRS to 0 on a number of devices. + */ +- if (pcie_bus_config != PCIE_BUS_PERFORMANCE) ++ if (pcie_bus_config != PCIE_BUS_PERFORMANCE && ++ pcie_bus_config != PCIE_BUS_PEER2PEER) + return; + + /* For Max performance, the MRRS must be set to the largest supported +--- a/include/linux/pci.h ++++ b/include/linux/pci.h +@@ -756,7 +756,7 @@ enum pcie_bus_config_types { + PCIE_BUS_DEFAULT, /* ensure MPS matches upstream bridge */ + PCIE_BUS_SAFE, /* use largest MPS boot-time devices support */ + PCIE_BUS_PERFORMANCE, /* use MPS and MRRS for best performance */ +- PCIE_BUS_PEER2PEER, /* set MPS = 128 for all devices */ ++ PCIE_BUS_PEER2PEER, /* set MPS and MRSS to 128 for all devices */ + }; + + extern enum pcie_bus_config_types pcie_bus_config; -- 2.7.2 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From adam at semicircular.net Tue Apr 5 02:20:08 2016 From: adam at semicircular.net (Adam Kent) Date: Tue, 5 Apr 2016 06:20:08 +0000 Subject: [OpenWrt-Devel] [PATCH] Fixes for LinkIt 7688 Message-ID: <1459837208-5544-1-git-send-email-adam@semicircular.net> Misc fixes for LinkIt 7688 board: - Copy the right wireless firmware for the mt7688 - Add back '0065-mt7688-fixes.patch', left out after the move to Linux 4.4. - Remove SPI_DEV from linux config which otherwise causes a massive warning - Add wmac to LINKIT7688.dts so wireless works --- package/kernel/mt76/Makefile | 2 +- target/linux/ramips/dts/LINKIT7688.dts | 4 ++ target/linux/ramips/mt7688/config-4.4 | 2 +- .../ramips/patches-4.4/0065-mt7688-fixes.patch | 73 ++++++++++++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 8800b13..33f61cb 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -55,7 +55,7 @@ endef define KernelPackage/mt76/install $(INSTALL_DIR) $(1)/lib/firmware cp \ - $(if $(CONFIG_TARGET_ramips_mt7628), \ + $(if $(CONFIG_TARGET_ramips_mt7628) || $(CONFIG_TARGET_ramips_mt7688), \ $(PKG_BUILD_DIR)/firmware/mt7628_e1.bin \ $(PKG_BUILD_DIR)/firmware/mt7628_e2.bin \ ) \ diff --git a/target/linux/ramips/dts/LINKIT7688.dts b/target/linux/ramips/dts/LINKIT7688.dts index 5ec29ac..2dfb98c 100644 --- a/target/linux/ramips/dts/LINKIT7688.dts +++ b/target/linux/ramips/dts/LINKIT7688.dts @@ -59,6 +59,10 @@ }; }; + wmac at 10300000 { + status = "okay"; + }; + palmbus at 10000000 { spi at b00 { status = "okay"; diff --git a/target/linux/ramips/mt7688/config-4.4 b/target/linux/ramips/mt7688/config-4.4 index c1e8df2..2bfd3f8 100644 --- a/target/linux/ramips/mt7688/config-4.4 +++ b/target/linux/ramips/mt7688/config-4.4 @@ -193,7 +193,7 @@ CONFIG_SPI=y CONFIG_SPI_MASTER=y CONFIG_SPI_MT7621=y # CONFIG_SPI_RT2880 is not set -CONFIG_SPI_SPIDEV=y +# CONFIG_SPI_SPIDEV is not set CONFIG_SRCU=y CONFIG_SWCONFIG=y CONFIG_SYSCTL_EXCEPTION_TRACE=y diff --git a/target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch b/target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch new file mode 100644 index 0000000..b96be91 --- /dev/null +++ b/target/linux/ramips/patches-4.4/0065-mt7688-fixes.patch @@ -0,0 +1,73 @@ +--- a/arch/mips/ralink/mt7620.c ++++ b/arch/mips/ralink/mt7620.c +@@ -107,31 +107,31 @@ static struct rt2880_pmx_group mt7620a_p + }; + + static struct rt2880_pmx_func pwm1_grp_mt7628[] = { +- FUNC("sdcx", 3, 19, 1), ++ FUNC("sdxc", 3, 19, 1), + FUNC("utif", 2, 19, 1), + FUNC("gpio", 1, 19, 1), + FUNC("pwm", 0, 19, 1), + }; + + static struct rt2880_pmx_func pwm0_grp_mt7628[] = { +- FUNC("sdcx", 3, 18, 1), ++ FUNC("sdxc", 3, 18, 1), + FUNC("utif", 2, 18, 1), + FUNC("gpio", 1, 18, 1), + FUNC("pwm", 0, 18, 1), + }; + + static struct rt2880_pmx_func uart2_grp_mt7628[] = { +- FUNC("sdcx", 3, 20, 2), ++ FUNC("sdxc", 3, 20, 2), + FUNC("pwm", 2, 20, 2), + FUNC("gpio", 1, 20, 2), +- FUNC("uart", 0, 20, 2), ++ FUNC("uart2", 0, 20, 2), + }; + + static struct rt2880_pmx_func uart1_grp_mt7628[] = { + FUNC("sdcx", 3, 45, 2), + FUNC("pwm", 2, 45, 2), + FUNC("gpio", 1, 45, 2), +- FUNC("uart", 0, 45, 2), ++ FUNC("uart1", 0, 45, 2), + }; + + static struct rt2880_pmx_func i2c_grp_mt7628[] = { +@@ -143,21 +143,21 @@ static struct rt2880_pmx_func i2c_grp_mt + + static struct rt2880_pmx_func refclk_grp_mt7628[] = { FUNC("reclk", 0, 36, 1) }; + static struct rt2880_pmx_func perst_grp_mt7628[] = { FUNC("perst", 0, 37, 1) }; +-static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 15, 38) }; ++static struct rt2880_pmx_func wdt_grp_mt7628[] = { FUNC("wdt", 0, 38, 1) }; + static struct rt2880_pmx_func spi_grp_mt7628[] = { FUNC("spi", 0, 7, 4) }; + + static struct rt2880_pmx_func sd_mode_grp_mt7628[] = { + FUNC("jtag", 3, 22, 8), + FUNC("utif", 2, 22, 8), + FUNC("gpio", 1, 22, 8), +- FUNC("sdcx", 0, 22, 8), ++ FUNC("sdxc", 0, 22, 8), + }; + + static struct rt2880_pmx_func uart0_grp_mt7628[] = { + FUNC("-", 3, 12, 2), + FUNC("-", 2, 12, 2), + FUNC("gpio", 1, 12, 2), +- FUNC("uart", 0, 12, 2), ++ FUNC("uart0", 0, 12, 2), + }; + + static struct rt2880_pmx_func i2s_grp_mt7628[] = { +@@ -438,6 +438,8 @@ void __init ralink_clk_init(void) + ralink_clk_add("10000b00.spi", sys_rate); + ralink_clk_add("10000b40.spi", sys_rate); + ralink_clk_add("10000c00.uartlite", periph_rate); ++ ralink_clk_add("10000d00.uart1", periph_rate); ++ ralink_clk_add("10000e00.uart2", periph_rate); + ralink_clk_add("10180000.wmac", xtal_rate); + + if (IS_ENABLED(CONFIG_USB) && is_mt76x8()) { -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Wojciech.Dubowik at neratec.com Tue Apr 5 04:07:31 2016 From: Wojciech.Dubowik at neratec.com (Wojciech Dubowik) Date: Tue, 5 Apr 2016 10:07:31 +0200 Subject: [OpenWrt-Devel] [PATCH 0/3] kirkwood: Use new UBI image style for Iconnect Message-ID: <1459843654-1130-1-git-send-email-Wojciech.Dubowik@neratec.com> Adapt Iconnect to new UBI (kernel, squashfs, ubifs) image format. Wojciech Dubowik (3): uboot-kirkwood: New ubi flash format for Iconnect kirkwood: Migrate Iconnect to new ubi image format krikwood: Make Iconnect image use new ubi format style .../boot/uboot-kirkwood/patches/120-iconnect.patch | 20 ++++++++------------ .../kirkwood/base-files/lib/upgrade/platform.sh | 6 ++++-- target/linux/kirkwood/image/Makefile | 11 +++++++---- target/linux/kirkwood/patches-4.4/130-iconnect.patch | 2 +- 4 files changed, 20 insertions(+), 19 deletions(-) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Wojciech.Dubowik at neratec.com Tue Apr 5 04:07:32 2016 From: Wojciech.Dubowik at neratec.com (Wojciech Dubowik) Date: Tue, 5 Apr 2016 10:07:32 +0200 Subject: [OpenWrt-Devel] [PATCH 1/3] uboot-kirkwood: New ubi flash format for Iconnect In-Reply-To: <1459843654-1130-1-git-send-email-Wojciech.Dubowik@neratec.com> References: <1459843654-1130-1-git-send-email-Wojciech.Dubowik@neratec.com> Message-ID: <1459843654-1130-2-git-send-email-Wojciech.Dubowik@neratec.com> Migrate Iconnect to new ubi image style like for dockstar. Signed-off-by: Wojciech Dubowik --- .../boot/uboot-kirkwood/patches/120-iconnect.patch | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/package/boot/uboot-kirkwood/patches/120-iconnect.patch b/package/boot/uboot-kirkwood/patches/120-iconnect.patch index e525ca0..cfc1403 100644 --- a/package/boot/uboot-kirkwood/patches/120-iconnect.patch +++ b/package/boot/uboot-kirkwood/patches/120-iconnect.patch @@ -1,6 +1,6 @@ --- a/include/configs/iconnect.h +++ b/include/configs/iconnect.h -@@ -66,30 +66,35 @@ +@@ -66,30 +66,29 @@ #define CONFIG_ENV_IS_NOWHERE #endif #define CONFIG_ENV_SIZE 0x20000 @@ -13,14 +13,12 @@ #define CONFIG_BOOTCOMMAND \ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \ - "ubi part rootfs; " \ -+ "ubi part root; " \ - "ubifsmount ubi:rootfs; " \ - "ubifsload 0x800000 ${kernel}; " \ +- "ubifsmount ubi:rootfs; " \ +- "ubifsload 0x800000 ${kernel}; " \ - "bootm 0x800000" -+ "ubifsload 0x700000 ${fdt}; " \ -+ "ubifsumount; " \ -+ "fdt addr 0x700000; fdt resize; fdt chosen; " \ -+ "bootz 0x800000 - 0x700000" ++ "ubi part ubi; " \ ++ "ubi read 0x800000 kernel; " \ ++ "bootz 0x800000" #define CONFIG_MTDPARTS \ - "mtdparts=orion_nand:" \ @@ -31,7 +29,7 @@ + "0xe0000 at 0x0(uboot)," \ + "0x20000 at 0xe0000(uboot_env)," \ + "0x100000 at 0x100000(second_stage_uboot)," \ -+ "- at 0x200000(root)\0" ++ "- at 0x200000(ubi)\0" #define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0" \ @@ -39,9 +37,7 @@ "mtdparts="CONFIG_MTDPARTS \ - "kernel=/boot/uImage\0" \ - "bootargs_root=noinitrd ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs\0" -+ "kernel=/boot/zImage\0" \ -+ "fdt=/boot/iconnect.dtb\0" \ -+ "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0" ++ "bootargs_root=\0" /* * Ethernet driver configuration -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Wojciech.Dubowik at neratec.com Tue Apr 5 04:07:33 2016 From: Wojciech.Dubowik at neratec.com (Wojciech Dubowik) Date: Tue, 5 Apr 2016 10:07:33 +0200 Subject: [OpenWrt-Devel] [PATCH 2/3] kirkwood: Migrate Iconnect to new ubi image format In-Reply-To: <1459843654-1130-1-git-send-email-Wojciech.Dubowik@neratec.com> References: <1459843654-1130-1-git-send-email-Wojciech.Dubowik@neratec.com> Message-ID: <1459843654-1130-3-git-send-email-Wojciech.Dubowik@neratec.com> Default partition name is now ubi. Signed-off-by: Wojciech Dubowik --- target/linux/kirkwood/patches-4.4/130-iconnect.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/kirkwood/patches-4.4/130-iconnect.patch b/target/linux/kirkwood/patches-4.4/130-iconnect.patch index c95579d..2d0a376 100644 --- a/target/linux/kirkwood/patches-4.4/130-iconnect.patch +++ b/target/linux/kirkwood/patches-4.4/130-iconnect.patch @@ -34,7 +34,7 @@ - label = "boot"; - reg = <0x980000 0x1f400000>; + partition at 200000 { -+ label = "root"; ++ label = "ubi"; + reg = <0x200000 0x1fe00000>; }; }; -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Wojciech.Dubowik at neratec.com Tue Apr 5 04:07:34 2016 From: Wojciech.Dubowik at neratec.com (Wojciech Dubowik) Date: Tue, 5 Apr 2016 10:07:34 +0200 Subject: [OpenWrt-Devel] [PATCH 3/3] krikwood: Make Iconnect image use new ubi format style In-Reply-To: <1459843654-1130-1-git-send-email-Wojciech.Dubowik@neratec.com> References: <1459843654-1130-1-git-send-email-Wojciech.Dubowik@neratec.com> Message-ID: <1459843654-1130-4-git-send-email-Wojciech.Dubowik@neratec.com> To flash first time follow instructions in commit: "kirkwood/dockstar: use ubi(kernel, squashfs, ubifs) images" Signed-off-by: Wojciech Dubowik --- target/linux/kirkwood/base-files/lib/upgrade/platform.sh | 6 ++++-- target/linux/kirkwood/image/Makefile | 11 +++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh index be5f101..af0ac7c 100644 --- a/target/linux/kirkwood/base-files/lib/upgrade/platform.sh +++ b/target/linux/kirkwood/base-files/lib/upgrade/platform.sh @@ -14,7 +14,8 @@ platform_check_image() { } return 0 ;; - "dockstar") + "dockstar"|\ + "iconnect") nand_do_platform_check $board $1 return $? ;; @@ -39,7 +40,8 @@ platform_pre_upgrade() { local board=$(kirkwood_board_name) case "$board" in - "dockstar") + "dockstar"|\ + "iconnect") nand_do_upgrade $1 ;; esac diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index d38ee71..071c700 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/image.mk DEVICE_VARS += DEVICE_DTS KERNEL_SIZE PAGESIZE BLOCKSIZE SUBPAGESIZE KERNEL_IN_UBI KERNEL_LOADADDR:=0x8000 -TARGET_DEVICES = linksys-audi linksys-viper dockstar goflexnet goflexhome +TARGET_DEVICES = linksys-audi linksys-viper dockstar goflexnet goflexhome iconnect define Device/Default KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) @@ -47,6 +47,12 @@ $(Device/dockstar) DEVICE_DTS := kirkwood-goflexhome endef +define Device/iconnect +$(Device/dockstar) + PROFILES := Generic ICONNECT + DEVICE_DTS := kirkwood-iconnect +endef + define Device/linksys-audi DEVICE_DTS := kirkwood-linksys-audi PAGESIZE := 512 @@ -176,9 +182,6 @@ Image/InstallKernel/Template/Generic=$(call Image/InstallKernel/Template) Image/BuildKernel/Template/IB62X0=$(call Image/BuildKernel/Template,ib62x0) Image/InstallKernel/Template/IB62X0=$(call Image/InstallKernel/Template,ib62x0) -Image/BuildKernel/Template/ICONNECT=$(call Image/BuildKernel/Template,iconnect) -Image/InstallKernel/Template/ICONNECT=$(call Image/InstallKernel/Template,iconnect) - Image/BuildKernel/Template/IOMEGA_IX2_200=$(call Image/BuildKernel/Template,iomega_ix2_200) Image/InstallKernel/Template/IOMEGA_IX2_200=$(call Image/InstallKernel/Template,iomega_ix2_200) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt-devel-bounces at lists.openwrt.org Tue Apr 5 06:20:00 2016 From: openwrt-devel-bounces at lists.openwrt.org (openwrt-devel-bounces at lists.openwrt.org) Date: Tue, 5 Apr 2016 13:20:00 +0300 Subject: [OpenWrt-Devel] *****SPAM***** Fw: new important message Message-ID: <0000bae8e936$212dc1b2$8b9def59$@nop.com> Spam detection software, running on the system "arrakis.dune.hu", has identified this incoming email as possible spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Hello! New message, please read openwrt-devel-bounces at lists.openwrt.org [...] Content analysis details: (6.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 HTML_MESSAGE BODY: HTML included in message 3.9 NAME_EMAIL_DIFF Sender NAME is an unrelated email address 2.4 RDNS_NONE Delivered to internal network by a host with no rDNS The original message was not completely plain text, and may be unsafe to open with some email clients; in particular, it may contain a virus, or confirm that your address can receive spam. If you wish to view it, it may be safer to save it to a file and open it with an editor. -------------- next part -------------- An embedded message was scrubbed... From: openwrt-devel-bounces at lists.openwrt.org Subject: Fw: new important message Date: Tue, 5 Apr 2016 13:20:00 +0300 Size: 4353 URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 09:32:08 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 15:32:08 +0200 Subject: [OpenWrt-Devel] [RFC v2 1/6] ar71xx: Save in ag71xx_platform_data if SoC is qca955x Message-ID: <1459863133-26810-1-git-send-email-sven@open-mesh.com> From: Sven Eckelmann The ag71xx driver must know if a device is QCA955x to enable some special workarounds for this SoC family. Similar information are already stored in ag71xx_platform_data and ag71xx_mdio_platform_data to adjust the behavior of the driver. Signed-off-by: Sven Eckelmann --- v2: - Split into multiple patches and adjust slightly to look more like an OpenWrt patch target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 1 + .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h | 1 + 2 files changed, 2 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c index b43c80a..09201c9 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -1100,6 +1100,7 @@ void __init ath79_register_eth(unsigned int id) pdata->ddr_flush = ath79_ddr_no_flush; pdata->has_gbit = 1; pdata->is_ar724x = 1; + pdata->is_qca955x = 1; /* * Limit the maximum frame length to 4095 bytes. diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h index d46dc4e..4db2c65 100644 --- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h +++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h @@ -36,6 +36,7 @@ struct ag71xx_platform_data { u8 is_ar7240:1; u8 is_ar724x:1; u8 has_ar8216:1; + u8 is_qca955x:1; struct ag71xx_switch_platform_data *switch_data; -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 09:32:09 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 15:32:09 +0200 Subject: [OpenWrt-Devel] [RFC v2 2/6] ar71xx: Save GMAC id in ag71xx_platform_data In-Reply-To: <1459863133-26810-1-git-send-email-sven@open-mesh.com> References: <1459863133-26810-1-git-send-email-sven@open-mesh.com> Message-ID: <1459863133-26810-2-git-send-email-sven@open-mesh.com> From: Sven Eckelmann The ag71xx driver must know which GMAC is is currently handling to enable some special workarounds for this GMAC. GMAC0 has some registers on QCA9558 which GMAC1 doesn't have. Signed-off-by: Sven Eckelmann --- v2: - Split into multiple patches and adjust slightly to look more like an OpenWrt patch target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 1 + .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c index 09201c9..bfcc82f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -871,6 +871,7 @@ void __init ath79_register_eth(unsigned int id) pdata->max_frame_len = 1540; pdata->desc_pktlen_mask = 0xfff; + pdata->gmac_num = id; err = ath79_setup_phy_if_mode(id, pdata); if (err) { diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h index 4db2c65..5e4edae 100644 --- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h +++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h @@ -38,6 +38,8 @@ struct ag71xx_platform_data { u8 has_ar8216:1; u8 is_qca955x:1; + unsigned int gmac_num; + struct ag71xx_switch_platform_data *switch_data; void (*ddr_flush)(void); -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 09:32:10 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 15:32:10 +0200 Subject: [OpenWrt-Devel] [RFC v2 3/6] ar71xx: Fix size of the QCA955x GMAC registers In-Reply-To: <1459863133-26810-1-git-send-email-sven@open-mesh.com> References: <1459863133-26810-1-git-send-email-sven@open-mesh.com> Message-ID: <1459863133-26810-3-git-send-email-sven@open-mesh.com> From: Sven Eckelmann The GMAC registers for QCA9558 are from 0x18070000-0x18070067. Some of the upper registers are required to correctly reset SGMII links on speed changes. Signed-off-by: Sven Eckelmann --- v2: - Split into multiple patches and adjust slightly to look more like an OpenWrt patch .../ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch | 2 +- .../ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch index 0126f6a..ae44285 100644 --- a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch +++ b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch @@ -47,7 +47,7 @@ #define QCA955X_PCI_CTRL_SIZE 0x100 +#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000) -+#define QCA955X_GMAC_SIZE 0x40 ++#define QCA955X_GMAC_SIZE 0x68 #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000) #define QCA955X_WMAC_SIZE 0x20000 #define QCA955X_EHCI0_BASE 0x1b000000 diff --git a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch index 0126f6a..ae44285 100644 --- a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch +++ b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch @@ -47,7 +47,7 @@ #define QCA955X_PCI_CTRL_SIZE 0x100 +#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000) -+#define QCA955X_GMAC_SIZE 0x40 ++#define QCA955X_GMAC_SIZE 0x68 #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000) #define QCA955X_WMAC_SIZE 0x20000 #define QCA955X_EHCI0_BASE 0x1b000000 -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 09:32:11 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 15:32:11 +0200 Subject: [OpenWrt-Devel] [RFC v2 4/6] ar71xx: Add QCA955X SGMII related GMAC register definitions In-Reply-To: <1459863133-26810-1-git-send-email-sven@open-mesh.com> References: <1459863133-26810-1-git-send-email-sven@open-mesh.com> Message-ID: <1459863133-26810-4-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- v2: - Split into multiple patches and adjust slightly to look more like an OpenWrt patch .../601-MIPS-ath79-add-more-register-defines.patch | 32 +++++++++++++++++++++- .../601-MIPS-ath79-add-more-register-defines.patch | 32 +++++++++++++++++++++- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch index ae44285..213195c 100644 --- a/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch +++ b/target/linux/ar71xx/patches-4.1/601-MIPS-ath79-add-more-register-defines.patch @@ -217,7 +217,7 @@ #define AR71XX_GPIO_COUNT 16 #define AR7240_GPIO_COUNT 18 #define AR7241_GPIO_COUNT 20 -@@ -560,4 +671,235 @@ +@@ -560,4 +671,265 @@ #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13 #define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7 @@ -452,4 +452,34 @@ +#define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3 +#define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20 + ++#define QCA955X_GMAC_REG_SGMII_RESET 0x14 ++ ++#define QCA955X_SGMII_RESET_HW_RX_125M BIT(4) ++#define QCA955X_SGMII_RESET_TX_125M BIT(3) ++#define QCA955X_SGMII_RESET_RX_125M BIT(2) ++#define QCA955X_SGMII_RESET_TX_CLK BIT(1) ++#define QCA955X_SGMII_RESET_RX_CLK BIT(0) ++ ++#define QCA955X_GMAC_REG_MR_AN_CONTROL 0x1c ++ ++#define QCA955X_MR_AN_CONTROL_PHY_RESET BIT(15) ++#define QCA955X_MR_AN_CONTROL_LOOPBACK BIT(14) ++#define QCA955X_MR_AN_CONTROL_SPEED_SEL0 BIT(13) ++#define QCA955X_MR_AN_CONTROL_AN_ENABLE BIT(12) ++#define QCA955X_MR_AN_CONTROL_POWER_DOWN BIT(11) ++#define QCA955X_MR_AN_CONTROL_RESTART_AN BIT(9) ++#define QCA955X_MR_AN_CONTROL_DUPLEX_MODE BIT(8) ++#define QCA955X_MR_AN_CONTROL_SPEED_SEL1 BIT(6) ++ ++#define QCA955X_GMAC_REG_SGMII_DEBUG 0x58 ++ ++#define QCA955X_SGMII_DEBUG_ARB_STATE_MASK 0xf ++#define QCA955X_SGMII_DEBUG_ARB_STATE_SHIFT 24 ++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_MASK 0xff ++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_SHIFT 16 ++#define QCA955X_SGMII_DEBUG_RX_STATE_MASK 0xff ++#define QCA955X_SGMII_DEBUG_RX_STATE_SHIFT 8 ++#define QCA955X_SGMII_DEBUG_TX_STATE_MASK 0xff ++#define QCA955X_SGMII_DEBUG_TX_STATE_SHIFT 0 ++ #endif /* __ASM_MACH_AR71XX_REGS_H */ diff --git a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch index ae44285..213195c 100644 --- a/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch +++ b/target/linux/ar71xx/patches-4.4/601-MIPS-ath79-add-more-register-defines.patch @@ -217,7 +217,7 @@ #define AR71XX_GPIO_COUNT 16 #define AR7240_GPIO_COUNT 18 #define AR7241_GPIO_COUNT 20 -@@ -560,4 +671,235 @@ +@@ -560,4 +671,265 @@ #define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13 #define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7 @@ -452,4 +452,34 @@ +#define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3 +#define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20 + ++#define QCA955X_GMAC_REG_SGMII_RESET 0x14 ++ ++#define QCA955X_SGMII_RESET_HW_RX_125M BIT(4) ++#define QCA955X_SGMII_RESET_TX_125M BIT(3) ++#define QCA955X_SGMII_RESET_RX_125M BIT(2) ++#define QCA955X_SGMII_RESET_TX_CLK BIT(1) ++#define QCA955X_SGMII_RESET_RX_CLK BIT(0) ++ ++#define QCA955X_GMAC_REG_MR_AN_CONTROL 0x1c ++ ++#define QCA955X_MR_AN_CONTROL_PHY_RESET BIT(15) ++#define QCA955X_MR_AN_CONTROL_LOOPBACK BIT(14) ++#define QCA955X_MR_AN_CONTROL_SPEED_SEL0 BIT(13) ++#define QCA955X_MR_AN_CONTROL_AN_ENABLE BIT(12) ++#define QCA955X_MR_AN_CONTROL_POWER_DOWN BIT(11) ++#define QCA955X_MR_AN_CONTROL_RESTART_AN BIT(9) ++#define QCA955X_MR_AN_CONTROL_DUPLEX_MODE BIT(8) ++#define QCA955X_MR_AN_CONTROL_SPEED_SEL1 BIT(6) ++ ++#define QCA955X_GMAC_REG_SGMII_DEBUG 0x58 ++ ++#define QCA955X_SGMII_DEBUG_ARB_STATE_MASK 0xf ++#define QCA955X_SGMII_DEBUG_ARB_STATE_SHIFT 24 ++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_MASK 0xff ++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_SHIFT 16 ++#define QCA955X_SGMII_DEBUG_RX_STATE_MASK 0xff ++#define QCA955X_SGMII_DEBUG_RX_STATE_SHIFT 8 ++#define QCA955X_SGMII_DEBUG_TX_STATE_MASK 0xff ++#define QCA955X_SGMII_DEBUG_TX_STATE_SHIFT 0 ++ #endif /* __ASM_MACH_AR71XX_REGS_H */ -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 09:32:12 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 15:32:12 +0200 Subject: [OpenWrt-Devel] [RFC v2 5/6] ag71xx: Disable classification of fragmented packets on QCA955x In-Reply-To: <1459863133-26810-1-git-send-email-sven@open-mesh.com> References: <1459863133-26810-1-git-send-email-sven@open-mesh.com> Message-ID: <1459863133-26810-5-git-send-email-sven@open-mesh.com> From: Sven Eckelmann The QCA955x SoC family tends to hang randomly on GMAC0 when the link speeds+duplex modes are changed. QCA recommended to disable the classification of fragmented packets for QCA to avoid this problem. Signed-off-by: Sven Eckelmann --- v2: - Split into multiple patches and adjust slightly to look more like an OpenWrt patch .../linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h | 5 +++++ .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h index 5d03dcf..454b4c2 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h @@ -259,6 +259,10 @@ ag71xx_ring_size_order(int size) #define AG71XX_REG_RX_SM 0x01b0 #define AG71XX_REG_TX_SM 0x01b4 +#define QCA955X_REG_IG_ACL 0x23c + +#define QCA955X_FRA_DISABLE 0x60000000 + #define MAC_CFG1_TXE BIT(0) /* Tx Enable */ #define MAC_CFG1_STX BIT(1) /* Synchronize Tx Enable */ #define MAC_CFG1_RXE BIT(2) /* Rx Enable */ @@ -376,6 +380,7 @@ static inline void ag71xx_check_reg_offset(struct ag71xx *ag, unsigned reg) case AG71XX_REG_MAC_CFG1 ... AG71XX_REG_MAC_MFL: case AG71XX_REG_MAC_IFCTL ... AG71XX_REG_TX_SM: case AG71XX_REG_MII_CFG: + case QCA955X_REG_IG_ACL: break; default: diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index 38226cf..0832059 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -474,6 +474,9 @@ static void ag71xx_hw_setup(struct ag71xx *ag) } ag71xx_wr(ag, AG71XX_REG_FIFO_CFG4, FIFO_CFG4_INIT); ag71xx_wr(ag, AG71XX_REG_FIFO_CFG5, FIFO_CFG5_INIT); + + if (pdata->is_qca955x && pdata->gmac_num == 0) + ag71xx_sb(ag, QCA955X_REG_IG_ACL, QCA955X_FRA_DISABLE); } static void ag71xx_hw_init(struct ag71xx *ag) -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 09:32:13 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 15:32:13 +0200 Subject: [OpenWrt-Devel] [RFC v2 6/6] ar71xx: Reset QCA955x SGMII link on speed change In-Reply-To: <1459863133-26810-1-git-send-email-sven@open-mesh.com> References: <1459863133-26810-1-git-send-email-sven@open-mesh.com> Message-ID: <1459863133-26810-6-git-send-email-sven@open-mesh.com> From: Sven Eckelmann The SGMII link of the QCA955x seems to be unstable when the PHY changes the link speed. Reseting the SGMII and the PHY management control seems to resolve this problem. This was observed with an AR8033 and QCA9558 Signed-off-by: Sven Eckelmann --- v2: - Split into multiple patches and adjust slightly to look more like an OpenWrt patch The code of this RFC is not meant to be an actual patch. It should show what the u-boot for QCA955x does and what seemed to work(tm) in my limited tests. It would be interesting to know whether this was also noticed by other people and how they fixed it (when they fixed it). If it is already known than it would maybe good to find a better way to integrate it with ag71xx. Right now it just uses the set_speed callback to start the reset. .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 77 ++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c index bfcc82f..f2e88dd 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -383,6 +383,81 @@ static void qca955x_set_speed_xmii(int speed) iounmap(base); } +static void qca955x_reset_sgmii(void) +{ + void __iomem *base; + int count = 0; + u32 status; + u32 t; + + base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE); + + t = QCA955X_MR_AN_CONTROL_AN_ENABLE | + QCA955X_MR_AN_CONTROL_PHY_RESET; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + udelay(10); + + t = QCA955X_MR_AN_CONTROL_AN_ENABLE; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + + t = 0; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + + t = QCA955X_SGMII_RESET_HW_RX_125M; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + + t = QCA955X_SGMII_RESET_HW_RX_125M | + QCA955X_SGMII_RESET_RX_125M; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + + t = QCA955X_SGMII_RESET_HW_RX_125M | + QCA955X_SGMII_RESET_TX_125M | + QCA955X_SGMII_RESET_RX_125M; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + + t = QCA955X_SGMII_RESET_HW_RX_125M | + QCA955X_SGMII_RESET_TX_125M | + QCA955X_SGMII_RESET_RX_125M | + QCA955X_SGMII_RESET_RX_CLK; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + + t = QCA955X_SGMII_RESET_HW_RX_125M | + QCA955X_SGMII_RESET_TX_125M | + QCA955X_SGMII_RESET_RX_125M | + QCA955X_SGMII_RESET_RX_CLK | + QCA955X_SGMII_RESET_TX_CLK; + __raw_writel(t, base + QCA955X_GMAC_REG_SGMII_RESET); + + t = __raw_readl(base + QCA955X_GMAC_REG_MR_AN_CONTROL); + t &= ~QCA955X_MR_AN_CONTROL_PHY_RESET; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + udelay(100); + + status = __raw_readl(base + QCA955X_GMAC_REG_SGMII_DEBUG); + status &= 0xff; + while (status != 0xf && status != 0x10) { + t = __raw_readl(base + QCA955X_GMAC_REG_MR_AN_CONTROL); + t |= QCA955X_MR_AN_CONTROL_PHY_RESET; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + + udelay(100); + + t = __raw_readl(base + QCA955X_GMAC_REG_MR_AN_CONTROL); + t &= ~QCA955X_MR_AN_CONTROL_PHY_RESET; + __raw_writel(t, base + QCA955X_GMAC_REG_MR_AN_CONTROL); + + if (count++ >= 20) + break; + + mdelay(10); + + status = __raw_readl(base + QCA955X_GMAC_REG_SGMII_DEBUG); + status &= 0xff; + } + + iounmap(base); +} + static void qca955x_set_speed_sgmii(int speed) { void __iomem *base; @@ -391,6 +466,8 @@ static void qca955x_set_speed_sgmii(int speed) base = ioremap_nocache(AR71XX_PLL_BASE, AR71XX_PLL_SIZE); __raw_writel(val, base + QCA955X_PLL_ETH_SGMII_CONTROL_REG); iounmap(base); + + qca955x_reset_sgmii(); } static void qca956x_set_speed_sgmii(int speed) -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zioproto at gmail.com Tue Apr 5 09:33:27 2016 From: zioproto at gmail.com (Saverio Proto) Date: Tue, 5 Apr 2016 15:33:27 +0200 Subject: [OpenWrt-Devel] 15.05.1 - Chaos Calmer In-Reply-To: <5702D0CF.5010107@einfach.org> References: <56E94C5D.1030302@openwrt.org> <56E9A88C.5060409@einfach.org> <5702D0CF.5010107@einfach.org> Message-ID: Thanks Bruno, I am sorry I am coming back to OpenWrt after a long break. I expected the tag also on the Release repo http://git.openwrt.org/?p=15.05/openwrt.git;a=summary Here I see only a 15.05 tag. I dont understand the logic. I expect the 15.05.1 to be release from the Release-repo ? thank you Saverio 2016-04-04 22:38 GMT+02:00 Bruno Randolf : > On 04/04/2016 09:34 PM, Saverio Proto wrote: >>> Great! Thanks for your good work! >>> Could you please add a tag for 15.05.1 in the git repo? >> >> That would be great. I am trying to git bisect a bug and I have no >> idea on top of what commit is 15.05.1 built. > > There is a tag for it already: > > https://github.com/openwrt/openwrt/tags > > bruno > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Tue Apr 5 09:42:56 2016 From: john at phrozen.org (John Crispin) Date: Tue, 5 Apr 2016 15:42:56 +0200 Subject: [OpenWrt-Devel] 15.05.1 - Chaos Calmer In-Reply-To: References: <56E94C5D.1030302@openwrt.org> <56E9A88C.5060409@einfach.org> <5702D0CF.5010107@einfach.org> Message-ID: <5703C0E0.1020601@phrozen.org> On 05/04/2016 15:33, Saverio Proto wrote: > Thanks Bruno, > > I am sorry I am coming back to OpenWrt after a long break. > > I expected the tag also on the Release repo > > http://git.openwrt.org/?p=15.05/openwrt.git;a=summary > > Here I see only a 15.05 tag. I dont understand the logic. I expect the > 15.05.1 to be release from the Release-repo ? > > thank you > > Saverio > the logic is that i can push a tag to one tree but not to the other and whoever can is not reading this thread John > > 2016-04-04 22:38 GMT+02:00 Bruno Randolf : >> On 04/04/2016 09:34 PM, Saverio Proto wrote: >>>> Great! Thanks for your good work! >>>> Could you please add a tag for 15.05.1 in the git repo? >>> >>> That would be great. I am trying to git bisect a bug and I have no >>> idea on top of what commit is 15.05.1 built. >> >> There is a tag for it already: >> >> https://github.com/openwrt/openwrt/tags >> >> bruno >> > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From br1 at einfach.org Tue Apr 5 09:43:20 2016 From: br1 at einfach.org (Bruno Randolf) Date: Tue, 5 Apr 2016 14:43:20 +0100 Subject: [OpenWrt-Devel] 15.05.1 - Chaos Calmer In-Reply-To: References: <56E94C5D.1030302@openwrt.org> <56E9A88C.5060409@einfach.org> <5702D0CF.5010107@einfach.org> Message-ID: <5703C0F8.5030307@einfach.org> On 04/05/2016 02:33 PM, Saverio Proto wrote: > Thanks Bruno, > > I am sorry I am coming back to OpenWrt after a long break. > > I expected the tag also on the Release repo > > http://git.openwrt.org/?p=15.05/openwrt.git;a=summary > > Here I see only a 15.05 tag. I dont understand the logic. I expect the > 15.05.1 to be release from the Release-repo ? Right, it should be tagged there too! As I'm now only using the other repo I didn't check there. bruno _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From cristian at samknows.com Tue Apr 5 10:22:04 2016 From: cristian at samknows.com (Cristian Morales Vega) Date: Tue, 5 Apr 2016 15:22:04 +0100 Subject: [OpenWrt-Devel] [PATCH] ramips: mt7621: add support for disabling flow control Message-ID: <1459866124-17771-1-git-send-email-cristian@samknows.com> Signed-off-by: Cristian Morales Vega --- ...diatek-add-swconfig-driver-for-gsw_mt762x.patch | 54 +++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch index bbad8cc..d056551 100644 --- a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch +++ b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch @@ -28,7 +28,7 @@ Signed-off-by: John Crispin obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk-eth-soc.o --- /dev/null +++ b/drivers/net/ethernet/mediatek/mt7530.c -@@ -0,0 +1,804 @@ +@@ -0,0 +1,856 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License @@ -709,6 +709,50 @@ Signed-off-by: John Crispin + return 0; +} + ++static int mt7621_sw_get_port_fc(struct switch_dev *dev, ++ const struct switch_attr *attr, ++ struct switch_val *val) ++{ ++ u32 reg; ++ struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); ++ ++ if (val->port_vlan >= MT7530_NUM_PORTS) ++ return -EINVAL; ++ ++ reg = mdiobus_read(priv->bus, val->port_vlan, 4); ++ reg &= BIT(10); ++ ++ val->value.i = reg ? 1 : 0; ++ ++ return 0; ++} ++ ++static int mt7621_sw_set_port_fc(struct switch_dev *dev, ++ const struct switch_attr *attr, ++ struct switch_val *val) ++{ ++ u32 reg; ++ struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); ++ ++ if (val->port_vlan >= MT7530_NUM_PORTS) ++ return -EINVAL; ++ ++ reg = mdiobus_read(priv->bus, val->port_vlan, 4); ++ if(val->value.i) { ++ reg |= BIT(10); ++ } else { ++ reg &= ~BIT(10); ++ } ++ mdiobus_write(priv->bus, val->port_vlan, 4, reg); ++ ++ /* Restart auto-negotiation */ ++ reg = mdiobus_read(priv->bus, val->port_vlan, 0); ++ reg |= BIT(9); ++ mdiobus_write(priv->bus, val->port_vlan, 0, reg); ++ ++ return 0; ++} ++ +static const struct switch_attr mt7621_port[] = { + { + .type = SWITCH_TYPE_STRING, @@ -717,6 +761,14 @@ Signed-off-by: John Crispin + .get = mt7621_sw_get_port_mib, + .set = NULL, + }, ++ { ++ .type = SWITCH_TYPE_INT, ++ .name = "flow_ctl", ++ .description = "Flow Control", ++ .get = mt7621_sw_get_port_fc, ++ .set = mt7621_sw_set_port_fc, ++ .max = 1, ++ }, +}; + +static const struct switch_attr mt7530_port[] = { -- 2.6.3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:46 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:46 +0200 Subject: [OpenWrt-Devel] [PATCH 01/16] scripts/om-fwupgradecfg-gen.sh: Generate sha256sum for uboot verification Message-ID: <1459869481-29376-1-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Future Open Mesh u-boot versions are changing the check of the image files (vmlinux, rootfs) from md5 to sha256. Having both in them should be enough to ensure backward and forward compatibility. Signed-off-by: Sven Eckelmann --- scripts/om-fwupgradecfg-gen.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh index fab1582..e208e6d 100644 --- a/scripts/om-fwupgradecfg-gen.sh +++ b/scripts/om-fwupgradecfg-gen.sh @@ -42,6 +42,7 @@ CHECK_BS=65536 KERNEL_SIZE=$(stat -c%s "$KERNEL_PATH") KERNEL_MD5=$(md5=$(md5sum $KERNEL_PATH); echo ${md5%% *}) +KERNEL_SHA256=$(openssl dgst -sha256 $KERNEL_PATH | awk '{print $2}') KERNEL_PART_SIZE=$(size=$(($KERNEL_SIZE / $FLASH_BS)); [ $(($size * $FLASH_BS)) -lt $KERNEL_SIZE ] && size=$(($size + 1)); echo $(($size * $FLASH_BS / 1024))) ROOTFS_FLASH_ADDR=$(addr=$(($KERNEL_FLASH_ADDR + ($KERNEL_PART_SIZE * 1024))); printf "0x%x" $addr) @@ -49,6 +50,7 @@ ROOTFS_SIZE=$(stat -c%s "$ROOTFS_PATH") ROOTFS_CHECK_BLOCKS=$((($ROOTFS_SIZE / $CHECK_BS) - $MD5_SKIP_BLOCKS)) ROOTFS_MD5=$(md5=$(dd if=$ROOTFS_PATH bs=$CHECK_BS count=$ROOTFS_CHECK_BLOCKS 2>&- | md5sum); echo ${md5%% *}) ROOTFS_MD5_FULL=$(md5=$(md5sum $ROOTFS_PATH); echo ${md5%% *}) +ROOTFS_SHA256_FULL=$(openssl dgst -sha256 $ROOTFS_PATH | awk '{print $2}') ROOTFS_CHECK_SIZE=$(printf '0x%x' $(($ROOTFS_CHECK_BLOCKS * $CHECK_BS))) ROOTFS_PART_SIZE=$(($MAX_PART_SIZE - $KERNEL_PART_SIZE)) @@ -57,6 +59,7 @@ cat << EOF > $CFG_OUT filename=kernel md5sum=$KERNEL_MD5 filemd5sum=$KERNEL_MD5 +filesha256sum=$KERNEL_SHA256 flashaddr=$KERNEL_FLASH_ADDR checksize=0x0 cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; saveenv @@ -66,6 +69,7 @@ cmd_fail=reset filename=rootfs md5sum=$ROOTFS_MD5 filemd5sum=$ROOTFS_MD5_FULL +filesha256sum=$ROOTFS_SHA256_FULL flashaddr=$ROOTFS_FLASH_ADDR checksize=$ROOTFS_CHECK_SIZE cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; setenv rootfs_size_1 $ROOTFS_PART_SIZE; saveenv -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:47 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:47 +0200 Subject: [OpenWrt-Devel] [PATCH 02/16] ar71xx: add kernel support for the OpenMesh OM5P-AC board In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-2-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/config-4.4 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 9 + target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../ar71xx/files/arch/mips/ath79/mach-om5pac.c | 193 +++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + 6 files changed, 206 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index d6ad850..0ba1f53 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -109,6 +109,7 @@ CONFIG_ATH79_MACH_NBG460N=y CONFIG_ATH79_MACH_NBG6716=y CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y +CONFIG_ATH79_MACH_OM5P_AC=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index 49cecc5..5117829 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -112,6 +112,7 @@ CONFIG_ATH79_MACH_NBG460N=y CONFIG_ATH79_MACH_NBG6716=y CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y +CONFIG_ATH79_MACH_OM5P_AC=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index f47f1b9..b12c42a 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -861,6 +861,15 @@ config ATH79_MACH_OM5P select ATH79_DEV_M25P80 select ATH79_DEV_WMAC +config ATH79_MACH_OM5P_AC + bool "OpenMesh OM5P-AC board support" + select SOC_QCA955X + select ATH79_DEV_AP9X_PCI if PCI + select ATH79_DEV_ETH + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + config ATH79_MACH_OMY_X1 bool "OMYlink OMY X1 support" select SOC_AR934X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 74376b2..484dda0 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -115,6 +115,7 @@ obj-$(CONFIG_ATH79_MACH_MZK_W300NH) += mach-mzk-w300nh.o obj-$(CONFIG_ATH79_MACH_NBG460N) += mach-nbg460n.o obj-$(CONFIG_ATH79_MACH_OM2P) += mach-om2p.o obj-$(CONFIG_ATH79_MACH_OM5P) += mach-om5p.o +obj-$(CONFIG_ATH79_MACH_OM5P_AC) += mach-om5pac.o obj-$(CONFIG_ATH79_MACH_OMY_X1) += mach-omy-x1.o obj-$(CONFIG_ATH79_MACH_ONION_OMEGA) += mach-onion-omega.o obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c new file mode 100644 index 0000000..f6974af --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pac.c @@ -0,0 +1,193 @@ +/* + * OpenMesh OM5P-AC support + * + * Copyright (C) 2013 Marek Lindner + * Copyright (C) 2014 Sven Eckelmann + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "common.h" +#include "dev-ap9x-pci.h" +#include "dev-eth.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-wmac.h" +#include "machtypes.h" +#include "pci.h" + +#define OM5PAC_GPIO_LED_POWER 18 +#define OM5PAC_GPIO_LED_GREEN 21 +#define OM5PAC_GPIO_LED_RED 23 +#define OM5PAC_GPIO_LED_YELLOW 22 +#define OM5PAC_GPIO_LED_LAN 20 +#define OM5PAC_GPIO_LED_WAN 19 +#define OM5PAC_GPIO_I2C_SCL 12 +#define OM5PAC_GPIO_I2C_SDA 11 + +#define OM5PAC_KEYS_POLL_INTERVAL 20 /* msecs */ +#define OM5PAC_KEYS_DEBOUNCE_INTERVAL (3 * OM5PAC_KEYS_POLL_INTERVAL) + +#define OM5PAC_WMAC_CALDATA_OFFSET 0x1000 + +static struct gpio_led om5pac_leds_gpio[] __initdata = { + { + .name = "om5pac:blue:power", + .gpio = OM5PAC_GPIO_LED_POWER, + .active_low = 1, + }, { + .name = "om5pac:red:wifi", + .gpio = OM5PAC_GPIO_LED_RED, + .active_low = 1, + }, { + .name = "om5pac:yellow:wifi", + .gpio = OM5PAC_GPIO_LED_YELLOW, + .active_low = 1, + }, { + .name = "om5pac:green:wifi", + .gpio = OM5PAC_GPIO_LED_GREEN, + .active_low = 1, + }, { + .name = "om5pac:blue:lan", + .gpio = OM5PAC_GPIO_LED_LAN, + .active_low = 1, + }, { + .name = "om5pac:blue:wan", + .gpio = OM5PAC_GPIO_LED_WAN, + .active_low = 1, + } +}; + +static struct flash_platform_data om5pac_flash_data = { + .type = "mx25l12805d", +}; + +static struct i2c_gpio_platform_data om5pac_i2c_device_platdata = { + .sda_pin = OM5PAC_GPIO_I2C_SDA, + .scl_pin = OM5PAC_GPIO_I2C_SCL, + .udelay = 10, + .sda_is_open_drain = 1, + .scl_is_open_drain = 1, +}; + +static struct platform_device om5pac_i2c_device = { + .name = "i2c-gpio", + .id = 0, + .dev = { + .platform_data = &om5pac_i2c_device_platdata, + }, +}; + +static struct i2c_board_info om5pac_i2c_devs[] __initdata = { + { + I2C_BOARD_INFO("tmp423", 0x4c), + }, +}; + +static struct at803x_platform_data om5pac_at803x_data = { + .disable_smarteee = 1, + .enable_rgmii_rx_delay = 1, + .enable_rgmii_tx_delay = 1, +}; + +static struct mdio_board_info om5pac_mdio0_info[] = { + { + .bus_id = "ag71xx-mdio.0", + .phy_addr = 1, + .platform_data = &om5pac_at803x_data, + }, + { + .bus_id = "ag71xx-mdio.0", + .phy_addr = 2, + .platform_data = &om5pac_at803x_data, + }, +}; + +static void __init om5p_ac_setup_qca955x_eth_cfg(u32 mask, + unsigned int rxd, + unsigned int rxdv, + unsigned int txd, + unsigned int txe) +{ + void __iomem *base; + u32 t; + + base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE); + + t = mask; + t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT; + t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT; + t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT; + t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT; + + __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG); + + iounmap(base); +} + +static void __init om5p_ac_setup(void) +{ + u8 *art = (u8 *)KSEG1ADDR(0x1fff0000); + u8 mac[6]; + + /* temperature sensor */ + platform_device_register(&om5pac_i2c_device); + i2c_register_board_info(0, om5pac_i2c_devs, + ARRAY_SIZE(om5pac_i2c_devs)); + + ath79_gpio_output_select(OM5PAC_GPIO_LED_WAN, QCA955X_GPIO_OUT_GPIO); + + ath79_register_m25p80(&om5pac_flash_data); + ath79_register_leds_gpio(-1, ARRAY_SIZE(om5pac_leds_gpio), + om5pac_leds_gpio); + + ath79_init_mac(mac, art, 0x02); + ath79_register_wmac(art + OM5PAC_WMAC_CALDATA_OFFSET, mac); + + om5p_ac_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0); + ath79_register_mdio(0, 0x0); + + mdiobus_register_board_info(om5pac_mdio0_info, + ARRAY_SIZE(om5pac_mdio0_info)); + + ath79_init_mac(ath79_eth0_data.mac_addr, art, 0x00); + ath79_init_mac(ath79_eth1_data.mac_addr, art, 0x01); + + /* GMAC0 is connected to the PHY1 */ + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; + ath79_eth0_data.phy_mask = BIT(1); + ath79_eth0_pll_data.pll_1000 = 0x82000101; + ath79_eth0_pll_data.pll_100 = 0x80000101; + ath79_eth0_pll_data.pll_10 = 0x80001313; + ath79_register_eth(0); + + /* GMAC1 is connected to MDIO1 in SGMII mode */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; + ath79_eth1_data.mii_bus_dev = &ath79_mdio0_device.dev; + ath79_eth1_data.phy_mask = BIT(2); + ath79_eth1_pll_data.pll_1000 = 0x03000101; + ath79_eth1_pll_data.pll_100 = 0x80000101; + ath79_eth1_pll_data.pll_10 = 0x80001313; + ath79_eth1_data.speed = SPEED_1000; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_register_eth(1); + + ath79_register_pci(); +} + +MIPS_MACHINE(ATH79_MACH_OM5P_AC, "OM5P-AC", "OpenMesh OM5P AC", om5p_ac_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 307d2df..12e30c7 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -113,6 +113,7 @@ enum ath79_mach_type { ATH79_MACH_OM2P_LC, /* OpenMesh OM2P-LC */ ATH79_MACH_OM2Pv2, /* OpenMesh OM2Pv2 */ ATH79_MACH_OM2P, /* OpenMesh OM2P */ + ATH79_MACH_OM5P_AC, /* OpenMesh OM5P-AC */ ATH79_MACH_OM5P_AN, /* OpenMesh OM5P-AN */ ATH79_MACH_OM5P, /* OpenMesh OM5P */ ATH79_MACH_OMY_X1, /* OMYlink OMY-X1 */ -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:48 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:48 +0200 Subject: [OpenWrt-Devel] [PATCH 03/16] ar71xx: add user-space support for the OpenMesh OM5P-AC In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-3-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 +++++ target/linux/ar71xx/base-files/etc/diag.sh | 3 +++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ 3 files changed, 11 insertions(+) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 708ebb9..ab19a61 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -394,6 +394,11 @@ om5p-an) ucidef_set_led_netdev "port2" "port2" "om5p:blue:lan" "eth1" ;; +om5p-ac) + ucidef_set_led_netdev "port1" "port1" "om5pac:blue:lan" "eth0" + ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1" + ;; + omy-x1) ucidef_set_led_default "power" "POWER" "omy:green:power" "1" ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0" diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index a2251d1..da976bd 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -214,6 +214,9 @@ get_status_led() { om5p-an) status_led="om5p:blue:power" ;; + om5p-ac) + status_led="om5pac:blue:power" + ;; omy-x1) status_led="omy:green:power" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 6b8550a..ded9e7e 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -646,6 +646,9 @@ ar71xx_board_detect() { *"OM5P AN") name="om5p-an" ;; + *"OM5P AC") + name="om5p-ac" + ;; *"OMY-X1") name="omy-x1" ;; -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:49 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:49 +0200 Subject: [OpenWrt-Devel] [PATCH 04/16] scripts/om-fwupgradecfg-gen.sh: add support for the OM5P-AC In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-4-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- scripts/om-fwupgradecfg-gen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh index e208e6d..6c3b74c 100644 --- a/scripts/om-fwupgradecfg-gen.sh +++ b/scripts/om-fwupgradecfg-gen.sh @@ -7,7 +7,7 @@ # usage() { - echo "Usage: $0 " + echo "Usage: $0 " rm -f $CFG_OUT exit 1 } @@ -26,7 +26,7 @@ case $CE_TYPE in FLASH_BS=262144 MD5_SKIP_BLOCKS=1 ;; - OM5P|MR600|MR900|MR1750) + OM5P|OM5PAC|MR600|MR900|MR1750) MAX_PART_SIZE=7808 KERNEL_FLASH_ADDR=0xb0000 FLASH_BS=65536 -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:50 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:50 +0200 Subject: [OpenWrt-Devel] [PATCH 05/16] ar71xx: enable sysupgrade for the OpenMesh OM5P-AC In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-5-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh | 7 ++++++- target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 6 ++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh index 9ca0f5b..1cfead9 100644 --- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh @@ -72,6 +72,11 @@ platform_check_image_openmesh() echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform" return 1 ;; + OM5PAC) + [ "$board" = "om5p-ac" ] && break + echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform" + return 1 + ;; MR1750) [ "$board" = "mr1750" ] && break echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform" @@ -162,7 +167,7 @@ platform_do_upgrade_openmesh() kernel_start_addr1=0x9f1c0000 kernel_start_addr2=0x9f8c0000 ;; - OM5P|MR600|MR900|MR1750) + OM5P|OM5PAC|MR600|MR900|MR1750) block_size=$((64 * 1024)) total_size=7995392 kernel_start_addr1=0x9f0b0000 diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 923e02b..fee9d63 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -322,7 +322,8 @@ platform_check_image() { om2p-hsv2 | \ om2p-lc | \ om5p | \ - om5p-an) + om5p-an | \ + om5p-ac) platform_check_image_openmesh "$magic_long" "$1" && return 0 return 1 ;; @@ -575,7 +576,8 @@ platform_do_upgrade() { om2p-hsv2 | \ om2p-lc | \ om5p | \ - om5p-an) + om5p-an | \ + om5p-ac) platform_do_upgrade_openmesh "$ARGV" ;; unifi-outdoor-plus | \ -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:51 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:51 +0200 Subject: [OpenWrt-Devel] [PATCH 06/16] package/om-watchdog: add OpenMesh OM5P-AC support In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-6-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- package/kernel/om-watchdog/files/om-watchdog.init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/kernel/om-watchdog/files/om-watchdog.init b/package/kernel/om-watchdog/files/om-watchdog.init index d68fb15..5c442c6 100644 --- a/package/kernel/om-watchdog/files/om-watchdog.init +++ b/package/kernel/om-watchdog/files/om-watchdog.init @@ -29,6 +29,9 @@ get_gpio() { "om5p-an") return 11 ;; + "om5p-ac") + return 17 + ;; "mr600v2") return 15 ;; -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:52 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:52 +0200 Subject: [OpenWrt-Devel] [PATCH 07/16] package/uboot-envtools: add OpenMesh OM5P-AC support In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-7-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- package/boot/uboot-envtools/files/ar71xx | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index c9031ac..91bd9a4 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -31,6 +31,7 @@ mr900 | \ mr900v2 | \ nbg6716 | \ om5p-an | \ +om5p-ac | \ om5p | \ tube2h | \ wndr3700) -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:53 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:53 +0200 Subject: [OpenWrt-Devel] [PATCH 08/16] ar71xx: extract ath10k wifi board.bin for the OpenMesh OM5P-AC board In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-8-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- .../linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index e6fcec8..1b6de1e 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -95,6 +95,10 @@ case "$FIRMWARE" in rb-911g-5hpacd) ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116 ;; + om5p-ac) + ath10kcal_extract "ART" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) + ;; esac ;; *) -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:54 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:54 +0200 Subject: [OpenWrt-Devel] [PATCH 09/16] ar71xx: create profile and build image for the OpenMesh OM5P-AC board In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-9-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- target/linux/ar71xx/generic/profiles/openmesh.mk | 11 +++++++++++ target/linux/ar71xx/image/Makefile | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/generic/profiles/openmesh.mk b/target/linux/ar71xx/generic/profiles/openmesh.mk index 1c51e93..0873ac5 100644 --- a/target/linux/ar71xx/generic/profiles/openmesh.mk +++ b/target/linux/ar71xx/generic/profiles/openmesh.mk @@ -27,6 +27,17 @@ endef $(eval $(call Profile,OM5P)) +define Profile/OM5PAC + NAME:=OpenMesh OM5P-AC + PACKAGES:=kmod-ath9k kmod-ath10k om-watchdog +endef + +define Profile/OM5PAC/Description + Package set optimized for the OpenMesh OM5P-AC. +endef + +$(eval $(call Profile,OM5PAC)) + define Profile/MR600 NAME:=OpenMesh MR600 PACKAGES:=kmod-ath9k om-watchdog diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 595fba2..eb7a7f0 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -2470,6 +2470,7 @@ $(eval $(call SingleProfile,Netgear,64kraw,WPN824N,wpn824n,WPN824N,ttyS0,115200, $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM2P,om2p,,,,OM2P)) $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM5P,om5p,,,,OM5P)) +$(eval $(call SingleProfile,OpenMesh,squashfs-only,OM5PAC,om5pac,,,,OM5PAC)) $(eval $(call SingleProfile,OpenMesh,squashfs-only,MR600,mr600,,,,MR600)) $(eval $(call SingleProfile,OpenMesh,squashfs-only,MR900,mr900,,,,MR900)) $(eval $(call SingleProfile,OpenMesh,squashfs-only,MR1750,mr1750,,,,MR1750)) @@ -2518,7 +2519,7 @@ $(eval $(call MultiProfile,AP147,AP147_010)) $(eval $(call MultiProfile,AP152,AP152_16M)) $(eval $(call MultiProfile,DIR615IX,DIR615I1 DIR615I3)) $(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT EWDORIN16M)) -$(eval $(call MultiProfile,OPENMESH,OM2P OM5P MR600 MR900 MR1750)) +$(eval $(call MultiProfile,OPENMESH,OM2P OM5P OM5PAC MR600 MR900 MR1750)) $(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY)) $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M)) $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R)) -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:55 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:55 +0200 Subject: [OpenWrt-Devel] [PATCH 10/16] ar71xx: add kernel support for the OpenMesh OM5P-ACv2 board In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-10-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/config-4.4 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 + target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../ar71xx/files/arch/mips/ath79/mach-om5pacv2.c | 216 +++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + 6 files changed, 230 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index 0ba1f53..087f027 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -110,6 +110,7 @@ CONFIG_ATH79_MACH_NBG6716=y CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y CONFIG_ATH79_MACH_OM5P_AC=y +CONFIG_ATH79_MACH_OM5P_ACv2=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index 5117829..b684292 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -113,6 +113,7 @@ CONFIG_ATH79_MACH_NBG6716=y CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y CONFIG_ATH79_MACH_OM5P_AC=y +CONFIG_ATH79_MACH_OM5P_ACv2=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index b12c42a..1d6c4d6 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -870,6 +870,16 @@ config ATH79_MACH_OM5P_AC select ATH79_DEV_M25P80 select ATH79_DEV_WMAC +config ATH79_MACH_OM5P_ACv2 + bool "OpenMesh OM5P-ACv2 board support" + select SOC_QCA955X + select ATH79_DEV_AP9X_PCI if PCI + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + config ATH79_MACH_OMY_X1 bool "OMYlink OMY X1 support" select SOC_AR934X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 484dda0..75f1670 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -116,6 +116,7 @@ obj-$(CONFIG_ATH79_MACH_NBG460N) += mach-nbg460n.o obj-$(CONFIG_ATH79_MACH_OM2P) += mach-om2p.o obj-$(CONFIG_ATH79_MACH_OM5P) += mach-om5p.o obj-$(CONFIG_ATH79_MACH_OM5P_AC) += mach-om5pac.o +obj-$(CONFIG_ATH79_MACH_OM5P_ACv2) += mach-om5pacv2.o obj-$(CONFIG_ATH79_MACH_OMY_X1) += mach-omy-x1.o obj-$(CONFIG_ATH79_MACH_ONION_OMEGA) += mach-onion-omega.o obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c new file mode 100644 index 0000000..587ca32 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-om5pacv2.c @@ -0,0 +1,216 @@ +/* + * OpenMesh OM5P-ACv2 support + * + * Copyright (C) 2013 Marek Lindner + * Copyright (C) 2014-2016 Sven Eckelmann + * Copyright (C) 2015 Open-Mesh - Jim Collar + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "common.h" +#include "dev-ap9x-pci.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-wmac.h" +#include "machtypes.h" +#include "pci.h" + +#define OM5PACV2_GPIO_LED_POWER 14 +#define OM5PACV2_GPIO_LED_GREEN 13 +#define OM5PACV2_GPIO_LED_RED 23 +#define OM5PACV2_GPIO_LED_YELLOW 15 +#define OM5PACV2_GPIO_BTN_RESET 1 +#define OM5PACV2_GPIO_I2C_SCL 18 +#define OM5PACV2_GPIO_I2C_SDA 19 +#define OM5PACV2_GPIO_PA_DCDC 2 +#define OM5PACV2_GPIO_PA_HIGH 16 + +#define OM5PACV2_KEYS_POLL_INTERVAL 20 /* msecs */ +#define OM5PACV2_KEYS_DEBOUNCE_INTERVAL (3 * OM5PACV2_KEYS_POLL_INTERVAL) + +#define OM5PACV2_WMAC_CALDATA_OFFSET 0x1000 + +static struct gpio_led om5pacv2_leds_gpio[] __initdata = { + { + .name = "om5pac:blue:power", + .gpio = OM5PACV2_GPIO_LED_POWER, + .active_low = 1, + }, { + .name = "om5pac:red:wifi", + .gpio = OM5PACV2_GPIO_LED_RED, + .active_low = 1, + }, { + .name = "om5pac:yellow:wifi", + .gpio = OM5PACV2_GPIO_LED_YELLOW, + .active_low = 1, + }, { + .name = "om5pac:green:wifi", + .gpio = OM5PACV2_GPIO_LED_GREEN, + .active_low = 1, + } +}; + +static struct gpio_keys_button om5pacv2_gpio_keys[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = OM5PACV2_KEYS_DEBOUNCE_INTERVAL, + .gpio = OM5PACV2_GPIO_BTN_RESET, + .active_low = 1, + } +}; + +static struct i2c_gpio_platform_data om5pacv2_i2c_device_platdata = { + .sda_pin = OM5PACV2_GPIO_I2C_SDA, + .scl_pin = OM5PACV2_GPIO_I2C_SCL, + .udelay = 10, + .sda_is_open_drain = 1, + .scl_is_open_drain = 1, +}; + +static struct platform_device om5pacv2_i2c_device = { + .name = "i2c-gpio", + .id = 0, + .dev = { + .platform_data = &om5pacv2_i2c_device_platdata, + }, +}; + +static struct i2c_board_info om5pacv2_i2c_devs[] __initdata = { + { + I2C_BOARD_INFO("tmp423", 0x4e), + }, +}; + +static struct flash_platform_data om5pacv2_flash_data = { + .type = "mx25l12805d", +}; + +static struct at803x_platform_data om5pacv2_an_at803x_data = { + .disable_smarteee = 1, + .enable_rgmii_rx_delay = 1, + .enable_rgmii_tx_delay = 1, +}; + +static struct at803x_platform_data om5pacv2_an_at8031_data = { + .disable_smarteee = 1, + .enable_rgmii_rx_delay = 1, + .enable_rgmii_tx_delay = 1, +}; + +static struct mdio_board_info om5pacv2_an_mdio0_info[] = { + { + .bus_id = "ag71xx-mdio.0", + .phy_addr = 4, + .platform_data = &om5pacv2_an_at803x_data, + }, + { + .bus_id = "ag71xx-mdio.1", + .phy_addr = 1, + .platform_data = &om5pacv2_an_at8031_data, + }, +}; + +static void __init om5p_acv2_setup_qca955x_eth_cfg(u32 mask, + unsigned int rxd, + unsigned int rxdv, + unsigned int txd, + unsigned int txe) +{ + void __iomem *base; + u32 t; + + base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE); + + t = mask; + t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT; + t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT; + t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT; + t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT; + + __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG); + + iounmap(base); +} + +static void __init om5p_acv2_setup(void) +{ + u8 *art = (u8 *)KSEG1ADDR(0x1fff0000); + u8 mac[6]; + + /* power amplifier high power, 4.2V at RFFM4203/4503 instead of 3.3 */ + ath79_gpio_function_enable(QCA955X_GPIO_FUNC_JTAG_DISABLE); + ath79_gpio_output_select(OM5PACV2_GPIO_PA_DCDC, QCA955X_GPIO_OUT_GPIO); + ath79_gpio_output_select(OM5PACV2_GPIO_PA_HIGH, QCA955X_GPIO_OUT_GPIO); + gpio_request_one(OM5PACV2_GPIO_PA_DCDC, GPIOF_OUT_INIT_HIGH, + "PA DC/DC"); + gpio_request_one(OM5PACV2_GPIO_PA_HIGH, GPIOF_OUT_INIT_HIGH, "PA HIGH"); + + /* temperature sensor */ + platform_device_register(&om5pacv2_i2c_device); + i2c_register_board_info(0, om5pacv2_i2c_devs, + ARRAY_SIZE(om5pacv2_i2c_devs)); + + ath79_register_m25p80(&om5pacv2_flash_data); + ath79_register_leds_gpio(-1, ARRAY_SIZE(om5pacv2_leds_gpio), + om5pacv2_leds_gpio); + ath79_register_gpio_keys_polled(-1, OM5PACV2_KEYS_POLL_INTERVAL, + ARRAY_SIZE(om5pacv2_gpio_keys), + om5pacv2_gpio_keys); + + ath79_init_mac(mac, art, 0x02); + ath79_register_wmac(art + OM5PACV2_WMAC_CALDATA_OFFSET, mac); + + om5p_acv2_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 2, 2, 0, 0); + ath79_register_mdio(0, 0x0); + ath79_register_mdio(1, 0x0); + + mdiobus_register_board_info(om5pacv2_an_mdio0_info, + ARRAY_SIZE(om5pacv2_an_mdio0_info)); + + ath79_init_mac(ath79_eth0_data.mac_addr, art, 0x00); + ath79_init_mac(ath79_eth1_data.mac_addr, art, 0x01); + + /* GMAC0 is connected to the PHY4 */ + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; + ath79_eth0_data.phy_mask = BIT(4); + ath79_eth0_pll_data.pll_1000 = 0x82000101; + ath79_eth0_pll_data.pll_100 = 0x80000101; + ath79_eth0_pll_data.pll_10 = 0x80001313; + ath79_register_eth(0); + + /* GMAC1 is connected to MDIO1 in SGMII mode */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; + ath79_eth1_data.mii_bus_dev = &ath79_mdio1_device.dev; + ath79_eth1_data.phy_mask = BIT(1); + ath79_eth1_pll_data.pll_1000 = 0x03000101; + ath79_eth1_pll_data.pll_100 = 0x80000101; + ath79_eth1_pll_data.pll_10 = 0x80001313; + ath79_eth1_data.speed = SPEED_1000; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_register_eth(1); + + ath79_register_pci(); +} + +MIPS_MACHINE(ATH79_MACH_OM5P_ACv2, "OM5P-ACv2", "OpenMesh OM5P ACv2", om5p_acv2_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 12e30c7..bcc13ec 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -114,6 +114,7 @@ enum ath79_mach_type { ATH79_MACH_OM2Pv2, /* OpenMesh OM2Pv2 */ ATH79_MACH_OM2P, /* OpenMesh OM2P */ ATH79_MACH_OM5P_AC, /* OpenMesh OM5P-AC */ + ATH79_MACH_OM5P_ACv2, /* OpenMesh OM5P-ACv2 */ ATH79_MACH_OM5P_AN, /* OpenMesh OM5P-AN */ ATH79_MACH_OM5P, /* OpenMesh OM5P */ ATH79_MACH_OMY_X1, /* OMYlink OMY-X1 */ -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:56 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:56 +0200 Subject: [OpenWrt-Devel] [PATCH 11/16] ar71xx: add user-space support for the OpenMesh OM5P-ACv2 In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-11-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- target/linux/ar71xx/base-files/etc/diag.sh | 3 ++- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index da976bd..783a4e6 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -214,7 +214,8 @@ get_status_led() { om5p-an) status_led="om5p:blue:power" ;; - om5p-ac) + om5p-ac | \ + om5p-acv2) status_led="om5pac:blue:power" ;; omy-x1) diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index ded9e7e..9c19e23 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -649,6 +649,9 @@ ar71xx_board_detect() { *"OM5P AC") name="om5p-ac" ;; + *"OM5P ACv2") + name="om5p-acv2" + ;; *"OMY-X1") name="omy-x1" ;; -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:57 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:57 +0200 Subject: [OpenWrt-Devel] [PATCH 12/16] ar71xx: enable sysupgrade for the OpenMesh OM5P-ACv2 In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-12-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh | 1 + target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh index 1cfead9..209cdaa 100644 --- a/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/openmesh.sh @@ -74,6 +74,7 @@ platform_check_image_openmesh() ;; OM5PAC) [ "$board" = "om5p-ac" ] && break + [ "$board" = "om5p-acv2" ] && break echo "Invalid image board target ($img_board_target) for this platform: $board. Use the correct image for this platform" return 1 ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index fee9d63..2d61638 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -323,7 +323,8 @@ platform_check_image() { om2p-lc | \ om5p | \ om5p-an | \ - om5p-ac) + om5p-ac | \ + om5p-acv2) platform_check_image_openmesh "$magic_long" "$1" && return 0 return 1 ;; @@ -577,7 +578,8 @@ platform_do_upgrade() { om2p-lc | \ om5p | \ om5p-an | \ - om5p-ac) + om5p-ac | \ + om5p-acv2) platform_do_upgrade_openmesh "$ARGV" ;; unifi-outdoor-plus | \ -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:58 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:58 +0200 Subject: [OpenWrt-Devel] [PATCH 13/16] package/om-watchdog: add OpenMesh OM5P-ACv2 support In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-13-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- package/kernel/om-watchdog/files/om-watchdog.init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/kernel/om-watchdog/files/om-watchdog.init b/package/kernel/om-watchdog/files/om-watchdog.init index 5c442c6..79819ad 100644 --- a/package/kernel/om-watchdog/files/om-watchdog.init +++ b/package/kernel/om-watchdog/files/om-watchdog.init @@ -18,7 +18,8 @@ get_gpio() { case "$board" in "om2p" | \ "om2p-hs" | \ - "om2p-hsv2") + "om2p-hsv2" | \ + "om5p-acv2") return 12 ;; "om2pv2" | \ -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:17:59 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:17:59 +0200 Subject: [OpenWrt-Devel] [PATCH 14/16] package/uboot-envtools: add OpenMesh OM5P-ACv2 support In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-14-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- package/boot/uboot-envtools/files/ar71xx | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 91bd9a4..32e7269 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -32,6 +32,7 @@ mr900v2 | \ nbg6716 | \ om5p-an | \ om5p-ac | \ +om5p-acv2 | \ om5p | \ tube2h | \ wndr3700) -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:18:00 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:18:00 +0200 Subject: [OpenWrt-Devel] [PATCH 15/16] ar71xx: extract ath10k wifi board.bin for the OpenMesh OM5P-ACv2 board In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-15-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- .../linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 1b6de1e..8fc3ab3 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -71,7 +71,8 @@ case "$FIRMWARE" in ath10kcal_extract "caldata" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1) ;; - mr1750) + mr1750 | \ + om5p-acv2) ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ;; -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 5 11:18:01 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 5 Apr 2016 17:18:01 +0200 Subject: [OpenWrt-Devel] [PATCH 16/16] ar71xx: add OM5P-ACv2 to the OM5P-AC profile In-Reply-To: <1459869481-29376-1-git-send-email-sven@open-mesh.com> References: <1459869481-29376-1-git-send-email-sven@open-mesh.com> Message-ID: <1459869481-29376-16-git-send-email-sven@open-mesh.com> From: Sven Eckelmann Signed-off-by: Sven Eckelmann --- target/linux/ar71xx/generic/profiles/openmesh.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/generic/profiles/openmesh.mk b/target/linux/ar71xx/generic/profiles/openmesh.mk index 0873ac5..6817c59 100644 --- a/target/linux/ar71xx/generic/profiles/openmesh.mk +++ b/target/linux/ar71xx/generic/profiles/openmesh.mk @@ -28,12 +28,12 @@ endef $(eval $(call Profile,OM5P)) define Profile/OM5PAC - NAME:=OpenMesh OM5P-AC + NAME:=OpenMesh OM5P-AC/OM5P-ACv2 PACKAGES:=kmod-ath9k kmod-ath10k om-watchdog endef define Profile/OM5PAC/Description - Package set optimized for the OpenMesh OM5P-AC. + Package set optimized for the OpenMesh OM5P-AC/OM5P-ACv2. endef $(eval $(call Profile,OM5PAC)) -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Alexey.Brodkin at synopsys.com Tue Apr 5 15:02:33 2016 From: Alexey.Brodkin at synopsys.com (Alexey Brodkin) Date: Tue, 5 Apr 2016 19:02:33 +0000 Subject: [OpenWrt-Devel] [PATCH] arc770: enable unaligned access handling simulation in software In-Reply-To: <1459521805-16197-1-git-send-email-abrodkin@synopsys.com> References: <1459521805-16197-1-git-send-email-abrodkin@synopsys.com> Message-ID: <4881796E12491D4BB15146FE0209CE646778125E@DE02WEMBXB.internal.synopsys.com> Hi John, > ________________________________________ > From: Alexey Brodkin [abrodkin at synopsys.com] > Sent: Friday, April 01, 2016 5:43 PM > To: John Crispin > Cc: openwrt-devel at lists.openwrt.org; Alexey Brodkin > Subject: [PATCH] arc770: enable unaligned access handling simulation in software > > This enables misaligned access handling by software in Linux kernel. > > With some wireless drivers (ath9k-htc and mt7601u for example) we see > misaligned accesses here and there and to cope with that without > fixing stuff in the drivers we're just gracefully handling it on ARC. > > Signed-off-by: Alexey Brodkin I'm wondering if there're any comments on this one or it could be applied? -Alexey _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Alexey.Brodkin at synopsys.com Tue Apr 5 15:15:54 2016 From: Alexey.Brodkin at synopsys.com (Alexey Brodkin) Date: Tue, 5 Apr 2016 19:15:54 +0000 Subject: [OpenWrt-Devel] [PATCH] arc770: build kmod-ath9k-htc wpad-mini by default In-Reply-To: <1459521542-2111-1-git-send-email-abrodkin@synopsys.com> References: <1459521542-2111-1-git-send-email-abrodkin@synopsys.com> Message-ID: <4881796E12491D4BB15146FE0209CE6467781291@DE02WEMBXB.internal.synopsys.com> Hi John, > ________________________________________ > From: Alexey Brodkin [abrodkin at synopsys.com] > Sent: Friday, April 01, 2016 5:39 PM > To: John Crispin > Cc: openwrt-devel at lists.openwrt.org; Alexey Brodkin > Subject: [PATCH] arc770: build kmod-ath9k-htc wpad-mini by default > > AXS101 beind a development board lacks built-in wireles inerfaces. > So we have to use external USB dongles to turn the board into > wireless router. > > The best USB Wi-Fi dongles to work in AP-mode seem to be based on > ath9k-htc chipset. > > And so with that change we add support of mentioned dongles in > default and axs101 builds. > > Signed-off-by: Alexey Brodkin I'm wondering if there're any comments on this one or it could be applied? -Alexey _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Tue Apr 5 15:26:55 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Tue, 5 Apr 2016 21:26:55 +0200 Subject: [OpenWrt-Devel] [PATCH] xtables-addons: build: fix configure compatiblity with POSIX shells Message-ID: Fixes build with /bin/sh pointing to certain versions of dash (for example on Void Linux). Signed-off-by: Matthias Schiffer --- ...-configure-compatiblity-with-POSIX-shells.patch | 51 ++++++++++++++++++++++ .../patches/002-fix-kernel-version-detection.patch | 12 ++--- 2 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch diff --git a/package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch b/package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch new file mode 100644 index 0000000..e0b11b5 --- /dev/null +++ b/package/network/utils/xtables-addons/patches/001-build-fix-configure-compatiblity-with-POSIX-shells.patch @@ -0,0 +1,51 @@ +From f07a0a5cb8b3c5e1aee8b30c7fa21ccfbf24a95a Mon Sep 17 00:00:00 2001 +Message-Id: +From: Matthias Schiffer +Date: Fri, 1 Apr 2016 22:24:00 +0200 +Subject: [PATCH] build: fix configure compatiblity with POSIX shells + +The kernel version detection code uses some bashisms, which makes the build +fail on Debian systems where /bin/sh links to dash. Replace with POSIX- +conforming commands at the cost of requiring awk. +--- + configure.ac | 24 +++++++++--------------- + 1 file changed, 9 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 82a1355..5a5ea57 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -44,21 +44,15 @@ regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ + + if test -n "$kbuilddir"; then + AC_MSG_CHECKING([kernel version that we will build against]) +- krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease)"; +- kmajor="${krel%%[[^0-9]]*}"; +- kmajor="$(($kmajor+0))"; +- krel="${krel:${#kmajor}}"; +- krel="${krel#.}"; +- kminor="${krel%%[[^0-9]]*}"; +- kminor="$(($kminor+0))"; +- krel="${krel:${#kminor}}"; +- krel="${krel#.}"; +- kmicro="${krel%%[[^0-9]]*}"; +- kmicro="$(($kmicro+0))"; +- krel="${krel:${#kmicro}}"; +- krel="${krel#.}"; +- kstable="${krel%%[[^0-9]]*}"; +- kstable="$(($kstable+0))"; ++ krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"; ++ save_IFS=$IFS; ++ IFS='.'; ++ set x $krel; ++ IFS=$save_IFS; ++ kmajor="$(($2+0))"; ++ kminor="$(($3+0))"; ++ kmicro="$(($4+0))"; ++ kstable="$(($5+0))"; + if test -z "$kmajor" -o -z "$kminor" -o -z "$kmicro"; then + echo "WARNING: Version detection did not succeed. Continue at own luck."; + else +-- +2.8.0 + diff --git a/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch b/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch index e4101ad..6a7a099 100644 --- a/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch +++ b/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch @@ -1,11 +1,11 @@ --- a/configure.ac +++ b/configure.ac -@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return +@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ if test -n "$kbuilddir"; then AC_MSG_CHECKING([kernel version that we will build against]) -- krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease)"; -+ krel="$(make -sC "$kbuilddir" M=$PWD kernelversion)"; - kmajor="${krel%%[[^0-9]]*}"; - kmajor="$(($kmajor+0))"; - krel="${krel:${#kmajor}}"; +- krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"; ++ krel="$(make -sC "$kbuilddir" M=$PWD kernelversion | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')"; + save_IFS=$IFS; + IFS='.'; + set x $krel; -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hannu.nyman at iki.fi Tue Apr 5 16:35:31 2016 From: hannu.nyman at iki.fi (Hannu Nyman) Date: Tue, 5 Apr 2016 23:35:31 +0300 Subject: [OpenWrt-Devel] [PATCH] tools/cmake: update to 3.5.1 Message-ID: <1459888531-4690-1-git-send-email-hannu.nyman@iki.fi> Update cmake to 3.5.1 Signed-off-by: Hannu Nyman --- Release notes at https://cmake.org/cmake/help/v3.5/release/3.5.html tools/cmake/Makefile | 6 +++--- tools/cmake/patches/100-disable_qt_tests.patch | 4 ++-- tools/cmake/patches/110-freebsd-compat.patch | 3 --- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index d7a68ea..3cbc09e 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cmake -PKG_VERSION:=3.4.3 +PKG_VERSION:=3.5.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://cmake.org/files/v3.4/ \ +PKG_SOURCE_URL:=https://cmake.org/files/v3.5/ \ https://fossies.org/linux/misc/ -PKG_MD5SUM:=4cb3ff35b2472aae70f542116d616e63 +PKG_MD5SUM:=ca051f4a66375c89d1a524e726da0296 HOST_BUILD_PARALLEL:=1 HOST_CONFIGURE_PARALLEL:=1 diff --git a/tools/cmake/patches/100-disable_qt_tests.patch b/tools/cmake/patches/100-disable_qt_tests.patch index 417e27a..9d2f641 100644 --- a/tools/cmake/patches/100-disable_qt_tests.patch +++ b/tools/cmake/patches/100-disable_qt_tests.patch @@ -1,6 +1,6 @@ --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt -@@ -216,15 +216,6 @@ +@@ -217,15 +217,6 @@ add_RunCMake_test(interface_library) add_RunCMake_test(no_install_prefix) add_RunCMake_test(configure_file) @@ -18,7 +18,7 @@ add_RunCMake_test(FindPkgConfig) --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt -@@ -390,10 +390,6 @@ +@@ -389,10 +389,6 @@ if(BUILD_TESTING) list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX}) diff --git a/tools/cmake/patches/110-freebsd-compat.patch b/tools/cmake/patches/110-freebsd-compat.patch index b549448..49c9b78 100644 --- a/tools/cmake/patches/110-freebsd-compat.patch +++ b/tools/cmake/patches/110-freebsd-compat.patch @@ -19,8 +19,6 @@ Change-Id: I3b91ed7ac0e6878035aee202b3336c536cc6d2ff Source/kwsys/SystemInformation.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) -diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx -index 7c31f3a..2672730 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -90,6 +90,15 @@ typedef int siginfo_t; @@ -39,4 +37,3 @@ index 7c31f3a..2672730 100644 #endif #if defined(__OpenBSD__) || defined(__NetBSD__) - -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hannu.nyman at iki.fi Tue Apr 5 16:35:42 2016 From: hannu.nyman at iki.fi (Hannu Nyman) Date: Tue, 5 Apr 2016 23:35:42 +0300 Subject: [OpenWrt-Devel] [PATCH] tools/mpfr: update to 3.1.4 Message-ID: <1459888542-4741-1-git-send-email-hannu.nyman@iki.fi> Update mpfr to 3.1.4 Signed-off-by: Hannu Nyman --- Release notes at: http://www.mpfr.org/mpfr-current/ tools/mpfr/Makefile | 6 +++--- tools/mpfr/patches/001-only_src.patch | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/mpfr/Makefile b/tools/mpfr/Makefile index 16624a7..3a2c339 100644 --- a/tools/mpfr/Makefile +++ b/tools/mpfr/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2015 OpenWrt.org +# Copyright (C) 2009-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mpfr -PKG_VERSION:=3.1.3 +PKG_VERSION:=3.1.4 PKG_SOURCE_URL:=http://www.mpfr.org/mpfr-$(PKG_VERSION) \ @GNU/mpfr PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_MD5SUM:=5fdfa3cfa5c86514ee4a241a1affa138 +PKG_MD5SUM:=b8a2f6b0e68bef46e53da2ac439e1cf4 HOST_BUILD_PARALLEL:=1 HOST_FIXUP:=autoreconf diff --git a/tools/mpfr/patches/001-only_src.patch b/tools/mpfr/patches/001-only_src.patch index 4a07cb9..b983f87 100644 --- a/tools/mpfr/patches/001-only_src.patch +++ b/tools/mpfr/patches/001-only_src.patch @@ -1,6 +1,6 @@ --- a/Makefile.am +++ b/Makefile.am -@@ -18,7 +18,7 @@ +@@ -18,7 +18,7 @@ AUTOMAKE_OPTIONS = gnu # old Automake version. ACLOCAL_AMFLAGS = -I m4 @@ -11,7 +11,7 @@ examples/ReadMe examples/divworst.c examples/rndo-add.c examples/sample.c \ --- a/Makefile.in +++ b/Makefile.in -@@ -377,7 +377,7 @@ top_builddir = @top_builddir@ +@@ -378,7 +378,7 @@ AUTOMAKE_OPTIONS = gnu # libtoolize and in case some developer needs to switch back to an # old Automake version. ACLOCAL_AMFLAGS = -I m4 -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From knaack.h at gmx.de Tue Apr 5 17:43:15 2016 From: knaack.h at gmx.de (Hartmut Knaack) Date: Tue, 5 Apr 2016 23:43:15 +0200 Subject: [OpenWrt-Devel] [PATCH 2/3] ar71xx: add WNR2200 16M version In-Reply-To: <1457385137-21434-1-git-send-email-dirkneukirchen@web.de> References: <1457385137-21434-1-git-send-email-dirkneukirchen@web.de> Message-ID: <57043173.50308@gmx.de> Hi Dirk, just for the records (I didn't spot this myself), there is a typo in the art partition config, which should be 64k but is just 64. Please check back with Silent Wanderer before resending, so he may give his tested-by tag. Thanks, Hartmut Dirk Neukirchen schrieb am 07.03.2016 um 22:12: > - change naming of old firmware to indicate 8M flash > > this change should support 16M international version > > totally untested, used > - input from IRC chat, > - ticket #14356 w. patch, > - verified against GPL tarball (WNR2200 russia version) > > Signed-off-by: Dirk Neukirchen > --- > target/linux/ar71xx/image/Makefile | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile > index ca4437b..d9168fd 100644 > --- a/target/linux/ar71xx/image/Makefile > +++ b/target/linux/ar71xx/image/Makefile > @@ -1594,7 +1594,8 @@ dr344_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1 > wpj531_mtdlayout_16M=mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro > wpj558_mtdlayout_16M=mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro > wndap360_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1728k(kernel),6016k(rootfs),64k(nvram)ro,64k(art)ro,7744k at 0x50000(firmware) > -wnr2200_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro > +wnr2200_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro > +wnr2200_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14784k(firmware),64k(config)ro,1024k(language_table)ro,64k(pot)ro,64k(traffic_meter)ro,64(art)ro,1536k0x050000(kernel),13248k at 0x1d0000(rootfs) > wnr2000v3_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,3712k(firmware),64k(art)ro > wnr2000v4_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,3776k(firmware),64k(art)ro > r6100_mtdlayout=mtdparts=ar934x-nfc:128k(u-boot)ro,256k(caldata),256k(caldata-backup),512k(config),512k(pot),2048k(kernel),122240k(ubi),25600k at 0x1a0000(firmware),2048k(language),3072k(traffic_meter) > @@ -2450,7 +2451,8 @@ $(eval $(call SingleProfile,MyLoader,64k,WPE72_16M,wpe72,,ttyS0,115200,0x1000000 > > $(eval $(call SingleProfile,Netgear,64kraw,WNR2000V3,wnr2000v3,WNR2000V3,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303033,WNR2000V3,"" NA,-H 29763551+04+32)) > $(eval $(call SingleProfile,NetgearLzma,64kraw,WNR2000V4,wnr2000v4,WNR2000V4,ttyS0,115200,$$(wnr2000v4_mtdlayout),0x32303034,WNR2000V4,"" NA,)) > -$(eval $(call SingleProfile,Netgear,64kraw,WNR2200,wnr2200,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout),0x32323030,wnr2200,"" NA,)) > +$(eval $(call SingleProfile,Netgear,64kraw,WNR2200_8M,wnr2200-8m,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout_8M),0x32323030,wnr2200,"" NA,)) > +$(eval $(call SingleProfile,Netgear,64kraw,WNR2200_16M,wnr2200-16m,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout_16M),0x32323030,wnr2200,"" WW,)) > $(eval $(call SingleProfile,Netgear,64kraw,REALWNR612V2,wnr612v2,WNR612V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303631,WNR612V2,"",)) > $(eval $(call SingleProfile,Netgear,64kraw,N150R,n150r,WNR612V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303631,N150R,"",)) > $(eval $(call SingleProfile,Netgear,64kraw,REALWNR1000V2,wnr1000v2,WNR1000V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x31303031,WNR1000V2,"",)) > @@ -2514,6 +2516,7 @@ $(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY)) > $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M)) > $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R)) > $(eval $(call MultiProfile,WNR1000V2,REALWNR1000V2 WNR1000V2_VC)) > +$(eval $(call MultiProfile,WNR2200,WNR2200_8M WNR2200_16M)) > $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M)) > $(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M)) > $(eval $(call MultiProfile,WPJ344,WPJ344_16M)) > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From devel-sven at geroedel.de Tue Apr 5 18:04:06 2016 From: devel-sven at geroedel.de (Sven Roederer) Date: Wed, 06 Apr 2016 00:04:06 +0200 Subject: [OpenWrt-Devel] Cannot flash UBNT Loco M2 In-Reply-To: <56E2D619.3070003@universe-factory.net> References: <56BE547B.1080408@ayrstone.com> <1701680746.20447974.1457704012855.JavaMail.zimbra@saucontech.com> <56E2D619.3070003@universe-factory.net> Message-ID: <9241429.1xcYRVet3K@strike> Hi, for me it helped to go this way, to bring a NSM5 (xm) one member of our Freifunk-community bricked : - UBoot was "1.1.4.2-s956 (Jun 10 2015 - 10:54:50)" and did not accept snapshot-images - downgrading UBoot to "1.1.4.2-s594 (Dec 5 2012 - 15:23:07)" by flashing original xm5.5 image - on uboot start the rescure tftp-server wit option -f (urescue -f), this also overwrites the uboot-code -board boots up with AirOS5.5 and can be flashed to openWRT the normal way found this hint to the "-f" option at the guys of the AREDN-project (http:// bloodhound.aredn.org/products/AREDN/wiki/HowTo/Unbrick) I hope this help SVen Am Friday 11 March 2016, 15:28:41 schrieb Matthias Schiffer: > > Getting out of this state is not easy: you have a U-boot on your device > that doesn't accept correct images, and an OpenWrt version that doesn't > allow writing to the flash. > > Through a serial console, you can try fixing the settings in U-boot; when I > tried this the last time, I wasn't able to do so, but maybe I did something > wrong. The U-boot console has a few interesting settings (I forgot the > exact commands, but the "help" command should tell you everything you need > to know): > > * You can reset the MTD layout to the defaults. This makes the recovery > accept correct images again. Unfortunately, in my experiments, this setting > was not permanent even when I saves the environment after resetting the > layout. In the hindsight, I remember there being a setting to disable flash > protection, maybe that would made have the environment saving effective. > > In the end, I fixed this by creating a patched OpenWrt image that allowed > me to write to the uboot and uboot-env partitions; this allowed me to write > back backups I had made of the uboot and uboot-env before I broke the flash > layout by flashing OpenWrt. Obviously, this does not work if you don't have > backups... > > * If you don't plan to ever go back to AirOS again, it might be okay to > just ignore the broken MTD layout in the U-boot settings. Get into the > U-boot console, reset the MTD layout, start recovery, and flash an OpenWrt > version after trunk r48829 or CC r48849. > > > I hope this helps. I'd be interested if you find a way to parmanently reset > the MTD layout from the U-boot console; unfortunately, I don't have a test > device available at the moment. > > Regards, > Matthias > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tizbac2 at gmail.com Tue Apr 5 18:35:57 2016 From: tizbac2 at gmail.com (Tiziano Bacocco) Date: Wed, 6 Apr 2016 00:35:57 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: add TP-Link TL-WA901ND-v4 support Message-ID: <1459895757-5805-1-git-send-email-tizbac2@gmail.com> Signed-off-by: Tiziano Bacocco --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 +- .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.1 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 9 ++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../files/arch/mips/ath79/mach-tl-wa901nd-v4.c | 112 +++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/Makefile | 10 +- tools/firmware-utils/src/mktplinkfw.c | 6 ++ 12 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 708ebb9..1958964 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -620,7 +620,10 @@ tl-wa901nd-v3) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" ;; - +tl-wa901nd-v4) + ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" + ;; tl-wr941nd | \ tl-wr1041n-v2) ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index bd488a2..19893ee 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -364,6 +364,7 @@ tl-wa801nd-v2 |\ tl-wa901nd |\ tl-wa901nd-v2 |\ tl-wa901nd-v3 |\ +tl-wa901nd-v4 |\ tl-wr703n |\ tube2h |\ unifiac |\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index a2251d1..0389f6e 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -301,6 +301,7 @@ get_status_led() { tl-wa901nd | \ tl-wa901nd-v2 | \ tl-wa901nd-v3 | \ + tl-wa901nd-v4 | \ tl-wdr3320-v2 | \ tl-wdr3500 | \ tl-wr1041n-v2 | \ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 6b8550a..1f7f45a 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -859,6 +859,9 @@ ar71xx_board_detect() { *"TL-WA901ND v3") name="tl-wa901nd-v3" ;; + *"TL-WA901ND v4") + name="tl-wa901nd-v4" + ;; *"TL-WDR3320 v2") name="tl-wdr3320-v2" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 923e02b..b214829 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -363,6 +363,7 @@ platform_check_image() { tl-wa901nd | \ tl-wa901nd-v2 | \ tl-wa901nd-v3 | \ + tl-wa901nd-v4 | \ tl-wdr3320-v2 | \ tl-wdr3500 | \ tl-wdr4300 | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index d6ad850..4edb49e 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -141,6 +141,7 @@ CONFIG_ATH79_MACH_TL_WA801ND_V3=y CONFIG_ATH79_MACH_TL_WA830RE_V2=y CONFIG_ATH79_MACH_TL_WA901ND=y CONFIG_ATH79_MACH_TL_WA901ND_V2=y +CONFIG_ATH79_MACH_TL_WA901ND_V4=y CONFIG_ATH79_MACH_TL_WAX50RE=y CONFIG_ATH79_MACH_TL_WDR3320_V2=y CONFIG_ATH79_MACH_TL_WDR3500=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index f47f1b9..566b2a6 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1153,6 +1153,15 @@ config ATH79_MACH_TL_WA901ND_V2 select ATH79_DEV_M25P80 select ATH79_DEV_WMAC +config ATH79_MACH_TL_WA901ND_V4 + bool "TP-LINK TL-WA901ND v4 support" + select SOC_QCA956X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + config ATH79_MACH_TL_WDR3320_V2 bool "TP-LINK TL-WDR3320 v2 board support" select SOC_AR934X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 74376b2..2217e52 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -149,6 +149,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o obj-$(CONFIG_ATH79_MACH_TL_WA801ND_V3) += mach-tl-wa801nd-v3.o obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o +obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V4) += mach-tl-wa901nd-v4.o obj-$(CONFIG_ATH79_MACH_TL_WDR3320_V2) += mach-tl-wdr3320-v2.o obj-$(CONFIG_ATH79_MACH_TL_WDR3500) += mach-tl-wdr3500.o obj-$(CONFIG_ATH79_MACH_TL_WDR4300) += mach-tl-wdr4300.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c new file mode 100644 index 0000000..9c651bb --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c @@ -0,0 +1,112 @@ +/* + * TP-LINK TL-WA901ND v4 board + * + * Copyright (C) 2015 Matthias Schiffer + * Copyright (C) 2016 Tiziano Bacocco + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include + +#include +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-wmac.h" +#include "machtypes.h" + + +#define TL_WA901ND_V4_GPIO_LED_QSS 3 +#define TL_WA901ND_V4_GPIO_LED_LAN 7 +#define TL_WA901ND_V4_GPIO_LED_WLAN 8 +#define TL_WA901ND_V4_GPIO_LED_SYSTEM 18 + +#define TL_WA901ND_V4_GPIO_BTN_RESET 1 + +#define TL_WA901ND_V4_KEYS_POLL_INTERVAL 20 +#define TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WA901ND_V4_KEYS_POLL_INTERVAL) + + +static struct gpio_led TL_WA901ND_V4_leds_gpio[] __initdata = { + { + .name = "tp-link:green:qss", + .gpio = TL_WA901ND_V4_GPIO_LED_QSS, + .active_low = 1, + }, + { + .name = "tp-link:green:lan", + .gpio = TL_WA901ND_V4_GPIO_LED_LAN, + .active_low = 1, + }, + { + .name = "tp-link:green:wlan", + .gpio = TL_WA901ND_V4_GPIO_LED_WLAN, + .active_low = 1, + }, + { + .name = "tp-link:green:system", + .gpio = TL_WA901ND_V4_GPIO_LED_SYSTEM, + .active_low = 1, + }, +}; + +static struct gpio_keys_button TL_WA901ND_V4_gpio_keys[] __initdata = { + { + .desc = "Reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL, + .gpio = TL_WA901ND_V4_GPIO_BTN_RESET, + .active_low = 1, + } +}; + + +static const char *tl_wa901nd_v4_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data tl_wa901nd_v4_flash_data = { + .part_probes = tl_wa901nd_v4_part_probes, +}; + + +static void __init TL_WA901ND_V4_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + ath79_register_m25p80(&tl_wa901nd_v4_flash_data); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(TL_WA901ND_V4_leds_gpio), + TL_WA901ND_V4_leds_gpio); + + ath79_register_gpio_keys_polled(-1, TL_WA901ND_V4_KEYS_POLL_INTERVAL, + ARRAY_SIZE(TL_WA901ND_V4_gpio_keys), + TL_WA901ND_V4_gpio_keys); + + ath79_register_mdio(0, 0x0); + + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); + + ath79_switch_data.phy4_mii_en = 1; + + ath79_register_eth(0); + ath79_register_eth(1); + + ath79_register_wmac(ee, mac); + +} + +MIPS_MACHINE(ATH79_MACH_TL_WA901ND_V4, "TL-WA901ND-v4", "TP-LINK TL-WA901ND v4", + TL_WA901ND_V4_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 307d2df..619072f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -175,6 +175,7 @@ enum ath79_mach_type { ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */ ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */ ATH79_MACH_TL_WA901ND_V3, /* TP-LINK TL-WA901ND v3 */ + ATH79_MACH_TL_WA901ND_V4, /* TP-LINK TL-WA901ND v4 */ ATH79_MACH_TL_WDR3320_V2, /* TP-LINK TL-WDR3320 v2 */ ATH79_MACH_TL_WDR3500, /* TP-LINK TL-WDR3500 */ ATH79_MACH_TL_WDR4300, /* TP-LINK TL-WDR4300 */ diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 595fba2..030b1b4 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1087,7 +1087,15 @@ define Device/tl-wa901nd-v3 DEVICE_PROFILE := TLWA901 TPLINK_HWID := 0x09010003 endef -TARGET_DEVICES += tl-wa901nd-v1 tl-wa901nd-v2 tl-wa901nd-v3 + +define Device/tl-wa901nd-v4 + $(Device/tplink-4mlzma) + BOARDNAME := TL-WA901ND-v4 + DEVICE_PROFILE := TLWA901 + TPLINK_HWID := 0x09010004 +endef + +TARGET_DEVICES += tl-wa901nd-v1 tl-wa901nd-v2 tl-wa901nd-v3 tl-wa901nd-v4 define Device/tl-wa7210n-v2 $(Device/tplink-4mlzma) diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index 692e48b..bf7c619 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -55,6 +55,7 @@ #define HWID_TL_WA801ND_V3 0x08010003 #define HWID_TL_WA901ND_V1 0x09010001 #define HWID_TL_WA901ND_V2 0x09010002 +#define HWID_TL_WA901ND_V4 0x09010004 #define HWID_TL_WDR4300_V1_IL 0x43008001 #define HWID_TL_WDR4900_V1 0x49000001 #define HWID_TL_WR703N_V1 0x07030101 @@ -316,6 +317,11 @@ static struct board_info boards[] = { .hw_rev = 1, .layout_id = "4M", }, { + .id = "TL-WA901NDv4", + .hw_id = HWID_TL_WA901ND_V4, + .hw_rev = 1, + .layout_id = "4Mlzma", + }, { .id = "TL-WDR4300v1", .hw_id = HWID_TL_WDR4300_V1_IL, .hw_rev = 1, -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ianchi74 at outlook.com Tue Apr 5 22:57:49 2016 From: ianchi74 at outlook.com (Adrian Panella) Date: Tue, 5 Apr 2016 21:57:49 -0500 Subject: [OpenWrt-Devel] [PATCH] [ipq806x] enable hard float Message-ID: Author: Adrian Panella Date: Tue Apr 5 21:45:14 2016 -0500 IPQ806X: enable hard float tested with Linksys EA8500 Signed-off-by: Adrian Panella diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 97a40cf..689ba64 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq806x BOARDNAME:=Qualcomm Atheros IPQ806X -FEATURES:=squashfs nand ubifs +FEATURES:=squashfs nand ubifs fpu CPU_TYPE:=cortex-a9 CPU_SUBTYPE:=neon-vfpv4 MAINTAINER:=John Crispin _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From martin.blumenstingl at googlemail.com Wed Apr 6 01:53:27 2016 From: martin.blumenstingl at googlemail.com (Martin Blumenstingl) Date: Wed, 6 Apr 2016 07:53:27 +0200 Subject: [OpenWrt-Devel] [PATCH] [ipq806x] enable hard float In-Reply-To: References: Message-ID: Hi Adrian, On Wed, Apr 6, 2016 at 4:57 AM, Adrian Panella wrote: > Author: Adrian Panella > > Date: Tue Apr 5 21:45:14 2016 -0500 > > IPQ806X: enable hard float > > tested with Linksys EA8500 > > Signed-off-by: Adrian Panella > > diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile > > index 97a40cf..689ba64 100644 > > --- a/target/linux/ipq806x/Makefile > > +++ b/target/linux/ipq806x/Makefile your patch seems to be whitespace-broken. I guess this is also the reason why it's not shown in patchwork: http://patchwork.ozlabs.org/project/openwrt/list/ Could you please re-send it? Regards, Martin _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Wed Apr 6 11:40:22 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Wed, 6 Apr 2016 17:40:22 +0200 Subject: [OpenWrt-Devel] [PATCH libubox] blobmsg_json: simplify add_separator and fix thread-safety Message-ID: The hard-coded length limits are replaced with strlen to make the code more robust. Signed-off-by: Matthias Schiffer --- blobmsg_json.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/blobmsg_json.c b/blobmsg_json.c index 2d1d80d..5713948 100644 --- a/blobmsg_json.c +++ b/blobmsg_json.c @@ -135,21 +135,17 @@ static bool blobmsg_puts(struct strbuf *s, const char *c, int len) static void add_separator(struct strbuf *s) { - static char indent_chars[17] = "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; - int indent; - char *start; + const char *indent_chars = "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; + int len; if (!s->indent) return; - indent = s->indent_level; - if (indent > 16) - indent = 16; + len = s->indent_level + 1; + if (len > strlen(indent_chars)) + len = strlen(indent_chars); - start = &indent_chars[sizeof(indent_chars) - indent - 1]; - *start = '\n'; - blobmsg_puts(s, start, indent + 1); - *start = '\t'; + blobmsg_puts(s, indent_chars, len); } -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.engberg.lists at pyret.net Wed Apr 6 13:54:06 2016 From: daniel.engberg.lists at pyret.net (Daniel Engberg) Date: Wed, 6 Apr 2016 19:54:06 +0200 Subject: [OpenWrt-Devel] [PATCH] package/utils/usbutils: Update USB IDs list and drop gzip compression Message-ID: <57054D3E.4000104@pyret.net> Change mirror to Github (Gentoo repo) and drop the gzip compression. Worst case there's a 4kbyte increase in size but most images ends up beign somewhere between 4-100kbyte smaller due to the lzma compression. Tested on ar71xx Signed-off-by: Daniel Engberg --- diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile index 9b5470a..0457ded 100644 --- a/package/utils/usbutils/Makefile +++ b/package/utils/usbutils/Makefile @@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usbutils PKG_VERSION:=007 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils PKG_MD5SUM:=a6bd63d5c44cebb717a960eae22a3ca9 -USB_IDS_VERSION:=2015-12-17 -USB_IDS_MD5SUM:=8c091fdcdbc4e8e60a518d0148b0dad3 -USB_IDS_FILE:=usb.ids.$(USB_IDS_VERSION).gz +USB_IDS_VERSION:=2016-03-03 +USB_IDS_MD5SUM:=273596b6ee101b1df454827cfa87dff8 +USB_IDS_FILE:=usb.ids PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -36,7 +36,7 @@ endef define Download/usb_ids FILE:=$(USB_IDS_FILE) - URL:=http://projects.pyret.net/dump/openwrt/distfiles + URL:=https://raw.githubusercontent.com/gentoo/hwids/d9e840aa3d5cedf5637d59ef0dc555c380a0e822/usb.ids MD5SUM:=$(USB_IDS_MD5SUM) endef $(eval $(call Download,usb_ids)) @@ -44,7 +44,7 @@ $(eval $(call Download,usb_ids)) define Build/Prepare $(Build/Prepare/Default) echo '#!/bin/sh' > $(PKG_BUILD_DIR)/update-usbids.sh.in - echo 'cp $(DL_DIR)/$(USB_IDS_FILE) usb.ids.gz' >> $(PKG_BUILD_DIR)/update-usbids.sh.in + echo 'gzip -9 -f -k $(DL_DIR)/$(USB_IDS_FILE)' >> $(PKG_BUILD_DIR)/update-usbids.sh.in endef define Package/usbutils/install _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.engberg.lists at pyret.net Wed Apr 6 14:00:08 2016 From: daniel.engberg.lists at pyret.net (Daniel Engberg) Date: Wed, 6 Apr 2016 20:00:08 +0200 Subject: [OpenWrt-Devel] [PATCH v2] package/utils/usbutils: Update USB IDs list and drop gzip compression Message-ID: <57054EA8.2000205@pyret.net> Change mirror to Github (Gentoo repo) and drop the gzip compression. Worst case there's a 4kbyte increase in size but most images ends up beign somewhere between 4-100kbyte smaller due to the lzma compression. Tested on ar71xx Now contains the correct patch, sorry! Signed-off-by: Daniel Engberg --- diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile index 9b5470a..7119a2a 100644 --- a/package/utils/usbutils/Makefile +++ b/package/utils/usbutils/Makefile @@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usbutils PKG_VERSION:=007 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils PKG_MD5SUM:=a6bd63d5c44cebb717a960eae22a3ca9 -USB_IDS_VERSION:=2015-12-17 -USB_IDS_MD5SUM:=8c091fdcdbc4e8e60a518d0148b0dad3 -USB_IDS_FILE:=usb.ids.$(USB_IDS_VERSION).gz +USB_IDS_VERSION:=2016-03-03 +USB_IDS_MD5SUM:=273596b6ee101b1df454827cfa87dff8 +USB_IDS_FILE:=usb.ids PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -36,7 +36,7 @@ endef define Download/usb_ids FILE:=$(USB_IDS_FILE) - URL:=http://projects.pyret.net/dump/openwrt/distfiles + URL:=https://raw.githubusercontent.com/gentoo/hwids/d9e840aa3d5cedf5637d59ef0dc555c380a0e822 MD5SUM:=$(USB_IDS_MD5SUM) endef $(eval $(call Download,usb_ids)) @@ -44,14 +44,13 @@ $(eval $(call Download,usb_ids)) define Build/Prepare $(Build/Prepare/Default) echo '#!/bin/sh' > $(PKG_BUILD_DIR)/update-usbids.sh.in - echo 'cp $(DL_DIR)/$(USB_IDS_FILE) usb.ids.gz' >> $(PKG_BUILD_DIR)/update-usbids.sh.in endef define Package/usbutils/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/share - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/ endef $(eval $(call BuildPackage,usbutils)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sknaumov at gmail.com Wed Apr 6 15:37:14 2016 From: sknaumov at gmail.com (Sergey Naumov) Date: Wed, 6 Apr 2016 22:37:14 +0300 Subject: [OpenWrt-Devel] cfg80211 wext-compat layer in OpenWRT Message-ID: Hi all. I'm trying to use cfg80211 wext compatibility layer in my program, and while on desktop (ubuntu 15.04) everything is OK, on OpenWRT barrier-breaker and some pre-release of chaos-calmer I see that only txpower wext ioctl works, while SSID and channel don't. I see that in config files CFG80211_WEXT is enabled in compat-wireless, but disabled in kernel itself. My OpenWRT router is TP-Link Archer C7 v2 and in both cases (my laptop and OpenWRT router) device driver is ath9k. Have someone experienced similar problems? Thanks, Sergey. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.engberg.lists at pyret.net Thu Apr 7 02:50:38 2016 From: daniel.engberg.lists at pyret.net (Daniel Engberg) Date: Thu, 7 Apr 2016 08:50:38 +0200 Subject: [OpenWrt-Devel] [PATCH v3] package/utils/usbutils: Update USB IDs list and drop gzip compression Message-ID: <5706033E.6080601@pyret.net> Change mirror to Github (Gentoo repo) and drop the gzip compression. Worst case there's about 4kbyte increase in size but most images ends up beign somewhere between 4-100kbyte smaller due to the lzma compression. Tested on ar71xx v2 Now contains the correct patch, sorry! v3 Turns out that the update-usbids.sh.in isn't executed at all... Signed-off-by: Daniel Engberg --- diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile index 9b5470a..c1b82a9 100644 --- a/package/utils/usbutils/Makefile +++ b/package/utils/usbutils/Makefile @@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usbutils PKG_VERSION:=007 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils PKG_MD5SUM:=a6bd63d5c44cebb717a960eae22a3ca9 -USB_IDS_VERSION:=2015-12-17 -USB_IDS_MD5SUM:=8c091fdcdbc4e8e60a518d0148b0dad3 -USB_IDS_FILE:=usb.ids.$(USB_IDS_VERSION).gz +USB_IDS_VERSION:=2016-03-03 +USB_IDS_MD5SUM:=273596b6ee101b1df454827cfa87dff8 +USB_IDS_FILE:=usb.ids PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -36,22 +36,24 @@ endef define Download/usb_ids FILE:=$(USB_IDS_FILE) - URL:=http://projects.pyret.net/dump/openwrt/distfiles + URL:=https://raw.githubusercontent.com/gentoo/hwids/d9e840aa3d5cedf5637d59ef0dc555c380a0e822 MD5SUM:=$(USB_IDS_MD5SUM) endef $(eval $(call Download,usb_ids)) define Build/Prepare $(Build/Prepare/Default) - echo '#!/bin/sh' > $(PKG_BUILD_DIR)/update-usbids.sh.in - echo 'cp $(DL_DIR)/$(USB_IDS_FILE) usb.ids.gz' >> $(PKG_BUILD_DIR)/update-usbids.sh.in + $(CP) $(DL_DIR)/$(USB_IDS_FILE) $(PKG_BUILD_DIR) endef +CONFIGURE_ARGS += \ + --disable-zlib + define Package/usbutils/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/share - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/ endef $(eval $(call BuildPackage,usbutils)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dirk.feytons at gmail.com Thu Apr 7 04:21:48 2016 From: dirk.feytons at gmail.com (Dirk Feytons) Date: Thu, 7 Apr 2016 10:21:48 +0200 Subject: [OpenWrt-Devel] [PATCH 1/3] curl: upstep to latest version 7.48.0 Message-ID: <1460017310-14214-1-git-send-email-dirk.feytons@gmail.com> Signed-off-by: Dirk Feytons --- package/network/utils/curl/Makefile | 6 +++--- .../utils/curl/patches/200-no_docs_tests.patch | 4 ++-- .../curl/patches/300-fix-disable-crypto-auth.patch | 2 +- ...10-polarssl-disable-runtime-version-check.patch | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile index bc85da3..eada1aa 100644 --- a/package/network/utils/curl/Makefile +++ b/package/network/utils/curl/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2015 OpenWrt.org +# Copyright (C) 2007-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=curl -PKG_VERSION:=7.47.0 +PKG_VERSION:=7.48.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://curl.haxx.se/download/ \ ftp://ftp.planetmirror.com/pub/curl/ \ http://www.mirrormonster.com/curl/download/ \ http://curl.mirrors.cyberservers.net/download/ -PKG_MD5SUM:=85c58a00412476993050cb242a3f365d +PKG_MD5SUM:=d42e0fc34a5cace5739631cc040974fe PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING diff --git a/package/network/utils/curl/patches/200-no_docs_tests.patch b/package/network/utils/curl/patches/200-no_docs_tests.patch index 5db3925..4ac5bad 100644 --- a/package/network/utils/curl/patches/200-no_docs_tests.patch +++ b/package/network/utils/curl/patches/200-no_docs_tests.patch @@ -1,6 +1,6 @@ --- a/Makefile.am +++ b/Makefile.am -@@ -141,7 +141,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) +@@ -150,7 +150,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) bin_SCRIPTS = curl-config SUBDIRS = lib src include scripts @@ -11,7 +11,7 @@ pkgconfig_DATA = libcurl.pc --- a/Makefile.in +++ b/Makefile.in -@@ -601,7 +601,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) +@@ -611,7 +611,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) bin_SCRIPTS = curl-config SUBDIRS = lib src include scripts diff --git a/package/network/utils/curl/patches/300-fix-disable-crypto-auth.patch b/package/network/utils/curl/patches/300-fix-disable-crypto-auth.patch index abec7ad..5c0a37e 100644 --- a/package/network/utils/curl/patches/300-fix-disable-crypto-auth.patch +++ b/package/network/utils/curl/patches/300-fix-disable-crypto-auth.patch @@ -1,6 +1,6 @@ --- a/lib/curl_ntlm_msgs.c +++ b/lib/curl_ntlm_msgs.c -@@ -569,7 +569,7 @@ CURLcode Curl_sasl_create_ntlm_type3_mes +@@ -573,7 +573,7 @@ CURLcode Curl_sasl_create_ntlm_type3_mes else #endif diff --git a/package/network/utils/curl/patches/310-polarssl-disable-runtime-version-check.patch b/package/network/utils/curl/patches/310-polarssl-disable-runtime-version-check.patch index 6f9cf2e..7f7937b 100644 --- a/package/network/utils/curl/patches/310-polarssl-disable-runtime-version-check.patch +++ b/package/network/utils/curl/patches/310-polarssl-disable-runtime-version-check.patch @@ -11,7 +11,7 @@ version>>24, (version>>16)&0xff, (version>>8)&0xff); --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c -@@ -686,7 +686,7 @@ void Curl_mbedtls_session_free(void *ptr +@@ -712,7 +712,7 @@ void Curl_mbedtls_session_free(void *ptr size_t Curl_mbedtls_version(char *buffer, size_t size) { _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dirk.feytons at gmail.com Thu Apr 7 04:21:49 2016 From: dirk.feytons at gmail.com (Dirk Feytons) Date: Thu, 7 Apr 2016 10:21:49 +0200 Subject: [OpenWrt-Devel] [PATCH 2/3] curl: add config option for NTLM support In-Reply-To: <1460017310-14214-1-git-send-email-dirk.feytons@gmail.com> References: <1460017310-14214-1-git-send-email-dirk.feytons@gmail.com> Message-ID: <1460017310-14214-2-git-send-email-dirk.feytons@gmail.com> Signed-off-by: Dirk Feytons --- package/network/utils/curl/Config.in | 5 +++++ package/network/utils/curl/Makefile | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/network/utils/curl/Config.in b/package/network/utils/curl/Config.in index f41307a..14d2047 100644 --- a/package/network/utils/curl/Config.in +++ b/package/network/utils/curl/Config.in @@ -154,4 +154,9 @@ config LIBCURL_VERBOSE bool "Enable verbose error strings" default n +config LIBCURL_NTLM + bool "Enable NTLM support" + depends LIBCURL_CRYPTO_AUTH && !LIBCURL_NOSSL + default n + endif diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile index eada1aa..319c0b7 100644 --- a/package/network/utils/curl/Makefile +++ b/package/network/utils/curl/Makefile @@ -65,7 +65,8 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_LIBCURL_THREADED_RESOLVER \ CONFIG_LIBCURL_TLS_SRP \ CONFIG_LIBCURL_UNIX_SOCKETS \ - CONFIG_LIBCURL_VERBOSE + CONFIG_LIBCURL_VERBOSE \ + CONFIG_LIBCURL_NTLM include $(INCLUDE_DIR)/package.mk @@ -99,6 +100,7 @@ define Package/libcurl/config endef TARGET_CFLAGS += $(FPIC) +TARGET_CPPFLAGS += $(if $(CONFIG_LIBCURL_NTLM),,-DCURL_DISABLE_NTLM) CONFIGURE_ARGS += \ --disable-debug \ _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dirk.feytons at gmail.com Thu Apr 7 04:21:50 2016 From: dirk.feytons at gmail.com (Dirk Feytons) Date: Thu, 7 Apr 2016 10:21:50 +0200 Subject: [OpenWrt-Devel] [PATCH 3/3] curl: add flags to allow gc-sections to strip out unused code In-Reply-To: <1460017310-14214-1-git-send-email-dirk.feytons@gmail.com> References: <1460017310-14214-1-git-send-email-dirk.feytons@gmail.com> Message-ID: <1460017310-14214-3-git-send-email-dirk.feytons@gmail.com> Signed-off-by: Dirk Feytons --- package/network/utils/curl/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile index 319c0b7..af38ed4 100644 --- a/package/network/utils/curl/Makefile +++ b/package/network/utils/curl/Makefile @@ -99,8 +99,9 @@ define Package/libcurl/config source "$(SOURCE)/Config.in" endef -TARGET_CFLAGS += $(FPIC) +TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections TARGET_CPPFLAGS += $(if $(CONFIG_LIBCURL_NTLM),,-DCURL_DISABLE_NTLM) +TARGET_LDFLAGS += -Wl,--gc-sections CONFIGURE_ARGS += \ --disable-debug \ _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From eckert.florian at googlemail.com Thu Apr 7 05:08:24 2016 From: eckert.florian at googlemail.com (Florian Eckert) Date: Thu, 7 Apr 2016 11:08:24 +0200 Subject: [OpenWrt-Devel] [PATCH 1/3] lantiq-dsl: bugfix db negative sign after comma Message-ID: <1460020107-9042-1-git-send-email-feckert@tdt.de> From: Florian Eckert If db is negative minus sign was shown after comma Signed-off-by: Florian Eckert --- target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh index aefefcd..adf245a 100755 --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh @@ -31,7 +31,7 @@ dsl_string() { dbt() { local a=$(expr $1 / 10) local b=$(expr $1 % 10) - echo "${a}.${b}" + echo "${a}.${b#-}" } # # Take a number and convert to k or meg -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From eckert.florian at googlemail.com Thu Apr 7 05:08:25 2016 From: eckert.florian at googlemail.com (Florian Eckert) Date: Thu, 7 Apr 2016 11:08:25 +0200 Subject: [OpenWrt-Devel] [PATCH 1/3] lantiq-dsl: bugfix db negative sign after comma In-Reply-To: <1460020107-9042-1-git-send-email-feckert@tdt.de> References: <1460020107-9042-1-git-send-email-feckert@tdt.de> Message-ID: <1460020107-9042-2-git-send-email-feckert@tdt.de> From: Florian Eckert If db is negative minus sign was shown after comma Signed-off-by: Florian Eckert --- target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh index aefefcd..adf245a 100755 --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh @@ -31,7 +31,7 @@ dsl_string() { dbt() { local a=$(expr $1 / 10) local b=$(expr $1 % 10) - echo "${a}.${b}" + echo "${a}.${b#-}" } # # Take a number and convert to k or meg -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From eckert.florian at googlemail.com Thu Apr 7 05:08:26 2016 From: eckert.florian at googlemail.com (Florian Eckert) Date: Thu, 7 Apr 2016 11:08:26 +0200 Subject: [OpenWrt-Devel] [PATCH 2/3] lantiq-dsl: bugfix latency values swapped for lucistat In-Reply-To: <1460020107-9042-1-git-send-email-feckert@tdt.de> References: <1460020107-9042-1-git-send-email-feckert@tdt.de> Message-ID: <1460020107-9042-3-git-send-email-feckert@tdt.de> From: Florian Eckert swapped wrong latency output Signed-off-by: Florian Eckert --- target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh index adf245a..8c6482f 100755 --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh @@ -430,8 +430,8 @@ latency_delay() { sidd=$(scale_latency $idd) if [ "$action" = "lucistat" ]; then - echo "dsl.latency_num_down=\"$sidu\"" - echo "dsl.latency_num_up=\"$sidd\"" + echo "dsl.latency_num_down=\"$sidd\"" + echo "dsl.latency_num_up=\"$sidu\"" echo "dsl.latency_s_down=\"$idd_s\"" echo "dsl.latency_s_up=\"$idu_s\"" else -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From eckert.florian at googlemail.com Thu Apr 7 05:08:27 2016 From: eckert.florian at googlemail.com (Florian Eckert) Date: Thu, 7 Apr 2016 11:08:27 +0200 Subject: [OpenWrt-Devel] [PATCH 3/3] lantiq-dsl: add missing blank in dsl output In-Reply-To: <1460020107-9042-1-git-send-email-feckert@tdt.de> References: <1460020107-9042-1-git-send-email-feckert@tdt.de> Message-ID: <1460020107-9042-4-git-send-email-feckert@tdt.de> From: Florian Eckert blank inserted before ACTATP Signed-off-by: Florian Eckert --- target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh index 8c6482f..41993f7 100755 --- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh +++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh @@ -639,7 +639,7 @@ line_data() { echo "Line Attenuation (LATN): Down: ${latnd}dB / Up: ${latnu}dB" echo "Signal Attenuation (SATN): Down: ${satnd}dB / Up: ${satnu}dB" echo "Noise Margin (SNR): Down: ${snrd}dB / Up: ${snru}dB" - echo "Aggregate Transmit Power(ACTATP): Down: ${actatpd}dB / Up: ${actatpu}dB" + echo "Aggregate Transmit Power (ACTATP): Down: ${actatpd}dB / Up: ${actatpu}dB" echo "Max. Attainable Data Rate (ATTNDR): Down: ${sattndrd}/s / Up: ${sattndru}/s" fi } -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zioproto at gmail.com Thu Apr 7 05:39:46 2016 From: zioproto at gmail.com (Saverio Proto) Date: Thu, 7 Apr 2016 11:39:46 +0200 Subject: [OpenWrt-Devel] 15.05.1 - Chaos Calmer In-Reply-To: <5703C0E0.1020601@phrozen.org> References: <56E94C5D.1030302@openwrt.org> <56E9A88C.5060409@einfach.org> <5702D0CF.5010107@einfach.org> <5703C0E0.1020601@phrozen.org> Message-ID: Who has commit rights on the other tree ? So we can send an email to have it fixed ? thank you :) Saverio 2016-04-05 15:42 GMT+02:00 John Crispin : > > > On 05/04/2016 15:33, Saverio Proto wrote: >> Thanks Bruno, >> >> I am sorry I am coming back to OpenWrt after a long break. >> >> I expected the tag also on the Release repo >> >> http://git.openwrt.org/?p=15.05/openwrt.git;a=summary >> >> Here I see only a 15.05 tag. I dont understand the logic. I expect the >> 15.05.1 to be release from the Release-repo ? >> >> thank you >> >> Saverio >> > > the logic is that i can push a tag to one tree but not to the other and > whoever can is not reading this thread > > John > > >> >> 2016-04-04 22:38 GMT+02:00 Bruno Randolf : >>> On 04/04/2016 09:34 PM, Saverio Proto wrote: >>>>> Great! Thanks for your good work! >>>>> Could you please add a tag for 15.05.1 in the git repo? >>>> >>>> That would be great. I am trying to git bisect a bug and I have no >>>> idea on top of what commit is 15.05.1 built. >>> >>> There is a tag for it already: >>> >>> https://github.com/openwrt/openwrt/tags >>> >>> bruno >>> >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel at lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Thu Apr 7 11:57:22 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Thu, 7 Apr 2016 17:57:22 +0200 Subject: [OpenWrt-Devel] [PATCH] brcm2708: Implement sysupgrade image check Message-ID: <1460044642-7096-1-git-send-email-chunkeey@googlemail.com> Implement a crude but functioning sysupgrade image check for Raspberry Pi. The code only checks if the master boot record boot signature (0x55aa) is present in the first 512-bytes at the correct location. This can prevent the odd, accidental bricking of a system when flashing the wrong file. The platform check supports both gzipped and raw images. Signed-off-by: Christian Lamparter --- .../linux/brcm2708/base-files/lib/upgrade/platform.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh index 1d4b694..88c30cc 100644 --- a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh +++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh @@ -1,5 +1,20 @@ +get_magic_at() { + local file=$1 + local pos=$2 + ( gunzip -c $file 2>/dev/null || cat $file 2>/dev/null ) | dd bs=1 count=2 skip=$pos 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"' +} + platform_check_image() { - # i know no way to verify the image + local file=$1 + local magic + + magic=$(get_magic_at $file 510) + + [ "$magic" != "55aa" ] && { + echo "Failed to verify MBR boot signature." + return 1 + } + return 0; } -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 7 12:04:54 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 7 Apr 2016 18:04:54 +0200 Subject: [OpenWrt-Devel] [PATCH] brcm2708: Implement sysupgrade image check In-Reply-To: <1460044642-7096-1-git-send-email-chunkeey@googlemail.com> References: <1460044642-7096-1-git-send-email-chunkeey@googlemail.com> Message-ID: <57068526.3060403@universe-factory.net> On 04/07/2016 05:57 PM, Christian Lamparter wrote: > Implement a crude but functioning sysupgrade image check for Raspberry Pi. > The code only checks if the master boot record boot signature (0x55aa) is > present in the first 512-bytes at the correct location. This can prevent > the odd, accidental bricking of a system when flashing the wrong file. > > The platform check supports both gzipped and raw images. > > Signed-off-by: Christian Lamparter > --- > .../linux/brcm2708/base-files/lib/upgrade/platform.sh | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh > index 1d4b694..88c30cc 100644 > --- a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh > +++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh > @@ -1,5 +1,20 @@ > +get_magic_at() { > + local file=$1 > + local pos=$2 > + ( gunzip -c $file 2>/dev/null || cat $file 2>/dev/null ) | dd bs=1 count=2 skip=$pos 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"' Instead of calling gunzip yourself, you should just use get_image (defined in package/base-files/files/lib/upgrade/common.sh ) as it is done on other targets, it will transparently deal with compressed and even remote files. Regards, Matthias > +} > + > platform_check_image() { > - # i know no way to verify the image > + local file=$1 > + local magic > + > + magic=$(get_magic_at $file 510) > + > + [ "$magic" != "55aa" ] && { > + echo "Failed to verify MBR boot signature." > + return 1 > + } > + > return 0; > } > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kevin at koconnor.net Thu Apr 7 12:21:05 2016 From: kevin at koconnor.net (Kevin O'Connor) Date: Thu, 7 Apr 2016 12:21:05 -0400 Subject: [OpenWrt-Devel] [PATCH] hostapd.sh: Add support for "anonymous_identity" config field Message-ID: <1460046065-3754-1-git-send-email-kevin@koconnor.net> The wpa_supplicant supports an "anonymous_identity" field, which some EAP networks require. From the documentation: anonymous_identity: Anonymous identity string for EAP (to be used as the unencrypted identity with EAP types that support different tunnelled identity, e.g., EAP-TTLS). This change modifies the hostapd.sh script to propagate this field from the UCI config to the wpa_supplicant.conf file. Signed-off-by: Kevin O'Connor --- package/network/services/hostapd/files/netifd.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index ad96b8b..005112d 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -139,7 +139,7 @@ hostapd_common_add_bss_config() { config_add_string nasid config_add_string ownip config_add_string iapp_interface - config_add_string eap_type ca_cert client_cert identity auth priv_key priv_key_pwd + config_add_string eap_type ca_cert client_cert identity anonymous_identity auth priv_key priv_key_pwd config_add_int dynamic_vlan vlan_naming config_add_string vlan_tagged_interface vlan_bridge @@ -623,9 +623,10 @@ wpa_supplicant_add_network() { key_mgmt='WPA-EAP' [ "$ieee80211r" -gt 0 ] && key_mgmt="FT-EAP $key_mgmt" - json_get_vars eap_type identity ca_cert + json_get_vars eap_type identity anonymous_identity ca_cert [ -n "$ca_cert" ] && append network_data "ca_cert=\"$ca_cert\"" "$N$T" [ -n "$identity" ] && append network_data "identity=\"$identity\"" "$N$T" + [ -n "$anonymous_identity" ] && append network_data "anonymous_identity=\"$anonymous_identity\"" "$N$T" case "$eap_type" in tls) json_get_vars client_cert priv_key priv_key_pwd -- 2.5.5 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kevin at koconnor.net Thu Apr 7 12:22:11 2016 From: kevin at koconnor.net (Kevin O'Connor) Date: Thu, 7 Apr 2016 12:22:11 -0400 Subject: [OpenWrt-Devel] [luci] [PATCH] luci-mod-admin-full: Add option to set anonymous_identity field Message-ID: <1460046131-3843-1-git-send-email-kevin@koconnor.net> Add support for setting the "anonymous_identity" field on EAP type networks. Signed-off-by: Kevin O'Connor --- I sent a similar request to the openwrt mailing list that adds support to the hostapd.sh script. --- .../luasrc/model/cbi/admin_network/wifi.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua index 945512e..09763e8 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua @@ -967,6 +967,24 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"}) identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa"}) + anonymous_identity = s:taboption("encryption", Value, "anonymous_identity", translate("Anonymous Identity")) + anonymous_identity:depends({mode="sta", eap_type="fast", encryption="wpa2"}) + anonymous_identity:depends({mode="sta", eap_type="fast", encryption="wpa"}) + anonymous_identity:depends({mode="sta", eap_type="peap", encryption="wpa2"}) + anonymous_identity:depends({mode="sta", eap_type="peap", encryption="wpa"}) + anonymous_identity:depends({mode="sta", eap_type="ttls", encryption="wpa2"}) + anonymous_identity:depends({mode="sta", eap_type="ttls", encryption="wpa"}) + anonymous_identity:depends({mode="sta-wds", eap_type="fast", encryption="wpa2"}) + anonymous_identity:depends({mode="sta-wds", eap_type="fast", encryption="wpa"}) + anonymous_identity:depends({mode="sta-wds", eap_type="peap", encryption="wpa2"}) + anonymous_identity:depends({mode="sta-wds", eap_type="peap", encryption="wpa"}) + anonymous_identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa2"}) + anonymous_identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa"}) + anonymous_identity:depends({mode="sta", eap_type="tls", encryption="wpa2"}) + anonymous_identity:depends({mode="sta", eap_type="tls", encryption="wpa"}) + anonymous_identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"}) + anonymous_identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa"}) + password = s:taboption("encryption", Value, "password", translate("Password")) password:depends({mode="sta", eap_type="fast", encryption="wpa2"}) password:depends({mode="sta", eap_type="fast", encryption="wpa"}) -- 2.5.5 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Thu Apr 7 12:22:51 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Thu, 7 Apr 2016 18:22:51 +0200 Subject: [OpenWrt-Devel] [PATCH 3/3] curl: add flags to allow gc-sections to strip out unused code In-Reply-To: <1460017310-14214-3-git-send-email-dirk.feytons@gmail.com> References: <1460017310-14214-1-git-send-email-dirk.feytons@gmail.com> <1460017310-14214-3-git-send-email-dirk.feytons@gmail.com> Message-ID: <5706895B.7020106@hauke-m.de> On 04/07/2016 10:21 AM, Dirk Feytons wrote: > Signed-off-by: Dirk Feytons > --- > package/network/utils/curl/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile > index 319c0b7..af38ed4 100644 > --- a/package/network/utils/curl/Makefile > +++ b/package/network/utils/curl/Makefile > @@ -99,8 +99,9 @@ define Package/libcurl/config > source "$(SOURCE)/Config.in" > endef > > -TARGET_CFLAGS += $(FPIC) > +TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections > TARGET_CPPFLAGS += $(if $(CONFIG_LIBCURL_NTLM),,-DCURL_DISABLE_NTLM) > +TARGET_LDFLAGS += -Wl,--gc-sections > > CONFIGURE_ARGS += \ > --disable-debug \ > Out of curiosity, have you checked how much memory this saves? Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Thu Apr 7 12:26:51 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Thu, 7 Apr 2016 18:26:51 +0200 Subject: [OpenWrt-Devel] [PATCH v2] brcm2708: implement sysupgrade image check In-Reply-To: <57068526.3060403@universe-factory.net> References: <57068526.3060403@universe-factory.net> Message-ID: <1460046411-17102-1-git-send-email-chunkeey@googlemail.com> Implement a crude but functioning sysupgrade image check for the Raspberry Pi. The code only checks if the master boot record boot signature (0x55aa) is present in the first 512-bytes at the correct location. This can prevent the odd bricking of a system when flashing the wrong file. Signed-off-by: Christian Lamparter --- .../linux/brcm2708/base-files/lib/upgrade/platform.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh index 1d4b694..631aa69 100644 --- a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh +++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh @@ -1,5 +1,20 @@ +get_magic_at() { + local file="$1" + local pos="$2" + get_image "$file" | dd bs=1 count=2 skip="$pos" 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"' +} + platform_check_image() { - # i know no way to verify the image + local file="$1" + local magic + + magic=$(get_magic_at "$file" 510) + + [ "$magic" != "55aa" ] && { + echo "Failed to verify MBR boot signature." + return 1 + } + return 0; } -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dirk.feytons at gmail.com Thu Apr 7 15:37:08 2016 From: dirk.feytons at gmail.com (Dirk Feytons) Date: Thu, 7 Apr 2016 21:37:08 +0200 Subject: [OpenWrt-Devel] [PATCH 3/3] curl: add flags to allow gc-sections to strip out unused code In-Reply-To: <5706895B.7020106@hauke-m.de> References: <1460017310-14214-1-git-send-email-dirk.feytons@gmail.com> <1460017310-14214-3-git-send-email-dirk.feytons@gmail.com> <5706895B.7020106@hauke-m.de> Message-ID: On 7 April 2016 at 18:22, Hauke Mehrtens wrote: > On 04/07/2016 10:21 AM, Dirk Feytons wrote: > > Signed-off-by: Dirk Feytons > > --- > > package/network/utils/curl/Makefile | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/package/network/utils/curl/Makefile > b/package/network/utils/curl/Makefile > > index 319c0b7..af38ed4 100644 > > --- a/package/network/utils/curl/Makefile > > +++ b/package/network/utils/curl/Makefile > > @@ -99,8 +99,9 @@ define Package/libcurl/config > > source "$(SOURCE)/Config.in" > > endef > > > > -TARGET_CFLAGS += $(FPIC) > > +TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections > > TARGET_CPPFLAGS += $(if $(CONFIG_LIBCURL_NTLM),,-DCURL_DISABLE_NTLM) > > +TARGET_LDFLAGS += -Wl,--gc-sections > > > > CONFIGURE_ARGS += \ > > --disable-debug \ > > > Out of curiosity, have you checked how much memory this saves? > I did :) A basic build of libcurl with only HTTP/HTTPS support (via OpenSSL) is 207828 bytes without --gc-sections and 195348 with. Not bad I would say. For the curl application itself the numbers are 87728 and 86864 bytes, so there the difference is less. Dirk F. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Thu Apr 7 17:56:53 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Thu, 7 Apr 2016 23:56:53 +0200 Subject: [OpenWrt-Devel] [PATCH 0/3] add support for Cisco Z1 Message-ID: This series adds support for Cisco Meraki's Z1 router [0]. It features: CPU: Atheros/Qualcomm AR9344 at 560MHz RAM: 128 MiB DDR2 NAND Flash: Hynix NAND 128MiB Wireless: SoC AR9340 (5 GHz) + 1x Atheros AR9280 (2.4Ghz) Ethernet: 5x Gigabit AR8236 (1x WAN, 4x LAN) Misc: 1x USB 2.0 Port For anyone interested, a working image [and information about how to flash the locked device] has been posted on the forum [1]. Pictures and bootlogs can be found in the wiki [2] too. [0] [1] [2] Chris Blake (1): ar71xx: add support for Cisco Meraki Z1 Cloud Managed Teleworker Gateway Christian Lamparter (2): firmware-utils mkmerakifw-old: firmware generator for Z1 kernel: owl-loader for delayed Atheros ath9k fixup package/kernel/owl-loader/Makefile | 59 ++++ package/kernel/owl-loader/src/Makefile | 1 + package/kernel/owl-loader/src/owl-loader.c | 212 ++++++++++++ target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 + .../linux/ar71xx/base-files/etc/board.d/02_network | 6 + target/linux/ar71xx/base-files/etc/diag.sh | 3 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 20 ++ .../etc/uci-defaults/03_network-switchX-migration | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../base-files/lib/preinit/05_set_iface_mac_ar71xx | 4 + .../ar71xx/base-files/lib/upgrade/merakinand.sh | 61 +++- .../ar71xx/base-files/lib/upgrade/platform.sh | 6 +- target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/config-4.4 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 12 + target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../linux/ar71xx/files/arch/mips/ath79/mach-z1.c | 164 +++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/Makefile | 20 ++ target/linux/ar71xx/nand/profiles/meraki.mk | 14 +- .../818-MIPS-ath79-add-nu801-led-driver.patch | 2 +- .../818-MIPS-ath79-add-nu801-led-driver.patch | 2 +- tools/firmware-utils/Makefile | 1 + tools/firmware-utils/src/mkmerakifw-old.c | 369 +++++++++++++++++++++ 24 files changed, 947 insertions(+), 21 deletions(-) create mode 100644 package/kernel/owl-loader/Makefile create mode 100644 package/kernel/owl-loader/src/Makefile create mode 100644 package/kernel/owl-loader/src/owl-loader.c create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-z1.c create mode 100644 tools/firmware-utils/src/mkmerakifw-old.c -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Thu Apr 7 17:56:54 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Thu, 7 Apr 2016 23:56:54 +0200 Subject: [OpenWrt-Devel] [PATCH 1/3] firmware-utils mkmerakifw-old: firmware generator for Z1 In-Reply-To: References: Message-ID: <9806645faf6a7ac664734722899bc0360a45c24f.1460065129.git.chunkeey@googlemail.com> This patch adds firmware generation tool for Cisco's Z1 Signed-off-by: Christian Lamparter --- tools/firmware-utils/Makefile | 1 + tools/firmware-utils/src/mkmerakifw-old.c | 369 ++++++++++++++++++++++++++++++ 2 files changed, 370 insertions(+) create mode 100644 tools/firmware-utils/src/mkmerakifw-old.c diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index ec814b0..9602846 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -75,6 +75,7 @@ define Host/Compile $(call cc,dgn3500sum) $(call cc,edimax_fw_header, -Wall) $(call cc,mkmerakifw sha1, -Wall) + $(call cc,mkmerakifw-old, -Wall) $(call cc,jcgimage, -lz -Wall) endef diff --git a/tools/firmware-utils/src/mkmerakifw-old.c b/tools/firmware-utils/src/mkmerakifw-old.c new file mode 100644 index 0000000..01b9b31 --- /dev/null +++ b/tools/firmware-utils/src/mkmerakifw-old.c @@ -0,0 +1,369 @@ +/* + * Copyright (C) 2015 Thomas Hebb + * Copyright (C) 2016 Christian Lamparter + * + * The format of the header this tool generates was first documented by + * Chris Blake in a shell script of the + * same purpose. I have created this reimplementation at his request. The + * original script can be found at: + * + * + * Support for the old header format, which is used by the Cisco Z1 AP + * has been reverse engineered from the nandloader's nand_load_bk function. + * The original code is part of Cisco's GPL code and can be found at: + * + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PADDING_BYTE 0xff + +#define HDR_LENGTH 0x00000020 +#define HDR_OFF_MAGIC1 0 +#define HDR_OFF_LOAD_ADDR 4 +#define HDR_OFF_IMAGELEN 8 +#define HDR_OFF_ENTRY 12 +#define HDR_OFF_CHECKSUM 16 +#define HDR_OFF_FILLER0 20 +#define HDR_OFF_FILLER1 24 +#define HDR_OFF_FILLER2 28 + +struct board_info { + char *id; + char *description; + uint32_t magic; + uint32_t imagelen; + uint32_t load_addr; + uint32_t entry; +}; + +/* + * Globals + */ +static char *progname; +static bool strip_padding; + +static char *board_id; +static const struct board_info *board; + +static const struct board_info boards[] = { + { + .id = "z1", + .description = "Meraki Z1 Access Point", + .magic = 0x4d495053, + .imagelen = 0x007e0000, + .load_addr = 0x80060000, + .entry = 0x80060000 + }, { + /* terminating entry */ + } +}; + +/* + * Message macros + */ +#define ERR(fmt, ...) do { \ + fflush(0); \ + fprintf(stderr, "[%s] *** error: " fmt "\n", \ + progname, ## __VA_ARGS__); \ +} while (0) + +#define ERRS(fmt, ...) do { \ + int save = errno; \ + fflush(0); \ + fprintf(stderr, "[%s] *** error: " fmt "\n", \ + progname, ## __VA_ARGS__, strerror(save)); \ +} while (0) + +static const struct board_info *find_board(const char *id) +{ + const struct board_info *ret; + const struct board_info *board; + + ret = NULL; + for (board = boards; board->id != NULL; board++) { + if (strcasecmp(id, board->id) == 0) { + ret = board; + break; + } + } + + return ret; +} + +static void usage(int status) +{ + FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout; + const struct board_info *board; + + fprintf(stream, "Usage: %s [OPTIONS...]\n", progname); + fprintf(stream, +"\n" +"Options:\n" +" -B create image for the board specified with \n" +" -i read kernel image from the file \n" +" -o write output to the file \n" +" -s strip padding from the end of the image\n" +" -h show this screen\n" + ); + + fprintf(stream, "\nBoards:\n"); + for (board = boards; board->id != NULL; board++) + fprintf(stream, " %-16s%s\n", board->id, board->description); + + exit(status); +} + +static void writel(unsigned char *buf, size_t offset, uint32_t value) +{ + value = htobe32(value); + memcpy(buf + offset, &value, sizeof(uint32_t)); +} + +static const uint32_t crc32_table[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, + 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, + 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, + 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, + 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, + 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, + 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, + 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, + 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, + 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, + 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, + 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, + 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, + 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, + 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, + 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, + 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, + 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, + 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, + 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, + 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, + 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, + 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, + 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, + 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, + 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, + 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, + 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, + 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, + 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, + 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, + 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, + 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, + 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, +}; + +static inline uint32_t crc32_accumulate_8(const uint32_t crc, const uint8_t ch) +{ + return crc32_table[(crc ^ ch) & 0xff] ^ (crc >> 8); +} + +static void crc32_csum(uint8_t *buf, const size_t len) +{ + uint32_t crc; + size_t i; + + crc = ~0; + for (i = 0; i < len; i += 4) { + crc = crc32_accumulate_8(crc, buf[i + 3]); + crc = crc32_accumulate_8(crc, buf[i + 2]); + crc = crc32_accumulate_8(crc, buf[i + 1]); + crc = crc32_accumulate_8(crc, buf[i]); + } + crc = ~crc; + + writel(buf, HDR_OFF_CHECKSUM, crc); +} + + +static int meraki_build_hdr(const struct board_info *board, const size_t klen, + FILE *out, FILE *in) +{ + unsigned char *kernel; + unsigned char *buf; + size_t buflen; + size_t kspace; + + size_t rc; + buflen = board->imagelen; + kspace = buflen - HDR_LENGTH; + + if (klen > kspace) { + ERR("kernel file is too big - max size: 0x%08lX\n", kspace); + return EXIT_FAILURE; + } + + /* If requested, resize buffer to remove padding */ + if (strip_padding) + buflen = klen + HDR_LENGTH; + + /* Allocate and initialize buffer for final image */ + buf = malloc(buflen); + if (buf == NULL) { + ERRS("no memory for buffer: %s\n"); + return EXIT_FAILURE; + } + memset(buf, PADDING_BYTE, buflen); + + /* Load kernel */ + kernel = buf + HDR_LENGTH; + fread(kernel, klen, 1, in); + + /* Write magic values and filler */ + writel(buf, HDR_OFF_MAGIC1, board->magic); + writel(buf, HDR_OFF_FILLER0, 0); + writel(buf, HDR_OFF_FILLER1, 0); + writel(buf, HDR_OFF_FILLER2, 0); + + /* Write load and kernel entry point address */ + writel(buf, HDR_OFF_LOAD_ADDR, board->load_addr); + writel(buf, HDR_OFF_ENTRY, board->entry); + + /* Write header and image length */ + writel(buf, HDR_OFF_IMAGELEN, klen); + + /* this gets replaced later, after the checksum has been calculated */ + writel(buf, HDR_OFF_CHECKSUM, 0); + + /* Write checksum */ + crc32_csum(buf, klen + HDR_LENGTH); + + rc = fwrite(buf, buflen, 1, out); + + free(buf); + + return rc == 1 ? EXIT_SUCCESS : EXIT_FAILURE; +} + +int main(int argc, char *argv[]) +{ + int ret = EXIT_FAILURE; + char *ofname = NULL, *ifname = NULL; + FILE *out, *in; + size_t klen; + + progname = basename(argv[0]); + + while (1) { + int c; + + c = getopt(argc, argv, "B:i:o:sh"); + if (c == -1) + break; + + switch (c) { + case 'B': + board_id = optarg; + break; + case 'i': + ifname = optarg; + break; + case 'o': + ofname = optarg; + break; + case 's': + strip_padding = true; + break; + case 'h': + usage(EXIT_SUCCESS); + break; + default: + usage(EXIT_FAILURE); + break; + } + } + + if (board_id == NULL) { + ERR("no board specified"); + goto err; + } + + board = find_board(board_id); + if (board == NULL) { + ERR("unknown board \"%s\"", board_id); + goto err; + } + + if (ifname == NULL) { + ERR("no input file specified"); + goto err; + } + + if (ofname == NULL) { + ERR("no output file specified"); + goto err; + } + + in = fopen(ifname, "r"); + if (in == NULL) { + ERRS("could not open \"%s\" for reading: %s", ifname); + goto err; + } + + /* Get kernel length */ + fseek(in, 0, SEEK_END); + klen = ftell(in); + rewind(in); + + out = fopen(ofname, "w"); + if (out == NULL) { + ERRS("could not open \"%s\" for writing: %s", ofname); + goto err_close_in; + } + + ret = meraki_build_hdr(board, klen, out, in); + fclose(out); + +err_close_in: + fclose(in); + +err: + return ret; +} -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Thu Apr 7 17:56:55 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Thu, 7 Apr 2016 23:56:55 +0200 Subject: [OpenWrt-Devel] [PATCH 2/3] kernel: owl-loader for delayed Atheros ath9k fixup In-Reply-To: References: Message-ID: <12fa00a06366a921bf383678e6d405736dfb1ee5.1460065129.git.chunkeey@googlemail.com> Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway) need to be able to initialize the PCIe wifi device. Normally, this is done during the early stages of booting linux, because the necessary init code is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup. However,this isn't possible for devices which have the init code for the Atheros chip stored on NAND in an UBI volume. Hence, this module can be used to initialze the chip when the user-space is ready to extract the init code. Signed-off-by: Christian Lamparter --- I included the ath9k mailing list too as this deals with bootstrapping ath9k cards and maybe someone there is interested as well? Anyway, the original post and the following discussion can be found here: Note: We tried several methods to get the AR9280 to work. Initially, we tried just a request_firmware_nowait from the device's init (z1_setup in mach-z1.c), but this wasn't working. The issue is that openwrt has no /sbin/hotplug helper [0] and procd doesn't scan the /sys/class/firmware directory for already open request once it started. We played around with different approaches, and also made a helper-script to fulfill the outstanding requests on boot [1]. however we found no good place for it in the start-up scripts. So that's why we developed this owl-loader module, since it won't have to deal with any procd/hotplug issues. The original submission was ar71xx specific, but this was fixed. This module should work on all architectures (lantiq?) and has no dependencies for anything outside ath9k_platform_data. [0] section: "A note about race conditions (or "why bother with netlink?"):" details on why it is a bad idea to have /sbin/hotplug [1] --- package/kernel/owl-loader/Makefile | 59 ++++++++ package/kernel/owl-loader/src/Makefile | 1 + package/kernel/owl-loader/src/owl-loader.c | 212 +++++++++++++++++++++++++++++ 3 files changed, 272 insertions(+) create mode 100644 package/kernel/owl-loader/Makefile create mode 100644 package/kernel/owl-loader/src/Makefile create mode 100644 package/kernel/owl-loader/src/owl-loader.c diff --git a/package/kernel/owl-loader/Makefile b/package/kernel/owl-loader/Makefile new file mode 100644 index 0000000..f5a95e2 --- /dev/null +++ b/package/kernel/owl-loader/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=owl-loader +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/owl-loader + SUBMENU:=Network Support + TITLE:=Owl loader for initializing Atheros PCIe Wifi chips + DEPENDS:=@PCI_SUPPORT +kmod-ath9k + FILES:=$(PKG_BUILD_DIR)/owl-loader.ko + AUTOLOAD:=$(call AutoProbe,owl-loader) + KCONFIG:= +endef + +define KernelPackage/owl-loader/description + Kernel module that helps to initialize certain Qualcomm + Atheros' PCIe Wifi chips, which have the pcie init data + stored together with the calibration data in the file + system. + + This is necessary for devices like the Cisco Meraki Z1. +endef + +EXTRA_KCONFIG:= \ + CONFIG_OWL_LOADER=m + +EXTRA_CFLAGS:= \ + $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(EXTRA_KCONFIG)))) \ + $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(EXTRA_KCONFIG)))) \ + +MAKE_OPTS:= \ + ARCH="$(LINUX_KARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + SUBDIRS="$(PKG_BUILD_DIR)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \ + $(EXTRA_KCONFIG) + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Compile + $(MAKE) -C "$(LINUX_DIR)" \ + $(MAKE_OPTS) \ + modules +endef + +$(eval $(call KernelPackage,owl-loader)) diff --git a/package/kernel/owl-loader/src/Makefile b/package/kernel/owl-loader/src/Makefile new file mode 100644 index 0000000..6b58276 --- /dev/null +++ b/package/kernel/owl-loader/src/Makefile @@ -0,0 +1 @@ +obj-${CONFIG_OWL_LOADER} += owl-loader.o diff --git a/package/kernel/owl-loader/src/owl-loader.c b/package/kernel/owl-loader/src/owl-loader.c new file mode 100644 index 0000000..81dc495 --- /dev/null +++ b/package/kernel/owl-loader/src/owl-loader.c @@ -0,0 +1,212 @@ +/* + * Initialize Owl Emulation Devices (PCIID: 168c:ff1c) + * + * Copyright (C) 2016 Christian Lamparter + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * + * Some devices (like the Cisco Meraki Z1 Cloud Managed Teleworker Gateway) + * need to be able to initialize the PCIe wifi device. Normally, this is done + * during the early stages of booting linux, because the necessary init code + * is read from the memory mapped SPI and passed to pci_enable_ath9k_fixup. + * However,this isn't possible for devices which have the init code for the + * Atheros chip stored on NAND. Hence, this module can be used to initialze + * the chip when the user-space is ready to extract the init code. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +struct owl_ctx { + struct completion eeprom_load; +}; + +#define AR5416_EEPROM_MAGIC 0xa55a + +static void ath9k_pci_fixup(struct pci_dev *dev, const u16 *cal_data, + size_t cal_len) +{ + void __iomem *mem; + const void *cal_end = (void *)cal_data + cal_len; + const struct { + __be16 reg; + __be16 low_val; + __be16 high_val; + } __packed *data; + u16 cmd; + u32 bar0; + bool swap_needed = false; + + if (*cal_data != AR5416_EEPROM_MAGIC) { + if (*cal_data != swab16(AR5416_EEPROM_MAGIC)) { + pr_err("pci %s: invalid calibration data\n", + pci_name(dev)); + return; + } + swap_needed = true; + } + + pr_info("pci %s: fixup device configuration\n", pci_name(dev)); + + mem = pcim_iomap(dev, 0, 0); + if (!mem) { + pr_err("pci %s: ioremap error\n", pci_name(dev)); + return; + } + + pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, + pci_resource_start(dev, 0)); + pci_read_config_word(dev, PCI_COMMAND, &cmd); + cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; + pci_write_config_word(dev, PCI_COMMAND, cmd); + + /* set pointer to first reg address */ + for (data = (const void *) (cal_data + 3); + (const void *) data <= cal_end && data->reg != cpu_to_be16(~0); + data++) { + u32 val; + u16 reg; + + reg = data->reg; + val = data->low_val; + val |= data->high_val << 16; + + if (swap_needed) { + reg = swab16(reg); + val = swahb32(val); + } + + __raw_writel(val, mem + reg); + udelay(100); + } + + pci_read_config_word(dev, PCI_COMMAND, &cmd); + cmd &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); + pci_write_config_word(dev, PCI_COMMAND, cmd); + + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, bar0); + pcim_iounmap(dev, mem); + + pci_disable_device(dev); +} + +static void owl_fw_cb(const struct firmware *fw, void *context) +{ + struct pci_dev *pdev = (struct pci_dev *) context; + struct owl_ctx *ctx = (struct owl_ctx *) pci_get_drvdata(pdev); + struct ath9k_platform_data *pdata = dev_get_platdata(&pdev->dev); + struct pci_bus *bus; + + complete(&ctx->eeprom_load); + + if (!fw) { + dev_err(&pdev->dev, "no '%s' eeprom file received.", + pdata->eeprom_name); + goto release; + } + + /* also note that we are doing *u16 operations on the file */ + if (fw->size > sizeof(pdata->eeprom_data) || fw->size < 0x200 || + (fw->size & 1) == 1) { + dev_err(&pdev->dev, "eeprom file has an invalid size."); + goto release; + } + + memcpy(pdata->eeprom_data, fw->data, sizeof(pdata->eeprom_data)); + + /* eeprom has been successfully loaded - pass the data to ath9k + * but remove the eeprom_name, so it doesn't try to load it too. + */ + pdata->eeprom_name = NULL; + ath9k_pci_fixup(pdev, pdata->eeprom_data, fw->size); + + pci_lock_rescan_remove(); + bus = pdev->bus; + pci_stop_and_remove_bus_device(pdev); + /* the device should come back with the proper + * ProductId. But we have to initiate a rescan. + */ + pci_rescan_bus(bus); + pci_unlock_rescan_remove(); + +release: + release_firmware(fw); +} + +static int owl_probe(struct pci_dev *pdev, + const struct pci_device_id *id) +{ + struct owl_ctx *ctx; + struct ath9k_platform_data *pdata; + int err = 0; + + if (pcim_enable_device(pdev)) + return -EIO; + + pcim_pin_device(pdev); + + /* we now have a valid dev->platform_data */ + pdata = dev_get_platdata(&pdev->dev); + if (!pdata) { + dev_err(&pdev->dev, "platform data missing."); + return -ENODEV; + } + + if (!pdata->eeprom_name) { + dev_err(&pdev->dev, "no eeprom file defined."); + return -ENODEV; + } + + ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); + if (!ctx) { + dev_err(&pdev->dev, "failed to alloc device context."); + return -ENOMEM; + } + init_completion(&ctx->eeprom_load); + + pci_set_drvdata(pdev, ctx); + err = request_firmware_nowait(THIS_MODULE, true, pdata->eeprom_name, + &pdev->dev, GFP_KERNEL, pdev, owl_fw_cb); + if (err) { + dev_err(&pdev->dev, "failed to request caldata (%d).", err); + kfree(ctx); + } + return err; +} + +static void owl_remove(struct pci_dev *pdev) +{ + struct owl_ctx *ctx = pci_get_drvdata(pdev); + + if (ctx) { + wait_for_completion(&ctx->eeprom_load); + pci_set_drvdata(pdev, NULL); + kfree(ctx); + } +} + +static const struct pci_device_id owl_pci_table[] = { + /* PCIe Owl Emulation */ + { PCI_VDEVICE(ATHEROS, 0xff1c) }, /* PCI-E */ + { }, +}; +MODULE_DEVICE_TABLE(pci, owl_pci_table); + +static struct pci_driver owl_driver = { + .name = "owl-loader", + .id_table = owl_pci_table, + .probe = owl_probe, + .remove = owl_remove, +}; +module_pci_driver(owl_driver); +MODULE_AUTHOR("Christian Lamparter "); +MODULE_DESCRIPTION("Initializes Atheros' Owl Emulation devices"); +MODULE_LICENSE("GPL v2"); -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Thu Apr 7 17:56:56 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Thu, 7 Apr 2016 23:56:56 +0200 Subject: [OpenWrt-Devel] [PATCH 3/3] ar71xx: add support for Cisco Meraki Z1 Cloud Managed Teleworker Gateway In-Reply-To: References: Message-ID: <1acff8d3305a7f80b2a5e236599a8aa949a03614.1460065129.git.chunkeey@googlemail.com> From: Chris Blake This patch adds support for Cisco's Z1. Detailed instructions for the flashing the device can be found in the OpenWrt wiki: Signed-off-by: Chris Blake --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 + .../linux/ar71xx/base-files/etc/board.d/02_network | 6 + target/linux/ar71xx/base-files/etc/diag.sh | 3 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 20 +++ .../etc/uci-defaults/03_network-switchX-migration | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../base-files/lib/preinit/05_set_iface_mac_ar71xx | 4 + .../ar71xx/base-files/lib/upgrade/merakinand.sh | 61 ++++++-- .../ar71xx/base-files/lib/upgrade/platform.sh | 6 +- target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/config-4.4 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 12 ++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../linux/ar71xx/files/arch/mips/ath79/mach-z1.c | 164 +++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/Makefile | 20 +++ target/linux/ar71xx/nand/profiles/meraki.mk | 14 +- .../818-MIPS-ath79-add-nu801-led-driver.patch | 2 +- .../818-MIPS-ath79-add-nu801-led-driver.patch | 2 +- 19 files changed, 305 insertions(+), 21 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-z1.c diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 708ebb9..b3e5fce 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -763,6 +763,10 @@ wzr-hp-g300nh) ucidef_set_led_usbdev "usb" "USB" "buffalo:blue:usb" "1-1" ;; +z1) + ucidef_set_led_netdev "wlan1" "WLAN1" "z1:blue:tricolor0" "wlan1" + ;; + zcn-1523h-2) ucidef_set_led_netdev "lan1" "lan1" "zcn-1523h:green:lan1" "eth0" ;; diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index bd488a2..83d00ac 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -510,6 +510,12 @@ wndr3700) ucidef_add_switch_port_attr "switch0" 5 led 2 ;; +z1) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" \ + "0 at eth0" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "5:wan" + ;; + *) ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index a2251d1..4ef5192 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -400,6 +400,9 @@ get_status_led() { wrt160nl) status_led="wrt160nl:blue:wps" ;; + z1) + status_led="z1:green:tricolor0" + ;; zcn-1523h-2 | zcn-1523h-5) status_led="zcn-1523h:amber:init" ;; diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 3b0229d..3141625 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -73,6 +73,16 @@ case "$FIRMWARE" in ath9k_eeprom_extract "caldata" 4096 2048 ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 0) ;; + z1) + . /lib/upgrade/nand.sh + + if [ -n "$(nand_find_volume ubi0 caldata)" ]; then + ath9k_ubi_eeprom_extract "caldata" 4096 2048 + else + ath9k_eeprom_extract "origcaldata" 4096 2048 + fi + ath9k_patch_firmware_mac $(macaddr_add $(mtd_get_mac_binary_ubi board-config 102) +2) + ;; *) ath9k_eeprom_die "board $board is not supported yet" ;; @@ -100,6 +110,16 @@ case "$FIRMWARE" in ath9k_eeprom_extract "caldata" 20480 2048 ath9k_patch_firmware_mac $(mtd_get_mac_binary caldata 12) ;; + z1) + . /lib/upgrade/nand.sh + + if [ -n "$(nand_find_volume ubi0 caldata)" ]; then + ath9k_ubi_eeprom_extract "caldata" 86016 4096 + else + ath9k_eeprom_extract "origcaldata" 86016 4096 + fi + ath9k_patch_firmware_mac $(macaddr_add $(mtd_get_mac_binary_ubi board-config 102) +3) + ;; *) ath9k_eeprom_die "board $board is not supported yet" ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration index aa0e1b4..ee8f63b 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/03_network-switchX-migration @@ -78,6 +78,7 @@ whr-hp-g300n|\ whr-hp-gn|\ wzr-hp-ag300h|\ wzr-hp-g450h|\ +z1|\ ew-dorin|\ ew-dorin-router) migrate_switch_name "eth0" "switch0" diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 6b8550a..1d87b66 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -1030,6 +1030,9 @@ ar71xx_board_detect() { *WHR-HP-G300N) name="whr-hp-g300n" ;; + *Z1) + name="z1" + ;; *ZCN-1523H-2) name="zcn-1523h-2" ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx index 39da309..60e2787 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx +++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx @@ -49,6 +49,10 @@ preinit_set_mac_address() { wrt160nl) fetch_mac_from_mtd nvram lan_hwaddr wan_hwaddr ;; + z1) + mac_lan=$(mtd_get_mac_binary_ubi board-config 102) + [ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan" + ;; esac } diff --git a/target/linux/ar71xx/base-files/lib/upgrade/merakinand.sh b/target/linux/ar71xx/base-files/lib/upgrade/merakinand.sh index cc7a86c..78cde20 100644 --- a/target/linux/ar71xx/base-files/lib/upgrade/merakinand.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/merakinand.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2015 Chris Blake +# Copyright (C) 2015-2016 Chris Blake # # Custom upgrade script for Meraki NAND devices (ex. MR18) # Based on dir825.sh and stock nand functions @@ -14,34 +14,52 @@ get_magic_at() { dd bs=1 count=2 skip=$pos if=$mtddev 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"' } -mr18_is_caldata_valid() { - local mtddev=$1 +meraki_is_caldata_valid() { + local board=$1 + local mtddev=$2 local magic - magic=$(get_magic_at $mtddev 4096) - [ "$magic" != "0202" ] && return 0 + case "$board" in + "mr18") + magic=$(get_magic_at $mtddev 4096) + [ "$magic" != "0202" ] && return 0 + + magic=$(get_magic_at $mtddev 20480) + [ "$magic" != "0202" ] && return 0 - magic=$(get_magic_at $mtddev 20480) - [ "$magic" != "0202" ] && return 0 + magic=$(get_magic_at $mtddev 36864) + [ "$magic" != "0202" ] && return 0 + + return 1 + ;; + "z1") + magic=$(get_magic_at $mtddev 4096) + [ "$magic" != "0202" ] && return 0 - magic=$(get_magic_at $mtddev 36864) - [ "$magic" != "0202" ] && return 0 + magic=$(get_magic_at $mtddev 86016) + [ "$magic" != "a55a" ] && return 0 - return 1 + return 1 + ;; + *) + return 1 + ;; + esac } merakinand_copy_caldata() { local cal_src=$1 local cal_dst=$2 - local ubidev=$( nand_find_ubi $CI_UBIPART ) + local ubidev="$(nand_find_ubi $CI_UBIPART)" local board_name="$(cat /tmp/sysinfo/board_name)" local rootfs_size="$(ubinfo /dev/ubi0 -N rootfs_data | grep "Size" | awk '{ print $6 }')" # Setup partitions using board name, in case of future platforms case "$board_name" in - "mr18") + "mr18"|\ + "z1") # Src is MTD - mtd_src=$(find_mtd_chardev $cal_src) + mtd_src="$(find_mtd_chardev $cal_src)" [ -n "$mtd_src" ] || { echo "no mtd device found for partition $cal_src" exit 1 @@ -56,12 +74,12 @@ merakinand_copy_caldata() { exit 1 } - mr18_is_caldata_valid "$mtd_src" && { + meraki_is_caldata_valid "$board_name" "$mtd_src" && { echo "no valid calibration data found in $cal_src" exit 1 } - mr18_is_caldata_valid "/dev/$mtd_dst" && { + meraki_is_caldata_valid "$board_name" "/dev/$mtd_dst" && { echo "Copying calibration data from $cal_src to $cal_dst..." dd if="$mtd_src" of=/tmp/caldata.tmp 2>/dev/null ubiupdatevol "/dev/$mtd_dst" /tmp/caldata.tmp @@ -89,6 +107,11 @@ merakinand_do_kernel_check() { echo "pass" && return 0 } ;; + "z1") + [ "$image_magic_word" == "4d495053" ] && { + echo "pass" && return 0 + } + ;; esac exit 1 @@ -102,7 +125,8 @@ merakinand_do_platform_check() { local kernel_magic="$(merakinand_do_kernel_check $1 $2)" case "$board_name" in - "mr18") + "mr18"|\ + "z1") [ "$control_length" = 0 -o "$file_type" != "squashfs" -o "$kernel_magic" != "pass" ] && { echo "Invalid sysupgrade file for $board_name" return 1 @@ -128,6 +152,11 @@ merakinand_do_upgrade() { merakinand_copy_caldata "odm-caldata" "caldata" nand_do_upgrade $1 ;; + "z1") + # Check and create UBI caldata if it's invalid + merakinand_copy_caldata "origcaldata" "caldata" + nand_do_upgrade $1 + ;; *) echo "Unsupported device $board_name"; exit 1 diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 923e02b..a02837c 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -453,7 +453,8 @@ platform_check_image() { } return 0 ;; - mr18) + mr18 | \ + z1 ) merakinand_do_platform_check $board $1 return $?; ;; @@ -524,7 +525,8 @@ platform_pre_upgrade() { wndr4300 ) nand_do_upgrade "$1" ;; - mr18) + mr18 | \ + z1 ) merakinand_do_upgrade "$1" ;; esac diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index d6ad850..050db75 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -186,6 +186,7 @@ CONFIG_ATH79_MACH_WZR_HP_AG300H=y CONFIG_ATH79_MACH_WZR_HP_G300NH=y CONFIG_ATH79_MACH_WZR_HP_G300NH2=y CONFIG_ATH79_MACH_WZR_HP_G450H=y +CONFIG_ATH79_MACH_Z1=y CONFIG_ATH79_MACH_ZCN_1523H=y CONFIG_ATH79_NVRAM=y CONFIG_ATH79_PCI_ATH9K_FIXUP=y diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index 49cecc5..0692b54 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -189,6 +189,7 @@ CONFIG_ATH79_MACH_WZR_HP_AG300H=y CONFIG_ATH79_MACH_WZR_HP_G300NH=y CONFIG_ATH79_MACH_WZR_HP_G300NH2=y CONFIG_ATH79_MACH_WZR_HP_G450H=y +CONFIG_ATH79_MACH_Z1=y CONFIG_ATH79_MACH_ZCN_1523H=y CONFIG_ATH79_NVRAM=y CONFIG_ATH79_PCI_ATH9K_FIXUP=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index f47f1b9..962f99a 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1433,6 +1433,18 @@ config ATH79_MACH_MYNET_REXT select ATH79_DEV_WMAC select ATH79_NVRAM +config ATH79_MACH_Z1 + bool "Meraki Z1 board support" + select SOC_AR934X + select ATH79_DEV_AP9X_PCI if PCI + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_NFC + select ATH79_DEV_USB + select ATH79_DEV_WMAC + select LEDS_NU801 + config ATH79_MACH_ZCN_1523H bool "Zcomax ZCN-1523H support" select SOC_AR724X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 74376b2..9686ce3 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -193,6 +193,7 @@ obj-$(CONFIG_ATH79_MACH_WZR_HP_G300NH2) += mach-wzr-hp-g300nh2.o obj-$(CONFIG_ATH79_MACH_WZR_HP_AG300H) += mach-wzr-hp-ag300h.o obj-$(CONFIG_ATH79_MACH_WZR_HP_G450H) += mach-wzr-hp-g450h.o obj-$(CONFIG_ATH79_MACH_WZR_450HP2) += mach-wzr-450hp2.o +obj-$(CONFIG_ATH79_MACH_Z1) += mach-z1.o obj-$(CONFIG_ATH79_MACH_ZCN_1523H) += mach-zcn-1523h.o obj-$(CONFIG_ATH79_MACH_CARAMBOLA2) += mach-carambola2.o obj-$(CONFIG_ATH79_MACH_NBG6716) += mach-nbg6716.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-z1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-z1.c new file mode 100644 index 0000000..552d646 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-z1.c @@ -0,0 +1,164 @@ +/* + * Cisco Meraki Z1 board support + * + * Copyright (C) 2016 Chris Blake + * Copyright (C) 2016 Christian Lamparter + * + * Based on Cisco Meraki GPL Release r23-20150601 Z1 Device Config + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-nfc.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "dev-ap9x-pci.h" +#include "machtypes.h" + +#define Z1_GPIO_LED_POWER_ORANGE 17 + +#define Z1_GPIO_NU801_CKI 14 +#define Z1_GPIO_NU801_SDI 15 + +#define Z1_GPIO_XLNA0 18 +#define Z1_GPIO_XLNA1 19 + +#define Z1_GPIO_BTN_RESET 12 +#define Z1_KEYS_POLL_INTERVAL 20 /* msecs */ +#define Z1_KEYS_DEBOUNCE_INTERVAL (3 * Z1_KEYS_POLL_INTERVAL) + +#define Z1_ETH_SWITCH_PHY 0 + +static struct gpio_led Z1_leds_gpio[] __initdata = { + { + .name = "z1:orange:power", + .gpio = Z1_GPIO_LED_POWER_ORANGE, + .active_low = 1, + }, +}; + +static struct gpio_keys_button Z1_gpio_keys[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = Z1_KEYS_DEBOUNCE_INTERVAL, + .gpio = Z1_GPIO_BTN_RESET, + .active_low = 1, + }, +}; + +static struct led_nu801_template tricolor_led_template = { + .device_name = "z1", + .name = "tricolor", + .num_leds = 1, + .cki = Z1_GPIO_NU801_CKI, + .sdi = Z1_GPIO_NU801_SDI, + .lei = -1, + .ndelay = 500, + .init_brightness = { + LED_OFF, + LED_OFF, + LED_OFF, + }, + .default_trigger = "none", +}; + +static struct led_nu801_platform_data tricolor_led_data = { + .num_controllers = 1, + .template = &tricolor_led_template, +}; + +static struct platform_device tricolor_leds = { + .name = "leds-nu801", + .id = -1, + .dev.platform_data = &tricolor_led_data, +}; + +static struct ar8327_pad_cfg z1_ar8327_pad0_cfg = { + .mode = AR8327_PAD_MAC_RGMII, + .txclk_delay_en = true, + .rxclk_delay_en = true, + .txclk_delay_sel = AR8327_CLK_DELAY_SEL1, + .rxclk_delay_sel = AR8327_CLK_DELAY_SEL2, +}; + +static struct ar8327_platform_data z1_ar8327_data = { + .pad0_cfg = &z1_ar8327_pad0_cfg, + .port0_cfg = { + .force_link = 1, + .speed = AR8327_PORT_SPEED_1000, + .duplex = 1, + .txpause = 1, + .rxpause = 1, + }, +}; + +static struct mdio_board_info z1_mdio0_info[] = { + { + .bus_id = "ag71xx-mdio.0", + .phy_addr = Z1_ETH_SWITCH_PHY, + .platform_data = &z1_ar8327_data, + }, +}; + +static void __init z1_setup(void) +{ + /* NAND */ + ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_SOFT_BCH); + ath79_register_nfc(); + + /* Eth Config */ + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0 | + AR934X_ETH_CFG_SW_ONLY_MODE); + + /* MDIO Interface */ + ath79_register_mdio(1, 0x0); + ath79_register_mdio(0, 0x0); + mdiobus_register_board_info(z1_mdio0_info, + ARRAY_SIZE(z1_mdio0_info)); + + /* GMAC0 is connected to an AR8327 switch */ + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; + ath79_eth0_data.phy_mask = BIT(Z1_ETH_SWITCH_PHY); + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; + ath79_eth0_pll_data.pll_1000 = 0x06000000; + ath79_register_eth(0); + + /* XLNA */ + ath79_wmac_set_ext_lna_gpio(0, Z1_GPIO_XLNA0); + ath79_wmac_set_ext_lna_gpio(1, Z1_GPIO_XLNA1); + + /* LEDs and Buttons */ + platform_device_register(&tricolor_leds); + ath79_register_leds_gpio(-1, ARRAY_SIZE(Z1_leds_gpio), + Z1_leds_gpio); + ath79_register_gpio_keys_polled(-1, Z1_KEYS_POLL_INTERVAL, + ARRAY_SIZE(Z1_gpio_keys), + Z1_gpio_keys); + + /* USB */ + ath79_register_usb(); + + /* Wireless */ + ath79_register_wmac_simple(); + ap91_pci_init_simple(); +} +MIPS_MACHINE(ATH79_MACH_Z1, "Z1", "Meraki Z1", z1_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 307d2df..2645894 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -247,6 +247,7 @@ enum ath79_mach_type { ATH79_MACH_WZR_HP_G300NH2, /* Buffalo WZR-HP-G300NH2 */ ATH79_MACH_WZR_HP_G450H, /* Buffalo WZR-HP-G450H */ ATH79_MACH_WZR_450HP2, /* Buffalo WZR-450HP2 */ + ATH79_MACH_Z1, /* Cisco Meraki Z1 */ ATH79_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */ ATH79_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */ }; diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 595fba2..08aad74 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -2083,6 +2083,14 @@ define Build/MerakiNAND @mv $@.new $@ endef +define Build/MerakiNAND-old + -$(STAGING_DIR_HOST)/bin/mkmerakifw-old \ + -B $(BOARDNAME) -s \ + -i $@ \ + -o $@.new + @mv $@.new $@ +endef + Image/Build/Netgear/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(4),,-M $(5)) define Image/Build/Netgear/buildkernel @@ -2548,6 +2556,18 @@ define Device/mr18 endef TARGET_DEVICES += mr18 +define Device/z1 + BOARDNAME = Z1 + BLOCKSIZE := 64k + CONSOLE = ttyS0,115200 + MTDPARTS = ar934x-nfc:128K(loader1)ro,8064K(kernel),128K(loader2)ro,8064K(recovery),114560K(ubi),128K(origcaldata)ro + IMAGES := sysupgrade.tar + KERNEL := kernel-bin | patch-cmdline | MerakiNAND-old + KERNEL_INITRAMFS := kernel-bin | patch-cmdline | MerakiNAND-old + IMAGE/sysupgrade.tar := sysupgrade-nand +endef +TARGET_DEVICES += z1 + $(eval $(call SingleProfile,NetgearNAND,64k,WNDR3700V4,wndr3700v4,WNDR3700_V4,ttyS0,115200,$$(wndr4300_mtdlayout),0x33373033,WNDR3700v4,"",-H 29763948+128+128,wndr4300)) $(eval $(call SingleProfile,NetgearNAND,64k,WNDR4300V1,wndr4300,WNDR4300,ttyS0,115200,$$(wndr4300_mtdlayout),0x33373033,WNDR4300,"",-H 29763948+0+128+128+2x2+3x3,wndr4300)) $(eval $(call SingleProfile,NetgearNAND,64k,R6100,r6100,R6100,ttyS0,115200,$$(r6100_mtdlayout),0x36303030,R6100,"",-H 29764434+0+128+128+2x2+2x2,wndr4300)) diff --git a/target/linux/ar71xx/nand/profiles/meraki.mk b/target/linux/ar71xx/nand/profiles/meraki.mk index 2c848c9..f68f5b6 100644 --- a/target/linux/ar71xx/nand/profiles/meraki.mk +++ b/target/linux/ar71xx/nand/profiles/meraki.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2014-2015 Chris Blake (chrisrblake93 at gmail.com) +# Copyright (C) 2014-2016 Chris Blake (chrisrblake93 at gmail.com) # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -15,3 +15,15 @@ define Profile/MR18/description endef $(eval $(call Profile,MR18)) + +define Profile/Z1 + NAME:=Meraki Z1 + PACKAGES:=kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev kmod-spi-gpio kmod-ath9k kmod-owl-loader +endef + +define Profile/Z1/description + Package set optimized for the Cisco Meraki Z1 Teleworker Gateway. +endef + + +$(eval $(call Profile,Z1)) diff --git a/target/linux/ar71xx/patches-4.1/818-MIPS-ath79-add-nu801-led-driver.patch b/target/linux/ar71xx/patches-4.1/818-MIPS-ath79-add-nu801-led-driver.patch index e264201..036e682 100644 --- a/target/linux/ar71xx/patches-4.1/818-MIPS-ath79-add-nu801-led-driver.patch +++ b/target/linux/ar71xx/patches-4.1/818-MIPS-ath79-add-nu801-led-driver.patch @@ -6,7 +6,7 @@ +config LEDS_NU801 + tristate "LED driver for NU801 RGB LED" -+ depends on LEDS_CLASS && ATH79_MACH_MR18 ++ depends on LEDS_CLASS && (ATH79_MACH_MR18 || ATH79_MACH_Z1) + help + This option enables support for NU801 RGB LED driver chips + accessed via GPIO. diff --git a/target/linux/ar71xx/patches-4.4/818-MIPS-ath79-add-nu801-led-driver.patch b/target/linux/ar71xx/patches-4.4/818-MIPS-ath79-add-nu801-led-driver.patch index ec9f59e..420bbff 100644 --- a/target/linux/ar71xx/patches-4.4/818-MIPS-ath79-add-nu801-led-driver.patch +++ b/target/linux/ar71xx/patches-4.4/818-MIPS-ath79-add-nu801-led-driver.patch @@ -6,7 +6,7 @@ +config LEDS_NU801 + tristate "LED driver for NU801 RGB LED" -+ depends on LEDS_CLASS && ATH79_MACH_MR18 ++ depends on LEDS_CLASS && (ATH79_MACH_MR18 || ATH79_MACH_Z1) + help + This option enables support for NU801 RGB LED driver chips + accessed via GPIO. -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ivan at omnima.co.uk Fri Apr 8 06:25:07 2016 From: ivan at omnima.co.uk (Ivan) Date: Fri, 8 Apr 2016 11:25:07 +0100 Subject: [OpenWrt-Devel] [PATCH] [ramips] Add support for Omnima MiniCloudless boards Message-ID: <57078703.2020504@omnima.co.uk> This patch adds support for Omnima MiniCloudless MT7620 + MT76x12 Concurrent Dual Band platform. Tested on the board and patch applies to OpenWrt r49119 checked out on 7th April 2016. Signed-off-by: Ivan Ignjatic --- diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 5816e60..2b11a9f 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -182,6 +182,10 @@ miniembplug) set_wifi_led "$board:red:wlan" set_usb_led "$board:green:mobile" ;; +minicloudless) + set_wifi_led "$board:red:wifi" + ucidef_set_led_netdev "eth" "Ethernet" "$board:green:lan" "eth0" + ;; miwifi-mini) ucidef_set_led_default "power" "power" "$board:red:status" "1" ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 4b65d36..488ab50 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -129,7 +129,8 @@ ramips_setup_interfaces() wrtnode2p | \ wrtnode2r | \ wt3020|\ - zbt-wa05) + zbt-wa05|\ + minicloudless) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6 at eth0" ;; diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index daa7fb1..809d780 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -131,6 +131,9 @@ get_status_led() { zte-q7) status_led="$board:red:status" ;; + minicloudless) + status_led="$board:red:wifi" + ;; mr-102n) status_led="$board:amber:status" ;; diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 5f1df7b..58d367e 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -247,6 +247,9 @@ ramips_board_detect() { *"MiniEMBWiFi") name="miniembwifi" ;; + *"MiniCloudless") + name="minicloudless" + ;; *"MiWiFi Mini") name="miwifi-mini" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index c329dce..5014316 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -77,6 +77,7 @@ platform_check_image() { microwrt|\ miniembplug|\ miniembwifi|\ + minicloudless|\ miwifi-mini|\ miwifi-nano|\ mlw221|\ diff --git a/target/linux/ramips/dts/MINICLOUDLESS.dts b/target/linux/ramips/dts/MINICLOUDLESS.dts new file mode 100644 index 0000000..e49977e --- /dev/null +++ b/target/linux/ramips/dts/MINICLOUDLESS.dts @@ -0,0 +1,145 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "minicloudless", "ralink,mt7620a-soc"; + model = "Omnima MiniCloudless"; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 10000000 { + gpio0: gpio at 600 { + status = "okay"; + }; + + gpio1: gpio at 638 { + status = "okay"; + }; + + gpio2: gpio at 660 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l12805d"; + reg = <0 0>; + linux,modalias = "m25p80", "m25p128"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x20000>; + read-only; + }; + + partition at 20000 { + label = "u-boot-env-ext"; + reg = <0x20000 0x10000>; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x2000>; + read-only; + }; + + partition at 32000 { + label = "u-boot-env+ext"; + reg = <0x32000 0xE000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; + }; + + ehci at 101c0000 { + status = "okay"; + }; + + ohci at 101c1000 { + status = "okay"; + }; + + pcie at 10140000 { + status = "okay"; + + pcie-bridge { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + }; + + ethernet at 10100000 { + mtd-mac-address = <&factory 0x4>; + ralink,port-map = "wllll"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + otg at 101c0000 { + status = "okay"; + }; + + pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "wled", "i2c", "wdt", "ephy", "uartf"; + ralink,function = "gpio"; + }; + }; + }; + + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + reset { + label = "reset"; + gpios = <&gpio2 3 1>; + linux,code = <0x198>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + wifi { + label = "minicloudless:red:wifi"; + gpios = <&gpio3 0 1>; + }; + + lan { + label = "minicloudless:green:lan"; + gpios = <&gpio2 4 1>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 18cd20a..0af9791 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -113,7 +113,7 @@ Image/Build/Profile/ArcherC20i=$(call BuildFirmware/Tplink/$(1),$(1),ArcherC20i, microwrt_mtd_size=16515072 Image/Build/Profile/MicroWRT=$(call BuildFirmware/CustomFlash/$(1),$(1),microwrt,MicroWRT,$(microwrt_mtd_size)) Image/Build/Profile/TINY-AC=$(call BuildFirmware/Default8M/$(1),$(1),tiny-ac,TINY-AC) - +Image/Build/Profile/MINICLOUDLESS=$(call BuildFirmware/Default16M/$(1),$(1),minicloudless,MINICLOUDLESS) define Image/Build/Profile/Default $(call Image/Build/Profile/E1700,$(1)) @@ -157,4 +157,5 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/ArcherC20i,$(1)) $(call Image/Build/Profile/MicroWRT,$(1)) $(call Image/Build/Profile/TINY-AC,$(1)) + $(call Image/Build/Profile/MINICLOUDLESS,$(1)) endef _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Alexey.Brodkin at synopsys.com Fri Apr 8 14:18:40 2016 From: Alexey.Brodkin at synopsys.com (Alexey Brodkin) Date: Fri, 8 Apr 2016 11:18:40 -0700 Subject: [OpenWrt-Devel] [PATCH] arc770/axs101: mimic real wireless router Message-ID: <1460139520-5353-1-git-send-email-abrodkin@synopsys.com> 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 --- 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 From john at phrozen.org Sat Apr 9 05:14:28 2016 From: john at phrozen.org (John Crispin) Date: Sat, 9 Apr 2016 11:14:28 +0200 Subject: [OpenWrt-Devel] [PATCH] ramips: mt7621: add support for disabling flow control In-Reply-To: <1459866124-17771-1-git-send-email-cristian@samknows.com> References: <1459866124-17771-1-git-send-email-cristian@samknows.com> Message-ID: <5708C7F4.3010707@phrozen.org> should this not be part of ethtool ? swconfig is aimed at setting switch configs and not the config of the attached phys. imho ethtool can already do this with the existing code John On 05/04/2016 16:22, Cristian Morales Vega wrote: > Signed-off-by: Cristian Morales Vega > --- > ...diatek-add-swconfig-driver-for-gsw_mt762x.patch | 54 +++++++++++++++++++++- > 1 file changed, 53 insertions(+), 1 deletion(-) > > diff --git a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch > index bbad8cc..d056551 100644 > --- a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch > +++ b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch > @@ -28,7 +28,7 @@ Signed-off-by: John Crispin > obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk-eth-soc.o > --- /dev/null > +++ b/drivers/net/ethernet/mediatek/mt7530.c > -@@ -0,0 +1,804 @@ > +@@ -0,0 +1,856 @@ > +/* > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > @@ -709,6 +709,50 @@ Signed-off-by: John Crispin > + return 0; > +} > + > ++static int mt7621_sw_get_port_fc(struct switch_dev *dev, > ++ const struct switch_attr *attr, > ++ struct switch_val *val) > ++{ > ++ u32 reg; > ++ struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); > ++ > ++ if (val->port_vlan >= MT7530_NUM_PORTS) > ++ return -EINVAL; > ++ > ++ reg = mdiobus_read(priv->bus, val->port_vlan, 4); > ++ reg &= BIT(10); > ++ > ++ val->value.i = reg ? 1 : 0; > ++ > ++ return 0; > ++} > ++ > ++static int mt7621_sw_set_port_fc(struct switch_dev *dev, > ++ const struct switch_attr *attr, > ++ struct switch_val *val) > ++{ > ++ u32 reg; > ++ struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); > ++ > ++ if (val->port_vlan >= MT7530_NUM_PORTS) > ++ return -EINVAL; > ++ > ++ reg = mdiobus_read(priv->bus, val->port_vlan, 4); > ++ if(val->value.i) { > ++ reg |= BIT(10); > ++ } else { > ++ reg &= ~BIT(10); > ++ } > ++ mdiobus_write(priv->bus, val->port_vlan, 4, reg); > ++ > ++ /* Restart auto-negotiation */ > ++ reg = mdiobus_read(priv->bus, val->port_vlan, 0); > ++ reg |= BIT(9); > ++ mdiobus_write(priv->bus, val->port_vlan, 0, reg); > ++ > ++ return 0; > ++} > ++ > +static const struct switch_attr mt7621_port[] = { > + { > + .type = SWITCH_TYPE_STRING, > @@ -717,6 +761,14 @@ Signed-off-by: John Crispin > + .get = mt7621_sw_get_port_mib, > + .set = NULL, > + }, > ++ { > ++ .type = SWITCH_TYPE_INT, > ++ .name = "flow_ctl", > ++ .description = "Flow Control", > ++ .get = mt7621_sw_get_port_fc, > ++ .set = mt7621_sw_set_port_fc, > ++ .max = 1, > ++ }, > +}; > + > +static const struct switch_attr mt7530_port[] = { > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Sat Apr 9 05:19:07 2016 From: john at phrozen.org (John Crispin) Date: Sat, 9 Apr 2016 11:19:07 +0200 Subject: [OpenWrt-Devel] [PATCH] arc770/axs101: mimic real wireless router In-Reply-To: <1460139520-5353-1-git-send-email-abrodkin@synopsys.com> References: <1460139520-5353-1-git-send-email-abrodkin@synopsys.com> Message-ID: <5708C90B.8080903@phrozen.org> On 08/04/2016 20:18, Alexey Brodkin wrote: > 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 > --- > 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" this bit looks wrong. wifi device names are not predictable so this should be handled by the wifi setup code i think John > ;; > 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 > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Sat Apr 9 05:20:31 2016 From: john at phrozen.org (John Crispin) Date: Sat, 9 Apr 2016 11:20:31 +0200 Subject: [OpenWrt-Devel] [PATCH v2] ramips: rt3352 usbphy fix in dts-file In-Reply-To: <56FE848C.1050408@yandex.ru> References: <56FE848C.1050408@yandex.ru> Message-ID: <5708C95F.30905@phrozen.org> does not apply. please send the patch to yourself and try to apply it with "git am". once this works send a V3 please. John On 01/04/2016 16:24, serge wrote: > Add missing rt3352 usb phy. Fix ticket #20499. Need backport into CC > > Signed-Off-By:Serge Vasilugin > > diff --git a/target/linux/ramips/dts/rt3352.dtsi > b/target/linux/ramips/dts/rt3352.dtsi > index cfa0db6..0932b52 100644 > --- a/target/linux/ramips/dts/rt3352.dtsi > +++ b/target/linux/ramips/dts/rt3352.dtsi > @@ -252,8 +252,9 @@ > interrupts = <17>; > }; > > - usbphy { > + usbphy: usbphy { > compatible = "ralink,rt3352-usbphy"; > + #phy-cells = <1>; > > resets = <&rstctrl 22 &rstctrl 25>; > reset-names = "host", "device"; > @@ -273,6 +274,9 @@ > compatible = "generic-ehci"; > reg = <0x101c0000 0x1000>; > > + phys = <&usbphy 1>; > + phy-names = "usb"; > + > interrupt-parent = <&intc>; > interrupts = <18>; > > @@ -283,6 +287,9 @@ > compatible = "generic-ohci"; > reg = <0x101c1000 0x1000>; > > + phys = <&usbphy 1>; > + phy-names = "usb"; > + > interrupt-parent = <&intc>; > interrupts = <18>; > > --- > serge > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Sat Apr 9 05:24:59 2016 From: john at phrozen.org (John Crispin) Date: Sat, 9 Apr 2016 11:24:59 +0200 Subject: [OpenWrt-Devel] [PATCH v2] ramips: Add support for ZBT WG3526 In-Reply-To: <1458744041-8289-1-git-send-email-kristian.evensen@gmail.com> References: <1458744041-8289-1-git-send-email-kristian.evensen@gmail.com> Message-ID: <5708CA6B.3070000@phrozen.org> Hi On 23/03/2016 15:40, Kristian Evensen wrote: > From: Kristian Evensen > > The WG3526 is the follow-up to the 2626 and is mostly the same, with the > excaption that the mt7602 has been replaced with the mt7603. The internal wifi > setup has also changed slightly. Based on my tests, everything that worked on > the 2626 works on the 3526 and with roughly the same performance. > > Change v1->v2: > * Remove some references to 2626 that I had missed in the dts. > > Signed-off-by: Kristian Evensen > --- > .../linux/ramips/base-files/etc/board.d/02_network | 1 + > target/linux/ramips/base-files/etc/diag.sh | 3 +- > target/linux/ramips/base-files/lib/ramips.sh | 3 + > .../ramips/base-files/lib/upgrade/platform.sh | 1 + > target/linux/ramips/dts/ZBT-WG3526.dts | 127 +++++++++++++++++++++ > target/linux/ramips/image/Makefile | 7 +- the layout of this file has changed recently so the patch does not apply anymore. please rebase/resend it. John > target/linux/ramips/mt7621/profiles/zbt.mk | 13 +++ > 7 files changed, 153 insertions(+), 2 deletions(-) > create mode 100644 target/linux/ramips/dts/ZBT-WG3526.dts > > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network > index 4b65d36..36e9d3c 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -86,6 +86,7 @@ ramips_setup_interfaces() > wt1520|\ > y1|\ > zbt-wg2626|\ > + zbt-wg3526|\ > youku-yk1) > ucidef_add_switch "switch0" \ > "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6 at eth0" > diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh > index daa7fb1..9312a27 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -65,7 +65,8 @@ get_status_led() { > v11st-fe|\ > vocore|\ > wmr-300|\ > - zbt-wg2626) > + zbt-wg2626|\ > + zbt-wg3526) > status_led="$board:green:status" > ;; > atp-52b|\ > diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh > index 5f1df7b..9a54361 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -505,6 +505,9 @@ ramips_board_detect() { > *"ZBT-WG2626") > name="zbt-wg2626" > ;; > + *"ZBT-WG3526") > + name="zbt-wg3526" > + ;; > *"ZBT-WR8305RT") > name="zbt-wr8305rt" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index c329dce..e9b8b8d 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -149,6 +149,7 @@ platform_check_image() { > zbt-wa05|\ > zbt-we826|\ > zbt-wg2626|\ > + zbt-wg3526|\ > zbt-wr8305rt|\ > zte-q7|\ > youku-yk1) > diff --git a/target/linux/ramips/dts/ZBT-WG3526.dts b/target/linux/ramips/dts/ZBT-WG3526.dts > new file mode 100644 > index 0000000..30b508c > --- /dev/null > +++ b/target/linux/ramips/dts/ZBT-WG3526.dts > @@ -0,0 +1,127 @@ > +/dts-v1/; > + > +#include "mt7621.dtsi" > + > +/ { > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > + model = "ZBT-WG3526"; > + > + memory at 0 { > + device_type = "memory"; > + reg = <0x0 0x1c000000>, <0x20000000 0x4000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,115200"; > + }; > + > + sdhci at 10130000 { > + status = "okay"; > + }; > + > + palmbus at 1E000000 { > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "jedec,spi-nor"; > + reg = <0 0>; > + linux,modalias = "m25p80"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + read-only; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0xfb0000>; > + }; > + > + }; > + }; > + > + i2c at 900 { > + compatible = "ralink,i2c-mt7621"; > + reg = <0x900 0x100>; > + #address-cells = <1>; > + #size-cells = <0>; > + pinctrl-names = "default"; > + pinctrl-0 = <&i2c_pins>; > + status = "okay"; > + }; > + }; > + > + pcie at 1e140000 { > + status = "okay"; > + > + pcie0 { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x0000>; > + mediatek,5ghz = <0>; > + }; > + }; > + > + pcie1 { > + mt76 at 1,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + }; > + > + ethernet at 1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + > + reset { > + label = "reset"; > + gpios = <&gpio0 18 1>; > + linux,code = <0x198>; > + }; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + status { > + label = "zbt-wg3526:green:status"; > + gpios = <&gpio0 24 1>; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "wdt", "rgmii2", "wdt rst", "jtag", "mdio"; > + ralink,function = "gpio"; > + }; > + }; > + }; > +}; > diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile > index 0cfb8fb..0612d17 100644 > --- a/target/linux/ramips/image/Makefile > +++ b/target/linux/ramips/image/Makefile > @@ -1058,7 +1058,7 @@ endif > # > > ifeq ($(SUBTARGET),mt7621) > - TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 sap-g3200u3 ubnt-erx witi wf-2881 zbt-wg2626 > + TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt pbr-m1 re6500 sap-g3200u3 ubnt-erx witi wf-2881 zbt-wg2626 zbt-wg3526 > endif > > define Device/mt7621 > @@ -1120,6 +1120,11 @@ define Device/zbt-wg2626 > IMAGE_SIZE := $(ralink_default_fw_size_16M) > endef > > +define Device/zbt-wg3526 > + DTS := ZBT-WG3526 > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > +endef > + > define Device/wf-2881 > DTS := WF-2881 > BLOCKSIZE := 128KiB > diff --git a/target/linux/ramips/mt7621/profiles/zbt.mk b/target/linux/ramips/mt7621/profiles/zbt.mk > index 07131d1..890cc14 100644 > --- a/target/linux/ramips/mt7621/profiles/zbt.mk > +++ b/target/linux/ramips/mt7621/profiles/zbt.mk > @@ -16,3 +16,16 @@ define Profile/ZBT-WG2626/Description > Package set for ZBT-WG2626 device > endef > $(eval $(call Profile,ZBT-WG2626)) > + > + > +define Profile/ZBT-WG3526 > + NAME:=ZBT-WG3526 Device > + PACKAGES:=\ > + kmod-usb-core kmod-usb3 kmod-sdhci-mt7620 \ > + kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci > +endef > + > +define Profile/ZBT-WG3526/Description > + Package set for ZBT-WG3526 device > +endef > +$(eval $(call Profile,ZBT-WG3526)) > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Sat Apr 9 05:49:49 2016 From: john at phrozen.org (John Crispin) Date: Sat, 9 Apr 2016 11:49:49 +0200 Subject: [OpenWrt-Devel] [PATCH] [ramips] Add support for Omnima MiniCloudless boards In-Reply-To: <57078703.2020504@omnima.co.uk> References: <57078703.2020504@omnima.co.uk> Message-ID: <5708D03D.4020804@phrozen.org> this patch was not generated with git and fails to apply and a few comments inline. also do not use [ramips] but "ramips:" as a prefix. please fix and resend John On 08/04/2016 12:25, Ivan wrote: > This patch adds support for Omnima MiniCloudless MT7620 + MT76x12 > Concurrent Dual Band platform. > > Tested on the board and patch applies to OpenWrt r49119 checked out on > 7th April 2016. > > Signed-off-by: Ivan Ignjatic > > --- > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > b/target/linux/ramips/base-files/etc/board.d/01_leds > index 5816e60..2b11a9f 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -182,6 +182,10 @@ miniembplug) > set_wifi_led "$board:red:wlan" > set_usb_led "$board:green:mobile" > ;; > +minicloudless) > + set_wifi_led "$board:red:wifi" > + ucidef_set_led_netdev "eth" "Ethernet" "$board:green:lan" "eth0" > + ;; > miwifi-mini) > ucidef_set_led_default "power" "power" "$board:red:status" "1" > ;; > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > index 4b65d36..488ab50 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -129,7 +129,8 @@ ramips_setup_interfaces() > wrtnode2p | \ > wrtnode2r | \ > wt3020|\ > - zbt-wa05) > + zbt-wa05|\ > + minicloudless) alphabetic ordering > ucidef_add_switch "switch0" \ > "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6 at eth0" > ;; > diff --git a/target/linux/ramips/base-files/etc/diag.sh > b/target/linux/ramips/base-files/etc/diag.sh > index daa7fb1..809d780 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -131,6 +131,9 @@ get_status_led() { > zte-q7) > status_led="$board:red:status" > ;; > + minicloudless) > + status_led="$board:red:wifi" > + ;; alphabetic ordering and indentation > mr-102n) > status_led="$board:amber:status" > ;; > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > index 5f1df7b..58d367e 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -247,6 +247,9 @@ ramips_board_detect() { > *"MiniEMBWiFi") > name="miniembwifi" > ;; > + *"MiniCloudless") > + name="minicloudless" > + ;; alphabetic ordering and indentation > *"MiWiFi Mini") > name="miwifi-mini" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index c329dce..5014316 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -77,6 +77,7 @@ platform_check_image() { > microwrt|\ > miniembplug|\ > miniembwifi|\ > + minicloudless|\ > miwifi-mini|\ > miwifi-nano|\ > mlw221|\ > diff --git a/target/linux/ramips/dts/MINICLOUDLESS.dts > b/target/linux/ramips/dts/MINICLOUDLESS.dts > new file mode 100644 > index 0000000..e49977e > --- /dev/null > +++ b/target/linux/ramips/dts/MINICLOUDLESS.dts > @@ -0,0 +1,145 @@ > +/dts-v1/; > + > +/include/ "mt7620a.dtsi" > + > +/ { > + compatible = "minicloudless", "ralink,mt7620a-soc"; > + model = "Omnima MiniCloudless"; > + > + chosen { > + bootargs = "console=ttyS0,57600"; > + }; > + > + palmbus at 10000000 { > + gpio0: gpio at 600 { > + status = "okay"; > + }; > + > + gpio1: gpio at 638 { > + status = "okay"; > + }; > + > + gpio2: gpio at 660 { > + status = "okay"; > + }; > + > + gpio3: gpio at 688 { > + status = "okay"; > + }; indentation > + > + spi at b00 { > + status = "okay"; this looks like 4 spaces and not tabs in the whole file > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "mx25l12805d"; > + reg = <0 0>; > + linux,modalias = "m25p80", "m25p128"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x20000>; > + read-only; > + }; > + > + partition at 20000 { > + label = "u-boot-env-ext"; > + reg = <0x20000 0x10000>; > + }; what is this partition > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x2000>; > + read-only; > + }; > + > + partition at 32000 { > + label = "u-boot-env+ext"; > + reg = <0x32000 0xE000>; > + }; > + what is this partition > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0xfb0000>; > + }; > + }; > + }; > + }; > + > + ehci at 101c0000 { > + status = "okay"; > + }; > + > + ohci at 101c1000 { > + status = "okay"; > + }; > + > + pcie at 10140000 { > + status = "okay"; > + > + pcie-bridge { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + }; > + > + ethernet at 10100000 { > + mtd-mac-address = <&factory 0x4>; > + ralink,port-map = "wllll"; > + }; > + > + wmac at 10180000 { > + ralink,mtd-eeprom = <&factory 0>; > + }; > + > + otg at 101c0000 { > + status = "okay"; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + default { > + ralink,group = "wled", "i2c", "wdt", "ephy", "uartf"; > + ralink,function = "gpio"; > + }; > + }; > + }; > + > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + reset { > + label = "reset"; > + gpios = <&gpio2 3 1>; > + linux,code = <0x198>; > + }; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + wifi { > + label = "minicloudless:red:wifi"; > + gpios = <&gpio3 0 1>; > + }; > + > + lan { > + label = "minicloudless:green:lan"; > + gpios = <&gpio2 4 1>; > + }; alphabetic and numeric ordering are both wrong here > + }; > +}; > diff --git a/target/linux/ramips/image/mt7620.mk > b/target/linux/ramips/image/mt7620.mk > index 18cd20a..0af9791 100644 > --- a/target/linux/ramips/image/mt7620.mk > +++ b/target/linux/ramips/image/mt7620.mk > @@ -113,7 +113,7 @@ Image/Build/Profile/ArcherC20i=$(call > BuildFirmware/Tplink/$(1),$(1),ArcherC20i, > microwrt_mtd_size=16515072 > Image/Build/Profile/MicroWRT=$(call > BuildFirmware/CustomFlash/$(1),$(1),microwrt,MicroWRT,$(microwrt_mtd_size)) > Image/Build/Profile/TINY-AC=$(call > BuildFirmware/Default8M/$(1),$(1),tiny-ac,TINY-AC) > - > +Image/Build/Profile/MINICLOUDLESS=$(call > BuildFirmware/Default16M/$(1),$(1),minicloudless,MINICLOUDLESS) alphabetic ordering and there is a stray blank line added. > > define Image/Build/Profile/Default > $(call Image/Build/Profile/E1700,$(1)) > @@ -157,4 +157,5 @@ define Image/Build/Profile/Default > $(call Image/Build/Profile/ArcherC20i,$(1)) > $(call Image/Build/Profile/MicroWRT,$(1)) > $(call Image/Build/Profile/TINY-AC,$(1)) > + $(call Image/Build/Profile/MINICLOUDLESS,$(1)) alphabetic ordering > endef > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From vasilugin at yandex.ru Sat Apr 9 07:43:33 2016 From: vasilugin at yandex.ru (=?koi8-r?B?88XSx8XKIPfB08nMwMfJzg==?=) Date: Sat, 09 Apr 2016 17:43:33 +0600 Subject: [OpenWrt-Devel] [PATCH v3] ramips: rt3352 usbphy fix in dts-file Message-ID: <572971460202213@web19m.yandex.ru> Add missing rt3352 usb phy. Fix ticket #20499. Need backport into CC Signed-Off-By:Serge Vasilugin diff --git a/target/linux/ramips/dts/rt3352.dtsi b/target/linux/ramips/dts/rt3352.dtsi index cfa0db6..0932b52 100644 --- a/target/linux/ramips/dts/rt3352.dtsi +++ b/target/linux/ramips/dts/rt3352.dtsi @@ -252,8 +252,9 @@ interrupts = <17>; }; - usbphy { + usbphy: usbphy { compatible = "ralink,rt3352-usbphy"; + #phy-cells = <1>; resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; @@ -273,6 +274,9 @@ compatible = "generic-ehci"; reg = <0x101c0000 0x1000>; + phys = <&usbphy 1>; + phy-names = "usb"; + interrupt-parent = <&intc>; interrupts = <18>; @@ -283,6 +287,9 @@ compatible = "generic-ohci"; reg = <0x101c1000 0x1000>; + phys = <&usbphy 1>; + phy-names = "usb"; + interrupt-parent = <&intc>; interrupts = <18>; --- serge _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kristian.evensen at gmail.com Sat Apr 9 08:10:28 2016 From: kristian.evensen at gmail.com (Kristian Evensen) Date: Sat, 9 Apr 2016 14:10:28 +0200 Subject: [OpenWrt-Devel] [PATCH] [ramips] Adjust image size limit for the D-Link DIR-860L B1 In-Reply-To: <56FC576F.1070104@pyret.net> References: <56FC576F.1070104@pyret.net> Message-ID: Hi, On Thu, Mar 31, 2016 at 12:47 AM, Daniel Engberg wrote: > Currently the maximum image size defaults to 8Mbyte even though this model has 16Mbyte of flash memory. Something has gone wrong when merging this patch (look at the Makefile in the upstream commit), causing building mt7621 to break. -Kristian _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kristian.evensen at gmail.com Sat Apr 9 08:11:53 2016 From: kristian.evensen at gmail.com (Kristian Evensen) Date: Sat, 9 Apr 2016 14:11:53 +0200 Subject: [OpenWrt-Devel] [PATCH v3] ramips: Add support for ZBT WG3526 Message-ID: <1460203913-11615-1-git-send-email-kristian.evensen@gmail.com> From: Kristian Evensen The WG3526 is the follow-up to the 2626 and is mostly the same, with the excaption that the mt7602 has been replaced with the mt7603. The internal wifi setup has also changed slightly. Based on my tests, everything that worked on the 2626 works on the 3526 and with roughly the same performance. v1->v2: * Remove some references to 2626 that I had missed in the dts. v2->v3: * Update patch to match new file structure. * Removed SD driver to be consistent with other MT7621 targets. Signed-off-by: Kristian Evensen --- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 3 +- target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/ZBT-WG3526.dts | 127 +++++++++++++++++++++ target/linux/ramips/image/mt7621.mk | 6 + target/linux/ramips/mt7621/profiles/zbt.mk | 13 +++ 7 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/ZBT-WG3526.dts diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 4b65d36..36e9d3c 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -86,6 +86,7 @@ ramips_setup_interfaces() wt1520|\ y1|\ zbt-wg2626|\ + zbt-wg3526|\ youku-yk1) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6 at eth0" diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index daa7fb1..9312a27 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -65,7 +65,8 @@ get_status_led() { v11st-fe|\ vocore|\ wmr-300|\ - zbt-wg2626) + zbt-wg2626|\ + zbt-wg3526) status_led="$board:green:status" ;; atp-52b|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 5f1df7b..9a54361 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -505,6 +505,9 @@ ramips_board_detect() { *"ZBT-WG2626") name="zbt-wg2626" ;; + *"ZBT-WG3526") + name="zbt-wg3526" + ;; *"ZBT-WR8305RT") name="zbt-wr8305rt" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index c329dce..e9b8b8d 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -149,6 +149,7 @@ platform_check_image() { zbt-wa05|\ zbt-we826|\ zbt-wg2626|\ + zbt-wg3526|\ zbt-wr8305rt|\ zte-q7|\ youku-yk1) diff --git a/target/linux/ramips/dts/ZBT-WG3526.dts b/target/linux/ramips/dts/ZBT-WG3526.dts new file mode 100644 index 0000000..30b508c --- /dev/null +++ b/target/linux/ramips/dts/ZBT-WG3526.dts @@ -0,0 +1,127 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "ZBT-WG3526"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x1c000000>, <0x20000000 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + sdhci at 10130000 { + status = "okay"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + + }; + }; + + i2c at 900 { + compatible = "ralink,i2c-mt7621"; + reg = <0x900 0x100>; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_pins>; + status = "okay"; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 18 1>; + linux,code = <0x198>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + status { + label = "zbt-wg3526:green:status"; + gpios = <&gpio0 24 1>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "rgmii2", "wdt rst", "jtag", "mdio"; + ralink,function = "gpio"; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0732a44..0af9596 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -103,6 +103,12 @@ define Device/zbt-wg2626 endef TARGET_DEVICES += zbt-wg2626 +define Device/zbt-wg3526 + DTS := ZBT-WG3526 + IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += zbt-wg3526 + define Device/wf-2881 DTS := WF-2881 BLOCKSIZE := 128KiB diff --git a/target/linux/ramips/mt7621/profiles/zbt.mk b/target/linux/ramips/mt7621/profiles/zbt.mk index 0073645..453687d 100644 --- a/target/linux/ramips/mt7621/profiles/zbt.mk +++ b/target/linux/ramips/mt7621/profiles/zbt.mk @@ -16,3 +16,16 @@ define Profile/ZBT-WG2626/Description Package set for ZBT-WG2626 device endef $(eval $(call Profile,ZBT-WG2626)) + + +define Profile/ZBT-WG3526 + NAME:=ZBT-WG3526 Device + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev kmod-ata-core kmod-ata-ahci +endef + +define Profile/ZBT-WG3526/Description + Package set for ZBT-WG3526 device +endef +$(eval $(call Profile,ZBT-WG3526)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Sat Apr 9 08:31:35 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Sat, 9 Apr 2016 21:31:35 +0900 Subject: [OpenWrt-Devel] [PATCH] ramips: fix support Planex MZK-750DHP. Message-ID: <1460205095-8108-1-git-send-email-tochiro.srchack@gmail.com> fix script for Planex MZK-750DHP. Modification of the GPIO definition. add Profile. Signed-off-by: YuheiOKAWA --- target/linux/ramips/base-files/etc/board.d/01_leds | 1 + target/linux/ramips/base-files/etc/diag.sh | 1 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MZK-750DHP.dts | 26 ++++++++++++++++++---- target/linux/ramips/mt7620/profiles/planex.mk | 16 +++++++++++++ 5 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 target/linux/ramips/mt7620/profiles/planex.mk diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 5816e60..2f40955 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -122,6 +122,7 @@ dir-620-d1) set_wifi_led "$board:green:wifi" ;; dir-810l|\ +mzk-750dhp|\ mzk-dp150n) ucidef_set_led_default "power" "power" "$board:green:power" "1" ;; diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index daa7fb1..a2c965d 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -21,6 +21,7 @@ get_status_led() { br-6475nd|\ e1700|\ fonera20n|\ + mzk-750dhp|\ mzk-dp150n|\ mzk-w300nh2|\ nbg-419n|\ diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index c329dce..cbeda7a 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -86,6 +86,7 @@ platform_check_image() { mpr-a2|\ mr-102n|\ mt7628|\ + mzk-750dhp|\ mzk-dp150n|\ mzk-w300nh2|\ mzk-wdpr|\ diff --git a/target/linux/ramips/dts/MZK-750DHP.dts b/target/linux/ramips/dts/MZK-750DHP.dts index df0b73b..5947a54 100644 --- a/target/linux/ramips/dts/MZK-750DHP.dts +++ b/target/linux/ramips/dts/MZK-750DHP.dts @@ -11,6 +11,10 @@ status = "okay"; }; + gpio2: gpio at 660 { + status = "okay"; + }; + spi at b00 { status = "okay"; @@ -51,7 +55,7 @@ pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "i2c", "spi refclk", "rgmii1"; + ralink,group = "i2c", "spi refclk", "rgmii1", "nd_sd"; ralink,function = "gpio"; }; }; @@ -74,6 +78,15 @@ pcie at 10140000 { status = "okay"; + + pcie-bridge { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; }; gpio-leds { @@ -81,13 +94,18 @@ wps { label = "mzk-750dhp:green:wps"; - gpios = <&gpio1 11 1>; + gpios = <&gpio2 15 1>; }; power { label = "mzk-750dhp:green:power"; gpios = <&gpio1 15 1>; }; + + wlan5g { + label = "mzk-750dhp:green:wlan5g"; + gpios = <&gpio1 14 1>; + }; }; gpio-keys-polled { @@ -99,12 +117,12 @@ s1 { label = "reset"; gpios = <&gpio0 1 1>; - linux,code = <0x100>; + linux,code = <0x198>; }; s2 { label = "wps"; - gpios = <&gpio0 2 1>; + gpios = <&gpio2 19 1>; linux,code = <0x211>; }; }; diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk new file mode 100644 index 0000000..f6f2cf1 --- /dev/null +++ b/target/linux/ramips/mt7620/profiles/planex.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/MZK-750DHP + NAME:=Planex MZK-750DHP + PACKAGES:= kmod-mt76 kmod-mt7610e +endef + +define Profile/MZK-750DHP/Description + Package set optimized for the Planex MZK-750DHP. +endef +$(eval $(call Profile,MZK-750DHP)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From vasilugin at yandex.ru Sat Apr 9 09:46:02 2016 From: vasilugin at yandex.ru (=?koi8-r?B?88XSx8XKIPfB08nMwMfJzg==?=) Date: Sat, 09 Apr 2016 19:46:02 +0600 Subject: [OpenWrt-Devel] [RFC] ramips: awake rt305x USB controller Message-ID: <6453381460209562@web3h.yandex.ru> Long story of rt305x USB controller feature [1] arise again in trunk [2]. I make quick fix but not sure that it's correct. Possiblely it's time to reanimate device_reset() patch? Signed-Off-By: Serge Vasilugin [1] http://marc.info/?l=linux-usb&m=137398626102108&w=2 [2] https://dev.openwrt.org/ticket/21396 [3] https://dev.openwrt.org/changeset/42445 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -375,6 +375,12 @@ static int dwc2_driver_probe(struct plat dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", (unsigned long)res->start, hsotg->regs); + /* Enable USB port before any regs access */ + if(dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) { + dwc2_writel(0x00, hsotg->regs + PCGCTL); + /* TODO: mdelay(25) here? vendor driver don't use it */ + } + hsotg->dr_mode = usb_get_dr_mode(&dev->dev); if (IS_ENABLED(CONFIG_USB_DWC2_HOST) && hsotg->dr_mode != USB_DR_MODE_HOST) { --- serge _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From gch981213 at gmail.com Sat Apr 9 10:10:41 2016 From: gch981213 at gmail.com (=?UTF-8?B?6YOt5Lyg6Yic?=) Date: Sat, 9 Apr 2016 22:10:41 +0800 Subject: [OpenWrt-Devel] [PATCH] [ramips] Adjust image size limit for the D-Link DIR-860L B1 In-Reply-To: References: <56FC576F.1070104@pyret.net> Message-ID: According to https://dev.openwrt.org/changeset/49129 The patch is applied with the git conflict remains and it breaks MT7621 target. 2016-04-09 20:10 GMT+08:00 Kristian Evensen : > Hi, > > On Thu, Mar 31, 2016 at 12:47 AM, Daniel Engberg > wrote: >> Currently the maximum image size defaults to 8Mbyte even though this model has 16Mbyte of flash memory. > > Something has gone wrong when merging this patch (look at the Makefile > in the upstream commit), causing building mt7621 to break. > > -Kristian > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Sat Apr 9 10:45:47 2016 From: john at phrozen.org (John Crispin) Date: Sat, 9 Apr 2016 16:45:47 +0200 Subject: [OpenWrt-Devel] [PATCH] [ramips] Adjust image size limit for the D-Link DIR-860L B1 In-Reply-To: References: <56FC576F.1070104@pyret.net> Message-ID: <5709159B.4040706@phrozen.org> oh dear, let me fix that On 09/04/2016 16:10, ??? wrote: > According to https://dev.openwrt.org/changeset/49129 The patch is > applied with the git conflict remains and it breaks MT7621 target. > > 2016-04-09 20:10 GMT+08:00 Kristian Evensen : >> Hi, >> >> On Thu, Mar 31, 2016 at 12:47 AM, Daniel Engberg >> wrote: >>> Currently the maximum image size defaults to 8Mbyte even though this model has 16Mbyte of flash memory. >> >> Something has gone wrong when merging this patch (look at the Makefile >> in the upstream commit), causing building mt7621 to break. >> >> -Kristian >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel at lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zajec5 at gmail.com Sat Apr 9 11:32:10 2016 From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=) Date: Sat, 9 Apr 2016 17:32:10 +0200 Subject: [OpenWrt-Devel] [PATCH] b53: override ports 5 and 7 if using CPU port 8 on BCM5301x switch Message-ID: <1460215930-3613-1-git-send-email-zajec5@gmail.com> These ports are also used in GMAC3 configuration, just for radios rather than physical Ethernet ports. Signed-off-by: Rafa? Mi?ecki --- People interested in more details of GMAC3 configuration may take a look at bcmfwd.h from Broadcom's SDK. --- .../generic/files/drivers/net/phy/b53/b53_common.c | 38 +++++++++++++++------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c index 676e301..fa137ab 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c @@ -478,6 +478,23 @@ static void b53_switch_reset_gpio(struct b53_device *dev) dev->current_page = 0xff; } +static void b53_gmii_port_override(struct b53_device *dev, int port) +{ + u8 po_reg = B53_GMII_PORT_OVERRIDE_CTRL(port); + u8 gmii_po = 0; + + if (WARN_ON(port > 7)) + return; + + b53_read8(dev, B53_CTRL_PAGE, po_reg, &gmii_po); + gmii_po |= GMII_PO_LINK | + GMII_PO_RX_FLOW | + GMII_PO_TX_FLOW | + GMII_PO_EN | + GMII_PO_SPEED_2000M; + b53_write8(dev, B53_CTRL_PAGE, po_reg, gmii_po); +} + static int b53_switch_reset(struct b53_device *dev) { u8 cpu_port = dev->sw_dev.cpu_port; @@ -548,18 +565,17 @@ static int b53_switch_reset(struct b53_device *dev) b53_write8(dev, B53_CTRL_PAGE, B53_PORT_OVERRIDE_CTRL, mii_port_override); - /* TODO: Ports 5 & 7 require some extra handling */ + /* + * Port 8 is used as CPU in GMAC3 configuration. In such + * case ports 5 and 7 are connected to wireless radios. + * With proper drivers it's possible to make hw switch + * handle wlan <-> lan bridging. + * Both ports need overriding to be usable. + */ + b53_gmii_port_override(dev, 5); + b53_gmii_port_override(dev, 7); } else { - u8 po_reg = B53_GMII_PORT_OVERRIDE_CTRL(cpu_port); - u8 gmii_po; - - b53_read8(dev, B53_CTRL_PAGE, po_reg, &gmii_po); - gmii_po |= GMII_PO_LINK | - GMII_PO_RX_FLOW | - GMII_PO_TX_FLOW | - GMII_PO_EN | - GMII_PO_SPEED_2000M; - b53_write8(dev, B53_CTRL_PAGE, po_reg, gmii_po); + b53_gmii_port_override(dev, cpu_port); } } -- 1.8.4.5 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hannu.nyman at iki.fi Sun Apr 10 04:50:33 2016 From: hannu.nyman at iki.fi (Hannu Nyman) Date: Sun, 10 Apr 2016 11:50:33 +0300 Subject: [OpenWrt-Devel] [PATCH] feeds.conf.default: remove the commented ancient feeds Message-ID: <1460278233-2162-1-git-send-email-hannu.nyman@iki.fi> Cleanup feeds.conf.default by removing the old commented-out feeds: * x-wrt has not been updated for years and targets WhiteRussian/Kamikaze. No currect code base available anywhere * six old feeds from svn.openwrt.org/feeds. These feeds have not been updated for 4-5 years and their code is currently unavailable (in svn.openwrt.org) Signed-off-by: Hannu Nyman --- The existence of non-functional feeds can lead to confusion and questions every now and then. Better to remove these misleading feed definitions. The old feeds at svn.openwrt.org can be seen via dev.openwrt.org: https://dev.openwrt.org/browser/feeds Their codebase is at least 4-5 years old. I doubt if they would work even if source code would be downloadable from somewhere. x-wrt looks completely abandoned. In any case, it will not work with the current Openwrt trunk. feeds.conf.default | 7 ------- 1 file changed, 7 deletions(-) diff --git a/feeds.conf.default b/feeds.conf.default index bc062db..bb08ab8 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -5,11 +5,4 @@ src-git telephony https://github.com/openwrt/telephony.git src-git management https://github.com/openwrt-management/packages.git src-git targets https://github.com/openwrt/targets.git #src-git oldpackages http://git.openwrt.org/packages.git -#src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package -#src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone -#src-svn efl svn://svn.openwrt.org/openwrt/feeds/efl -#src-svn xorg svn://svn.openwrt.org/openwrt/feeds/xorg -#src-svn desktop svn://svn.openwrt.org/openwrt/feeds/desktop -#src-svn xfce svn://svn.openwrt.org/openwrt/feeds/xfce -#src-svn lxde svn://svn.openwrt.org/openwrt/feeds/lxde #src-link custom /usr/src/openwrt/custom-feed -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jens.steinhauser at gmail.com Sun Apr 10 08:00:27 2016 From: jens.steinhauser at gmail.com (Jens Steinhauser) Date: Sun, 10 Apr 2016 14:00:27 +0200 Subject: [OpenWrt-Devel] [RFC] ar71xx: add TP-Link TL-WR810N support Message-ID: <1460289627-27414-1-git-send-email-jens.steinhauser@gmail.com> This patch adds support for the TP-Link TL-WR810N. https://wiki.openwrt.org/toh/tp-link/tl-wr810n The device has a slide switch to select its mode of operation when using the stock firmware. After looking at how it's implemented for similar devices, I also used 'struct gpio_keys_button { .type = EV_SW, .code = BTN_... }' to support the switch, but both 'switch_b0' and 'switch_b1' are missing when using 'evtest' and 'thd', only the 'reset' button shows up in the output of the programs. Changing '.code' to some SW_ value, for example SW_LID and SW_TABLET_MODE, makes them usable with both 'evtest' and 'thd'. Am I missing something, or is EV_SW + BTN_... an invalid combination? Apart from this, OpenWrt is running fine on the device. Signed-off-by: Jens Steinhauser --- .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/config-4.4 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c | 135 +++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/generic/profiles/tp-link.mk | 11 ++ target/linux/ar71xx/image/Makefile | 8 ++ 12 files changed, 174 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 8fdfa07..8754e62 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -396,6 +396,7 @@ pb44 |\ routerstation|\ tl-wr710n |\ tl-wr720n-v3|\ +tl-wr810n |\ wpe72) ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 1f9bd3f..bd6f3f8 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -332,6 +332,7 @@ get_status_led() { tl-wr703n | \ tl-wr710n | \ tl-wr720n-v3 | \ + tl-wr810n | \ tl-wr941nd-v6) status_led="tp-link:blue:system" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 3d4541e..522f541 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -922,6 +922,9 @@ ar71xx_board_detect() { *"TL-WR720N"*) name="tl-wr720n-v3" ;; + *"TL-WR810N") + name="tl-wr810n" + ;; *"TL-MR10U") name="tl-mr10u" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index d44ece5..e4fb8b8 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -377,6 +377,7 @@ platform_check_image() { tl-wr720n-v3 | \ tl-wr741nd | \ tl-wr741nd-v4 | \ + tl-wr810n | \ tl-wr841n-v1 | \ tl-wa830re-v2 | \ tl-wr841n-v7 | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index fa98643..1baee7e 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -157,6 +157,7 @@ CONFIG_ATH79_MACH_TL_WR703N=y CONFIG_ATH79_MACH_TL_WR720N_V3=y CONFIG_ATH79_MACH_TL_WR741ND=y CONFIG_ATH79_MACH_TL_WR741ND_V4=y +CONFIG_ATH79_MACH_TL_WR810N=y CONFIG_ATH79_MACH_TL_WR841N_V1=y CONFIG_ATH79_MACH_TL_WR841N_V8=y CONFIG_ATH79_MACH_TL_WR841N_V9=y diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index ec04c28..9c0db09 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -159,6 +159,7 @@ CONFIG_ATH79_MACH_TL_WR703N=y CONFIG_ATH79_MACH_TL_WR720N_V3=y CONFIG_ATH79_MACH_TL_WR741ND=y CONFIG_ATH79_MACH_TL_WR741ND_V4=y +CONFIG_ATH79_MACH_TL_WR810N=y CONFIG_ATH79_MACH_TL_WR841N_V1=y CONFIG_ATH79_MACH_TL_WR841N_V8=y CONFIG_ATH79_MACH_TL_WR841N_V9=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 8c77645..8ce6620 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1274,6 +1274,16 @@ config ATH79_MACH_TL_WR741ND_V4 select ATH79_DEV_USB select ATH79_DEV_WMAC +config ATH79_MACH_TL_WR810N + bool "TP-LINK TL-WR810N support" + select SOC_QCA953X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_USB + select ATH79_DEV_WMAC + config ATH79_MACH_TL_WR841N_V1 bool "TP-LINK TL-WR841N v1 support" select SOC_AR71XX diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 862a2e3..9af7e50 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -158,6 +158,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WDR4300) += mach-tl-wdr4300.o obj-$(CONFIG_ATH79_MACH_TL_WDR6500_V2) += mach-tl-wdr6500-v2.o obj-$(CONFIG_ATH79_MACH_TL_WR741ND) += mach-tl-wr741nd.o obj-$(CONFIG_ATH79_MACH_TL_WR741ND_V4) += mach-tl-wr741nd-v4.o +obj-$(CONFIG_ATH79_MACH_TL_WR810N) += mach-tl-wr810n.o obj-$(CONFIG_ATH79_MACH_TL_WR841N_V1) += mach-tl-wr841n.o obj-$(CONFIG_ATH79_MACH_TL_WR841N_V8) += mach-tl-wr841n-v8.o obj-$(CONFIG_ATH79_MACH_TL_WR841N_V9) += mach-tl-wr841n-v9.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c new file mode 100644 index 0000000..906c5f8 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c @@ -0,0 +1,135 @@ +/* + * TP-LINK TL-WR810N board support + * + * Copyright (c) 2012 Qualcomm Atheros + * Copyright (c) 2012 Gabor Juhos + * Copyright (c) 2016 Jens Steinhauser + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include + +#include + +#include "common.h" +#include "dev-gpio-buttons.h" +#include "dev-eth.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define TL_WR810N_GPIO_SWITCH_B1 0 +#define TL_WR810N_GPIO_SWITCH_B0 1 +#define TL_WR810N_GPIO_USB_POWER 11 +#define TL_WR810N_GPIO_BTN_RESET 12 +#define TL_WR810N_GPIO_LED_SYSTEM 13 + +#define TL_WR810N_KEYS_POLL_INTERVAL 20 /* msecs */ +#define TL_WR810N_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR810N_KEYS_POLL_INTERVAL) + +#define TL_WR810N_WMAC_CALDATA_OFFSET 0x1000 + +static const char *tl_wr810n_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data tl_wr810n_flash_data = { + .part_probes = tl_wr810n_part_probes, +}; + +static struct gpio_led tl_wr810n_leds_gpio[] __initdata = { + { + .name = "tp-link:blue:system", + .gpio = TL_WR810N_GPIO_LED_SYSTEM, + .active_low = 1, + }, +}; + +static struct gpio_keys_button tl_wr810n_gpio_keys[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = TL_WR810N_KEYS_DEBOUNCE_INTERVAL, + .gpio = TL_WR810N_GPIO_BTN_RESET, + .active_low = 1, + }, + { + .desc = "switch_b0", + .type = EV_SW, + .code = BTN_0, + .debounce_interval = TL_WR810N_KEYS_DEBOUNCE_INTERVAL, + .gpio = TL_WR810N_GPIO_SWITCH_B0, + .active_low = 0, + }, + { + .desc = "switch_b1", + .type = EV_SW, + .code = BTN_1, + .debounce_interval = TL_WR810N_KEYS_DEBOUNCE_INTERVAL, + .gpio = TL_WR810N_GPIO_SWITCH_B1, + .active_low = 0, + }, +}; + +static void __init tl_wr810n_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); + u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); + + ath79_setup_ar933x_phy4_switch(false, false); + + ath79_register_m25p80(&tl_wr810n_flash_data); + ath79_register_leds_gpio(-1, + ARRAY_SIZE(tl_wr810n_leds_gpio), + tl_wr810n_leds_gpio); + ath79_register_gpio_keys_polled(-1, + TL_WR810N_KEYS_POLL_INTERVAL, + ARRAY_SIZE(tl_wr810n_gpio_keys), + tl_wr810n_gpio_keys); + + ath79_register_mdio(0, 0x0); + + /* WAN */ + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.phy_mask = BIT(4); + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); + ath79_register_eth(0); + + /* LAN */ + ath79_switch_data.phy4_mii_en = 1; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.speed = SPEED_1000; + ath79_switch_data.phy_poll_mask |= BIT(4); + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); + ath79_register_eth(1); + + ath79_register_wmac(art + TL_WR810N_WMAC_CALDATA_OFFSET, mac); + + gpio_request_one(TL_WR810N_GPIO_USB_POWER, + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, + "USB power"); + ath79_register_usb(); +} + +MIPS_MACHINE(ATH79_MACH_TL_WR810N, "TL-WR810N", "TP-LINK TL-WR810N", + tl_wr810n_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 0363c88..a4a8252 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -192,6 +192,7 @@ enum ath79_mach_type { ATH79_MACH_TL_WR720N_V3, /* TP-LINK TL-WR720N v3/v4 */ ATH79_MACH_TL_WR741ND, /* TP-LINK TL-WR741ND */ ATH79_MACH_TL_WR741ND_V4, /* TP-LINK TL-WR741ND v4 */ + ATH79_MACH_TL_WR810N, /* TP-LINK TL-WR810N */ ATH79_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */ ATH79_MACH_TL_WR841N_V7, /* TP-LINK TL-WR841N/ND v7 */ ATH79_MACH_TL_WR841N_V8, /* TP-LINK TL-WR841N/ND v8 */ diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk b/target/linux/ar71xx/generic/profiles/tp-link.mk index 2875290..c44b22c 100644 --- a/target/linux/ar71xx/generic/profiles/tp-link.mk +++ b/target/linux/ar71xx/generic/profiles/tp-link.mk @@ -332,6 +332,17 @@ endef $(eval $(call Profile,TLWR743)) +define Profile/TLWR810 + NAME:=TP-Link TL-WR810N + PACKAGES:=kmod-usb-core kmod-usb2 +endef + +define Profile/TLWR810/Description + Package set optimized for the TP-LINK TL-WR810N. +endef +$(eval $(call Profile,TLWR810)) + + define Profile/TLWR841 NAME:=TP-LINK TL-WR841N/ND PACKAGES:= diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e4e2fcf..1f0cfcd 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -783,6 +783,14 @@ define Device/tl-wr741nd-v5 CONSOLE := ttyATH0,115200 endef +define Device/tl-wr810n + $(Device/tplink-8mlzma) + BOARDNAME := TL-WR810N + DEVICE_PROFILE := TLWR810 + TPLINK_HWID := 0x08100001 +endef +TARGET_DEVICES += tl-wr810n + define Device/tl-wr743nd-v1 $(Device/tplink-4m) BOARDNAME := TL-WR741ND -- 2.5.5 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Sun Apr 10 13:30:07 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Sun, 10 Apr 2016 19:30:07 +0200 Subject: [OpenWrt-Devel] [PATCH CC] ar71xx: fix nondeterministic hangs during bootconsole/console handover Message-ID: Reconfiguring the UART when the FIFO is not empty may cause the boot to hang. This hang is extremely suspectible to timing differences; recompiling the kernel with the same configuration, but different UTS_VERSION timestamps can yield images that hang more or less often. Sometimes images are produced that hang reproducibly. This patch should also make it into one of the next linux-stable releases, but it's better to get this fixed as soon as possible. Fixes #21773, #21857. Signed-off-by: Matthias Schiffer Backport of r49156 --- ...make-bootconsole-wait-for-both-THRE-and-T.patch | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 target/linux/ar71xx/patches-3.18/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch diff --git a/target/linux/ar71xx/patches-3.18/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch b/target/linux/ar71xx/patches-3.18/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch new file mode 100644 index 0000000..7be14ab --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/003-MIPS-ath79-make-bootconsole-wait-for-both-THRE-and-T.patch @@ -0,0 +1,54 @@ +From f1ba020af5076172c9d29006a747ccf40027fedc Mon Sep 17 00:00:00 2001 +Message-Id: +From: Matthias Schiffer +Date: Thu, 24 Mar 2016 15:34:05 +0100 +Subject: [PATCH] MIPS: ath79: make bootconsole wait for both THRE and TEMT + +This makes the ath79 bootconsole behave the same way as the generic 8250 +bootconsole. + +Also waiting for TEMT (transmit buffer is empty) instead of just THRE +(transmit buffer is not full) ensures that all characters have been +transmitted before the real serial driver starts reconfiguring the serial +controller (which would sometimes result in garbage being transmitted.) +This change does not cause a visible performance loss. + +In addition, this seems to fix a hang observed in certain configurations on +many AR7xxx/AR9xxx SoCs during autoconfig of the real serial driver. + +A more complete follow-up patch will disable 8250 autoconfig for ath79 +altogether (the serial controller is detected as a 16550A, which is not +fully compatible with the ath79 serial, and the autoconfig may lead to +undefined behavior on ath79.) + +Cc: +Signed-off-by: Matthias Schiffer +--- + arch/mips/ath79/early_printk.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/arch/mips/ath79/early_printk.c b/arch/mips/ath79/early_printk.c +index b955faf..d1adc59 100644 +--- a/arch/mips/ath79/early_printk.c ++++ b/arch/mips/ath79/early_printk.c +@@ -31,13 +31,15 @@ static inline void prom_putchar_wait(void __iomem *reg, u32 mask, u32 val) + } while (1); + } + ++#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) ++ + static void prom_putchar_ar71xx(unsigned char ch) + { + void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE)); + +- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE); ++ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY); + __raw_writel(ch, base + UART_TX * 4); +- prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE); ++ prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY); + } + + static void prom_putchar_ar933x(unsigned char ch) +-- +2.7.4 + -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From francesco.borromini at inventati.org Sun Apr 10 17:21:53 2016 From: francesco.borromini at inventati.org (Stijn Segers) Date: Sun, 10 Apr 2016 23:21:53 +0200 Subject: [OpenWrt-Devel] ar71xx: Adding TP-Link TL-WR740N v6 support to trunk... Message-ID: <1460323313-30912-1-git-send-email-francesco.borromini@inventati.org> Hi guys, I'm trying to add support for the TP-Link TL-WR740N v6. On the OpenWrt forums [1] a modified TL-WR841N v10 image has been confirmed working. I tried adding support (see patch below) but no matter what I try, the v6 image does not seem to be generated. Running make with V=s doesn't show any mention of the v6 images being attempted to build (or failing to build) altogether. What am I doing wrong here? Thanks Stijn [1]: https://forum.openwrt.org/viewtopic.php?id=64002 --- target/linux/ar71xx/image/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e4e2fcf..7123941 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -753,6 +753,13 @@ define Device/tl-wr740n-v5 CONSOLE := ttyATH0,115200 endef +define Device/tl-wr740n-v6 + $(Device/tplink-4mlzma) + BOARDNAME := TL-WR841N-v9 + DEVICE_PROFILE := TLWR841 + TPLINK_HWID := 0x07400006 +endef + define Device/tl-wr741nd-v1 $(Device/tplink-4m) BOARDNAME := TL-WR741ND @@ -797,7 +804,7 @@ define Device/tl-wr743nd-v2 TPLINK_HWID := 0x07430002 CONSOLE := ttyATH0,115200 endef -TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v1 tl-wr743nd-v2 +TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 tl-wr740n-v5 tl-wr740n-v6 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v1 tl-wr743nd-v2 define Device/tl-wr841-v1.5 $(Device/tplink-4m) -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Sun Apr 10 17:35:56 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Sun, 10 Apr 2016 23:35:56 +0200 Subject: [OpenWrt-Devel] ar71xx: Adding TP-Link TL-WR740N v6 support to trunk... In-Reply-To: <1460323313-30912-1-git-send-email-francesco.borromini@inventati.org> References: <1460323313-30912-1-git-send-email-francesco.borromini@inventati.org> Message-ID: <570AC73C.3010304@universe-factory.net> On 04/10/2016 11:21 PM, Stijn Segers wrote: > Hi guys, > > I'm trying to add support for the TP-Link TL-WR740N v6. > On the OpenWrt forums [1] a modified TL-WR841N v10 > image has been confirmed working. I tried adding support > (see patch below) but no matter what I try, the v6 image > does not seem to be generated. Running make with V=s > doesn't show any mention of the v6 images being attempted > to build (or failing to build) altogether. What am I doing > wrong here? > > Thanks > > Stijn Which profile do you have selected in your .config? You have set DEVICE_PROFILE := TLWR841 in your patch, so the 740v6 image will be built only if Generic or TL-WR841 is selected, but not for TL-WR740/741. Regards, Matthias > > > [1]: https://forum.openwrt.org/viewtopic.php?id=64002 > > --- > target/linux/ar71xx/image/Makefile | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile > index e4e2fcf..7123941 100644 > --- a/target/linux/ar71xx/image/Makefile > +++ b/target/linux/ar71xx/image/Makefile > @@ -753,6 +753,13 @@ define Device/tl-wr740n-v5 > CONSOLE := ttyATH0,115200 > endef > > +define Device/tl-wr740n-v6 > + $(Device/tplink-4mlzma) > + BOARDNAME := TL-WR841N-v9 > + DEVICE_PROFILE := TLWR841 > + TPLINK_HWID := 0x07400006 > +endef > + > define Device/tl-wr741nd-v1 > $(Device/tplink-4m) > BOARDNAME := TL-WR741ND > @@ -797,7 +804,7 @@ define Device/tl-wr743nd-v2 > TPLINK_HWID := 0x07430002 > CONSOLE := ttyATH0,115200 > endef > -TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v1 tl-wr743nd-v2 > +TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 tl-wr740n-v5 tl-wr740n-v6 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v1 tl-wr743nd-v2 > > define Device/tl-wr841-v1.5 > $(Device/tplink-4m) > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From francesco.borromini at inventati.org Sun Apr 10 18:18:50 2016 From: francesco.borromini at inventati.org (Stijn Segers) Date: Mon, 11 Apr 2016 00:18:50 +0200 Subject: [OpenWrt-Devel] ar71xx: Adding TP-Link TL-WR740N v6 support to trunk... In-Reply-To: <570AC73C.3010304@universe-factory.net> Message-ID: <1460326730.7020.0@smtp.autistici.org> Op zo, 10 apr 2016 om 11:35 , schreef Matthias Schiffer : > On 04/10/2016 11:21 PM, Stijn Segers wrote: >> Hi guys, >> >> I'm trying to add support for the TP-Link TL-WR740N v6. >> On the OpenWrt forums [1] a modified TL-WR841N v10 >> image has been confirmed working. I tried adding support >> (see patch below) but no matter what I try, the v6 image >> does not seem to be generated. Running make with V=s >> doesn't show any mention of the v6 images being attempted >> to build (or failing to build) altogether. What am I doing >> wrong here? >> >> Thanks >> >> Stijn > > Which profile do you have selected in your .config? You have set > DEVICE_PROFILE := TLWR841 in your patch, so the 740v6 image will be > built > only if Generic or TL-WR841 is selected, but not for TL-WR740/741. > > Regards, > Matthias Thanks, it's under TL-WR740 indeed. I've checked other devices in the Makefile, there are a few that have board names that don't align with the profile being used, like: define Device/tl-wr842n-v1 $(Device/tplink-8m) BOARDNAME := TL-MR3420 DEVICE_PROFILE := TLWR842 TPLINK_HWID := 0x08420001 endef I will keep the boardname and change the DEVICE_PROFILE to 'TLWR740', see how that works out. To be sure, is there anything else the DEVICE_PROFILE value steers, besides under which profile the image would be built? Cheers Stijn > >> >> >> [1]: https://forum.openwrt.org/viewtopic.php?id=64002 >> >> --- >> target/linux/ar71xx/image/Makefile | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/target/linux/ar71xx/image/Makefile >> b/target/linux/ar71xx/image/Makefile >> index e4e2fcf..7123941 100644 >> --- a/target/linux/ar71xx/image/Makefile >> +++ b/target/linux/ar71xx/image/Makefile >> @@ -753,6 +753,13 @@ define Device/tl-wr740n-v5 >> CONSOLE := ttyATH0,115200 >> endef >> >> +define Device/tl-wr740n-v6 >> + $(Device/tplink-4mlzma) >> + BOARDNAME := TL-WR841N-v9 >> + DEVICE_PROFILE := TLWR841 >> + TPLINK_HWID := 0x07400006 >> +endef >> + >> define Device/tl-wr741nd-v1 >> $(Device/tplink-4m) >> BOARDNAME := TL-WR741ND >> @@ -797,7 +804,7 @@ define Device/tl-wr743nd-v2 >> TPLINK_HWID := 0x07430002 >> CONSOLE := ttyATH0,115200 >> endef >> -TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 >> tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 >> tl-wr743nd-v1 tl-wr743nd-v2 >> +TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 >> tl-wr740n-v5 tl-wr740n-v6 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 >> tl-wr741nd-v5 tl-wr743nd-v1 tl-wr743nd-v2 >> >> define Device/tl-wr841-v1.5 >> $(Device/tplink-4m) >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Sun Apr 10 18:54:01 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Mon, 11 Apr 2016 00:54:01 +0200 Subject: [OpenWrt-Devel] ar71xx: Adding TP-Link TL-WR740N v6 support to trunk... In-Reply-To: <1460326730.7020.0@smtp.autistici.org> References: <1460326730.7020.0@smtp.autistici.org> Message-ID: <570AD989.9010804@universe-factory.net> On 04/11/2016 12:18 AM, Stijn Segers wrote: > Op zo, 10 apr 2016 om 11:35 , schreef Matthias Schiffer > : >> On 04/10/2016 11:21 PM, Stijn Segers wrote: >>> Hi guys, >>> >>> I'm trying to add support for the TP-Link TL-WR740N v6. >>> On the OpenWrt forums [1] a modified TL-WR841N v10 >>> image has been confirmed working. I tried adding support >>> (see patch below) but no matter what I try, the v6 image >>> does not seem to be generated. Running make with V=s >>> doesn't show any mention of the v6 images being attempted >>> to build (or failing to build) altogether. What am I doing >>> wrong here? >>> >>> Thanks >>> >>> Stijn >> >> Which profile do you have selected in your .config? You have set >> DEVICE_PROFILE := TLWR841 in your patch, so the 740v6 image will be built >> only if Generic or TL-WR841 is selected, but not for TL-WR740/741. >> >> Regards, >> Matthias > > Thanks, it's under TL-WR740 indeed. I've checked other devices in the > Makefile, there are a few > that have board names that don't align with the profile being used, like: > > define Device/tl-wr842n-v1 > $(Device/tplink-8m) > BOARDNAME := TL-MR3420 > DEVICE_PROFILE := TLWR842 > TPLINK_HWID := 0x08420001 > endef > > I will keep the boardname and change the DEVICE_PROFILE to 'TLWR740', see > how that works out. > To be sure, is there anything else the DEVICE_PROFILE value steers, besides > under which profile > the image would be built? > > Cheers > > Stijn No, DEVICE_PROFILE does exactly that and nothing else. Matthias -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 11 02:40:20 2016 From: john at phrozen.org (John Crispin) Date: Mon, 11 Apr 2016 08:40:20 +0200 Subject: [OpenWrt-Devel] [RFC] ramips: awake rt305x USB controller In-Reply-To: <6453381460209562@web3h.yandex.ru> References: <6453381460209562@web3h.yandex.ru> Message-ID: <570B46D4.3040004@phrozen.org> Hi, looks good please send a patch that adds this under target/linux/ramips/patches-4.4 John On 09/04/2016 15:46, ?????? ????????? wrote: > Long story of rt305x USB controller feature [1] arise again in trunk [2]. > I make quick fix but not sure that it's correct. > Possiblely it's time to reanimate device_reset() patch? > > Signed-Off-By: Serge Vasilugin > > [1] http://marc.info/?l=linux-usb&m=137398626102108&w=2 > [2] https://dev.openwrt.org/ticket/21396 > [3] https://dev.openwrt.org/changeset/42445 > > --- a/drivers/usb/dwc2/platform.c > +++ b/drivers/usb/dwc2/platform.c > @@ -375,6 +375,12 @@ static int dwc2_driver_probe(struct plat > dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", > (unsigned long)res->start, hsotg->regs); > > + /* Enable USB port before any regs access */ > + if(dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) { > + dwc2_writel(0x00, hsotg->regs + PCGCTL); > + /* TODO: mdelay(25) here? vendor driver don't use it */ > + } > + > hsotg->dr_mode = usb_get_dr_mode(&dev->dev); > if (IS_ENABLED(CONFIG_USB_DWC2_HOST) && > hsotg->dr_mode != USB_DR_MODE_HOST) { > > > --- > serge > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 11 02:41:18 2016 From: john at phrozen.org (John Crispin) Date: Mon, 11 Apr 2016 08:41:18 +0200 Subject: [OpenWrt-Devel] [PATCH v3] ramips: rt3352 usbphy fix in dts-file In-Reply-To: <572971460202213@web19m.yandex.ru> References: <572971460202213@web19m.yandex.ru> Message-ID: <570B470E.3080906@phrozen.org> Hi, please send version for CC if you would like to see the fix merged there aswell JOhn On 09/04/2016 13:43, ?????? ????????? wrote: > Add missing rt3352 usb phy. Fix ticket #20499. Need backport into CC > > Signed-Off-By:Serge Vasilugin > > diff --git a/target/linux/ramips/dts/rt3352.dtsi b/target/linux/ramips/dts/rt3352.dtsi > index cfa0db6..0932b52 100644 > --- a/target/linux/ramips/dts/rt3352.dtsi > +++ b/target/linux/ramips/dts/rt3352.dtsi > @@ -252,8 +252,9 @@ > interrupts = <17>; > }; > > - usbphy { > + usbphy: usbphy { > compatible = "ralink,rt3352-usbphy"; > + #phy-cells = <1>; > > resets = <&rstctrl 22 &rstctrl 25>; > reset-names = "host", "device"; > @@ -273,6 +274,9 @@ > compatible = "generic-ehci"; > reg = <0x101c0000 0x1000>; > > + phys = <&usbphy 1>; > + phy-names = "usb"; > + > interrupt-parent = <&intc>; > interrupts = <18>; > > @@ -283,6 +287,9 @@ > compatible = "generic-ohci"; > reg = <0x101c1000 0x1000>; > > + phys = <&usbphy 1>; > + phy-names = "usb"; > + > interrupt-parent = <&intc>; > interrupts = <18>; > > > --- > serge > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From cristian at samknows.com Mon Apr 11 04:06:52 2016 From: cristian at samknows.com (Cristian Morales Vega) Date: Mon, 11 Apr 2016 09:06:52 +0100 Subject: [OpenWrt-Devel] [PATCH] ramips: mt7621: add support for disabling flow control In-Reply-To: <1459866124-17771-1-git-send-email-cristian@samknows.com> References: <1459866124-17771-1-git-send-email-cristian@samknows.com> Message-ID: Sorry, for some reason I didn't receive your reply (but patchwork told me about it), so I am replying here. Maybe it's something that should be done with ethtool, but I had no idea those phys were exposed through anything other than swconfig. What would be the "DEVNAME" in "ethtool -a DEVNAME" if I want to, for example, check the settings of the switch port #3? On 5 April 2016 at 15:22, Cristian Morales Vega wrote: > Signed-off-by: Cristian Morales Vega > --- > ...diatek-add-swconfig-driver-for-gsw_mt762x.patch | 54 +++++++++++++++++++++- > 1 file changed, 53 insertions(+), 1 deletion(-) > > diff --git a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch > index bbad8cc..d056551 100644 > --- a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch > +++ b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch > @@ -28,7 +28,7 @@ Signed-off-by: John Crispin > obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk-eth-soc.o > --- /dev/null > +++ b/drivers/net/ethernet/mediatek/mt7530.c > -@@ -0,0 +1,804 @@ > +@@ -0,0 +1,856 @@ > +/* > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > @@ -709,6 +709,50 @@ Signed-off-by: John Crispin > + return 0; > +} > + > ++static int mt7621_sw_get_port_fc(struct switch_dev *dev, > ++ const struct switch_attr *attr, > ++ struct switch_val *val) > ++{ > ++ u32 reg; > ++ struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); > ++ > ++ if (val->port_vlan >= MT7530_NUM_PORTS) > ++ return -EINVAL; > ++ > ++ reg = mdiobus_read(priv->bus, val->port_vlan, 4); > ++ reg &= BIT(10); > ++ > ++ val->value.i = reg ? 1 : 0; > ++ > ++ return 0; > ++} > ++ > ++static int mt7621_sw_set_port_fc(struct switch_dev *dev, > ++ const struct switch_attr *attr, > ++ struct switch_val *val) > ++{ > ++ u32 reg; > ++ struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); > ++ > ++ if (val->port_vlan >= MT7530_NUM_PORTS) > ++ return -EINVAL; > ++ > ++ reg = mdiobus_read(priv->bus, val->port_vlan, 4); > ++ if(val->value.i) { > ++ reg |= BIT(10); > ++ } else { > ++ reg &= ~BIT(10); > ++ } > ++ mdiobus_write(priv->bus, val->port_vlan, 4, reg); > ++ > ++ /* Restart auto-negotiation */ > ++ reg = mdiobus_read(priv->bus, val->port_vlan, 0); > ++ reg |= BIT(9); > ++ mdiobus_write(priv->bus, val->port_vlan, 0, reg); > ++ > ++ return 0; > ++} > ++ > +static const struct switch_attr mt7621_port[] = { > + { > + .type = SWITCH_TYPE_STRING, > @@ -717,6 +761,14 @@ Signed-off-by: John Crispin > + .get = mt7621_sw_get_port_mib, > + .set = NULL, > + }, > ++ { > ++ .type = SWITCH_TYPE_INT, > ++ .name = "flow_ctl", > ++ .description = "Flow Control", > ++ .get = mt7621_sw_get_port_fc, > ++ .set = mt7621_sw_set_port_fc, > ++ .max = 1, > ++ }, > +}; > + > +static const struct switch_attr mt7530_port[] = { > -- > 2.6.3 > -- Cristian Morales Vega Email cristian at samknows.com Office +44 (0) 20 3111 4330 Web: www.samknows.com This email is sent for and on behalf of SamKnows Limited. This email and any attachments are confidential, legally privileged and protected by copyright. If you are not the intended recipient dissemination or copying of this email is prohibited. If you have received this in error, please notify the sender by replying by email and then delete the email completely from your system. SamKnows Limited, Registered Number: 06510477, Registered Office: Hill House, 1 Little New Street, London, EC4A 3TR. Registered in England and Wales. Trade Mark 2507103 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zefir.kurtisi at neratec.com Mon Apr 11 07:18:37 2016 From: zefir.kurtisi at neratec.com (Zefir Kurtisi) Date: Mon, 11 Apr 2016 13:18:37 +0200 Subject: [OpenWrt-Devel] [PATCH] ubus: cli.wait_for: add polling for services Message-ID: <1460373517-23537-1-git-send-email-zefir.kurtisi@neratec.com> In ubus_cli_wait_for() there is a potential critical section between initially checking for the requested services and the following handling of 'ubus.object.add' events. In our system we let procd (re)start services and synchronize inter-service dependencies by using 'ubus wait_for' in the initscripts' service_started() functions. There we observe randomly that 'wait_for' is waiting for the full timeout and returning UBUS_STATUS_TIMEOUT, even if the service it is waiting for is already up and running. This happens when the service is started in the critical section mentioned above. The proposed patch adds periodic lookup for the requested services while waiting for the 'add' event and with that fixes the observed failure. Signed-off-by: Zefir Kurtisi --- cli.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/cli.c b/cli.c index c5cbfc3..8d98b12 100644 --- a/cli.c +++ b/cli.c @@ -16,6 +16,7 @@ #include #include "libubus.h" +static struct ubus_context *ctx; static struct blob_buf b; static int timeout = 30; static bool simple_output = false; @@ -277,15 +278,27 @@ static void wait_timeout(struct uloop_timeout *timeout) uloop_end(); } -static int ubus_cli_wait_for(struct ubus_context *ctx, int argc, char **argv) -{ - struct cli_wait_data data = { +#define WAIT_LOOP_TIME 200 +static struct cli_wait_data data = { .timeout.cb = wait_timeout, .ev.cb = wait_event_cb, - .pending = argv, - .n_pending = argc, - }; +}; + +static void poll_timeout_cb(struct uloop_timeout *timeout) +{ + int ret = ubus_lookup(ctx, NULL, wait_list_cb, &data); + if (ret || !data.n_pending) { + uloop_end(); + return; + } + uloop_timeout_set(timeout, WAIT_LOOP_TIME); +} +static int ubus_cli_wait_for(struct ubus_context *ctx, int argc, char **argv) +{ + data.pending = argv; + data.n_pending = argc; int ret; + static struct uloop_timeout poll_timeout = { .cb = poll_timeout_cb, }; if (argc < 1) return -2; @@ -305,6 +318,7 @@ static int ubus_cli_wait_for(struct ubus_context *ctx, int argc, char **argv) return ret; uloop_timeout_set(&data.timeout, timeout * 1000); + uloop_timeout_set(&poll_timeout, WAIT_LOOP_TIME); uloop_run(); uloop_done(); @@ -509,7 +523,6 @@ static struct { int main(int argc, char **argv) { const char *progname, *ubus_socket = NULL; - struct ubus_context *ctx; char *cmd; int ret = 0; int i, ch; -- 2.7.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dgcbueu at gmail.com Mon Apr 11 07:26:15 2016 From: dgcbueu at gmail.com (dani) Date: Mon, 11 Apr 2016 13:26:15 +0200 Subject: [OpenWrt-Devel] [PATCH] brcm63xx: fix external IRQs Message-ID: <3750419.b4J6beuWiO@tool> External IRQs are currently broken, fix the BCM6345_EXT_IRQ driver. Since the adoption of the new driver irq-bcm6345-ext, in Chaos Calmer, external IRQs don't work. It seems there were some minor errors at the initial development of the driver. This patch fixes the ticket https://dev.openwrt.org/ticket/21613 Signed-off-by: Daniel Gonzalez diff --git a/target/linux/brcm63xx/patches-4.1/321-irqchip-add-support-for-bcm6345-style-external-inter.patch b/target/linux/brcm63xx/patches-4.1/321-irqchip-add-support-for-bcm6345-style-external-inter.patch index 5ee5ee2..4dd5130 100644 --- a/target/linux/brcm63xx/patches-4.1/321-irqchip-add-support-for-bcm6345-style-external-inter.patch +++ b/target/linux/brcm63xx/patches-4.1/321-irqchip-add-support-for-bcm6345-style-external-inter.patch @@ -148,7 +148,7 @@ Signed-off-by: Jonas Gorski + + raw_spin_lock(&priv->lock); + reg = __raw_readl(priv->reg); -+ reg |= hwirq << (EXTIRQ_CFG_CLEAR * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_CLEAR * priv->shift); + __raw_writel(reg, priv->reg); + raw_spin_unlock(&priv->lock); +} @@ -161,7 +161,7 @@ Signed-off-by: Jonas Gorski + + raw_spin_lock(&priv->lock); + reg = __raw_readl(priv->reg); -+ reg &= ~(hwirq << (EXTIRQ_CFG_MASK * priv->shift)); ++ reg &= ~(1 << (hwirq + EXTIRQ_CFG_MASK * priv->shift)); + __raw_writel(reg, priv->reg); + raw_spin_unlock(&priv->lock); +} @@ -174,7 +174,7 @@ Signed-off-by: Jonas Gorski + + raw_spin_lock(&priv->lock); + reg = __raw_readl(priv->reg); -+ reg |= hwirq << (EXTIRQ_CFG_MASK * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_MASK * priv->shift); + __raw_writel(reg, priv->reg); + raw_spin_unlock(&priv->lock); +} @@ -222,17 +222,17 @@ Signed-off-by: Jonas Gorski + reg = __raw_readl(priv->reg); + + if (levelsense) -+ reg |= hwirq << (EXTIRQ_CFG_LEVELSENSE * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_LEVELSENSE * priv->shift); + else -+ reg &= ~(hwirq << (EXTIRQ_CFG_LEVELSENSE * priv->shift)); ++ reg &= ~(1 << (hwirq + EXTIRQ_CFG_LEVELSENSE * priv->shift)); + if (sense) -+ reg |= hwirq << (EXTIRQ_CFG_SENSE * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_SENSE * priv->shift); + else -+ reg &= ~(hwirq << (EXTIRQ_CFG_SENSE * priv->shift)); ++ reg &= ~(1 << (hwirq + EXTIRQ_CFG_SENSE * priv->shift)); + if (bothedge) -+ reg |= hwirq << (EXTIRQ_CFG_BOTHEDGE * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_BOTHEDGE * priv->shift); + else -+ reg &= ~(hwirq << (EXTIRQ_CFG_BOTHEDGE * priv->shift)); ++ reg &= ~(1 << (hwirq + EXTIRQ_CFG_BOTHEDGE * priv->shift)); + + __raw_writel(reg, priv->reg); + raw_spin_unlock(&priv->lock); diff --git a/target/linux/brcm63xx/patches-4.4/321-irqchip-add-support-for-bcm6345-style-external-inter.patch b/target/linux/brcm63xx/patches-4.4/321-irqchip-add-support-for-bcm6345-style-external-inter.patch index 4f4d7bd..2526456 100644 --- a/target/linux/brcm63xx/patches-4.4/321-irqchip-add-support-for-bcm6345-style-external-inter.patch +++ b/target/linux/brcm63xx/patches-4.4/321-irqchip-add-support-for-bcm6345-style-external-inter.patch @@ -148,7 +148,7 @@ Signed-off-by: Jonas Gorski + + raw_spin_lock(&priv->lock); + reg = __raw_readl(priv->reg); -+ reg |= hwirq << (EXTIRQ_CFG_CLEAR * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_CLEAR * priv->shift); + __raw_writel(reg, priv->reg); + raw_spin_unlock(&priv->lock); +} @@ -161,7 +161,7 @@ Signed-off-by: Jonas Gorski + + raw_spin_lock(&priv->lock); + reg = __raw_readl(priv->reg); -+ reg &= ~(hwirq << (EXTIRQ_CFG_MASK * priv->shift)); ++ reg &= ~(1 << (hwirq + EXTIRQ_CFG_MASK * priv->shift)); + __raw_writel(reg, priv->reg); + raw_spin_unlock(&priv->lock); +} @@ -174,7 +174,7 @@ Signed-off-by: Jonas Gorski + + raw_spin_lock(&priv->lock); + reg = __raw_readl(priv->reg); -+ reg |= hwirq << (EXTIRQ_CFG_MASK * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_MASK * priv->shift); + __raw_writel(reg, priv->reg); + raw_spin_unlock(&priv->lock); +} @@ -222,17 +222,17 @@ Signed-off-by: Jonas Gorski + reg = __raw_readl(priv->reg); + + if (levelsense) -+ reg |= hwirq << (EXTIRQ_CFG_LEVELSENSE * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_LEVELSENSE * priv->shift); + else -+ reg &= ~(hwirq << (EXTIRQ_CFG_LEVELSENSE * priv->shift)); ++ reg &= ~(1 << (hwirq + EXTIRQ_CFG_LEVELSENSE * priv->shift)); + if (sense) -+ reg |= hwirq << (EXTIRQ_CFG_SENSE * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_SENSE * priv->shift); + else -+ reg &= ~(hwirq << (EXTIRQ_CFG_SENSE * priv->shift)); ++ reg &= ~(1 << (hwirq + EXTIRQ_CFG_SENSE * priv->shift)); + if (bothedge) -+ reg |= hwirq << (EXTIRQ_CFG_BOTHEDGE * priv->shift); ++ reg |= 1 << (hwirq + EXTIRQ_CFG_BOTHEDGE * priv->shift); + else -+ reg &= ~(hwirq << (EXTIRQ_CFG_BOTHEDGE * priv->shift)); ++ reg &= ~(1 << (hwirq + EXTIRQ_CFG_BOTHEDGE * priv->shift)); + + __raw_writel(reg, priv->reg); + raw_spin_unlock(&priv->lock); _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From michal.kazior at tieto.com Mon Apr 11 09:14:52 2016 From: michal.kazior at tieto.com (Michal Kazior) Date: Mon, 11 Apr 2016 15:14:52 +0200 Subject: [OpenWrt-Devel] [RFC relayd 0/2] relayd: add ipv6 support Message-ID: <1460380494-22667-1-git-send-email-michal.kazior@tieto.com> Hi, I've been recently working on adding IPv6 support to relayd (which supported only IPv4). It does, however, require a kernel patch to make it actually usable because link-local addresses are not routable by kernel by default. The patch, currently an RFC, can be found here: https://www.mail-archive.com/netdev at vger.kernel.org/msg104390.html Merging this relayd change probably doesn't make much sense until the kernel patch is accepted. Michal Kazior (2): relayd: add ipv6 support relayd: add ipv6 link local support dhcp.c | 30 +-- main.c | 733 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- relayd.h | 59 ++++- route.c | 206 +++++++++++++----- 4 files changed, 901 insertions(+), 127 deletions(-) -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From michal.kazior at tieto.com Mon Apr 11 09:14:53 2016 From: michal.kazior at tieto.com (Michal Kazior) Date: Mon, 11 Apr 2016 15:14:53 +0200 Subject: [OpenWrt-Devel] [RFC relayd 1/2] relayd: add ipv6 support In-Reply-To: <1460380494-22667-1-git-send-email-michal.kazior@tieto.com> References: <1460380494-22667-1-git-send-email-michal.kazior@tieto.com> Message-ID: <1460380494-22667-2-git-send-email-michal.kazior@tieto.com> This adds basic IPv6 support framework. Things like, e.g. DHCPv6 will not work (yeT) though because link-local support requires additional changes (including kernel). Signed-off-by: Michal Kazior --- dhcp.c | 30 +-- main.c | 730 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- relayd.h | 59 +++++- route.c | 184 +++++++++++----- 4 files changed, 876 insertions(+), 127 deletions(-) diff --git a/dhcp.c b/dhcp.c index aefe34fd80e6..a915cf88e97f 100644 --- a/dhcp.c +++ b/dhcp.c @@ -55,32 +55,6 @@ struct dhcp_header { uint8_t option_data[]; } __packed; -static uint16_t -chksum(uint16_t sum, const uint8_t *data, uint16_t len) -{ - const uint8_t *last; - uint16_t t; - - last = data + len - 1; - - while(data < last) { - t = (data[0] << 8) + data[1]; - sum += t; - if(sum < t) - sum++; - data += 2; - } - - if(data == last) { - t = (data[0] << 8) + 0; - sum += t; - if(sum < t) - sum++; - } - - return sum; -} - static void parse_dhcp_options(struct relayd_host *host, struct dhcp_header *dhcp, int len) { @@ -99,7 +73,7 @@ parse_dhcp_options(struct relayd_host *host, struct dhcp_header *dhcp, int len) if (!memcmp(opt->data, host->ipaddr, 4)) relayd_add_host_route(host, dest, 0); else - relayd_add_pending_route(opt->data, dest, 0, 10000); + relayd_add_pending_route(opt->data, dest, 0, 10000, AF_INET); break; case DHCP_OPTION_ROUTES: DPRINTF(2, "Found a DHCP static routes option, len=%d\n", opt->len); @@ -150,7 +124,7 @@ bool relayd_handle_dhcp_packet(struct relayd_interface *rif, void *data, int len return true; if (dhcp->op == 2) { - host = relayd_refresh_host(rif, pkt->eth.ether_shost, (void *) &pkt->iph.saddr); + host = relayd_refresh_host(rif, pkt->eth.ether_shost, (void *) &pkt->iph.saddr, AF_INET); if (host && parse) parse_dhcp_options(host, dhcp, udplen - sizeof(struct udphdr)); } diff --git a/main.c b/main.c index b3c13f7f7a49..e1d1dc997b6f 100644 --- a/main.c +++ b/main.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "relayd.h" @@ -41,6 +42,7 @@ static int inet_sock; static int forward_bcast; static int forward_dhcp; static int parse_dhcp; +static int ipv6; uint8_t local_addr[4]; int local_route_table; @@ -48,16 +50,296 @@ int local_route_table; struct relayd_pending_route { struct relayd_route rt; struct uloop_timeout timeout; - uint8_t gateway[4]; + union { + uint8_t gateway[16]; + uint16_t gateway16[8]; + }; }; -static struct relayd_host *find_host_by_ipaddr(struct relayd_interface *rif, const uint8_t *ipaddr) +/* Generated with: tcpdump -dd ip6 proto 58 or ip6 multicast */ +static struct sock_filter ip6bpf[] = { + { 0x28, 0, 0, 0x0000000c }, + { 0x15, 0, 8, 0x000086dd }, + { 0x30, 0, 0, 0x00000014 }, + { 0x15, 5, 0, 0x0000003a }, + { 0x15, 0, 2, 0x0000002c }, + { 0x30, 0, 0, 0x00000036 }, + { 0x15, 2, 0, 0x0000003a }, + { 0x30, 0, 0, 0x00000026 }, + { 0x15, 0, 1, 0x000000ff }, + { 0x6, 0, 0, 0x00040000 }, + { 0x6, 0, 0, 0x00000000 }, +}; +static const struct sock_fprog ip6bpf_prog = { + sizeof(ip6bpf) / sizeof(ip6bpf[0]), + ip6bpf, +}; + +uint16_t chksum(uint16_t sum, const uint8_t *data, uint16_t len) +{ + const uint8_t *last; + uint16_t t; + + last = data + len - 1; + + while(data < last) { + t = (data[0] << 8) + data[1]; + sum += t; + if(sum < t) + sum++; + data += 2; + } + + if(data == last) { + t = (data[0] << 8) + 0; + sum += t; + if(sum < t) + sum++; + } + + return sum; +} + +static void icmp6_chksum(struct ether_header *eth, + struct ip6_hdr *ip6, + struct icmp6_hdr *icmp6, + int pktlen) +{ + unsigned char sumbuf[16 + 16 + 4 + 4]; + uint16_t sum; + unsigned int uplen; + + uplen = pktlen - ((void *)icmp6 - (void *)eth); + uplen = htonl(uplen); + memcpy(&sumbuf[0], &ip6->ip6_src, 16); + memcpy(&sumbuf[16], &ip6->ip6_dst, 16); + memcpy(&sumbuf[32], &uplen, 4); + memset(&sumbuf[36], 0, 3); + memcpy(&sumbuf[39], &ip6->ip6_ctlun.ip6_un1.ip6_un1_nxt, 1); + + icmp6->icmp6_cksum = 0; + uplen = ntohl(uplen); + sum = chksum(0, (void *)sumbuf, 40); + sum = chksum(sum, (void *)icmp6, uplen); + + if (sum == 0) + sum = 0xffff; + + icmp6->icmp6_cksum = htons(~sum); +} + +static void udp6_chksum(struct ether_header *eth, + struct ip6_hdr *ip6, + struct udphdr *udp, + int pktlen) +{ + unsigned char sumbuf[16 + 16 + 4 + 4]; + uint16_t sum; + unsigned int uplen; + + uplen = pktlen - ((void *)udp - (void *)eth); + uplen = htonl(uplen); + memcpy(&sumbuf[0], &ip6->ip6_src, 16); + memcpy(&sumbuf[16], &ip6->ip6_dst, 16); + memcpy(&sumbuf[32], &uplen, 4); + memset(&sumbuf[36], 0, 3); + memcpy(&sumbuf[39], &ip6->ip6_ctlun.ip6_un1.ip6_un1_nxt, 1); + + udp->check = 0; + uplen = ntohl(uplen); + sum = chksum(0, (void *)sumbuf, 40); + sum = chksum(sum, (void *)udp, uplen); + + if (sum == 0) + sum = 0xffff; + + udp->check = htons(~sum); +} + +static int icmp6_getopt(struct nd_opt_hdr *nd_optbuf, + int nd_optlen, + int nd_opt_type, + void **opt, + int *optlen) +{ + int len; + + while (nd_optlen >= sizeof(*nd_optbuf)) { + len = nd_optbuf->nd_opt_len; + len *= 8; + if (len == 0) + return -1; + + if (nd_optbuf->nd_opt_type != nd_opt_type) { + nd_optbuf = (void *)nd_optbuf + len; + nd_optlen -= len; + continue; + } + + if (len > nd_optlen) + return -1; + + *opt = (void *)nd_optbuf + sizeof(*nd_optbuf); + *optlen = len; + return 0; + } + + return -1; +} + +static void send_na(struct relayd_interface *rif, + const uint8_t ethsrc[ETH_ALEN], + const uint8_t ethdst[ETH_ALEN], + const uint8_t ipsrc[16], + const uint8_t ipdst[16], + const uint8_t tp[16], + const uint8_t th[ETH_ALEN]) +{ + struct na_packet pkt; + size_t len; + + memset(&pkt, 0, sizeof(pkt)); + + pkt.eth.ether_type = htons(ETHERTYPE_IPV6); + memcpy(pkt.eth.ether_shost, ethsrc, ETH_ALEN); + memcpy(pkt.eth.ether_dhost, ethdst, ETH_ALEN); + + len = sizeof(pkt.na) + sizeof(pkt.tlla) + sizeof(pkt.addr); + + pkt.ip6.ip6_ctlun.ip6_un1.ip6_un1_flow = htonl(0x60000000); + pkt.ip6.ip6_ctlun.ip6_un1.ip6_un1_plen = htons(len); + pkt.ip6.ip6_ctlun.ip6_un1.ip6_un1_nxt = IPPROTO_ICMPV6; + pkt.ip6.ip6_ctlun.ip6_un1.ip6_un1_hlim = 255; + memcpy(&pkt.ip6.ip6_src, ipsrc, 16); + memcpy(&pkt.ip6.ip6_dst, ipdst, 16); + pkt.na.nd_na_hdr.icmp6_type = ND_NEIGHBOR_ADVERT; + pkt.na.nd_na_hdr.icmp6_code = 0; + pkt.na.nd_na_hdr.icmp6_cksum = 0; + pkt.na.nd_na_hdr.icmp6_dataun.icmp6_un_data32[0] = 0; + memcpy(&pkt.na.nd_na_target, tp, 16); + pkt.tlla.nd_opt_type = ND_OPT_TARGET_LINKADDR; + pkt.tlla.nd_opt_len = 1; + memcpy(&pkt.addr, th, ETH_ALEN); + icmp6_chksum(&pkt.eth, &pkt.ip6, &pkt.na.nd_na_hdr, sizeof(pkt)); + + DPRINTF(2, "%s: sending ICMP6 NA to "IP6_FMT", "IP6_FMT" is at ("MAC_FMT")\n", + rif->ifname, + IP6_BUF(&pkt.ip6.ip6_dst), + IP6_BUF(&pkt.na.nd_na_target), + MAC_BUF(&pkt.addr)); + + sendto(rif->icmp6_fd.fd, &pkt, sizeof(pkt), 0, + (struct sockaddr *) &rif->sll, sizeof(rif->sll)); +} + +static void send_ns(struct relayd_interface *rif, + const uint8_t ethsrc[ETH_ALEN], + const uint8_t ethdst[ETH_ALEN], + const uint8_t ipsrc[16], + const uint8_t ipdst[16], + const uint8_t tp[16], + const uint8_t sh[ETH_ALEN]) +{ + struct ns_packet pkt; + size_t len; + + memset(&pkt, 0, sizeof(pkt)); + + pkt.eth.ether_type = htons(ETHERTYPE_IPV6); + memcpy(pkt.eth.ether_shost, ethsrc, ETH_ALEN); + memcpy(pkt.eth.ether_dhost, ethdst, ETH_ALEN); + + len = sizeof(pkt.ns) + sizeof(pkt.slla) + sizeof(pkt.addr); + + pkt.ip6.ip6_ctlun.ip6_un1.ip6_un1_flow = htonl(0x60000000); + pkt.ip6.ip6_ctlun.ip6_un1.ip6_un1_plen = htons(len); + pkt.ip6.ip6_ctlun.ip6_un1.ip6_un1_nxt = IPPROTO_ICMPV6; + pkt.ip6.ip6_ctlun.ip6_un1.ip6_un1_hlim = 255; + memcpy(&pkt.ip6.ip6_src, ipsrc, 16); + memcpy(&pkt.ip6.ip6_dst, ipdst, 16); + pkt.ns.nd_ns_hdr.icmp6_type = ND_NEIGHBOR_SOLICIT; + pkt.ns.nd_ns_hdr.icmp6_code = 0; + pkt.ns.nd_ns_hdr.icmp6_cksum = 0; + pkt.ns.nd_ns_hdr.icmp6_dataun.icmp6_un_data32[0] = 0; + memcpy(&pkt.ns.nd_ns_target, tp, 16); + pkt.slla.nd_opt_type = ND_OPT_SOURCE_LINKADDR; + pkt.slla.nd_opt_len = 1; + memcpy(&pkt.addr, sh, ETH_ALEN); + icmp6_chksum(&pkt.eth, &pkt.ip6, &pkt.ns.nd_ns_hdr, sizeof(pkt)); + + DPRINTF(2, "%s: sending ICMP6 NS who-has "IP6_FMT", tell "IP6_FMT" ("MAC_FMT")\n", + rif->ifname, + IP6_BUF(&pkt.ns.nd_ns_target), + IP6_BUF(&pkt.ip6.ip6_src), + MAC_BUF(&pkt.addr)); + + sendto(rif->icmp6_fd.fd, &pkt, sizeof(pkt), 0, + (struct sockaddr *) &rif->sll, sizeof(rif->sll)); +} + +static void relay_na(struct relayd_interface *rif, + struct ether_header *eth, + struct ip6_hdr *ip6, + struct icmp6_hdr *icmp6, + struct ether_addr *etha, + int pktlen, + const uint8_t sha[ETH_ALEN], + const uint8_t tha[ETH_ALEN]) +{ + struct nd_neighbor_advert *na = (void *)icmp6; + + memcpy(eth->ether_dhost, tha, ETH_ALEN); + memcpy(etha, sha, ETH_ALEN); + + DPRINTF(2, "%s: relying NA to "IP6_FMT", "IP6_FMT" is at ("MAC_FMT")\n", + rif->ifname, + IP6_BUF(&ip6->ip6_src), + IP6_BUF(&na->nd_na_target), + MAC_BUF(etha)); + + icmp6_chksum(eth, ip6, icmp6, pktlen); + sendto(rif->icmp6_fd.fd, eth, pktlen, 0, + (struct sockaddr *) &rif->sll, sizeof(rif->sll)); +} + +static void relay_ns(struct relayd_interface *from_rif, + struct ether_header *eth, + struct ip6_hdr *ip6, + struct nd_neighbor_solicit *ns, + struct ether_addr *etha, + int pktlen) +{ + struct relayd_interface *rif; + + list_for_each_entry(rif, &interfaces, list) { + if (rif == from_rif) + continue; + + memcpy(eth->ether_shost, rif->sll.sll_addr, ETH_ALEN); + memcpy(etha, rif->sll.sll_addr, ETH_ALEN); + + DPRINTF(2, "%s: relying ICMP6 NS "IP6_FMT", tell "IP6_FMT" ("MAC_FMT")\n", + rif->ifname, + IP6_BUF(&ns->nd_ns_target), + IP6_BUF(&ip6->ip6_src), + MAC_BUF(etha)); + + icmp6_chksum(eth, ip6, &ns->nd_ns_hdr, pktlen); + sendto(rif->icmp6_fd.fd, eth, pktlen, 0, + (struct sockaddr *) &rif->sll, sizeof(rif->sll)); + } +} + +static struct relayd_host *find_host_by_ipaddr(struct relayd_interface *rif, + const uint8_t *ipaddr, + int af) { struct relayd_host *host; + int addrlen = AF2ADDRLEN(af); if (!rif) { list_for_each_entry(rif, &interfaces, list) { - host = find_host_by_ipaddr(rif, ipaddr); + host = find_host_by_ipaddr(rif, ipaddr, af); if (!host) continue; @@ -67,7 +349,7 @@ static struct relayd_host *find_host_by_ipaddr(struct relayd_interface *rif, con } list_for_each_entry(host, &rif->hosts, list) { - if (memcmp(ipaddr, host->ipaddr, sizeof(host->ipaddr)) != 0) + if (memcmp(ipaddr, host->ipaddr, addrlen) != 0) continue; return host; @@ -79,6 +361,7 @@ static void add_arp(struct relayd_host *host) { struct sockaddr_in *sin; struct arpreq arp; + int addrlen = AF2ADDRLEN(host->af); strncpy(arp.arp_dev, host->rif->ifname, sizeof(arp.arp_dev)); arp.arp_flags = ATF_COM; @@ -87,8 +370,8 @@ static void add_arp(struct relayd_host *host) memcpy(arp.arp_ha.sa_data, host->lladdr, ETH_ALEN); sin = (struct sockaddr_in *) &arp.arp_pa; - sin->sin_family = AF_INET; - memcpy(&sin->sin_addr, host->ipaddr, sizeof(host->ipaddr)); + sin->sin_family = host->af; + memcpy(&sin->sin_addr, host->ipaddr, addrlen); ioctl(inet_sock, SIOCSARP, &arp); } @@ -105,9 +388,10 @@ static void timeout_host_route(struct uloop_timeout *timeout) void relayd_add_host_route(struct relayd_host *host, const uint8_t *dest, uint8_t mask) { struct relayd_route *rt; + int addrlen = AF2ADDRLEN(host->af); list_for_each_entry(rt, &host->routes, list) { - if (!memcmp(rt->dest, dest, sizeof(rt->dest)) && rt->mask == mask) + if (!memcmp(rt->dest, dest, addrlen) && rt->mask == mask) return; } @@ -116,8 +400,9 @@ void relayd_add_host_route(struct relayd_host *host, const uint8_t *dest, uint8_ return; list_add(&rt->list, &host->routes); - memcpy(rt->dest, dest, sizeof(rt->dest)); + memcpy(rt->dest, dest, addrlen); rt->mask = mask; + rt->af = host->af; relayd_add_route(host, rt); } @@ -125,8 +410,17 @@ static void del_host(struct relayd_host *host) { struct relayd_route *route, *tmp; - DPRINTF(1, "%s: deleting host "IP_FMT" ("MAC_FMT")\n", host->rif->ifname, - IP_BUF(host->ipaddr), MAC_BUF(host->lladdr)); + switch (host->af) { + DPRINTF(1, "%s: deleting host "IP_FMT" ("MAC_FMT")\n", + host->rif->ifname, IP_BUF(host->ipaddr), + MAC_BUF(host->lladdr)); + break; + case AF_INET6: + DPRINTF(1, "%s: deleting host "IP6_FMT" ("MAC_FMT")\n", + host->rif->ifname, IP6_BUF(host->ipaddr16), + MAC_BUF(host->lladdr)); + break; + } list_for_each_entry_safe(route, tmp, &host->routes, list) { relayd_del_route(host, route); @@ -177,13 +471,14 @@ static void send_arp_request(struct relayd_interface *rif, const uint8_t *ipaddr (struct sockaddr *) &rif->sll, sizeof(rif->sll)); } -void relayd_add_pending_route(const uint8_t *gateway, const uint8_t *dest, uint8_t mask, int timeout) +void relayd_add_pending_route(const uint8_t *gateway, const uint8_t *dest, uint8_t mask, int timeout, int af) { struct relayd_pending_route *rt; struct relayd_interface *rif; struct relayd_host *host; + int addrlen = AF2ADDRLEN(af); - host = find_host_by_ipaddr(NULL, gateway); + host = find_host_by_ipaddr(NULL, gateway, af); if (host) { relayd_add_host_route(host, dest, mask); return; @@ -193,17 +488,32 @@ void relayd_add_pending_route(const uint8_t *gateway, const uint8_t *dest, uint8 if (!rt) return; - memcpy(rt->gateway, gateway, sizeof(rt->gateway)); - memcpy(rt->rt.dest, dest, sizeof(rt->rt.dest)); + memcpy(rt->gateway, gateway, addrlen); + memcpy(rt->rt.dest, dest, addrlen); rt->rt.mask = mask; + rt->rt.af = af; list_add(&rt->rt.list, &pending_routes); if (timeout <= 0) return; rt->timeout.cb = timeout_host_route; uloop_timeout_set(&rt->timeout, 10000); - list_for_each_entry(rif, &interfaces, list) { - send_arp_request(rif, gateway); + + switch (af) { + case AF_INET: + list_for_each_entry(rif, &interfaces, list) + send_arp_request(rif, gateway); + break; + case AF_INET6: + list_for_each_entry(rif, &interfaces, list) + send_ns(rif, + rif->sll.sll_addr, + ETH_IP6_ALLNODES, + DUMMY_IP6, + IP6_ALLNODES, + gateway, + rif->sll.sll_addr); + break; } } @@ -263,8 +573,21 @@ static void host_entry_timeout(struct uloop_timeout *timeout) * giving up on it. */ if (host->rif->managed && host->cleanup_pending < host_ping_tries) { - list_for_each_entry(rif, &interfaces, list) { - send_arp_request(rif, host->ipaddr); + switch (host->af) { + case AF_INET: + list_for_each_entry(rif, &interfaces, list) + send_arp_request(rif, host->ipaddr); + break; + case AF_INET6: + list_for_each_entry(rif, &interfaces, list) + send_ns(rif, + rif->sll.sll_addr, + ETH_IP6_ALLNODES, + DUMMY_IP6, + IP6_ALLNODES, + host->ipaddr, + rif->sll.sll_addr); + break; } host->cleanup_pending++; uloop_timeout_set(&host->timeout, 1000); @@ -273,18 +596,31 @@ static void host_entry_timeout(struct uloop_timeout *timeout) del_host(host); } -static struct relayd_host *add_host(struct relayd_interface *rif, const uint8_t *lladdr, const uint8_t *ipaddr) +static struct relayd_host *add_host(struct relayd_interface *rif, + const uint8_t *lladdr, + const uint8_t *ipaddr, + int af) { struct relayd_host *host; struct relayd_pending_route *route, *rtmp; + int addrlen = AF2ADDRLEN(af); - DPRINTF(1, "%s: adding host "IP_FMT" ("MAC_FMT")\n", rif->ifname, + switch (af) { + case AF_INET: + DPRINTF(1, "%s: adding host "IP_FMT" ("MAC_FMT")\n", rif->ifname, IP_BUF(ipaddr), MAC_BUF(lladdr)); + break; + case AF_INET6: + DPRINTF(1, "%s: adding host "IP6_FMT" ("MAC_FMT")\n", rif->ifname, + IP6_BUF(ipaddr), MAC_BUF(lladdr)); + break; + } host = calloc(1, sizeof(*host)); INIT_LIST_HEAD(&host->routes); host->rif = rif; - memcpy(host->ipaddr, ipaddr, sizeof(host->ipaddr)); + host->af = af; + memcpy(host->ipaddr, ipaddr, addrlen); memcpy(host->lladdr, lladdr, sizeof(host->lladdr)); list_add(&host->list, &rif->hosts); host->timeout.cb = host_entry_timeout; @@ -295,7 +631,10 @@ static struct relayd_host *add_host(struct relayd_interface *rif, const uint8_t relayd_add_route(host, NULL); list_for_each_entry_safe(route, rtmp, &pending_routes, rt.list) { - if (memcmp(route->gateway, ipaddr, 4) != 0) + if (route->rt.af != af) + continue; + + if (memcmp(route->gateway, ipaddr, addrlen) != 0) continue; relayd_add_host_route(host, route->rt.dest, route->rt.mask); @@ -310,7 +649,7 @@ static struct relayd_host *add_host(struct relayd_interface *rif, const uint8_t return host; } -static void send_gratuitous_arp(struct relayd_interface *rif, const uint8_t *spa) +static void send_gratuitous_arp(struct relayd_interface *rif, const uint8_t *spa, int af) { struct relayd_interface *to_rif; @@ -318,18 +657,43 @@ static void send_gratuitous_arp(struct relayd_interface *rif, const uint8_t *spa if (rif == to_rif) continue; - send_arp_reply(to_rif, spa, NULL, spa); + switch (af) { + case AF_INET: + send_arp_reply(to_rif, spa, NULL, spa); + break; + case AF_INET6: + send_na(to_rif, + to_rif->sll.sll_addr, + ETH_IP6_ALLNODES, + DUMMY_IP6, + IP6_ALLNODES, + spa, + to_rif->sll.sll_addr); + break; + } } } - -struct relayd_host *relayd_refresh_host(struct relayd_interface *rif, const uint8_t *lladdr, const uint8_t *ipaddr) +struct relayd_host *relayd_refresh_host(struct relayd_interface *rif, + const uint8_t *lladdr, + const uint8_t *ipaddr, + int af) { struct relayd_host *host; - host = find_host_by_ipaddr(rif, ipaddr); + switch (af) { + case AF_INET6: + if (IN6_IS_ADDR_MULTICAST(ipaddr)) { + DPRINTF(1, "%s: ignoring multicast host "IP6_FMT" ("MAC_FMT")\n", + rif->ifname, IP6_BUF(ipaddr), MAC_BUF(lladdr)); + return NULL; + } + break; + } + + host = find_host_by_ipaddr(rif, ipaddr, af); if (!host) { - host = find_host_by_ipaddr(NULL, ipaddr); + host = find_host_by_ipaddr(NULL, ipaddr, af); /* * When we suddenly see the host appearing on a different interface, @@ -343,11 +707,11 @@ struct relayd_host *relayd_refresh_host(struct relayd_interface *rif, const uint return NULL; } - host = add_host(rif, lladdr, ipaddr); + host = add_host(rif, lladdr, ipaddr, af); } else { host->cleanup_pending = false; uloop_timeout_set(&host->timeout, host_timeout * 1000); - send_gratuitous_arp(rif, ipaddr); + send_gratuitous_arp(rif, ipaddr, af); } return host; @@ -390,16 +754,16 @@ static void recv_arp_request(struct relayd_interface *rif, struct arp_packet *pk if (!memcmp(pkt->arp.arp_spa, "\x00\x00\x00\x00", 4)) return; - host = find_host_by_ipaddr(NULL, pkt->arp.arp_spa); + host = find_host_by_ipaddr(NULL, pkt->arp.arp_spa, AF_INET); if (!host || host->rif != rif) - relayd_refresh_host(rif, pkt->eth.ether_shost, pkt->arp.arp_spa); + relayd_refresh_host(rif, pkt->eth.ether_shost, pkt->arp.arp_spa, AF_INET); if (local_route_table && !memcmp(pkt->arp.arp_tpa, local_addr, sizeof(local_addr))) { send_arp_reply(rif, local_addr, pkt->arp.arp_sha, pkt->arp.arp_spa); return; } - host = find_host_by_ipaddr(NULL, pkt->arp.arp_tpa); + host = find_host_by_ipaddr(NULL, pkt->arp.arp_tpa, AF_INET); /* * If a host is being pinged because of a timeout, do not use the cached @@ -424,9 +788,9 @@ static void recv_arp_reply(struct relayd_interface *rif, struct arp_packet *pkt) IP_BUF(pkt->arp.arp_tpa)); if (memcmp(pkt->arp.arp_sha, rif->sll.sll_addr, ETH_ALEN) != 0) - relayd_refresh_host(rif, pkt->arp.arp_sha, pkt->arp.arp_spa); + relayd_refresh_host(rif, pkt->arp.arp_sha, pkt->arp.arp_spa, AF_INET); - host = find_host_by_ipaddr(NULL, pkt->arp.arp_tpa); + host = find_host_by_ipaddr(NULL, pkt->arp.arp_tpa, AF_INET); if (!host) return; @@ -436,6 +800,233 @@ static void recv_arp_reply(struct relayd_interface *rif, struct arp_packet *pkt) send_arp_reply(host->rif, pkt->arp.arp_spa, host->lladdr, host->ipaddr); } +static void relayd_handle_icmp6_ns(struct relayd_interface *rif, + struct ether_header *eth, + struct ip6_hdr *ip6, + struct icmp6_hdr *icmp6, + int pktlen) +{ + struct nd_neighbor_solicit *ns = (void *)icmp6; + struct relayd_host *host; + struct ether_addr *etha; + void *opt; + int optlen; + int len = pktlen; + + len -= sizeof(*eth); + len -= ((void *)icmp6 - (void *)ip6); + if (len < sizeof(*ns)) + return; + + if (icmp6_getopt((void *)ns + sizeof(*ns), len - sizeof(*ns), + ND_OPT_SOURCE_LINKADDR, &opt, &optlen) < 0) + return; + + if (optlen != 8) + return; + + etha = opt; + + DPRINTF(2, "%s: ICMP6 NS "IP6_FMT", tell "IP6_FMT" ("MAC_FMT")\n", + rif->ifname, + IP6_BUF(&ns->nd_ns_target), + IP6_BUF(&ip6->ip6_src), + MAC_BUF(etha)); + + host = find_host_by_ipaddr(NULL, (void *)&ip6->ip6_src, AF_INET6); + + if (!host || host->rif != rif) + relayd_refresh_host(rif, etha->ether_addr_octet, (void *)&ip6->ip6_src, AF_INET6); + + /* TODO: handle local_route_table? */ + + host = find_host_by_ipaddr(NULL, (void *)&ns->nd_ns_target, AF_INET6); + + /* + * If a host is being pinged because of a timeout, do not use the cached + * entry here. That way we can avoid giving out stale data in case the node + * has moved. We shouldn't relay requests here either, as we might miss our + * chance to create a host route. + */ + if (host && host->cleanup_pending) + return; + + relay_ns(rif, eth, ip6, ns, etha, pktlen); +} + +static void relayd_handle_icmp6_na(struct relayd_interface *rif, + struct ether_header *eth, + struct ip6_hdr *ip6, + struct icmp6_hdr *icmp6, + int pktlen) +{ + struct nd_neighbor_advert *na = (void *)icmp6; + struct relayd_host *host; + struct ether_addr *etha; + void *opt; + int optlen; + int len = pktlen; + + len -= sizeof(*eth); + len -= ((void *)icmp6 - (void *)ip6); + if (len < sizeof(*na)) + return; + + if (icmp6_getopt((void *)na + sizeof(*na), len - sizeof(*na), + ND_OPT_TARGET_LINKADDR, &opt, &optlen) < 0) + return; + + if (optlen != 8) + return; + + etha = opt; + + DPRINTF(2, "%s: ICMP6 NA "IP6_FMT" from "MAC_FMT", deliver to "IP6_FMT"\n", + rif->ifname, + IP6_BUF(&na->nd_na_target), + MAC_BUF(etha), + IP6_BUF(&ip6->ip6_dst)); + + if (memcmp(etha, rif->sll.sll_addr, ETH_ALEN) != 0) + relayd_refresh_host(rif, etha->ether_addr_octet, (void *)&na->nd_na_target, AF_INET6); + + host = find_host_by_ipaddr(NULL, (void *)&ip6->ip6_dst, AF_INET6); + if (!host) + return; + + if (host->rif == rif) + return; + + relay_na(host->rif, eth, ip6, icmp6, etha, pktlen, + host->rif->sll.sll_addr, host->lladdr); +} + +static bool relayd_handle_icmp6_neigh(struct relayd_interface *rif, + void *pkt, int pktlen) +{ + struct ether_header *eth; + struct ip6_hdr *ip6; + struct icmp6_hdr *icmp6; + + if (pktlen < sizeof(*eth) + sizeof(*ip6) + sizeof(*icmp6)) + return false; + + eth = pkt; + ip6 = pkt + sizeof(*eth); + icmp6 = pkt + sizeof(*eth) + sizeof(*ip6); + + /* TODO: IPv6 extension header is not supported */ + if (ip6->ip6_ctlun.ip6_un1.ip6_un1_nxt != IPPROTO_ICMPV6) + return false; + + switch (icmp6->icmp6_type) { + case ND_NEIGHBOR_SOLICIT: + relayd_handle_icmp6_ns(rif, eth, ip6, icmp6, pktlen); + return true; + case ND_NEIGHBOR_ADVERT: + relayd_handle_icmp6_na(rif, eth, ip6, icmp6, pktlen); + return true; + } + + return false; +} + +static bool relayd_handle_ip6_mcast(struct relayd_interface *from_rif, + void *pkt, int pktlen) +{ + struct relayd_interface *rif; + struct ether_header *eth; + struct ip6_hdr *ip6; + struct icmp6_hdr *icmp6; + struct udphdr *udp; + void *payload; + bool bad; + + if (pktlen < sizeof(*eth) + sizeof(*ip6)) + return false; + + eth = pkt; + ip6 = pkt + sizeof(*eth); + payload = pkt + sizeof(*eth) + sizeof(*ip6); + + if (eth->ether_dhost[0] != 0x33 || + eth->ether_dhost[1] != 0x33) + return false; + + list_for_each_entry(rif, &interfaces, list) { + if (rif == from_rif) + continue; + + DPRINTF(3, "%s: forwarding ipv6 packet to %s\n", + from_rif->ifname, rif->ifname); + memcpy(eth->ether_shost, rif->sll.sll_addr, ETH_ALEN); + bad = false; + + /* TODO: I don't really understand why I need to recalculate it. + * DHCPv6 server doesn't seem to consume the packet unless I + * recompute it. Sniffing suggests it arrives at a different + * checksum.. + * + * TODO: This doesn't support IPv6 extension headers. + */ + switch (ip6->ip6_ctlun.ip6_un1.ip6_un1_nxt) { + case IPPROTO_ICMPV6: + if (pktlen < sizeof(*eth) + sizeof(*ip6) + sizeof(*icmp6)) { + DPRINTF(1, "received malformed ICMPv6 packet\n"); + bad = true; + break; + } + icmp6_chksum(eth, ip6, payload, pktlen); + break; + case IPPROTO_UDP: + if (pktlen < sizeof(*eth) + sizeof(*ip6) + sizeof(*udp)) { + DPRINTF(1, "received malformed UDPv6 packet\n"); + bad = true; + break; + } + udp6_chksum(eth, ip6, payload, pktlen); + break; + } + + if (bad) + continue; + + send(rif->icmp6_fd.fd, eth, pktlen, 0); + } + + return true; +} + +static void recv_packet_icmp6(struct uloop_fd *fd, unsigned int events) +{ + struct relayd_interface *rif = container_of(fd, struct relayd_interface, icmp6_fd); + static char pktbuf[4096]; + int pktlen; + + do { + if (rif->fd.error) + uloop_end(); + + pktlen = recv(rif->icmp6_fd.fd, pktbuf, sizeof(pktbuf), 0); + if (pktlen < 0) { + if (errno == EINTR) + continue; + + break; + } + + if (!pktlen) + break; + + if (relayd_handle_icmp6_neigh(rif, pktbuf, pktlen)) + continue; + + if (relayd_handle_ip6_mcast(rif, pktbuf, pktlen)) + continue; + + } while (1); +} + static void recv_packet(struct uloop_fd *fd, unsigned int events) { struct relayd_interface *rif = container_of(fd, struct relayd_interface, fd); @@ -521,8 +1112,10 @@ static int init_interface(struct relayd_interface *rif) { struct sockaddr_ll *sll = &rif->sll; struct sockaddr_in *sin; + struct packet_mreq mreq; struct ifreq ifr; int fd = rif->fd.fd; + // int val; #ifdef PACKET_RECV_TYPE unsigned int pkt_type; #endif @@ -595,7 +1188,41 @@ static int init_interface(struct relayd_interface *rif) #endif uloop_fd_add(&rif->bcast_fd, ULOOP_READ | ULOOP_EDGE_TRIGGER); + + if (!ipv6) + goto skip_ipv6; + + fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_IPV6)); + if (fd < 0) + return 0; + + rif->icmp6_fd.fd = fd; + rif->icmp6_fd.cb = recv_packet_icmp6; + + memcpy(&rif->ip6_sll, &rif->sll, sizeof(rif->ip6_sll)); + sll = &rif->ip6_sll; + sll->sll_protocol = htons(ETH_P_IPV6); + + if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, + &ip6bpf_prog, sizeof(ip6bpf_prog))) { + perror("setsockopt(SO_ATTACH_FILTER)"); + return -1; + } + + if (bind(fd, (struct sockaddr *)sll, sizeof(struct sockaddr_ll)) < 0) { + perror("bind(ETH_P_IPV6)"); + return -1; + } + + mreq.mr_ifindex = sll->sll_ifindex; + mreq.mr_type = PACKET_MR_PROMISC; + setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); + + uloop_fd_add(&rif->icmp6_fd, ULOOP_READ | ULOOP_EDGE_TRIGGER); + +skip_ipv6: relayd_add_interface_routes(rif); + return 0; } @@ -604,9 +1231,24 @@ static void ping_static_routes(void) struct relayd_pending_route *rt; struct relayd_interface *rif; - list_for_each_entry(rt, &pending_routes, rt.list) - list_for_each_entry(rif, &interfaces, list) - send_arp_request(rif, rt->gateway); + list_for_each_entry(rt, &pending_routes, rt.list) { + switch (rt->rt.af) { + case AF_INET: + list_for_each_entry(rif, &interfaces, list) + send_arp_request(rif, rt->gateway); + break; + case AF_INET6: + list_for_each_entry(rif, &interfaces, list) + send_ns(rif, + rif->sll.sll_addr, + ETH_IP6_ALLNODES, + DUMMY_IP6, + IP6_ALLNODES, + rt->gateway, + rif->sll.sll_addr); + break; + } + } } static int init_interfaces(void) @@ -698,6 +1340,7 @@ static int usage(const char *progname) " -D Enable DHCP forwarding\n" " -P Disable DHCP options parsing\n" " -L Enable local access using as source address\n" + " -6 Enable IPv6 support\n" "\n", progname); return -1; @@ -728,7 +1371,7 @@ int main(int argc, char **argv) parse_dhcp = 1; uloop_init(); - while ((ch = getopt(argc, argv, "I:i:t:p:BDPdT:G:R:L:")) != -1) { + while ((ch = getopt(argc, argv, "I:i:t:p:BDP6dT:G:R:L:")) != -1) { switch(ch) { case 'I': managed = true; @@ -763,6 +1406,9 @@ int main(int argc, char **argv) case 'P': parse_dhcp = 0; break; + case '6': + ipv6 = 1; + break; case 'T': route_table = atoi(optarg); if (route_table <= 0) @@ -773,7 +1419,7 @@ int main(int argc, char **argv) fprintf(stderr, "Address '%s' not found\n", optarg); return 1; } - relayd_add_pending_route((uint8_t *) &addr.s_addr, (const uint8_t *) "\x00\x00\x00\x00", 0, 0); + relayd_add_pending_route((uint8_t *) &addr.s_addr, (const uint8_t *) "\x00\x00\x00\x00", 0, 0, AF_INET); break; case 'L': if (!inet_aton(optarg, &addr)) { @@ -808,7 +1454,7 @@ int main(int argc, char **argv) if (mask < 0 || mask > 32) return usage(argv[0]); - relayd_add_pending_route((uint8_t *) &addr.s_addr, (uint8_t *) &addr2.s_addr, mask, 0); + relayd_add_pending_route((uint8_t *) &addr.s_addr, (uint8_t *) &addr2.s_addr, mask, 0, AF_INET); break; case '?': default: @@ -835,7 +1481,7 @@ int main(int argc, char **argv) if (local_addr_valid) local_route_table = route_table++; - if (relayd_rtnl_init() < 0) + if (relayd_rtnl_init(ipv6) < 0) return 1; if (init_interfaces() < 0) diff --git a/relayd.h b/relayd.h index d7ad212edb68..aeffeda722f1 100644 --- a/relayd.h +++ b/relayd.h @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include @@ -46,6 +48,7 @@ #endif #define __uc(c) ((unsigned char *)(c)) +#define __us(s) ((unsigned short *)(s)) #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" #define MAC_BUF(_c) __uc(_c)[0], __uc(_c)[1], __uc(_c)[2], __uc(_c)[3], __uc(_c)[4], __uc(_c)[5] @@ -53,7 +56,24 @@ #define IP_FMT "%d.%d.%d.%d" #define IP_BUF(_c) __uc(_c)[0], __uc(_c)[1], __uc(_c)[2], __uc(_c)[3] +#define IP6_FMT "%x:%x:%x:%x:%x:%x:%x:%x" +#define IP6_BUF(_s) ntohs(__us(_s)[0]), \ + ntohs(__us(_s)[1]), \ + ntohs(__us(_s)[2]), \ + ntohs(__us(_s)[3]), \ + ntohs(__us(_s)[4]), \ + ntohs(__us(_s)[5]), \ + ntohs(__us(_s)[6]), \ + ntohs(__us(_s)[7]) + +#define AF2ADDRLEN(af) ((af) == AF_INET ? 4 : \ + (af) == AF_INET6 ? 16 : \ + -1) + #define DUMMY_IP ((uint8_t *) "\x01\x01\x01\x01") +#define DUMMY_IP6 ((uint8_t *) "\xfe\x80\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01\x00\x01") +#define ETH_IP6_ALLNODES ((uint8_t *) "\x33\x33\x00\x01\x00\x01") +#define IP6_ALLNODES ((uint8_t *) "\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01") #define DHCP_FLAG_BROADCAST (1 << 15) @@ -61,11 +81,14 @@ struct relayd_interface { struct list_head list; struct uloop_fd fd; struct uloop_fd bcast_fd; + struct uloop_fd icmp6_fd; struct sockaddr_ll sll; struct sockaddr_ll bcast_sll; + struct sockaddr_ll ip6_sll; char ifname[IFNAMSIZ]; struct list_head hosts; uint8_t src_ip[4]; + uint8_t src_ip6[16]; bool managed; int rt_table; }; @@ -75,15 +98,23 @@ struct relayd_host { struct list_head routes; struct relayd_interface *rif; uint8_t lladdr[ETH_ALEN]; - uint8_t ipaddr[4]; + union { + uint8_t ipaddr[16]; + uint16_t ipaddr16[8]; + }; struct uloop_timeout timeout; int cleanup_pending; + int af; }; struct relayd_route { struct list_head list; - uint8_t dest[4]; + union { + uint8_t dest[16]; + uint16_t dest16[8]; + }; uint8_t mask; + int af; }; struct arp_packet { @@ -91,6 +122,22 @@ struct arp_packet { struct ether_arp arp; } __packed; +struct ns_packet { + struct ether_header eth; + struct ip6_hdr ip6; + struct nd_neighbor_solicit ns; + struct nd_opt_hdr slla; + uint8_t addr[ETH_ALEN]; +} __packed; + +struct na_packet { + struct ether_header eth; + struct ip6_hdr ip6; + struct nd_neighbor_advert na; + struct nd_opt_hdr tlla; + uint8_t addr[ETH_ALEN]; +} __packed; + struct rtnl_req { struct nlmsghdr nl; struct rtmsg rt; @@ -114,17 +161,19 @@ static inline void relayd_del_route(struct relayd_host *host, struct relayd_rout rtnl_route_set(host, route, false); } +uint16_t chksum(uint16_t sum, const uint8_t *data, uint16_t len); void relayd_add_interface_routes(struct relayd_interface *rif); void relayd_del_interface_routes(struct relayd_interface *rif); -int relayd_rtnl_init(void); +int relayd_rtnl_init(int ipv6); void relayd_rtnl_done(void); struct relayd_host *relayd_refresh_host(struct relayd_interface *rif, const uint8_t *lladdr, - const uint8_t *ipaddr); + const uint8_t *ipaddr, + int af); void relayd_add_host_route(struct relayd_host *host, const uint8_t *ipaddr, uint8_t mask); -void relayd_add_pending_route(const uint8_t *gateway, const uint8_t *dest, uint8_t mask, int timeout); +void relayd_add_pending_route(const uint8_t *gateway, const uint8_t *dest, uint8_t mask, int timeout, int af); void relayd_forward_bcast_packet(struct relayd_interface *from_rif, void *packet, int len); bool relayd_handle_dhcp_packet(struct relayd_interface *rif, void *data, int len, bool forward, bool parse); diff --git a/route.c b/route.c index c552d1f271f5..fc15e9945aaf 100644 --- a/route.c +++ b/route.c @@ -32,6 +32,10 @@ static struct uloop_fd rtnl_sock; static unsigned int rtnl_seq, rtnl_dump_seq; +static int neigh_dump_af[2]; +static int neigh_dump_cnt; +static int neigh_dump_idx; +static int ipv6; int route_table = 16800; static void rtnl_flush(void) @@ -44,6 +48,16 @@ static void rtnl_flush(void) write(fd, "-1", 2); close(fd); + + if (!ipv6) + return; + + fd = open("/proc/sys/net/ipv6/route/flush", O_WRONLY); + if (fd < 0) + return; + + write(fd, "-1", 2); + close(fd); } enum { @@ -126,27 +140,47 @@ rtnl_rule_request(struct relayd_interface *rif, int flags) send(rtnl_sock.fd, &req, req.nl.nlmsg_len, 0); rtnl_flush(); + + if (!ipv6) + return; + + req.rt.rtm_family = AF_INET6; + send(rtnl_sock.fd, &req, req.nl.nlmsg_len, 0); + rtnl_flush(); } -struct rtnl_addr { +struct rtnl_addr4 { struct rtattr rta; uint8_t ipaddr[4]; } __packed; -static struct rtnl_addr * -rtnl_add_addr(struct rtnl_addr *addr, int *len, int type, const uint8_t *ipaddr) +struct rtnl_addr6 { + struct rtattr rta; + uint8_t ipaddr[16]; +} __packed; + +static void * +rtnl_add_addr(void *addrs, int *len, int type, const uint8_t *ipaddr, int addrlen) { - addr->rta.rta_type = type; - memcpy(addr->ipaddr, ipaddr, 4); - *len += sizeof(*addr); - return addr + 1; + struct rtattr *rta; + size_t offset; + + rta = addrs; + rta->rta_type = type; + rta->rta_len = sizeof(*rta) + addrlen; + memcpy(addrs + sizeof(*rta), ipaddr, addrlen); + offset = sizeof(*rta) + addrlen; + *len += offset; + + return addrs + offset; } static void rtnl_route_request(struct relayd_interface *rif, struct relayd_host *host, struct relayd_route *route, bool add) { - static struct { + int addrlen = AF2ADDRLEN(host->af); + struct { struct nlmsghdr nl; struct rtmsg rt; struct { @@ -157,11 +191,14 @@ rtnl_route_request(struct relayd_interface *rif, struct relayd_host *host, struct rtattr rta; int ifindex; } __packed dev; - struct rtnl_addr addr[3]; + union { + struct rtnl_addr4 addr4[3]; + struct rtnl_addr6 addr6[3]; + } __packed addrs; } __packed req = { .rt = { - .rtm_family = AF_INET, - .rtm_dst_len = 32, + .rtm_family = host->af, + .rtm_dst_len = addrlen * 8, .rtm_table = RT_TABLE_MAIN, }, .table.rta = { @@ -172,12 +209,9 @@ rtnl_route_request(struct relayd_interface *rif, struct relayd_host *host, .rta_type = RTA_OIF, .rta_len = sizeof(req.dev), }, - .addr[0].rta.rta_len = sizeof(struct rtnl_addr), - .addr[1].rta.rta_len = sizeof(struct rtnl_addr), - .addr[2].rta.rta_len = sizeof(struct rtnl_addr), }; - int pktlen = sizeof(req) - sizeof(req.addr); - struct rtnl_addr *addr = &req.addr[0]; + int pktlen = sizeof(req) - sizeof(req.addrs); + void *addrs = &req.addrs; const char *ifname = "loopback"; req.dev.ifindex = host->rif->sll.sll_ifindex; @@ -204,24 +238,41 @@ rtnl_route_request(struct relayd_interface *rif, struct relayd_host *host, ifname = rif->ifname; if (route) { - DPRINTF(2, "%s: add route to "IP_FMT"/%d via "IP_FMT" (%s)\n", ifname, - IP_BUF(route->dest), route->mask, IP_BUF(host->ipaddr), - host->rif->ifname); + switch (host->af) { + case AF_INET: + DPRINTF(2, "%s: add route to "IP_FMT"/%d via "IP_FMT" (%s)\n", ifname, + IP_BUF(route->dest), route->mask, IP_BUF(host->ipaddr), + host->rif->ifname); + break; + case AF_INET6: + DPRINTF(2, "%s: add route to "IP6_FMT"/%d via "IP6_FMT" (%s)\n", ifname, + IP6_BUF(route->dest16), route->mask, IP6_BUF(host->ipaddr16), + host->rif->ifname); + break; + } req.rt.rtm_dst_len = route->mask; if (route->mask) - addr = rtnl_add_addr(addr, &pktlen, RTA_DST, route->dest); - addr = rtnl_add_addr(addr, &pktlen, RTA_GATEWAY, host->ipaddr); + addrs = rtnl_add_addr(addrs, &pktlen, RTA_DST, route->dest, addrlen); + addrs = rtnl_add_addr(addrs, &pktlen, RTA_GATEWAY, host->ipaddr, addrlen); } else { - DPRINTF(2, "%s: add host route to "IP_FMT" (%s)\n", ifname, - IP_BUF(host->ipaddr), host->rif->ifname); - addr = rtnl_add_addr(addr, &pktlen, RTA_DST, host->ipaddr); - req.rt.rtm_dst_len = 32; + switch (host->af) { + case AF_INET: + DPRINTF(2, "%s: add host route to "IP_FMT" (%s)\n", ifname, + IP_BUF(host->ipaddr), host->rif->ifname); + break; + case AF_INET6: + DPRINTF(2, "%s: add host route to "IP6_FMT" (%s)\n", ifname, + IP6_BUF(host->ipaddr16), host->rif->ifname); + break; + } + addrs = rtnl_add_addr(addrs, &pktlen, RTA_DST, host->ipaddr, addrlen); + req.rt.rtm_dst_len = addrlen * 8; } /* local route */ if (!rif) - addr = rtnl_add_addr(addr, &pktlen, RTA_PREFSRC, local_addr); + addrs = rtnl_add_addr(addrs, &pktlen, RTA_PREFSRC, local_addr, addrlen); req.nl.nlmsg_len = pktlen; if (route) @@ -272,7 +323,8 @@ static void rtnl_parse_newneigh(struct nlmsghdr *h) struct rtattr *rta; int len; - if (r->ndm_family != AF_INET) + if (r->ndm_family != AF_INET && + r->ndm_family != AF_INET6) return; list_for_each_entry(rif, &interfaces, list) { @@ -302,9 +354,45 @@ found_interface: if (!memcmp(lladdr, "\x00\x00\x00\x00\x00\x00", ETH_ALEN)) return; - DPRINTF(1, "%s: Found ARP cache entry for host "IP_FMT" ("MAC_FMT")\n", - rif->ifname, IP_BUF(ipaddr), MAC_BUF(lladdr)); - relayd_refresh_host(rif, lladdr, ipaddr); + switch (r->ndm_family) { + case AF_INET: + DPRINTF(1, "%s: Found ARP cache entry for host "IP_FMT" ("MAC_FMT")\n", + rif->ifname, IP_BUF(ipaddr), MAC_BUF(lladdr)); + break; + case AF_INET6: + DPRINTF(1, "%s: Found ARP cache entry for host "IP6_FMT" ("MAC_FMT")\n", + rif->ifname, IP6_BUF(ipaddr), MAC_BUF(lladdr)); + break; + } + + relayd_refresh_host(rif, lladdr, ipaddr, r->ndm_family); +} + +static void rtnl_dump_request(int nlmsg_type, int af) +{ + struct { + struct nlmsghdr nlh; + struct rtgenmsg g; + } req = { + .nlh = { + .nlmsg_len = sizeof(req), + .nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST, + .nlmsg_pid = 0, + }, + .g.rtgen_family = af, + }; + req.nlh.nlmsg_type = nlmsg_type; + req.nlh.nlmsg_seq = rtnl_seq; + send(rtnl_sock.fd, &req, sizeof(req), 0); + rtnl_dump_seq = rtnl_seq++; +} + +static void rtnl_dump_next(void) +{ + if (neigh_dump_idx >= neigh_dump_cnt) + return; + + rtnl_dump_request(RTM_GETNEIGH, neigh_dump_af[neigh_dump_idx++]); } static void rtnl_parse_packet(void *data, int len) @@ -312,6 +400,10 @@ static void rtnl_parse_packet(void *data, int len) struct nlmsghdr *h; for (h = data; NLMSG_OK(h, len); h = NLMSG_NEXT(h, len)) { + if (h->nlmsg_type == NLMSG_DONE && + h->nlmsg_seq == rtnl_dump_seq) + rtnl_dump_next(); + if (h->nlmsg_type == NLMSG_DONE || h->nlmsg_type == NLMSG_ERROR) return; @@ -360,29 +452,12 @@ static void rtnl_cb(struct uloop_fd *fd, unsigned int events) } while (1); } -static void rtnl_dump_request(int nlmsg_type) -{ - static struct { - struct nlmsghdr nlh; - struct rtgenmsg g; - } req = { - .nlh = { - .nlmsg_len = sizeof(req), - .nlmsg_flags = NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST, - .nlmsg_pid = 0, - }, - .g.rtgen_family = AF_INET, - }; - req.nlh.nlmsg_type = nlmsg_type; - req.nlh.nlmsg_seq = rtnl_seq; - send(rtnl_sock.fd, &req, sizeof(req), 0); - rtnl_seq++; -} - -int relayd_rtnl_init(void) +int relayd_rtnl_init(int ipv6_flag) { struct sockaddr_nl snl_local = {}; + ipv6 = ipv6_flag; + rtnl_sock.fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE); if (rtnl_sock.fd < 0) { perror("socket(AF_NETLINK)"); @@ -400,9 +475,14 @@ int relayd_rtnl_init(void) rtnl_sock.cb = rtnl_cb; uloop_fd_add(&rtnl_sock, ULOOP_READ | ULOOP_EDGE_TRIGGER); + neigh_dump_idx = 0; + neigh_dump_cnt = 0; + neigh_dump_af[neigh_dump_cnt++] = AF_INET; + if (ipv6) + neigh_dump_af[neigh_dump_cnt++] = AF_INET6; + rtnl_seq = time(NULL); - rtnl_dump_seq = rtnl_seq; - rtnl_dump_request(RTM_GETNEIGH); + rtnl_dump_next(); rtnl_rule_request(NULL, RULE_F_ADD); return 0; -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From michal.kazior at tieto.com Mon Apr 11 09:14:54 2016 From: michal.kazior at tieto.com (Michal Kazior) Date: Mon, 11 Apr 2016 15:14:54 +0200 Subject: [OpenWrt-Devel] [RFC relayd 2/2] relayd: add ipv6 link local support In-Reply-To: <1460380494-22667-1-git-send-email-michal.kazior@tieto.com> References: <1460380494-22667-1-git-send-email-michal.kazior@tieto.com> Message-ID: <1460380494-22667-3-git-send-email-michal.kazior@tieto.com> This patch combined with an corresponding kernel patch makes it possible to route link-local addresses which, in practice, means DHCPv6, RA, RS are now functional. Signed-off-by: Michal Kazior --- main.c | 3 +++ route.c | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/main.c b/main.c index e1d1dc997b6f..30906b2df2e9 100644 --- a/main.c +++ b/main.c @@ -1341,6 +1341,9 @@ static int usage(const char *progname) " -P Disable DHCP options parsing\n" " -L Enable local access using as source address\n" " -6 Enable IPv6 support\n" +#ifdef RTAX_FEATURE_XFACE + "IPv6 link-local routing capability is compiled in.\n" +#endif "\n", progname); return -1; diff --git a/route.c b/route.c index fc15e9945aaf..05d8cee18214 100644 --- a/route.c +++ b/route.c @@ -191,6 +191,13 @@ rtnl_route_request(struct relayd_interface *rif, struct relayd_host *host, struct rtattr rta; int ifindex; } __packed dev; + struct { + struct rtattr rta; + struct { + struct rtattr rta; + int val; + } __packed features; + } __packed metrics; union { struct rtnl_addr4 addr4[3]; struct rtnl_addr6 addr6[3]; @@ -209,6 +216,21 @@ rtnl_route_request(struct relayd_interface *rif, struct relayd_host *host, .rta_type = RTA_OIF, .rta_len = sizeof(req.dev), }, + .metrics = { + .rta = { + .rta_type = RTA_METRICS, + .rta_len = sizeof(req.metrics), + }, + .features = { + .rta = { + .rta_type = RTAX_FEATURES, + .rta_len = sizeof(req.metrics.features), + }, +#ifdef RTAX_FEATURE_XFACE + .val = RTAX_FEATURE_XFACE, +#endif + }, + }, }; int pktlen = sizeof(req) - sizeof(req.addrs); void *addrs = &req.addrs; -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From vasilugin at yandex.ru Mon Apr 11 09:48:11 2016 From: vasilugin at yandex.ru (=?koi8-r?B?88XSx8XKIPfB08nMwMfJzg==?=) Date: Mon, 11 Apr 2016 19:48:11 +0600 Subject: [OpenWrt-Devel] [PATCH] CC: ramips: backport rt3352 usbphy fix in dts-file Message-ID: <912851460382491@web18h.yandex.ru> Backport of trunk patch. Fix kernel hang during loading ehci-hcd module. SIgned-Off-By: Serge Vasilugin diff --git a/target/linux/ramips/dts/rt3352.dtsi b/target/linux/ramips/dts/rt3352.dtsi index 7dffddb..dacb047 100644 --- a/target/linux/ramips/dts/rt3352.dtsi +++ b/target/linux/ramips/dts/rt3352.dtsi @@ -222,8 +222,9 @@ interrupts = <17>; }; - usbphy { + usbphy: usbphy { compatible = "ralink,rt3xxx-usbphy"; + #phy-cells = <1>; resets = <&rstctrl 22 &rstctrl 25>; reset-names = "host", "device"; @@ -243,6 +244,9 @@ compatible = "ralink,rt3xxx-ehci", "ehci-platform"; reg = <0x101c0000 0x1000>; + phys = <&usbphy 1>; + phy-names = "usb"; + interrupt-parent = <&intc>; interrupts = <18>; @@ -253,6 +257,9 @@ compatible = "ralink,rt3xxx-ohci", "ohci-platform"; reg = <0x101c1000 0x1000>; + phys = <&usbphy 1>; + phy-names = "usb"; + interrupt-parent = <&intc>; interrupts = <18>; --- serge _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From naobsd at gmail.com Mon Apr 11 09:55:24 2016 From: naobsd at gmail.com (FUKAUMI Naoki) Date: Mon, 11 Apr 2016 13:55:24 +0000 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for ELECOM WRH-300CR Message-ID: <1460382924-20309-1-git-send-email-naobsd@gmail.com> Signed-off-by: YuheiOKAWA Signed-off-by: FUKAUMI Naoki --- target/linux/ramips/base-files/etc/board.d/01_leds | 4 + .../linux/ramips/base-files/etc/board.d/02_network | 3 +- target/linux/ramips/base-files/etc/diag.sh | 3 +- target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/WRH-300CR.dts | 126 +++++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 15 +++ target/linux/ramips/mt7620/profiles/elecom.mk | 18 +++ 8 files changed, 171 insertions(+), 2 deletions(-) create mode 100644 target/linux/ramips/dts/WRH-300CR.dts create mode 100644 target/linux/ramips/mt7620/profiles/elecom.mk diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 5816e60..0ba26d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -264,6 +264,10 @@ whr-600d) wnce2001) set_wifi_led "$board:green:wlan" ;; +wrh-300cr) + set_wifi_led "$board:green:wlan" + ucidef_set_led_netdev "lan" "lan" "$board:green:ethernet" "eth0" + ;; wt3020) ucidef_set_led_default "power" "power" "$board:blue:power" "0" ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 4b65d36..2863b88 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -162,7 +162,8 @@ ramips_setup_interfaces() d105|\ hpm|\ na930|\ - wli-tx4-ag300n) + wli-tx4-ag300n|\ + wrh-300cr) ucidef_set_interface_lan "eth0" ;; e1700|\ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index daa7fb1..31d9646 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -73,7 +73,8 @@ get_status_led() { status_led="$board:green:run" ;; awapn2403|\ - dir-645) + dir-645|\ + wrh-300cr) status_led="$board:green:wps" ;; cf-wr800n|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 5f1df7b..459de6f 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -460,6 +460,9 @@ ramips_board_detect() { *"WR6202") name="wr6202" ;; + *"WRH-300CR") + name="wrh-300cr" + ;; *"WRTNODE") name="wrtnode" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index c329dce..6e287d4 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -135,6 +135,7 @@ platform_check_image() { wnce2001|\ wr512-3gn|\ wr6202|\ + wrh-300cr|\ wrtnode|\ wrtnode2r |\ wrtnode2p |\ diff --git a/target/linux/ramips/dts/WRH-300CR.dts b/target/linux/ramips/dts/WRH-300CR.dts new file mode 100644 index 0000000..7e1947d --- /dev/null +++ b/target/linux/ramips/dts/WRH-300CR.dts @@ -0,0 +1,126 @@ +/dts-v1/; + +/include/ "mt7620n.dtsi" + +/ { + compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc"; + model = "ELECOM WRH-300CR"; + + palmbus at 10000000 { + gpio1: gpio at 638 { + status = "okay"; + }; + + gpio2: gpio at 660 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "mx25l12805d"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "recover"; + reg = <0x50000 0x1c0000>; + read-only; + }; + partition at 210000 { + label = "firmware"; + reg = <0x210000 0xdf0000>; + }; + }; + }; + }; + + ehci at 101c0000 { + status = "okay"; + }; + + ohci at 101c1000 { + status = "okay"; + }; + + ethernet at 10100000 { + mtd-mac-address = <&factory 0x2e>; + mediatek,portmap = "llllw"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "ephy", "wled"; + ralink,function = "gpio"; + }; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "wrh-300cr:green:wps"; + gpios = <&gpio2 0 1>; + }; + + ethernet { + label = "wrh-300cr:green:ethernet"; + gpios = <&gpio2 3 1>; + }; + + wlan { + label = "wrh-300cr:green:wlan"; + gpios = <&gpio3 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 1 1>; + linux,code = <0x198>; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 1>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 18cd20a..c76e98e 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -64,6 +64,19 @@ endef BuildFirmware/Tplink/squashfs=$(call BuildFirmware/OF/tplink,$(1),$(2),$(3),$(4)) BuildFirmware/Tplink/initramfs=$(call BuildFirmware/OF/tplink/initramfs,$(1),$(2),$(3),$(4)) +define BuildFirmware/WRH-300CR/squashfs + $(call BuildFirmware/Default16M/squashfs,$(1),$(2),$(3)) + cp $(call sysupname,$(1),$(2)) $(KDIR)/v_0.0.0.bin + ( \ + $(STAGING_DIR_HOST)/bin/md5sum $(KDIR)/v_0.0.0.bin | \ + sed 's/ .*//' && \ + echo 458 \ + ) | $(STAGING_DIR_HOST)/bin/md5sum | \ + sed 's/ .*//' > $(KDIR)/v_0.0.0.md5 + $(STAGING_DIR_HOST)/bin/tar -cf $(call imgname,$(1),$(2))-factory.bin -C $(KDIR) v_0.0.0.bin v_0.0.0.md5 +endef +BuildFirmware/WRH-300CR/initramfs=$(call BuildFirmware/Default16M/initramfs,$(1),$(2),$(3)) + Image/Build/Profile/E1700=$(call BuildFirmware/UMedia/$(1),$(1),e1700,E1700,0x013326) ex2700_mtd_size=3866624 @@ -98,6 +111,7 @@ Image/Build/Profile/MLW221=$(call BuildFirmware/Default16M/$(1),$(1),mlw221,MLW2 Image/Build/Profile/MLWG2=$(call BuildFirmware/Default16M/$(1),$(1),mlwg2,MLWG2) Image/Build/Profile/WMR-300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR-300) Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U) +Image/Build/Profile/WRH-300CR=$(call BuildFirmware/WRH-300CR/$(1),$(1),wrh-300cr,WRH-300CR) Image/Build/Profile/WRTNODE=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode,WRTNODE) Image/Build/Profile/WT3020=$(call BuildFirmware/PorayDualSize/$(1),$(1),wt3020,WT3020) Image/Build/Profile/MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1),miwifi-mini,MIWIFI-MINI) @@ -143,6 +157,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/MLWG2,$(1)) $(call Image/Build/Profile/WMR-300,$(1)) $(call Image/Build/Profile/RT-N14U,$(1)) + $(call Image/Build/Profile/WRH-300CR,$(1)) $(call Image/Build/Profile/WRTNODE,$(1)) $(call Image/Build/Profile/WT3020,$(1)) $(call Image/Build/Profile/MIWIFI-MINI,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/elecom.mk b/target/linux/ramips/mt7620/profiles/elecom.mk new file mode 100644 index 0000000..5c84c92 --- /dev/null +++ b/target/linux/ramips/mt7620/profiles/elecom.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/WRH-300CR + NAME:=ELECOM WRH-300CR + PACKAGES:=\ + kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-usb-storage \ + kmod-scsi-core kmod-fs-ext4 block-mount +endef + +define Profile/WRH-300CR/Description + Package set optimized for the ELECOM WRH-300CR. +endef +$(eval $(call Profile,WRH-300CR)) -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bjorn at mork.no Mon Apr 11 11:13:00 2016 From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=) Date: Mon, 11 Apr 2016 17:13:00 +0200 Subject: [OpenWrt-Devel] [RFC relayd 1/2] relayd: add ipv6 support In-Reply-To: <1460380494-22667-2-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Mon, 11 Apr 2016 15:14:53 +0200") References: <1460380494-22667-1-git-send-email-michal.kazior@tieto.com> <1460380494-22667-2-git-send-email-michal.kazior@tieto.com> Message-ID: <8737qsji0z.fsf@nemi.mork.no> Michal Kazior writes: > This adds basic IPv6 support framework. Things > like, e.g. DHCPv6 will not work (yeT) though > because link-local support requires additional > changes (including kernel). Could the DHCPv6 support be implemented as an LDRA instead? Ref https://tools.ietf.org/html/rfc6221 Bj?rn _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From vasilugin at yandex.ru Mon Apr 11 12:32:38 2016 From: vasilugin at yandex.ru (=?koi8-r?B?88XSx8XKIPfB08nMwMfJzg==?=) Date: Mon, 11 Apr 2016 22:32:38 +0600 Subject: [OpenWrt-Devel] [PATCH] ramips: awake rt305x USB controller Message-ID: <1731621460392358@web6m.yandex.ru> Because of Ralink uboot set USB controller into sleep mode [1] we check it and awake controller before any registers access. Fix ticket #21396 [2] [1] http://marc.info/?l=linux-usb&m=137398626102108&w=2 [2] https://dev.openwrt.org/ticket/21396 Signed-Off-By: Serge Vasilugin diff --git a/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch b/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch new file mode 100644 index 0000000..2ba462d --- /dev/null +++ b/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch @@ -0,0 +1,15 @@ +--- a/drivers/usb/dwc2/platform.c ++++ b/drivers/usb/dwc2/platform.c +@@ -375,6 +375,12 @@ static int dwc2_driver_probe(struct plat + dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", + (unsigned long)res->start, hsotg->regs); + ++ /* Enable USB port before any regs access */ ++ if(dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) { ++ dwc2_writel(0x00, hsotg->regs + PCGCTL); ++ /* TODO: mdelay(25) here? vendor driver don't use it */ ++ } ++ + hsotg->dr_mode = usb_get_dr_mode(&dev->dev); + if (IS_ENABLED(CONFIG_USB_DWC2_HOST) && + hsotg->dr_mode != USB_DR_MODE_HOST) { --- serge _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From luka at openwrt.org Mon Apr 11 12:56:51 2016 From: luka at openwrt.org (Luka Perkov) Date: Mon, 11 Apr 2016 18:56:51 +0200 Subject: [OpenWrt-Devel] [PATCH 1/3] [rpcd] file: add append write support Message-ID: <1460393813-2163-1-git-send-email-luka@openwrt.org> Signed-off-by: Luka Perkov --- file.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/file.c b/file.c index d983518..91a55a1 100644 --- a/file.c +++ b/file.c @@ -93,6 +93,7 @@ static const struct blobmsg_policy rpc_file_rb_policy[__RPC_F_RB_MAX] = { enum { RPC_F_RW_PATH, RPC_F_RW_DATA, + RPC_F_RW_APPEND, RPC_F_RW_MODE, RPC_F_RW_BASE64, __RPC_F_RW_MAX, @@ -101,6 +102,7 @@ enum { static const struct blobmsg_policy rpc_file_rw_policy[__RPC_F_RW_MAX] = { [RPC_F_RW_PATH] = { .name = "path", .type = BLOBMSG_TYPE_STRING }, [RPC_F_RW_DATA] = { .name = "data", .type = BLOBMSG_TYPE_STRING }, + [RPC_F_RW_APPEND] = { .name = "append", .type = BLOBMSG_TYPE_BOOL }, [RPC_F_RW_MODE] = { .name = "mode", .type = BLOBMSG_TYPE_INT32 }, [RPC_F_RW_BASE64] = { .name = "base64", .type = BLOBMSG_TYPE_BOOL }, }; @@ -265,6 +267,7 @@ rpc_file_write(struct ubus_context *ctx, struct ubus_object *obj, struct blob_attr *msg) { struct blob_attr *tb[__RPC_F_RW_MAX]; + int append = O_TRUNC; mode_t prev_mode, mode = 0666; int fd, rv = 0; void *data = NULL; @@ -279,11 +282,14 @@ rpc_file_write(struct ubus_context *ctx, struct ubus_object *obj, data = blobmsg_data(tb[RPC_F_RW_DATA]); data_len = blobmsg_data_len(tb[RPC_F_RW_DATA]) - 1; + if (tb[RPC_F_RW_APPEND] && blobmsg_get_bool(tb[RPC_F_RW_APPEND])) + append = O_APPEND; + if (tb[RPC_F_RW_MODE]) mode = blobmsg_get_u32(tb[RPC_F_RW_MODE]); prev_mode = umask(0); - fd = open(blobmsg_data(tb[RPC_F_RW_PATH]), O_CREAT | O_WRONLY | O_TRUNC, mode); + fd = open(blobmsg_data(tb[RPC_F_RW_PATH]), O_CREAT | O_WRONLY | append, mode); umask(prev_mode); if (fd < 0) return rpc_errno_status(); -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From luka at openwrt.org Mon Apr 11 12:56:52 2016 From: luka at openwrt.org (Luka Perkov) Date: Mon, 11 Apr 2016 18:56:52 +0200 Subject: [OpenWrt-Devel] [PATCH 2/3] [rpcd] file: handle return output of b64_decode In-Reply-To: <1460393813-2163-1-git-send-email-luka@openwrt.org> References: <1460393813-2163-1-git-send-email-luka@openwrt.org> Message-ID: <1460393813-2163-2-git-send-email-luka@openwrt.org> Solve this compile warning: file.c:300:16: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] if (data_len < 0) Signed-off-by: Luka Perkov --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file.c b/file.c index 91a55a1..6ddde32 100644 --- a/file.c +++ b/file.c @@ -271,7 +271,7 @@ rpc_file_write(struct ubus_context *ctx, struct ubus_object *obj, mode_t prev_mode, mode = 0666; int fd, rv = 0; void *data = NULL; - size_t data_len = 0; + int data_len = 0; blobmsg_parse(rpc_file_rw_policy, __RPC_F_RW_MAX, tb, blob_data(msg), blob_len(msg)); -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From luka at openwrt.org Mon Apr 11 12:56:53 2016 From: luka at openwrt.org (Luka Perkov) Date: Mon, 11 Apr 2016 18:56:53 +0200 Subject: [OpenWrt-Devel] [PATCH 3/3] [rpcd] file: add myself in Copyright header In-Reply-To: <1460393813-2163-1-git-send-email-luka@openwrt.org> References: <1460393813-2163-1-git-send-email-luka@openwrt.org> Message-ID: <1460393813-2163-3-git-send-email-luka@openwrt.org> Signed-off-by: Luka Perkov --- file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/file.c b/file.c index 6ddde32..1c4d8bc 100644 --- a/file.c +++ b/file.c @@ -2,6 +2,7 @@ * rpcd - UBUS RPC server * * Copyright (C) 2013-2014 Jo-Philipp Wich + * Copyright (C) 2016 Luka Perkov * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From laurent at guerby.net Mon Apr 11 17:54:51 2016 From: laurent at guerby.net (Laurent GUERBY) Date: Mon, 11 Apr 2016 23:54:51 +0200 Subject: [OpenWrt-Devel] rsync mirror of download.openwrt.org ? In-Reply-To: <1458928944.27437.306.camel@guerby.net> References: <1458393048.27437.162.camel@guerby.net> <56ED668A.5090404@openwrt.org> <1458928944.27437.306.camel@guerby.net> Message-ID: <1460411691.25322.161.camel@guerby.net> On Fri, 2016-03-25 at 19:02 +0100, Laurent GUERBY wrote: > On Sat, 2016-03-19 at 15:47 +0100, John Crispin wrote: > > > > On 19/03/2016 14:10, Laurent GUERBY wrote: > > > Hi, > > > > > > We've setup a mirror of openwrt on a 10G+ connection IPv4+v6, MPTCP > > > support using initial rsync from ba.mirror.garr.it : > > > > > > http://openwrt.tetaneutral.net > > > > > > But garr.it does not have 15.05.1, is there a way to directly rsync from > > > downloads.openwrt.org ? Or any other way ? (push would be okay if > > > needed). > > > > > > Sincerely > > > > > > Laurent GUERBY > > > AS197422 http://tetaneutral.net > > > > i can rsync 15.05.1 to your server if that is ok for you ... > > Ok for us :) > > Laurent > > PS: public key request sent last sunday by mail > (may be lost somewhere ?) Ping ? Laurent _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.petre at posteo.net Mon Apr 11 18:18:04 2016 From: daniel.petre at posteo.net (Daniel Petre) Date: Tue, 12 Apr 2016 01:18:04 +0300 Subject: [OpenWrt-Devel] rsync mirror of download.openwrt.org ? In-Reply-To: <1460411691.25322.161.camel@guerby.net> References: <1458393048.27437.162.camel@guerby.net> <56ED668A.5090404@openwrt.org> <1458928944.27437.306.camel@guerby.net> <1460411691.25322.161.camel@guerby.net> Message-ID: <570C229C.3090209@posteo.net> On 04/12/2016 12:54 AM, Laurent GUERBY wrote: > On Fri, 2016-03-25 at 19:02 +0100, Laurent GUERBY wrote: >> On Sat, 2016-03-19 at 15:47 +0100, John Crispin wrote: >>> >>> On 19/03/2016 14:10, Laurent GUERBY wrote: >>>> Hi, >>>> >>>> We've setup a mirror of openwrt on a 10G+ connection IPv4+v6, MPTCP >>>> support using initial rsync from ba.mirror.garr.it : >>>> >>>> http://openwrt.tetaneutral.net >>>> >>>> But garr.it does not have 15.05.1, is there a way to directly rsync from >>>> downloads.openwrt.org ? Or any other way ? (push would be okay if >>>> needed). >>>> >>>> Sincerely >>>> >>>> Laurent GUERBY >>>> AS197422 http://tetaneutral.net >>> >>> i can rsync 15.05.1 to your server if that is ok for you ... >> >> Ok for us :) What's the space requirement for the whole Chaos Calmer release please? I'm interested in setting a mirror too.. >> >> Laurent >> >> PS: public key request sent last sunday by mail >> (may be lost somewhere ?) > > Ping ? > > Laurent > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ianchi74 at outlook.com Mon Apr 11 22:58:21 2016 From: ianchi74 at outlook.com (Adrian Panella) Date: Mon, 11 Apr 2016 21:58:21 -0500 Subject: [OpenWrt-Devel] [PATCH] ipq806x: enable hard float Message-ID: resubmitting fixing format problem commit e40d7bf480243f855ad38e7752b96ba1e744ea1c Author: Adrian Panella Date: Tue Apr 5 21:45:14 2016 -0500 IPQ806X: enable hard float Signed-off-by: Adrian Panella diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 97a40cf..689ba64 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq806x BOARDNAME:=Qualcomm Atheros IPQ806X -FEATURES:=squashfs nand ubifs +FEATURES:=squashfs nand ubifs fpu CPU_TYPE:=cortex-a9 CPU_SUBTYPE:=neon-vfpv4 MAINTAINER:=John Crispin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ianchi74 at outlook.com Mon Apr 11 23:05:07 2016 From: ianchi74 at outlook.com (Adrian Panella) Date: Mon, 11 Apr 2016 22:05:07 -0500 Subject: [OpenWrt-Devel] [PATCH] ipq806x: enable hard float Message-ID: Sorry, resubmitting again fixing format problem. commit e40d7bf480243f855ad38e7752b96ba1e744ea1c Author: Adrian Panella Date: Tue Apr 5 21:45:14 2016 -0500 IPQ806X: enable hard float Signed-off-by: Adrian Panella diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 97a40cf..689ba64 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq806x BOARDNAME:=Qualcomm Atheros IPQ806X -FEATURES:=squashfs nand ubifs +FEATURES:=squashfs nand ubifs fpu CPU_TYPE:=cortex-a9 CPU_SUBTYPE:=neon-vfpv4 MAINTAINER:=John Crispin _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ldpinney at gmail.com Tue Apr 12 01:52:45 2016 From: ldpinney at gmail.com (L. D. Pinney) Date: Tue, 12 Apr 2016 00:52:45 -0500 Subject: [OpenWrt-Devel] [PATCH] ar71xx: Add support for the OMYlink OMY-X1 Message-ID: <1460440365-25367-1-git-send-email-ldpinney@gmail.com> https://wiki.openwrt.org/toh/omylink/omy-g1 http://www.omylink.com/ Signed-off-by: L. D. Pinney --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 +++ target/linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/config-4.4 | 1 + target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++++++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ target/linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/generic/profiles/omy.mk | 10 ++++++ target/linux/ar71xx/image/Makefile | 9 ++++- tools/firmware-utils/src/mktplinkfw.c | 1 + 14 files changed, 169 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index b2469bf..4546107 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -398,6 +398,11 @@ om5p-ac) ucidef_set_led_netdev "port1" "port1" "om5pac:blue:lan" "eth0" ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1" ;; +omy-g1) + ucidef_set_led_wlan "wlan" "WLAN" "omy:green:wlan" "phy0tpt" + ucidef_set_led_netdev "wan" "WAN" "omy:green:wan" "eth0" + ucidef_set_led_netdev "lan" "LAN" "omy:green:lan" "eth1" + ;; omy-x1) ucidef_set_led_default "power" "POWER" "omy:green:power" "1" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 8fdfa07..7724a08 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -220,6 +220,7 @@ tl-wr941nd) ;; dir-615-i1 |\ +omy-g1 |\ r6100 |\ smart-300 |\ tl-mr3420-v2 |\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 1f9bd3f..77fa398 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -218,6 +218,9 @@ get_status_led() { om5p-acv2) status_led="om5pac:blue:power" ;; + omy-g1) + status_led="omy:green:wlan" + ;; omy-x1) status_led="omy:green:power" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 3d4541e..0c9dddc 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -123,6 +123,9 @@ tplink_board_detect() { "007260"*) model="TellStick ZNet Lite" ;; + "066601"*) + model="OMYlink OMY-G1" + ;; "066602"*) model="OMYlink OMY-X1" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index d44ece5..5334600 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -340,6 +340,7 @@ platform_check_image() { gl-inet | \ mc-mac1200r | \ minibox-v1 |\ + omy-g1 |\ omy-x1 |\ onion-omega | \ oolite | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index fa98643..40cf453 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -111,6 +111,7 @@ CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y CONFIG_ATH79_MACH_OM5P_AC=y CONFIG_ATH79_MACH_OM5P_ACv2=y +CONFIG_ATH79_MACH_OMY_G1=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index ec04c28..860b1e1 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -114,6 +114,7 @@ CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y CONFIG_ATH79_MACH_OM5P_AC=y CONFIG_ATH79_MACH_OM5P_ACv2=y +CONFIG_ATH79_MACH_OMY_G1=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 8c77645..e6879a9 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -890,6 +890,16 @@ config ATH79_MACH_OM5P_ACv2 select ATH79_DEV_M25P80 select ATH79_DEV_WMAC +config ATH79_MACH_OMY_G1 + bool "OMYlink OMY G1 support" + select SOC_AR934X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_USB + select ATH79_DEV_WMAC + config ATH79_MACH_OMY_X1 bool "OMYlink OMY X1 support" select SOC_AR934X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 862a2e3..b707fb6 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -117,6 +117,7 @@ obj-$(CONFIG_ATH79_MACH_OM2P) += mach-om2p.o obj-$(CONFIG_ATH79_MACH_OM5P) += mach-om5p.o obj-$(CONFIG_ATH79_MACH_OM5P_AC) += mach-om5pac.o obj-$(CONFIG_ATH79_MACH_OM5P_ACv2) += mach-om5pacv2.o +obj-$(CONFIG_ATH79_MACH_OMY_G1) += mach-omy-g1.o obj-$(CONFIG_ATH79_MACH_OMY_X1) += mach-omy-x1.o obj-$(CONFIG_ATH79_MACH_ONION_OMEGA) += mach-onion-omega.o obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c new file mode 100644 index 0000000..25ca27c --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c @@ -0,0 +1,123 @@ +/* + * OMYlink OMY-G1 board support + * + * Copyright (C) 2016 L. D. Pinney + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include + +#include +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define OMY_G1_GPIO_LED_WLAN 13 +#define OMY_G1_GPIO_LED_WAN 18 +#define OMY_G1_GPIO_LED_LAN 19 + +#define OMY_G1_GPIO_USB_POWER 4 + +#define OMY_G1_GPIO_BTN_RESET 17 + +#define OMY_G1_KEYS_POLL_INTERVAL 20 /* msecs */ +#define OMY_G1_KEYS_DEBOUNCE_INTERVAL (3 * OMY_G1_KEYS_POLL_INTERVAL) + +static const char *omy_g1_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data omy_g1_flash_data = { + .part_probes = omy_g1_part_probes, +}; + +static struct gpio_led omy_g1_leds_gpio[] __initdata = { + { + .name = "omy:green:wlan", + .gpio = OMY_G1_GPIO_LED_WLAN, + .active_low = 1, + },{ + .name = "omy:green:wan", + .gpio = OMY_G1_GPIO_LED_WAN, + .active_low = 1, + }, { + .name = "omy:green:lan", + .gpio = OMY_G1_GPIO_LED_LAN, + .active_low = 1, + }, +}; + +static struct gpio_keys_button omy_g1_gpio_keys[] __initdata = { + { + .desc = "Reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = OMY_G1_KEYS_DEBOUNCE_INTERVAL, + .gpio = OMY_G1_GPIO_BTN_RESET, + .active_low = 1, + } +}; + +static void __init omy_g1_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + ath79_gpio_function_setup(AR934X_GPIO_FUNC_JTAG_DISABLE, + AR934X_GPIO_FUNC_CLK_OBS4_EN); + + ath79_register_m25p80(&omy_g1_flash_data); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(omy_g1_leds_gpio), + omy_g1_leds_gpio); + + ath79_register_gpio_keys_polled(1, OMY_G1_KEYS_POLL_INTERVAL, + ARRAY_SIZE(omy_g1_gpio_keys), + omy_g1_gpio_keys); + + ath79_gpio_output_select(OMY_G1_GPIO_USB_POWER, + AR934X_GPIO_OUT_GPIO); + + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_PHY_SWAP); + + ath79_register_mdio(1, 0x0); + + ath79_init_mac(ath79_eth0_data.mac_addr, mac, -1); + ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); + + ath79_switch_data.phy4_mii_en = 1; + ath79_switch_data.phy_poll_mask = BIT(0); + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.phy_mask = BIT(0); + ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev; + ath79_register_eth(0); + + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_register_eth(1); + + ath79_register_wmac(ee, mac); + + ath79_gpio_output_select(OMY_G1_GPIO_USB_POWER, + AR934X_GPIO_OUT_GPIO); + + gpio_request_one(OMY_G1_GPIO_USB_POWER, + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, + "USB power"); + + ath79_register_usb(); +} + +MIPS_MACHINE(ATH79_MACH_OMY_G1, "OMY-G1", "OMYlink OMY-G1", + omy_g1_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 0363c88..bc17e8d 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -117,6 +117,7 @@ enum ath79_mach_type { ATH79_MACH_OM5P_ACv2, /* OpenMesh OM5P-ACv2 */ ATH79_MACH_OM5P_AN, /* OpenMesh OM5P-AN */ ATH79_MACH_OM5P, /* OpenMesh OM5P */ + ATH79_MACH_OMY_G1, /* OMYlink OMY-G1 */ ATH79_MACH_OMY_X1, /* OMYlink OMY-X1 */ ATH79_MACH_ONION_OMEGA, /* ONION OMEGA */ ATH79_MACH_PB42, /* Atheros PB42 */ diff --git a/target/linux/ar71xx/generic/profiles/omy.mk b/target/linux/ar71xx/generic/profiles/omy.mk index 4055dfc..397de54 100644 --- a/target/linux/ar71xx/generic/profiles/omy.mk +++ b/target/linux/ar71xx/generic/profiles/omy.mk @@ -5,6 +5,16 @@ # See /LICENSE for more information. # +define Profile/OMYG1 + NAME:=OMYlink OMY-G1 + PACKAGES:= kmod-usb-core kmod-usb2 +endef + +define Profile/OMYX1/Description + Package set optimized for the OMYlink OMY-G1. +endef +$(eval $(call Profile,OMYG1)) + define Profile/OMYX1 NAME:=OMYlink OMY-X1 PACKAGES:= diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e4e2fcf..2720e49 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -561,13 +561,20 @@ define Device/minibox-v1 endef TARGET_DEVICES += minibox-v1 +define Device/omy-g1 + $(Device/tplink-16mlzma) + BOARDNAME := OMY-G1 + DEVICE_PROFILE := OMYG1 + TPLINK_HWID := 0x06660101 +endef + define Device/omy-x1 $(Device/tplink-8mlzma) BOARDNAME := OMY-X1 DEVICE_PROFILE := OMYX1 TPLINK_HWID := 0x06660201 endef -TARGET_DEVICES += omy-x1 +TARGET_DEVICES += omy-g1 omy-x1 define Device/onion-omega $(Device/tplink-16mlzma) diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index bf7c619..432dce6 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -35,6 +35,7 @@ #define HWID_ANTMINER_S3 0x04440301 #define HWID_GL_INET_V1 0x08000001 #define HWID_GS_OOLITE_V1 0x3C000101 +#define HWID_OMY_G1 0x06660101 #define HWID_OMY_X1 0x06660201 #define HWID_ONION_OMEGA 0x04700001 #define HWID_TL_MR10U_V1 0x00100101 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From francesco.borromini at inventati.org Tue Apr 12 02:22:11 2016 From: francesco.borromini at inventati.org (Stijn Segers) Date: Tue, 12 Apr 2016 08:22:11 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: Add TP-Link TL-WR740N v6 support to trunk Message-ID: <1460442131-1758-1-git-send-email-francesco.borromini@inventati.org> This patch adds support for the TP-Link TL-WR740N v6 into OpenWrt trunk. Hardware wise, it's very similar to the TL-WR841N v10. See the forum thread [1]. Credit goes to the user 'traveler' who did the legwork and tested builds. Also thanks to Matthias Schiffer for clarifying the DEVICE_PROFILE settings. Signed-off by: Stijn Segers [1]: https://forum.openwrt.org/viewtopic.php?pid=318704 --- target/linux/ar71xx/image/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e4e2fcf..c10d8f1 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -753,6 +753,13 @@ define Device/tl-wr740n-v5 CONSOLE := ttyATH0,115200 endef +define Device/tl-wr740n-v6 + $(Device/tplink-4mlzma) + BOARDNAME := TL-WR841N-v9 + DEVICE_PROFILE := TLWR740 + TPLINK_HWID := 0x07400006 +endef + define Device/tl-wr741nd-v1 $(Device/tplink-4m) BOARDNAME := TL-WR741ND @@ -797,7 +804,7 @@ define Device/tl-wr743nd-v2 TPLINK_HWID := 0x07430002 CONSOLE := ttyATH0,115200 endef -TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v1 tl-wr743nd-v2 +TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 tl-wr740n-v5 tl-wr740n-v6 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v1 tl-wr743nd-v2 define Device/tl-wr841-v1.5 $(Device/tplink-4m) -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From francesco.borromini at inventati.org Tue Apr 12 02:23:10 2016 From: francesco.borromini at inventati.org (Stijn Segers) Date: Tue, 12 Apr 2016 08:23:10 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: Add TP-Link TL-WR740N v6 support to 15.05.1 Message-ID: <1460442190-2096-1-git-send-email-francesco.borromini@inventati.org> This patch adds support for the TP-Link TL-WR740N v6 to OpenWrt Chaos Calmer. Hardware wise, it's very similar to the TL-WR841N v10. See the forum thread [1]. Credit goes to the user 'traveler' who did the legwork and tested builds. Also thanks to Matthias Schiffer for clarifying the DEVICE_PROFILE settings. Signed-off by: Stijn Segers [1]: https://forum.openwrt.org/viewtopic.php?pid=318704 --- target/linux/ar71xx/image/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 80adedb..f533805 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -509,6 +509,13 @@ define Device/tl-wr740n-v5 CONSOLE := ttyATH0,115200 endef +define Device/tl-wr740n-v6 + $(Device/tplink-4mlzma) + BOARDNAME := TL-WR841N-v9 + DEVICE_PROFILE := TLWR740 + TPLINK_HWID := 0x07400006 +endef + define Device/tl-wr741nd-v1 $(Device/tplink-4m) BOARDNAME := TL-WR741ND @@ -546,7 +553,7 @@ define Device/tl-wr743nd-v2 TPLINK_HWID := 0x07430002 CONSOLE := ttyATH0,115200 endef -TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2 +TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr740n-v6 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2 define Device/tl-wr841-v8 $(Device/tplink-4mlzma) -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Tue Apr 12 02:56:59 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Tue, 12 Apr 2016 08:56:59 +0200 Subject: [OpenWrt-Devel] [PATCH 2/3] [rpcd] file: handle return output of b64_decode In-Reply-To: <1460393813-2163-2-git-send-email-luka@openwrt.org> References: <1460393813-2163-1-git-send-email-luka@openwrt.org> <1460393813-2163-2-git-send-email-luka@openwrt.org> Message-ID: Hi Luka, Please use ssize_t instead. Regards, Jo > Am 11.04.2016 um 18:56 schrieb Luka Perkov : > > Solve this compile warning: > > file.c:300:16: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] > if (data_len < 0) > > Signed-off-by: Luka Perkov > --- > file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/file.c b/file.c > index 91a55a1..6ddde32 100644 > --- a/file.c > +++ b/file.c > @@ -271,7 +271,7 @@ rpc_file_write(struct ubus_context *ctx, struct ubus_object *obj, > mode_t prev_mode, mode = 0666; > int fd, rv = 0; > void *data = NULL; > - size_t data_len = 0; > + int data_len = 0; > > blobmsg_parse(rpc_file_rw_policy, __RPC_F_RW_MAX, tb, > blob_data(msg), blob_len(msg)); > -- > 2.8.0 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ldpinney at gmail.com Tue Apr 12 03:55:38 2016 From: ldpinney at gmail.com (L. D. Pinney) Date: Tue, 12 Apr 2016 02:55:38 -0500 Subject: [OpenWrt-Devel] [PATCHv2] ar71xx: Add support for the OMYlink OMY-G1 Message-ID: <1460447738-25651-1-git-send-email-ldpinney@gmail.com> https://wiki.openwrt.org/toh/omylink/omy-g1 http://www.omylink.com/ Signed-off-by: L. D. Pinney --- v2 corrects the Device name in Subject target/linux/ar71xx/base-files/etc/board.d/01_leds | 5 +++ target/linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 ++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/config-4.4 | 1 + target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++++++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ target/linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/generic/profiles/omy.mk | 10 ++++++ target/linux/ar71xx/image/Makefile | 9 ++++- tools/firmware-utils/src/mktplinkfw.c | 1 + 14 files changed, 169 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index b2469bf..4546107 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -398,6 +398,11 @@ om5p-ac) ucidef_set_led_netdev "port1" "port1" "om5pac:blue:lan" "eth0" ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1" ;; +omy-g1) + ucidef_set_led_wlan "wlan" "WLAN" "omy:green:wlan" "phy0tpt" + ucidef_set_led_netdev "wan" "WAN" "omy:green:wan" "eth0" + ucidef_set_led_netdev "lan" "LAN" "omy:green:lan" "eth1" + ;; omy-x1) ucidef_set_led_default "power" "POWER" "omy:green:power" "1" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 8fdfa07..7724a08 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -220,6 +220,7 @@ tl-wr941nd) ;; dir-615-i1 |\ +omy-g1 |\ r6100 |\ smart-300 |\ tl-mr3420-v2 |\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 1f9bd3f..77fa398 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -218,6 +218,9 @@ get_status_led() { om5p-acv2) status_led="om5pac:blue:power" ;; + omy-g1) + status_led="omy:green:wlan" + ;; omy-x1) status_led="omy:green:power" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 3d4541e..0c9dddc 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -123,6 +123,9 @@ tplink_board_detect() { "007260"*) model="TellStick ZNet Lite" ;; + "066601"*) + model="OMYlink OMY-G1" + ;; "066602"*) model="OMYlink OMY-X1" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index d44ece5..5334600 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -340,6 +340,7 @@ platform_check_image() { gl-inet | \ mc-mac1200r | \ minibox-v1 |\ + omy-g1 |\ omy-x1 |\ onion-omega | \ oolite | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index fa98643..40cf453 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -111,6 +111,7 @@ CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y CONFIG_ATH79_MACH_OM5P_AC=y CONFIG_ATH79_MACH_OM5P_ACv2=y +CONFIG_ATH79_MACH_OMY_G1=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index ec04c28..860b1e1 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -114,6 +114,7 @@ CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y CONFIG_ATH79_MACH_OM5P_AC=y CONFIG_ATH79_MACH_OM5P_ACv2=y +CONFIG_ATH79_MACH_OMY_G1=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 8c77645..e6879a9 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -890,6 +890,16 @@ config ATH79_MACH_OM5P_ACv2 select ATH79_DEV_M25P80 select ATH79_DEV_WMAC +config ATH79_MACH_OMY_G1 + bool "OMYlink OMY G1 support" + select SOC_AR934X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_USB + select ATH79_DEV_WMAC + config ATH79_MACH_OMY_X1 bool "OMYlink OMY X1 support" select SOC_AR934X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 862a2e3..b707fb6 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -117,6 +117,7 @@ obj-$(CONFIG_ATH79_MACH_OM2P) += mach-om2p.o obj-$(CONFIG_ATH79_MACH_OM5P) += mach-om5p.o obj-$(CONFIG_ATH79_MACH_OM5P_AC) += mach-om5pac.o obj-$(CONFIG_ATH79_MACH_OM5P_ACv2) += mach-om5pacv2.o +obj-$(CONFIG_ATH79_MACH_OMY_G1) += mach-omy-g1.o obj-$(CONFIG_ATH79_MACH_OMY_X1) += mach-omy-x1.o obj-$(CONFIG_ATH79_MACH_ONION_OMEGA) += mach-onion-omega.o obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c new file mode 100644 index 0000000..25ca27c --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c @@ -0,0 +1,123 @@ +/* + * OMYlink OMY-G1 board support + * + * Copyright (C) 2016 L. D. Pinney + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include + +#include +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define OMY_G1_GPIO_LED_WLAN 13 +#define OMY_G1_GPIO_LED_WAN 18 +#define OMY_G1_GPIO_LED_LAN 19 + +#define OMY_G1_GPIO_USB_POWER 4 + +#define OMY_G1_GPIO_BTN_RESET 17 + +#define OMY_G1_KEYS_POLL_INTERVAL 20 /* msecs */ +#define OMY_G1_KEYS_DEBOUNCE_INTERVAL (3 * OMY_G1_KEYS_POLL_INTERVAL) + +static const char *omy_g1_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data omy_g1_flash_data = { + .part_probes = omy_g1_part_probes, +}; + +static struct gpio_led omy_g1_leds_gpio[] __initdata = { + { + .name = "omy:green:wlan", + .gpio = OMY_G1_GPIO_LED_WLAN, + .active_low = 1, + },{ + .name = "omy:green:wan", + .gpio = OMY_G1_GPIO_LED_WAN, + .active_low = 1, + }, { + .name = "omy:green:lan", + .gpio = OMY_G1_GPIO_LED_LAN, + .active_low = 1, + }, +}; + +static struct gpio_keys_button omy_g1_gpio_keys[] __initdata = { + { + .desc = "Reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = OMY_G1_KEYS_DEBOUNCE_INTERVAL, + .gpio = OMY_G1_GPIO_BTN_RESET, + .active_low = 1, + } +}; + +static void __init omy_g1_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + ath79_gpio_function_setup(AR934X_GPIO_FUNC_JTAG_DISABLE, + AR934X_GPIO_FUNC_CLK_OBS4_EN); + + ath79_register_m25p80(&omy_g1_flash_data); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(omy_g1_leds_gpio), + omy_g1_leds_gpio); + + ath79_register_gpio_keys_polled(1, OMY_G1_KEYS_POLL_INTERVAL, + ARRAY_SIZE(omy_g1_gpio_keys), + omy_g1_gpio_keys); + + ath79_gpio_output_select(OMY_G1_GPIO_USB_POWER, + AR934X_GPIO_OUT_GPIO); + + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_PHY_SWAP); + + ath79_register_mdio(1, 0x0); + + ath79_init_mac(ath79_eth0_data.mac_addr, mac, -1); + ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); + + ath79_switch_data.phy4_mii_en = 1; + ath79_switch_data.phy_poll_mask = BIT(0); + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.phy_mask = BIT(0); + ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev; + ath79_register_eth(0); + + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_register_eth(1); + + ath79_register_wmac(ee, mac); + + ath79_gpio_output_select(OMY_G1_GPIO_USB_POWER, + AR934X_GPIO_OUT_GPIO); + + gpio_request_one(OMY_G1_GPIO_USB_POWER, + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, + "USB power"); + + ath79_register_usb(); +} + +MIPS_MACHINE(ATH79_MACH_OMY_G1, "OMY-G1", "OMYlink OMY-G1", + omy_g1_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 0363c88..bc17e8d 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -117,6 +117,7 @@ enum ath79_mach_type { ATH79_MACH_OM5P_ACv2, /* OpenMesh OM5P-ACv2 */ ATH79_MACH_OM5P_AN, /* OpenMesh OM5P-AN */ ATH79_MACH_OM5P, /* OpenMesh OM5P */ + ATH79_MACH_OMY_G1, /* OMYlink OMY-G1 */ ATH79_MACH_OMY_X1, /* OMYlink OMY-X1 */ ATH79_MACH_ONION_OMEGA, /* ONION OMEGA */ ATH79_MACH_PB42, /* Atheros PB42 */ diff --git a/target/linux/ar71xx/generic/profiles/omy.mk b/target/linux/ar71xx/generic/profiles/omy.mk index 4055dfc..397de54 100644 --- a/target/linux/ar71xx/generic/profiles/omy.mk +++ b/target/linux/ar71xx/generic/profiles/omy.mk @@ -5,6 +5,16 @@ # See /LICENSE for more information. # +define Profile/OMYG1 + NAME:=OMYlink OMY-G1 + PACKAGES:= kmod-usb-core kmod-usb2 +endef + +define Profile/OMYX1/Description + Package set optimized for the OMYlink OMY-G1. +endef +$(eval $(call Profile,OMYG1)) + define Profile/OMYX1 NAME:=OMYlink OMY-X1 PACKAGES:= diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e4e2fcf..2720e49 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -561,13 +561,20 @@ define Device/minibox-v1 endef TARGET_DEVICES += minibox-v1 +define Device/omy-g1 + $(Device/tplink-16mlzma) + BOARDNAME := OMY-G1 + DEVICE_PROFILE := OMYG1 + TPLINK_HWID := 0x06660101 +endef + define Device/omy-x1 $(Device/tplink-8mlzma) BOARDNAME := OMY-X1 DEVICE_PROFILE := OMYX1 TPLINK_HWID := 0x06660201 endef -TARGET_DEVICES += omy-x1 +TARGET_DEVICES += omy-g1 omy-x1 define Device/onion-omega $(Device/tplink-16mlzma) diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index bf7c619..432dce6 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -35,6 +35,7 @@ #define HWID_ANTMINER_S3 0x04440301 #define HWID_GL_INET_V1 0x08000001 #define HWID_GS_OOLITE_V1 0x3C000101 +#define HWID_OMY_G1 0x06660101 #define HWID_OMY_X1 0x06660201 #define HWID_ONION_OMEGA 0x04700001 #define HWID_TL_MR10U_V1 0x00100101 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bapclenet at gmail.com Tue Apr 12 04:27:16 2016 From: bapclenet at gmail.com (Baptiste Clenet) Date: Tue, 12 Apr 2016 10:27:16 +0200 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface Message-ID: Hi, I flashed the current tree on mt7688 board and no interface showed up for wifi. Should I do something? I would like to try the mt76 wifi driver on this board. (I added it with in menuconfig) Cheers, -- Baptiste _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From luka at openwrt.org Tue Apr 12 04:56:21 2016 From: luka at openwrt.org (Luka Perkov) Date: Tue, 12 Apr 2016 10:56:21 +0200 Subject: [OpenWrt-Devel] [PATCH v2 2/3] [rpcd] file: handle return output of b64_decode Message-ID: <1460451381-6261-1-git-send-email-luka@openwrt.org> Solve this compile warning: file.c:300:16: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] if (data_len < 0) Signed-off-by: Luka Perkov --- v1 -> v2: Chage int to ssize_t. --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file.c b/file.c index 91a55a1..6ddde32 100644 --- a/file.c +++ b/file.c @@ -271,7 +271,7 @@ rpc_file_write(struct ubus_context *ctx, struct ubus_object *obj, mode_t prev_mode, mode = 0666; int fd, rv = 0; void *data = NULL; - size_t data_len = 0; + ssize_t data_len = 0; blobmsg_parse(rpc_file_rw_policy, __RPC_F_RW_MAX, tb, blob_data(msg), blob_len(msg)); -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From naobsd at gmail.com Tue Apr 12 05:20:44 2016 From: naobsd at gmail.com (FUKAUMI Naoki) Date: Tue, 12 Apr 2016 09:20:44 +0000 Subject: [OpenWrt-Devel] [PATCH v2] ramips: add support for ELECOM WRH-300CR Message-ID: <1460452844-23099-1-git-send-email-naobsd@gmail.com> ELECOM WRH-300CR is MT7620N based very small Wi-Fi router with 64MiB DDR2 SDRAM, 16MiB SPI Flash, one fast ethernet port, and (internal but easy-to-access) UART. it also has internal USB hub and USB card reader which provide one USB port, one SD card slot, and one microSD card slot. Signed-off-by: YuheiOKAWA Signed-off-by: FUKAUMI Naoki --- Changes in v2: - explain this product a little :) - add an empty line in WRH-300CR.dts (cosmetic, no functional change) target/linux/ramips/base-files/etc/board.d/01_leds | 4 + .../linux/ramips/base-files/etc/board.d/02_network | 3 +- target/linux/ramips/base-files/etc/diag.sh | 3 +- target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/WRH-300CR.dts | 127 +++++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 15 +++ target/linux/ramips/mt7620/profiles/elecom.mk | 18 +++ 8 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 target/linux/ramips/dts/WRH-300CR.dts create mode 100644 target/linux/ramips/mt7620/profiles/elecom.mk diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 5816e60..0ba26d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -264,6 +264,10 @@ whr-600d) wnce2001) set_wifi_led "$board:green:wlan" ;; +wrh-300cr) + set_wifi_led "$board:green:wlan" + ucidef_set_led_netdev "lan" "lan" "$board:green:ethernet" "eth0" + ;; wt3020) ucidef_set_led_default "power" "power" "$board:blue:power" "0" ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 4b65d36..2863b88 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -162,7 +162,8 @@ ramips_setup_interfaces() d105|\ hpm|\ na930|\ - wli-tx4-ag300n) + wli-tx4-ag300n|\ + wrh-300cr) ucidef_set_interface_lan "eth0" ;; e1700|\ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index daa7fb1..31d9646 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -73,7 +73,8 @@ get_status_led() { status_led="$board:green:run" ;; awapn2403|\ - dir-645) + dir-645|\ + wrh-300cr) status_led="$board:green:wps" ;; cf-wr800n|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 5f1df7b..459de6f 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -460,6 +460,9 @@ ramips_board_detect() { *"WR6202") name="wr6202" ;; + *"WRH-300CR") + name="wrh-300cr" + ;; *"WRTNODE") name="wrtnode" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index c329dce..6e287d4 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -135,6 +135,7 @@ platform_check_image() { wnce2001|\ wr512-3gn|\ wr6202|\ + wrh-300cr|\ wrtnode|\ wrtnode2r |\ wrtnode2p |\ diff --git a/target/linux/ramips/dts/WRH-300CR.dts b/target/linux/ramips/dts/WRH-300CR.dts new file mode 100644 index 0000000..79962e9 --- /dev/null +++ b/target/linux/ramips/dts/WRH-300CR.dts @@ -0,0 +1,127 @@ +/dts-v1/; + +/include/ "mt7620n.dtsi" + +/ { + compatible = "elecom,wrh-300cr", "ralink,mt7620n-soc"; + model = "ELECOM WRH-300CR"; + + palmbus at 10000000 { + gpio1: gpio at 638 { + status = "okay"; + }; + + gpio2: gpio at 660 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "mx25l12805d"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "recover"; + reg = <0x50000 0x1c0000>; + read-only; + }; + + partition at 210000 { + label = "firmware"; + reg = <0x210000 0xdf0000>; + }; + }; + }; + }; + + ehci at 101c0000 { + status = "okay"; + }; + + ohci at 101c1000 { + status = "okay"; + }; + + ethernet at 10100000 { + mtd-mac-address = <&factory 0x2e>; + mediatek,portmap = "llllw"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "ephy", "wled"; + ralink,function = "gpio"; + }; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "wrh-300cr:green:wps"; + gpios = <&gpio2 0 1>; + }; + + ethernet { + label = "wrh-300cr:green:ethernet"; + gpios = <&gpio2 3 1>; + }; + + wlan { + label = "wrh-300cr:green:wlan"; + gpios = <&gpio3 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 1 1>; + linux,code = <0x198>; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 1>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 18cd20a..c76e98e 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -64,6 +64,19 @@ endef BuildFirmware/Tplink/squashfs=$(call BuildFirmware/OF/tplink,$(1),$(2),$(3),$(4)) BuildFirmware/Tplink/initramfs=$(call BuildFirmware/OF/tplink/initramfs,$(1),$(2),$(3),$(4)) +define BuildFirmware/WRH-300CR/squashfs + $(call BuildFirmware/Default16M/squashfs,$(1),$(2),$(3)) + cp $(call sysupname,$(1),$(2)) $(KDIR)/v_0.0.0.bin + ( \ + $(STAGING_DIR_HOST)/bin/md5sum $(KDIR)/v_0.0.0.bin | \ + sed 's/ .*//' && \ + echo 458 \ + ) | $(STAGING_DIR_HOST)/bin/md5sum | \ + sed 's/ .*//' > $(KDIR)/v_0.0.0.md5 + $(STAGING_DIR_HOST)/bin/tar -cf $(call imgname,$(1),$(2))-factory.bin -C $(KDIR) v_0.0.0.bin v_0.0.0.md5 +endef +BuildFirmware/WRH-300CR/initramfs=$(call BuildFirmware/Default16M/initramfs,$(1),$(2),$(3)) + Image/Build/Profile/E1700=$(call BuildFirmware/UMedia/$(1),$(1),e1700,E1700,0x013326) ex2700_mtd_size=3866624 @@ -98,6 +111,7 @@ Image/Build/Profile/MLW221=$(call BuildFirmware/Default16M/$(1),$(1),mlw221,MLW2 Image/Build/Profile/MLWG2=$(call BuildFirmware/Default16M/$(1),$(1),mlwg2,MLWG2) Image/Build/Profile/WMR-300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR-300) Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U) +Image/Build/Profile/WRH-300CR=$(call BuildFirmware/WRH-300CR/$(1),$(1),wrh-300cr,WRH-300CR) Image/Build/Profile/WRTNODE=$(call BuildFirmware/Default16M/$(1),$(1),wrtnode,WRTNODE) Image/Build/Profile/WT3020=$(call BuildFirmware/PorayDualSize/$(1),$(1),wt3020,WT3020) Image/Build/Profile/MIWIFI-MINI=$(call BuildFirmware/Default16M/$(1),$(1),miwifi-mini,MIWIFI-MINI) @@ -143,6 +157,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/MLWG2,$(1)) $(call Image/Build/Profile/WMR-300,$(1)) $(call Image/Build/Profile/RT-N14U,$(1)) + $(call Image/Build/Profile/WRH-300CR,$(1)) $(call Image/Build/Profile/WRTNODE,$(1)) $(call Image/Build/Profile/WT3020,$(1)) $(call Image/Build/Profile/MIWIFI-MINI,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/elecom.mk b/target/linux/ramips/mt7620/profiles/elecom.mk new file mode 100644 index 0000000..5c84c92 --- /dev/null +++ b/target/linux/ramips/mt7620/profiles/elecom.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/WRH-300CR + NAME:=ELECOM WRH-300CR + PACKAGES:=\ + kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-usb-storage \ + kmod-scsi-core kmod-fs-ext4 block-mount +endef + +define Profile/WRH-300CR/Description + Package set optimized for the ELECOM WRH-300CR. +endef +$(eval $(call Profile,WRH-300CR)) -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From adam at semicircular.net Tue Apr 12 07:30:27 2016 From: adam at semicircular.net (Adam Kent) Date: Tue, 12 Apr 2016 21:30:27 +1000 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface In-Reply-To: References: Message-ID: Hi Baptiste Which board exactly? You may need to add the "wmac" definition to the relevant dts file. Have a look in target/linux/ramips/dts/.dts and make sure there's this: wmac at 10300000 { status = "okay"; }; - Adam On Tue, Apr 12, 2016 at 6:27 PM, Baptiste Clenet wrote: > Hi, > > I flashed the current tree on mt7688 board and no interface showed up > for wifi. Should I do something? I would like to try the mt76 wifi > driver on this board. (I added it with in menuconfig) > > Cheers, > > -- > Baptiste > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Tue Apr 12 08:16:40 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Tue, 12 Apr 2016 21:16:40 +0900 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex CS-QR10 Message-ID: <1460463400-19192-1-git-send-email-tochiro.srchack@gmail.com> CS-QR10 is MT7620A based IP Camera. the camera and sound does not work with kernel 4.4. - camera chip is sn9c291. - sound chip is wm8960. Signed-off-by: YuheiOKAWA --- target/linux/ramips/base-files/etc/board.d/01_leds | 3 +- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/CS-QR10.dts | 163 +++++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 2 + target/linux/ramips/mt7620/profiles/planex.mk | 19 +++ 8 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/CS-QR10.dts create mode 100644 target/linux/ramips/mt7620/profiles/planex.mk diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 5816e60..e319f36 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -30,7 +30,8 @@ br-6475nd|\ mzk-w300nh2) set_wifi_led "$board:amber:wlan" ;; -a5-v11) +a5-v11|\ +cs-qr10) ucidef_set_led_default "power" "POWER" "$board:red:power" "1" ;; ai-br100) diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 4b65d36..416b13c 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -159,6 +159,7 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9 at eth0" ;; + cs-qr10|\ d105|\ hpm|\ na930|\ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index daa7fb1..233d15c 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -32,6 +32,7 @@ get_status_led() { status_led="$board:green:power" ;; a5-v11|\ + cs-qr10|\ d105|\ dcs-930l-b1|\ ex2700|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 5f1df7b..2df2591 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -88,6 +88,9 @@ ramips_board_detect() { *"CF-WR800N") name="cf-wr800n" ;; + *"CS-QR10") + name="cs-qr10" + ;; *"CY-SWR1100") name="cy-swr1100" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index c329dce..af7fb12 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -34,6 +34,7 @@ platform_check_image() { broadway|\ carambola|\ cf-wr800n|\ + cs-qr10|\ d105|\ dap-1350|\ db-wrt01|\ diff --git a/target/linux/ramips/dts/CS-QR10.dts b/target/linux/ramips/dts/CS-QR10.dts new file mode 100644 index 0000000..08299e3 --- /dev/null +++ b/target/linux/ramips/dts/CS-QR10.dts @@ -0,0 +1,163 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "Planex CS-QR10"; + + palmbus at 10000000 { + gpio0: gpio at 600 { + status = "okay"; + }; + + gpio1: gpio at 638 { + status = "okay"; + }; + + gpio2: gpio at 660 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + i2c at 900 { + status = "okay"; + }; + + i2s: i2s at a00 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pcm_i2s_pins>; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; + }; + + pcm at 2000 { + status = "okay"; + }; + + gdma at 2800 { + status = "okay"; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi refclk", "rgmii1"; + ralink,function = "gpio"; + }; + wdt { + ralink,group = "wdt"; + ralink,function = "wdt refclk"; + }; + }; + }; + + ethernet at 10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; + }; + + gsw at 10110000 { + ralink,port4 = "ephy"; + }; + + sdhci at 10130000 { + status = "okay"; + }; + + ehci at 101c0000 { + status = "okay"; + }; + + ohci at 101c1000 { + status = "okay"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + pcie at 10140000 { + status = "okay"; + }; + + sound { + compatible = "mediatek,mt7620-audio-wm8960"; + model = "mt7620-wm8960"; + i2s-controller = <&i2s>; + audio-routing = + "Ext Spk", "SPK_LP", + "Ext Spk", "SPK_LN", + "Ext Spk", "SPK_RP", + "Ext Spk", "SPK_RN"; + }; + + gpio-leds { + compatible = "gpio-leds"; + + power { + label = "cs-qr10:red:power"; + gpios = <&gpio1 4 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + s1 { + label = "reset"; + gpios = <&gpio1 1 1>; + linux,code = <0x198>; + }; + + s2 { + label = "wps"; + gpios = <&gpio1 3 1>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 18cd20a..2055116 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -82,6 +82,7 @@ whr_1166d_mtd_size=15400960 Image/Build/Profile/WHR1166D=$(call BuildFirmware/CustomFlash/$(1),$(1),whr-1166d,WHR-1166D,$(whr_1166d_mtd_size)) dlink810l_mtd_size=6881280 Image/Build/Profile/CF-WR800N=$(call BuildFirmware/Default8M/$(1),$(1),cf-wr800n,CF-WR800N) +Image/Build/Profile/CS-QR10=$(call BuildFirmware/Default8M/$(1),$(1),cs-qr10,CS-QR10) Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l,DIR-810L,$(dlink810l_mtd_size)) na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) @@ -124,6 +125,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/MT7620a_V22SG,$(1)) $(call Image/Build/Profile/AI-BR100,$(1)) $(call Image/Build/Profile/CF-WR800N,$(1)) + $(call Image/Build/Profile/CS-QR10,$(1)) $(call Image/Build/Profile/RP-N53,$(1)) $(call Image/Build/Profile/DIR-810L,$(1)) $(call Image/Build/Profile/WHR300HP2,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk new file mode 100644 index 0000000..9d99cac --- /dev/null +++ b/target/linux/ramips/mt7620/profiles/planex.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/CS-QR10 + NAME:=Planex CS-QR10 + PACKAGES:=\ + kmod-usb-core kmod-usb2 kmod-usb-ohci \ + kmod-i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk \ + kmod-sdhci-mt7620 +endef + +define Profile/CS-QR10/Description + Package set optimized for the Planex CS-QR10. +endef +$(eval $(call Profile,CS-QR10)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From michal.kazior at tieto.com Tue Apr 12 08:49:15 2016 From: michal.kazior at tieto.com (Michal Kazior) Date: Tue, 12 Apr 2016 14:49:15 +0200 Subject: [OpenWrt-Devel] [RFC relayd 1/2] relayd: add ipv6 support In-Reply-To: <8737qsji0z.fsf@nemi.mork.no> References: <1460380494-22667-1-git-send-email-michal.kazior@tieto.com> <1460380494-22667-2-git-send-email-michal.kazior@tieto.com> <8737qsji0z.fsf@nemi.mork.no> Message-ID: On 11 April 2016 at 17:13, Bj?rn Mork wrote: > Michal Kazior writes: > >> This adds basic IPv6 support framework. Things >> like, e.g. DHCPv6 will not work (yeT) though >> because link-local support requires additional >> changes (including kernel). > > Could the DHCPv6 support be implemented as an LDRA instead? Ref > https://tools.ietf.org/html/rfc6221 I guess it could but I didn't really consider it because my use case involves link-local anyway. If link-local routing works you don't need any extra logic to get DHCPv6 working. Micha? _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jj at borkum.net Tue Apr 12 09:56:47 2016 From: jj at borkum.net (joerg jungermann) Date: Tue, 12 Apr 2016 15:56:47 +0200 Subject: [OpenWrt-Devel] [PATCH] remove .git files from images Message-ID: <20160412135647.GC26082@borkum.net> If you have your ./files/ directory stored in a git repository, the .git will be included into images using precious space. This patch removes .git directories before packing images. Signed-off-by: Joerg Jungermann diff --git a/package/Makefile b/package/Makefile index c97e2c1..e0bd75b 100644 --- a/package/Makefile +++ b/package/Makefile @@ -123,6 +123,7 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install $(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(TARGET_DIR)/usr/lib/opkg/status) @-find $(TARGET_DIR) -name CVS | $(XARGS) rm -rf @-find $(TARGET_DIR) -name .svn | $(XARGS) rm -rf + @-find $(TARGET_DIR) -name .git | $(XARGS) rm -rf @-find $(TARGET_DIR) -name '.#*' | $(XARGS) rm -f rm -f $(TARGET_DIR)/usr/lib/opkg/info/*.postinst* rm -f $(TARGET_DIR)/usr/lib/opkg/info/*.prerm* -- Joerg Jungermann _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Tue Apr 12 11:13:21 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Tue, 12 Apr 2016 17:13:21 +0200 Subject: [OpenWrt-Devel] rsync mirror of download.openwrt.org ? In-Reply-To: <570C229C.3090209@posteo.net> References: <1458393048.27437.162.camel@guerby.net> <56ED668A.5090404@openwrt.org> <1458928944.27437.306.camel@guerby.net> <1460411691.25322.161.camel@guerby.net> <570C229C.3090209@posteo.net> Message-ID: <570D1091.2090103@openwrt.org> Hi Daniel, the entire downloads.openwrt.org is around 720GB while the 15.05.1 release is 36GB in total. Regards, Jo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dgcbueu at gmail.com Tue Apr 12 11:25:49 2016 From: dgcbueu at gmail.com (dani) Date: Tue, 12 Apr 2016 17:25:49 +0200 Subject: [OpenWrt-Devel] [PATCH v2] brcm63xx: implement gpio to irq Message-ID: <15381934.EokKA9UbKq@tool> Implement "to_irq" in the GPIO driver. Some GPIOs in bcm63xx have IRQs. They are known in this target as external IRQs. This patch just adds the function "to_irq" for allowing to use the generic GPIO lib function gpio_to_irq(). This function just returns the IRQ number at the GPIO line. Signed-off-by: Daniel Gonzalez --- change in v2: Use a reverse table to get the IRQs later with a loop. Use ngpios instead label to know if we are in the 2nd gpio chip There wasn't anything wrong with the v1 patch. This one is a bit more sophisticated, and it might help if we wanted to integrate DTS stuff. --- diff --git a/target/linux/brcm63xx/patches-4.1/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch b/target/linux/brcm63xx/patches-4.1/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch index f80818d..b4468c9 100644 --- a/target/linux/brcm63xx/patches-4.1/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch +++ b/target/linux/brcm63xx/patches-4.1/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch @@ -40,7 +40,7 @@ Signed-off-by: Jonas Gorski obj-$(CONFIG_GPIO_CS5535) += gpio-cs5535.o --- /dev/null +++ b/drivers/gpio/gpio-bcm63xx.c -@@ -0,0 +1,122 @@ +@@ -0,0 +1,178 @@ +/* + * Driver for BCM63XX memory-mapped GPIO controllers, based on + * Generic driver for memory-mapped GPIO controllers. @@ -75,6 +75,58 @@ Signed-off-by: Jonas Gorski +#include +#include + ++#include ++ ++static int bcm63xx_gpio_to_irq(struct gpio_chip *chip, unsigned gpio) ++{ ++ unsigned int i; ++ int irq2gpio[6] = { -1, -1, -1, -1, -1, -1 }; ++ ++ switch (bcm63xx_get_cpu_id()) { ++ case BCM6328_CPU_ID: ++ irq2gpio[0] = 23; ++ irq2gpio[1] = 24; ++ irq2gpio[2] = 15; ++ irq2gpio[3] = 12; ++ break; ++ case BCM6348_CPU_ID: ++ case BCM63268_CPU_ID: ++ if (chip->ngpio < 32) ++ { ++ irq2gpio[0] = 0; ++ irq2gpio[1] = 1; ++ irq2gpio[2] = 2; ++ irq2gpio[3] = 3; ++ } ++ else ++ return -EINVAL; ++ break; ++ case BCM6358_CPU_ID: ++ case BCM6368_CPU_ID: ++ if (chip->ngpio < 32) ++ { ++ irq2gpio[0] = 2; ++ irq2gpio[1] = 3; ++ irq2gpio[2] = 4; ++ irq2gpio[3] = 5; ++ irq2gpio[4] = 0; ++ irq2gpio[5] = 1; ++ } ++ else ++ return -EINVAL; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ for (i = 0; i < 6; i++) { ++ if (irq2gpio[i] == gpio) ++ return i + IRQ_EXTERNAL_BASE; ++ } ++ ++ return -EINVAL; ++} ++ +static int bcm63xx_gpio_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; @@ -85,6 +137,7 @@ Signed-off-by: Jonas Gorski + int err; + struct bgpio_chip *bgc; + struct bgpio_pdata *pdata = dev_get_platdata(dev); ++ struct gpio_chip *chip; + + dirout_r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + dat_r = platform_get_resource(pdev, IORESOURCE_MEM, 1); @@ -131,8 +184,11 @@ Signed-off-by: Jonas Gorski + if (pdata->ngpio > 0) + bgc->gc.ngpio = pdata->ngpio; + } ++ ++ chip = &bgc->gc; ++ chip->to_irq = bcm63xx_gpio_to_irq; + -+ return gpiochip_add(&bgc->gc); ++ return gpiochip_add(chip); +} + +static int bcm63xx_gpio_remove(struct platform_device *pdev) @@ -163,3 +219,14 @@ Signed-off-by: Jonas Gorski +MODULE_DESCRIPTION("Driver for BCM63XX memory-mapped GPIO controllers"); +MODULE_AUTHOR("Jonas Gorski "); +MODULE_LICENSE("GPL"); +--- a/arch/mips/include/asm/mach-bcm63xx/gpio.h ++++ b/arch/mips/include/asm/mach-bcm63xx/gpio.h +@@ -3,7 +3,7 @@ + + #include + +-#define gpio_to_irq(gpio) -1 ++#define gpio_to_irq __gpio_to_irq + + #define gpio_get_value __gpio_get_value + #define gpio_set_value __gpio_set_value diff --git a/target/linux/brcm63xx/patches-4.4/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch b/target/linux/brcm63xx/patches-4.4/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch index 92b0e71..d914f0b 100644 --- a/target/linux/brcm63xx/patches-4.4/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch +++ b/target/linux/brcm63xx/patches-4.4/374-gpio-add-a-simple-GPIO-driver-for-bcm63xx.patch @@ -40,7 +40,7 @@ Signed-off-by: Jonas Gorski obj-$(CONFIG_GPIO_CLPS711X) += gpio-clps711x.o --- /dev/null +++ b/drivers/gpio/gpio-bcm63xx.c -@@ -0,0 +1,122 @@ +@@ -0,0 +1,178 @@ +/* + * Driver for BCM63XX memory-mapped GPIO controllers, based on + * Generic driver for memory-mapped GPIO controllers. @@ -75,6 +75,58 @@ Signed-off-by: Jonas Gorski +#include +#include + ++#include ++ ++static int bcm63xx_gpio_to_irq(struct gpio_chip *chip, unsigned gpio) ++{ ++ unsigned int i; ++ int irq2gpio[6] = { -1, -1, -1, -1, -1, -1 }; ++ ++ switch (bcm63xx_get_cpu_id()) { ++ case BCM6328_CPU_ID: ++ irq2gpio[0] = 23; ++ irq2gpio[1] = 24; ++ irq2gpio[2] = 15; ++ irq2gpio[3] = 12; ++ break; ++ case BCM6348_CPU_ID: ++ case BCM63268_CPU_ID: ++ if (chip->ngpio < 32) ++ { ++ irq2gpio[0] = 0; ++ irq2gpio[1] = 1; ++ irq2gpio[2] = 2; ++ irq2gpio[3] = 3; ++ } ++ else ++ return -EINVAL; ++ break; ++ case BCM6358_CPU_ID: ++ case BCM6368_CPU_ID: ++ if (chip->ngpio < 32) ++ { ++ irq2gpio[0] = 2; ++ irq2gpio[1] = 3; ++ irq2gpio[2] = 4; ++ irq2gpio[3] = 5; ++ irq2gpio[4] = 0; ++ irq2gpio[5] = 1; ++ } ++ else ++ return -EINVAL; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ for (i = 0; i < 6; i++) { ++ if (irq2gpio[i] == gpio) ++ return i + IRQ_EXTERNAL_BASE; ++ } ++ ++ return -EINVAL; ++} ++ +static int bcm63xx_gpio_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; @@ -85,6 +137,7 @@ Signed-off-by: Jonas Gorski + int err; + struct bgpio_chip *bgc; + struct bgpio_pdata *pdata = dev_get_platdata(dev); ++ struct gpio_chip *chip; + + dirout_r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + dat_r = platform_get_resource(pdev, IORESOURCE_MEM, 1); @@ -131,8 +184,11 @@ Signed-off-by: Jonas Gorski + if (pdata->ngpio > 0) + bgc->gc.ngpio = pdata->ngpio; + } ++ ++ chip = &bgc->gc; ++ chip->to_irq = bcm63xx_gpio_to_irq; + -+ return gpiochip_add(&bgc->gc); ++ return gpiochip_add(chip); +} + +static int bcm63xx_gpio_remove(struct platform_device *pdev) @@ -163,3 +219,14 @@ Signed-off-by: Jonas Gorski +MODULE_DESCRIPTION("Driver for BCM63XX memory-mapped GPIO controllers"); +MODULE_AUTHOR("Jonas Gorski "); +MODULE_LICENSE("GPL"); +--- a/arch/mips/include/asm/mach-bcm63xx/gpio.h ++++ b/arch/mips/include/asm/mach-bcm63xx/gpio.h +@@ -3,7 +3,7 @@ + + #include + +-#define gpio_to_irq(gpio) -1 ++#define gpio_to_irq __gpio_to_irq + + #define gpio_get_value __gpio_get_value + #define gpio_set_value __gpio_set_value _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.petre at posteo.net Tue Apr 12 11:31:11 2016 From: daniel.petre at posteo.net (Daniel Petre) Date: Tue, 12 Apr 2016 18:31:11 +0300 Subject: [OpenWrt-Devel] rsync mirror of download.openwrt.org ? In-Reply-To: <570D1091.2090103@openwrt.org> References: <1458393048.27437.162.camel@guerby.net> <56ED668A.5090404@openwrt.org> <1458928944.27437.306.camel@guerby.net> <1460411691.25322.161.camel@guerby.net> <570C229C.3090209@posteo.net> <570D1091.2090103@openwrt.org> Message-ID: <570D14BF.9060208@posteo.net> On 04/12/2016 06:13 PM, Jo-Philipp Wich wrote: > Hi Daniel, > > the entire downloads.openwrt.org is around 720GB while the 15.05.1 > release is 36GB in total. Thanks for replying. I see i have like 800 GB left on mirrors.linux.ro but i can find more space soon. Is there official openwrt mirroring instructions or it is just up to me how i download all the files? Thanks! > > Regards, > Jo > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Tue Apr 12 11:33:17 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Tue, 12 Apr 2016 17:33:17 +0200 Subject: [OpenWrt-Devel] rsync mirror of download.openwrt.org ? In-Reply-To: <570D14BF.9060208@posteo.net> References: <1458393048.27437.162.camel@guerby.net> <56ED668A.5090404@openwrt.org> <1458928944.27437.306.camel@guerby.net> <1460411691.25322.161.camel@guerby.net> <570C229C.3090209@posteo.net> <570D1091.2090103@openwrt.org> <570D14BF.9060208@posteo.net> Message-ID: <570D153D.7000001@openwrt.org> Hi Dape, you need to ask Kaloz to setup rsync access for you I guess. Regards, Jo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.petre at posteo.net Tue Apr 12 11:39:07 2016 From: daniel.petre at posteo.net (Daniel Petre) Date: Tue, 12 Apr 2016 18:39:07 +0300 Subject: [OpenWrt-Devel] rsync mirror of download.openwrt.org ? In-Reply-To: <570D153D.7000001@openwrt.org> References: <1458393048.27437.162.camel@guerby.net> <56ED668A.5090404@openwrt.org> <1458928944.27437.306.camel@guerby.net> <1460411691.25322.161.camel@guerby.net> <570C229C.3090209@posteo.net> <570D1091.2090103@openwrt.org> <570D14BF.9060208@posteo.net> <570D153D.7000001@openwrt.org> Message-ID: <570D169B.8000604@posteo.net> On 04/12/2016 06:33 PM, Jo-Philipp Wich wrote: > Hi Dape, > > you need to ask Kaloz to setup rsync access for you I guess. Not sure i have his e-mail at hand but would be cool if he can white list 62.231.75.130 so i can start rsync already and get back tomorrow with the url details for the mirror offered. Thanks! > > Regards, > Jo > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Tue Apr 12 17:01:00 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Tue, 12 Apr 2016 23:01:00 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: use new image build process for some images Message-ID: <1460494860-22155-1-git-send-email-hauke@hauke-m.de> This adds for some easy images the new build process. This was only tested on some TP-Link devices, please test. Signed-off-by: Hauke Mehrtens --- target/linux/lantiq/image/Makefile | 185 +++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 90 deletions(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index c3cb48a..d863a91 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010-2012 OpenWrt.org +# Copyright (C) 2010-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -10,6 +10,9 @@ JFFS2_BLOCKSIZE = 64k 128k 256k +KERNEL_LOADADDR = 0x80002000 +KERNEL_ENTRY = 0x80a00000 + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk @@ -269,81 +272,103 @@ endif endef -ifeq ($(CONFIG_TARGET_lantiq_falcon),y) - -Image/BuildKernel/Profile/EASY98000NOR=$(call Image/BuildKernel/Template,EASY98000NOR) -Image/Build/Profile/EASY98000NOR=$(call Image/Build/$(1),$(1),EASY98000NOR) - -Image/BuildKernel/Profile/EASY98000SFLASH=$(call Image/BuildKernel/Template,EASY98000SFLASH) -Image/Build/Profile/EASY98000SFLASH=$(call Image/Build/$(1),$(1),EASY98000SFLASH) - -endif - - -ifeq ($(CONFIG_TARGET_lantiq_ase),y) - -Image/BuildKernel/Profile/DGN1000B=$(call Image/BuildKernel/Template,DGN1000B) -Image/Build/Profile/DGN1000B=$(call Image/Build/$(1),$(1),DGN1000B) - -endif - +### Kernel scripts ### +define Build/append-dtb + $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb) + cat $@.dtb >> $@ +endef -ifeq ($(CONFIG_TARGET_lantiq_xway),y) +define Build/tplink-fw + mktplinkfw2 -c -B $(BOARD_ID) -s \ + -k $@ -o $@.new + mv $@.new $@ +endef -# Danube -Image/BuildKernel/Profile/BTHOMEHUBV2B=$(call Image/BuildKernel/Template,BTHOMEHUBV2B) -Image/Build/Profile/BTHOMEHUBV2B=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV2B) +define Build/mktplinkfw2 + mktplinkfw2 -B $(BOARD_ID) -s -a 0x4 -j \ + -k $(word 1,$^) -r $(word 2,$^) \ + -o $@ +endef -Image/BuildKernel/Profile/EASY50712=$(call Image/BuildKernel/Template,EASY50712) -Image/Build/Profile/EASY50712=$(call Image/Build/$(1),$(1),EASY50712) -Image/BuildKernel/Profile/ACMP252=$(call Image/BuildKernel/Template,ACMP252) -Image/Build/Profile/ACMP252=$(call Image/Build/$(1),$(1),ACMP252) +# Shared device definition: applies to every defined device +define Device/Default + PROFILES = Default $$(DEVICE_PROFILE) + KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts) + KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma + FILESYSTEMS := squashfs + DEVICE_PROFILE := + DEVICE_DTS := +endef +DEVICE_VARS += BOARD_ID DEVICE_PROFILE DEVICE_DTS -Image/BuildKernel/Profile/ARV4510PW=$(call Image/BuildKernel/Template,ARV4510PW) -Image/Build/Profile/ARV4510PW=$(call Image/Build/$(1),$(1),ARV4510PW) +define Device/lantiqTpLink + KERNEL := kernel-bin | append-dtb | lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-fw + IMAGES := tplink + IMAGE/tplink := mktplinkfw2 +endef -Image/BuildKernel/Profile/ARV4525PW=$(call Image/BuildKernel/Template,ARV4525PW) -Image/Build/Profile/ARV4525PW=$(call Image/Build/$(1),$(1),ARV4525PW) +define lantiqTpLink + define Device/$(1) + $$(Device/lantiqTpLink) + DEVICE_PROFILE := $(1) + DEVICE_DTS := $(1) + BOARD_ID := $(2) + endef + TARGET_DEVICES += $(1) +endef -Image/BuildKernel/Profile/ARV7525PW=$(call Image/BuildKernel/Template,ARV7525PW) -Image/Build/Profile/ARV7525PW=$(call Image/Build/$(1),$(1),ARV7525PW) +define lantiqImage + define Device/$(1) + $$(Device/lantiqImage) + DEVICE_PROFILE := $(1) + DEVICE_DTS := $(1) + endef + TARGET_DEVICES += $(1) +endef -Image/BuildKernel/Profile/ARV4518PWR01=$(call Image/BuildKernel/Template,ARV4518PWR01) -Image/Build/Profile/ARV4518PWR01=$(call Image/Build/$(1),$(1),ARV4518PWR01) -Image/BuildKernel/Profile/ARV4518PWR01A=$(call Image/BuildKernel/Template,ARV4518PWR01A) -Image/Build/Profile/ARV4518PWR01A=$(call Image/Build/$(1),$(1),ARV4518PWR01A) +ifeq ($(CONFIG_TARGET_lantiq_falcon),y) -Image/BuildKernel/Profile/ARV4519PW=$(call Image/BuildKernel/Template,ARV4519PW) -Image/Build/Profile/ARV4519PW=$(call Image/Build/$(1),$(1),ARV4519PW) +$(eval $(call lantiqImage,EASY98000NOR)) +$(eval $(call lantiqImage,EASY98000SFLASH)) -Image/BuildKernel/Profile/ARV4520PW=$(call Image/BuildKernel/Template,ARV4520PW) -Image/Build/Profile/ARV4520PW=$(call Image/Build/$(1),$(1),ARV4520PW) +endif -Image/BuildKernel/Profile/ARV452CQW=$(call Image/BuildKernel/Template,ARV452CQW) -Image/Build/Profile/ARV452CQW=$(call Image/Build/$(1),$(1),ARV452CQW) -Image/BuildKernel/Profile/ARV7510PW22=$(call Image/BuildKernel/Template,ARV7510PW22) -Image/Build/Profile/ARV7510PW22=$(call Image/Build/$(1),$(1),ARV7510PW22) +ifeq ($(CONFIG_TARGET_lantiq_ase),y) -Image/BuildKernel/Profile/ARV7518PW=$(call Image/BuildKernel/Template,ARV7518PW) -Image/Build/Profile/ARV7518PW=$(call Image/Build/$(1),$(1),ARV7518PW) +$(eval $(call lantiqImage,DGN1000B)) -Image/BuildKernel/Profile/ARV7519PW=$(call Image/BuildKernel/Template,ARV7519PW) -Image/Build/Profile/ARV7519PW=$(call Image/Build/$(1),$(1),ARV7519PW) +endif -Image/BuildKernel/Profile/ARV752DPW=$(call Image/BuildKernel/Template,ARV752DPW) -Image/Build/Profile/ARV752DPW=$(call Image/Build/$(1),$(1),ARV752DPW) -Image/BuildKernel/Profile/ARV752DPW22=$(call Image/BuildKernel/Template,ARV752DPW22) -Image/Build/Profile/ARV752DPW22=$(call Image/Build/$(1),$(1),ARV752DPW22) +ifeq ($(CONFIG_TARGET_lantiq_xway),y) -Image/BuildKernel/Profile/ARV8539PW22=$(call Image/BuildKernel/Template,ARV8539PW22) -Image/Build/Profile/ARV8539PW22=$(call Image/Build/$(1),$(1),ARV8539PW22) +# Danube +Image/BuildKernel/Profile/BTHOMEHUBV2B=$(call Image/BuildKernel/Template,BTHOMEHUBV2B) +Image/Build/Profile/BTHOMEHUBV2B=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV2B) -Image/BuildKernel/Profile/GIGASX76X=$(call Image/BuildKernel/Template,GIGASX76X) -Image/Build/Profile/GIGASX76X=$(call Image/Build/$(1),$(1),GIGASX76X) +$(eval $(call lantiqImage,EASY50712)) +$(eval $(call lantiqImage,ACMP252)) +$(eval $(call lantiqImage,ARV4510PW)) +$(eval $(call lantiqImage,ARV4525PW)) +$(eval $(call lantiqImage,ARV7525PW)) +$(eval $(call lantiqImage,ARV4518PWR01)) +$(eval $(call lantiqImage,ARV4518PWR01A)) +$(eval $(call lantiqImage,ARV4519PW)) +$(eval $(call lantiqImage,ARV4520PW)) +$(eval $(call lantiqImage,ARV452CQW)) +$(eval $(call lantiqImage,ARV7510PW22)) +$(eval $(call lantiqImage,ARV7518PW)) +$(eval $(call lantiqImage,ARV7519PW)) +$(eval $(call lantiqImage,ARV752DPW)) +$(eval $(call lantiqImage,ARV752DPW22)) +$(eval $(call lantiqImage,ARV8539PW22)) +$(eval $(call lantiqImage,GIGASX76X)) # AR9 @@ -356,23 +381,15 @@ Image/Build/Profile/DGN3500=$(call Image/BuildDGN3500/$(1),$(1),DGN3500) Image/BuildKernel/Profile/DGN3500B=$(call Image/BuildKernel/Template,DGN3500B) Image/Build/Profile/DGN3500B=$(call Image/BuildDGN3500B/$(1),$(1),DGN3500B) -Image/BuildKernel/Profile/WBMRA=$(call Image/BuildKernel/Template,WBMR) -Image/Build/Profile/WBMRA=$(call Image/Build/$(1),$(1),WBMR) - -Image/BuildKernel/Profile/WBMRB=$(call Image/BuildKernel/Template,WBMR) -Image/Build/Profile/WBMRB=$(call Image/Build/$(1),$(1),WBMR) +$(eval $(call lantiqImage,WBMRA)) +$(eval $(call lantiqImage,WBMRB)) Image/BuildKernel/Profile/FRITZ7320=$(call Image/BuildKernelEVA/Template,FRITZ7320) Image/Build/Profile/FRITZ7320=$(call Image/BuildEVA/$(1),$(1),FRITZ7320) -Image/BuildKernel/Profile/GR7000=$(call Image/BuildKernel/Template,GR7000) -Image/Build/Profile/GR7000=$(call Image/Build/$(1),$(1),GR7000) - -Image/BuildKernel/Profile/H201L=$(call Image/BuildKernel/Template,H201L) -Image/Build/Profile/H201L=$(call Image/Build/$(1),$(1),H201L) - -Image/BuildKernel/Profile/P2601HNFX=$(call Image/BuildKernel/Template,P2601HNFX) -Image/Build/Profile/P2601HNFX=$(call Image/Build/$(1),$(1),P2601HNFX) +$(eval $(call lantiqImage,GR7000)) +$(eval $(call lantiqImage,H201L)) +$(eval $(call lantiqImage,P2601HNFX)) endif @@ -386,17 +403,13 @@ 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) +$(eval $(call lantiqImage,ARV7519RW22)) Image/BuildKernel/Profile/BTHOMEHUBV5A=$(call Image/BuildKernel/Template,BTHOMEHUBV5A) Image/Build/Profile/BTHOMEHUBV5A=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV5A) -Image/BuildKernel/Profile/EASY80920NAND=$(call Image/BuildKernel/Template,EASY80920NAND) -Image/Build/Profile/EASY80920NAND=$(call Image/Build/$(1),$(1),EASY80920NAND) - -Image/BuildKernel/Profile/EASY80920NOR=$(call Image/BuildKernel/Template,EASY80920NOR) -Image/Build/Profile/EASY80920NOR=$(call Image/Build/$(1),$(1),EASY80920NOR) +$(eval $(call lantiqImage,EASY80920NAND)) +$(eval $(call lantiqImage,EASY80920NOR)) Image/BuildKernel/Profile/FRITZ3370=$(call Image/BuildKernelEVA/Template,FRITZ3370) Image/Build/Profile/FRITZ3370=$(call Image/BuildEVA/$(1),$(1),FRITZ3370) @@ -407,23 +420,15 @@ Image/Build/Profile/VG3503J=$(call Image/BuildLoader/$(1),$(1),VG3503J) Image/BuildKernel/Profile/VG3503J_V2=$(call Image/BuildKernelLoader/Template,VG3503J_V2) Image/Build/Profile/VG3503J_V2=$(call Image/BuildLoader/$(1),$(1),VG3503J_V2) -Image/BuildKernel/Profile/TDW8970=$(call Image/BuildKernelTPLink/Template,TDW8970,TD-W8970v1,$(1)) -Image/Build/Profile/TDW8970=$(call Image/BuildTPLink/$(1),$(1),TDW8970,TD-W8970v1) - -Image/BuildKernel/Profile/TDW8980=$(call Image/BuildKernelTPLink/Template,TDW8980,TD-W8980v1,$(1)) -Image/Build/Profile/TDW8980=$(call Image/BuildTPLink/$(1),$(1),TDW8980,TD-W8980v1) - -Image/BuildKernel/Profile/VR200v=$(call Image/BuildKernelTPLink/Template,VR200v,ArcherVR200V,$(1)) -Image/Build/Profile/VR200v=$(call Image/BuildTPLink/$(1),$(1),VR200v,ArcherVR200V) - -Image/BuildKernel/Profile/VGV7510KW22NOR=$(call Image/BuildKernel/Template,VGV7510KW22NOR,$(1)) -Image/Build/Profile/VGV7510KW22NOR=$(call Image/Build/$(1),$(1),VGV7510KW22NOR) +$(eval $(call lantiqTpLink,TDW8970,TD-W8970v1)) +$(eval $(call lantiqTpLink,TDW8980,TD-W8980v1)) +$(eval $(call lantiqTpLink,VR200v,ArcherVR200V)) +$(eval $(call lantiqImage,VGV7510KW22NOR)) Image/BuildKernel/Profile/VGV7510KW22BRN=$(call Image/BuildKernel/Template,VGV7510KW22BRN,$(1)) Image/Build/Profile/VGV7510KW22BRN=$(call Image/Build/$(1),$(1),VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7,$(1)) -Image/BuildKernel/Profile/VGV7519NOR=$(call Image/BuildKernel/Template,VGV7519NOR,$(1)) -Image/Build/Profile/VGV7519NOR=$(call Image/Build/$(1),$(1),VGV7519NOR) +$(eval $(call lantiqImage,VGV7519NOR)) Image/BuildKernel/Profile/VGV7519BRN=$(call Image/BuildKernel/Template,VGV7519BRN,$(1)) Image/Build/Profile/VGV7519BRN=$(call Image/Build/$(1),$(1),VGV7519BRN,5D00008000,0x12345678,0x2083b8ed,$(1)) -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From naobsd at gmail.com Wed Apr 13 00:48:58 2016 From: naobsd at gmail.com (Naoki FUKAUMI) Date: Wed, 13 Apr 2016 13:48:58 +0900 Subject: [OpenWrt-Devel] [PATCH v2] ramips: add support for ELECOM WRH-300CR In-Reply-To: <1460452844-23099-1-git-send-email-naobsd@gmail.com> References: <1460452844-23099-1-git-send-email-naobsd@gmail.com> Message-ID: hi, On Tue, Apr 12, 2016 at 6:20 PM, FUKAUMI Naoki wrote: > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network > index 4b65d36..2863b88 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -162,7 +162,8 @@ ramips_setup_interfaces() > d105|\ > hpm|\ > na930|\ > - wli-tx4-ag300n) > + wli-tx4-ag300n|\ > + wrh-300cr) > ucidef_set_interface_lan "eth0" > ;; > e1700|\ I want to change this part as like as follows, + wrh-300cr) + ucidef_add_switch "switch0" + ucidef_add_switch_attr "switch0" "enable" "false" + ucidef_set_interface_lan "eth0" + ;; /etc/config/network is fine with this change, config switch option name 'switch0' option reset '1' option enable_vlan '0' but, mysteriously, following LED settings are gone from /etc/config/system :( config led 'led_wifi_led' option name 'wifi' option sysfs 'wrh-300cr:green:wlan' option trigger 'netdev' option mode 'link tx rx' option dev 'wlan0' config led 'led_lan' option name 'lan' option sysfs 'wrh-300cr:green:ethernet' option trigger 'netdev' option mode 'link tx rx' option dev 'eth0' I'm very sure that LED settings are fine without this change. (i.e. v2 is fine for LED) any idea? ---- I made backported patch for 15.05 too. following lines work fine. + wrh-300cr) + ucidef_add_switch "switch0" "1" "0" + ucidef_set_interface_lan "eth0" + ;; this change is required for 15.05 because switch0 vlan is enabled by default in 15.05. on _current_ trunk, switch0 vlan is disabled, so I can give up this change. but I'm not sure it will never be changed. ---- by the way, in https://dev.openwrt.org/changeset/47720, why ucidef_add_switch "switch0" "1" "0" is converted into ucidef_add_switch_attr "switch0" "reset" "false" ? Regards, _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From nemesis at ninux.org Wed Apr 13 06:54:59 2016 From: nemesis at ninux.org (Nemesis) Date: Wed, 13 Apr 2016 12:54:59 +0200 Subject: [OpenWrt-Devel] [UCI] uci import -m duplicates list options Message-ID: <570E2583.2070108@ninux.org> Hi, I've incurred inweird behaviour when using the import feature of the uci toolwhich seems to cause duplicates whenimporting configuration files that have "list" settings. To test this you can try to create a file in /tmp/network: config interface 'lan' list ipaddr '192.168.99.1/24' and then import it with: uci import -m -f /tmp/network network uci commit network then import it again: uci import -m -f /tmp/network network uci commit network results in: config interface 'lan' list ipaddr '192.168.99.1/24' list ipaddr '192.168.99.1/24' two questions: * is this intended behaviour or is it a bug? * can something like this break the configuration or OpenWRT will select just the last one? Thanks Federico -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From yszhou4tech at gmail.com Wed Apr 13 07:33:25 2016 From: yszhou4tech at gmail.com (Yousong Zhou) Date: Wed, 13 Apr 2016 19:33:25 +0800 Subject: [OpenWrt-Devel] [UCI] uci import -m duplicates list options In-Reply-To: <570E2583.2070108@ninux.org> References: <570E2583.2070108@ninux.org> Message-ID: On 13 April 2016 at 18:54, Nemesis wrote: > Hi, > > I've incurred in weird behaviour when using the import feature of the uci > tool which seems to cause duplicates when importing configuration files that > have "list" settings. > > To test this you can try to create a file in /tmp/network: > > config interface 'lan' > list ipaddr '192.168.99.1/24' > > and then import it with: > > uci import -m -f /tmp/network network > uci commit network > > then import it again: > > uci import -m -f /tmp/network network > uci commit network > > results in: > > config interface 'lan' > list ipaddr '192.168.99.1/24' > list ipaddr '192.168.99.1/24' > > two questions: > > is this intended behaviour or is it a bug? > can something like this break the configuration or OpenWRT will select just > the last one? > > Thanks > Federico There is currently no rule against duplicate entries in list type options and there may exist a situation where values in a list are not unique to each other. So I guess the result is expected. Regards, yousong > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zefir.kurtisi at neratec.com Wed Apr 13 08:26:05 2016 From: zefir.kurtisi at neratec.com (Zefir Kurtisi) Date: Wed, 13 Apr 2016 14:26:05 +0200 Subject: [OpenWrt-Devel] [PATCH] procd: restrict ujail to supported platforms Message-ID: <1460550365-14296-1-git-send-email-zefir.kurtisi@neratec.com> ujail can be selected on e.g. PowerPC platforms, which currently causes the procd build to fail: ./trace/trace.c:48:2: error: #error tracing is not supported on this architecture #error tracing is not supported on this architecture ^ ./trace/trace.c: In function 'tracer_cb': ./trace/trace.c:128:50: error: 'reg_syscall_nr' undeclared (first use in this function) int syscall = ptrace(PTRACE_PEEKUSER, c->pid, reg_syscall_nr); ^ This patch restricts ujail to those platforms supported. Signed-off-by: Zefir Kurtisi --- package/system/procd/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 294985c..acd1714 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -49,7 +49,8 @@ endef define Package/procd-ujail SECTION:=base CATEGORY:=Base system - DEPENDS:=@KERNEL_NAMESPACES + at KERNEL_UTS_NS + at KERNEL_IPC_NS + at KERNEL_PID_NS +libubox +libblobmsg-json + DEPENDS:=@KERNEL_NAMESPACES + at KERNEL_UTS_NS + at KERNEL_IPC_NS + at KERNEL_PID_NS +libubox +libblobmsg-json \ + @arm||@armeb||@mips||@mipsel||@i386||@x86_64 TITLE:=OpenWrt process jail helper endef -- 2.7.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From champetier.etienne at gmail.com Wed Apr 13 08:41:51 2016 From: champetier.etienne at gmail.com (Etienne Champetier) Date: Wed, 13 Apr 2016 14:41:51 +0200 Subject: [OpenWrt-Devel] [PATCH] procd: restrict ujail to supported platforms In-Reply-To: References: <1460550365-14296-1-git-send-email-zefir.kurtisi@neratec.com> Message-ID: cc list 2016-04-13 14:40 GMT+02:00 Etienne Champetier : > Hi Zefir > > 2016-04-13 14:26 GMT+02:00 Zefir Kurtisi : > >> ujail can be selected on e.g. PowerPC platforms, which >> currently causes the procd build to fail: >> ./trace/trace.c:48:2: error: #error tracing is not supported on this >> architecture >> #error tracing is not supported on this architecture >> ^ >> ./trace/trace.c: In function 'tracer_cb': >> ./trace/trace.c:128:50: error: 'reg_syscall_nr' undeclared (first use in >> this function) >> int syscall = ptrace(PTRACE_PEEKUSER, c->pid, reg_syscall_nr); >> ^ >> This patch restricts ujail to those platforms supported. >> > > trace/trace.c is the source code of utrace binary, > which is in procd-seccomp package, not procd-ujail > > > http://git.openwrt.org/?p=project/procd.git;a=blob;f=CMakeLists.txt;h=74959e02951d286efda4c361eb1cbe7cba38e668;hb=HEAD#l108 > > https://github.com/openwrt/openwrt/blob/73b5446e9a64adb1cc55da1982447251babe2076/package/system/procd/Makefile#L111 > > https://github.com/openwrt/openwrt/blob/73b5446e9a64adb1cc55da1982447251babe2076/package/system/procd/Makefile#L132 > > >> Signed-off-by: Zefir Kurtisi >> --- >> package/system/procd/Makefile | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile >> index 294985c..acd1714 100644 >> --- a/package/system/procd/Makefile >> +++ b/package/system/procd/Makefile >> @@ -49,7 +49,8 @@ endef >> define Package/procd-ujail >> SECTION:=base >> CATEGORY:=Base system >> - DEPENDS:=@KERNEL_NAMESPACES + at KERNEL_UTS_NS + at KERNEL_IPC_NS >> + at KERNEL_PID_NS +libubox +libblobmsg-json >> + DEPENDS:=@KERNEL_NAMESPACES + at KERNEL_UTS_NS + at KERNEL_IPC_NS >> + at KERNEL_PID_NS +libubox +libblobmsg-json \ >> + @arm||@armeb||@mips||@mipsel||@i386||@x86_64 >> TITLE:=OpenWrt process jail helper >> endef >> >> -- >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zefir.kurtisi at neratec.com Wed Apr 13 08:52:15 2016 From: zefir.kurtisi at neratec.com (Zefir Kurtisi) Date: Wed, 13 Apr 2016 14:52:15 +0200 Subject: [OpenWrt-Devel] [PATCH] procd: restrict ujail to supported platforms In-Reply-To: References: <1460550365-14296-1-git-send-email-zefir.kurtisi@neratec.com> Message-ID: <570E40FF.3050905@neratec.com> On 04/13/2016 02:41 PM, Etienne Champetier wrote: > cc list > > 2016-04-13 14:40 GMT+02:00 Etienne Champetier >: > > Hi Zefir > > trace/trace.c is the source code of utrace binary, > which is in procd-seccomp package, not procd-ujail > > http://git.openwrt.org/?p=project/procd.git;a=blob;f=CMakeLists.txt;h=74959e02951d286efda4c361eb1cbe7cba38e668;hb=HEAD#l108 > https://github.com/openwrt/openwrt/blob/73b5446e9a64adb1cc55da1982447251babe2076/package/system/procd/Makefile#L111 > https://github.com/openwrt/openwrt/blob/73b5446e9a64adb1cc55da1982447251babe2076/package/system/procd/Makefile#L132 > > Ah, I see, you changed that with your commit "add UTRACE_SUPPORT build option" quite some time ago. Thanks and sorry for the noise. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From leroi.lists at gmail.com Wed Apr 13 08:57:03 2016 From: leroi.lists at gmail.com (Roman Yeryomin) Date: Wed, 13 Apr 2016 15:57:03 +0300 Subject: [OpenWrt-Devel] [PATCH] base-files: allow to set arbitrary ip address and netmask Message-ID: <1460552223-8094-1-git-send-email-roman@advem.lv> Signed-off-by: Roman Yeryomin --- package/base-files/files/bin/config_generate | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate index 4256d3c..03d1a36 100755 --- a/package/base-files/files/bin/config_generate +++ b/package/base-files/files/bin/config_generate @@ -56,11 +56,11 @@ generate_static_network() { addr_offset=2 generate_network() { - local ifname macaddr protocol type + local ifname macaddr protocol type ipaddr netmask json_select network json_select "$1" - json_get_vars ifname macaddr protocol + json_get_vars ifname macaddr protocol ipaddr netmask json_select .. json_select .. @@ -88,16 +88,18 @@ generate_network() { case "$protocol" in static) - local ipaddr + local ipad case "$1" in - lan) ipaddr="192.168.1.1" ;; - *) ipaddr="192.168.$((addr_offset++)).1" ;; + lan) ipad=${ipaddr:-"192.168.1.1"} ;; + *) ipad=${ipaddr:-"192.168.$((addr_offset++)).1"} ;; esac + netm=${netmask:-"255.255.255.0"} + uci -q batch <<-EOF set network.$1.proto='static' - set network.$1.ipaddr='$ipaddr' - set network.$1.netmask='255.255.255.0' + set network.$1.ipaddr='$ipad' + set network.$1.netmask='$netm' set network.$1.ip6assign='60' EOF ;; -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kubco2 at gmail.com Wed Apr 13 10:42:55 2016 From: kubco2 at gmail.com (=?UTF-8?B?SmFrdWIgSmFuxI1v?=) Date: Wed, 13 Apr 2016 16:42:55 +0200 Subject: [OpenWrt-Devel] OpenVPN server doesnt send AUTH_FAILED In-Reply-To: References: Message-ID: Hello, can someone help please? Mainly openvpn masters :) - but it can be another problem openssl? kernel? :-/ ... Problem is that openvpn doesnt send/receive AUTH_FAILED when auth-user-pass fails to verify. I created thread in OpenVPN forum with all details: https://forums.openvpn.net/topic21397.html#p60770 -- S pozdravom Jakub Janco On Sun, Mar 27, 2016 at 12:10 PM, Jakub Jan?o wrote: > Hello, > > I was testing this quite of time and I thought that upgrade package to > 2.3.10 fixes problem, but maybe I mismatch binaries, because now when > I need it again it doesnt work :(. On my PC(openvpn from arch repo) it > works fine. > > Problem is that openvpn server doesnt send AUTH_FAILED - if auth > script return non-zero return code. And this causes problems with > windows clients(openvpn client freeze), but it is not comfortable for > all clients, because client doesnt know if he enter right > username,password. > > I tried a lot of combinations from compile config options, but none works. > > Can you help me with this magic please? > > Thanks. > > -- > S pozdravom Jakub Janco _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From francesco.borromini at inventati.org Wed Apr 13 13:20:17 2016 From: francesco.borromini at inventati.org (Stijn Segers) Date: Wed, 13 Apr 2016 19:20:17 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: Add TP-Link TL-WA901ND v4 support to Chaos Calmer 15.05.1 Message-ID: <1460568017-2633-1-git-send-email-francesco.borromini@inventati.org> This patch backports support for the TP-Link TL-WA901ND v4 to Chaos Calmer 15.05.1, which was added into trunk recently [1]. Signed-off by Stijn Segers [1]: http://patchwork.ozlabs.org/patch/606780/ --- target/linux/ar71xx/base-files/etc/diag.sh | 1 + .../ar71xx/base-files/etc/uci-defaults/01_leds | 5 + .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3.18 | 1 + .../files/arch/mips/ath79/mach-tl-wa901nd-v4.c | 112 +++++++++++++++++++++ target/linux/ar71xx/image/Makefile | 10 +- .../907-MIPS-ath79-add-tl-wa901nd-v4-support.patch | 38 +++++++ tools/firmware-utils/src/mktplinkfw.c | 6 ++ 10 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c create mode 100644 target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-tl-wa901nd-v4-support.patch diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 3e80c32..6f2bd1c 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -255,6 +255,7 @@ get_status_led() { tl-wa901nd | \ tl-wa901nd-v2 | \ tl-wa901nd-v3 | \ + tl-wa901nd-v4 | \ tl-wdr3500 | \ tl-wr1041n-v2 | \ tl-wr1043nd | \ diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 11b3fa0..142950c 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -407,6 +407,11 @@ tl-wa901nd-v2) ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" ;; +tl-wa901nd-v4) + ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" + ;; + tl-wdr3500) ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1" ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:green:wlan2g" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index c0becfe..29d60da 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -362,6 +362,7 @@ tl-wa801nd-v2 |\ tl-wa901nd |\ tl-wa901nd-v2 |\ tl-wa901nd-v3 |\ +tl-wa901nd-v4 |\ tl-wr703n |\ tube2h |\ wndap360 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 5768286..8a70859 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -767,6 +767,9 @@ ar71xx_board_detect() { *"TL-WA901ND v3") name="tl-wa901nd-v3" ;; + *"TL-WA901ND v4") + name="tl-wa901nd-v4 + ;; *"TL-WDR3500") name="tl-wdr3500" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 2fc1d10..beb29b9 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -338,6 +338,7 @@ platform_check_image() { tl-wa901nd | \ tl-wa901nd-v2 | \ tl-wa901nd-v3 | \ + tl-wa901nd-v4 | \ tl-wdr3500 | \ tl-wdr4300 | \ tl-wdr4900-v2 | \ diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18 index 96a5ae2..e2ff826 100644 --- a/target/linux/ar71xx/config-3.18 +++ b/target/linux/ar71xx/config-3.18 @@ -118,6 +118,7 @@ CONFIG_ATH79_MACH_TL_WA7210N_V2=y CONFIG_ATH79_MACH_TL_WA830RE_V2=y CONFIG_ATH79_MACH_TL_WA901ND=y CONFIG_ATH79_MACH_TL_WA901ND_V2=y +CONFIG_ATH79_MACH_TL_WA901ND_V4=y CONFIG_ATH79_MACH_TL_WAX50RE=y CONFIG_ATH79_MACH_TL_WDR3500=y CONFIG_ATH79_MACH_TL_WDR4300=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c new file mode 100644 index 0000000..9c651bb --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c @@ -0,0 +1,112 @@ +/* + * TP-LINK TL-WA901ND v4 board + * + * Copyright (C) 2015 Matthias Schiffer + * Copyright (C) 2016 Tiziano Bacocco + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include + +#include +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-wmac.h" +#include "machtypes.h" + + +#define TL_WA901ND_V4_GPIO_LED_QSS 3 +#define TL_WA901ND_V4_GPIO_LED_LAN 7 +#define TL_WA901ND_V4_GPIO_LED_WLAN 8 +#define TL_WA901ND_V4_GPIO_LED_SYSTEM 18 + +#define TL_WA901ND_V4_GPIO_BTN_RESET 1 + +#define TL_WA901ND_V4_KEYS_POLL_INTERVAL 20 +#define TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WA901ND_V4_KEYS_POLL_INTERVAL) + + +static struct gpio_led TL_WA901ND_V4_leds_gpio[] __initdata = { + { + .name = "tp-link:green:qss", + .gpio = TL_WA901ND_V4_GPIO_LED_QSS, + .active_low = 1, + }, + { + .name = "tp-link:green:lan", + .gpio = TL_WA901ND_V4_GPIO_LED_LAN, + .active_low = 1, + }, + { + .name = "tp-link:green:wlan", + .gpio = TL_WA901ND_V4_GPIO_LED_WLAN, + .active_low = 1, + }, + { + .name = "tp-link:green:system", + .gpio = TL_WA901ND_V4_GPIO_LED_SYSTEM, + .active_low = 1, + }, +}; + +static struct gpio_keys_button TL_WA901ND_V4_gpio_keys[] __initdata = { + { + .desc = "Reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL, + .gpio = TL_WA901ND_V4_GPIO_BTN_RESET, + .active_low = 1, + } +}; + + +static const char *tl_wa901nd_v4_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data tl_wa901nd_v4_flash_data = { + .part_probes = tl_wa901nd_v4_part_probes, +}; + + +static void __init TL_WA901ND_V4_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + ath79_register_m25p80(&tl_wa901nd_v4_flash_data); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(TL_WA901ND_V4_leds_gpio), + TL_WA901ND_V4_leds_gpio); + + ath79_register_gpio_keys_polled(-1, TL_WA901ND_V4_KEYS_POLL_INTERVAL, + ARRAY_SIZE(TL_WA901ND_V4_gpio_keys), + TL_WA901ND_V4_gpio_keys); + + ath79_register_mdio(0, 0x0); + + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); + + ath79_switch_data.phy4_mii_en = 1; + + ath79_register_eth(0); + ath79_register_eth(1); + + ath79_register_wmac(ee, mac); + +} + +MIPS_MACHINE(ATH79_MACH_TL_WA901ND_V4, "TL-WA901ND-v4", "TP-LINK TL-WA901ND v4", + TL_WA901ND_V4_setup); diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 1a399ab..3e48d60 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -681,7 +681,15 @@ define Device/tl-wa901nd-v3 DEVICE_PROFILE := TLWA901 TPLINK_HWID := 0x09010003 endef -TARGET_DEVICES += tl-wa901nd-v3 + +define Device/tl-wa901nd-v4 + $(Device/tplink-4mlzma) + BOARDNAME := TL-WA901ND-v4 + DEVICE_PROFILE := TLWA901 + TPLINK_HWID := 0x09010004 +endef + +TARGET_DEVICES += tl-wa901nd-v3 tl-wa901nd-v4 define Device/tl-wa7210n-v2 $(Device/tplink-4mlzma) diff --git a/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-tl-wa901nd-v4-support.patch b/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-tl-wa901nd-v4-support.patch new file mode 100644 index 0000000..ebd9e52 --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-tl-wa901nd-v4-support.patch @@ -0,0 +1,38 @@ +--- a/arch/mips/ath79/machtypes.h 2016-04-12 21:08:09.309541276 +0200 ++++ b/arch/mips/ath79/machtypes.h 2016-04-12 21:08:43.200013377 +0200 +@@ -152,6 +152,7 @@ + ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */ + ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */ + ATH79_MACH_TL_WA901ND_V3, /* TP-LINK TL-WA901ND v3 */ ++ ATH79_MACH_TL_WA901ND_V4, /* TP-LINK TL-WA901ND v4 */ + ATH79_MACH_TL_WDR3500, /* TP-LINK TL-WDR3500 */ + ATH79_MACH_TL_WDR4300, /* TP-LINK TL-WDR4300 */ + ATH79_MACH_TL_WDR4900_V2, /* TP-LINK TL-WDR4900 v2 */ +--- a/arch/mips/ath79/Kconfig 2016-04-12 21:00:07.267269819 +0200 ++++ b/arch/mips/ath79/Kconfig 2016-04-12 21:00:08.803199911 +0200 +@@ -1023,6 +1023,15 @@ + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + ++config ATH79_MACH_TL_WA901ND_V4 ++ bool "TP-LINK TL-WA901ND v4 support" ++ select SOC_QCA956X ++ select ATH79_DEV_ETH ++ select ATH79_DEV_GPIO_BUTTONS ++ select ATH79_DEV_LEDS_GPIO ++ select ATH79_DEV_M25P80 ++ select ATH79_DEV_WMAC ++ + config ATH79_MACH_TL_WDR3500 + bool "TP-LINK TL-WDR3500 board support" + select SOC_AR934X +--- a/arch/mips/ath79/Makefile 2016-04-12 21:03:21.974455904 +0200 ++++ b/arch/mips/ath79/Makefile 2016-04-12 21:02:56.115621524 +0200 +@@ -128,6 +128,7 @@ + obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o + obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o + obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o ++obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V4) += mach-tl-wa901nd-v4.o + obj-$(CONFIG_ATH79_MACH_TL_WDR3500) += mach-tl-wdr3500.o + obj-$(CONFIG_ATH79_MACH_TL_WDR4300) += mach-tl-wdr4300.o + obj-$(CONFIG_ATH79_MACH_TL_WR741ND) += mach-tl-wr741nd.o diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index 43840a9..6df869d 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -52,6 +52,7 @@ #define HWID_TL_WA801ND_V2 0x08010002 #define HWID_TL_WA901ND_V1 0x09010001 #define HWID_TL_WA901ND_V2 0x09010002 +#define HWID_TL_WA901ND_V4 0x09010004 #define HWID_TL_WDR4300_V1_IL 0x43008001 #define HWID_TL_WDR4900_V1 0x49000001 #define HWID_TL_WR703N_V1 0x07030101 @@ -306,6 +307,11 @@ static struct board_info boards[] = { .hw_rev = 1, .layout_id = "4M", }, { + .id = "TL-WA901NDv4", + .hw_id = HWID_TL_WA901ND_V4, + .hw_rev = 1, + .layout_id = "4Mlzma", + }, { .id = "TL-WDR4300v1", .hw_id = HWID_TL_WDR4300_V1_IL, .hw_rev = 1, -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dmaces at nd.edu Wed Apr 13 17:51:50 2016 From: dmaces at nd.edu (D. Andrei Măceș) Date: Wed, 13 Apr 2016 17:51:50 -0400 Subject: [OpenWrt-Devel] [PATCH] ramips: mt7620: Fix USB frequency scaling Message-ID: <570fcb39.05e6320a.1be4a.ffffae4c@mx.google.com> The logic for the SoC check got inverted. We need to check if it's not a MT76x8. Signed-off-by: D. Andrei M?ce? --- ...080-MIPS-ralink-fix-USB-frequency-scaling.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch diff --git a/target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch b/target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch new file mode 100644 index 0000000..0f3129e --- /dev/null +++ b/target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch @@ -0,0 +1,33 @@ +From ae28413b3b8901ea00af3571e1c90d0228976e16 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Mon, 4 Jan 2016 20:23:57 +0100 +Subject: [PATCH 80/81] MIPS: ralink: fix USB frequency scaling + +Commit 418d29c87061 ("MIPS: ralink: Unify SoC id handling") was not fully +correct. The logic for the SoC check got inverted. We need to check if it +is not a MT76x8. + +Signed-off-by: John Crispin +Cc: linux-mips at linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/11992/ +Signed-off-by: Ralf Baechle +--- + arch/mips/ralink/mt7620.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c +index dfb04fc..fc19932 100644 +--- a/arch/mips/ralink/mt7620.c ++++ b/arch/mips/ralink/mt7620.c +@@ -439,7 +439,7 @@ void __init ralink_clk_init(void) + ralink_clk_add("10000c00.uartlite", periph_rate); + ralink_clk_add("10180000.wmac", xtal_rate); + +- if (IS_ENABLED(CONFIG_USB) && is_mt76x8()) { ++ if (IS_ENABLED(CONFIG_USB) && !is_mt76x8()) { + /* + * When the CPU goes into sleep mode, the BUS clock will be + * too low for USB to function properly. Adjust the busses +-- +2.1.4 + -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bapclenet at gmail.com Thu Apr 14 10:38:36 2016 From: bapclenet at gmail.com (Baptiste Clenet) Date: Thu, 14 Apr 2016 16:38:36 +0200 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface In-Reply-To: References: Message-ID: Marc, yes it has been added by John Crispins. I had nothing in etc/config/wireless, which is the right definition for this driver? (I don't find any documentation). Tom, Adam, yes it is defined. 2016-04-12 13:30 GMT+02:00 Adam Kent : > Hi Baptiste > > Which board exactly? You may need to add the "wmac" definition to the > relevant dts file. Have a look in > target/linux/ramips/dts/.dts and make sure there's > this: > > wmac at 10300000 { > status = "okay"; > }; > > - Adam > > On Tue, Apr 12, 2016 at 6:27 PM, Baptiste Clenet wrote: >> Hi, >> >> I flashed the current tree on mt7688 board and no interface showed up >> for wifi. Should I do something? I would like to try the mt76 wifi >> driver on this board. (I added it with in menuconfig) >> >> Cheers, >> >> -- >> Baptiste >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel at lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Baptiste _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Thu Apr 14 10:58:09 2016 From: john at phrozen.org (John Crispin) Date: Thu, 14 Apr 2016 16:58:09 +0200 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface In-Reply-To: References: Message-ID: <570FB001.8030507@phrozen.org> On 14/04/2016 16:38, Baptiste Clenet wrote: > Marc, yes it has been added by John Crispins. > > I had nothing in etc/config/wireless, which is the right definition > for this driver? (I don't find any documentation). Tom, Adam, yes it > is defined. > > 2016-04-12 13:30 GMT+02:00 Adam Kent : >> Hi Baptiste >> >> Which board exactly? You may need to add the "wmac" definition to the >> relevant dts file. Have a look in >> target/linux/ramips/dts/.dts and make sure there's >> this: >> >> wmac at 10300000 { >> status = "okay"; >> }; >> >> - Adam >> >> On Tue, Apr 12, 2016 at 6:27 PM, Baptiste Clenet wrote: >>> Hi, >>> >>> I flashed the current tree on mt7688 board and no interface showed up >>> for wifi. Should I do something? I would like to try the mt76 wifi >>> driver on this board. (I added it with in menuconfig) >>> >>> Cheers, >>> >>> -- >>> Baptiste >>> _______________________________________________ >>> openwrt-devel mailing list >>> openwrt-devel at lists.openwrt.org >>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > > are you loading the mt76 driver ? _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Thu Apr 14 10:59:43 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Thu, 14 Apr 2016 23:59:43 +0900 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex MZK-EX300NP Message-ID: <1460645983-26517-1-git-send-email-tochiro.srchack@gmail.com> MZK-EX300NP is MT7620A based wifi repeater. Built-in power supply. 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. Signed-off-by: YuheiOKAWA --- target/linux/ramips/base-files/etc/board.d/01_leds | 1 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MZK-EX300NP.dts | 132 +++++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 2 + target/linux/ramips/mt7620/profiles/planex.mk | 16 +++ 8 files changed, 157 insertions(+) create mode 100644 target/linux/ramips/dts/MZK-EX300NP.dts create mode 100644 target/linux/ramips/mt7620/profiles/planex.mk diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 5816e60..e8305d0 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -118,6 +118,7 @@ dir-615-h1) ucidef_set_led_default "status" "Status LED (amber)" "$board:amber:status" "0" set_wifi_led "rt2800pci-phy0::radio" ;; +mzk-ex300np|\ dir-620-d1) set_wifi_led "$board:green:wifi" ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 4b65d36..db2e6d9 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -160,6 +160,7 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9 at eth0" ;; d105|\ + mzk-ex300np|\ hpm|\ na930|\ wli-tx4-ag300n) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index daa7fb1..8692da9 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -151,6 +151,7 @@ get_status_led() { whr-600d) status_led="$board:orange:wifi" ;; + mzk-ex300np|\ rt-n10-plus|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 5f1df7b..b1cb2eb 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -292,6 +292,9 @@ ramips_board_detect() { *"MZK-DP150N") name="mzk-dp150n" ;; + *"MZK-EX300NP") + name="mzk-ex300np" + ;; *"MZK-W300NH2"*) name="mzk-w300nh2" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index c329dce..d8e6f66 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -87,6 +87,7 @@ platform_check_image() { mr-102n|\ mt7628|\ mzk-dp150n|\ + mzk-ex300np|\ mzk-w300nh2|\ mzk-wdpr|\ nbg-419n|\ diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts b/target/linux/ramips/dts/MZK-EX300NP.dts new file mode 100644 index 0000000..51e87ad --- /dev/null +++ b/target/linux/ramips/dts/MZK-EX300NP.dts @@ -0,0 +1,132 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "Planex MZK-EX300NP"; + + palmbus at 10000000 { + gpio1: gpio at 638 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x730000>; + }; + + partition at 780000 { + label = "Udata"; + reg = <0x780000 0x80000>; + }; + }; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi refclk", "rgmii1", "wled"; + ralink,function = "gpio"; + }; + }; + }; + + ethernet at 10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wifi { + label = "mzk-ex300np:green:wifi"; + gpios = <&gpio3 0 0>; + }; + + wps { + label = "mzk-ex300np:green:wps"; + gpios = <&gpio1 5 0>; + }; + + rep { + label = "mzk-ex300np:blue:rep"; + gpios = <&gpio1 4 1>; + }; + + wifi1 { + label = "mzk-ex300np:blue:wifi1"; + gpios = <&gpio1 1 1>; + }; + + wifi2 { + label = "mzk-ex300np:blue:wifi2"; + gpios = <&gpio1 2 1>; + }; + + wifi3 { + label = "mzk-ex300np:blue:wifi3"; + gpios = <&gpio1 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 1 1>; + linux,code = <0x198>; + }; + + wps { + label = "wps"; + gpios = <&gpio1 3 0>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 18cd20a..3c9d6ce 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -87,6 +87,7 @@ na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) +Image/Build/Profile/MZK-EX300NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) Image/Build/Profile/HC5761=$(call BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) Image/Build/Profile/HC5861=$(call BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) @@ -131,6 +132,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/WHR1166D,$(1)) $(call Image/Build/Profile/DB-WRT01,$(1)) $(call Image/Build/Profile/MZK-750DHP,$(1)) + $(call Image/Build/Profile/MZK-EX300NP,$(1)) $(call Image/Build/Profile/NA930,$(1)) $(call Image/Build/Profile/HC5661,$(1)) $(call Image/Build/Profile/HC5761,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk new file mode 100644 index 0000000..79bfbdb --- /dev/null +++ b/target/linux/ramips/mt7620/profiles/planex.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/MZK-EX300NP + NAME:=Planex MZK-EX300NP + PACKAGES:= +endef + +define Profile/MZK-EX300NP/Description + Package set optimized for the Planex MZK-EX300NP. +endef +$(eval $(call Profile,MZK-EX300NP)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bapclenet at gmail.com Thu Apr 14 14:20:57 2016 From: bapclenet at gmail.com (Baptiste Clenet) Date: Thu, 14 Apr 2016 20:20:57 +0200 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface In-Reply-To: <570FB001.8030507@phrozen.org> References: <570FB001.8030507@phrozen.org> Message-ID: 2016-04-14 16:58 GMT+02:00 John Crispin : > > > On 14/04/2016 16:38, Baptiste Clenet wrote: >> Marc, yes it has been added by John Crispins. >> >> I had nothing in etc/config/wireless, which is the right definition >> for this driver? (I don't find any documentation). Tom, Adam, yes it >> is defined. >> >> 2016-04-12 13:30 GMT+02:00 Adam Kent : >>> Hi Baptiste >>> >>> Which board exactly? You may need to add the "wmac" definition to the >>> relevant dts file. Have a look in >>> target/linux/ramips/dts/.dts and make sure there's >>> this: >>> >>> wmac at 10300000 { >>> status = "okay"; >>> }; >>> >>> - Adam >>> >>> On Tue, Apr 12, 2016 at 6:27 PM, Baptiste Clenet wrote: >>>> Hi, >>>> >>>> I flashed the current tree on mt7688 board and no interface showed up >>>> for wifi. Should I do something? I would like to try the mt76 wifi >>>> driver on this board. (I added it with in menuconfig) >>>> >>>> Cheers, >>>> >>>> -- >>>> Baptiste >>>> _______________________________________________ >>>> openwrt-devel mailing list >>>> openwrt-devel at lists.openwrt.org >>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> >> >> > > > are you loading the mt76 driver ? modprobe mt76? It is already loaded: cfg80211 215619 3 mt7603e mac80211 389306 3 mt7603e mt76 15734 2 mt7603e mt7603e 27964 0 mt76x2e 34300 0 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Baptiste _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Alexey.Brodkin at synopsys.com Thu Apr 14 14:36:49 2016 From: Alexey.Brodkin at synopsys.com (Alexey Brodkin) Date: Thu, 14 Apr 2016 21:36:49 +0300 Subject: [OpenWrt-Devel] [PATCH] toolchain/uClibc: enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL Message-ID: <1460659009-20497-1-git-send-email-abrodkin@synopsys.com> This is required to build net-snmp. If that options is disabled in uClibc then net-snmp doesn't detect sighold support on its configuration stage and so defines HAVE_SIGHOLD as 0. That in its turn causes compilation of the following branch of timerPause() in apps/snmpnetstat: ------------------>8---------------- int oldmask; oldmask = sigblock(sigmask(SIGALRM)); if (!signalled) { sigpause(0); } sigsetmask(oldmask); ------------------>8---------------- Now in uClibc all 3 sigblock(), sigmask() and sigsetmask() were removed back in 2005, see: https://git.busybox.net/uClibc/commit/?id=5aa7aa7fa7ec2a0fe567ac0b2595b46add6f3594 And all that causes net-snmp linkage to fail this way: ------------------>8---------------- .libs/if.o: In function `intpr': if.c:(.text+0x908): undefined reference to `sigmask' if.c:(.text+0x90e): undefined reference to `sigblock' if.c:(.text+0x924): undefined reference to `sigsetmask' ------------------>8---------------- If we enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL in uClibc then branch with sighold is used in timerPause() and everything builds as expected. Signed-off-by: Alexey Brodkin --- toolchain/uClibc/config/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/uClibc/config/common b/toolchain/uClibc/config/common index ec72701..b476639 100644 --- a/toolchain/uClibc/config/common +++ b/toolchain/uClibc/config/common @@ -144,7 +144,7 @@ UCLIBC_HAS_LIBUTIL=y UCLIBC_HAS_LONG_DOUBLE_MATH=y UCLIBC_HAS_NETWORK_SUPPORT=y UCLIBC_HAS_NFTW=y -# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y # UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set UCLIBC_HAS_PRINTF_M_SPEC=y # UCLIBC_HAS_PROFILING is not set -- 2.5.5 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From francesco.borromini at inventati.org Thu Apr 14 16:26:24 2016 From: francesco.borromini at inventati.org (Stijn Segers) Date: Thu, 14 Apr 2016 22:26:24 +0200 Subject: [OpenWrt-Devel] [PATCH v2] ar71xx: Add TP-Link TL-WA901ND v4 support to Chaos Calmer 15.05.1 Message-ID: <1460665584-2089-1-git-send-email-francesco.borromini@inventati.org> This patch backports support for the TP-Link TL-WA901ND v4 to Chaos Calmer 15.05.1, which was added into trunk recently [1]. I noticed I forgot to close a quote in the code added to the lib/ar71xx.sh script, fixed in v2. Signed-off by Stijn Segers [1]: http://patchwork.ozlabs.org/patch/606780/ --- target/linux/ar71xx/base-files/etc/diag.sh | 1 + .../ar71xx/base-files/etc/uci-defaults/01_leds | 5 + .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3.18 | 1 + .../files/arch/mips/ath79/mach-tl-wa901nd-v4.c | 112 +++++++++++++++++++++ target/linux/ar71xx/image/Makefile | 10 +- .../907-MIPS-ath79-add-tl-wa901nd-v4-support.patch | 38 +++++++ tools/firmware-utils/src/mktplinkfw.c | 6 ++ 10 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c create mode 100644 target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-tl-wa901nd-v4-support.patch diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 3e80c32..6f2bd1c 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -255,6 +255,7 @@ get_status_led() { tl-wa901nd | \ tl-wa901nd-v2 | \ tl-wa901nd-v3 | \ + tl-wa901nd-v4 | \ tl-wdr3500 | \ tl-wr1041n-v2 | \ tl-wr1043nd | \ diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 11b3fa0..142950c 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -407,6 +407,11 @@ tl-wa901nd-v2) ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" ;; +tl-wa901nd-v4) + ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" + ;; + tl-wdr3500) ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1" ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:green:wlan2g" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index c0becfe..29d60da 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -362,6 +362,7 @@ tl-wa801nd-v2 |\ tl-wa901nd |\ tl-wa901nd-v2 |\ tl-wa901nd-v3 |\ +tl-wa901nd-v4 |\ tl-wr703n |\ tube2h |\ wndap360 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 5768286..8a70859 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -767,6 +767,9 @@ ar71xx_board_detect() { *"TL-WA901ND v3") name="tl-wa901nd-v3" ;; + *"TL-WA901ND v4") + name="tl-wa901nd-v4" + ;; *"TL-WDR3500") name="tl-wdr3500" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 2fc1d10..beb29b9 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -338,6 +338,7 @@ platform_check_image() { tl-wa901nd | \ tl-wa901nd-v2 | \ tl-wa901nd-v3 | \ + tl-wa901nd-v4 | \ tl-wdr3500 | \ tl-wdr4300 | \ tl-wdr4900-v2 | \ diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18 index 96a5ae2..e2ff826 100644 --- a/target/linux/ar71xx/config-3.18 +++ b/target/linux/ar71xx/config-3.18 @@ -118,6 +118,7 @@ CONFIG_ATH79_MACH_TL_WA7210N_V2=y CONFIG_ATH79_MACH_TL_WA830RE_V2=y CONFIG_ATH79_MACH_TL_WA901ND=y CONFIG_ATH79_MACH_TL_WA901ND_V2=y +CONFIG_ATH79_MACH_TL_WA901ND_V4=y CONFIG_ATH79_MACH_TL_WAX50RE=y CONFIG_ATH79_MACH_TL_WDR3500=y CONFIG_ATH79_MACH_TL_WDR4300=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c new file mode 100644 index 0000000..9c651bb --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa901nd-v4.c @@ -0,0 +1,112 @@ +/* + * TP-LINK TL-WA901ND v4 board + * + * Copyright (C) 2015 Matthias Schiffer + * Copyright (C) 2016 Tiziano Bacocco + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include + +#include +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-wmac.h" +#include "machtypes.h" + + +#define TL_WA901ND_V4_GPIO_LED_QSS 3 +#define TL_WA901ND_V4_GPIO_LED_LAN 7 +#define TL_WA901ND_V4_GPIO_LED_WLAN 8 +#define TL_WA901ND_V4_GPIO_LED_SYSTEM 18 + +#define TL_WA901ND_V4_GPIO_BTN_RESET 1 + +#define TL_WA901ND_V4_KEYS_POLL_INTERVAL 20 +#define TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WA901ND_V4_KEYS_POLL_INTERVAL) + + +static struct gpio_led TL_WA901ND_V4_leds_gpio[] __initdata = { + { + .name = "tp-link:green:qss", + .gpio = TL_WA901ND_V4_GPIO_LED_QSS, + .active_low = 1, + }, + { + .name = "tp-link:green:lan", + .gpio = TL_WA901ND_V4_GPIO_LED_LAN, + .active_low = 1, + }, + { + .name = "tp-link:green:wlan", + .gpio = TL_WA901ND_V4_GPIO_LED_WLAN, + .active_low = 1, + }, + { + .name = "tp-link:green:system", + .gpio = TL_WA901ND_V4_GPIO_LED_SYSTEM, + .active_low = 1, + }, +}; + +static struct gpio_keys_button TL_WA901ND_V4_gpio_keys[] __initdata = { + { + .desc = "Reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = TL_WA901ND_V4_KEYS_DEBOUNCE_INTERVAL, + .gpio = TL_WA901ND_V4_GPIO_BTN_RESET, + .active_low = 1, + } +}; + + +static const char *tl_wa901nd_v4_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data tl_wa901nd_v4_flash_data = { + .part_probes = tl_wa901nd_v4_part_probes, +}; + + +static void __init TL_WA901ND_V4_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + ath79_register_m25p80(&tl_wa901nd_v4_flash_data); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(TL_WA901ND_V4_leds_gpio), + TL_WA901ND_V4_leds_gpio); + + ath79_register_gpio_keys_polled(-1, TL_WA901ND_V4_KEYS_POLL_INTERVAL, + ARRAY_SIZE(TL_WA901ND_V4_gpio_keys), + TL_WA901ND_V4_gpio_keys); + + ath79_register_mdio(0, 0x0); + + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); + + ath79_switch_data.phy4_mii_en = 1; + + ath79_register_eth(0); + ath79_register_eth(1); + + ath79_register_wmac(ee, mac); + +} + +MIPS_MACHINE(ATH79_MACH_TL_WA901ND_V4, "TL-WA901ND-v4", "TP-LINK TL-WA901ND v4", + TL_WA901ND_V4_setup); diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 1a399ab..3e48d60 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -681,7 +681,15 @@ define Device/tl-wa901nd-v3 DEVICE_PROFILE := TLWA901 TPLINK_HWID := 0x09010003 endef -TARGET_DEVICES += tl-wa901nd-v3 + +define Device/tl-wa901nd-v4 + $(Device/tplink-4mlzma) + BOARDNAME := TL-WA901ND-v4 + DEVICE_PROFILE := TLWA901 + TPLINK_HWID := 0x09010004 +endef + +TARGET_DEVICES += tl-wa901nd-v3 tl-wa901nd-v4 define Device/tl-wa7210n-v2 $(Device/tplink-4mlzma) diff --git a/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-tl-wa901nd-v4-support.patch b/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-tl-wa901nd-v4-support.patch new file mode 100644 index 0000000..ebd9e52 --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/907-MIPS-ath79-add-tl-wa901nd-v4-support.patch @@ -0,0 +1,38 @@ +--- a/arch/mips/ath79/machtypes.h 2016-04-12 21:08:09.309541276 +0200 ++++ b/arch/mips/ath79/machtypes.h 2016-04-12 21:08:43.200013377 +0200 +@@ -152,6 +152,7 @@ + ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */ + ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */ + ATH79_MACH_TL_WA901ND_V3, /* TP-LINK TL-WA901ND v3 */ ++ ATH79_MACH_TL_WA901ND_V4, /* TP-LINK TL-WA901ND v4 */ + ATH79_MACH_TL_WDR3500, /* TP-LINK TL-WDR3500 */ + ATH79_MACH_TL_WDR4300, /* TP-LINK TL-WDR4300 */ + ATH79_MACH_TL_WDR4900_V2, /* TP-LINK TL-WDR4900 v2 */ +--- a/arch/mips/ath79/Kconfig 2016-04-12 21:00:07.267269819 +0200 ++++ b/arch/mips/ath79/Kconfig 2016-04-12 21:00:08.803199911 +0200 +@@ -1023,6 +1023,15 @@ + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + ++config ATH79_MACH_TL_WA901ND_V4 ++ bool "TP-LINK TL-WA901ND v4 support" ++ select SOC_QCA956X ++ select ATH79_DEV_ETH ++ select ATH79_DEV_GPIO_BUTTONS ++ select ATH79_DEV_LEDS_GPIO ++ select ATH79_DEV_M25P80 ++ select ATH79_DEV_WMAC ++ + config ATH79_MACH_TL_WDR3500 + bool "TP-LINK TL-WDR3500 board support" + select SOC_AR934X +--- a/arch/mips/ath79/Makefile 2016-04-12 21:03:21.974455904 +0200 ++++ b/arch/mips/ath79/Makefile 2016-04-12 21:02:56.115621524 +0200 +@@ -128,6 +128,7 @@ + obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2) += mach-tl-wa830re-v2.o + obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o + obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o ++obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V4) += mach-tl-wa901nd-v4.o + obj-$(CONFIG_ATH79_MACH_TL_WDR3500) += mach-tl-wdr3500.o + obj-$(CONFIG_ATH79_MACH_TL_WDR4300) += mach-tl-wdr4300.o + obj-$(CONFIG_ATH79_MACH_TL_WR741ND) += mach-tl-wr741nd.o diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index 43840a9..6df869d 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -52,6 +52,7 @@ #define HWID_TL_WA801ND_V2 0x08010002 #define HWID_TL_WA901ND_V1 0x09010001 #define HWID_TL_WA901ND_V2 0x09010002 +#define HWID_TL_WA901ND_V4 0x09010004 #define HWID_TL_WDR4300_V1_IL 0x43008001 #define HWID_TL_WDR4900_V1 0x49000001 #define HWID_TL_WR703N_V1 0x07030101 @@ -306,6 +307,11 @@ static struct board_info boards[] = { .hw_rev = 1, .layout_id = "4M", }, { + .id = "TL-WA901NDv4", + .hw_id = HWID_TL_WA901ND_V4, + .hw_rev = 1, + .layout_id = "4Mlzma", + }, { .id = "TL-WDR4300v1", .hw_id = HWID_TL_WDR4300_V1_IL, .hw_rev = 1, -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From naobsd at gmail.com Fri Apr 15 01:18:39 2016 From: naobsd at gmail.com (Naoki FUKAUMI) Date: Fri, 15 Apr 2016 14:18:39 +0900 Subject: [OpenWrt-Devel] [PATCH] ramips: mt7620: Fix USB frequency scaling In-Reply-To: <570fcb39.05e6320a.1be4a.ffffae4c@mx.google.com> References: <570fcb39.05e6320a.1be4a.ffffae4c@mx.google.com> Message-ID: hi, it seems this patch is not available on patchwork... anyway, On Thu, Apr 14, 2016 at 6:51 AM, D. Andrei M?ce? wrote: > The logic for the SoC check got inverted. We need to check if it's > not a MT76x8. > > Signed-off-by: D. Andrei M?ce? I confirmed that this fixes rndis issue (https://dev.openwrt.org/ticket/22200) on WRH-300CR(MT7620N) too. it also makes USB performance better. thank you. Tested-by: FUKAUMI Naoki > --- > ...080-MIPS-ralink-fix-USB-frequency-scaling.patch | 33 ++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > create mode 100644 target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch > > diff --git a/target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch b/target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch > new file mode 100644 > index 0000000..0f3129e > --- /dev/null > +++ b/target/linux/ramips/patches-4.4/0080-MIPS-ralink-fix-USB-frequency-scaling.patch > @@ -0,0 +1,33 @@ > +From ae28413b3b8901ea00af3571e1c90d0228976e16 Mon Sep 17 00:00:00 2001 > +From: John Crispin > +Date: Mon, 4 Jan 2016 20:23:57 +0100 > +Subject: [PATCH 80/81] MIPS: ralink: fix USB frequency scaling > + > +Commit 418d29c87061 ("MIPS: ralink: Unify SoC id handling") was not fully > +correct. The logic for the SoC check got inverted. We need to check if it > +is not a MT76x8. > + > +Signed-off-by: John Crispin > +Cc: linux-mips at linux-mips.org > +Patchwork: https://patchwork.linux-mips.org/patch/11992/ > +Signed-off-by: Ralf Baechle > +--- > + arch/mips/ralink/mt7620.c | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c > +index dfb04fc..fc19932 100644 > +--- a/arch/mips/ralink/mt7620.c > ++++ b/arch/mips/ralink/mt7620.c > +@@ -439,7 +439,7 @@ void __init ralink_clk_init(void) > + ralink_clk_add("10000c00.uartlite", periph_rate); > + ralink_clk_add("10180000.wmac", xtal_rate); > + > +- if (IS_ENABLED(CONFIG_USB) && is_mt76x8()) { > ++ if (IS_ENABLED(CONFIG_USB) && !is_mt76x8()) { > + /* > + * When the CPU goes into sleep mode, the BUS clock will be > + * too low for USB to function properly. Adjust the busses > +-- > +2.1.4 > + > -- > 2.1.4 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From karlp at tweak.net.au Fri Apr 15 06:01:00 2016 From: karlp at tweak.net.au (Karl Palsson) Date: Fri, 15 Apr 2016 10:01:00 -0000 Subject: [OpenWrt-Devel] [PATCH] toolchain/uClibc: enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL In-Reply-To: <1460659009-20497-1-git-send-email-abrodkin@synopsys.com> References: <1460659009-20497-1-git-send-email-abrodkin@synopsys.com> Message-ID: Alexey Brodkin wrote: > This is required to build net-snmp. What version of net-snmp are you using? Is this because ARC is still on uclibc instead of musl like everyone else? net-snmp (5.4.4) built fine (and still builds fine) on uclibc in the 15.05 branch. When are you planning on moving off uclibc? snmpnetstat isn't even installed, could you just disable building it? Cheers, Karl P > > If that options is disabled in uClibc then net-snmp doesn't > detect sighold support on its configuration stage and so > defines HAVE_SIGHOLD as 0. That in its turn causes compilation > of the following branch of timerPause() in apps/snmpnetstat: > ------------------>8---------------- > int oldmask; > oldmask = sigblock(sigmask(SIGALRM)); > if (!signalled) { > sigpause(0); > } > sigsetmask(oldmask); > ------------------>8---------------- > > Now in uClibc all 3 sigblock(), sigmask() and sigsetmask() were > removed back in 2005, see: > https://git.busybox.net/uClibc/commit/?id=5aa7aa7fa7ec2a0fe567ac0b2595b46add6f3594 > > And all that causes net-snmp linkage to fail this way: > ------------------>8---------------- .libs/if.o: In function > `intpr': if.c:(.text+0x908): undefined reference to `sigmask' > if.c:(.text+0x90e): undefined reference to `sigblock' > if.c:(.text+0x924): undefined reference to `sigsetmask' > ------------------>8---------------- > > If we enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL in uClibc then > branch with sighold is used in timerPause() and everything > builds as expected. > > Signed-off-by: Alexey Brodkin > --- > toolchain/uClibc/config/common | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/toolchain/uClibc/config/common > b/toolchain/uClibc/config/common index ec72701..b476639 100644 > --- a/toolchain/uClibc/config/common > +++ b/toolchain/uClibc/config/common > @@ -144,7 +144,7 @@ UCLIBC_HAS_LIBUTIL=y > UCLIBC_HAS_LONG_DOUBLE_MATH=y > UCLIBC_HAS_NETWORK_SUPPORT=y > UCLIBC_HAS_NFTW=y > -# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set > +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y > # UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set > UCLIBC_HAS_PRINTF_M_SPEC=y > # UCLIBC_HAS_PROFILING is not set > -- > 2.5.5 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP Digital Signature URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From nemesis at ninux.org Fri Apr 15 06:15:25 2016 From: nemesis at ninux.org (Nemesis) Date: Fri, 15 Apr 2016 12:15:25 +0200 Subject: [OpenWrt-Devel] [UCI] uci import -m duplicates list options In-Reply-To: References: <570E2583.2070108@ninux.org> Message-ID: <5710BF3D.3080406@ninux.org> On 04/13/2016 01:33 PM, Yousong Zhou wrote: > On 13 April 2016 at 18:54, Nemesis wrote: >> Hi, >> >> I've incurred in weird behaviour when using the import feature of the uci >> tool which seems to cause duplicates when importing configuration files that >> have "list" settings. >> >> To test this you can try to create a file in /tmp/network: >> >> config interface 'lan' >> list ipaddr '192.168.99.1/24' >> >> and then import it with: >> >> uci import -m -f /tmp/network network >> uci commit network >> >> then import it again: >> >> uci import -m -f /tmp/network network >> uci commit network >> >> results in: >> >> config interface 'lan' >> list ipaddr '192.168.99.1/24' >> list ipaddr '192.168.99.1/24' >> >> two questions: >> >> is this intended behaviour or is it a bug? >> can something like this break the configuration or OpenWRT will select just >> the last one? >> >> Thanks >> Federico > > There is currently no rule against duplicate entries in list type > options and there may exist a situation where values in a list are not > unique to each other. So I guess the result is expected. If the operation could be idempotent it would be nice. Federico _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Fri Apr 15 06:17:30 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Fri, 15 Apr 2016 12:17:30 +0200 Subject: [OpenWrt-Devel] [UCI] uci import -m duplicates list options In-Reply-To: <5710BF3D.3080406@ninux.org> References: <570E2583.2070108@ninux.org> <5710BF3D.3080406@ninux.org> Message-ID: <5710BFBA.8080002@openwrt.org> Hi. Just truncate the destination file beforehand. ~ Jow _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From nemesis at ninux.org Fri Apr 15 06:19:11 2016 From: nemesis at ninux.org (Nemesis) Date: Fri, 15 Apr 2016 12:19:11 +0200 Subject: [OpenWrt-Devel] [UCI] uci import -m duplicates list options In-Reply-To: <5710BFBA.8080002@openwrt.org> References: <570E2583.2070108@ninux.org> <5710BF3D.3080406@ninux.org> <5710BFBA.8080002@openwrt.org> Message-ID: <5710C01F.1080101@ninux.org> On 04/15/2016 12:17 PM, Jo-Philipp Wich wrote: > Hi. > > Just truncate the destination file beforehand. I'll resort to lua scripting to handle this, thanks. Federico _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Alexey.Brodkin at synopsys.com Fri Apr 15 06:53:46 2016 From: Alexey.Brodkin at synopsys.com (Alexey Brodkin) Date: Fri, 15 Apr 2016 10:53:46 +0000 Subject: [OpenWrt-Devel] [PATCH] toolchain/uClibc: enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL In-Reply-To: References: <1460659009-20497-1-git-send-email-abrodkin@synopsys.com> Message-ID: <1460717625.3025.20.camel@synopsys.com> Hi Karl, On Fri, 2016-04-15 at 10:01 +0000, Karl Palsson wrote: > Alexey Brodkin wrote: > > > > This is required to build net-snmp. > What version of net-snmp are you using? Is this because ARC is > still on uclibc instead of musl like everyone else? Indeed as of today the only libc for ARC is uClibc. We're working now on glibc port for ARC and once done will look at musl. > net-snmp (5.4.4) built fine (and still builds fine) on uclibc in the 15.05 > branch. Well frankly I haven't tried to build 15.05 so not really sure if net-snmp will be built with uClibc. But I'll be surprised if it will. Because from what I saw uClibc 0.9.33.2 used in 15.05 has no differences in regard of sighold and friends. I think I'll try it. Still IMHO observation that I made when building from current master is pretty valid but let's see what gives 15.05 building. > When are you planning on moving off uclibc? Well I don't have a solid answer for this. As I said we're working on glibc now and I think soon we'll be sending patches for upstream review but it will take some time before our port gets accepted upstream. In comparison ARC port of uClibc is now completely upstream in both olde good uClibc and its new and shiny uClibc-ng fork. And that's exactly what we want - use upstream projects but not a fork on our GitHub etc. > snmpnetstat isn't even installed, could you just disable building it? Essentially I may disable it but that's not a solution right? -Alexey _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From karlp at tweak.net.au Fri Apr 15 11:12:18 2016 From: karlp at tweak.net.au (Karl Palsson) Date: Fri, 15 Apr 2016 15:12:18 +0000 Subject: [OpenWrt-Devel] [PATCH] projects/uci: lua: use built in pkg-config support for alternatives Message-ID: <1460733138-23696-1-git-send-email-karlp@tweak.net.au> From: Karl Palsson Different distributions have different names for the lua 5.1 package. Use cmake's built in pkg-config support to search for the first one, rather than running it explicitly and searching for a single version. Signed-off-by: Karl Palsson --- This is the same as https://patchwork.ozlabs.org/patch/507965/ but for "uci" instead of libubox. This fixes compiling and basic usage on fedora23 with compat-lua-devel lua/CMakeLists.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt index 4ba8e37..b9f513a 100644 --- a/lua/CMakeLists.txt +++ b/lua/CMakeLists.txt @@ -5,14 +5,8 @@ PROJECT(uci C) SET(CMAKE_INSTALL_PREFIX /) IF(NOT LUA_CFLAGS) - FIND_PROGRAM(PKG_CONFIG pkg-config) - IF(PKG_CONFIG) - EXECUTE_PROCESS( - COMMAND pkg-config --silence-errors --cflags lua5.1 - OUTPUT_VARIABLE LUA_CFLAGS - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - ENDIF() + INCLUDE(FindPkgConfig) + pkg_search_module(LUA lua5.1 lua-5.1) ENDIF() ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -I.. ${LUA_CFLAGS}) -- 2.4.11 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mats.dev.list at gmail.com Sat Apr 16 15:27:42 2016 From: mats.dev.list at gmail.com (Mats Karrman) Date: Sat, 16 Apr 2016 21:27:42 +0200 Subject: [OpenWrt-Devel] [meta-python] python-m2crypto: fix SSLv2 symbol issue Message-ID: <5712922E.2040102@gmail.com> Hi! I haven't been on the list for a while so I'm sorry if the following is obsolete. I found a thread in the archive from early march with the same subject. I just run in to this problem and found it's not enough to /SWIG_FEATURES += "-DOPENSSL_NO_SSL2"/ but I also must do /SWIG_FEATURES_x86-64 += "-DOPENSSL_NO_SSL2"/ since the crda build seems to be depending on the python-m2crypto-native. BR, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mats.dev.list at gmail.com Sat Apr 16 17:18:18 2016 From: mats.dev.list at gmail.com (Mats Karrman) Date: Sat, 16 Apr 2016 23:18:18 +0200 Subject: [OpenWrt-Devel] [meta-python] python-m2crypto: fix SSLv2 symbol issue In-Reply-To: <5712922E.2040102@gmail.com> References: <5712922E.2040102@gmail.com> Message-ID: <5712AC1A.3060901@gmail.com> Hi! I haven't been on the list for a while so I'm sorry if the following is obsolete. I found a thread in the archive from early march with the same subject. I just run in to this problem and found it's not enough to SWIG_FEATURES += "-DOPENSSL_NO_SSL2" but I also must do SWIG_FEATURES_x86-64 += "-DOPENSSL_NO_SSL2" In my case, since the crda_3.18 build seems to be depending on the python-m2crypto-native. My setup: Build Configuration: BB_VERSION = "1.28.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "LinuxMint-2" TARGET_SYS = "arm-poky-linux-gnueabi" MACHINE = "rabbit" DISTRO = "poky" DISTRO_VERSION = "2.0.1" TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard cortexa9" TARGET_FPU = "vfp-neon" meta meta-yocto = "jethro:1a52eceaa5df89914b6a711defdcf0046e74c7f6" meta-oe meta-networking meta-python = "jethro:c305ac5d2f5285d5eec8952a4ca7f3b4f89aed96" meta-fsl-arm = "jethro:8d22b44716fa624ff87383c36d222d9e28d0b267" meta-fsl-arm-extra = "jethro:2fdd1f7729c11900126f6c73346b8ea89448e927" meta-local = "master:fd5bc78e9be96322c724f0353904c2d561156fc8" BR, Mats _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mats.dev.list at gmail.com Sat Apr 16 17:55:27 2016 From: mats.dev.list at gmail.com (Mats Karrman) Date: Sat, 16 Apr 2016 23:55:27 +0200 Subject: [OpenWrt-Devel] [meta-python] python-m2crypto: fix SSLv2 symbol issue In-Reply-To: <5712AC1A.3060901@gmail.com> References: <5712922E.2040102@gmail.com> <5712AC1A.3060901@gmail.com> Message-ID: <5712B4CF.4070301@gmail.com> Sorry, forget this, wrong list, too tired :-/ // Mats _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From freifunk at somakoma.de Sun Apr 17 04:59:16 2016 From: freifunk at somakoma.de (Manuel Munz) Date: Sun, 17 Apr 2016 10:59:16 +0200 Subject: [OpenWrt-Devel] [PATCH] hostapd.sh: Add support for "anonymous_identity" config field In-Reply-To: <1460046065-3754-1-git-send-email-kevin@koconnor.net> References: <1460046065-3754-1-git-send-email-kevin@koconnor.net> Message-ID: <57135064.1020407@somakoma.de> I had the same requirement for a connection with eduroam and came up with the same solution. I also tested the patch works. Should be commited. Reviewed-by: Manuel Munz On 07.04.2016 18:21, Kevin O'Connor wrote: > The wpa_supplicant supports an "anonymous_identity" field, which some > EAP networks require. From the documentation: > > anonymous_identity: Anonymous identity string for EAP (to be used as the > unencrypted identity with EAP types that support different tunnelled > identity, e.g., EAP-TTLS). > > This change modifies the hostapd.sh script to propagate this field > from the UCI config to the wpa_supplicant.conf file. > > Signed-off-by: Kevin O'Connor > --- > package/network/services/hostapd/files/netifd.sh | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh > index ad96b8b..005112d 100644 > --- a/package/network/services/hostapd/files/netifd.sh > +++ b/package/network/services/hostapd/files/netifd.sh > @@ -139,7 +139,7 @@ hostapd_common_add_bss_config() { > config_add_string nasid > config_add_string ownip > config_add_string iapp_interface > - config_add_string eap_type ca_cert client_cert identity auth priv_key priv_key_pwd > + config_add_string eap_type ca_cert client_cert identity anonymous_identity auth priv_key priv_key_pwd > > config_add_int dynamic_vlan vlan_naming > config_add_string vlan_tagged_interface vlan_bridge > @@ -623,9 +623,10 @@ wpa_supplicant_add_network() { > key_mgmt='WPA-EAP' > [ "$ieee80211r" -gt 0 ] && key_mgmt="FT-EAP $key_mgmt" > > - json_get_vars eap_type identity ca_cert > + json_get_vars eap_type identity anonymous_identity ca_cert > [ -n "$ca_cert" ] && append network_data "ca_cert=\"$ca_cert\"" "$N$T" > [ -n "$identity" ] && append network_data "identity=\"$identity\"" "$N$T" > + [ -n "$anonymous_identity" ] && append network_data "anonymous_identity=\"$anonymous_identity\"" "$N$T" > case "$eap_type" in > tls) > json_get_vars client_cert priv_key priv_key_pwd _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From freifunk at somakoma.de Sun Apr 17 05:32:50 2016 From: freifunk at somakoma.de (Manuel Munz) Date: Sun, 17 Apr 2016 11:32:50 +0200 Subject: [OpenWrt-Devel] [luci] [PATCH] luci-mod-admin-full: Add option to set anonymous_identity field In-Reply-To: <1460046131-3843-1-git-send-email-kevin@koconnor.net> References: <1460046131-3843-1-git-send-email-kevin@koconnor.net> Message-ID: <57135842.5000305@somakoma.de> On 07.04.2016 18:22, Kevin O'Connor wrote: > Add support for setting the "anonymous_identity" field on EAP type > networks. > > Signed-off-by: Kevin O'Connor > --- > Tested, worked. Reviewed-By: Manuel Munz _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From johnf at zioncluster.ca Sun Apr 17 07:55:34 2016 From: johnf at zioncluster.ca (John Marrett) Date: Sun, 17 Apr 2016 07:55:34 -0400 Subject: [OpenWrt-Devel] [PATCH] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1 Message-ID: Recent Archer C7 V2.0 units have changed flash chips to the gd25q128 chip, this is supported in trunk but not presently in 15.05. I would like stable support for this version so I've back ported the required fix [1] from the upstream kernel. I've tried to place this patch in order with the other flash support patches. I've tested it and I'm able to install a build of 15.05.1 on the device with this patch. Wireless and other functionality appears to be working properly. This is my first submitted patch for OpenWrt, please let me know on list or off if there are any issues. [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/mtd/spi-nor/spi-nor.c?id=fcc87a95195236b0935183361a72e4a98bf577d8 Signed-off-by: John Marrett diff --git a/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch b/target/linux/ar71xx/ new file mode 100644 index 0000000..c4a0a94 --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch @@ -0,0 +1,12 @@ +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c +=================================================================== +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-15 20:02:47.709062050 -0400 ++++ linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c 2016-04-16 07:41:06.071314788 -0400 +@@ -510,6 +510,7 @@ + /* GigaDevice */ + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, + + /* Intel/Numonyx -- xxxs33b */ + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 17 08:07:11 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 17 Apr 2016 14:07:11 +0200 Subject: [OpenWrt-Devel] [PATCH] netifd: Send DHCP release when client exits In-Reply-To: <1459419510-24449-3-git-send-email-dedeckeh@gmail.com> References: <1459419510-24449-1-git-send-email-dedeckeh@gmail.com> <1459419510-24449-3-git-send-email-dedeckeh@gmail.com> Message-ID: <57137C6F.9010905@hauke-m.de> On 03/31/2016 12:18 PM, Hans Dedecker wrote: > Let DHCP client send a release when it exists so the DHCP server is > informed the IP address is released and allowing to clean up IP/mac > state info in intermediate devices. > > Signed-off-by: Hans Dedecker I think in the normal case we should not send a release, so we can get the IP address back later. https://www.ietf.org/rfc/rfc2131.txt says in section 3.2 part 4.: Note that in this case, where the client retains its network address locally, the client will not normally relinquish its lease during a graceful shutdown. Only in the case where the client explicitly needs to relinquish its lease, e.g., the client is about to be moved to a different subnet, will the client send a DHCPRELEASE message. What about making this configurable? Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 17 08:18:49 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 17 Apr 2016 14:18:49 +0200 Subject: [OpenWrt-Devel] [PATCH] busybox: update to 1.24.2 In-Reply-To: <1458267288-9010-1-git-send-email-mkroken@gmail.com> References: <1458267288-9010-1-git-send-email-mkroken@gmail.com> Message-ID: <57137F29.9090302@hauke-m.de> On 03/18/2016 03:14 AM, Magnus Kroken wrote: > Signed-off-by: Magnus Kroken > --- > Runtime tested on mips/ar71xx and mipsel/brcm47xx > > Fixes since 1.24.1: > * scripts/trylink: fix static build with glibc again > * truncate: always set mode when opening file to avoid fortify errors > * [g]unzip: fix recent breakage. > * unzip: test for bad archive SEGVing > > package/utils/busybox/Config-defaults.in | 6 +++--- > package/utils/busybox/Makefile | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in > index ee42fa1..6c13a5d 100644 > --- a/package/utils/busybox/Config-defaults.in > +++ b/package/utils/busybox/Config-defaults.in > @@ -1971,13 +1971,13 @@ config BUSYBOX_DEFAULT_WGET > default n > config BUSYBOX_DEFAULT_FEATURE_WGET_STATUSBAR > bool > - default y > + default n > config BUSYBOX_DEFAULT_FEATURE_WGET_AUTHENTICATION > bool > - default y > + default n > config BUSYBOX_DEFAULT_FEATURE_WGET_LONG_OPTIONS > bool > - default y > + default n > config BUSYBOX_DEFAULT_FEATURE_WGET_TIMEOUT > bool > default n Why are you changing these default values? I do not see any commit between 1.24.1 and 1.24.2 that changes anything to Kconfig. Hauke > diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile > index 6a55d56..24c064c 100644 > --- a/package/utils/busybox/Makefile > +++ b/package/utils/busybox/Makefile > @@ -8,14 +8,14 @@ > include $(TOPDIR)/rules.mk > > PKG_NAME:=busybox > -PKG_VERSION:=1.24.1 > -PKG_RELEASE:=2 > +PKG_VERSION:=1.24.2 > +PKG_RELEASE:=1 > PKG_FLAGS:=essential > > PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 > PKG_SOURCE_URL:=http://www.busybox.net/downloads \ > http://distfiles.gentoo.org/distfiles/ > -PKG_MD5SUM:=be98a40cadf84ce2d6b05fa41a275c6a > +PKG_MD5SUM:=2eaae519cac1143bcf583636a745381f > > PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam > PKG_BUILD_PARALLEL:=1 > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 17 09:04:18 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 17 Apr 2016 15:04:18 +0200 Subject: [OpenWrt-Devel] [PATCH] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1 In-Reply-To: References: Message-ID: <571389D2.7050207@hauke-m.de> On 04/17/2016 01:55 PM, John Marrett wrote: > Recent Archer C7 V2.0 units have changed flash chips to the gd25q128 > chip, this is supported in trunk but not presently in 15.05. I would > like stable support for this version so I've back ported the required > fix [1] from the upstream kernel. I've tried to place this patch in > order with the other flash support patches. I've tested it and I'm > able to install a build of 15.05.1 on the device with this patch. > Wireless and other functionality appears to be working properly. > > This is my first submitted patch for OpenWrt, please let me know on > list or off if there are any issues. > > [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/mtd/spi-nor/spi-nor.c?id=fcc87a95195236b0935183361a72e4a98bf577d8 > > Signed-off-by: John Marrett > > diff --git a/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch > b/target/linux/ar71xx/ > new file mode 100644 > index 0000000..c4a0a94 > --- /dev/null > +++ b/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch > @@ -0,0 +1,12 @@ > +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c > +=================================================================== > +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-15 > 20:02:47.709062050 -0400 > ++++ linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c 2016-04-16 > 07:41:06.071314788 -0400 > +@@ -510,6 +510,7 @@ > + /* GigaDevice */ > + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, > + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, > ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, > + > + /* Intel/Numonyx -- xxxs33b */ > + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, This patch is already in trunk at target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch could you also place your change to the generic folder to keep it in sync with trunk. There is already a patch in cc for the bcm53xx target which also adds this line here: target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch this has to be modified when you add your patch to generic. Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 17 09:12:02 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 17 Apr 2016 15:12:02 +0200 Subject: [OpenWrt-Devel] [PATCH v3] package/utils/usbutils: Update USB IDs list and drop gzip compression In-Reply-To: <5706033E.6080601@pyret.net> References: <5706033E.6080601@pyret.net> Message-ID: <57138BA2.3040301@hauke-m.de> On 04/07/2016 08:50 AM, Daniel Engberg wrote: > Change mirror to Github (Gentoo repo) and drop the gzip compression. > Worst case there's about 4kbyte increase in size but most images ends up > beign somewhere between 4-100kbyte smaller due to the lzma compression. > > Tested on ar71xx using the uncompressed version reduces the size when it is added to the squasfs image, but what happens when it gets installed later to the the overlay file system? Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From johnf at zioncluster.ca Sun Apr 17 09:17:41 2016 From: johnf at zioncluster.ca (John Marrett) Date: Sun, 17 Apr 2016 09:17:41 -0400 Subject: [OpenWrt-Devel] [PATCH] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1 In-Reply-To: <571389D2.7050207@hauke-m.de> References: <571389D2.7050207@hauke-m.de> Message-ID: Hauke, I want to make certain I get the updated patch right; I should integrate target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch patch (which, because of its order, results in pushes down in some other flash files) and adjust the target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch to avoid a conflict because of the change? Please confirm and I'll make the appropriate adjustments. Thank you for taking the time to review my submission, -JohnF On Sun, Apr 17, 2016 at 9:04 AM, Hauke Mehrtens wrote: > On 04/17/2016 01:55 PM, John Marrett wrote: >> Recent Archer C7 V2.0 units have changed flash chips to the gd25q128 >> chip, this is supported in trunk but not presently in 15.05. I would >> like stable support for this version so I've back ported the required >> fix [1] from the upstream kernel. I've tried to place this patch in >> order with the other flash support patches. I've tested it and I'm >> able to install a build of 15.05.1 on the device with this patch. >> Wireless and other functionality appears to be working properly. >> >> This is my first submitted patch for OpenWrt, please let me know on >> list or off if there are any issues. >> >> [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/mtd/spi-nor/spi-nor.c?id=fcc87a95195236b0935183361a72e4a98bf577d8 >> >> Signed-off-by: John Marrett >> >> diff --git a/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch >> b/target/linux/ar71xx/ >> new file mode 100644 >> index 0000000..c4a0a94 >> --- /dev/null >> +++ b/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch >> @@ -0,0 +1,12 @@ >> +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c >> +=================================================================== >> +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-15 >> 20:02:47.709062050 -0400 >> ++++ linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c 2016-04-16 >> 07:41:06.071314788 -0400 >> +@@ -510,6 +510,7 @@ >> + /* GigaDevice */ >> + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, >> + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, >> ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, >> + >> + /* Intel/Numonyx -- xxxs33b */ >> + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, > > This patch is already in trunk at > target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch > could you also place your change to the generic folder to keep it in > sync with trunk. > > There is already a patch in cc for the bcm53xx target which also adds > this line here: > target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch this > has to be modified when you add your patch to generic. > > Hauke > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 17 11:41:39 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 17 Apr 2016 17:41:39 +0200 Subject: [OpenWrt-Devel] [PATCH] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1 In-Reply-To: References: <571389D2.7050207@hauke-m.de> Message-ID: <5713AEB3.6080909@hauke-m.de> On 04/17/2016 03:17 PM, John Marrett wrote: > Hauke, > > I want to make certain I get the updated patch right; I should > integrate target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch > patch (which, because of its order, results in pushes down in some > other flash files) and adjust the > target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch to > avoid a conflict because of the change? > > Please confirm and I'll make the appropriate adjustments. yes > > Thank you for taking the time to review my submission, > > -JohnF > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mkroken at gmail.com Sun Apr 17 12:02:26 2016 From: mkroken at gmail.com (Magnus Kroken) Date: Sun, 17 Apr 2016 18:02:26 +0200 Subject: [OpenWrt-Devel] [PATCH] busybox: update to 1.24.2 In-Reply-To: <57137F29.9090302@hauke-m.de> References: <1458267288-9010-1-git-send-email-mkroken@gmail.com> <57137F29.9090302@hauke-m.de> Message-ID: <5713B392.4000805@gmail.com> On 17.04.2016 14.18, Hauke Mehrtens wrote: > Why are you changing these default values? I do not see any commit > between 1.24.1 and 1.24.2 that changes anything to Kconfig. > > Hauke Sorry, you are right. I ran the config update scripts, I interpreted r47775 [1] as that should always be done when doing a version update. [1]: https://dev.openwrt.org/changeset/47775 /Magnus _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kris at kriskinc.com Sun Apr 17 14:06:58 2016 From: kris at kriskinc.com (Kristian Kielhofner) Date: Sun, 17 Apr 2016 14:06:58 -0400 Subject: [OpenWrt-Devel] [PATCH] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1 In-Reply-To: References: Message-ID: Specifically this applies to units manufactured in December of 2015 or later; serial numbers starting with 215C. On Sun, Apr 17, 2016 at 7:55 AM, John Marrett wrote: > Recent Archer C7 V2.0 units have changed flash chips to the gd25q128 > chip, this is supported in trunk but not presently in 15.05. I would > like stable support for this version so I've back ported the required > fix [1] from the upstream kernel. I've tried to place this patch in > order with the other flash support patches. I've tested it and I'm > able to install a build of 15.05.1 on the device with this patch. > Wireless and other functionality appears to be working properly. > > This is my first submitted patch for OpenWrt, please let me know on > list or off if there are any issues. > > [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/mtd/spi-nor/spi-nor.c?id=fcc87a95195236b0935183361a72e4a98bf577d8 > > Signed-off-by: John Marrett > > diff --git a/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch > b/target/linux/ar71xx/ > new file mode 100644 > index 0000000..c4a0a94 > --- /dev/null > +++ b/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch > @@ -0,0 +1,12 @@ > +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c > +=================================================================== > +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-15 > 20:02:47.709062050 -0400 > ++++ linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c 2016-04-16 > 07:41:06.071314788 -0400 > +@@ -510,6 +510,7 @@ > + /* GigaDevice */ > + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, > + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, > ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, > + > + /* Intel/Numonyx -- xxxs33b */ > + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Kristian Kielhofner _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From johnf at zioncluster.ca Sun Apr 17 14:39:35 2016 From: johnf at zioncluster.ca (John Marrett) Date: Sun, 17 Apr 2016 14:39:35 -0400 Subject: [OpenWrt-Devel] [PATCH] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1 In-Reply-To: References: Message-ID: Kristian, On Sun, Apr 17, 2016 at 2:06 PM, Kristian Kielhofner wrote: > Specifically this applies to units manufactured in December of 2015 or > later; serial numbers starting with 215C. Thank you for that detail, I see that my router does have a serial number that meets that pattern, I'll update the wiki with this information. Hauke, > I want to make certain I get the updated patch right; I should > integrate target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch > patch (which, because of its order, results in pushes down in some > other flash files) and adjust the > target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch to > avoid a conflict because of the change? I could patch it as planned, however as far as I can tell this file contains a large table of flash chip identifiers. Is there a reason I wouldn't want to create a new single patch that updates the entire "static const struct spi_device_id spi_nor_ids[]" table? This would also consoldiate the table updates out of the following patches. target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch target/linux/generic/patches-3.18/474-mtd-spi-nor-add-support-for-the-ISSI-SI25CD512-SPI-f.patch target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch target/linux/generic/patches-3.18/472-mtd-m25p80-add-support-for-Winbond-W25X05-flash.patch target/linux/generic/patches-3.18/473-mtd-spi-nor-add-support-for-the-Macronix-MX25L512E-S.patch target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch target/linux/bcm53xx/patches-3.18/003-mtd-spi-nor-from-3.19.patch I could create the new single patch for both trunk and 15.05.1 and bring these updates into a single place under target/linux/generic. Please let me know if this makes sense or if I'm better off limiting the scope as originally described? I'm aware that there are non-table updates on the other patches, I'll leave those parts alone. -JohnF _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.engberg.lists at pyret.net Sun Apr 17 19:11:38 2016 From: daniel.engberg.lists at pyret.net (Daniel Engberg) Date: Mon, 18 Apr 2016 01:11:38 +0200 Subject: [OpenWrt-Devel] [PATCH v3] package/utils/usbutils: Update USB IDs list and drop gzip compression In-Reply-To: <57138BA2.3040301@hauke-m.de> References: <5706033E.6080601@pyret.net> <57138BA2.3040301@hauke-m.de> Message-ID: <5714182A.8010501@pyret.net> On 2016-04-17 15:12, Hauke Mehrtens wrote: > On 04/07/2016 08:50 AM, Daniel Engberg wrote: >> Change mirror to Github (Gentoo repo) and drop the gzip compression. >> Worst case there's about 4kbyte increase in size but most images ends up >> beign somewhere between 4-100kbyte smaller due to the lzma compression. >> >> Tested on ar71xx > > using the uncompressed version reduces the size when it is added to the > squasfs image, but what happens when it gets installed later to the the > overlay file system? > > Hauke > I haven't tested but the end result should be similar as according to the wiki the jffs2 filesystem also uses lzma compression. https://wiki.openwrt.org/doc/techref/filesystems#jffs2 //Daniel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Mon Apr 18 05:01:09 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Mon, 18 Apr 2016 11:01:09 +0200 Subject: [OpenWrt-Devel] [PATCH] netifd: Send DHCP release when client exits In-Reply-To: <57137C6F.9010905@hauke-m.de> References: <1459419510-24449-1-git-send-email-dedeckeh@gmail.com> <1459419510-24449-3-git-send-email-dedeckeh@gmail.com> <57137C6F.9010905@hauke-m.de> Message-ID: On Sun, Apr 17, 2016 at 2:07 PM, Hauke Mehrtens wrote: > On 03/31/2016 12:18 PM, Hans Dedecker wrote: > > Let DHCP client send a release when it exists so the DHCP server is > > informed the IP address is released and allowing to clean up IP/mac > > state info in intermediate devices. > > > > Signed-off-by: Hans Dedecker > > I think in the normal case we should not send a release, so we can get > the IP address back later. > > https://www.ietf.org/rfc/rfc2131.txt says in section 3.2 part 4.: > Note that in this case, where the client retains its network > address locally, the client will not normally relinquish its > lease during a graceful shutdown. Only in the case where the > client explicitly needs to relinquish its lease, e.g., the client > is about to be moved to a different subnet, will the client send > a DHCPRELEASE message. > It's a bit ambiguous to interprete (like so many statements in rfc2131 :) ) as we don't keep the IP address locally when the udhcpc client is shutdown. > > What about making this configurable? Fine to make it configurable; will send a follow-up patch in one of the next days Hans > > Hauke > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From adron at yapic.net Mon Apr 18 06:05:07 2016 From: adron at yapic.net (adron at yapic.net) Date: Mon, 18 Apr 2016 13:05:07 +0300 Subject: [OpenWrt-Devel] [PATCH] ar71xx: add tools/kernel2minor package for Mikrotik NOR flash devices. Message-ID: <1460973907-20270-1-git-send-email-adron@yapic.net> From: Sergey Sergeev kernel2minor tool is used for packing openwrt kernel into modified yaffs2 file system image. This is necessary to boot via Routerboot on new Mikrotik NOR flash devices. --- config/Config-images.in | 7 +++++++ target/linux/ar71xx/image/Makefile | 3 +++ target/linux/ar71xx/mikrotik/target.mk | 2 +- tools/Makefile | 1 + tools/kernel2minor/Makefile | 35 ++++++++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 tools/kernel2minor/Makefile diff --git a/config/Config-images.in b/config/Config-images.in index a60dd50..339a5fd 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -6,6 +6,13 @@ menu "Target Images" + config TARGET_KERNEL_MINOR_YAFFS2 + bool "kernel.minor-yaffs2" + default n + depends on TARGET_ar71xx_mikrotik + help + Build a Mikrotik Nor Yaffs2 kernel filesystem for RouterBoot + menuconfig TARGET_ROOTFS_INITRAMFS bool "ramdisk" default y if USES_INITRAMFS diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e4e2fcf..64bec18 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1658,6 +1658,9 @@ define Image/BuildKernel $(call MkuImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(UIMAGE)-gzip.bin) $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin) cp $(KDIR)/loader-generic.elf $(VMLINUX)-lzma.elf + ifeq ($(CONFIG_TARGET_KERNEL_MINOR_YAFFS2),y) + $(STAGING_DIR_HOST)/bin/kernel2minor -k $(KDIR)/loader-generic.elf -r $(VMLINUX)-lzma.minor-yaffs2 -e + endif -mkdir -p $(KDIR_TMP) $(call Image/Build/Profile/$(IMAGE_PROFILE),buildkernel) endef diff --git a/target/linux/ar71xx/mikrotik/target.mk b/target/linux/ar71xx/mikrotik/target.mk index b2fb0df..250252e 100644 --- a/target/linux/ar71xx/mikrotik/target.mk +++ b/target/linux/ar71xx/mikrotik/target.mk @@ -1,4 +1,4 @@ -BOARDNAME:=Mikrotik devices with NAND flash +BOARDNAME:=Mikrotik devices with NAND/NOR flash FEATURES += targz ramdisk define Target/Description diff --git a/tools/Makefile b/tools/Makefile index 187655e..2ea66c40 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -38,6 +38,7 @@ tools-$(CONFIG_TARGET_x86) += qemu tools-$(CONFIG_TARGET_mxs) += elftosb sdimage tools-$(CONFIG_TARGET_brcm2708)$(CONFIG_TARGET_sunxi)$(CONFIG_TARGET_mxs) += mtools dosfstools tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs +tools-$(CONFIG_TARGET_ar71xx_mikrotik) += kernel2minor tools-y += lzma squashfs4 tools-$(BUILD_B43_TOOLS) += b43-tools tools-$(BUILD_PPL_CLOOG) += ppl cloog diff --git a/tools/kernel2minor/Makefile b/tools/kernel2minor/Makefile new file mode 100644 index 0000000..abf4d90 --- /dev/null +++ b/tools/kernel2minor/Makefile @@ -0,0 +1,35 @@ +# +# Copyright (C) 2016 adron at yapic.net +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +include $(TOPDIR)/rules.mk + +PKG_NAME:=kernel2minor +PKG_VERSION:=0.01 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/adron-s/kernel2minor.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=8d59a129acb5663e130a002e47ba2e05d7e29c57 + +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/host-build.mk + +define Host/Compile + $(MAKE) -C $(HOST_BUILD_DIR) +endef + +define Host/Install + $(INSTALL_BIN) $(HOST_BUILD_DIR)/kernel2minor $(STAGING_DIR_HOST)/bin/ +endef + +define Host/Clean + rm -f $(STAGING_DIR_HOST)/bin/kernel2minor +endef + +$(eval $(call HostBuild)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bjorn at mork.no Mon Apr 18 07:22:19 2016 From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=) Date: Mon, 18 Apr 2016 13:22:19 +0200 Subject: [OpenWrt-Devel] [PATCH] netifd: Send DHCP release when client exits In-Reply-To: (Hans Dedecker's message of "Mon, 18 Apr 2016 11:01:09 +0200") References: <1459419510-24449-1-git-send-email-dedeckeh@gmail.com> <1459419510-24449-3-git-send-email-dedeckeh@gmail.com> <57137C6F.9010905@hauke-m.de> Message-ID: <87bn5788lw.fsf@nemi.mork.no> Hans Dedecker writes: > On Sun, Apr 17, 2016 at 2:07 PM, Hauke Mehrtens wrote: > >> https://www.ietf.org/rfc/rfc2131.txt says in section 3.2 part 4.: >> Note that in this case, where the client retains its network >> address locally, the client will not normally relinquish its >> lease during a graceful shutdown. Only in the case where the >> client explicitly needs to relinquish its lease, e.g., the client >> is about to be moved to a different subnet, will the client send >> a DHCPRELEASE message. >> > It's a bit ambiguous to interprete (like so many statements in rfc2131 :) ) > as we don't keep the IP address locally when the udhcpc client is shutdown. I don't read it as ambigious at all. RFC2131 clearly states that the client need not send DHCPRELEASE on shutdown. The exact wording is (twice - both in section 3.1 and 3.2): The client may choose to relinquish its lease on a network address by sending a DHCPRELEASE message to the server. The "may choose" is hard to interprete in any other way than being entirely optional. There is nothing ambigious about that. So the question boils down to whether automatically sending DHCPRELEASE is an advantage or not. I guess this might depend on your use case, but IMHO it is definitely not. Why would anyone want their address to change every time they reboot the system? They don't. I understand that there might be situations where you do want to send DHCPRELEASE. But that is more suitable for an explicit command. It is not something you want to do automatically without having precise instructions to do so from the user. Please do not add this bug to the DHCP client. Thanks. Bj?rn _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Mon Apr 18 07:51:35 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Mon, 18 Apr 2016 13:51:35 +0200 Subject: [OpenWrt-Devel] [PATCH] netifd: Send DHCP release when client exits In-Reply-To: <87bn5788lw.fsf@nemi.mork.no> References: <1459419510-24449-1-git-send-email-dedeckeh@gmail.com> <1459419510-24449-3-git-send-email-dedeckeh@gmail.com> <57137C6F.9010905@hauke-m.de> <87bn5788lw.fsf@nemi.mork.no> Message-ID: On Mon, Apr 18, 2016 at 1:22 PM, Bj?rn Mork wrote: > Hans Dedecker writes: > > On Sun, Apr 17, 2016 at 2:07 PM, Hauke Mehrtens > wrote: > > > >> https://www.ietf.org/rfc/rfc2131.txt says in section 3.2 part 4.: > >> Note that in this case, where the client retains its network > >> address locally, the client will not normally relinquish its > >> lease during a graceful shutdown. Only in the case where the > >> client explicitly needs to relinquish its lease, e.g., the client > >> is about to be moved to a different subnet, will the client send > >> a DHCPRELEASE message. > >> > > It's a bit ambiguous to interprete (like so many statements in rfc2131 > :) ) > > as we don't keep the IP address locally when the udhcpc client is > shutdown. > > I don't read it as ambigious at all. > > RFC2131 clearly states that the client need not send DHCPRELEASE on > shutdown. The exact wording is (twice - both in section 3.1 and 3.2): > > The client may choose to relinquish its lease on a network address > by sending a DHCPRELEASE message to the server. > > The "may choose" is hard to interprete in any other way than being > entirely optional. There is nothing ambigious about that. > > So the question boils down to whether automatically sending DHCPRELEASE > is an advantage or not. I guess this might depend on your use case, but > IMHO it is definitely not. Why would anyone want their address to > change every time they reboot the system? They don't. > As you mention this depends on the use case and has to be seen in a more broader network scope; devices in networks which snoop DHCP messages can hold mac/IP address state info. If the IP address is not being used anymore by a gateway on a wan interface they want to be informed about this by a release message so the mac/IP address state can be removed. > > I understand that there might be situations where you do want to send > DHCPRELEASE. But that is more suitable for an explicit command. It is > not something you want to do automatically without having precise > instructions to do so from the user. > > Please do not add this bug to the DHCP client. Thanks. > Making it configurable via UCI and keeping the default behavior will not introduce a bug Hans > > > > Bj?rn > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Mon Apr 18 08:15:42 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Mon, 18 Apr 2016 14:15:42 +0200 Subject: [OpenWrt-Devel] [RFC] ag71xx: Enable flow control for builtin switch port Message-ID: <1460981742-17048-1-git-send-email-sven@open-mesh.com> From: Sven Eckelmann The port connected to the internal switch tends to drop a lot of packets when a lot of data is transferred over it. This is especially visible when IP fragmentation happens for large UDP and ICMP packets. An easy test for this is # works ping 192.168.1.23 # doesn't work ping -s 65507 192.168.1.23 But enabling flow control on ports without the builtin switch seems to break the connection completely in some situations. This was for example detected when a QCA955x with AR98533 on GMAC1 was started with an active link on this port. So only enable it for SoC ethernet devices with switch attached. This closes #19498 Signed-off-by: Sven Eckelmann --- This is only an RFC because Felix reverted a similar change in r27034. Unfortunately, the revert commit doesn't contain enough information to find out if this problem would also happen when only activating flow control on the switch port port or when only enabling TX and not RX flow control (or the other way around). .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index 0832059..208b1d6 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -455,7 +455,11 @@ static void ag71xx_hw_setup(struct ag71xx *ag) struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); /* setup MAC configuration registers */ - ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, MAC_CFG1_INIT); + if (pdata->is_ar724x && pdata->switch_data) + ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, + MAC_CFG1_INIT | MAC_CFG1_TFC | MAC_CFG1_RFC); + else + ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, MAC_CFG1_INIT); ag71xx_sb(ag, AG71XX_REG_MAC_CFG2, MAC_CFG2_PAD_CRC_EN | MAC_CFG2_LEN_CHECK); -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From johnf at zioncluster.ca Mon Apr 18 15:45:15 2016 From: johnf at zioncluster.ca (John Marrett) Date: Mon, 18 Apr 2016 15:45:15 -0400 Subject: [OpenWrt-Devel] [PATCHv2] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1 Message-ID: I've updated the patch based on Hauke's feedback. I'm removing the update info from existing patch target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch and using the name target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support matching the patch from trunk. Signed-off-by: John Marrett diff --git a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch index ab7b0bb..acdbb1f 100644 --- a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch +++ b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch @@ -1,13 +1,5 @@ --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -538,6 +538,7 @@ static const struct spi_device_id spi_no - /* GigaDevice */ - { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, - { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, -+ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, - - /* Intel/Numonyx -- xxxs33b */ - { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, @@ -564,14 +565,14 @@ static const struct spi_device_id spi_no { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, diff --git a/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support new file mode 100644 index 0000000..2f0fc18 --- /dev/null +++ b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch @@ -0,0 +1,12 @@ +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c +=================================================================== +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-18 11:31:18.970916900 -0400 ++++ linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c 2016-04-18 11:40:17.401622014 -0400 +@@ -510,6 +510,7 @@ + /* GigaDevice */ + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, + + /* Intel/Numonyx -- xxxs33b */ + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From psidhu at gateworks.com Mon Apr 18 18:37:56 2016 From: psidhu at gateworks.com (Pushpal Sidhu) Date: Mon, 18 Apr 2016 15:37:56 -0700 Subject: [OpenWrt-Devel] [PATCH] imx6: images: add bootfs.tar.gz build artifact Message-ID: <1461019076-24321-1-git-send-email-psidhu@gateworks.com> In order to create a bootable block storage device, both bootfs and rootfs tarballs are required. However, our current scheme does not export a bootfs tarball so add the packaging of it here. Signed-off-by: Pushpal Sidhu --- target/linux/imx6/image/Makefile | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index e0017d0..910f88c 100644 --- a/target/linux/imx6/image/Makefile +++ b/target/linux/imx6/image/Makefile @@ -67,6 +67,34 @@ define Build/ubi-boot-overlay ) endef +define Build/bootfs.tar.gz + # boot filesystem + rm -rf $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME) + mkdir -p $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME) + $(CP) $< $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/$(IMG_PREFIX)-uImage + ln -sf $(IMG_PREFIX)-uImage \ + $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/uImage + $(foreach dts,$(shell echo $(DEVICE_DTS)), \ + $(CP) $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(dts).dtb \ + $(BIN_DIR)/$(IMG_PREFIX)-$(dts).dtb; \ + $(CP) $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(dts).dtb \ + $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/$(IMG_PREFIX)-$(dts).dtb; \ + ln -sf $(IMG_PREFIX)-$(dts).dtb \ + $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/$(dts).dtb; \ + ) + mkimage -A arm -O linux -T script -C none -a 0 -e 0 \ + -n '$(DEVICE_ID) OpenWrt bootscript' \ + -d ./bootscript-$(DEVICE_NAME) \ + $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/6x_bootscript-$(DEVICE_NAME) + + # tar and zip + ( \ + cd $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME); \ + $(TAR) --numeric-owner --owner=0 --group=0 --transform "s,./,./boot/," \ + -czvf $(BIN_DIR)/$(IMG_PREFIX)-$(DEVICE_NAME)-bootfs.tar.gz . ; \ + ) +endef + ################################################# # Devices ################################################# @@ -103,9 +131,10 @@ define Device/ventana imx6q-gw5400-a \ imx6q-gw551x \ imx6q-gw552x - IMAGES := nand_normal.ubi nand_large.ubi + IMAGES := nand_normal.ubi nand_large.ubi bootfs.tar.gz IMAGE/nand_normal.ubi := ubi-boot-overlay normal 2048 124KiB 128KiB 8124 IMAGE/nand_large.ubi := ubi-boot-overlay large 4096 248KiB 256KiB 8124 + IMAGE/bootfs.tar.gz := bootfs.tar.gz IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2) endef -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Tue Apr 19 08:29:53 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Tue, 19 Apr 2016 14:29:53 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] oxnas: add support for Akitio MyCloud mini Message-ID: <20160419122948.GA2378@makrotopia.org> Signed-off-by: Daniel Golle --- package/boot/uboot-envtools/files/oxnas | 1 + target/linux/oxnas/base-files/etc/board.d/01_leds | 3 + target/linux/oxnas/base-files/etc/diag.sh | 3 + target/linux/oxnas/base-files/lib/oxnas.sh | 3 + .../oxnas/files/arch/arm/boot/dts/ox820-akitio.dts | 132 +++++++++++++++++++++ target/linux/oxnas/image/Makefile | 6 +- .../linux/oxnas/patches-4.4/900-more-boards.patch | 5 +- target/linux/oxnas/profiles/akitio.mk | 17 +++ 8 files changed, 167 insertions(+), 3 deletions(-) create mode 100644 target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts create mode 100644 target/linux/oxnas/profiles/akitio.mk diff --git a/package/boot/uboot-envtools/files/oxnas b/package/boot/uboot-envtools/files/oxnas index 063ffa0..e560e22 100644 --- a/package/boot/uboot-envtools/files/oxnas +++ b/package/boot/uboot-envtools/files/oxnas @@ -14,6 +14,7 @@ touch /etc/config/ubootenv board=$(oxnas_board_name) case "$board" in +akitio | \ stg212 | \ kd20) ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x4000" "0x1F000" "1" diff --git a/target/linux/oxnas/base-files/etc/board.d/01_leds b/target/linux/oxnas/base-files/etc/board.d/01_leds index af565d7..b4b598c 100755 --- a/target/linux/oxnas/base-files/etc/board.d/01_leds +++ b/target/linux/oxnas/base-files/etc/board.d/01_leds @@ -7,6 +7,9 @@ board=$(oxnas_board_name) board_config_update case $board in + akitio) + ucidef_set_led_default "status" "status" "akitio:red:status" "0" + ;; stg212) ucidef_set_led_default "power" "power" "zyxel:blue:status" "1" ucidef_set_led_usbdev "usb" "USB" "zyxel:orange:copy" "1-1" diff --git a/target/linux/oxnas/base-files/etc/diag.sh b/target/linux/oxnas/base-files/etc/diag.sh index 5aec796..51771f3 100644 --- a/target/linux/oxnas/base-files/etc/diag.sh +++ b/target/linux/oxnas/base-files/etc/diag.sh @@ -6,6 +6,9 @@ get_status_led() { case $(oxnas_board_name) in + akitio) + status_led="akitio:red:status" + ;; stg212) status_led="zyxel:blue:status" ;; diff --git a/target/linux/oxnas/base-files/lib/oxnas.sh b/target/linux/oxnas/base-files/lib/oxnas.sh index 8ae5fbb..991f927 100755 --- a/target/linux/oxnas/base-files/lib/oxnas.sh +++ b/target/linux/oxnas/base-files/lib/oxnas.sh @@ -13,6 +13,9 @@ oxnas_board_detect() { machine=$(cat /proc/device-tree/model) case "$machine" in + *"Akitio MyCloud mini"*) + name="akitio" + ;; *"MitraStar Technology Corp. STG-212"*) name="stg212" ;; diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts new file mode 100644 index 0000000..5da4fa4 --- /dev/null +++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts @@ -0,0 +1,132 @@ +/* + * Copyright (C) 2016 Daniel Golle + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/dts-v1/; +#include "ox820.dtsi" + +/ { + model = "Akitio MyCloud mini"; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk=serial"; + }; + + pcie-controller at 47C00000 { + status = "disabled"; + }; + + uart at 44200000 { + status = "okay"; + }; + + sata at 45900000 { + status = "okay"; + nr-ports = <2>; + }; + + nand at 41000000 { + status = "okay"; + + partition at 0 { + label = "boot"; + reg = <0x0 0x26c0000>; + }; + + partition at 26c0000 { + label = "ubi"; + reg = <0x26c0000 0xd940000>; + }; + }; + + ethernet at 40400000 { + status = "okay"; + }; + + ehci at 40200100 { + status = "okay"; + }; + + i2c-gpio { + compatible = "i2c-gpio"; + gpios = <&GPIOB 9 0 &GPIOB 10 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c>; + i2c-gpio,delay-us = <10>; + #address-cells = <1>; + #size-cells = <0>; + ds1307: rtc at 68 { + compatible = "dallas,ds1307"; + reg = <0x68>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_buttons>; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + power { + label = "power"; + gpios = <&GPIOA 11 1>; + linux,code = <116>; + } + reset { + label = "reset"; + gpios = <&GPIOB 6 1>; + linux,code = <0x198>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds>; + status { + label = "akitio:red:status"; + gpios = <&GPIOA 29 0>; + }; + }; + + gpio-poweroff { + compatible = "gpio-poweroff"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_poweroff>; + gpios = <&GPIOB 13 2>; + }; + + pinctrl { + i2c { + pinctrl_i2c: i2c-0 { + plxtech,pins = + <1 9 0 4 /* MF_B9 GPIO debounce */ + 1 10 0 4>; /* MF_B10 GPIO debounce */ + }; + }; + buttons { + pinctrl_buttons: buttons-0 { + plxtech,pins = + <0 11 0 0 /* MF_A11 GPIO */ + 1 6 0 0>; /* MF_B6 GPIO */ + }; + }; + leds { + pinctrl_leds: leds-0 { + plxtech,pins = + <0 29 0 0>; /* MF_A29 GPIO */ + }; + }; + poweroff { + pinctrl_poweroff: poweroff-0 { + plxtech,pins = + <1 13 0 0>; /* MF_B13 GPIO */ + }; + }; + }; +}; diff --git a/target/linux/oxnas/image/Makefile b/target/linux/oxnas/image/Makefile index ae1050e..27da2da 100644 --- a/target/linux/oxnas/image/Makefile +++ b/target/linux/oxnas/image/Makefile @@ -18,7 +18,7 @@ DEVICE_VARS += DEVICE_DTS KERNEL_SIZE PAGESIZE BLOCKSIZE SUBPAGESIZE DEVICE_VARS += KERNEL_IN_UBI UBOOTENV_IN_UBI UBIFS_OPTS KERNEL_LOADADDR := 0x60008000 -TARGET_DEVICES = kd20 pogoplug-pro pogoplug-v3 stg212 +TARGET_DEVICES = akitio kd20 pogoplug-pro pogoplug-v3 stg212 define Device/Default KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) @@ -38,6 +38,10 @@ define Device/Default UBOOTENV_IN_UBI := 1 endef +define Device/akitio + PROFILES := Default AKITIO + DEVICE_DTS := ox820-akitio +endef define Device/kd20 PROFILES := Default KD20 diff --git a/target/linux/oxnas/patches-4.4/900-more-boards.patch b/target/linux/oxnas/patches-4.4/900-more-boards.patch index 19e1e82..f41fa86 100644 --- a/target/linux/oxnas/patches-4.4/900-more-boards.patch +++ b/target/linux/oxnas/patches-4.4/900-more-boards.patch @@ -1,11 +1,12 @@ --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -497,7 +497,10 @@ dtb-$(CONFIG_ARCH_ORION5X) += \ +@@ -497,7 +497,11 @@ dtb-$(CONFIG_ARCH_ORION5X) += \ orion5x-lswsgl.dtb \ orion5x-maxtor-shared-storage-2.dtb \ orion5x-rd88f5182-nas.dtb -dtb-$(CONFIG_ARCH_OXNAS) += ox820-pogoplug-pro.dtb -+dtb-$(CONFIG_ARCH_OXNAS) += ox820-pogoplug-pro.dtb \ ++dtb-$(CONFIG_ARCH_OXNAS) += ox820-akitio.dtb \ ++ ox820-pogoplug-pro.dtb \ + ox820-pogoplug-v3.dtb \ + ox820-stg212.dtb \ + ox820-kd20.dtb diff --git a/target/linux/oxnas/profiles/akitio.mk b/target/linux/oxnas/profiles/akitio.mk new file mode 100644 index 0000000..a108601 --- /dev/null +++ b/target/linux/oxnas/profiles/akitio.mk @@ -0,0 +1,17 @@ +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/AKITIO + NAME:=Akitio MyCloud mini / Silverstone DC01 + PACKAGES:= \ + kmod-usb-storage kmod-i2c-gpio kmod-rtc-ds1307 +endef + +define Profile/AKITIO/Description + Profile for the Akitio MyCloud mini aka. Silverstone DC01 +endef + +$(eval $(call Profile,AKITIO)) -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Tue Apr 19 08:30:15 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Tue, 19 Apr 2016 14:30:15 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] oxnas: clean-up and improve profiles Message-ID: <20160419123010.GA2401@makrotopia.org> Signed-off-by: Daniel Golle --- target/linux/oxnas/profiles/00-default.mk | 9 ++++++--- target/linux/oxnas/profiles/cloudengines.mk | 26 ++++++++++++++++++++++++++ target/linux/oxnas/profiles/pogoplug.mk | 26 -------------------------- 3 files changed, 32 insertions(+), 29 deletions(-) create mode 100644 target/linux/oxnas/profiles/cloudengines.mk delete mode 100644 target/linux/oxnas/profiles/pogoplug.mk diff --git a/target/linux/oxnas/profiles/00-default.mk b/target/linux/oxnas/profiles/00-default.mk index fb04ba7..67f866e 100644 --- a/target/linux/oxnas/profiles/00-default.mk +++ b/target/linux/oxnas/profiles/00-default.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2011 OpenWrt.org +# Copyright (C) 2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,11 +8,14 @@ define Profile/Default NAME:=Default Profile PACKAGES:=\ - kmod-usb-core kmod-usb3 \ - kmod-ledtrig-usbdev + kmod-usb-core kmod-usb3 kmod-ledtrig-usbdev \ + kmod-usb-storage \ + kmod-i2c-gpio kmod-rtc-pcf8563 kmod-rtc-ds1307 \ + kmod-gpio-beeper kmod-hwmon-core kmod-hwmon-gpiofan endef define Profile/Default/Description Default package set compatible with most boards. endef + $(eval $(call Profile,Default)) diff --git a/target/linux/oxnas/profiles/cloudengines.mk b/target/linux/oxnas/profiles/cloudengines.mk new file mode 100644 index 0000000..ed0a235 --- /dev/null +++ b/target/linux/oxnas/profiles/cloudengines.mk @@ -0,0 +1,26 @@ +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/POGOPLUG_PRO + NAME:=Cloud Engines Pogoplug Pro +endef + +define Profile/POGOPLUG_PRO/Description + Profile with built-in ox820 Pogoplug Pro device-tree + (board with miniPCIe slot) +endef + +define Profile/POGOPLUG_V3 + NAME:=Cloud Engines Pogoplug V3 +endef + +define Profile/POGOPLUG_V3/Description + Profile with built-in ox820 Pogoplug V3 device-tree + (board without miniPCIe slot) +endef + +$(eval $(call Profile,POGOPLUG_PRO)) +$(eval $(call Profile,POGOPLUG_V3)) diff --git a/target/linux/oxnas/profiles/pogoplug.mk b/target/linux/oxnas/profiles/pogoplug.mk deleted file mode 100644 index dcab128..0000000 --- a/target/linux/oxnas/profiles/pogoplug.mk +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -define Profile/POGOPLUG_PRO - NAME:=PogoPlug Pro -endef - -define Profile/POGOPLUG_PRO/Description - Profile with built-in ox820 PogoPlug Pro device-tree - (board with miniPCIe slot) -endef - -define Profile/POGOPLUG_V3 - NAME:=PogoPlug V3 -endef - -define Profile/POGOPLUG_V3/Description - Profile with built-in ox820 PogoPlug V3 device-tree - (board without miniPCIe slot) -endef - -$(eval $(call Profile,POGOPLUG_PRO)) -$(eval $(call Profile,POGOPLUG_V3)) -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From connogriofa at gmail.com Tue Apr 19 11:04:48 2016 From: connogriofa at gmail.com (Conn O'Griofa) Date: Tue, 19 Apr 2016 16:04:48 +0100 Subject: [OpenWrt-Devel] [RFC] ag71xx: Enable flow control for builtin switch port In-Reply-To: <1460981742-17048-1-git-send-email-sven@open-mesh.com> References: <1460981742-17048-1-git-send-email-sven@open-mesh.com> Message-ID: On Mon, Apr 18, 2016 at 1:15 PM, Sven Eckelmann < sven.eckelmann at open-mesh.com> wrote: > From: Sven Eckelmann > > The port connected to the internal switch tends to drop a lot of packets > when a lot of data is transferred over it. This is especially visible when > IP fragmentation happens for large UDP and ICMP packets. An easy test for > this is > > # works > ping 192.168.1.23 > # doesn't work > ping -s 65507 192.168.1.23 > > But enabling flow control on ports without the builtin switch seems to > break the connection completely in some situations. This was for example > detected when a QCA955x with AR98533 on GMAC1 was started with an active > link on this port. So only enable it for SoC ethernet devices with > switch attached. > > This closes #19498 > > Signed-off-by: Sven Eckelmann > --- > This is only an RFC because Felix reverted a similar change in r27034. > Unfortunately, the revert commit doesn't contain enough information to > find out if this problem would also happen when only activating flow > control on the switch port port or when only enabling TX and not RX > flow control (or the other way around). > > .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 6 > +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git > a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c > b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c > index 0832059..208b1d6 100644 > --- > a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c > +++ > b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c > @@ -455,7 +455,11 @@ static void ag71xx_hw_setup(struct ag71xx *ag) > struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); > > /* setup MAC configuration registers */ > - ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, MAC_CFG1_INIT); > + if (pdata->is_ar724x && pdata->switch_data) > + ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, > + MAC_CFG1_INIT | MAC_CFG1_TFC | MAC_CFG1_RFC); > + else > + ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, MAC_CFG1_INIT); > > ag71xx_sb(ag, AG71XX_REG_MAC_CFG2, > MAC_CFG2_PAD_CRC_EN | MAC_CFG2_LEN_CHECK); > -- > 2.8.0.rc3 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > It looks like you may have solved the original issue; this patch is working fine on WR-842ND v1. More details: * When I tried reverting r27034, the WAN port stopped functioning correctly, showing a tx timeout error - but the LAN ports still worked. With your patch, all ports work correctly. * Your testcase (ping -s 65507 from/to a wired client between LAN ports) usually results in 20%-40% packet loss. With your patch (as with the original), it's now typically 0% packet loss between LAN ports. Conn -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From sven.eckelmann at open-mesh.com Tue Apr 19 11:09:23 2016 From: sven.eckelmann at open-mesh.com (Sven Eckelmann) Date: Tue, 19 Apr 2016 17:09:23 +0200 Subject: [OpenWrt-Devel] [RFC] ag71xx: Enable flow control for builtin switch port In-Reply-To: References: <1460981742-17048-1-git-send-email-sven@open-mesh.com> Message-ID: <2138289.KGSaBo0885@bentobox> On Tuesday 19 April 2016 16:04:48 Conn O'Griofa wrote: [...] > It looks like you may have solved the original issue; this patch is working > fine on WR-842ND v1. More details: > > * When I tried reverting r27034, the WAN port stopped functioning > correctly, showing a tx timeout error - but the LAN ports still worked. > With your patch, all ports work correctly. > * Your testcase (ping -s 65507 from/to a wired client between LAN ports) > usually results in 20%-40% packet loss. With your patch (as with the > original), it's now typically 0% packet loss between LAN ports. There might be more bugs hidden in the hardware. Maybe some SoCs have problems with it or some setups with external switch. But thanks a lot for your feedback. Kind regards, Sven -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part. URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From connogriofa at gmail.com Tue Apr 19 13:24:30 2016 From: connogriofa at gmail.com (Conn O'Griofa) Date: Tue, 19 Apr 2016 18:24:30 +0100 Subject: [OpenWrt-Devel] [RFC] ag71xx: Enable flow control for builtin switch port In-Reply-To: <2138289.KGSaBo0885@bentobox> References: <1460981742-17048-1-git-send-email-sven@open-mesh.com> <2138289.KGSaBo0885@bentobox> Message-ID: On Tue, Apr 19, 2016 at 4:09 PM, Sven Eckelmann < sven.eckelmann at open-mesh.com> wrote: > On Tuesday 19 April 2016 16:04:48 Conn O'Griofa wrote: > [...] > > It looks like you may have solved the original issue; this patch is > working > > fine on WR-842ND v1. More details: > > > > * When I tried reverting r27034, the WAN port stopped functioning > > correctly, showing a tx timeout error - but the LAN ports still worked. > > With your patch, all ports work correctly. > > * Your testcase (ping -s 65507 from/to a wired client between LAN ports) > > usually results in 20%-40% packet loss. With your patch (as with the > > original), it's now typically 0% packet loss between LAN ports. > > There might be more bugs hidden in the hardware. Maybe some SoCs have > problems > with it or some setups with external switch. > > But thanks a lot for your feedback. > > Kind regards, > Sven Of course - but I would urge other SoCs to be tested (or at least, find a way to enable it only on compatible chipsets). I'm currently using this router as a dumb AP to serve 2.4GHz clients, and your patch greatly improves connection quality due to the packet loss issue being cleared up. I'll continue using your patch & will report if any issue arises related to it. Conn -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Tue Apr 19 16:04:37 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Tue, 19 Apr 2016 22:04:37 +0200 Subject: [OpenWrt-Devel] [PATCH v3] package/utils/usbutils: Update USB IDs list and drop gzip compression In-Reply-To: <5706033E.6080601@pyret.net> References: <5706033E.6080601@pyret.net> Message-ID: <57168F55.2010900@hauke-m.de> On 04/07/2016 08:50 AM, Daniel Engberg wrote: > Change mirror to Github (Gentoo repo) and drop the gzip compression. > Worst case there's about 4kbyte increase in size but most images ends up > beign somewhere between 4-100kbyte smaller due to the lzma compression. > > Tested on ar71xx > > v2 Now contains the correct patch, sorry! > v3 Turns out that the update-usbids.sh.in isn't executed at all... > > Signed-off-by: Daniel Engberg > > --- > > diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile > index 9b5470a..c1b82a9 100644 > --- a/package/utils/usbutils/Makefile > +++ b/package/utils/usbutils/Makefile > @@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk > > PKG_NAME:=usbutils > PKG_VERSION:=007 > -PKG_RELEASE:=2 > +PKG_RELEASE:=3 > > PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 > PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils > PKG_MD5SUM:=a6bd63d5c44cebb717a960eae22a3ca9 > > -USB_IDS_VERSION:=2015-12-17 > -USB_IDS_MD5SUM:=8c091fdcdbc4e8e60a518d0148b0dad3 > -USB_IDS_FILE:=usb.ids.$(USB_IDS_VERSION).gz > +USB_IDS_VERSION:=2016-03-03 > +USB_IDS_MD5SUM:=273596b6ee101b1df454827cfa87dff8 > +USB_IDS_FILE:=usb.ids > > PKG_BUILD_PARALLEL:=1 > PKG_INSTALL:=1 > @@ -36,22 +36,24 @@ endef > > define Download/usb_ids > FILE:=$(USB_IDS_FILE) > - URL:=http://projects.pyret.net/dump/openwrt/distfiles > + URL:=https://raw.githubusercontent.com/gentoo/hwids/d9e840aa3d5cedf5637d59ef0dc555c380a0e822 This is a much older version of the usb.id database. The header says it is from 2013-08-21 20:34:03. > MD5SUM:=$(USB_IDS_MD5SUM) > endef > $(eval $(call Download,usb_ids)) > > define Build/Prepare > $(Build/Prepare/Default) > - echo '#!/bin/sh' > $(PKG_BUILD_DIR)/update-usbids.sh.in > - echo 'cp $(DL_DIR)/$(USB_IDS_FILE) usb.ids.gz' >> $(PKG_BUILD_DIR)/update-usbids.sh.in > + $(CP) $(DL_DIR)/$(USB_IDS_FILE) $(PKG_BUILD_DIR) > endef > > +CONFIGURE_ARGS += \ > + --disable-zlib You can probably also remove the zlib dependency from the package Depends now. > + > define Package/usbutils/install > $(INSTALL_DIR) $(1)/usr/bin > $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/ > $(INSTALL_DIR) $(1)/usr/share > - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/ > + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/ > endef > > $(eval $(call BuildPackage,usbutils)) > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Tue Apr 19 16:24:49 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Tue, 19 Apr 2016 22:24:49 +0200 Subject: [OpenWrt-Devel] [PATCHv2] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1 In-Reply-To: References: Message-ID: <57169411.90402@hauke-m.de> On 04/18/2016 09:45 PM, John Marrett wrote: > I've updated the patch based on Hauke's feedback. I'm removing the > update info from existing patch > target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch and > using the name target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support > matching the patch from trunk. Please use a better description like in the first version. > Signed-off-by: John Marrett > > diff --git a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch > b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch > index ab7b0bb..acdbb1f 100644 > --- a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch > +++ b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch > @@ -1,13 +1,5 @@ > --- a/drivers/mtd/spi-nor/spi-nor.c > +++ b/drivers/mtd/spi-nor/spi-nor.c > -@@ -538,6 +538,7 @@ static const struct spi_device_id spi_no > - /* GigaDevice */ > - { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, > - { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, > -+ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, > - > - /* Intel/Numonyx -- xxxs33b */ > - { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, > @@ -564,14 +565,14 @@ static const struct spi_device_id spi_no > { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, > SPI_NOR_QUAD_READ) }, This is whitespace broken here and does not apply for me with "git am". I would suggest to use "git format-patch" and then "git send-email" and try to send it to you first and try to apply it with "git am", when that works send it to the list. > diff --git a/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch > b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support > new file mode 100644 > index 0000000..2f0fc18 > --- /dev/null > +++ b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch > @@ -0,0 +1,12 @@ > +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c > +=================================================================== > +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-18 > 11:31:18.970916900 -0400 > ++++ linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c 2016-04-18 > 11:40:17.401622014 -0400 > +@@ -510,6 +510,7 @@ > + /* GigaDevice */ > + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, > + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, > ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, > + > + /* Intel/Numonyx -- xxxs33b */ > + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From baptiste at bitsofnetworks.org Tue Apr 19 17:04:05 2016 From: baptiste at bitsofnetworks.org (Baptiste Jonglez) Date: Tue, 19 Apr 2016 23:04:05 +0200 Subject: [OpenWrt-Devel] [RFC relayd 0/2] relayd: add ipv6 support In-Reply-To: <1460380494-22667-1-git-send-email-michal.kazior@tieto.com> References: <1460380494-22667-1-git-send-email-michal.kazior@tieto.com> Message-ID: <20160419210405.GC1358@lud.polynome.dn42> Hi, On Mon, Apr 11, 2016 at 03:14:52PM +0200, Michal Kazior wrote: > I've been recently working on adding IPv6 support > to relayd (which supported only IPv4). > > It does, however, require a kernel patch to make > it actually usable because link-local addresses > are not routable by kernel by default. > > The patch, currently an RFC, can be found here: > > https://www.mail-archive.com/netdev at vger.kernel.org/msg104390.html If your use-case is 802.11 bridging, why don't you simply use WDS/4-address mode?? Why would you want to change the behaviour of link-local addresses (at layer 3) to solve a layer 2 problem? Baptiste ? https://wireless.wiki.kernel.org/en/users/Documentation/iw#using_4-address_for_ap_and_client_mode -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hannu.nyman at iki.fi Tue Apr 19 18:05:00 2016 From: hannu.nyman at iki.fi (Hannu Nyman) Date: Wed, 20 Apr 2016 01:05:00 +0300 Subject: [OpenWrt-Devel] [PATCH] feeds.conf.default: remove the commented ancient feeds In-Reply-To: <1460278233-2162-1-git-send-email-hannu.nyman@iki.fi> References: <1460278233-2162-1-git-send-email-hannu.nyman@iki.fi> Message-ID: Does anybody know what happened to this patch? http://patchwork.ozlabs.org/patch/608467/ I got email from ozlabs patchwork eight days ago that the patch was "accepted" and ozlabs status shows that, but so far the patch has not been commited to the source repo. It has disappeared somewhere :-( _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From johnf at zioncluster.ca Tue Apr 19 22:13:31 2016 From: johnf at zioncluster.ca (John Marrett) Date: Tue, 19 Apr 2016 22:13:31 -0400 Subject: [OpenWrt-Devel] [PATCHv3] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1 Message-ID: <1461118411-18415-1-git-send-email-johnf@zioncluster.ca> Archer C7 V2.0 units from December 2015 onwards ( serials starting 215C ) have changed flash chips to the gd25q128 chip, this is supported in trunk but not presently in 15.05. I would like stable support for this version so I've back ported the required fix from trunk and removed a conflicting patch from bcm53xx I've tested the patch it and I'm able to install a build of 15.05.1 on a new Archer C7 device with this patch. Signed-off-by: John Marrett --- .../patches-3.18/004-mtd-spi-nor-from-3.20.patch | 26 +++++++++------------- ...-mtd_GD25Q128B_support_backport_from_3.19.patch | 12 ++++++++++ 2 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch diff --git a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch index ab7b0bb..449e80f 100644 --- a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch +++ b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch @@ -1,14 +1,8 @@ ---- a/drivers/mtd/spi-nor/spi-nor.c -+++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -538,6 +538,7 @@ static const struct spi_device_id spi_no - /* GigaDevice */ - { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, - { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, -+ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, - - /* Intel/Numonyx -- xxxs33b */ - { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, -@@ -564,14 +565,14 @@ static const struct spi_device_id spi_no +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c +=================================================================== +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-19 19:28:00.391762486 -0400 ++++ linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c 2016-04-19 19:29:03.220034573 -0400 +@@ -564,14 +564,14 @@ { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, /* Micron */ @@ -31,7 +25,7 @@ /* PMC */ { "pm25lv512", INFO(0, 0, 32 * 1024, 2, SECT_4K_PMC) }, -@@ -895,6 +896,45 @@ static int spansion_quad_enable(struct s +@@ -895,6 +895,45 @@ return 0; } @@ -77,7 +71,7 @@ static int set_quad_mode(struct spi_nor *nor, struct flash_info *info) { int status; -@@ -907,6 +947,13 @@ static int set_quad_mode(struct spi_nor +@@ -907,6 +946,13 @@ return -EINVAL; } return status; @@ -91,8 +85,10 @@ default: status = spansion_quad_enable(nor); if (status) { ---- a/include/linux/mtd/spi-nor.h -+++ b/include/linux/mtd/spi-nor.h +Index: linux-3.18.29/include/linux/mtd/spi-nor.h +=================================================================== +--- linux-3.18.29.orig/include/linux/mtd/spi-nor.h 2016-04-19 19:28:00.391762486 -0400 ++++ linux-3.18.29/include/linux/mtd/spi-nor.h 2016-04-19 19:28:00.387762470 -0400 @@ -56,6 +56,10 @@ /* Used for Spansion flashes only. */ #define SPINOR_OP_BRWR 0x17 /* Bank register write */ diff --git a/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch new file mode 100644 index 0000000..b1bb3fb --- /dev/null +++ b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch @@ -0,0 +1,12 @@ +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c +=================================================================== +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-19 20:30:41.535015813 -0400 ++++ linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c 2016-04-19 20:32:12.767454183 -0400 +@@ -510,6 +510,7 @@ + /* GigaDevice */ + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, + + /* Intel/Numonyx -- xxxs33b */ + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:26 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:26 -0400 Subject: [OpenWrt-Devel] Add support for TP-Link Archer C2600 Message-ID: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Add initial support for Archer C2600 to Makefiles, profiles, led/network config, and hotplug script. Together with firmware-utils and mac80211 patches this is sufficient to build a working factory image flashable both from stock web ui and bootloader tftp recovery. Sysupgrade is working as well. Added hotplug script is adapted from existing script for ar71xx which copies wireless calibration data from ART partition in flash to appropriate place in /lib/firmware. The device tree file is similar to the current ap148 dts, with sata and nand removed, and buttons/led's added. Working: Wired network, wireless (both bands), power/status/lan/wan/usb led's Not working: wireless status led's (these are not controlled through gpio, but rather through the QCA9980 pcie chips). Also there is no way to set the wan led to orange, which is possible in the stock firmware. Kernel 4.1 build does not boot currently. Not tested: Hardware buttons. Patches by Josh Bendavid Submitted by Darryl Sokoloski [PATCH 1/9] include/image.mk: Add TP-Link image safe-loader define [PATCH 2/9] tools/tplink-safeloader: Add support for Archer C2600 [PATCH 3/9] ipq806x: Add Archer C2600 to image Makefile [PATCH 4/9] ipq806x/base-files: Add Archer C2600 board LEDs/network [PATCH 5/9] ipq806x/base-files: Add support for Archer C2600 [PATCH 6/9] ipq806x/base-files: Extract ath10k calibration data [PATCH 7/9] ipq806x/profiles: Add TP-Link profile with C2600 support [PATCH 8/9] ipq806x/dts: Add Archer C2600 DTSI [PATCH 9/9] kernel/mac80211: Skip ath10k OTP check if caldata found _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:27 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:27 -0400 Subject: [OpenWrt-Devel] [PATCH 1/9] include/image.mk: Add TP-Link image safe-loader define In-Reply-To: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> References: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Message-ID: <1461131735-6064-2-git-send-email-darryl@sokoloski.ca> Signed-off-by: Josh Bendavid [darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid] Signed-off-by: Darryl Sokoloski --- include/image.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/image.mk b/include/image.mk index 7c11aa1..5c0c4c7 100644 --- a/include/image.mk +++ b/include/image.mk @@ -325,6 +325,17 @@ define Build/netgear-dni mv $@.new $@ endef +define Build/tplink-safe + $(STAGING_DIR_HOST)/bin/tplink-safeloader \ + -B $(TPLINK_BOARD_ID) -V OpenWrt.$(REVISION) \ + -k $(word 1,$^) \ + -r $(word 2,$^) \ + -j \ + $(if $(findstring sysupgrade,$1),-S) \ + -o $@.new + mv $@.new $@ +endef + define Build/fit $(TOPDIR)/scripts/mkits.sh \ -D $(DEVICE_NAME) -o $@.its -k $@ \ -- 2.4.10 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:28 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:28 -0400 Subject: [OpenWrt-Devel] [PATCH 2/9] tools/tplink-safeloader: Add support for Archer C2600 In-Reply-To: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> References: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Message-ID: <1461131735-6064-3-git-send-email-darryl@sokoloski.ca> Signed-off-by: Josh Bendavid [darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid] Signed-off-by: Darryl Sokoloski --- tools/firmware-utils/src/tplink-safeloader.c | 114 ++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 3 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 77a894b..f43ffd5 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -105,6 +105,8 @@ static const uint8_t md5_salt[16] = { /** Vendor information for CPE210/220/510/520 */ static const char cpe510_vendor[] = "CPE510(TP-LINK|UN|N300-5):1.0\r\n"; +/** Vendor information for C2600 */ +static const char c2600_vendor[] = ""; /** The flash partition table for CPE210/220/510/520; @@ -128,6 +130,39 @@ static const struct flash_partition_entry cpe510_partitions[] = { }; /** + The flash partition table for C2600; + it is the same as the one used by the stock images. +*/ +static const struct flash_partition_entry c2600_partitions[] = { + {"SBL1", 0x00000, 0x20000}, + {"MIBIB", 0x20000, 0x20000}, + {"SBL2", 0x40000, 0x20000}, + {"SBL3", 0x60000, 0x30000}, + {"DDRCONFIG", 0x90000, 0x10000}, + {"SSD", 0xa0000, 0x10000}, + {"TZ", 0xb0000, 0x30000}, + {"RPM", 0xe0000, 0x20000}, + {"fs-uboot", 0x100000, 0x70000}, + {"uboot-env", 0x170000, 0x40000}, + {"radio", 0x1b0000, 0x40000}, + {"os-image", 0x1f0000, 0x200000}, + {"file-system", 0x3f0000, 0x1b00000}, + {"default-mac", 0x1ef0000, 0x00200}, + {"pin", 0x1ef0200, 0x00200}, + {"product-info", 0x1ef0400, 0x0fc00}, + {"partition-table", 0x1f00000, 0x10000}, + {"soft-version", 0x1f10000, 0x10000}, + {"support-list", 0x1f20000, 0x10000}, + {"profile", 0x1f30000, 0x10000}, + {"default-config", 0x1f40000, 0x10000}, + {"user-config", 0x1f50000, 0x40000}, + {"qos-db", 0x1f90000, 0x40000}, + {"usb-config", 0x1fd0000, 0x10000}, + {"log", 0x1fe0000, 0x20000}, + {NULL, 0, 0} +}; + +/** The support list for CPE210/220/510/520 */ static const char cpe510_support_list[] = @@ -141,6 +176,13 @@ static const char cpe510_support_list[] = "CPE220(TP-LINK|UN|N300-2):1.0\r\n" "CPE220(TP-LINK|UN|N300-2):1.1\r\n"; +/** + The support list for C2600 +*/ +static const char c2600_support_list[] = + "SupportList:\r\n" + "{product_name:Archer C2600,product_ver:1.0.0,special_id:00000000}\r\n"; + #define error(_ret, _errno, _str, ...) \ do { \ fprintf(stderr, _str ": %s\n", ## __VA_ARGS__, \ @@ -240,14 +282,14 @@ static struct image_partition_entry make_soft_version(uint32_t rev) { } /** Generates the support-list partition */ -static struct image_partition_entry make_support_list(const char *support_list) { +static struct image_partition_entry make_support_list(const char *support_list, bool trailzero) { size_t len = strlen(support_list); struct image_partition_entry entry = alloc_image_partition("support-list", len + 9); put32(entry.data, len); memset(entry.data+4, 0, 4); memcpy(entry.data+8, support_list, len); - entry.data[len+8] = '\xff'; + entry.data[len+8] = trailzero ? '\x00' : '\xff'; return entry; } @@ -436,6 +478,37 @@ static void * generate_sysupgrade_image(const struct flash_partition_entry *flas return image; } +static void * generate_sysupgrade_image_c2600(const struct flash_partition_entry *flash_parts, const struct image_partition_entry *image_parts, size_t *len) { + const struct flash_partition_entry *flash_os_image = &flash_parts[11]; + const struct flash_partition_entry *flash_file_system = &flash_parts[12]; + + const struct image_partition_entry *image_os_image = &image_parts[3]; + const struct image_partition_entry *image_file_system = &image_parts[4]; + + assert(strcmp(flash_os_image->name, "os-image") == 0); + assert(strcmp(flash_file_system->name, "file-system") == 0); + + assert(strcmp(image_os_image->name, "os-image") == 0); + assert(strcmp(image_file_system->name, "file-system") == 0); + + if (image_os_image->size > flash_os_image->size) + error(1, 0, "kernel image too big (more than %u bytes)", (unsigned)flash_os_image->size); + if (image_file_system->size > flash_file_system->size) + error(1, 0, "rootfs image too big (more than %u bytes)", (unsigned)flash_file_system->size); + + *len = flash_file_system->base - flash_os_image->base + image_file_system->size; + + uint8_t *image = malloc(*len); + if (!image) + error(1, errno, "malloc"); + + memset(image, 0xff, *len); + + memcpy(image, image_os_image->data, image_os_image->size); + memcpy(image + flash_file_system->base - flash_os_image->base, image_file_system->data, image_file_system->size); + + return image; +} /** Generates an image for CPE210/220/510/520 and writes it to a file */ static void do_cpe510(const char *output, const char *kernel_image, const char *rootfs_image, uint32_t rev, bool add_jffs2_eof, bool sysupgrade) { @@ -443,7 +516,7 @@ static void do_cpe510(const char *output, const char *kernel_image, const char * parts[0] = make_partition_table(cpe510_partitions); parts[1] = make_soft_version(rev); - parts[2] = make_support_list(cpe510_support_list); + parts[2] = make_support_list(cpe510_support_list,false); parts[3] = read_file("os-image", kernel_image, false); parts[4] = read_file("file-system", rootfs_image, add_jffs2_eof); @@ -470,6 +543,39 @@ static void do_cpe510(const char *output, const char *kernel_image, const char * free_image_partition(parts[i]); } +/** Generates an image for C2600 and writes it to a file */ +static void do_c2600(const char *output, const char *kernel_image, const char *rootfs_image, uint32_t rev, bool add_jffs2_eof, bool sysupgrade) { + struct image_partition_entry parts[6] = {}; + + parts[0] = make_partition_table(c2600_partitions); + parts[1] = make_soft_version(rev); + parts[2] = make_support_list(c2600_support_list,true); + parts[3] = read_file("os-image", kernel_image, false); + parts[4] = read_file("file-system", rootfs_image, add_jffs2_eof); + + size_t len; + void *image; + if (sysupgrade) + image = generate_sysupgrade_image_c2600(c2600_partitions, parts, &len); + else + image = generate_factory_image(c2600_vendor, parts, &len); + + FILE *file = fopen(output, "wb"); + if (!file) + error(1, errno, "unable to open output file"); + + if (fwrite(image, len, 1, file) != 1) + error(1, 0, "unable to write output file"); + + fclose(file); + + free(image); + + size_t i; + for (i = 0; parts[i].name; i++) + free_image_partition(parts[i]); +} + /** Usage output */ static void usage(const char *argv0) { @@ -552,6 +658,8 @@ int main(int argc, char *argv[]) { if (strcmp(board, "CPE510") == 0) do_cpe510(output, kernel_image, rootfs_image, rev, add_jffs2_eof, sysupgrade); + else if (strcmp(board, "C2600") == 0) + do_c2600(output, kernel_image, rootfs_image, rev, add_jffs2_eof, sysupgrade); else error(1, 0, "unsupported board %s", board); -- 2.4.10 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:29 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:29 -0400 Subject: [OpenWrt-Devel] [PATCH 3/9] ipq806x: Add Archer C2600 to image Makefile In-Reply-To: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> References: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Message-ID: <1461131735-6064-4-git-send-email-darryl@sokoloski.ca> Signed-off-by: Josh Bendavid [darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid] Signed-off-by: Darryl Sokoloski --- target/linux/ipq806x/image/Makefile | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index ff8b2c7..a5fc836 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -36,6 +36,11 @@ define Build/append-dtb cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@ endef +define Build/append-new-dtb + $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb) + cat $@.dtb >> $@ +endef + define Build/append-file cat $(1) >> $@ endef @@ -86,6 +91,19 @@ define Device/DniImage endef DEVICE_VARS += KERNEL_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID DEVICE_BLOCK_SIZE DEVICE_PAGE_SIZE +define Device/TpSafeImage + PROFILES += $$(DEVICE_NAME) + FILESYSTEMS := squashfs + KERNEL_SUFFIX := -uImage + KERNEL = kernel-bin | append-new-dtb | uImage none + KERNEL_NAME := zImage + TPLINK_BOARD_ID := + IMAGES := factory.bin sysupgrade.bin + IMAGE/factory.bin := tplink-safe factory + IMAGE/sysupgrade.bin := tplink-safe sysupgrade +endef +DEVICE_VARS += TPLINK_BOARD_ID + define Device/AP148 $(call Device/FitImage) $(call Device/UbiFit) @@ -104,6 +122,15 @@ define Device/AP148-legacy BOARD_NAME := ap148 endef +define Device/C2600 + $(call Device/TpSafeImage) + DEVICE_DTS := qcom-ipq8064-c2600 + BLOCKSIZE := 128KiB + PAGESIZE := 2048 + BOARD_NAME := c2600 + TPLINK_BOARD_ID := C2600 +endef + define Device/D7800 $(call Device/DniImage) DEVICE_DTS := qcom-ipq8064-d7800 @@ -133,6 +160,6 @@ define Device/R7500 BOARD_NAME := r7500 endef -TARGET_DEVICES += AP148 AP148-legacy D7800 DB149 R7500 +TARGET_DEVICES += AP148 AP148-legacy C2600 D7800 DB149 R7500 $(eval $(call BuildImage)) -- 2.4.10 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:30 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:30 -0400 Subject: [OpenWrt-Devel] [PATCH 4/9] ipq806x/base-files: Add Archer C2600 board LEDs/network In-Reply-To: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> References: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Message-ID: <1461131735-6064-5-git-send-email-darryl@sokoloski.ca> Signed-off-by: Josh Bendavid [darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid] Signed-off-by: Darryl Sokoloski --- target/linux/ipq806x/base-files/etc/board.d/01_leds | 7 +++++++ target/linux/ipq806x/base-files/etc/board.d/02_network | 1 + 2 files changed, 8 insertions(+) diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index b32c1cc..ea799c8 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -11,6 +11,13 @@ board_config_update board=$(ipq806x_board_name) case "$board" in +c2600) + ucidef_set_led_usbdev "usb1" "USB 1" "usb_2:blue" "2-1" + ucidef_set_led_usbdev "usb2" "USB 2" "usb_4:blue" "4-1" + ucidef_set_led_netdev "wan" "WAN" "wan:blue" "eth0" + ucidef_set_led_netdev "lan" "LAN" "lan:blue" "br-lan" + ucidef_set_led_default "general" "general" "ledgnr:blue" "1" + ;; d7800 |\ r7500) ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1" diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 6e18297..e3c9137 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -13,6 +13,7 @@ board=$(ipq806x_board_name) case "$board" in ap148 |\ +c2600 |\ d7800 |\ r7500) ucidef_add_switch "switch0" \ -- 2.4.10 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:31 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:31 -0400 Subject: [OpenWrt-Devel] [PATCH 5/9] ipq806x/base-files: Add support for Archer C2600 In-Reply-To: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> References: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Message-ID: <1461131735-6064-6-git-send-email-darryl@sokoloski.ca> Signed-off-by: Josh Bendavid [darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid] Signed-off-by: Darryl Sokoloski --- target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 +++ .../linux/ipq806x/base-files/lib/upgrade/platform.sh | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh b/target/linux/ipq806x/base-files/lib/ipq806x.sh index db22708..73202c0 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" ;; + *"C2600") + name="c2600" + ;; *"D7800") name="d7800" ;; diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 542b5ce..a181f13 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -12,6 +12,14 @@ platform_check_image() { nand_do_platform_check $board $1 return $?; ;; + c2600) + local magic_long="$(get_magic_long "$1")" + [ "$magic_long" != "27051956" ] && { + echo "Invalid image, bad magic: $magic_long" + return 1 + } + return 0; + ;; *) return 1; esac @@ -29,4 +37,14 @@ platform_pre_upgrade() { esac } -# use default for platform_do_upgrade() +platform_do_upgrade() { + local board=$(ipq806x_board_name) + + case "$board" in + c2600) + PART_NAME="os-image:rootfs" + MTD_CONFIG_ARGS="-s 0x200000" + default_do_upgrade "$ARGV" + ;; + esac +} -- 2.4.10 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:32 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:32 -0400 Subject: [OpenWrt-Devel] [PATCH 6/9] ipq806x/base-files: Extract ath10k calibration data In-Reply-To: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> References: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Message-ID: <1461131735-6064-7-git-send-email-darryl@sokoloski.ca> Signed-off-by: Josh Bendavid [darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid] Signed-off-by: Darryl Sokoloski --- .../etc/hotplug.d/firmware/11-ath10k-caldata | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata new file mode 100644 index 0000000..5f604e1 --- /dev/null +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -0,0 +1,68 @@ +#!/bin/sh + +ath10kcal_die() { + echo "ath10cal: " "$*" + exit 1 +} + +ath10kcal_from_file() { + local source=$1 + local offset=$2 + local count=$3 + + dd if=$source of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + ath10kcal_die "failed to extract calibration data from $source" +} + +ath10kcal_extract() { + local part=$1 + local offset=$2 + local count=$3 + local mtd + + mtd=$(find_mtd_chardev $part) + [ -n "$mtd" ] || \ + ath10kcal_die "no mtd device found for partition $part" + + dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + ath10kcal_die "failed to extract calibration data from $mtd" +} + +ath10kcal_patch_mac() { + local mac=$1 + + [ -z "$mac" ] && return + + macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=6 count=6 +} + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/ipq806x.sh +. /lib/functions.sh +. /lib/functions/system.sh + +board=$(ipq806x_board_name) + + +case "$FIRMWARE" in +"ath10k/cal-pci-0000:01:00.0.bin") + case $board in + c2600) + ath10kcal_extract "radio" 4096 12064 +# ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 8) -1) + ;; + esac + ;; +"ath10k/cal-pci-0001:01:00.0.bin") + case $board in + c2600) + ath10kcal_extract "radio" 20480 12064 +# ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 8) -2) + ;; + esac + ;; +*) + exit 1 + ;; +esac -- 2.4.10 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:33 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:33 -0400 Subject: [OpenWrt-Devel] [PATCH 7/9] ipq806x/profiles: Add TP-Link profile with C2600 support In-Reply-To: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> References: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Message-ID: <1461131735-6064-8-git-send-email-darryl@sokoloski.ca> Signed-off-by: Josh Bendavid [darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid] Signed-off-by: Darryl Sokoloski --- target/linux/ipq806x/profiles/tplink.mk | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 target/linux/ipq806x/profiles/tplink.mk diff --git a/target/linux/ipq806x/profiles/tplink.mk b/target/linux/ipq806x/profiles/tplink.mk new file mode 100644 index 0000000..d3f5a6c --- /dev/null +++ b/target/linux/ipq806x/profiles/tplink.mk @@ -0,0 +1,20 @@ +# +# Copyright (c) 2014 The Linux Foundation. All rights reserved. +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/C2600 + NAME:=TP-Link Archer C2600 + PACKAGES:= \ + kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev \ + kmod-usb3 kmod-usb-dwc3-qcom kmod-usb-phy-qcom-dwc3 \ + kmod-ath10k ath10k-firmware-qca99x0 wpad-mini +endef + +define Profile/C2600/Description + Package set for the TP-Link Archer C2600. +endef +$(eval $(call Profile,C2600)) -- 2.4.10 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:34 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:34 -0400 Subject: [OpenWrt-Devel] [PATCH 8/9] ipq806x/dts: Add Archer C2600 DTSI In-Reply-To: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> References: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Message-ID: <1461131735-6064-9-git-send-email-darryl@sokoloski.ca> Signed-off-by: Josh Bendavid [darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid] Signed-off-by: Darryl Sokoloski --- target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts | 412 ++++++++++++++++++++++++ 1 file changed, 412 insertions(+) create mode 100644 target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts diff --git a/target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts new file mode 100644 index 0000000..994b55e --- /dev/null +++ b/target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts @@ -0,0 +1,412 @@ +#include "qcom-ipq8064-v1.0.dtsi" +#include + +/ { + model = "TP-Link Archer C2600"; + compatible = "tplink,c2600", "qcom,ipq8064"; + + memory at 0 { + reg = <0x42000000 0x1e000000>; + device_type = "memory"; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + rsvd at 41200000 { + reg = <0x41200000 0x300000>; + no-map; + }; + }; + + aliases { + serial0 = &uart4; + mdio-gpio0 = &mdio0; + }; + + chosen { + linux,stdout-path = "serial0:115200n8"; + }; + + soc { + pinmux at 800000 { + i2c4_pins: i2c4_pinmux { + pins = "gpio12", "gpio13"; + function = "gsbi4"; + bias-disable; + }; + + spi_pins: spi_pins { + mux { + pins = "gpio18", "gpio19", "gpio21"; + function = "gsbi5"; + drive-strength = <10>; + bias-none; + }; + }; + + nand_pins: nand_pins { + mux { + pins = "gpio34", "gpio35", "gpio36", + "gpio37", "gpio38", "gpio39", + "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + function = "nand"; + drive-strength = <10>; + bias-disable; + }; + + pullups { + pins = "gpio39"; + bias-pull-up; + }; + + hold { + pins = "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; + bias-bus-hold; + }; + }; + + mdio0_pins: mdio0_pins { + mux { + pins = "gpio0", "gpio1"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + }; + + rgmii2_pins: rgmii2_pins { + mux { + pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", + "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; + function = "rgmii2"; + drive-strength = <8>; + bias-disable; + }; + }; + }; + + gsbi at 16300000 { + qcom,mode = ; + status = "ok"; + serial at 16340000 { + status = "ok"; + }; + /* + * The i2c device on gsbi4 should not be enabled. + * On ipq806x designs gsbi4 i2c is meant for exclusive + * RPM usage. Turning this on in kernel manifests as + * i2c failure for the RPM. + */ + }; + + gsbi5: gsbi at 1a200000 { + qcom,mode = ; + status = "ok"; + + spi4: spi at 1a280000 { + status = "ok"; + spi-max-frequency = <50000000>; + + pinctrl-0 = <&spi_pins>; + pinctrl-names = "default"; + + cs-gpios = <&qcom_pinmux 20 0>; + + flash: m25p80 at 0 { + compatible = "s25fl256s1"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <50000000>; + reg = <0>; + + SBL1 at 0 { + label = "SBL1"; + reg = <0x0 0x20000>; + read-only; + }; + MIBIB at 20000 { + label = "MIBIB"; + reg = <0x20000 0x20000>; + read-only; + }; + SBL2 at 40000 { + label = "SBL2"; + reg = <0x40000 0x20000>; + read-only; + }; + SBL3 at 60000 { + label = "SBL3"; + reg = <0x60000 0x30000>; + read-only; + }; + DDRCONFIG at 90000 { + label = "DDRCONFIG"; + reg = <0x90000 0x10000>; + read-only; + }; + SSD at a0000 { + label = "SSD"; + reg = <0xa0000 0x10000>; + read-only; + }; + TZ at b0000 { + label = "TZ"; + reg = <0xb0000 0x30000>; + read-only; + }; + RPM at e0000 { + label = "RPM"; + reg = <0xe0000 0x20000>; + read-only; + }; + fs-uboot at 100000 { + label = "fs-uboot"; + reg = <0x100000 0x70000>; + read-only; + }; + uboot-env at 170000 { + label = "uboot-env"; + reg = <0x170000 0x40000>; + read-only; + }; + radio at 1b0000 { + label = "radio"; + reg = <0x1b0000 0x40000>; + read-only; + }; + os-image at 1f0000 { + label = "os-image"; + reg = <0x1f0000 0x200000>; + }; + rootfs at 3f0000 { + label = "rootfs"; + reg = <0x3f0000 0x1b00000>; + }; + defaultmac: default-mac at 1ef0000 { + label = "default-mac"; + reg = <0x1ef0000 0x00200>; + read-only; + }; + pin at 1ef0200 { + label = "pin"; + reg = <0x1ef0200 0x00200>; + read-only; + }; + product-info at 1ef0400 { + label = "product-info"; + reg = <0x1ef0400 0x0fc00>; + read-only; + }; + partition-table at 1f00000 { + label = "partition-table"; + reg = <0x1f00000 0x10000>; + read-only; + }; + soft-version at 1f10000 { + label = "soft-version"; + reg = <0x1f10000 0x10000>; + read-only; + }; + support-list at 1f20000 { + label = "support-list"; + reg = <0x1f20000 0x10000>; + read-only; + }; + profile at 1f30000 { + label = "profile"; + reg = <0x1f30000 0x10000>; + read-only; + }; + default-config at 1f40000 { + label = "default-config"; + reg = <0x1f40000 0x10000>; + read-only; + }; + user-config at 1f50000 { + label = "user-config"; + reg = <0x1f50000 0x40000>; + read-only; + }; + qos-db at 1f90000 { + label = "qos-db"; + reg = <0x1f90000 0x40000>; + read-only; + }; + usb-config at 1fd0000 { + label = "usb-config"; + reg = <0x1fd0000 0x10000>; + read-only; + }; + log at 1fe0000 { + label = "log"; + reg = <0x1fe0000 0x20000>; + read-only; + }; + }; + }; + }; + + phy at 100f8800 { /* USB3 port 1 HS phy */ + status = "ok"; + }; + + phy at 100f8830 { /* USB3 port 1 SS phy */ + status = "ok"; + }; + + phy at 110f8800 { /* USB3 port 0 HS phy */ + status = "ok"; + }; + + phy at 110f8830 { /* USB3 port 0 SS phy */ + status = "ok"; + }; + + usb30 at 0 { + status = "ok"; + }; + + usb30 at 1 { + status = "ok"; + }; + + pcie0: pci at 1b500000 { + status = "ok"; + phy-tx0-term-offset = <7>; + }; + + pcie1: pci at 1b700000 { + status = "ok"; + phy-tx0-term-offset = <7>; + }; + + mdio0: mdio { + compatible = "virtual,mdio-gpio"; + #address-cells = <1>; + #size-cells = <0>; + gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>; + pinctrl-0 = <&mdio0_pins>; + pinctrl-names = "default"; + + phy0: ethernet-phy at 0 { + device_type = "ethernet-phy"; + reg = <0>; + qca,ar8327-initvals = < + 0x00004 0x7600000 /* PAD0_MODE */ + 0x00008 0x1000000 /* PAD5_MODE */ + 0x0000c 0x80 /* PAD6_MODE */ + 0x000e4 0xaa545 /* MAC_POWER_SEL */ + 0x000e0 0xc74164de /* SGMII_CTRL */ + 0x0007c 0x4e /* PORT0_STATUS */ + 0x00094 0x4e /* PORT6_STATUS */ + >; + }; + + phy4: ethernet-phy at 4 { + device_type = "ethernet-phy"; + reg = <4>; + }; + }; + + gmac1: ethernet at 37200000 { + status = "ok"; + phy-mode = "rgmii"; + qcom,id = <1>; + + pinctrl-0 = <&rgmii2_pins>; + pinctrl-names = "default"; + + mtd-mac-address = <&defaultmac 0x8>; + mtd-mac-address-increment = <1>; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + gmac2: ethernet at 37400000 { + status = "ok"; + phy-mode = "sgmii"; + qcom,id = <2>; + + mtd-mac-address = <&defaultmac 0x8>; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + wifi { + label = "wifi"; + gpios = <&qcom_pinmux 49 1>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&qcom_pinmux 64 1>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&qcom_pinmux 65 1>; + linux,code = ; + }; + ledgeneral { + label = "ledgeneral"; + gpios = <&qcom_pinmux 16 1>; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + lan { + label = "lan:blue"; + gpios = <&qcom_pinmux 6 0>; + }; + usb4 { + label = "usb_4:blue"; + gpios = <&qcom_pinmux 7 0>; + }; + usb2 { + label = "usb_2:blue"; + gpios = <&qcom_pinmux 8 0>; + }; + wps { + label = "wps:blue"; + gpios = <&qcom_pinmux 9 0>; + }; + wan_blue { + label = "wan:blue"; + gpios = <&qcom_pinmux 33 1>; + }; + status { + label = "status:blue"; + gpios = <&qcom_pinmux 53 0>; + default-state = "on"; + }; + ledgnr { + label = "ledgnr:blue"; + gpios = <&qcom_pinmux 66 0>; + }; + }; +}; + +&adm_dma { + status = "ok"; +}; -- 2.4.10 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From darryl at sokoloski.ca Wed Apr 20 01:55:35 2016 From: darryl at sokoloski.ca (Darryl Sokoloski) Date: Wed, 20 Apr 2016 01:55:35 -0400 Subject: [OpenWrt-Devel] [PATCH 9/9] kernel/mac80211: Skip ath10k OTP check if caldata found In-Reply-To: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> References: <1461131735-6064-1-git-send-email-darryl@sokoloski.ca> Message-ID: <1461131735-6064-10-git-send-email-darryl@sokoloski.ca> Signed-off-by: Josh Bendavid [darryl at sokoloski.ca: submitting patches on behalf of Josh Bendavid] Signed-off-by: Darryl Sokoloski --- .../patches/941-ath10k_skip_otp_check.patch | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 package/kernel/mac80211/patches/941-ath10k_skip_otp_check.patch diff --git a/package/kernel/mac80211/patches/941-ath10k_skip_otp_check.patch b/package/kernel/mac80211/patches/941-ath10k_skip_otp_check.patch new file mode 100644 index 0000000..1465ec7 --- /dev/null +++ b/package/kernel/mac80211/patches/941-ath10k_skip_otp_check.patch @@ -0,0 +1,44 @@ +Index: compat-wireless-2016-01-10/drivers/net/wireless/ath/ath10k/core.c +=================================================================== +--- compat-wireless-2016-01-10.orig/drivers/net/wireless/ath/ath10k/core.c ++++ compat-wireless-2016-01-10/drivers/net/wireless/ath/ath10k/core.c +@@ -1183,9 +1183,6 @@ static int ath10k_core_fetch_firmware_fi + { + int ret; + +- /* calibration file is optional, don't check for any errors */ +- ath10k_fetch_cal_file(ar); +- + ar->fw_api = 5; + ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api); + +@@ -1790,6 +1787,9 @@ static int ath10k_core_probe_fw(struct a + goto err_power_down; + } + ++ /* calibration file is optional, don't check for any errors */ ++ int calret = ath10k_fetch_cal_file(ar); ++ + ret = ath10k_core_fetch_firmware_files(ar); + if (ret) { + ath10k_err(ar, "could not fetch firmware files (%d)\n", ret); +@@ -1798,11 +1798,14 @@ static int ath10k_core_probe_fw(struct a + + ath10k_debug_print_hwfw_info(ar); + +- ret = ath10k_core_get_board_id_from_otp(ar); +- if (ret && ret != -EOPNOTSUPP) { +- ath10k_err(ar, "failed to get board id from otp: %d\n", +- ret); +- return ret; ++ /* otp and board file not needed if calibration data is present */ ++ if (calret) { ++ ret = ath10k_core_get_board_id_from_otp(ar); ++ if (ret && ret != -EOPNOTSUPP) { ++ ath10k_err(ar, "failed to get board id from otp: %d\n", ++ ret); ++ return ret; ++ } + } + + ret = ath10k_core_fetch_board_file(ar); -- 2.4.10 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ben at bbarker.co.uk Wed Apr 20 08:21:58 2016 From: ben at bbarker.co.uk (Ben Barker) Date: Wed, 20 Apr 2016 13:21:58 +0100 Subject: [OpenWrt-Devel] =?utf-8?q?=28no_subject=29?= Message-ID: Hi, I can see a couple of months ago a patch was submitted to allow the wr802n to work as expected, but at the time it looks like it was rejected because it was not submitted properly: https://lists.openwrt.org/pipermail/openwrt-devel/2016-February/039591.html Do you know if any progress was made subsequent oto this? The 802n looks like a great succesor to the 703n, which has been a great workhouse for various projects for some time... -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From amine.ahd at gmail.com Wed Apr 20 10:48:51 2016 From: amine.ahd at gmail.com (amine.ahd) Date: Wed, 20 Apr 2016 16:48:51 +0200 Subject: [OpenWrt-Devel] [PATCH] Add support for multiple RADIUS servers Message-ID: <1461163731-9192-1-git-send-email-amine.ahd@gmail.com> Hostapd allows more than one RADIUS server to be added in case the main server goes down. This allows netifd to load a list of RADIUS servers from the wireless confid file and add them to hostapd. The format of the list in the config file is as follow: list auth_servers ... list auth_ports ... list auth_secrets ... --- .../network/services/hostapd/files/netifd.sh | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index 417cc42..ed772ff 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -125,6 +125,10 @@ hostapd_common_add_bss_config() { config_add_string auth_secret config_add_int 'auth_port:port' 'port:port' + config_add_array auth_servers + config_add_array auth_secrets + config_add_array auth_ports + config_add_string acct_server config_add_string acct_secret config_add_int acct_port @@ -269,10 +273,34 @@ hostapd_set_bss_options() { set_default vlan_naming 1 + # leave the default option for legacy compatibility append bss_conf "auth_server_addr=$auth_server" "$N" append bss_conf "auth_server_port=$auth_port" "$N" append bss_conf "auth_server_shared_secret=$auth_secret" "$N" + # List of fallback RADIUS servers + json_select "auth_servers" + local Index="1" + while json_get_type Var $Index && [ "$Var" = string ]; do + json_get_var Var "$((Index))" + append bss_conf "auth_server_addr=$Var" "$N" + json_select ".." + + json_select "auth_ports" + json_get_var Var "$((Index))" + set_default Var 1812 + append bss_conf "auth_server_port=$Var" "$N" + json_select ".." + + json_select "auth_secrets" + json_get_var Var "$((Index++))" + append bss_conf "auth_server_shared_secret=$Var" "$N" + json_select ".." + + json_select "auth_servers" + done + json_select ".." + [ -n "$acct_server" ] && { append bss_conf "acct_server_addr=$acct_server" "$N" append bss_conf "acct_server_port=$acct_port" "$N" -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Wed Apr 20 11:49:01 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Thu, 21 Apr 2016 00:49:01 +0900 Subject: [OpenWrt-Devel] [PATCH] ramips: update DTS file for Planex DB-WRT01 Message-ID: <1461167341-14939-1-git-send-email-tochiro.srchack@gmail.com> update DTS files to use jedec,spi-nor compatible string for m25p80 to fix probe issues. Signed-off-by: YuheiOKAWA --- target/linux/ramips/dts/DB-WRT01.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/DB-WRT01.dts b/target/linux/ramips/dts/DB-WRT01.dts index e3a7770..097b87b 100644 --- a/target/linux/ramips/dts/DB-WRT01.dts +++ b/target/linux/ramips/dts/DB-WRT01.dts @@ -17,7 +17,7 @@ m25p80 at 0 { #address-cells = <1>; #size-cells = <1>; - compatible = "en25q64"; + compatible = "jedec,spi-nor"; reg = <0 0>; linux,modalias = "m25p80", "mx25l6405d"; spi-max-frequency = <10000000>; -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Wed Apr 20 13:17:12 2016 From: john at phrozen.org (John Crispin) Date: Wed, 20 Apr 2016 19:17:12 +0200 Subject: [OpenWrt-Devel] [PATCH] feeds.conf.default: remove the commented ancient feeds In-Reply-To: References: <1460278233-2162-1-git-send-email-hannu.nyman@iki.fi> Message-ID: <5717B998.5040408@phrozen.org> On 20/04/2016 00:05, Hannu Nyman wrote: > Does anybody know what happened to this patch? > http://patchwork.ozlabs.org/patch/608467/ > > I got email from ozlabs patchwork eight days ago that the patch was > "accepted" and ozlabs status shows that, but so far the patch has not > been commited to the source repo. It has disappeared somewhere :-( > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel still in my pending queue, looks like i forgot to push 3 patches, will do so in a sec _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zajec5 at gmail.com Wed Apr 20 14:09:19 2016 From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=) Date: Wed, 20 Apr 2016 20:09:19 +0200 Subject: [OpenWrt-Devel] [PATCH] Add support for multiple RADIUS servers In-Reply-To: <1461163731-9192-1-git-send-email-amine.ahd@gmail.com> References: <1461163731-9192-1-git-send-email-amine.ahd@gmail.com> Message-ID: On 20 April 2016 at 16:48, amine.ahd wrote: > Hostapd allows more than one RADIUS server to be added in case the main server goes down. > This allows netifd to load a list of RADIUS servers from the wireless confid file and add them to hostapd. > The format of the list in the config file is as follow: > list auth_servers ... > list auth_ports ... > list auth_secrets ... You need to sign off your patch with a real name. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Wed Apr 20 14:21:25 2016 From: john at phrozen.org (John Crispin) Date: Wed, 20 Apr 2016 20:21:25 +0200 Subject: [OpenWrt-Devel] [PATCH] Add support for multiple RADIUS servers In-Reply-To: References: <1461163731-9192-1-git-send-email-amine.ahd@gmail.com> Message-ID: <5717C8A5.2070305@phrozen.org> On 20/04/2016 20:09, Rafa? Mi?ecki wrote: > On 20 April 2016 at 16:48, amine.ahd wrote: >> Hostapd allows more than one RADIUS server to be added in case the main server goes down. >> This allows netifd to load a list of RADIUS servers from the wireless confid file and add them to hostapd. >> The format of the list in the config file is as follow: >> list auth_servers ... >> list auth_ports ... >> list auth_secrets ... > > You need to sign off your patch with a real name. > _______________________________________________ and the subject is missing the prefix, in this case "hostapd" _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jason.wu.misc at gmail.com Wed Apr 20 23:36:14 2016 From: jason.wu.misc at gmail.com (Jason Wu) Date: Thu, 21 Apr 2016 13:36:14 +1000 Subject: [OpenWrt-Devel] [RFC v2] zynq: Re-implement mkits.sh and use it Message-ID: <1461209777-12017-1-git-send-email-jason.wu.misc@gmail.com> The new mkits.sh is a complete new implementation to support: - multi-configuration (upto 10 with -c option). First -c used defines the default conf used. - multi-image support - multiple kernel/fdt/ramdsik image (upto 50 images) - per image configuration: Tools now reuse the option for each images - hash algorithm and generated required subnodes - compression - signature and generated required subnodes (not tested) This allows user to generate a simple its that only has one configuration that only boot with 1 kernel + 1 fdt to 4 different boot configuration with different image combination. For an example: creating a its with 2 kernel, 1 dtb, 2 rootfs images and has the following configurations: 1: kernel0 + dtb0 + rootfs0 (default boot configuration) 2. kernel0 + dtb0 + rootfs1 3. kernel1 + dtb0 + rootfs0 4. kernel1 + dtb0 + rootfs1 5. kernel0 + dtb1 where kernel1 and rootfs0 is gzip compressed. The command to generate the its is shown as follows: $ ./mkits.sh -A arm -v 4.4 -k kernel0 -C none -c 1 -c 2 -c5 \ -k kernel1 -C gzip -c 3 -c 4 -h crc32 \ -d dtb0 -c 1 -c 2 -c 3 -c 4 -h sha1 -h crc32\ -d dtb1 -c 5 -h sha1 \ -r rootfs0 -C gzip -c 1 -c 2 \ -r rootfs1 -C none -c3 -c4 First -c option used defines the default boot configuration. The key benefit is to have more flexible ITS generation. A typical example, is to create a fitImage with 1 kernel with multiple dtb to provide different features. E.g. system boot with ramdisk or sdroot or nfsroot and etc. Signed-off-by: Jason Wu --- v2: - Fix -D use before -c options - add additional array checking to prevent undeclared array diff --git a/target/linux/zynq/image/Makefile b/target/linux/zynq/image/Makefile index 99293a6..ee4ff61 100644 --- a/target/linux/zynq/image/Makefile +++ b/target/linux/zynq/image/Makefile @@ -32,14 +32,15 @@ define Image/boot-imgs # create FIT image with rootfs ./mkits.sh \ - -D $(DEVICE_LC) -o $(KDIR)/fit-$(DEVICE_LC).its -k $(KDIR)/zImage \ - -d $(BIN_DIR)/$(IMG_PREFIX)-system.dtb \ + -o $(KDIR)/fit-$(DEVICE_LC).its -A $(ARCH) \ + -v $(LINUX_VERSION) \ + -k $(KDIR)/zImage -D $(DEVICE_LC) \ -C none -a $(KERNEL_LOADADDR) -e $(KERNEL_ENTRY_POINT) \ - -A $(ARCH) -v $(LINUX_VERSION) \ - -r $(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz -z gzip + -d $(BIN_DIR)/$(IMG_PREFIX)-system.dtb \ + -r $(BIN_DIR)/$(IMG_PREFIX)-rootfs.cpio.gz \ + -C gzip PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(DEVICE_LC).its $(KDIR)/fit-$(DEVICE_LC).itb $(CP) $(KDIR)/fit-$(DEVICE_LC).itb $(BIN_DIR)/$(IMG_PREFIX)-fit.itb - ln -fs $(IMG_PREFIX)-fit.itb $(BIN_DIR)/fit.itb endef diff --git a/target/linux/zynq/image/mkits.sh b/target/linux/zynq/image/mkits.sh index 2b00d0f..ff6a338 100755 --- a/target/linux/zynq/image/mkits.sh +++ b/target/linux/zynq/image/mkits.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash # # Licensed under the terms of the GNU GPL License version 2 or later. # -# Author: Peter Tyser +# Author: Jason Wu # # U-Boot firmware supports the booting of images in the Flattened Image # Tree (FIT) format. The FIT format uses a device tree structure to @@ -13,138 +13,569 @@ # FIT images). See doc/uImage.FIT/howto.txt in U-Boot source code for # additional information on FIT images. # +# This tools supports: +# - multi-configuration +# - multi-image support - multiple kernel/fdt/ramdsik +# - per image configuration: +# - hash algorithm and generated required subnodes +# - compression +# - signature and generated required subnodes +# +set -e + +# image config limit +MAX_IMG=50 +# conf config limit +MAX_CONF=10 + +# declare main data array +declare -a img_array +declare -a conf_array + +# initialize array with empty values +for (( index=1; index<=$MAX_IMG; index++ )); do + declare -a img$index + for i in {0..13}; do + eval img${index}[$i]="" + done +done + +for (( index=1; index<=$MAX_CONF; index++ )); do + declare -a conf$index + for i in {0..9}; do + eval conf${index}[$i]="" + done +done + +# imgX array index information +# 0: type of image - kernel, fdt, ramdsik +# 1: image location +# 2: image index +# 3: loadaddr of image +# 4: entrypoint of image +# 5: compression +# 6: hash algorithm +# 7: part of the configuration +# 8: Human friend name for the image +# 9: key file name +# 10: signature + +# confX array index information +# 0: conf number +# 1: kernel conf +# 2: fdt conf +# 3: rootfs conf +# 4: kernel key file +# 5: fdt key file +# 6: rootfs key file +# 7: kernel sign_algorithm +# 8: fdt sign_algorithm +# 9: rootfs sign_algorithm usage() { - echo "Usage: `basename $0` -A arch -C comp -a addr -e entry" \ - "-v version -k kernel [-D name -d dtb] -o its_file" + echo "Usage: `basename $0` -A arch -v version -o its_file" \ + "-k kernel -a addr -e entry [-C none] [-h sha1] [-c conf]" + echo -e "Example1:\n\tkernel image ker_img1 with no compression +" + echo -e "\tsha1 hash + fdt dtb1 with sha1 and crc32 hash for conf 1" + echo -e "\t $ `basename $0` -A arm -v 4.4 \ " + echo -e "\t -k ker_img1 -C none -h sha1 -e 0x8000 -a 0x8000 -c 1 \ " + echo -e "\t -d dtb1 -h sha1 -h crc32 -c 1\n" + echo "General settings:" echo -e "\t-A ==> set architecture to 'arch'" + echo -e "\t-v ==> set kernel version to 'version'" + echo -e "\t-o ==> create output file 'its_file' [optional]" + echo "Input image type:" + echo -e "\t-k ==> kernel image 'kernel'" + echo -e "\t-d ==> Device Tree Blob 'dtb'" + echo -e "\t-r ==> ramdisk image 'ramdisk" + echo "Per image configurations:" echo -e "\t-C ==> set compression type 'comp'" + echo -e "\t-c ==> set image config (multiple -c allowed)" echo -e "\t-a ==> set load address to 'addr' (hex)" echo -e "\t-e ==> set entry point to 'entry' (hex)" - echo -e "\t-v ==> set kernel version to 'version'" - echo -e "\t-k ==> include kernel image 'kernel'" - echo -e "\t-D ==> human friendly Device Tree Blob 'name'" - echo -e "\t-d ==> include Device Tree Blob 'dtb'" - echo -e "\t-r ==> include ramdisk" - echo -e "\t-z ==> ramdisk compression type" - echo -e "\t-o ==> create output file 'its_file'" + echo -e "\t-D ==> human friendly 'name' (one word only)" + echo -e "\t-h ==> set hash algorithm (multiple -h allowed)" + echo -e "\t-s ==> set signature for given config image" + echo -e "\t-K ==> set key file for given config image" exit 1 } -while getopts ":A:a:C:D:d:e:k:o:v:r:z:" OPTION -do - case $OPTION in - A ) ARCH=$OPTARG;; - a ) LOAD_ADDR=$OPTARG;; - C ) COMPRESS=$OPTARG;; - D ) DEVICE=$OPTARG;; - d ) DTB=$OPTARG;; - e ) ENTRY_ADDR=$OPTARG;; - k ) KERNEL=$OPTARG;; - o ) OUTPUT=$OPTARG;; - v ) VERSION=$OPTARG;; - r ) RAMDISK=$OPTARG;; - z ) RD_COMPRESS=$OPTARG;; - * ) echo "Invalid option passed to '$0' (options:$@)" - usage;; - esac -done +array_check() +{ + local a=999 + local max_a=0 + local max_i=0 -# Make sure user entered all required parameters -if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \ - [ -z "${ENTRY_ADDR}" ] || [ -z "${VERSION}" ] || [ -z "${KERNEL}" ] || \ - [ -z "${OUTPUT}" ]; then - usage -fi - -ARCH_UPPER=`echo $ARCH | tr '[:lower:]' '[:upper:]'` - -# Conditionally create fdt information -if [ -n "${DTB}" ]; then - FDT=" - fdt at 1 { - description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device tree blob\"; - data = /incbin/(\"${DTB}\"); - type = \"flat_dt\"; - arch = \"${ARCH}\"; - compression = \"none\"; - hash at 1 { - algo = \"crc32\"; - }; - hash at 2 { - algo = \"sha1\"; - }; - }; -" - CONF=" fdt = \"fdt at 1\";" -fi - -# Conditionally create ramdisk node -if [ -n "${RAMDISK}" ]; then - RD_COMPRESS=${RD_COMPRESS:-none} - RD=" - ramdisk at 1 { - description = \"${ARCH_UPPER} OpenWrt ${DEVICE} ramdisk\"; - data = /incbin/(\"${RAMDISK}\"); - type = \"ramdisk\"; - arch = \"${ARCH}\"; - os = \"linux\"; - compression = \"${RD_COMPRESS}\"; - hash at 1 { - algo = \"crc32\"; - }; - hash at 2 { - algo = \"sha1\"; - }; - }; -" - if [ -z "${CONF}" ]; then - CONF=" ramdisk = \"ramdisk at 1\";" + if echo $1 | grep -q img; then + max_a=$MAX_IMG + max_i=13 + let a=$(echo $1 | awk -F "img" '{print $2}') + elif echo $1 | grep -q conf; then + max_a=$MAX_CONF + max_i=9 + let a=$(echo $1 | awk -F "conf" '{print $2}') + fi + if [ ${a} -lt 0 -o ${a} -gt ${max_a} -o \ + ${2} -lt 0 -o ${2} -gt ${max_i} ]; then + echo "WARNING: Invalid array name, skipping!!!" + return 255 + fi +} + +# +# $1: array name +# $2: index +# $3: value +# $4: append operation +# +array_put() +{ + # check if array is declared + array_check $1 $2 || return 0 + if [ -z "$4" ]; then + eval $1[$2]=$3 else - CONF="$CONF - ramdisk = \"ramdisk at 1\";" + eval $1[$2]=\"\${$1[$2]} $3\" + fi +} + +# +# $1: array name +# $2: index +# +array_get() +{ + local val + eval val=\${$1[$2]} + echo $val +} + +parse_args() { + local i=-1 k=-1 d=-1 r=-1 + while getopts ":A:a:C:c:D:d:e:h:k:K:o:v:r:s:" OPTION; do + case $OPTION in + A ) ARCH=$OPTARG;; + a ) array_put img$i 3 $OPTARG;; + C ) value_sanity_chk compression $OPTARG; + array_put img$i 5 $OPTARG;; + c ) array_put img$i 7 $OPTARG append;; + D ) array_put img$i 8 $OPTARG;; + d ) i=$(($i + 1)); + d=$(($d + 1)); + img_array[$i]=img$i; + array_put img$i 0 fdt; + array_put img$i 1 $OPTARG; + array_put img$i 2 $d; + ;; + e ) array_put img$i 4 $OPTARG;; + h ) value_sanity_chk hash $OPTARG; + array_put img$i 6 $OPTARG append;; + k ) i=$(($i + 1)); + k=$(($k + 1)); + img_array[$i]=img$i; + array_put img$i 0 "kernel"; + array_put img$i 1 $OPTARG; + array_put img$i 2 $k; + ;; + K ) array_put img$i 9 $OPTARG;; + o ) OUTPUT=$OPTARG;; + v ) VERSION=$OPTARG;; + r ) i=$(($i + 1)); + r=$(($r + 1)); + img_array[$i]=img$i; + array_put img$i 0 "ramdisk"; + array_put img$i 1 $OPTARG; + array_put img$i 2 $r; + ;; + s ) value_sanity_chk signature $OPTARG; + array_put img$i 10 $OPTARG; + ;; + * ) echo "Invalid option passed to '$0' (options:$@)" + usage;; + esac + done + [ -n "${OUTPUT}" ] || OUTPUT=fitimage.its + [ -n "${VERSION}" ] || VERSION="Unknown" + [ -n "${ARCH}" ] || ARCH=arm +} + +# +# sanity check for signature, compression and hash +# +value_sanity_chk() +{ + local valid="" + case $1 in + signature) valid="sha-1,rsa-2048 sha-256,rsa-2048 sha-256,rsa-4096";; + compression) valid="gzip bzip2 none";; + hash) valid="sha1 md5 crc32";; + esac + if ! echo $valid | grep -q "$2"; then + echo "Error: Invalid $1 provided '$2'" + echo "Valid options are: $valid" + exit 255 fi -fi +} -# Create a default, fully populated DTS file -DATA="/dts-v1/; +# +# Emit the fitImage section bits +# +# $1: Section bit type: fitstart - its header +# imagestart - image section start +# confstart - configuration section start +# sectend - section end +# fitend - fitimage end +# $2: optional variable for confstart section +# +emit_its() { + case $1 in + fitstart) + cat << EOF > ${OUTPUT} +/dts-v1/; / { - description = \"${ARCH_UPPER} OpenWrt FIT (Flattened Image Tree)\"; + description = "U-Boot fitImage for ${VERSION} kernel"; #address-cells = <1>; +EOF + ;; + imagestart) + echo -e "\n\timages {" >> ${OUTPUT};; + confstart) + echo -e "\tconfigurations {\n\t\tdefault = \"conf@${2:-0}\";" \ + >> ${OUTPUT};; + sectend) + echo -e "\t};" >> ${OUTPUT};; + fitend) + echo -e "};" >> ${OUTPUT};; + esac +} - images { - kernel at 1 { - description = \"${ARCH_UPPER} OpenWrt Linux-${VERSION}\"; - data = /incbin/(\"${KERNEL}\"); - type = \"kernel\"; - arch = \"${ARCH}\"; - os = \"linux\"; - compression = \"${COMPRESS}\"; - load = <${LOAD_ADDR}>; - entry = <${ENTRY_ADDR}>; - hash at 1 { - algo = \"crc32\"; +# +# Emit kernel image node +# +emit_kernel() { + local image=${1} + local count=${2:-${MAX_IMG}} + local loaddaddr=${3:-0x8000} + local entrypoint=${4:-0x8000} + local compresson=${5:-none} + local checksum=${6:-sha1} + local name=${7} + + [ -z "${name}" ] || name=" ${name}" + cat << EOF >> ${OUTPUT} + kernel@${count} { + description = "Linux Kernel${name}"; + data = /incbin/("${image}"); + type = "kernel"; + arch = "${ARCH}"; + os = "linux"; + compression = "${compresson}"; + load = <${loaddaddr}>; + entry = <${entrypoint}>; +EOF + emit_cksum ${checksum} + + if [ -z "$SIGN_IN_CONF" ] ; then + emit_signature "$9" "" "" "$8" "" "" + fi + + echo " };" >> ${OUTPUT} +} + +# +# Emit fdt node +# +emit_fdt() { + local image=${1} + local count=${2:-${MAX_IMG}} + local compresson=${3:-none} + local checksum=${4:-sha1} + local name=${5} + + [ -z "${name}" ] || name=" ${name}" + cat << EOF >> ${OUTPUT} + fdt@${count} { + description = "Flattened Device Tree blob${name}"; + data = /incbin/("${image}"); + type = "flat_dt"; + arch = "${ARCH}"; + compression = "none"; +EOF + emit_cksum ${checksum} + if [ -z "$SIGN_IN_CONF" ] ; then + emit_signature "" "$7" "" "" "$6" "" + fi + echo " };" >> ${OUTPUT} +} + +# +# Emit ramdisk node +# +emit_ramdisk() { + local image=${1} + local count=${2:-${MAX_IMG}} + local compresson=${3:-none} + local checksum=${4:-sha1} + local name=${5} + + [ -z "${name}" ] || name=" ${name}" + cat << EOF >> ${OUTPUT} + ramdisk@${count} { + description = "ramdisk${name}"; + data = /incbin/("${image}"); + type = "ramdisk"; + arch = "${ARCH}"; + os = "linux"; + compression = "${compresson}"; +EOF + emit_cksum ${checksum} + if [ -z "$SIGN_IN_CONF" ] ; then + emit_signature "" "" "$7" "" "" "$6" + fi + echo " };" >> ${OUTPUT} +} + +# +# Emit check sum sub node +# +emit_cksum() { + csum_list=$@ + count=1 + for csum in ${csum_list}; do + cat << EOF >> ${OUTPUT} + hash@${count} { + algo = "${csum}"; }; - hash at 2 { - algo = \"sha1\"; +EOF + count=`expr ${count} + 1` + done +} + +# +# Emit signature sub node +# +emit_signature() { + local kernel=$1 + local fdt=$2 + local rootfs=$3 + local kernel_key=$4 + local fdt_key=$5 + local rootfs_key=$6 + local imgs="" + local count=0 + local chk_list="" algo="" algos="" i="" + + for i in kernel fdt rootfs; do + eval algo=\$$i + eval key=\$${i}_key + [ -n "$algo" ] || continue + if ! echo "$algos" | grep -q $algo; then + if [ -z "$algos" ]; then + algos=$algo + else + algos="${algos} $algo" + fi + fi + if ! echo "$keys" | grep -q $key; then + if [ -z "$keys" ]; then + keys=$key + else + keys="${keys} $key" + fi + fi + done + + for algo in $algos; do + for key in $keys; do + img="" + for i in kernel fdt rootfs; do + eval tmp_algo=\$$i + eval tmp_key=\$${i}_key + [ "$tmp_algo" == "$algo" ] || continue + [ "$tmp_key" == "$key" ] || continue + if [ -z "$img" ]; then + img=$i + else + img=${img},$i + fi + done + + [ -n "$img" ] || continue + cat << EOF >> ${OUTPUT} + signature@${count} { + algo = "${algo}"; + key-name-hint = "${key}"; +EOF + if [ -n "$SIGN_IN_CONF" ] ; then + echo " sign-images = \"$img\";" >> ${OUTPUT} + fi + echo " };" >> ${OUTPUT} + + count=`expr ${count} + 1` + done + done +} + +# +# Emit config sub nodes +# +emit_config() { + local conf_csum="sha1" + + if [ -z "${2}" ]; then + echo "Error: config has no kernel img, skipping conf node!" + return 0 + fi + + # Test if we have any DTBs at all + if [ -z "${3}" ] ; then + conf_desc="Boot Linux kernel" + fdt_line="" + else + conf_desc="Boot Linux kernel with FDT blob" + fdt_line=" + fdt = \"fdt@${3}\";" + fi + + # Test if we have any ROOTFS at all + if [ -n "${4}" ] ; then + conf_desc="$conf_desc + ramdisk" + fdt_line="${fdt_line} + ramdisk = \"ramdisk@${4}\";" + fi + + kernel_line="kernel = \"kernel@${2}\";" + + cat << EOF >> ${OUTPUT} + conf@${1} { + description = "${conf_desc}"; + ${kernel_line}${fdt_line} + hash at 1 { + algo = "${conf_csum}"; }; - }; +EOF + if [ -n "$SIGN_IN_CONF" ] ; then + emit_signature "$5" "$6" "$7" "$8" "$9" "${10}" + fi + + echo " };" >> ${OUTPUT} +} + +# +# remove prefix space +# +remove_prefix_space() +{ + echo "$@" | sed "s:^ ::g" +} -${RD} -${FDT} +# +# generate image nodes and its subnodes +# +emit_image_nodes() +{ + local t img_c img_i img_index chk + local img_type img_path img_count img_loadadr img_entrypoint \ + img_compression img_hash img_conf img_name img_key img_sign + + emit_its imagestart + for t in "kernel" "fdt" "ramdisk"; do + img_index=0 + for a in ${img_array[@]}; do + img_type=$(array_get $a 0) + img_path=$(array_get $a 1) + img_count=$(array_get $a 2) + img_loadadr=$(array_get $a 3) + img_entrypoint=$(array_get $a 4) + img_compression=$(array_get $a 5) + img_hash=$(array_get $a 6) + img_conf=$(array_get $a 7) + img_name=$(array_get $a 8) + img_key=$(array_get $a 9) + img_sign=$(array_get $a 10) + + img_conf=$(remove_prefix_space $img_conf) + img_hash=$(remove_prefix_space $img_hash) + + [ "${img_type}" == $t ] || continue + # generate sub nodes + eval chk=\$DEF_$t + [ -n "${chk}" ] || eval DEF_$t=$img_count + case $t in + kernel) emit_kernel "$img_path" "$img_count" \ + "$img_loadadr" "$img_entrypoint" \ + "$img_compression" "$img_hash" \ + "$img_name" "$img_key" "$img_sign";; + fdt) emit_fdt "$img_path" "$img_count" \ + "$img_compression" "$img_hash" \ + "$img_name" "$img_key" "$img_sign";; + + ramdisk) emit_ramdisk "$img_path" "$img_count" \ + "$img_compression" "$img_hash" \ + "$img_name" "$img_key" "$img_sign";; + esac + + # set up configuration data + for img_c in ${img_conf}; do + img_i="" + #set up default configuration if its not set + [ -n "$DEF_CONFIG" ] || DEF_CONFIG=$img_c + [ -n "${img_c}" ] || continue + [ -z "${img_c}" ] || conf_array[$img_c]=conf$img_c + array_put conf$img_c 0 ${img_c} + case $t in + kernel) img_i=1;; + fdt) img_i=2;; + ramdisk) img_i=3;; + esac + array_put conf$img_c $img_i $img_index + array_put conf$img_c $(($img_i + 3)) ${img_sign} + array_put conf$img_c $(($img_i + 6)) ${img_key} + done + img_index=$(($img_index + 1)) + done + done + emit_its sectend +} + +# +# generate configuration node and its subnodes +# +emit_configuration_nodes () +{ + local count kernel fdt ramdisk ker_file fdt_file rfs_file ker_sign \ + fdt_sign rfs_sign + emit_its confstart $DEF_CONFIG + for a in ${conf_array[@]}; do + count=$(array_get $a 0) + kernel=$(array_get $a 1) + fdt=$(array_get $a 2) + ramdisk=$(array_get $a 3) + er_file=$(array_get $a 4) + fdt_file=$(array_get $a 5) + rfs_file=$(array_get $a 6) + ker_sign=$(array_get $a 7) + fdt_sign=$(array_get $a 8) + rfs_sign=$(array_get $a 9) + emit_config "$count" "$kernel" "$fdt" "$ramdisk" "$ker_file" \ + "$fdt_file" "$rfs_file" "$ker_sign" "$fdt_sign" \ + "$rfs_sign" + done + if [ -z "${DEF_CONFIG}" ]; then + emit_config "0" "$DEF_kernel" "$DEF_fdt" "$DEF_ramdisk" + fi + emit_its sectend +} - }; +# Set to none empty to create signature sub node under images node +SIGN_IN_CONF=${SIGN_IN_CONF:-""} +# Set to default config used +DEF_CONFIG=${DEF_CONFIG:-""} - configurations { - default = \"config at 1\"; - config at 1 { - description = \"OpenWrt\"; - kernel = \"kernel at 1\"; -${CONF} - }; - }; -};" +parse_args $@ -# Write .its file to disk -echo "$DATA" > ${OUTPUT} +emit_its fitstart +emit_image_nodes +emit_configuration_nodes +emit_its fitend -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jason.wu.misc at gmail.com Wed Apr 20 23:36:15 2016 From: jason.wu.misc at gmail.com (Jason Wu) Date: Thu, 21 Apr 2016 13:36:15 +1000 Subject: [OpenWrt-Devel] [PATCH] zynq: Remove rdinit patch In-Reply-To: <1461209777-12017-1-git-send-email-jason.wu.misc@gmail.com> References: <1461209777-12017-1-git-send-email-jason.wu.misc@gmail.com> Message-ID: <1461209777-12017-2-git-send-email-jason.wu.misc@gmail.com> This is not required as long as CONFIG_TARGET_INIT_CMD is correctly configured. Signed-off-by: Jason Wu diff --git a/target/linux/zynq/patches-4.4/0001-arm-dts-zynq-zc702.dts-Set-default-rdinit-to-sbin-in.patch b/target/linux/zynq/patches-4.4/0001-arm-dts-zynq-zc702.dts-Set-default-rdinit-to-sbin-in.patch deleted file mode 100644 index ef47c5f..0000000 --- a/target/linux/zynq/patches-4.4/0001-arm-dts-zynq-zc702.dts-Set-default-rdinit-to-sbin-in.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 987b68a94c91b62c020869aec9d9a118259b1f3a Mon Sep 17 00:00:00 2001 -From: Jason Wu -Date: Tue, 19 Jan 2016 14:24:16 +1000 -Subject: [PATCH] arm: dts: zynq-zc702.dts: Set default rdinit to /sbin/init - -Signed-off-by: Jason Wu - ---- a/arch/arm/boot/dts/zynq-zc702.dts -+++ b/arch/arm/boot/dts/zynq-zc702.dts -@@ -30,7 +30,7 @@ - }; - - chosen { -- bootargs = "earlyprintk"; -+ bootargs = "earlyprintk rdinit=/sbin/init"; - stdout-path = "serial0:115200n8"; - }; - -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jason.wu.misc at gmail.com Wed Apr 20 23:36:16 2016 From: jason.wu.misc at gmail.com (Jason Wu) Date: Thu, 21 Apr 2016 13:36:16 +1000 Subject: [OpenWrt-Devel] [PATCH] Zynq: Add Zedboard device support In-Reply-To: <1461209777-12017-1-git-send-email-jason.wu.misc@gmail.com> References: <1461209777-12017-1-git-send-email-jason.wu.misc@gmail.com> Message-ID: <1461209777-12017-3-git-send-email-jason.wu.misc@gmail.com> Tested-by: Joe Zhang Signed-off-by: Jason Wu diff --git a/package/boot/uboot-zynq/Makefile b/package/boot/uboot-zynq/Makefile index 3a17f7f..2053e8d 100644 --- a/package/boot/uboot-zynq/Makefile +++ b/package/boot/uboot-zynq/Makefile @@ -37,8 +37,13 @@ define uboot/zc706 TITLE:=U-Boot $(PKG_VERSION) for Xilinx ZC706 Dev Board endef +define uboot/zed + TITLE:=U-Boot $(PKG_VERSION) for Avnet Digilent ZedBoard Dev Board +endef + UBOOTS := \ zc702 \ + zed \ define Package/uboot/template define Package/uboot-zynq-$(1) diff --git a/target/linux/zynq/base-files/etc/board.d/02_network b/target/linux/zynq/base-files/etc/board.d/02_network index 71d6fd8..35667c0 100755 --- a/target/linux/zynq/base-files/etc/board.d/02_network +++ b/target/linux/zynq/base-files/etc/board.d/02_network @@ -6,7 +6,7 @@ board_config_update case "$(cat /tmp/sysinfo/board_name)" in - xlnx,zynq-zc702) + xlnx,zynq-zc702|xlnx,zynq-zed) ucidef_set_interface_lan 'eth0' ;; esac diff --git a/target/linux/zynq/image/Makefile b/target/linux/zynq/image/Makefile index ee4ff61..eca9d86 100644 --- a/target/linux/zynq/image/Makefile +++ b/target/linux/zynq/image/Makefile @@ -71,6 +71,9 @@ define Device/ZC702 $(call Device/DefaultConfig,zc702) endef +define Device/ZED + $(call Device/DefaultConfig,zed) +endef define Image/BuildKernel $(eval $(call Device/$(PROFILE))) diff --git a/target/linux/zynq/profiles/zed.mk b/target/linux/zynq/profiles/zed.mk new file mode 100644 index 0000000..d8ff08b --- /dev/null +++ b/target/linux/zynq/profiles/zed.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/ZED + NAME:=ZedBoard development baord +endef + +define Profile/ZED/Description + Build firmware image for Avnet Digilent ZedBoard development board. +endef + +$(eval $(call Profile,ZED)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jason.wu.misc at gmail.com Wed Apr 20 23:36:17 2016 From: jason.wu.misc at gmail.com (Jason Wu) Date: Thu, 21 Apr 2016 13:36:17 +1000 Subject: [OpenWrt-Devel] [PATCH] zynq: Add Zybo device support In-Reply-To: <1461209777-12017-1-git-send-email-jason.wu.misc@gmail.com> References: <1461209777-12017-1-git-send-email-jason.wu.misc@gmail.com> Message-ID: <1461209777-12017-4-git-send-email-jason.wu.misc@gmail.com> Signed-off-by: Jason Wu diff --git a/package/boot/uboot-zynq/Makefile b/package/boot/uboot-zynq/Makefile index 2053e8d..412415b 100644 --- a/package/boot/uboot-zynq/Makefile +++ b/package/boot/uboot-zynq/Makefile @@ -41,9 +41,14 @@ define uboot/zed TITLE:=U-Boot $(PKG_VERSION) for Avnet Digilent ZedBoard Dev Board endef +define uboot/zybo + TITLE:=U-Boot $(PKG_VERSION) for Digilent Zybo Dev Board +endef + UBOOTS := \ zc702 \ zed \ + zybo \ define Package/uboot/template define Package/uboot-zynq-$(1) diff --git a/target/linux/zynq/base-files/etc/board.d/02_network b/target/linux/zynq/base-files/etc/board.d/02_network index 35667c0..9659673 100755 --- a/target/linux/zynq/base-files/etc/board.d/02_network +++ b/target/linux/zynq/base-files/etc/board.d/02_network @@ -6,7 +6,7 @@ board_config_update case "$(cat /tmp/sysinfo/board_name)" in - xlnx,zynq-zc702|xlnx,zynq-zed) + xlnx,zynq-zc702|xlnx,zynq-zed|xlnx,zynq-zybo) ucidef_set_interface_lan 'eth0' ;; esac diff --git a/target/linux/zynq/image/Makefile b/target/linux/zynq/image/Makefile index eca9d86..15f4271 100644 --- a/target/linux/zynq/image/Makefile +++ b/target/linux/zynq/image/Makefile @@ -75,6 +75,10 @@ define Device/ZED $(call Device/DefaultConfig,zed) endef +define Device/ZYBO + $(call Device/DefaultConfig,zybo) +endef + define Image/BuildKernel $(eval $(call Device/$(PROFILE))) $(call Image/boot-imgs) diff --git a/target/linux/zynq/profiles/zybo.mk b/target/linux/zynq/profiles/zybo.mk new file mode 100644 index 0000000..dfe7e67 --- /dev/null +++ b/target/linux/zynq/profiles/zybo.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/ZYBO + NAME:=ZYBO development baord +endef + +define Profile/ZYBO/Description + Build firmware image for Digilent ZYBO development board. +endef + +$(eval $(call Profile,ZYBO)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From luizluca at gmail.com Thu Apr 21 00:15:13 2016 From: luizluca at gmail.com (Luiz Angelo Daros de Luca) Date: Thu, 21 Apr 2016 04:15:13 +0000 Subject: [OpenWrt-Devel] upstream opkg Message-ID: Hello, It seems that yocto-project is the new home of opkg. OpenWRT already uses it but get a commit from 2011. Wouldn't it be interesting to sync with upstream and even try to upstream some of openwrt patches? They seem to actively update it. We can get some features and bug fixes for free (like #18320) :-) Regards, -- Luiz Angelo Daros de Luca luizluca at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From amine.ahd at gmail.com Thu Apr 21 02:33:19 2016 From: amine.ahd at gmail.com (Amine Aouled Hamed) Date: Thu, 21 Apr 2016 08:33:19 +0200 Subject: [OpenWrt-Devel] [PATCH] Add support for multiple RADIUS servers In-Reply-To: <5717C8A5.2070305@phrozen.org> References: <1461163731-9192-1-git-send-email-amine.ahd@gmail.com> <5717C8A5.2070305@phrozen.org> Message-ID: My bad, will send a new patch. On Wed, Apr 20, 2016 at 8:21 PM, John Crispin wrote: > > > On 20/04/2016 20:09, Rafa? Mi?ecki wrote: > > On 20 April 2016 at 16:48, amine.ahd wrote: > >> Hostapd allows more than one RADIUS server to be added in case the main > server goes down. > >> This allows netifd to load a list of RADIUS servers from the wireless > confid file and add them to hostapd. > >> The format of the list in the config file is as follow: > >> list auth_servers ... > >> list auth_ports ... > >> list auth_secrets ... > > > > You need to sign off your patch with a real name. > > _______________________________________________ > > and the subject is missing the prefix, in this case "hostapd" > -- Amine Hamed | Software Engineer Ocedo GmbH | Hirschstrasse 7 | 76133 Karlsruhe | Germany Email ahamed at ocedo.com REGISTERED OFFICE: KARLSRUHE | DISTRICT COURT: MANNHEIM | REGISTER NUMBER: HRB 717873 MANAGING DIRECTOR: MARKUS HENNIG|JAN HICHERT -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 02:33:23 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 08:33:23 +0200 Subject: [OpenWrt-Devel] [PATCH 1/4] tools: firmware-utils: clean up mktplinkfw Message-ID: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> Remove the whole board list from mktplinkfw, as OpenWrt doesn't use it and it was severely out of sync with the list of built images for ar71xx. Also: * fix -Wall warnings * add const where appropriate Signed-off-by: Matthias Schiffer --- tools/firmware-utils/Makefile | 2 +- tools/firmware-utils/src/mktplinkfw.c | 468 +++------------------------------- 2 files changed, 35 insertions(+), 435 deletions(-) diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index ec814b0..20f26e2 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -40,7 +40,7 @@ define Host/Compile $(call cc,encode_crc) $(call cc,nand_ecc) $(call cc,mkplanexfw sha1) - $(call cc,mktplinkfw md5) + $(call cc,mktplinkfw md5, -Wall) $(call cc,mktplinkfw2 md5) $(call cc,tplink-safeloader md5, -Wall) $(call cc,pc1crypt) diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index bf7c619..695d4f5 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -31,52 +31,6 @@ #define HEADER_VERSION_V1 0x01000000 #define HEADER_VERSION_V2 0x02000000 -#define HWID_ANTMINER_S1 0x04440101 -#define HWID_ANTMINER_S3 0x04440301 -#define HWID_GL_INET_V1 0x08000001 -#define HWID_GS_OOLITE_V1 0x3C000101 -#define HWID_OMY_X1 0x06660201 -#define HWID_ONION_OMEGA 0x04700001 -#define HWID_TL_MR10U_V1 0x00100101 -#define HWID_TL_MR13U_V1 0x00130101 -#define HWID_TL_MR3020_V1 0x30200001 -#define HWID_TL_MR3220_V1 0x32200001 -#define HWID_TL_MR3220_V2 0x32200002 -#define HWID_TL_MR3420_V1 0x34200001 -#define HWID_TL_MR3420_V2 0x34200002 -#define HWID_TL_WA701N_V1 0x07010001 -#define HWID_TL_WA701N_V2 0x07010002 -#define HWID_TL_WA7210N_V2 0x72100002 -#define HWID_TL_WA7510N_V1 0x75100001 -#define HWID_TL_WA801ND_V1 0x08010001 -#define HWID_TL_WA830RE_V1 0x08300010 -#define HWID_TL_WA830RE_V2 0x08300002 -#define HWID_TL_WA801ND_V2 0x08010002 -#define HWID_TL_WA801ND_V3 0x08010003 -#define HWID_TL_WA901ND_V1 0x09010001 -#define HWID_TL_WA901ND_V2 0x09010002 -#define HWID_TL_WA901ND_V4 0x09010004 -#define HWID_TL_WDR4300_V1_IL 0x43008001 -#define HWID_TL_WDR4900_V1 0x49000001 -#define HWID_TL_WR703N_V1 0x07030101 -#define HWID_TL_WR720N_V3 0x07200103 -#define HWID_TL_WR720N_V4 0x07200104 -#define HWID_TL_WR741ND_V1 0x07410001 -#define HWID_TL_WR741ND_V4 0x07410004 -#define HWID_TL_WR740N_V1 0x07400001 -#define HWID_TL_WR740N_V3 0x07400003 -#define HWID_TL_WR743ND_V1 0x07430001 -#define HWID_TL_WR743ND_V2 0x07430002 -#define HWID_TL_WR841N_V1_5 0x08410002 -#define HWID_TL_WR841ND_V3 0x08410003 -#define HWID_TL_WR841ND_V5 0x08410005 -#define HWID_TL_WR841ND_V7 0x08410007 -#define HWID_TL_WR941ND_V2 0x09410002 -#define HWID_TL_WR941ND_V4 0x09410004 -#define HWID_TL_WR1043ND_V1 0x10430001 -#define HWID_TL_WR1043ND_V2 0x10430002 -#define HWID_TL_WR1041N_V2 0x10410002 -#define HWID_TL_WR2543N_V1 0x25430001 #define MD5SUM_LEN 16 @@ -119,13 +73,6 @@ struct flash_layout { uint32_t rootfs_ofs; }; -struct board_info { - char *id; - uint32_t hw_id; - uint32_t hw_rev; - char *layout_id; -}; - /* * Globals */ @@ -136,8 +83,6 @@ static char *version = "ver. 1.0"; static char *fw_ver = "0.0.0"; static uint32_t hdr_ver = HEADER_VERSION_V1; -static char *board_id; -static struct board_info *board; static char *layout_id; static struct flash_layout *layout; static char *opt_hw_id; @@ -167,12 +112,12 @@ static uint32_t reserved_space; static struct file_info inspect_info; static int extract = 0; -char md5salt_normal[MD5SUM_LEN] = { +static const char md5salt_normal[MD5SUM_LEN] = { 0xdc, 0xd7, 0x3a, 0xa5, 0xc3, 0x95, 0x98, 0xfb, 0xdd, 0xf9, 0xe7, 0xf4, 0x0e, 0xae, 0x47, 0x38, }; -char md5salt_boot[MD5SUM_LEN] = { +static const char md5salt_boot[MD5SUM_LEN] = { 0x8c, 0xef, 0x33, 0x5b, 0xd5, 0xc5, 0xce, 0xfa, 0xa7, 0x9c, 0x28, 0xda, 0xb2, 0xe9, 0x0f, 0x42, }; @@ -217,7 +162,7 @@ static struct flash_layout layouts[] = { }, { .id = "16Mppc", .fw_max_len = 0xf80000, - .kernel_la = 0x00000000, + .kernel_la = 0x00000000 , .kernel_ep = 0xc0000000, .rootfs_ofs = 0x2a0000, }, { @@ -225,242 +170,6 @@ static struct flash_layout layouts[] = { } }; -static struct board_info boards[] = { - { - .id = "TL-MR10Uv1", - .hw_id = HWID_TL_MR10U_V1, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-MR13Uv1", - .hw_id = HWID_TL_MR13U_V1, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-MR3020v1", - .hw_id = HWID_TL_MR3020_V1, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-MR3220v1", - .hw_id = HWID_TL_MR3220_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-MR3220v2", - .hw_id = HWID_TL_MR3220_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-MR3420v1", - .hw_id = HWID_TL_MR3420_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-MR3420v2", - .hw_id = HWID_TL_MR3420_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WA701Nv1", - .hw_id = HWID_TL_WA701N_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA701Nv2", - .hw_id = HWID_TL_WA701N_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WA7210N", - .hw_id = HWID_TL_WA7210N_V2, - .hw_rev = 2, - .layout_id = "4Mlzma", - }, { - .id = "TL-WA7510N", - .hw_id = HWID_TL_WA7510N_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA801NDv1", - .hw_id = HWID_TL_WA801ND_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA830REv1", - .hw_id = HWID_TL_WA830RE_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA830REv2", - .hw_id = HWID_TL_WA830RE_V2, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA801NDv2", - .hw_id = HWID_TL_WA801ND_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - },{ - .id = "TL-WA801NDv3", - .hw_id = HWID_TL_WA801ND_V3, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WA901NDv1", - .hw_id = HWID_TL_WA901ND_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA901NDv2", - .hw_id = HWID_TL_WA901ND_V2, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA901NDv4", - .hw_id = HWID_TL_WA901ND_V4, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WDR4300v1", - .hw_id = HWID_TL_WDR4300_V1_IL, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "TL-WDR4900v1", - .hw_id = HWID_TL_WDR4900_V1, - .hw_rev = 1, - .layout_id = "16Mppc", - }, { - .id = "TL-WR741NDv1", - .hw_id = HWID_TL_WR741ND_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR741NDv4", - .hw_id = HWID_TL_WR741ND_V4, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR740Nv1", - .hw_id = HWID_TL_WR740N_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR740Nv3", - .hw_id = HWID_TL_WR740N_V3, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR743NDv1", - .hw_id = HWID_TL_WR743ND_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR743NDv2", - .hw_id = HWID_TL_WR743ND_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR841Nv1.5", - .hw_id = HWID_TL_WR841N_V1_5, - .hw_rev = 2, - .layout_id = "4M", - }, { - .id = "TL-WR841NDv3", - .hw_id = HWID_TL_WR841ND_V3, - .hw_rev = 3, - .layout_id = "4M", - }, { - .id = "TL-WR841NDv5", - .hw_id = HWID_TL_WR841ND_V5, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR841NDv7", - .hw_id = HWID_TL_WR841ND_V7, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR941NDv2", - .hw_id = HWID_TL_WR941ND_V2, - .hw_rev = 2, - .layout_id = "4M", - }, { - .id = "TL-WR941NDv4", - .hw_id = HWID_TL_WR941ND_V4, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR1041Nv2", - .hw_id = HWID_TL_WR1041N_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR1043NDv1", - .hw_id = HWID_TL_WR1043ND_V1, - .hw_rev = 1, - .layout_id = "8M", - }, { - .id = "TL-WR1043NDv2", - .hw_id = HWID_TL_WR1043ND_V2, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "TL-WR2543Nv1", - .hw_id = HWID_TL_WR2543N_V1, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "TL-WR703Nv1", - .hw_id = HWID_TL_WR703N_V1, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR720Nv3", - .hw_id = HWID_TL_WR720N_V3, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR720Nv4", - .hw_id = HWID_TL_WR720N_V4, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "GL-INETv1", - .hw_id = HWID_GL_INET_V1, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "GS-OOLITEv1", - .hw_id = HWID_GS_OOLITE_V1, - .hw_rev = 1, - .layout_id = "16Mlzma", - }, { - .id = "OMY-X1", - .hw_id = HWID_OMY_X1, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "ONION-OMEGA", - .hw_id = HWID_ONION_OMEGA, - .hw_rev = 1, - .layout_id = "16Mlzma", - }, { - .id = "ANTMINER-S1", - .hw_id = HWID_ANTMINER_S1, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "ANTMINER-S3", - .hw_id = HWID_ANTMINER_S3, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - /* terminating entry */ - } -}; - /* * Message macros */ @@ -481,35 +190,7 @@ static struct board_info boards[] = { fprintf(stderr, "[%s] " fmt "\n", progname, ## __VA_ARGS__ ); \ } while (0) -static struct board_info *find_board(char *id) -{ - struct board_info *ret; - struct board_info *board; - - ret = NULL; - for (board = boards; board->id != NULL; board++){ - if (strcasecmp(id, board->id) == 0) { - ret = board; - break; - } - }; - - return ret; -} - -static struct board_info *find_board_by_hwid(uint32_t hw_id) -{ - struct board_info *board; - - for (board = boards; board->id != NULL; board++) { - if (hw_id == board->hw_id) - return board; - }; - - return NULL; -} - -static struct flash_layout *find_layout(char *id) +static struct flash_layout *find_layout(const char *id) { struct flash_layout *ret; struct flash_layout *l; @@ -527,14 +208,10 @@ static struct flash_layout *find_layout(char *id) static void usage(int status) { - FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout; - struct board_info *board; - - fprintf(stream, "Usage: %s [OPTIONS...]\n", progname); - fprintf(stream, + fprintf(stderr, "Usage: %s [OPTIONS...]\n", progname); + fprintf(stderr, "\n" "Options:\n" -" -B create image for the board specified with \n" " -c use combined kernel image\n" " -E overwrite kernel entry point with (hexval prefixed with 0x)\n" " -L overwrite kernel load address with (hexval prefixed with 0x)\n" @@ -562,7 +239,7 @@ static void usage(int status) exit(status); } -static int get_md5(char *data, int size, char *md5) +static void get_md5(const char *data, int size, uint8_t *md5) { MD5_CTX ctx; @@ -589,7 +266,7 @@ static int get_file_stat(struct file_info *fdata) return 0; } -static int read_to_buf(struct file_info *fdata, char *buf) +static int read_to_buf(const struct file_info *fdata, char *buf) { FILE *f; int ret = EXIT_FAILURE; @@ -631,35 +308,22 @@ static int check_options(void) return -1; } - if (board_id == NULL && opt_hw_id == NULL) { - ERR("either board or hardware id must be specified"); + if (opt_hw_id == NULL) { + ERR("hardware id not specified"); return -1; } + hw_id = strtoul(opt_hw_id, NULL, 0); - if (board_id) { - board = find_board(board_id); - if (board == NULL) { - ERR("unknown/unsupported board id \"%s\"", board_id); - return -1; - } - if (layout_id == NULL) - layout_id = board->layout_id; - - hw_id = board->hw_id; - hw_rev = board->hw_rev; - } else { - if (layout_id == NULL) { - ERR("flash layout is not specified"); - return -1; - } - hw_id = strtoul(opt_hw_id, NULL, 0); - - if (opt_hw_rev) - hw_rev = strtoul(opt_hw_rev, NULL, 0); - else - hw_rev = 1; + if (layout_id == NULL) { + ERR("flash layout is not specified"); + return -1; } + if (opt_hw_rev) + hw_rev = strtoul(opt_hw_rev, NULL, 0); + else + hw_rev = 1; + layout = find_layout(layout_id); if (layout == NULL) { ERR("unknown flash layout \"%s\"", layout_id); @@ -830,7 +494,7 @@ static int pad_jffs2(char *buf, int currlen) return len; } -static int write_fw(char *data, int len) +static int write_fw(const char *data, int len) { FILE *f; int ret = EXIT_FAILURE; @@ -922,61 +586,27 @@ static int build_fw(void) } /* Helper functions to inspect_fw() representing different output formats */ -static inline void inspect_fw_pstr(char *label, char *str) +static inline void inspect_fw_pstr(const char *label, const char *str) { printf("%-23s: %s\n", label, str); } -static inline void inspect_fw_phex(char *label, uint32_t val) +static inline void inspect_fw_phex(const char *label, uint32_t val) { printf("%-23s: 0x%08x\n", label, val); } -static inline void inspect_fw_phexpost(char *label, - uint32_t val, char *post) +static inline void inspect_fw_phexpost(const char *label, uint32_t val, const char *post) { printf("%-23s: 0x%08x (%s)\n", label, val, post); } -static inline void inspect_fw_phexdef(char *label, - uint32_t val, uint32_t defval) -{ - printf("%-23s: 0x%08x ", label, val); - - if (val == defval) - printf("(== OpenWrt default)\n"); - else - printf("(OpenWrt default: 0x%08x)\n", defval); -} - -static inline void inspect_fw_phexexp(char *label, - uint32_t val, uint32_t expval) -{ - printf("%-23s: 0x%08x ", label, val); - - if (val == expval) - printf("(ok)\n"); - else - printf("(expected: 0x%08x)\n", expval); -} - -static inline void inspect_fw_phexdec(char *label, uint32_t val) +static inline void inspect_fw_phexdec(const char *label, uint32_t val) { printf("%-23s: 0x%08x / %8u bytes\n", label, val, val); } -static inline void inspect_fw_phexdecdef(char *label, - uint32_t val, uint32_t defval) -{ - printf("%-23s: 0x%08x / %8u bytes ", label, val, val); - - if (val == defval) - printf("(== OpenWrt default)\n"); - else - printf("(OpenWrt default: 0x%08x)\n", defval); -} - -static inline void inspect_fw_pmd5sum(char *label, uint8_t *val, char *text) +static inline void inspect_fw_pmd5sum(const char *label, const uint8_t *val, const char *text) { int i; @@ -991,7 +621,6 @@ static int inspect_fw(void) char *buf; struct fw_header *hdr; uint8_t md5sum[MD5SUM_LEN]; - struct board_info *board; int ret = EXIT_FAILURE; buf = malloc(inspect_info.file_size); @@ -1043,19 +672,8 @@ static int inspect_fw(void) inspect_fw_pstr("Vendor name", hdr->vendor_name); inspect_fw_pstr("Firmware version", hdr->fw_version); - board = find_board_by_hwid(ntohl(hdr->hw_id)); - if (board) { - layout = find_layout(board->layout_id); - inspect_fw_phexpost("Hardware ID", - ntohl(hdr->hw_id), board->id); - inspect_fw_phexexp("Hardware Revision", - ntohl(hdr->hw_rev), board->hw_rev); - } else { - inspect_fw_phexpost("Hardware ID", - ntohl(hdr->hw_id), "unknown"); - inspect_fw_phex("Hardware Revision", - ntohl(hdr->hw_rev)); - } + inspect_fw_phex("Hardware ID", ntohl(hdr->hw_id)); + inspect_fw_phex("Hardware Revision", ntohl(hdr->hw_rev)); printf("\n"); @@ -1063,24 +681,12 @@ static int inspect_fw(void) ntohl(hdr->kernel_ofs)); inspect_fw_phexdec("Kernel data length", ntohl(hdr->kernel_len)); - if (board) { - inspect_fw_phexdef("Kernel load address", - ntohl(hdr->kernel_la), - layout ? layout->kernel_la : 0xffffffff); - inspect_fw_phexdef("Kernel entry point", - ntohl(hdr->kernel_ep), - layout ? layout->kernel_ep : 0xffffffff); - inspect_fw_phexdecdef("Rootfs data offset", - ntohl(hdr->rootfs_ofs), - layout ? layout->rootfs_ofs : 0xffffffff); - } else { - inspect_fw_phex("Kernel load address", - ntohl(hdr->kernel_la)); - inspect_fw_phex("Kernel entry point", - ntohl(hdr->kernel_ep)); - inspect_fw_phexdec("Rootfs data offset", - ntohl(hdr->rootfs_ofs)); - } + inspect_fw_phex("Kernel load address", + ntohl(hdr->kernel_la)); + inspect_fw_phex("Kernel entry point", + ntohl(hdr->kernel_ep)); + inspect_fw_phexdec("Rootfs data offset", + ntohl(hdr->rootfs_ofs)); inspect_fw_phexdec("Rootfs data length", ntohl(hdr->rootfs_len)); inspect_fw_phexdec("Boot loader data offset", @@ -1136,16 +742,13 @@ static int inspect_fw(void) int main(int argc, char *argv[]) { int ret = EXIT_FAILURE; - int err; - - FILE *outfile; progname = basename(argv[0]); while ( 1 ) { int c; - c = getopt(argc, argv, "a:B:H:E:F:L:m:V:N:W:ci:k:r:R:o:xX:hsSjv:"); + c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:ci:k:r:R:o:xX:hsSjv:"); if (c == -1) break; @@ -1153,9 +756,6 @@ int main(int argc, char *argv[]) case 'a': sscanf(optarg, "0x%x", &rootfs_align); break; - case 'B': - board_id = optarg; - break; case 'H': opt_hw_id = optarg; break; -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 02:33:24 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 08:33:24 +0200 Subject: [OpenWrt-Devel] [PATCH 2/4] tools: firmware-utils: add region code support to mktplinkfw In-Reply-To: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> Message-ID: Signed-off-by: Matthias Schiffer --- tools/firmware-utils/src/mktplinkfw.c | 50 +++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index 695d4f5..a6030ac 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -28,6 +28,7 @@ #include "md5.h" #define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); }) +#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) #define HEADER_VERSION_V1 0x01000000 #define HEADER_VERSION_V2 0x02000000 @@ -45,7 +46,7 @@ struct fw_header { char fw_version[36]; uint32_t hw_id; /* hardware id */ uint32_t hw_rev; /* hardware revision */ - uint32_t unk1; + uint32_t region; /* region code */ uint8_t md5sum1[MD5SUM_LEN]; uint32_t unk2; uint8_t md5sum2[MD5SUM_LEN]; @@ -90,6 +91,8 @@ static uint32_t hw_id; static char *opt_hw_rev; static uint32_t hw_rev; static uint32_t opt_hdr_ver = 1; +static char *country; +static uint32_t region; static int fw_ver_lo; static int fw_ver_mid; static int fw_ver_hi; @@ -170,6 +173,11 @@ static struct flash_layout layouts[] = { } }; +static const char *const regions[] = { + "UN", /* universal */ + "US", +}; + /* * Message macros */ @@ -206,6 +214,24 @@ static struct flash_layout *find_layout(const char *id) return ret; } +static uint32_t find_region(const char *country) { + uint32_t i; + + for (i = 0; i < ARRAY_SIZE(regions); i++) { + if (strcasecmp(regions[i], country) == 0) + return i; + } + + return -1; +} + +static const char * get_region_country(uint32_t region) { + if (region < ARRAY_SIZE(regions)) + return regions[region]; + else + return "unknown"; +} + static void usage(int status) { fprintf(stderr, "Usage: %s [OPTIONS...]\n", progname); @@ -217,6 +243,7 @@ static void usage(int status) " -L overwrite kernel load address with (hexval prefixed with 0x)\n" " -H use hardware id specified with \n" " -W use hardware revision specified with \n" +" -C set region code to \n" " -F use flash layout specified with \n" " -k read kernel image from the file \n" " -r read rootfs image from the file \n" @@ -324,6 +351,17 @@ static int check_options(void) else hw_rev = 1; + if (country) { + region = find_region(country); + if (region == (uint32_t)-1) { + char *end; + region = strtoul(country, &end, 0); + if (*end) { + ERR("unknown region code \"%s\"", country); + } + } + } + layout = find_layout(layout_id); if (layout == NULL) { ERR("unknown flash layout \"%s\"", layout_id); @@ -437,6 +475,7 @@ static void fill_header(char *buf, int len) strncpy(hdr->fw_version, version, sizeof(hdr->fw_version)); hdr->hw_id = htonl(hw_id); hdr->hw_rev = htonl(hw_rev); + hdr->region = htonl(region); if (boot_info.file_size == 0) memcpy(hdr->md5sum1, md5salt_normal, sizeof(hdr->md5sum1)); @@ -645,9 +684,6 @@ static int inspect_fw(void) inspect_fw_phexdec("Version 1 Header size", sizeof(struct fw_header)); - if (ntohl(hdr->unk1) != 0) - inspect_fw_phexdec("Unknown value 1", hdr->unk1); - memcpy(md5sum, hdr->md5sum1, sizeof(md5sum)); if (ntohl(hdr->boot_len) == 0) memcpy(hdr->md5sum1, md5salt_normal, sizeof(md5sum)); @@ -674,6 +710,7 @@ static int inspect_fw(void) inspect_fw_pstr("Firmware version", hdr->fw_version); inspect_fw_phex("Hardware ID", ntohl(hdr->hw_id)); inspect_fw_phex("Hardware Revision", ntohl(hdr->hw_rev)); + inspect_fw_phexpost("Region code", ntohl(hdr->region), get_region_country(ntohl(hdr->region))); printf("\n"); @@ -748,7 +785,7 @@ int main(int argc, char *argv[]) while ( 1 ) { int c; - c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:ci:k:r:R:o:xX:hsSjv:"); + c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:C:ci:k:r:R:o:xX:hsSjv:"); if (c == -1) break; @@ -768,6 +805,9 @@ int main(int argc, char *argv[]) case 'W': opt_hw_rev = optarg; break; + case 'C': + country = optarg; + break; case 'L': sscanf(optarg, "0x%x", &kernel_la); break; -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 02:33:25 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 08:33:25 +0200 Subject: [OpenWrt-Devel] [PATCH 3/4] ar71xx: fix giving extra arguments to Build/mktplinkfw In-Reply-To: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> Message-ID: <0bb71f7724182cb86d3d67cf399776b811c6219b.1461220406.git.mschiffer@universe-factory.net> The build command will always get the whole argument string in $(1), regardless of whitespace. We need to use word/wordlist to split the string after the first word. Whitespace and quotation will be given to the command verbatim (make will ignore it), so to give multiple arguments, no quotation marks may be used. Fixes: r47174 ("ar71xx/image: add options argument to mktplinkfw step") Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/image/Makefile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e4e2fcf..2699b64 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -49,14 +49,15 @@ endef # -X reserve bytes in the firmware image (hexval prefixed with 0x) define Build/mktplinkfw -$(STAGING_DIR_HOST)/bin/mktplinkfw \ - -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $2 \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \ -m $(TPLINK_HEADER_VERSION) \ -k $(word 1,$^) \ -r $@ \ -o $@.new \ -j -X 0x40000 \ -a $(call rootfs_align,$(FILESYSTEM)) \ - $(if $(findstring sysupgrade,$1),-s) && mv $@.new $@ || rm -f $@ + $(wordlist 2,$(words $(1)),$(1)) \ + $(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@ endef # mktplinkfw-initramfs @@ -64,7 +65,7 @@ endef # -c combined image define Build/mktplinkfw-initramfs $(STAGING_DIR_HOST)/bin/mktplinkfw \ - -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $2 \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $(1) \ -m $(TPLINK_HEADER_VERSION) \ -k $@ \ -o $@.new \ @@ -75,14 +76,14 @@ endef define Build/tplink-safeloader -$(STAGING_DIR_HOST)/bin/tplink-safeloader \ - -B $(TPLINK_BOARD_NAME) \ - -V $(REVISION) \ - -k $(word 1,$^) \ - -r $@ \ - -o $@.new \ - $2 \ - -j \ - $(if $(findstring sysupgrade,$1),-S) && mv $@.new $@ || rm -f $@ + -B $(TPLINK_BOARD_NAME) \ + -V $(REVISION) \ + -k $(word 1,$^) \ + -r $@ \ + -o $@.new \ + -j \ + $(wordlist 2,$(words $(1)),$(1)) \ + $(if $(findstring sysupgrade,$(word 1,$(1))),-S) && mv $@.new $@ || rm -f $@ endef define Build/loader-common @@ -967,8 +968,8 @@ define Device/tl-wr2543-v1 BOARDNAME := TL-WR2543N DEVICE_PROFILE := TLWR2543 TPLINK_HWID := 0x25430001 - IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade "-v 3.13.99" - IMAGE/factory.bin := append-rootfs | mktplinkfw factory "-v 3.13.99" + IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99 + IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99 endef TARGET_DEVICES += tl-wr2543-v1 -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 02:33:26 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 08:33:26 +0200 Subject: [OpenWrt-Devel] [PATCH 4/4] ar71xx: build TP-LINK Archer C7 images with US region code In-Reply-To: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> Message-ID: <527f53acce19786de67514e6df08a76d366646c6.1461220406.git.mschiffer@universe-factory.net> Since December 2015, the Archer C7 comes with an US-specific firmware. This firmware will only allow upgrades with images that contain the US region code in the firmware header. The "universal" firmware distributed in the rest of the world doesn't care about the region code, so we can just unconditionally set the region to US for now. When other region-specific firmwares appear, we'll need to create a factory image for each of them. Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/image/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 2699b64..2b2e868 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -414,6 +414,7 @@ define Device/archer-c7-v2 BOARDNAME := ARCHER-C7 DEVICE_PROFILE := ARCHERC7 TPLINK_HWID := 0xc7000002 + IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US endef define Device/tl-wdr7500-v3 -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From amine.ahd at gmail.com Thu Apr 21 02:39:34 2016 From: amine.ahd at gmail.com (amine.ahd) Date: Thu, 21 Apr 2016 08:39:34 +0200 Subject: [OpenWrt-Devel] [PATCH] Hostapd: Add support for multiple RADIUS servers Message-ID: <1461220774-16115-1-git-send-email-amine.ahd@gmail.com> Hostapd allows more than one RADIUS server to be added in case the main server goes down. This allows netifd to load a list of RADIUS servers from the wireless confid file and add them to hostapd. The format of the list in the config file is as follow: list auth_servers ... list auth_ports ... list auth_secrets ... Signed-off-by: Amine Hamed --- .../network/services/hostapd/files/netifd.sh | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index 417cc42..ed772ff 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -125,6 +125,10 @@ hostapd_common_add_bss_config() { config_add_string auth_secret config_add_int 'auth_port:port' 'port:port' + config_add_array auth_servers + config_add_array auth_secrets + config_add_array auth_ports + config_add_string acct_server config_add_string acct_secret config_add_int acct_port @@ -269,10 +273,34 @@ hostapd_set_bss_options() { set_default vlan_naming 1 + # leave the default option for legacy compatibility append bss_conf "auth_server_addr=$auth_server" "$N" append bss_conf "auth_server_port=$auth_port" "$N" append bss_conf "auth_server_shared_secret=$auth_secret" "$N" + # List of fallback RADIUS servers + json_select "auth_servers" + local Index="1" + while json_get_type Var $Index && [ "$Var" = string ]; do + json_get_var Var "$((Index))" + append bss_conf "auth_server_addr=$Var" "$N" + json_select ".." + + json_select "auth_ports" + json_get_var Var "$((Index))" + set_default Var 1812 + append bss_conf "auth_server_port=$Var" "$N" + json_select ".." + + json_select "auth_secrets" + json_get_var Var "$((Index++))" + append bss_conf "auth_server_shared_secret=$Var" "$N" + json_select ".." + + json_select "auth_servers" + done + json_select ".." + [ -n "$acct_server" ] && { append bss_conf "acct_server_addr=$acct_server" "$N" append bss_conf "acct_server_port=$acct_port" "$N" -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Thu Apr 21 05:17:47 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Thu, 21 Apr 2016 11:17:47 +0200 Subject: [OpenWrt-Devel] upstream opkg In-Reply-To: References: Message-ID: <57189ABB.3090909@openwrt.org> Hi, Yocto made opkg unusable for us. Current upstream is *far* too big for use in OpenWrt. The now required libarchive alone is larger than our current opkg version. I took a look at packaging current opkg a while back and got stuck at bringing libarchive down to a sane size, therfor I gave up on it. ~ Jo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zajec5 at gmail.com Thu Apr 21 05:28:27 2016 From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=) Date: Thu, 21 Apr 2016 11:28:27 +0200 Subject: [OpenWrt-Devel] [PATCH 2/4] tools: firmware-utils: add region code support to mktplinkfw In-Reply-To: References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> Message-ID: On 21 April 2016 at 08:33, Matthias Schiffer wrote: > @@ -324,6 +351,17 @@ static int check_options(void) > else > hw_rev = 1; > > + if (country) { > + region = find_region(country); > + if (region == (uint32_t)-1) { > + char *end; > + region = strtoul(country, &end, 0); > + if (*end) { > + ERR("unknown region code \"%s\"", country); > + } > + } > + } I'm wondering if this wouldn't be better to just make find_region return signed int. What about failing to build firmware if a provided country can't be converted into an unsigned int? Right now you set "region" field in the header to ULONG_MAX if country is invalid. This tool usually refuses to build firmware if something goes wrong, e.g.: ERR("either board or hardware id must be specified"); return -1; ERR("unknown/unsupported board id \"%s\"", board_id); return -1; ERR("flash layout is not specified"); return -1; _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zajec5 at gmail.com Thu Apr 21 05:30:54 2016 From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=) Date: Thu, 21 Apr 2016 11:30:54 +0200 Subject: [OpenWrt-Devel] [PATCH 3/4] ar71xx: fix giving extra arguments to Build/mktplinkfw In-Reply-To: <0bb71f7724182cb86d3d67cf399776b811c6219b.1461220406.git.mschiffer@universe-factory.net> References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> <0bb71f7724182cb86d3d67cf399776b811c6219b.1461220406.git.mschiffer@universe-factory.net> Message-ID: On 21 April 2016 at 08:33, Matthias Schiffer wrote: > @@ -967,8 +968,8 @@ define Device/tl-wr2543-v1 > BOARDNAME := TL-WR2543N > DEVICE_PROFILE := TLWR2543 > TPLINK_HWID := 0x25430001 > - IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade "-v 3.13.99" > - IMAGE/factory.bin := append-rootfs | mktplinkfw factory "-v 3.13.99" > + IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99 > + IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99 > endef > TARGET_DEVICES += tl-wr2543-v1 Any idea why we don't use variables in the first place? E.g. VERSION := 3.13.99 -- Rafa? _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 05:36:53 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 11:36:53 +0200 Subject: [OpenWrt-Devel] [PATCH 2/4] tools: firmware-utils: add region code support to mktplinkfw In-Reply-To: References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> Message-ID: <57189F35.1040901@universe-factory.net> On 04/21/2016 11:28 AM, Rafa? Mi?ecki wrote: > On 21 April 2016 at 08:33, Matthias Schiffer > wrote: >> @@ -324,6 +351,17 @@ static int check_options(void) >> else >> hw_rev = 1; >> >> + if (country) { >> + region = find_region(country); >> + if (region == (uint32_t)-1) { >> + char *end; >> + region = strtoul(country, &end, 0); >> + if (*end) { >> + ERR("unknown region code \"%s\"", country); >> + } >> + } >> + } > > I'm wondering if this wouldn't be better to just make find_region > return signed int. > > What about failing to build firmware if a provided country can't be > converted into an unsigned int? Right now you set "region" field in > the header to ULONG_MAX if country is invalid. This tool usually > refuses to build firmware if something goes wrong, e.g.: > > ERR("either board or hardware id must be specified"); > return -1; > > ERR("unknown/unsupported board id \"%s\"", board_id); > return -1; > > ERR("flash layout is not specified"); > return -1; > I don't think returning signed makes sense, uint32_t is also used in the struct (and everywhere else). Regarding the error case: Yes, I forgot the 'return -1' there, I'll send a v2. Matthias -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 05:40:08 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 11:40:08 +0200 Subject: [OpenWrt-Devel] [PATCH 3/4] ar71xx: fix giving extra arguments to Build/mktplinkfw In-Reply-To: References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461220405.git.mschiffer@universe-factory.net> <0bb71f7724182cb86d3d67cf399776b811c6219b.1461220406.git.mschiffer@universe-factory.net> Message-ID: <57189FF8.20709@universe-factory.net> On 04/21/2016 11:30 AM, Rafa? Mi?ecki wrote: > On 21 April 2016 at 08:33, Matthias Schiffer > wrote: >> @@ -967,8 +968,8 @@ define Device/tl-wr2543-v1 >> BOARDNAME := TL-WR2543N >> DEVICE_PROFILE := TLWR2543 >> TPLINK_HWID := 0x25430001 >> - IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade "-v 3.13.99" >> - IMAGE/factory.bin := append-rootfs | mktplinkfw factory "-v 3.13.99" >> + IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99 >> + IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99 >> endef >> TARGET_DEVICES += tl-wr2543-v1 > > Any idea why we don't use variables in the first place? E.g. > VERSION := 3.13.99 > For the version, this would make sense, but can be done in a separate patch. For the region code, we will eventually need to build multiple factory images with different arguments, so in that case, using additional arguments for the mktplinkfw build step makes sense. Matthias -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bapclenet at gmail.com Thu Apr 21 11:45:58 2016 From: bapclenet at gmail.com (Baptiste Clenet) Date: Thu, 21 Apr 2016 17:45:58 +0200 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface In-Reply-To: References: <570FB001.8030507@phrozen.org> Message-ID: Will finish to try next week Le 14 avr. 2016 20:20, "Baptiste Clenet" a ?crit : > 2016-04-14 16:58 GMT+02:00 John Crispin : > > > > > > On 14/04/2016 16:38, Baptiste Clenet wrote: > >> Marc, yes it has been added by John Crispins. > >> > >> I had nothing in etc/config/wireless, which is the right definition > >> for this driver? (I don't find any documentation). Tom, Adam, yes it > >> is defined. > >> > >> 2016-04-12 13:30 GMT+02:00 Adam Kent : > >>> Hi Baptiste > >>> > >>> Which board exactly? You may need to add the "wmac" definition to the > >>> relevant dts file. Have a look in > >>> target/linux/ramips/dts/.dts and make sure there's > >>> this: > >>> > >>> wmac at 10300000 { > >>> status = "okay"; > >>> }; > >>> > >>> - Adam > >>> > >>> On Tue, Apr 12, 2016 at 6:27 PM, Baptiste Clenet > wrote: > >>>> Hi, > >>>> > >>>> I flashed the current tree on mt7688 board and no interface showed up > >>>> for wifi. Should I do something? I would like to try the mt76 wifi > >>>> driver on this board. (I added it with in menuconfig) > >>>> > >>>> Cheers, > >>>> > >>>> -- > >>>> Baptiste > >>>> _______________________________________________ > >>>> openwrt-devel mailing list > >>>> openwrt-devel at lists.openwrt.org > >>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > >> > >> > >> > > > > > > are you loading the mt76 driver ? > modprobe mt76? > It is already loaded: > cfg80211 215619 3 mt7603e > mac80211 389306 3 mt7603e > mt76 15734 2 mt7603e > mt7603e 27964 0 > mt76x2e 34300 0 > > _______________________________________________ > > openwrt-devel mailing list > > openwrt-devel at lists.openwrt.org > > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > > > -- > Baptiste > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 11:50:37 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 17:50:37 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/4] tools: firmware-utils: clean up mktplinkfw Message-ID: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461253840.git.mschiffer@universe-factory.net> Remove the whole board list from mktplinkfw, as OpenWrt doesn't use it and it was severely out of sync with the list of built images for ar71xx. Also: * fix -Wall warnings * add const where appropriate Signed-off-by: Matthias Schiffer --- tools/firmware-utils/Makefile | 2 +- tools/firmware-utils/src/mktplinkfw.c | 468 +++------------------------------- 2 files changed, 35 insertions(+), 435 deletions(-) diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index ec814b0..20f26e2 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -40,7 +40,7 @@ define Host/Compile $(call cc,encode_crc) $(call cc,nand_ecc) $(call cc,mkplanexfw sha1) - $(call cc,mktplinkfw md5) + $(call cc,mktplinkfw md5, -Wall) $(call cc,mktplinkfw2 md5) $(call cc,tplink-safeloader md5, -Wall) $(call cc,pc1crypt) diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index bf7c619..695d4f5 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -31,52 +31,6 @@ #define HEADER_VERSION_V1 0x01000000 #define HEADER_VERSION_V2 0x02000000 -#define HWID_ANTMINER_S1 0x04440101 -#define HWID_ANTMINER_S3 0x04440301 -#define HWID_GL_INET_V1 0x08000001 -#define HWID_GS_OOLITE_V1 0x3C000101 -#define HWID_OMY_X1 0x06660201 -#define HWID_ONION_OMEGA 0x04700001 -#define HWID_TL_MR10U_V1 0x00100101 -#define HWID_TL_MR13U_V1 0x00130101 -#define HWID_TL_MR3020_V1 0x30200001 -#define HWID_TL_MR3220_V1 0x32200001 -#define HWID_TL_MR3220_V2 0x32200002 -#define HWID_TL_MR3420_V1 0x34200001 -#define HWID_TL_MR3420_V2 0x34200002 -#define HWID_TL_WA701N_V1 0x07010001 -#define HWID_TL_WA701N_V2 0x07010002 -#define HWID_TL_WA7210N_V2 0x72100002 -#define HWID_TL_WA7510N_V1 0x75100001 -#define HWID_TL_WA801ND_V1 0x08010001 -#define HWID_TL_WA830RE_V1 0x08300010 -#define HWID_TL_WA830RE_V2 0x08300002 -#define HWID_TL_WA801ND_V2 0x08010002 -#define HWID_TL_WA801ND_V3 0x08010003 -#define HWID_TL_WA901ND_V1 0x09010001 -#define HWID_TL_WA901ND_V2 0x09010002 -#define HWID_TL_WA901ND_V4 0x09010004 -#define HWID_TL_WDR4300_V1_IL 0x43008001 -#define HWID_TL_WDR4900_V1 0x49000001 -#define HWID_TL_WR703N_V1 0x07030101 -#define HWID_TL_WR720N_V3 0x07200103 -#define HWID_TL_WR720N_V4 0x07200104 -#define HWID_TL_WR741ND_V1 0x07410001 -#define HWID_TL_WR741ND_V4 0x07410004 -#define HWID_TL_WR740N_V1 0x07400001 -#define HWID_TL_WR740N_V3 0x07400003 -#define HWID_TL_WR743ND_V1 0x07430001 -#define HWID_TL_WR743ND_V2 0x07430002 -#define HWID_TL_WR841N_V1_5 0x08410002 -#define HWID_TL_WR841ND_V3 0x08410003 -#define HWID_TL_WR841ND_V5 0x08410005 -#define HWID_TL_WR841ND_V7 0x08410007 -#define HWID_TL_WR941ND_V2 0x09410002 -#define HWID_TL_WR941ND_V4 0x09410004 -#define HWID_TL_WR1043ND_V1 0x10430001 -#define HWID_TL_WR1043ND_V2 0x10430002 -#define HWID_TL_WR1041N_V2 0x10410002 -#define HWID_TL_WR2543N_V1 0x25430001 #define MD5SUM_LEN 16 @@ -119,13 +73,6 @@ struct flash_layout { uint32_t rootfs_ofs; }; -struct board_info { - char *id; - uint32_t hw_id; - uint32_t hw_rev; - char *layout_id; -}; - /* * Globals */ @@ -136,8 +83,6 @@ static char *version = "ver. 1.0"; static char *fw_ver = "0.0.0"; static uint32_t hdr_ver = HEADER_VERSION_V1; -static char *board_id; -static struct board_info *board; static char *layout_id; static struct flash_layout *layout; static char *opt_hw_id; @@ -167,12 +112,12 @@ static uint32_t reserved_space; static struct file_info inspect_info; static int extract = 0; -char md5salt_normal[MD5SUM_LEN] = { +static const char md5salt_normal[MD5SUM_LEN] = { 0xdc, 0xd7, 0x3a, 0xa5, 0xc3, 0x95, 0x98, 0xfb, 0xdd, 0xf9, 0xe7, 0xf4, 0x0e, 0xae, 0x47, 0x38, }; -char md5salt_boot[MD5SUM_LEN] = { +static const char md5salt_boot[MD5SUM_LEN] = { 0x8c, 0xef, 0x33, 0x5b, 0xd5, 0xc5, 0xce, 0xfa, 0xa7, 0x9c, 0x28, 0xda, 0xb2, 0xe9, 0x0f, 0x42, }; @@ -217,7 +162,7 @@ static struct flash_layout layouts[] = { }, { .id = "16Mppc", .fw_max_len = 0xf80000, - .kernel_la = 0x00000000, + .kernel_la = 0x00000000 , .kernel_ep = 0xc0000000, .rootfs_ofs = 0x2a0000, }, { @@ -225,242 +170,6 @@ static struct flash_layout layouts[] = { } }; -static struct board_info boards[] = { - { - .id = "TL-MR10Uv1", - .hw_id = HWID_TL_MR10U_V1, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-MR13Uv1", - .hw_id = HWID_TL_MR13U_V1, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-MR3020v1", - .hw_id = HWID_TL_MR3020_V1, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-MR3220v1", - .hw_id = HWID_TL_MR3220_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-MR3220v2", - .hw_id = HWID_TL_MR3220_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-MR3420v1", - .hw_id = HWID_TL_MR3420_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-MR3420v2", - .hw_id = HWID_TL_MR3420_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WA701Nv1", - .hw_id = HWID_TL_WA701N_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA701Nv2", - .hw_id = HWID_TL_WA701N_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WA7210N", - .hw_id = HWID_TL_WA7210N_V2, - .hw_rev = 2, - .layout_id = "4Mlzma", - }, { - .id = "TL-WA7510N", - .hw_id = HWID_TL_WA7510N_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA801NDv1", - .hw_id = HWID_TL_WA801ND_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA830REv1", - .hw_id = HWID_TL_WA830RE_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA830REv2", - .hw_id = HWID_TL_WA830RE_V2, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA801NDv2", - .hw_id = HWID_TL_WA801ND_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - },{ - .id = "TL-WA801NDv3", - .hw_id = HWID_TL_WA801ND_V3, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WA901NDv1", - .hw_id = HWID_TL_WA901ND_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA901NDv2", - .hw_id = HWID_TL_WA901ND_V2, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WA901NDv4", - .hw_id = HWID_TL_WA901ND_V4, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WDR4300v1", - .hw_id = HWID_TL_WDR4300_V1_IL, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "TL-WDR4900v1", - .hw_id = HWID_TL_WDR4900_V1, - .hw_rev = 1, - .layout_id = "16Mppc", - }, { - .id = "TL-WR741NDv1", - .hw_id = HWID_TL_WR741ND_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR741NDv4", - .hw_id = HWID_TL_WR741ND_V4, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR740Nv1", - .hw_id = HWID_TL_WR740N_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR740Nv3", - .hw_id = HWID_TL_WR740N_V3, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR743NDv1", - .hw_id = HWID_TL_WR743ND_V1, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR743NDv2", - .hw_id = HWID_TL_WR743ND_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR841Nv1.5", - .hw_id = HWID_TL_WR841N_V1_5, - .hw_rev = 2, - .layout_id = "4M", - }, { - .id = "TL-WR841NDv3", - .hw_id = HWID_TL_WR841ND_V3, - .hw_rev = 3, - .layout_id = "4M", - }, { - .id = "TL-WR841NDv5", - .hw_id = HWID_TL_WR841ND_V5, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR841NDv7", - .hw_id = HWID_TL_WR841ND_V7, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR941NDv2", - .hw_id = HWID_TL_WR941ND_V2, - .hw_rev = 2, - .layout_id = "4M", - }, { - .id = "TL-WR941NDv4", - .hw_id = HWID_TL_WR941ND_V4, - .hw_rev = 1, - .layout_id = "4M", - }, { - .id = "TL-WR1041Nv2", - .hw_id = HWID_TL_WR1041N_V2, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR1043NDv1", - .hw_id = HWID_TL_WR1043ND_V1, - .hw_rev = 1, - .layout_id = "8M", - }, { - .id = "TL-WR1043NDv2", - .hw_id = HWID_TL_WR1043ND_V2, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "TL-WR2543Nv1", - .hw_id = HWID_TL_WR2543N_V1, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "TL-WR703Nv1", - .hw_id = HWID_TL_WR703N_V1, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR720Nv3", - .hw_id = HWID_TL_WR720N_V3, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "TL-WR720Nv4", - .hw_id = HWID_TL_WR720N_V4, - .hw_rev = 1, - .layout_id = "4Mlzma", - }, { - .id = "GL-INETv1", - .hw_id = HWID_GL_INET_V1, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "GS-OOLITEv1", - .hw_id = HWID_GS_OOLITE_V1, - .hw_rev = 1, - .layout_id = "16Mlzma", - }, { - .id = "OMY-X1", - .hw_id = HWID_OMY_X1, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "ONION-OMEGA", - .hw_id = HWID_ONION_OMEGA, - .hw_rev = 1, - .layout_id = "16Mlzma", - }, { - .id = "ANTMINER-S1", - .hw_id = HWID_ANTMINER_S1, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - .id = "ANTMINER-S3", - .hw_id = HWID_ANTMINER_S3, - .hw_rev = 1, - .layout_id = "8Mlzma", - }, { - /* terminating entry */ - } -}; - /* * Message macros */ @@ -481,35 +190,7 @@ static struct board_info boards[] = { fprintf(stderr, "[%s] " fmt "\n", progname, ## __VA_ARGS__ ); \ } while (0) -static struct board_info *find_board(char *id) -{ - struct board_info *ret; - struct board_info *board; - - ret = NULL; - for (board = boards; board->id != NULL; board++){ - if (strcasecmp(id, board->id) == 0) { - ret = board; - break; - } - }; - - return ret; -} - -static struct board_info *find_board_by_hwid(uint32_t hw_id) -{ - struct board_info *board; - - for (board = boards; board->id != NULL; board++) { - if (hw_id == board->hw_id) - return board; - }; - - return NULL; -} - -static struct flash_layout *find_layout(char *id) +static struct flash_layout *find_layout(const char *id) { struct flash_layout *ret; struct flash_layout *l; @@ -527,14 +208,10 @@ static struct flash_layout *find_layout(char *id) static void usage(int status) { - FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout; - struct board_info *board; - - fprintf(stream, "Usage: %s [OPTIONS...]\n", progname); - fprintf(stream, + fprintf(stderr, "Usage: %s [OPTIONS...]\n", progname); + fprintf(stderr, "\n" "Options:\n" -" -B create image for the board specified with \n" " -c use combined kernel image\n" " -E overwrite kernel entry point with (hexval prefixed with 0x)\n" " -L overwrite kernel load address with (hexval prefixed with 0x)\n" @@ -562,7 +239,7 @@ static void usage(int status) exit(status); } -static int get_md5(char *data, int size, char *md5) +static void get_md5(const char *data, int size, uint8_t *md5) { MD5_CTX ctx; @@ -589,7 +266,7 @@ static int get_file_stat(struct file_info *fdata) return 0; } -static int read_to_buf(struct file_info *fdata, char *buf) +static int read_to_buf(const struct file_info *fdata, char *buf) { FILE *f; int ret = EXIT_FAILURE; @@ -631,35 +308,22 @@ static int check_options(void) return -1; } - if (board_id == NULL && opt_hw_id == NULL) { - ERR("either board or hardware id must be specified"); + if (opt_hw_id == NULL) { + ERR("hardware id not specified"); return -1; } + hw_id = strtoul(opt_hw_id, NULL, 0); - if (board_id) { - board = find_board(board_id); - if (board == NULL) { - ERR("unknown/unsupported board id \"%s\"", board_id); - return -1; - } - if (layout_id == NULL) - layout_id = board->layout_id; - - hw_id = board->hw_id; - hw_rev = board->hw_rev; - } else { - if (layout_id == NULL) { - ERR("flash layout is not specified"); - return -1; - } - hw_id = strtoul(opt_hw_id, NULL, 0); - - if (opt_hw_rev) - hw_rev = strtoul(opt_hw_rev, NULL, 0); - else - hw_rev = 1; + if (layout_id == NULL) { + ERR("flash layout is not specified"); + return -1; } + if (opt_hw_rev) + hw_rev = strtoul(opt_hw_rev, NULL, 0); + else + hw_rev = 1; + layout = find_layout(layout_id); if (layout == NULL) { ERR("unknown flash layout \"%s\"", layout_id); @@ -830,7 +494,7 @@ static int pad_jffs2(char *buf, int currlen) return len; } -static int write_fw(char *data, int len) +static int write_fw(const char *data, int len) { FILE *f; int ret = EXIT_FAILURE; @@ -922,61 +586,27 @@ static int build_fw(void) } /* Helper functions to inspect_fw() representing different output formats */ -static inline void inspect_fw_pstr(char *label, char *str) +static inline void inspect_fw_pstr(const char *label, const char *str) { printf("%-23s: %s\n", label, str); } -static inline void inspect_fw_phex(char *label, uint32_t val) +static inline void inspect_fw_phex(const char *label, uint32_t val) { printf("%-23s: 0x%08x\n", label, val); } -static inline void inspect_fw_phexpost(char *label, - uint32_t val, char *post) +static inline void inspect_fw_phexpost(const char *label, uint32_t val, const char *post) { printf("%-23s: 0x%08x (%s)\n", label, val, post); } -static inline void inspect_fw_phexdef(char *label, - uint32_t val, uint32_t defval) -{ - printf("%-23s: 0x%08x ", label, val); - - if (val == defval) - printf("(== OpenWrt default)\n"); - else - printf("(OpenWrt default: 0x%08x)\n", defval); -} - -static inline void inspect_fw_phexexp(char *label, - uint32_t val, uint32_t expval) -{ - printf("%-23s: 0x%08x ", label, val); - - if (val == expval) - printf("(ok)\n"); - else - printf("(expected: 0x%08x)\n", expval); -} - -static inline void inspect_fw_phexdec(char *label, uint32_t val) +static inline void inspect_fw_phexdec(const char *label, uint32_t val) { printf("%-23s: 0x%08x / %8u bytes\n", label, val, val); } -static inline void inspect_fw_phexdecdef(char *label, - uint32_t val, uint32_t defval) -{ - printf("%-23s: 0x%08x / %8u bytes ", label, val, val); - - if (val == defval) - printf("(== OpenWrt default)\n"); - else - printf("(OpenWrt default: 0x%08x)\n", defval); -} - -static inline void inspect_fw_pmd5sum(char *label, uint8_t *val, char *text) +static inline void inspect_fw_pmd5sum(const char *label, const uint8_t *val, const char *text) { int i; @@ -991,7 +621,6 @@ static int inspect_fw(void) char *buf; struct fw_header *hdr; uint8_t md5sum[MD5SUM_LEN]; - struct board_info *board; int ret = EXIT_FAILURE; buf = malloc(inspect_info.file_size); @@ -1043,19 +672,8 @@ static int inspect_fw(void) inspect_fw_pstr("Vendor name", hdr->vendor_name); inspect_fw_pstr("Firmware version", hdr->fw_version); - board = find_board_by_hwid(ntohl(hdr->hw_id)); - if (board) { - layout = find_layout(board->layout_id); - inspect_fw_phexpost("Hardware ID", - ntohl(hdr->hw_id), board->id); - inspect_fw_phexexp("Hardware Revision", - ntohl(hdr->hw_rev), board->hw_rev); - } else { - inspect_fw_phexpost("Hardware ID", - ntohl(hdr->hw_id), "unknown"); - inspect_fw_phex("Hardware Revision", - ntohl(hdr->hw_rev)); - } + inspect_fw_phex("Hardware ID", ntohl(hdr->hw_id)); + inspect_fw_phex("Hardware Revision", ntohl(hdr->hw_rev)); printf("\n"); @@ -1063,24 +681,12 @@ static int inspect_fw(void) ntohl(hdr->kernel_ofs)); inspect_fw_phexdec("Kernel data length", ntohl(hdr->kernel_len)); - if (board) { - inspect_fw_phexdef("Kernel load address", - ntohl(hdr->kernel_la), - layout ? layout->kernel_la : 0xffffffff); - inspect_fw_phexdef("Kernel entry point", - ntohl(hdr->kernel_ep), - layout ? layout->kernel_ep : 0xffffffff); - inspect_fw_phexdecdef("Rootfs data offset", - ntohl(hdr->rootfs_ofs), - layout ? layout->rootfs_ofs : 0xffffffff); - } else { - inspect_fw_phex("Kernel load address", - ntohl(hdr->kernel_la)); - inspect_fw_phex("Kernel entry point", - ntohl(hdr->kernel_ep)); - inspect_fw_phexdec("Rootfs data offset", - ntohl(hdr->rootfs_ofs)); - } + inspect_fw_phex("Kernel load address", + ntohl(hdr->kernel_la)); + inspect_fw_phex("Kernel entry point", + ntohl(hdr->kernel_ep)); + inspect_fw_phexdec("Rootfs data offset", + ntohl(hdr->rootfs_ofs)); inspect_fw_phexdec("Rootfs data length", ntohl(hdr->rootfs_len)); inspect_fw_phexdec("Boot loader data offset", @@ -1136,16 +742,13 @@ static int inspect_fw(void) int main(int argc, char *argv[]) { int ret = EXIT_FAILURE; - int err; - - FILE *outfile; progname = basename(argv[0]); while ( 1 ) { int c; - c = getopt(argc, argv, "a:B:H:E:F:L:m:V:N:W:ci:k:r:R:o:xX:hsSjv:"); + c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:ci:k:r:R:o:xX:hsSjv:"); if (c == -1) break; @@ -1153,9 +756,6 @@ int main(int argc, char *argv[]) case 'a': sscanf(optarg, "0x%x", &rootfs_align); break; - case 'B': - board_id = optarg; - break; case 'H': opt_hw_id = optarg; break; -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 11:50:38 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 17:50:38 +0200 Subject: [OpenWrt-Devel] [PATCH v2 2/4] tools: firmware-utils: add region code support to mktplinkfw In-Reply-To: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461253840.git.mschiffer@universe-factory.net> References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461253840.git.mschiffer@universe-factory.net> Message-ID: Signed-off-by: Matthias Schiffer --- tools/firmware-utils/src/mktplinkfw.c | 51 +++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c index 695d4f5..7127932 100644 --- a/tools/firmware-utils/src/mktplinkfw.c +++ b/tools/firmware-utils/src/mktplinkfw.c @@ -28,6 +28,7 @@ #include "md5.h" #define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1) & ~(__a - 1)); }) +#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) #define HEADER_VERSION_V1 0x01000000 #define HEADER_VERSION_V2 0x02000000 @@ -45,7 +46,7 @@ struct fw_header { char fw_version[36]; uint32_t hw_id; /* hardware id */ uint32_t hw_rev; /* hardware revision */ - uint32_t unk1; + uint32_t region; /* region code */ uint8_t md5sum1[MD5SUM_LEN]; uint32_t unk2; uint8_t md5sum2[MD5SUM_LEN]; @@ -90,6 +91,8 @@ static uint32_t hw_id; static char *opt_hw_rev; static uint32_t hw_rev; static uint32_t opt_hdr_ver = 1; +static char *country; +static uint32_t region; static int fw_ver_lo; static int fw_ver_mid; static int fw_ver_hi; @@ -170,6 +173,11 @@ static struct flash_layout layouts[] = { } }; +static const char *const regions[] = { + "UN", /* universal */ + "US", +}; + /* * Message macros */ @@ -206,6 +214,24 @@ static struct flash_layout *find_layout(const char *id) return ret; } +static uint32_t find_region(const char *country) { + uint32_t i; + + for (i = 0; i < ARRAY_SIZE(regions); i++) { + if (strcasecmp(regions[i], country) == 0) + return i; + } + + return -1; +} + +static const char * get_region_country(uint32_t region) { + if (region < ARRAY_SIZE(regions)) + return regions[region]; + else + return "unknown"; +} + static void usage(int status) { fprintf(stderr, "Usage: %s [OPTIONS...]\n", progname); @@ -217,6 +243,7 @@ static void usage(int status) " -L overwrite kernel load address with (hexval prefixed with 0x)\n" " -H use hardware id specified with \n" " -W use hardware revision specified with \n" +" -C set region code to \n" " -F use flash layout specified with \n" " -k read kernel image from the file \n" " -r read rootfs image from the file \n" @@ -324,6 +351,18 @@ static int check_options(void) else hw_rev = 1; + if (country) { + region = find_region(country); + if (region == (uint32_t)-1) { + char *end; + region = strtoul(country, &end, 0); + if (*end) { + ERR("unknown region code \"%s\"", country); + return -1; + } + } + } + layout = find_layout(layout_id); if (layout == NULL) { ERR("unknown flash layout \"%s\"", layout_id); @@ -437,6 +476,7 @@ static void fill_header(char *buf, int len) strncpy(hdr->fw_version, version, sizeof(hdr->fw_version)); hdr->hw_id = htonl(hw_id); hdr->hw_rev = htonl(hw_rev); + hdr->region = htonl(region); if (boot_info.file_size == 0) memcpy(hdr->md5sum1, md5salt_normal, sizeof(hdr->md5sum1)); @@ -645,9 +685,6 @@ static int inspect_fw(void) inspect_fw_phexdec("Version 1 Header size", sizeof(struct fw_header)); - if (ntohl(hdr->unk1) != 0) - inspect_fw_phexdec("Unknown value 1", hdr->unk1); - memcpy(md5sum, hdr->md5sum1, sizeof(md5sum)); if (ntohl(hdr->boot_len) == 0) memcpy(hdr->md5sum1, md5salt_normal, sizeof(md5sum)); @@ -674,6 +711,7 @@ static int inspect_fw(void) inspect_fw_pstr("Firmware version", hdr->fw_version); inspect_fw_phex("Hardware ID", ntohl(hdr->hw_id)); inspect_fw_phex("Hardware Revision", ntohl(hdr->hw_rev)); + inspect_fw_phexpost("Region code", ntohl(hdr->region), get_region_country(ntohl(hdr->region))); printf("\n"); @@ -748,7 +786,7 @@ int main(int argc, char *argv[]) while ( 1 ) { int c; - c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:ci:k:r:R:o:xX:hsSjv:"); + c = getopt(argc, argv, "a:H:E:F:L:m:V:N:W:C:ci:k:r:R:o:xX:hsSjv:"); if (c == -1) break; @@ -768,6 +806,9 @@ int main(int argc, char *argv[]) case 'W': opt_hw_rev = optarg; break; + case 'C': + country = optarg; + break; case 'L': sscanf(optarg, "0x%x", &kernel_la); break; -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 11:50:39 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 17:50:39 +0200 Subject: [OpenWrt-Devel] [PATCH v2 3/4] ar71xx: fix giving extra arguments to Build/mktplinkfw In-Reply-To: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461253840.git.mschiffer@universe-factory.net> References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461253840.git.mschiffer@universe-factory.net> Message-ID: <2e308b3faf557ddd92aae9ae3e42bd71f7827abe.1461253840.git.mschiffer@universe-factory.net> The build command will always get the whole argument string in $(1), regardless of whitespace. We need to use word/wordlist to split the string after the first word. Whitespace and quotation will be given to the command verbatim (make will ignore it), so to give multiple arguments, no quotation marks may be used. Fixes: r47174 ("ar71xx/image: add options argument to mktplinkfw step") Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/image/Makefile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e4e2fcf..2699b64 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -49,14 +49,15 @@ endef # -X reserve bytes in the firmware image (hexval prefixed with 0x) define Build/mktplinkfw -$(STAGING_DIR_HOST)/bin/mktplinkfw \ - -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $2 \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \ -m $(TPLINK_HEADER_VERSION) \ -k $(word 1,$^) \ -r $@ \ -o $@.new \ -j -X 0x40000 \ -a $(call rootfs_align,$(FILESYSTEM)) \ - $(if $(findstring sysupgrade,$1),-s) && mv $@.new $@ || rm -f $@ + $(wordlist 2,$(words $(1)),$(1)) \ + $(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@ endef # mktplinkfw-initramfs @@ -64,7 +65,7 @@ endef # -c combined image define Build/mktplinkfw-initramfs $(STAGING_DIR_HOST)/bin/mktplinkfw \ - -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $2 \ + -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $(1) \ -m $(TPLINK_HEADER_VERSION) \ -k $@ \ -o $@.new \ @@ -75,14 +76,14 @@ endef define Build/tplink-safeloader -$(STAGING_DIR_HOST)/bin/tplink-safeloader \ - -B $(TPLINK_BOARD_NAME) \ - -V $(REVISION) \ - -k $(word 1,$^) \ - -r $@ \ - -o $@.new \ - $2 \ - -j \ - $(if $(findstring sysupgrade,$1),-S) && mv $@.new $@ || rm -f $@ + -B $(TPLINK_BOARD_NAME) \ + -V $(REVISION) \ + -k $(word 1,$^) \ + -r $@ \ + -o $@.new \ + -j \ + $(wordlist 2,$(words $(1)),$(1)) \ + $(if $(findstring sysupgrade,$(word 1,$(1))),-S) && mv $@.new $@ || rm -f $@ endef define Build/loader-common @@ -967,8 +968,8 @@ define Device/tl-wr2543-v1 BOARDNAME := TL-WR2543N DEVICE_PROFILE := TLWR2543 TPLINK_HWID := 0x25430001 - IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade "-v 3.13.99" - IMAGE/factory.bin := append-rootfs | mktplinkfw factory "-v 3.13.99" + IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99 + IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99 endef TARGET_DEVICES += tl-wr2543-v1 -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Thu Apr 21 11:50:40 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Thu, 21 Apr 2016 17:50:40 +0200 Subject: [OpenWrt-Devel] [PATCH v2 4/4] ar71xx: build TP-LINK Archer C7 images with US region code In-Reply-To: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461253840.git.mschiffer@universe-factory.net> References: <5a67fa4de36dffa7dc257e56297b2e0b40704484.1461253840.git.mschiffer@universe-factory.net> Message-ID: <1a00839801b3a871854279a17b0402ba4213f59e.1461253840.git.mschiffer@universe-factory.net> Since December 2015, the Archer C7 comes with an US-specific firmware. This firmware will only allow upgrades with images that contain the US region code in the firmware header. The "universal" firmware distributed in the rest of the world doesn't care about the region code, so we can just unconditionally set the region to US for now. When other region-specific firmwares appear, we'll need to create a factory image for each of them. Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/image/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 2699b64..2b2e868 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -414,6 +414,7 @@ define Device/archer-c7-v2 BOARDNAME := ARCHER-C7 DEVICE_PROFILE := ARCHERC7 TPLINK_HWID := 0xc7000002 + IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US endef define Device/tl-wdr7500-v3 -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From marc at wimoto.com Thu Apr 21 12:27:22 2016 From: marc at wimoto.com (Marc Nicholas) Date: Thu, 21 Apr 2016 12:27:22 -0400 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface In-Reply-To: References: <570FB001.8030507@phrozen.org> Message-ID: I just tried. I get the same results as Baptiste ? i.e. don?t get a radio0 device. I removed the ?disabled enabled? line from /etc/config/wireless. I believe I built this image with the ?default? MT7688 profile and I checked the mt76 wireless driver was built-in. Thoughts? -m --? Marc Nicholas CTO, Wimoto Technologies Inc. Unit 2, 300 Don Park Road, Markham, Ontario L3R 3A1 CANADA +1.416.414.6272 On April 21, 2016 at 11:45:58 AM, Baptiste Clenet (bapclenet at gmail.com) wrote: Will finish to try next week Le?14 avr. 2016 20:20, "Baptiste Clenet" a ?crit?: 2016-04-14 16:58 GMT+02:00 John Crispin : > > > On 14/04/2016 16:38, Baptiste Clenet wrote: >> Marc, yes it has been added by John Crispins. >> >> I had nothing in etc/config/wireless, which is the right definition >> for this driver? (I don't find any documentation). Tom, Adam, yes it >> is defined. >> >> 2016-04-12 13:30 GMT+02:00 Adam Kent : >>> Hi Baptiste >>> >>> Which board exactly? You may need to add the "wmac" definition to the >>> relevant dts file. Have a look in >>> target/linux/ramips/dts/.dts and make sure there's >>> this: >>> >>> wmac at 10300000 { >>>? ? ?status = "okay"; >>> }; >>> >>> - Adam >>> >>> On Tue, Apr 12, 2016 at 6:27 PM, Baptiste Clenet wrote: >>>> Hi, >>>> >>>> I flashed the current tree on mt7688 board and no interface showed up >>>> for wifi. Should I do something? I would like to try the mt76 wifi >>>> driver on this board. (I added it with in menuconfig) >>>> >>>> Cheers, >>>> >>>> -- >>>> Baptiste >>>> _______________________________________________ >>>> openwrt-devel mailing list >>>> openwrt-devel at lists.openwrt.org >>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> >> >> > > > are you loading the mt76 driver ? modprobe mt76? It is already loaded: cfg80211? ? ? ? ? ? ? 215619? 3 mt7603e mac80211? ? ? ? ? ? ? 389306? 3 mt7603e mt76? ? ? ? ? ? ? ? ? ?15734? 2 mt7603e mt7603e? ? ? ? ? ? ? ? 27964? 0 mt76x2e? ? ? ? ? ? ? ? 34300? 0 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Baptiste -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From marc at wimoto.com Thu Apr 21 12:27:52 2016 From: marc at wimoto.com (Marc Nicholas) Date: Thu, 21 Apr 2016 12:27:52 -0400 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface In-Reply-To: References: <570FB001.8030507@phrozen.org> Message-ID: To add to that, an ifconfig radio0 yields ?no such device?. -m --? Marc Nicholas CTO, Wimoto Technologies Inc. Unit 2, 300 Don Park Road, Markham, Ontario L3R 3A1 CANADA +1.416.414.6272 On April 21, 2016 at 12:27:23 PM, Marc Nicholas (marc at wimoto.com) wrote: I just tried. I get the same results as Baptiste ? i.e. don?t get a radio0 device. I removed the ?disabled enabled? line from /etc/config/wireless. I believe I built this image with the ?default? MT7688 profile and I checked the mt76 wireless driver was built-in. Thoughts? -m --? Marc Nicholas CTO, Wimoto Technologies Inc. Unit 2, 300 Don Park Road, Markham, Ontario L3R 3A1 CANADA +1.416.414.6272 On April 21, 2016 at 11:45:58 AM, Baptiste Clenet (bapclenet at gmail.com) wrote: Will finish to try next week Le?14 avr. 2016 20:20, "Baptiste Clenet" a ?crit?: 2016-04-14 16:58 GMT+02:00 John Crispin : > > > On 14/04/2016 16:38, Baptiste Clenet wrote: >> Marc, yes it has been added by John Crispins. >> >> I had nothing in etc/config/wireless, which is the right definition >> for this driver? (I don't find any documentation). Tom, Adam, yes it >> is defined. >> >> 2016-04-12 13:30 GMT+02:00 Adam Kent : >>> Hi Baptiste >>> >>> Which board exactly? You may need to add the "wmac" definition to the >>> relevant dts file. Have a look in >>> target/linux/ramips/dts/.dts and make sure there's >>> this: >>> >>> wmac at 10300000 { >>>? ? ?status = "okay"; >>> }; >>> >>> - Adam >>> >>> On Tue, Apr 12, 2016 at 6:27 PM, Baptiste Clenet wrote: >>>> Hi, >>>> >>>> I flashed the current tree on mt7688 board and no interface showed up >>>> for wifi. Should I do something? I would like to try the mt76 wifi >>>> driver on this board. (I added it with in menuconfig) >>>> >>>> Cheers, >>>> >>>> -- >>>> Baptiste >>>> _______________________________________________ >>>> openwrt-devel mailing list >>>> openwrt-devel at lists.openwrt.org >>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> >> >> > > > are you loading the mt76 driver ? modprobe mt76? It is already loaded: cfg80211? ? ? ? ? ? ? 215619? 3 mt7603e mac80211? ? ? ? ? ? ? 389306? 3 mt7603e mt76? ? ? ? ? ? ? ? ? ?15734? 2 mt7603e mt7603e? ? ? ? ? ? ? ? 27964? 0 mt76x2e? ? ? ? ? ? ? ? 34300? 0 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Baptiste -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrtmail at noblepepper.com Thu Apr 21 14:58:41 2016 From: openwrtmail at noblepepper.com (Noble Pepper) Date: Thu, 21 Apr 2016 13:58:41 -0500 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface In-Reply-To: References: <570FB001.8030507@phrozen.org> Message-ID: <1461265121.8314.4.camel@noblepepper.com> Is the firmware getting loaded (/lib/firmware/mt7628_e2.bin)? It looks like the fix in 48958 for this is in github.com/openwrt-mirror/ but not in github.com/openwrt/. On Thu, 2016-04-21 at 12:27 -0400, Marc Nicholas wrote: > To add to that, an ifconfig radio0 yields ?no such device?. > > > -m > > -- > Marc Nicholas > CTO, Wimoto Technologies Inc. > Unit 2, 300 Don Park Road, Markham, Ontario L3R 3A1 CANADA > +1.416.414.6272 > > On April 21, 2016 at 12:27:23 PM, Marc Nicholas (marc at wimoto.com) > wrote: > > > > > I just tried. I get the same results as Baptiste ? i.e. don?t get a > > radio0 device. > > > > > > I removed the ?disabled enabled? line from /etc/config/wireless. > > > > > > I believe I built this image with the ?default? MT7688 profile and I > > checked the mt76 wireless driver was built-in. > > > > > > Thoughts? > > > > > > -m > > > > -- > > Marc Nicholas > > CTO, Wimoto Technologies Inc. > > Unit 2, 300 Don Park Road, Markham, Ontario L3R 3A1 CANADA > > +1.416.414.6272 > > > > On April 21, 2016 at 11:45:58 AM, Baptiste Clenet > > (bapclenet at gmail.com) wrote: > > > > > Will finish to try next week > > > > > > Le 14 avr. 2016 20:20, "Baptiste Clenet" a > > > ?crit : > > > 2016-04-14 16:58 GMT+02:00 John Crispin > > > : > > > > > > > > > > > > On 14/04/2016 16:38, Baptiste Clenet wrote: > > > >> Marc, yes it has been added by John Crispins. > > > >> > > > >> I had nothing in etc/config/wireless, which is the > > > right definition > > > >> for this driver? (I don't find any documentation). Tom, > > > Adam, yes it > > > >> is defined. > > > >> > > > >> 2016-04-12 13:30 GMT+02:00 Adam Kent > > > : > > > >>> Hi Baptiste > > > >>> > > > >>> Which board exactly? You may need to add the "wmac" > > > definition to the > > > >>> relevant dts file. Have a look in > > > >>> target/linux/ramips/dts/.dts and make > > > sure there's > > > >>> this: > > > >>> > > > >>> wmac at 10300000 { > > > >>> status = "okay"; > > > >>> }; > > > >>> > > > >>> - Adam > > > >>> > > > >>> On Tue, Apr 12, 2016 at 6:27 PM, Baptiste Clenet > > > wrote: > > > >>>> Hi, > > > >>>> > > > >>>> I flashed the current tree on mt7688 board and no > > > interface showed up > > > >>>> for wifi. Should I do something? I would like to try > > > the mt76 wifi > > > >>>> driver on this board. (I added it with in menuconfig) > > > >>>> > > > >>>> Cheers, > > > >>>> > > > >>>> -- > > > >>>> Baptiste > > > >>>> _______________________________________________ > > > >>>> openwrt-devel mailing list > > > >>>> openwrt-devel at lists.openwrt.org > > > >>>> > > > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > > >> > > > >> > > > >> > > > > > > > > > > > > are you loading the mt76 driver ? > > > modprobe mt76? > > > It is already loaded: > > > cfg80211 215619 3 mt7603e > > > mac80211 389306 3 mt7603e > > > mt76 15734 2 mt7603e > > > mt7603e 27964 0 > > > mt76x2e 34300 0 > > > > _______________________________________________ > > > > openwrt-devel mailing list > > > > openwrt-devel at lists.openwrt.org > > > > > > > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > > > > > > > > > > > -- > > > Baptiste > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From marc at wimoto.com Thu Apr 21 15:00:28 2016 From: marc at wimoto.com (Marc Nicholas) Date: Thu, 21 Apr 2016 15:00:28 -0400 Subject: [OpenWrt-Devel] mt76 wifi module on mt7688 board, no interface In-Reply-To: <1461265121.8314.4.camel@noblepepper.com> References: <570FB001.8030507@phrozen.org> <1461265121.8314.4.camel@noblepepper.com> Message-ID: Is the firmware getting loaded (/lib/firmware/mt7628_e2.bin)? It looks? like the fix in 48958 for this is in github.com/openwrt-mirror/ but not? in github.com/openwrt/.? Yes, the firmware is getting loaded based on the boot logs. I?ve gotten a bit further and have AP mode running. But can?t for the life of me get STA to work?.can?t even scan for APs. :-/ Thanks! -m --? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Thu Apr 21 15:30:30 2016 From: john at phrozen.org (John Crispin) Date: Thu, 21 Apr 2016 21:30:30 +0200 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex MZK-EX300NP In-Reply-To: <1460645983-26517-1-git-send-email-tochiro.srchack@gmail.com> References: <1460645983-26517-1-git-send-email-tochiro.srchack@gmail.com> Message-ID: <44c841f7-6393-25a1-4730-ab263f1b34c0@phrozen.org> Hi, fails to apply for some reason, please rebase and resend. there is one small nitpick inline. On 14/04/2016 16:59, YuheiOKAWA wrote: > MZK-EX300NP is MT7620A based wifi repeater. > Built-in power supply. > 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. > > Signed-off-by: YuheiOKAWA > --- > target/linux/ramips/base-files/etc/board.d/01_leds | 1 + > .../linux/ramips/base-files/etc/board.d/02_network | 1 + > target/linux/ramips/base-files/etc/diag.sh | 1 + > target/linux/ramips/base-files/lib/ramips.sh | 3 + > .../ramips/base-files/lib/upgrade/platform.sh | 1 + > target/linux/ramips/dts/MZK-EX300NP.dts | 132 +++++++++++++++++++++ > target/linux/ramips/image/mt7620.mk | 2 + > target/linux/ramips/mt7620/profiles/planex.mk | 16 +++ > 8 files changed, 157 insertions(+) > create mode 100644 target/linux/ramips/dts/MZK-EX300NP.dts > create mode 100644 target/linux/ramips/mt7620/profiles/planex.mk > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds > index 5816e60..e8305d0 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -118,6 +118,7 @@ dir-615-h1) > ucidef_set_led_default "status" "Status LED (amber)" "$board:amber:status" "0" > set_wifi_led "rt2800pci-phy0::radio" > ;; > +mzk-ex300np|\ > dir-620-d1) > set_wifi_led "$board:green:wifi" > ;; > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network > index 4b65d36..db2e6d9 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -160,6 +160,7 @@ ramips_setup_interfaces() > "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9 at eth0" > ;; > d105|\ > + mzk-ex300np|\ this should be below hpm and not above it John > hpm|\ > na930|\ > wli-tx4-ag300n) > diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh > index daa7fb1..8692da9 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -151,6 +151,7 @@ get_status_led() { > whr-600d) > status_led="$board:orange:wifi" > ;; > + mzk-ex300np|\ > rt-n10-plus|\ > tew-691gr|\ > tew-692gr|\ > diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh > index 5f1df7b..b1cb2eb 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -292,6 +292,9 @@ ramips_board_detect() { > *"MZK-DP150N") > name="mzk-dp150n" > ;; > + *"MZK-EX300NP") > + name="mzk-ex300np" > + ;; > *"MZK-W300NH2"*) > name="mzk-w300nh2" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index c329dce..d8e6f66 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -87,6 +87,7 @@ platform_check_image() { > mr-102n|\ > mt7628|\ > mzk-dp150n|\ > + mzk-ex300np|\ > mzk-w300nh2|\ > mzk-wdpr|\ > nbg-419n|\ > diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts b/target/linux/ramips/dts/MZK-EX300NP.dts > new file mode 100644 > index 0000000..51e87ad > --- /dev/null > +++ b/target/linux/ramips/dts/MZK-EX300NP.dts > @@ -0,0 +1,132 @@ > +/dts-v1/; > + > +/include/ "mt7620a.dtsi" > + > +/ { > + compatible = "ralink,mt7620a-soc"; > + model = "Planex MZK-EX300NP"; > + > + palmbus at 10000000 { > + gpio1: gpio at 638 { > + status = "okay"; > + }; > + > + gpio3: gpio at 688 { > + status = "okay"; > + }; > + > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "jedec,spi-nor"; > + reg = <0 0>; > + linux,modalias = "m25p80", "w25q64"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + read-only; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x730000>; > + }; > + > + partition at 780000 { > + label = "Udata"; > + reg = <0x780000 0x80000>; > + }; > + }; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "i2c", "spi refclk", "rgmii1", "wled"; > + ralink,function = "gpio"; > + }; > + }; > + }; > + > + ethernet at 10100000 { > + pinctrl-names = "default"; > + pinctrl-0 = <&ephy_pins>; > + mtd-mac-address = <&factory 0x4>; > + mediatek,portmap = "llllw"; > + }; > + > + wmac at 10180000 { > + ralink,mtd-eeprom = <&factory 0>; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + wifi { > + label = "mzk-ex300np:green:wifi"; > + gpios = <&gpio3 0 0>; > + }; > + > + wps { > + label = "mzk-ex300np:green:wps"; > + gpios = <&gpio1 5 0>; > + }; > + > + rep { > + label = "mzk-ex300np:blue:rep"; > + gpios = <&gpio1 4 1>; > + }; > + > + wifi1 { > + label = "mzk-ex300np:blue:wifi1"; > + gpios = <&gpio1 1 1>; > + }; > + > + wifi2 { > + label = "mzk-ex300np:blue:wifi2"; > + gpios = <&gpio1 2 1>; > + }; > + > + wifi3 { > + label = "mzk-ex300np:blue:wifi3"; > + gpios = <&gpio1 0 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + > + reset { > + label = "reset"; > + gpios = <&gpio0 1 1>; > + linux,code = <0x198>; > + }; > + > + wps { > + label = "wps"; > + gpios = <&gpio1 3 0>; > + linux,code = <0x211>; > + }; > + }; > +}; > diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk > index 18cd20a..3c9d6ce 100644 > --- a/target/linux/ramips/image/mt7620.mk > +++ b/target/linux/ramips/image/mt7620.mk > @@ -87,6 +87,7 @@ na930_mtd_size=20971520 > Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) > Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) > Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) > +Image/Build/Profile/MZK-EX300NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) > Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) > Image/Build/Profile/HC5761=$(call BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) > Image/Build/Profile/HC5861=$(call BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) > @@ -131,6 +132,7 @@ define Image/Build/Profile/Default > $(call Image/Build/Profile/WHR1166D,$(1)) > $(call Image/Build/Profile/DB-WRT01,$(1)) > $(call Image/Build/Profile/MZK-750DHP,$(1)) > + $(call Image/Build/Profile/MZK-EX300NP,$(1)) > $(call Image/Build/Profile/NA930,$(1)) > $(call Image/Build/Profile/HC5661,$(1)) > $(call Image/Build/Profile/HC5761,$(1)) > diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk > new file mode 100644 > index 0000000..79bfbdb > --- /dev/null > +++ b/target/linux/ramips/mt7620/profiles/planex.mk > @@ -0,0 +1,16 @@ > +# > +# Copyright (C) 2015 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/MZK-EX300NP > + NAME:=Planex MZK-EX300NP > + PACKAGES:= > +endef > + > +define Profile/MZK-EX300NP/Description > + Package set optimized for the Planex MZK-EX300NP. > +endef > +$(eval $(call Profile,MZK-EX300NP)) > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From wsuprabhu at gmail.com Thu Apr 21 15:32:16 2016 From: wsuprabhu at gmail.com (Prabhu Janakaraj) Date: Thu, 21 Apr 2016 14:32:16 -0500 Subject: [OpenWrt-Devel] IEEE 802.11s Message-ID: <2F3476B8-BC45-4CD2-8689-CF49B3CC475F@gmail.com> Hi all, I am a newbie to embedded devices. I have used openwrt for building mesh network. I am able to build firmware from the source code and get it working. But I want to modifying certain things in Mesh Routing algorithm HWMP, kind of implementing a new routing algorithm. In generic linux kernel source code, I am able to figure the location of the files for IEEE 802.11. But when I look into the source code of OpenWRT, I am unable to find the same. Is there any place where I should look for the IEEE 802.11 and IEEE 802.11 Mesh ? I am kind of what to implement my own routing algorithm for Mesh. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From wsuprabhu at gmail.com Thu Apr 21 15:33:02 2016 From: wsuprabhu at gmail.com (Prabhu Janakaraj) Date: Thu, 21 Apr 2016 14:33:02 -0500 Subject: [OpenWrt-Devel] IEEE 802.11s Message-ID: <6F8D37DC-CE88-4D26-8F2C-18A2B88066A7@gmail.com> Hi all, I am a newbie to embedded devices. I have used openwrt for building mesh network. I am able to build firmware from the source code and get it working. But I want to modifying certain things in Mesh Routing algorithm HWMP, kind of implementing a new routing algorithm. In generic linux kernel source code, I am able to figure the location of the files for IEEE 802.11. But when I look into the source code of OpenWRT, I am unable to find the same. Is there any place where I should look for the IEEE 802.11 and IEEE 802.11 Mesh ? I am kind of what to implement my own routing algorithm for Mesh. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Thu Apr 21 15:36:17 2016 From: john at phrozen.org (John Crispin) Date: Thu, 21 Apr 2016 21:36:17 +0200 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex CS-QR10 In-Reply-To: <1460463400-19192-1-git-send-email-tochiro.srchack@gmail.com> References: <1460463400-19192-1-git-send-email-tochiro.srchack@gmail.com> Message-ID: Hi, this one also fails to apply. please rebase/resend JOhn On 12/04/2016 14:16, YuheiOKAWA wrote: > CS-QR10 is MT7620A based IP Camera. > > the camera and sound does not work with kernel 4.4. > - camera chip is sn9c291. > - sound chip is wm8960. > > Signed-off-by: YuheiOKAWA > --- > target/linux/ramips/base-files/etc/board.d/01_leds | 3 +- > .../linux/ramips/base-files/etc/board.d/02_network | 1 + > target/linux/ramips/base-files/etc/diag.sh | 1 + > target/linux/ramips/base-files/lib/ramips.sh | 3 + > .../ramips/base-files/lib/upgrade/platform.sh | 1 + > target/linux/ramips/dts/CS-QR10.dts | 163 +++++++++++++++++++++ > target/linux/ramips/image/mt7620.mk | 2 + > target/linux/ramips/mt7620/profiles/planex.mk | 19 +++ > 8 files changed, 192 insertions(+), 1 deletion(-) > create mode 100644 target/linux/ramips/dts/CS-QR10.dts > create mode 100644 target/linux/ramips/mt7620/profiles/planex.mk > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds > index 5816e60..e319f36 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -30,7 +30,8 @@ br-6475nd|\ > mzk-w300nh2) > set_wifi_led "$board:amber:wlan" > ;; > -a5-v11) > +a5-v11|\ > +cs-qr10) > ucidef_set_led_default "power" "POWER" "$board:red:power" "1" > ;; > ai-br100) > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network > index 4b65d36..416b13c 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -159,6 +159,7 @@ ramips_setup_interfaces() > ucidef_add_switch "switch0" \ > "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9 at eth0" > ;; > + cs-qr10|\ > d105|\ > hpm|\ > na930|\ > diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh > index daa7fb1..233d15c 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -32,6 +32,7 @@ get_status_led() { > status_led="$board:green:power" > ;; > a5-v11|\ > + cs-qr10|\ > d105|\ > dcs-930l-b1|\ > ex2700|\ > diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh > index 5f1df7b..2df2591 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -88,6 +88,9 @@ ramips_board_detect() { > *"CF-WR800N") > name="cf-wr800n" > ;; > + *"CS-QR10") > + name="cs-qr10" > + ;; > *"CY-SWR1100") > name="cy-swr1100" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index c329dce..af7fb12 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -34,6 +34,7 @@ platform_check_image() { > broadway|\ > carambola|\ > cf-wr800n|\ > + cs-qr10|\ > d105|\ > dap-1350|\ > db-wrt01|\ > diff --git a/target/linux/ramips/dts/CS-QR10.dts b/target/linux/ramips/dts/CS-QR10.dts > new file mode 100644 > index 0000000..08299e3 > --- /dev/null > +++ b/target/linux/ramips/dts/CS-QR10.dts > @@ -0,0 +1,163 @@ > +/dts-v1/; > + > +/include/ "mt7620a.dtsi" > + > +/ { > + compatible = "ralink,mt7620a-soc"; > + model = "Planex CS-QR10"; > + > + palmbus at 10000000 { > + gpio0: gpio at 600 { > + status = "okay"; > + }; > + > + gpio1: gpio at 638 { > + status = "okay"; > + }; > + > + gpio2: gpio at 660 { > + status = "okay"; > + }; > + > + gpio3: gpio at 688 { > + status = "okay"; > + }; > + > + i2c at 900 { > + status = "okay"; > + }; > + > + i2s: i2s at a00 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pcm_i2s_pins>; > + }; > + > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "jedec,spi-nor"; > + reg = <0 0>; > + linux,modalias = "m25p80", "mx25l6405d"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + read-only; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x7b0000>; > + }; > + }; > + }; > + > + pcm at 2000 { > + status = "okay"; > + }; > + > + gdma at 2800 { > + status = "okay"; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "spi refclk", "rgmii1"; > + ralink,function = "gpio"; > + }; > + wdt { > + ralink,group = "wdt"; > + ralink,function = "wdt refclk"; > + }; > + }; > + }; > + > + ethernet at 10100000 { > + pinctrl-names = "default"; > + pinctrl-0 = <&ephy_pins>; > + mtd-mac-address = <&factory 0x4>; > + mediatek,portmap = "llllw"; > + }; > + > + gsw at 10110000 { > + ralink,port4 = "ephy"; > + }; > + > + sdhci at 10130000 { > + status = "okay"; > + }; > + > + ehci at 101c0000 { > + status = "okay"; > + }; > + > + ohci at 101c1000 { > + status = "okay"; > + }; > + > + wmac at 10180000 { > + ralink,mtd-eeprom = <&factory 0>; > + }; > + > + pcie at 10140000 { > + status = "okay"; > + }; > + > + sound { > + compatible = "mediatek,mt7620-audio-wm8960"; > + model = "mt7620-wm8960"; > + i2s-controller = <&i2s>; > + audio-routing = > + "Ext Spk", "SPK_LP", > + "Ext Spk", "SPK_LN", > + "Ext Spk", "SPK_RP", > + "Ext Spk", "SPK_RN"; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + power { > + label = "cs-qr10:red:power"; > + gpios = <&gpio1 4 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + > + s1 { > + label = "reset"; > + gpios = <&gpio1 1 1>; > + linux,code = <0x198>; > + }; > + > + s2 { > + label = "wps"; > + gpios = <&gpio1 3 1>; > + linux,code = <0x211>; > + }; > + }; > +}; > diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk > index 18cd20a..2055116 100644 > --- a/target/linux/ramips/image/mt7620.mk > +++ b/target/linux/ramips/image/mt7620.mk > @@ -82,6 +82,7 @@ whr_1166d_mtd_size=15400960 > Image/Build/Profile/WHR1166D=$(call BuildFirmware/CustomFlash/$(1),$(1),whr-1166d,WHR-1166D,$(whr_1166d_mtd_size)) > dlink810l_mtd_size=6881280 > Image/Build/Profile/CF-WR800N=$(call BuildFirmware/Default8M/$(1),$(1),cf-wr800n,CF-WR800N) > +Image/Build/Profile/CS-QR10=$(call BuildFirmware/Default8M/$(1),$(1),cs-qr10,CS-QR10) > Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l,DIR-810L,$(dlink810l_mtd_size)) > na930_mtd_size=20971520 > Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) > @@ -124,6 +125,7 @@ define Image/Build/Profile/Default > $(call Image/Build/Profile/MT7620a_V22SG,$(1)) > $(call Image/Build/Profile/AI-BR100,$(1)) > $(call Image/Build/Profile/CF-WR800N,$(1)) > + $(call Image/Build/Profile/CS-QR10,$(1)) > $(call Image/Build/Profile/RP-N53,$(1)) > $(call Image/Build/Profile/DIR-810L,$(1)) > $(call Image/Build/Profile/WHR300HP2,$(1)) > diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk > new file mode 100644 > index 0000000..9d99cac > --- /dev/null > +++ b/target/linux/ramips/mt7620/profiles/planex.mk > @@ -0,0 +1,19 @@ > +# > +# Copyright (C) 2015 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/CS-QR10 > + NAME:=Planex CS-QR10 > + PACKAGES:=\ > + kmod-usb-core kmod-usb2 kmod-usb-ohci \ > + kmod-i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk \ > + kmod-sdhci-mt7620 > +endef > + > +define Profile/CS-QR10/Description > + Package set optimized for the Planex CS-QR10. > +endef > +$(eval $(call Profile,CS-QR10)) > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Thu Apr 21 17:32:01 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Thu, 21 Apr 2016 23:32:01 +0200 Subject: [OpenWrt-Devel] [PATCH] oxnas: add missing semicolon Message-ID: <20160421213156.GA3456@makrotopia.org> A missing semicolon in the gpio-keys-polled section of ox820-akitio.dts caused the build to break. Add it. Signed-off-by: Daniel Golle --- target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts index 5da4fa4..4dc969c 100644 --- a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts +++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-akitio.dts @@ -76,7 +76,7 @@ label = "power"; gpios = <&GPIOA 11 1>; linux,code = <116>; - } + }; reset { label = "reset"; gpios = <&GPIOB 6 1>; -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at vittgam.net Thu Apr 21 17:43:09 2016 From: openwrt at vittgam.net (Vittorio Gambaletta (VittGam)) Date: Thu, 21 Apr 2016 23:43:09 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] lantiq: Fix typo in LED diag script. Message-ID: Signed-off-by: Vittorio Gambaletta --- --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -25,7 +25,7 @@ ;; done) status_led_off - [ -n "$running" ] & { + [ -n "$running" ] && { status_led="$running" status_led_on } _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at vittgam.net Thu Apr 21 17:43:10 2016 From: openwrt at vittgam.net (Vittorio Gambaletta (VittGam)) Date: Thu, 21 Apr 2016 23:43:10 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed. In-Reply-To: References: Message-ID: After recent patches, the status LED on this router would stay switched off after boot is completed. A switched off status LED often indicates a boot failure (eg. kernel panic), so fix this and get back to the previous behaviour. Signed-off-by: Vittorio Gambaletta --- --- a/target/linux/lantiq/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/dts/TDW89X0.dtsi @@ -8,6 +8,7 @@ /* the power led can't be controlled, use the wps led instead */ boot = &wps; failsafe = &wps; + running = &wps; dsl = &dsl; internet = &internet; _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From michal.cieslakiewicz at wp.pl Thu Apr 21 17:47:50 2016 From: michal.cieslakiewicz at wp.pl (Michal) Date: Thu, 21 Apr 2016 23:47:50 +0200 Subject: [OpenWrt-Devel] [PATCH] mac80211: ath9k: add GPIO support for AR9280 chip Message-ID: <20160421234750.1945310c@kosmio> From: Michal Cieslakiewicz Date: Thu, 21 Apr 2016 23:03:28 +0200 Subject: [PATCH] mac80211: ath9k: add GPIO support for AR9280 chip Enable access to GPIO on Atheros wireless chip AR9280. Support for 9280 is added to existing 9285/9287 subsystem because these 3 chips differ only in number of GPIO pins. Signed-off-by: Michal Cieslakiewicz --- Tested successfully on Netgear WNDR3700v1h2 (aka v2). This device has two AR9280 units and both are recognized properly and reported in /sys/kernel/debug/gpio. In WNDR3700v2 only local WiFi LEDs are connected to wireless chips, other controls are wired to SoC GPIO. .../patches/550-ath9k_add_ar9280_gpio_chip.patch | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/kernel/mac80211/patches/550-ath9k_add_ar9280_gpio_chip.patch diff --git a/package/kernel/mac80211/patches/550-ath9k_add_ar9280_gpio_chip.patch b/package/kernel/mac80211/patches/550-ath9k_add_ar9280_gpio_chip.patch new file mode 100644 index 0000000..3fe7e43 --- /dev/null +++ b/package/kernel/mac80211/patches/550-ath9k_add_ar9280_gpio_chip.patch @@ -0,0 +1,27 @@ +From: Michal Cieslakiewicz +Date: Thu, 21 Apr 2016 23:00:54 +0200 +Subject: [PATCH] mac80211: ath9k: add GPIO support for AR9280 chip + +Enable access to GPIO on Atheros wireless chip AR9280. +Support for 9280 is added to existing 9285/9287 subsystem +because these 3 chips differ only in number of GPIO pins. + +Signed-off-by: Michal Cieslakiewicz +--- +--- a/drivers/net/wireless/ath/ath9k/gpio.c ++++ b/drivers/net/wireless/ath/ath9k/gpio.c +@@ -88,11 +88,13 @@ static void ath9k_register_gpio_chip(str + struct ath9k_gpio_chip *gc; + u16 ng; + +- /* for now only AR9285 and AR9287 are recognized */ ++ /* supported chips are AR9280, AR9285 and AR9287 */ + if (AR_SREV_9287(sc->sc_ah)) + ng = AR9287_NUM_GPIO; + else if (AR_SREV_9285(sc->sc_ah)) + ng = AR9285_NUM_GPIO; ++ else if (AR_SREV_9280(sc->sc_ah)) ++ ng = AR928X_NUM_GPIO; + else + return; + -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From luizluca at gmail.com Thu Apr 21 18:29:23 2016 From: luizluca at gmail.com (Luiz Angelo Daros de Luca) Date: Thu, 21 Apr 2016 22:29:23 +0000 Subject: [OpenWrt-Devel] IEEE 802.11s In-Reply-To: <6F8D37DC-CE88-4D26-8F2C-18A2B88066A7@gmail.com> References: <6F8D37DC-CE88-4D26-8F2C-18A2B88066A7@gmail.com> Message-ID: Prabhu, OpenWRT does not have source code of projects inside its own source. All needed sources, including the linux kernel, is downloaded during the build. You'll only find kernel patches and the kernel packages definition (which packs modules). If you want to see the result kernel source, build OpenWRT once and check builddir. Regards, Em qui, 21 de abr de 2016 16:34, Prabhu Janakaraj escreveu: > Hi all, > I am a newbie to embedded devices. I have used openwrt for building mesh > network. I am able to build firmware from the source code and get it > working. > > But I want to modifying certain things in Mesh Routing algorithm HWMP, > kind of implementing a new routing algorithm. > > In generic linux kernel source code, I am able to figure the location of > the files for IEEE 802.11. But when I look into the source code of OpenWRT, > I am unable to find the same. Is there any place where I should look for > the IEEE 802.11 and IEEE 802.11 Mesh ? > > I am kind of what to implement my own routing algorithm for Mesh. > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > -- Luiz Angelo Daros de Luca luizluca at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Fri Apr 22 00:26:19 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Fri, 22 Apr 2016 06:26:19 +0200 Subject: [OpenWrt-Devel] [PATCH/RFC] dnsmasq: run as dedicated UID/GID Message-ID: <20160422042613.GA4426@makrotopia.org> Running dnsmasq in a dedicated user/group allows matching its outgoing traffic more easily using iptables' owner match. Add UID/GID to the package metadata and append the user/group parameters to the init script. Signed-off-by: Daniel Golle --- package/network/services/dnsmasq/Makefile | 1 + package/network/services/dnsmasq/files/dnsmasq.init | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index a5c3740..9a0f165 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -34,6 +34,7 @@ define Package/dnsmasq/Default CATEGORY:=Base system TITLE:=DNS and DHCP server URL:=http://www.thekelleys.org.uk/dnsmasq/ + USERID:=dnsmasq=65453:dnsmasq=65453 endef define Package/dnsmasq diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 61ded6a..83fcbb0 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -218,6 +218,8 @@ dnsmasq() { mkdir -p /tmp/hosts /tmp/dnsmasq.d xappend "--addn-hosts=/tmp/hosts" xappend "--conf-dir=/tmp/dnsmasq.d" + xappend "--user=dnsmasq" + xappend "--group=dnsmasq" echo >> $CONFIGFILE @@ -589,7 +591,7 @@ start_service() { if [ ! -f "$TIMESTAMPFILE" ]; then touch "$TIMESTAMPFILE" - chown nobody.nogroup "$TIMESTAMPFILE" + chown dnsmasq.dnsmasq "$TIMESTAMPFILE" fi echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Fri Apr 22 02:34:33 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Fri, 22 Apr 2016 08:34:33 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] lantiq: Fix typo in LED diag script. In-Reply-To: References: Message-ID: <5719C5F9.6080104@kresin.me> Am 21.04.2016 um 23:43 schrieb Vittorio Gambaletta (VittGam): > Signed-off-by: Vittorio Gambaletta Acked-by: Mathias Kresin > --- > > --- a/target/linux/lantiq/base-files/etc/diag.sh > +++ b/target/linux/lantiq/base-files/etc/diag.sh > @@ -25,7 +25,7 @@ > ;; > done) > status_led_off > - [ -n "$running" ] & { > + [ -n "$running" ] && { > status_led="$running" > status_led_on > } > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Fri Apr 22 02:34:41 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Fri, 22 Apr 2016 08:34:41 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed. In-Reply-To: References: Message-ID: <5719C601.5020906@kresin.me> Am 21.04.2016 um 23:43 schrieb Vittorio Gambaletta (VittGam): > After recent patches, the status LED on this router would stay > switched off after boot is completed. A switched off status LED > often indicates a boot failure (eg. kernel panic), so fix this and > get back to the previous behaviour. NAK This change was intentional. Personally, I don't like the idea of using the WPS led as permanent (running) status led. I've never tried it, but I may be possible to use WPS with hostapd and show the status of the WPS action using the WPS led. I like to prevent such a double use of leds. The basic idea was to let the WPS led blink as long as the device boots and switch it off at the time the boot has finished. Which means an unsuccessful boot is indicated by a still blinking WPS led. Mathias > > Signed-off-by: Vittorio Gambaletta > --- > > --- a/target/linux/lantiq/dts/TDW89X0.dtsi > +++ b/target/linux/lantiq/dts/TDW89X0.dtsi > @@ -8,6 +8,7 @@ > /* the power led can't be controlled, use the wps led instead */ > boot = &wps; > failsafe = &wps; > + running = &wps; > > dsl = &dsl; > internet = &internet; > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Fri Apr 22 02:39:10 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Fri, 22 Apr 2016 08:39:10 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: fix brnImage build Message-ID: <1461307150-3806-1-git-send-email-openwrt@kresin.me> Use the kernel with the appended dtb as base, otherwise the kernel will panic with "no dtb found". Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index c3cb48a..e63c134 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -37,7 +37,7 @@ define PatchKernelLzma endef define MkBrnImage - mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) + mkbrncmdline -i $(KDIR)/vmlinux-$(5).tmp -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) $(call CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma) mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma $(KDIR)/root.$(6) endef -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at vittgam.net Fri Apr 22 03:13:20 2016 From: openwrt at vittgam.net (Vittorio G (VittGam)) Date: Fri, 22 Apr 2016 09:13:20 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed. In-Reply-To: <5719C601.5020906@kresin.me> References: <5719C601.5020906@kresin.me> Message-ID: <836fa2b97c0278e82b40b82424d24f42@vittgam.net> On 22/04/2016 08:34:41 CEST, Mathias Kresin wrote: > Am 21.04.2016 um 23:43 schrieb Vittorio Gambaletta (VittGam): >> After recent patches, the status LED on this router would stay >> switched off after boot is completed. A switched off status LED >> often indicates a boot failure (eg. kernel panic), so fix this and >> get back to the previous behaviour. > > NAK > > This change was intentional. Personally, I don't like the idea of using the WPS led as permanent (running) status led. I've never tried it, but I may be possible to use WPS with hostapd and show the status of the WPS action using the WPS led. I like to prevent such a double use of leds. Well, personally I think that the WPS LED on this router should be used as a "permanent" system status LED, since the power LED is hardwired to the power supply, and there is no other status LED to be used. Since the WPS LED is unused by default on OpenWrt, I think it's better to use it as full system status LED, to avoid "dying" visually on first boot when no DSL or Wi-Fi is configured. This is the same behaviour we have on the TP-LINK MR3020 for example: the System LED in OpenWrt (which stays on after boot) corresponds to the WPS LED as it was used in the original firmware. Also, if things haven't changed, you need to write custom scripts to use the WPS LED to indicate WPS status. And if you do customize your OpenWrt install with such scripts, and you want the LED to default to off instead of on when WPS is not being used, you can just add a section for the WPS LED in /etc/config/system with "option trigger 'none'" and "option default '0'" to have it switch off after boot is finished. > The basic idea was to let the WPS led blink as long as the device boots and switch it off at the time the boot has finished. Which means an unsuccessful boot is indicated by a still blinking WPS led. Nope. If there is a kernel panic, all the GPIO LEDs will stop blinking and get switched off. At least when it happened to me it was like this, but it was some years ago so I might not remember well (or maybe things have changed and the kernel does not stop hardware-assisted LED blinking on panic anymore, or it was just some other coincidence...). > Mathias > >> >> Signed-off-by: Vittorio Gambaletta >> --- >> >> --- a/target/linux/lantiq/dts/TDW89X0.dtsi >> +++ b/target/linux/lantiq/dts/TDW89X0.dtsi >> @@ -8,6 +8,7 @@ >> /* the power led can't be controlled, use the wps led instead */ >> boot = &wps; >> failsafe = &wps; >> + running = &wps; >> >> dsl = &dsl; >> internet = &internet; >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel at lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dhutchison at bluemesh.net Fri Apr 22 04:03:01 2016 From: dhutchison at bluemesh.net (David Hutchison) Date: Fri, 22 Apr 2016 02:03:01 -0600 Subject: [OpenWrt-Devel] How to initialize multiple phy radios Message-ID: Hello, I have been working on a board port and have everything working except for the 2nd radio. This board has a QCA9531 CPU and 2 WiFi Radios: AR9531 and a QCA9887 ( http://routerboard.com/RB952Ui-5ac2nD for more details ). The 2.4GHz radio works great, and I have acquired the correct calibration data: [ 23.440000] ath: EEPROM regdomain: 0x0 [ 23.440000] ath: EEPROM indicates default country code should be used [ 23.440000] ath: doing EEPROM country->regdmn map search [ 23.440000] ath: country maps to regdmn code: 0x3a [ 23.440000] ath: Country alpha2 being used: US [ 23.440000] ath: Regpair used: 0x3a [ 23.450000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht' [ 23.450000] Registered led device: ath9k-phy0 [ 23.460000] ieee80211 phy0: Atheros AR9531 Rev:0 mem=0xb8100000, irq=47 [ 23.630000] cfg80211: Regulatory domain changed to country: US [ 23.630000] cfg80211: DFS Master region: FCC [ 23.640000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [ 23.650000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A) [ 23.650000] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (N/A) [ 23.660000] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s) [ 23.670000] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2300 mBm), (0 s) [ 23.680000] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A) [ 23.690000] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A) That is being done with the following code snippet: void __init rbhap_wlan_init(u16 id) { char *caldata; u8 wlan_mac[ETH_ALEN]; caldata = rb_get_ext_wlan_data(id); if (caldata == NULL) { pr_err("caldata is NULL\n"); return; } ath79_init_mac(wlan_mac, ath79_mac_base, 2); ath79_register_wmac(caldata + 0x1000, wlan_mac); kfree(caldata); } This particular architecture i'm working on adds kernel support for the hAP as well as the hAP AC Lite. I'm passing "1" or "0" to rbhap_wlan_init() based on the board: flags = rbhap_get_flags(info); if (flags & RB95X_FLAG_80211AC) { rbhap_wlan_init(1); ath79_register_pci(); } else { rbhap_wlan_init(0); } I saw the "get_flags" example from mach-rb91x.c as the "board=" in the bootloader were the same for both the Mikrotik hAP and Mikrotik hAP AC Lite. Anyway, the Mikrotik hAP only has one radio and is 100% working. However the hAP AC Lite has an additional radio ( QCA988X )... I've compiled in ath10k, and added "ath79_register_pci()" but it doesn't find the radio. I've looked at ap91_pci_init() as well as ap94_pci_init() and haven't had any luck. What is the normal way for initializing a platform with multiple radio's? Of course I don't know the exact wiring with this board, but I believe the QCA988X 802.11ac radio is on a PCI bus of some sort. I'm not entirely sure, but every example I have seen it appears to be. Any insight as to what to try, to initialize this 2nd radio would be much appreciated! QCA9531 + AR9531 + QCA988x Thank you!! -- Davey _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From e196819 at hotmail.com Fri Apr 22 05:06:37 2016 From: e196819 at hotmail.com (Iblis Lin) Date: Fri, 22 Apr 2016 17:06:37 +0800 Subject: [OpenWrt-Devel] [PATCH] [scripts] avoid hard-coded path in sha-bang Message-ID: <1461315997-12107-1-git-send-email-e196819@hotmail.com> Signed-off-by: Iblis Lin --- scripts/brcmImage.pl | 2 +- scripts/deptest.sh | 2 +- scripts/feeds | 2 +- scripts/mkits.sh | 2 +- scripts/pad_image | 2 +- scripts/redboot-script.pl | 2 +- scripts/remote-gdb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/brcmImage.pl b/scripts/brcmImage.pl index 9a3acb4..60a59f2 100755 --- a/scripts/brcmImage.pl +++ b/scripts/brcmImage.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # Copyright (C) 2009 Henk Vergonet # diff --git a/scripts/deptest.sh b/scripts/deptest.sh index 047a0ce..03da9f5 100755 --- a/scripts/deptest.sh +++ b/scripts/deptest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Automated OpenWrt package dependency checker # diff --git a/scripts/feeds b/scripts/feeds index 79b5284..2b88eb8 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use Getopt::Std; use FindBin; use Cwd; diff --git a/scripts/mkits.sh b/scripts/mkits.sh index 6b5100e..8857996 100755 --- a/scripts/mkits.sh +++ b/scripts/mkits.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Licensed under the terms of the GNU GPL License version 2 or later. # diff --git a/scripts/pad_image b/scripts/pad_image index 14f1499..b1941a2 100755 --- a/scripts/pad_image +++ b/scripts/pad_image @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function usage { echo "Usage: prepare_image image_type kernel_image rootfs_image header_size" diff --git a/scripts/redboot-script.pl b/scripts/redboot-script.pl index 123ebe3..e2d1264 100755 --- a/scripts/redboot-script.pl +++ b/scripts/redboot-script.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # Script for generating redboot configs, based on brcmImage.pl # diff --git a/scripts/remote-gdb b/scripts/remote-gdb index cd59033..5230663 100755 --- a/scripts/remote-gdb +++ b/scripts/remote-gdb @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Fri Apr 22 05:44:44 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Fri, 22 Apr 2016 18:44:44 +0900 Subject: [OpenWrt-Devel] [PATCHv2] ramips: add support for Planex CS-QR10 In-Reply-To: References: Message-ID: <1461318284-20817-1-git-send-email-tochiro.srchack@gmail.com> CS-QR10 is MT7620A based IP Camera. the camera and sound does not work with kernel 4.4. - camera chip is sn9c291. - sound chip is wm8960. Signed-off-by: YuheiOKAWA --- target/linux/ramips/base-files/etc/board.d/01_leds | 3 +- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/CS-QR10.dts | 163 +++++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 2 + target/linux/ramips/mt7620/profiles/planex.mk | 14 ++ 8 files changed, 187 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/CS-QR10.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..367801d 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -30,7 +30,8 @@ br-6475nd|\ mzk-w300nh2) set_wifi_led "$board:amber:wlan" ;; -a5-v11) +a5-v11|\ +cs-qr10) ucidef_set_led_default "power" "POWER" "$board:red:power" "1" ;; ai-br100) diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..dc3d1bc 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -160,6 +160,7 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9 at eth0" ;; + cs-qr10|\ d105|\ hpm|\ na930|\ diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..2d43f54 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -33,6 +33,7 @@ get_status_led() { status_led="$board:green:power" ;; a5-v11|\ + cs-qr10|\ d105|\ dcs-930l-b1|\ ex2700|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..73dd599 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -88,6 +88,9 @@ ramips_board_detect() { *"CF-WR800N") name="cf-wr800n" ;; + *"CS-QR10") + name="cs-qr10" + ;; *"CY-SWR1100") name="cy-swr1100" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..f153b02 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -34,6 +34,7 @@ platform_check_image() { broadway|\ carambola|\ cf-wr800n|\ + cs-qr10|\ d105|\ dap-1350|\ db-wrt01|\ diff --git a/target/linux/ramips/dts/CS-QR10.dts b/target/linux/ramips/dts/CS-QR10.dts new file mode 100644 index 0000000..08299e3 --- /dev/null +++ b/target/linux/ramips/dts/CS-QR10.dts @@ -0,0 +1,163 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "Planex CS-QR10"; + + palmbus at 10000000 { + gpio0: gpio at 600 { + status = "okay"; + }; + + gpio1: gpio at 638 { + status = "okay"; + }; + + gpio2: gpio at 660 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + i2c at 900 { + status = "okay"; + }; + + i2s: i2s at a00 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pcm_i2s_pins>; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "mx25l6405d"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; + }; + + pcm at 2000 { + status = "okay"; + }; + + gdma at 2800 { + status = "okay"; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "spi refclk", "rgmii1"; + ralink,function = "gpio"; + }; + wdt { + ralink,group = "wdt"; + ralink,function = "wdt refclk"; + }; + }; + }; + + ethernet at 10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; + }; + + gsw at 10110000 { + ralink,port4 = "ephy"; + }; + + sdhci at 10130000 { + status = "okay"; + }; + + ehci at 101c0000 { + status = "okay"; + }; + + ohci at 101c1000 { + status = "okay"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + pcie at 10140000 { + status = "okay"; + }; + + sound { + compatible = "mediatek,mt7620-audio-wm8960"; + model = "mt7620-wm8960"; + i2s-controller = <&i2s>; + audio-routing = + "Ext Spk", "SPK_LP", + "Ext Spk", "SPK_LN", + "Ext Spk", "SPK_RP", + "Ext Spk", "SPK_RN"; + }; + + gpio-leds { + compatible = "gpio-leds"; + + power { + label = "cs-qr10:red:power"; + gpios = <&gpio1 4 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + s1 { + label = "reset"; + gpios = <&gpio1 1 1>; + linux,code = <0x198>; + }; + + s2 { + label = "wps"; + gpios = <&gpio1 3 1>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index c76e98e..d742151 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -95,6 +95,7 @@ whr_1166d_mtd_size=15400960 Image/Build/Profile/WHR1166D=$(call BuildFirmware/CustomFlash/$(1),$(1),whr-1166d,WHR-1166D,$(whr_1166d_mtd_size)) dlink810l_mtd_size=6881280 Image/Build/Profile/CF-WR800N=$(call BuildFirmware/Default8M/$(1),$(1),cf-wr800n,CF-WR800N) +Image/Build/Profile/CS-QR10=$(call BuildFirmware/Default8M/$(1),$(1),cs-qr10,CS-QR10) Image/Build/Profile/DIR-810L=$(call BuildFirmware/CustomFlash/$(1),$(1),dir-810l,DIR-810L,$(dlink810l_mtd_size)) na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) @@ -138,6 +139,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/MT7620a_V22SG,$(1)) $(call Image/Build/Profile/AI-BR100,$(1)) $(call Image/Build/Profile/CF-WR800N,$(1)) + $(call Image/Build/Profile/CS-QR10,$(1)) $(call Image/Build/Profile/RP-N53,$(1)) $(call Image/Build/Profile/DIR-810L,$(1)) $(call Image/Build/Profile/WHR300HP2,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk index f6f2cf1..15560ab 100644 --- a/target/linux/ramips/mt7620/profiles/planex.mk +++ b/target/linux/ramips/mt7620/profiles/planex.mk @@ -5,6 +5,20 @@ # See /LICENSE for more information. # +define Profile/CS-QR10 + NAME:=Planex CS-QR10 + PACKAGES:=\ + kmod-usb-core kmod-usb2 kmod-usb-ohci \ + i2c-core kmod-i2c-ralink kmod-sound-core kmod-sound-mtk \ + kmod-sdhci-mt7620 +endef + +define Profile/CS-QR10/Description + Package set optimized for the Planex CS-QR10. +endef +$(eval $(call Profile,CS-QR10)) + + define Profile/MZK-750DHP NAME:=Planex MZK-750DHP PACKAGES:= kmod-mt76 kmod-mt7610e -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Fri Apr 22 06:32:39 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Fri, 22 Apr 2016 12:32:39 +0200 Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: References: Message-ID: <2232003.crJ2yIpC41@debian64> Hello, On Friday, April 22, 2016 02:03:01 AM David Hutchison wrote: > I have been working on a board port and have everything working except > for the 2nd radio. This board has a QCA9531 CPU and 2 WiFi Radios: > AR9531 and a QCA9887 ( http://routerboard.com/RB952Ui-5ac2nD for more > details ). > [snip] > > Anyway, the Mikrotik hAP only has one radio and is 100% working. > However the hAP AC Lite has an additional radio ( QCA988X )... I've > compiled in ath10k, and added "ath79_register_pci()" but it doesn't > find the radio. I've looked at ap91_pci_init() as well as > ap94_pci_init() and haven't had any luck. Does ath79_register_pci actually register the pci bus (there should be some noise in the kernel log when it registers the pci bus)? Or does it return an error -ENODEV? This is what it looks like on a Archer C7: (Has a QCA9880) [ 0.129096] ar724x-pci ar724x-pci.0: PCIe link is down [ 0.133988] registering PCI controller with io_map_base unset [ 0.139678] registering PCI controller with io_map_base unset [ 0.586626] PCI host bridge to bus 0000:00 [ 0.590553] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff] [ 0.597148] pci_bus 0000:00: root bus resource [io 0x0000] [ 0.602534] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0] ... I looked at ath79_register_pci, it is located in /arch/mips/ath79/pci.c. On the first look, it doesn't look like your SoC is present there. However soc_is_qca953x is just testing soc_is_qca9533. Can you verify that this is indeed correct and the function actually calls ath79_register_pci_ar724x? > What is the normal way for initializing a platform with multiple > radio's? Of course I don't know the exact wiring with this board, but > I believe the QCA988X 802.11ac radio is on a PCI bus of some sort. I'm > not entirely sure, but every example I have seen it appears to be. Hm, I don't know much about your device. If it's a proper QCA988X mini-pcie radio and has the calibration data on a chip on its minipcie board, then you don't need to setup anything else. Having select kmod-ath10k (which AFAIK includes the firmware as well) is enough. But if the calibration data for ath10k is part of the routerboard's caldata partition, you need to extracted by the userspace. This is currently done by a script: target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata So you will need to add your device there with the right extraction code. Regards, Christian _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Fri Apr 22 07:13:17 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Fri, 22 Apr 2016 20:13:17 +0900 Subject: [OpenWrt-Devel] [PATCHv2] ramips: add support for Planex MZK-EX300NP In-Reply-To: <44c841f7-6393-25a1-4730-ab263f1b34c0@phrozen.org> References: <44c841f7-6393-25a1-4730-ab263f1b34c0@phrozen.org> Message-ID: <1461323597-17963-1-git-send-email-tochiro.srchack@gmail.com> MZK-EX300NP is MT7620A based wifi repeater. Built-in power supply. 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. Signed-off-by: YuheiOKAWA --- Changes in v2: - rebase - change an line in 02_network target/linux/ramips/base-files/etc/board.d/01_leds | 1 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MZK-EX300NP.dts | 132 +++++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 2 + target/linux/ramips/mt7620/profiles/planex.mk | 12 ++ 8 files changed, 153 insertions(+) create mode 100644 target/linux/ramips/dts/MZK-EX300NP.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..0cfde02 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -118,6 +118,7 @@ dir-615-h1) ucidef_set_led_default "status" "Status LED (amber)" "$board:amber:status" "0" set_wifi_led "rt2800pci-phy0::radio" ;; +mzk-ex300np|\ dir-620-d1) set_wifi_led "$board:green:wifi" ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..c89b2a2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -162,6 +162,7 @@ ramips_setup_interfaces() ;; d105|\ hpm|\ + mzk-ex300np|\ na930|\ wli-tx4-ag300n|\ wrh-300cr) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..0eda084 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -154,6 +154,7 @@ get_status_led() { whr-600d) status_led="$board:orange:wifi" ;; + mzk-ex300np|\ rt-n10-plus|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..e17aa94 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -292,6 +292,9 @@ ramips_board_detect() { *"MZK-DP150N") name="mzk-dp150n" ;; + *"MZK-EX300NP") + name="mzk-ex300np" + ;; *"MZK-W300NH2"*) name="mzk-w300nh2" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..c0ee14e 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -88,6 +88,7 @@ platform_check_image() { mt7628|\ mzk-750dhp|\ mzk-dp150n|\ + mzk-ex300np|\ mzk-w300nh2|\ mzk-wdpr|\ nbg-419n|\ diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts b/target/linux/ramips/dts/MZK-EX300NP.dts new file mode 100644 index 0000000..51e87ad --- /dev/null +++ b/target/linux/ramips/dts/MZK-EX300NP.dts @@ -0,0 +1,132 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "Planex MZK-EX300NP"; + + palmbus at 10000000 { + gpio1: gpio at 638 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x730000>; + }; + + partition at 780000 { + label = "Udata"; + reg = <0x780000 0x80000>; + }; + }; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi refclk", "rgmii1", "wled"; + ralink,function = "gpio"; + }; + }; + }; + + ethernet at 10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wifi { + label = "mzk-ex300np:green:wifi"; + gpios = <&gpio3 0 0>; + }; + + wps { + label = "mzk-ex300np:green:wps"; + gpios = <&gpio1 5 0>; + }; + + rep { + label = "mzk-ex300np:blue:rep"; + gpios = <&gpio1 4 1>; + }; + + wifi1 { + label = "mzk-ex300np:blue:wifi1"; + gpios = <&gpio1 1 1>; + }; + + wifi2 { + label = "mzk-ex300np:blue:wifi2"; + gpios = <&gpio1 2 1>; + }; + + wifi3 { + label = "mzk-ex300np:blue:wifi3"; + gpios = <&gpio1 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 1 1>; + linux,code = <0x198>; + }; + + wps { + label = "wps"; + gpios = <&gpio1 3 0>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index c76e98e..2ff32c4 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -100,6 +100,7 @@ na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) +Image/Build/Profile/MZK-EX300NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) Image/Build/Profile/HC5761=$(call BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) Image/Build/Profile/HC5861=$(call BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) @@ -145,6 +146,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/WHR1166D,$(1)) $(call Image/Build/Profile/DB-WRT01,$(1)) $(call Image/Build/Profile/MZK-750DHP,$(1)) + $(call Image/Build/Profile/MZK-EX300NP,$(1)) $(call Image/Build/Profile/NA930,$(1)) $(call Image/Build/Profile/HC5661,$(1)) $(call Image/Build/Profile/HC5761,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk index f6f2cf1..e5ea6ed 100644 --- a/target/linux/ramips/mt7620/profiles/planex.mk +++ b/target/linux/ramips/mt7620/profiles/planex.mk @@ -14,3 +14,15 @@ define Profile/MZK-750DHP/Description Package set optimized for the Planex MZK-750DHP. endef $(eval $(call Profile,MZK-750DHP)) + + +define Profile/MZK-EX300NP + NAME:=Planex MZK-EX300NP + PACKAGES:= +endef + +define Profile/MZK-EX300NP/Description + Package set optimized for the Planex MZK-EX300NP. +endef +$(eval $(call Profile,MZK-EX300NP)) + -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Michal.Hrusecky at nic.cz Fri Apr 22 07:38:11 2016 From: Michal.Hrusecky at nic.cz (Michal Hrusecky) Date: Fri, 22 Apr 2016 13:38:11 +0200 Subject: [OpenWrt-Devel] Checksums of all files Message-ID: <20160422113811.GS3368@workbook.ipv6.hrusecky.net> Hi, I run into idea I would like some feedback on before I'll send a real patch. When people have an old router witch flash that may have some errors or root on external drive, it can happen, that some files will get damaged. And in that case it could be really useful to have checksums of all files - normally package managers have that kind of information. Currently I did this: --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -187,6 +187,9 @@ $(_endef) $(CheckDependencies) $(RSTRIP) $$(IDIR_$(1)) + (cd $$(IDIR_$(1)); \ + find . -type f \! -path ./CONTROL/* -exec md5sum \{\} + | \ + sed 's|\([[:blank:]]\)\./|\1/|' > $$(IDIR_$(1))/CONTROL/files-md5sum ) (cd $$(IDIR_$(1))/CONTROL; \ ( \ echo "$$$$CONTROL"; \ Although hacky, works for me as I can now use > cat /usr/lib/opkg/info/*.files-md5sum | md5sum -c - To verify that my installed packages are ok. If I would send a patch, I would definitely make it optional. Best course of action would be to include it in current files list and teach opkg to use it, but that is too far ahead. What do you think about the idea itself for now? _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From laurent at guerby.net Fri Apr 22 11:37:50 2016 From: laurent at guerby.net (Laurent GUERBY) Date: Fri, 22 Apr 2016 17:37:50 +0200 Subject: [OpenWrt-Devel] rsync mirror of download.openwrt.org ? In-Reply-To: <1460411691.25322.161.camel@guerby.net> References: <1458393048.27437.162.camel@guerby.net> <56ED668A.5090404@openwrt.org> <1458928944.27437.306.camel@guerby.net> <1460411691.25322.161.camel@guerby.net> Message-ID: <1461339470.9664.45.camel@guerby.net> Hi, Having no news we completed our mirror by using wget for 15.05.1: http://openwrt.tetaneutral.net/ For mail contact openwrt-contact AT tetaneutral DOT net : http://openwrt.tetaneutral.net/README.txt 10G+ network, dual stack IPv4+IPv6, we can add a rsync server on request. Still hoping we get the push setup at some point :) Sincerely, Laurent Using a machine in Paris, France (800km from our DC in Toulouse): # time wget -O /dev/null http://openwrt.tetaneutral.net/chaos_calmer/15.05.1/ar71xx/generic/OpenWrt-ImageBuilder-15.05.1-ar71xx-generic.Linux-x86_64.tar.bz2 --2016-04-22 17:29:27-- http://openwrt.tetaneutral.net/chaos_calmer/15.05.1/ar71xx/generic/OpenWrt-ImageBuilder-15.05.1-ar71xx-generic.Linux-x86_64.tar.bz2 Resolving openwrt.tetaneutral.net... 89.234.156.230 Connecting to openwrt.tetaneutral.net|89.234.156.230|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 143921369 (137M) [application/octet-stream] (...) 143,921,369 87.5M/s in 1.6s 2016-04-22 17:29:28 (87.5 MB/s) (...) real 0m1.598s user 0m0.116s sys 0m0.376s On Mon, 2016-04-11 at 23:54 +0200, Laurent GUERBY wrote: > On Fri, 2016-03-25 at 19:02 +0100, Laurent GUERBY wrote: > > On Sat, 2016-03-19 at 15:47 +0100, John Crispin wrote: > > > > > > On 19/03/2016 14:10, Laurent GUERBY wrote: > > > > Hi, > > > > > > > > We've setup a mirror of openwrt on a 10G+ connection IPv4+v6, MPTCP > > > > support using initial rsync from ba.mirror.garr.it : > > > > > > > > http://openwrt.tetaneutral.net > > > > > > > > But garr.it does not have 15.05.1, is there a way to directly rsync from > > > > downloads.openwrt.org ? Or any other way ? (push would be okay if > > > > needed). > > > > > > > > Sincerely > > > > > > > > Laurent GUERBY > > > > AS197422 http://tetaneutral.net > > > > > > i can rsync 15.05.1 to your server if that is ok for you ... > > > > Ok for us :) > > > > Laurent > > > > PS: public key request sent last sunday by mail > > (may be lost somewhere ?) > > Ping ? > > Laurent > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hkallweit1 at gmail.com Fri Apr 22 18:49:07 2016 From: hkallweit1 at gmail.com (Heiner Kallweit) Date: Sat, 23 Apr 2016 00:49:07 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: modernize fast SPI flash read Message-ID: <571AAA63.8090007@gmail.com> OpenWRT has own support for the memory-mapped fast SPI flash read on ath79. With mainline kernel 4.6/4.7 more elegant generic support for this feature was added upstream consisting of these two commits: 556351f14e74 "spi: introduce accelerated read support for spi flash devices" 08922f644878 "mtd: devices: m25p80: add support for mmap read request" I cherry-picked them for use with ar71xx default kernel version 4.1 (new patches 460 + 461) Once the ar71xx kernel version reaches 4.6 / 4.7 these patches can be removed. New patch 462 includes changes from old patch 463 which are not related to the fast flash read feature. New patch 463 includes the new implementation for the fast flash read feature on ath79. These four new patches replace old patches 460-464. So far for testing I made the change for the 4.1 version only. If it looks good I can do the same for the 4.4 version. The change was successfully tested on a TP-Link TL-WDR3600. Signed-off-by: Heiner Kallweit --- .../460-spi-add-generic-flash-read.patch | 159 ++++++++++++++++++ .../460-spi-bitbang-export-spi_bitbang_bufs.patch | 28 ---- .../patches-4.1/461-m25p80-add-flash-read.patch | 33 ++++ .../461-spi-add-type-field-to-spi_transfer.patch | 23 --- .../462-mtd-m25p80-set-spi-transfer-type.patch | 15 -- .../patches-4.1/462-spi-extend-ath79_spi.patch | 32 ++++ .../patches-4.1/463-spi-add-ath79-flash-read.patch | 48 ++++++ .../463-spi-ath79-add-fast-flash-read.patch | 185 --------------------- .../464-spi-ath79-fix-fast-flash-read.patch | 35 ---- 9 files changed, 272 insertions(+), 286 deletions(-) create mode 100644 target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch delete mode 100644 target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch create mode 100644 target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch delete mode 100644 target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch delete mode 100644 target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch create mode 100644 target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch create mode 100644 target/linux/ar71xx/patches-4.1/463-spi-add-ath79-flash-read.patch delete mode 100644 target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch delete mode 100644 target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch diff --git a/target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch b/target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch new file mode 100644 index 0000000..afc977e --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch @@ -0,0 +1,159 @@ +diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c +index 47eff80..dcc6f6e 100644 +--- a/drivers/spi/spi.c ++++ b/drivers/spi/spi.c +@@ -1152,6 +1152,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) + } + } + ++ mutex_lock(&master->bus_lock_mutex); + trace_spi_message_start(master->cur_msg); + + if (master->prepare_message) { +@@ -1161,6 +1162,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) + "failed to prepare message: %d\n", ret); + master->cur_msg->status = ret; + spi_finalize_current_message(master); ++ mutex_unlock(&master->bus_lock_mutex); + return; + } + master->cur_msg_prepared = true; +@@ -1170,6 +1172,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) + if (ret) { + master->cur_msg->status = ret; + spi_finalize_current_message(master); ++ mutex_unlock(&master->bus_lock_mutex); + return; + } + +@@ -1177,8 +1180,10 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) + if (ret) { + dev_err(&master->dev, + "failed to transfer one message from queue\n"); ++ mutex_unlock(&master->bus_lock_mutex); + return; + } ++ mutex_unlock(&master->bus_lock_mutex); + } + + /** +@@ -2351,6 +2356,46 @@ int spi_async_locked(struct spi_device *spi, struct spi_message *message) + EXPORT_SYMBOL_GPL(spi_async_locked); + + ++int spi_flash_read(struct spi_device *spi, ++ struct spi_flash_read_message *msg) ++ ++{ ++ struct spi_master *master = spi->master; ++ int ret; ++ ++ if ((msg->opcode_nbits == SPI_NBITS_DUAL || ++ msg->addr_nbits == SPI_NBITS_DUAL) && ++ !(spi->mode & (SPI_TX_DUAL | SPI_TX_QUAD))) ++ return -EINVAL; ++ if ((msg->opcode_nbits == SPI_NBITS_QUAD || ++ msg->addr_nbits == SPI_NBITS_QUAD) && ++ !(spi->mode & SPI_TX_QUAD)) ++ return -EINVAL; ++ if (msg->data_nbits == SPI_NBITS_DUAL && ++ !(spi->mode & (SPI_RX_DUAL | SPI_RX_QUAD))) ++ return -EINVAL; ++ if (msg->data_nbits == SPI_NBITS_QUAD && ++ !(spi->mode & SPI_RX_QUAD)) ++ return -EINVAL; ++ ++ if (master->auto_runtime_pm) { ++ ret = pm_runtime_get_sync(master->dev.parent); ++ if (ret < 0) { ++ dev_err(&master->dev, "Failed to power device: %d\n", ++ ret); ++ return ret; ++ } ++ } ++ mutex_lock(&master->bus_lock_mutex); ++ ret = master->spi_flash_read(spi, msg); ++ mutex_unlock(&master->bus_lock_mutex); ++ if (master->auto_runtime_pm) ++ pm_runtime_put(master->dev.parent); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(spi_flash_read); ++ + /*-------------------------------------------------------------------------*/ + + /* Utility methods for SPI master protocol drivers, layered on +diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h +index 53be3a4..ba0dee9 100644 +--- a/include/linux/spi/spi.h ++++ b/include/linux/spi/spi.h +@@ -25,6 +25,7 @@ + struct dma_chan; + struct spi_master; + struct spi_transfer; ++struct spi_flash_read_message; + + /* + * INTERFACES between SPI master-side drivers and SPI infrastructure. +@@ -361,6 +362,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) + * @handle_err: the subsystem calls the driver to handle an error that occurs + * in the generic implementation of transfer_one_message(). + * @unprepare_message: undo any work done by prepare_message(). ++ * @spi_flash_read: to support spi-controller hardwares that provide ++ * accelerated interface to read from flash devices. + * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS + * number. Any individual value may be -ENOENT for CS lines that + * are not GPIOs (driven by the SPI controller itself). +@@ -513,6 +516,8 @@ struct spi_master { + struct spi_message *message); + int (*unprepare_message)(struct spi_master *master, + struct spi_message *message); ++ int (*spi_flash_read)(struct spi_device *spi, ++ struct spi_flash_read_message *msg); + + /* + * These hooks are for drivers that use a generic implementation +@@ -1019,6 +1024,42 @@ static inline ssize_t spi_w8r16be(struct spi_device *spi, u8 cmd) + return be16_to_cpu(result); + } + ++/** ++ * struct spi_flash_read_message - flash specific information for ++ * spi-masters that provide accelerated flash read interfaces ++ * @buf: buffer to read data ++ * @from: offset within the flash from where data is to be read ++ * @len: length of data to be read ++ * @retlen: actual length of data read ++ * @read_opcode: read_opcode to be used to communicate with flash ++ * @addr_width: number of address bytes ++ * @dummy_bytes: number of dummy bytes ++ * @opcode_nbits: number of lines to send opcode ++ * @addr_nbits: number of lines to send address ++ * @data_nbits: number of lines for data ++ */ ++struct spi_flash_read_message { ++ void *buf; ++ loff_t from; ++ size_t len; ++ size_t retlen; ++ u8 read_opcode; ++ u8 addr_width; ++ u8 dummy_bytes; ++ u8 opcode_nbits; ++ u8 addr_nbits; ++ u8 data_nbits; ++}; ++ ++/* SPI core interface for flash read support */ ++static inline bool spi_flash_read_supported(struct spi_device *spi) ++{ ++ return spi->master->spi_flash_read ? true : false; ++} ++ ++int spi_flash_read(struct spi_device *spi, ++ struct spi_flash_read_message *msg); ++ + /*---------------------------------------------------------------------------*/ + + /* diff --git a/target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch b/target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch deleted file mode 100644 index 4f0de01..0000000 --- a/target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/drivers/spi/spi-bitbang.c -+++ b/drivers/spi/spi-bitbang.c -@@ -230,13 +230,14 @@ void spi_bitbang_cleanup(struct spi_devi - } - EXPORT_SYMBOL_GPL(spi_bitbang_cleanup); - --static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t) -+int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t) - { - struct spi_bitbang_cs *cs = spi->controller_state; - unsigned nsecs = cs->nsecs; - - return cs->txrx_bufs(spi, cs->txrx_word, nsecs, t); - } -+EXPORT_SYMBOL_GPL(spi_bitbang_bufs); - - /*----------------------------------------------------------------------*/ - ---- a/include/linux/spi/spi_bitbang.h -+++ b/include/linux/spi/spi_bitbang.h -@@ -39,6 +39,7 @@ extern int spi_bitbang_setup(struct spi_ - extern void spi_bitbang_cleanup(struct spi_device *spi); - extern int spi_bitbang_setup_transfer(struct spi_device *spi, - struct spi_transfer *t); -+extern int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t); - - /* start or stop queue processing */ - extern int spi_bitbang_start(struct spi_bitbang *spi); diff --git a/target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch b/target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch new file mode 100644 index 0000000..46c6928 --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch @@ -0,0 +1,33 @@ +diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c +index c9c3b7f..9d68544 100644 +--- a/drivers/mtd/devices/m25p80.c ++++ b/drivers/mtd/devices/m25p80.c +@@ -131,6 +131,28 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len, + /* convert the dummy cycles to the number of bytes */ + dummy /= 8; + ++ if (spi_flash_read_supported(spi)) { ++ struct spi_flash_read_message msg; ++ int ret; ++ ++ memset(&msg, 0, sizeof(msg)); ++ ++ msg.buf = buf; ++ msg.from = from; ++ msg.len = len; ++ msg.read_opcode = nor->read_opcode; ++ msg.addr_width = nor->addr_width; ++ msg.dummy_bytes = dummy; ++ /* TODO: Support other combinations */ ++ msg.opcode_nbits = SPI_NBITS_SINGLE; ++ msg.addr_nbits = SPI_NBITS_SINGLE; ++ msg.data_nbits = m25p80_rx_nbits(nor); ++ ++ ret = spi_flash_read(spi, &msg); ++ *retlen = msg.retlen; ++ return ret; ++ } ++ + spi_message_init(&m); + memset(t, 0, (sizeof t)); + diff --git a/target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch b/target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch deleted file mode 100644 index ce1b69c..0000000 --- a/target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/include/linux/spi/spi.h -+++ b/include/linux/spi/spi.h -@@ -506,6 +506,12 @@ extern struct spi_master *spi_busnum_to_ - - /*---------------------------------------------------------------------------*/ - -+enum spi_transfer_type { -+ SPI_TRANSFER_GENERIC = 0, -+ SPI_TRANSFER_FLASH_READ_CMD, -+ SPI_TRANSFER_FLASH_READ_DATA, -+}; -+ - /* - * I/O INTERFACE between SPI controller and protocol drivers - * -@@ -626,6 +632,7 @@ struct spi_transfer { - u8 bits_per_word; - u16 delay_usecs; - u32 speed_hz; -+ enum spi_transfer_type type; - - struct list_head transfer_list; - }; diff --git a/target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch b/target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch deleted file mode 100644 index 11bf9ff..0000000 --- a/target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/drivers/mtd/devices/m25p80.c -+++ b/drivers/mtd/devices/m25p80.c -@@ -137,10 +137,12 @@ static int m25p80_read(struct spi_nor *n - flash->command[0] = nor->read_opcode; - m25p_addr2cmd(nor, from, flash->command); - -+ t[0].type = SPI_TRANSFER_FLASH_READ_CMD; - t[0].tx_buf = flash->command; - t[0].len = m25p_cmdsz(nor) + dummy; - spi_message_add_tail(&t[0], &m); - -+ t[1].type = SPI_TRANSFER_FLASH_READ_DATA; - t[1].rx_buf = buf; - t[1].rx_nbits = m25p80_rx_nbits(nor); - t[1].len = len; diff --git a/target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch b/target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch new file mode 100644 index 0000000..312d7be --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch @@ -0,0 +1,32 @@ +--- a/drivers/spi/spi-ath79.c ++++ b/drivers/spi/spi-ath79.c +@@ -42,6 +42,9 @@ struct ath79_spi { + void __iomem *base; + struct clk *clk; + unsigned rrw_delay; ++ ++ u32 clk_div; ++ unsigned long ahb_rate; + }; + + static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) +@@ -109,9 +112,6 @@ static void ath79_spi_enable(struct ath79_spi *sp) + /* save CTRL register */ + sp->reg_ctrl = ath79_spi_rr(sp, AR71XX_SPI_REG_CTRL); + sp->ioc_base = ath79_spi_rr(sp, AR71XX_SPI_REG_IOC); +- +- /* TODO: setup speed? */ +- ath79_spi_wr(sp, AR71XX_SPI_REG_CTRL, 0x43); + } + + static void ath79_spi_disable(struct ath79_spi *sp) +@@ -280,7 +280,8 @@ static int ath79_spi_probe(struct platform_device *pdev) + if (ret) + goto err_put_master; + +- rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ); ++ sp->ahb_rate = clk_get_rate(sp->clk); ++ rate = DIV_ROUND_UP(sp->ahb_rate, MHZ); + if (!rate) { + ret = -EINVAL; + goto err_clk_disable; diff --git a/target/linux/ar71xx/patches-4.1/463-spi-add-ath79-flash-read.patch b/target/linux/ar71xx/patches-4.1/463-spi-add-ath79-flash-read.patch new file mode 100644 index 0000000..c2c47a7 --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/463-spi-add-ath79-flash-read.patch @@ -0,0 +1,48 @@ +--- a/drivers/spi/spi-ath79.c ++++ b/drivers/spi/spi-ath79.c +@@ -172,10 +172,35 @@ static void ath79_spi_cleanup_cs(struct spi_device *spi) + } + } + ++static int ath79_spi_flash_read(struct spi_device *spi, ++ struct spi_flash_read_message *msg) ++{ ++ struct ath79_spi *sp = ath79_spidev_to_sp(spi); ++ ++ /* disable GPIO mode */ ++ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, 0); ++ ++ memcpy_fromio(msg->buf, sp->base + msg->from, msg->len); ++ ++ /* enable GPIO mode */ ++ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, AR71XX_SPI_FS_GPIO); ++ ++ /* restore IOC register */ ++ ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base); ++ ++ msg->retlen = msg->len; ++ ++ return 0; ++} ++ + static int ath79_spi_setup(struct spi_device *spi) + { ++ struct ath79_spi_controller_data *cdata = spi->controller_data; + int status = 0; + ++ spi->master->spi_flash_read = ++ cdata->is_flash ? ath79_spi_flash_read : NULL; ++ + if (!spi->controller_state) { + status = ath79_spi_setup_cs(spi); + if (status) +--- a/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h ++++ b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h +@@ -24,6 +24,7 @@ enum ath79_spi_cs_type { + struct ath79_spi_controller_data { + enum ath79_spi_cs_type cs_type; + unsigned cs_line; ++ bool is_flash; + }; + + #endif /* _ATH79_SPI_PLATFORM_H */ diff --git a/target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch b/target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch deleted file mode 100644 index 0e0e28f..0000000 --- a/target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch +++ /dev/null @@ -1,185 +0,0 @@ ---- a/drivers/spi/spi-ath79.c -+++ b/drivers/spi/spi-ath79.c -@@ -35,6 +35,11 @@ - - #define ATH79_SPI_CS_LINE_MAX 2 - -+enum ath79_spi_state { -+ ATH79_SPI_STATE_WAIT_CMD = 0, -+ ATH79_SPI_STATE_WAIT_READ, -+}; -+ - struct ath79_spi { - struct spi_bitbang bitbang; - u32 ioc_base; -@@ -42,6 +47,11 @@ struct ath79_spi { - void __iomem *base; - struct clk *clk; - unsigned rrw_delay; -+ -+ enum ath79_spi_state state; -+ u32 clk_div; -+ unsigned long read_addr; -+ unsigned long ahb_rate; - }; - - static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) -@@ -109,9 +119,6 @@ static void ath79_spi_enable(struct ath7 - /* save CTRL register */ - sp->reg_ctrl = ath79_spi_rr(sp, AR71XX_SPI_REG_CTRL); - sp->ioc_base = ath79_spi_rr(sp, AR71XX_SPI_REG_IOC); -- -- /* TODO: setup speed? */ -- ath79_spi_wr(sp, AR71XX_SPI_REG_CTRL, 0x43); - } - - static void ath79_spi_disable(struct ath79_spi *sp) -@@ -224,6 +231,110 @@ static u32 ath79_spi_txrx_mode0(struct s - return ath79_spi_rr(sp, AR71XX_SPI_REG_RDS); - } - -+static int ath79_spi_do_read_flash_data(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ -+ /* disable GPIO mode */ -+ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, 0); -+ -+ memcpy_fromio(t->rx_buf, sp->base + sp->read_addr, t->len); -+ -+ /* enable GPIO mode */ -+ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, AR71XX_SPI_FS_GPIO); -+ -+ /* restore IOC register */ -+ ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base); -+ -+ return t->len; -+} -+ -+static int ath79_spi_do_read_flash_cmd(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ int len; -+ const u8 *p; -+ -+ sp->read_addr = 0; -+ -+ len = t->len - 1; -+ p = t->tx_buf; -+ -+ while (len--) { -+ p++; -+ sp->read_addr <<= 8; -+ sp->read_addr |= *p; -+ } -+ -+ return t->len; -+} -+ -+static bool ath79_spi_is_read_cmd(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ return t->type == SPI_TRANSFER_FLASH_READ_CMD; -+} -+ -+static bool ath79_spi_is_data_read(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ return t->type == SPI_TRANSFER_FLASH_READ_DATA; -+} -+ -+static int ath79_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ int ret; -+ -+ switch (sp->state) { -+ case ATH79_SPI_STATE_WAIT_CMD: -+ if (ath79_spi_is_read_cmd(spi, t)) { -+ ret = ath79_spi_do_read_flash_cmd(spi, t); -+ sp->state = ATH79_SPI_STATE_WAIT_READ; -+ } else { -+ ret = spi_bitbang_bufs(spi, t); -+ } -+ break; -+ -+ case ATH79_SPI_STATE_WAIT_READ: -+ if (ath79_spi_is_data_read(spi, t)) { -+ ret = ath79_spi_do_read_flash_data(spi, t); -+ } else { -+ dev_warn(&spi->dev, "flash data read expected\n"); -+ ret = -EIO; -+ } -+ sp->state = ATH79_SPI_STATE_WAIT_CMD; -+ break; -+ -+ default: -+ BUG(); -+ } -+ -+ return ret; -+} -+ -+static int ath79_spi_setup_transfer(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ struct ath79_spi_controller_data *cdata; -+ int ret; -+ -+ ret = spi_bitbang_setup_transfer(spi, t); -+ if (ret) -+ return ret; -+ -+ cdata = spi->controller_data; -+ if (cdata->is_flash) -+ sp->bitbang.txrx_bufs = ath79_spi_txrx_bufs; -+ else -+ sp->bitbang.txrx_bufs = spi_bitbang_bufs; -+ -+ return ret; -+} -+ - static int ath79_spi_probe(struct platform_device *pdev) - { - struct spi_master *master; -@@ -246,6 +357,8 @@ static int ath79_spi_probe(struct platfo - sp = spi_master_get_devdata(master); - platform_set_drvdata(pdev, sp); - -+ sp->state = ATH79_SPI_STATE_WAIT_CMD; -+ - master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); - master->setup = ath79_spi_setup; - master->cleanup = ath79_spi_cleanup; -@@ -255,7 +368,7 @@ static int ath79_spi_probe(struct platfo - sp->bitbang.master = master; - sp->bitbang.chipselect = ath79_spi_chipselect; - sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0; -- sp->bitbang.setup_transfer = spi_bitbang_setup_transfer; -+ sp->bitbang.setup_transfer = ath79_spi_setup_transfer; - sp->bitbang.flags = SPI_CS_HIGH; - - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); -@@ -280,7 +393,8 @@ static int ath79_spi_probe(struct platfo - if (ret) - goto err_put_master; - -- rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ); -+ sp->ahb_rate = clk_get_rate(sp->clk); -+ rate = DIV_ROUND_UP(sp->ahb_rate, MHZ); - if (!rate) { - ret = -EINVAL; - goto err_clk_disable; ---- a/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h -+++ b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h -@@ -24,6 +24,7 @@ enum ath79_spi_cs_type { - struct ath79_spi_controller_data { - enum ath79_spi_cs_type cs_type; - unsigned cs_line; -+ bool is_flash; - }; - - #endif /* _ATH79_SPI_PLATFORM_H */ diff --git a/target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch b/target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch deleted file mode 100644 index 758d231..0000000 --- a/target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/drivers/mtd/devices/m25p80.c -+++ b/drivers/mtd/devices/m25p80.c -@@ -137,6 +137,9 @@ static int m25p80_read(struct spi_nor *n - flash->command[0] = nor->read_opcode; - m25p_addr2cmd(nor, from, flash->command); - -+ if (dummy == 1) -+ t[0].dummy = true; -+ - t[0].type = SPI_TRANSFER_FLASH_READ_CMD; - t[0].tx_buf = flash->command; - t[0].len = m25p_cmdsz(nor) + dummy; ---- a/drivers/spi/spi-ath79.c -+++ b/drivers/spi/spi-ath79.c -@@ -260,6 +260,10 @@ static int ath79_spi_do_read_flash_cmd(s - sp->read_addr = 0; - - len = t->len - 1; -+ -+ if (t->dummy) -+ len -= 1; -+ - p = t->tx_buf; - - while (len--) { ---- a/include/linux/spi/spi.h -+++ b/include/linux/spi/spi.h -@@ -633,6 +633,7 @@ struct spi_transfer { - u16 delay_usecs; - u32 speed_hz; - enum spi_transfer_type type; -+ bool dummy; - - struct list_head transfer_list; - }; -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From andrej.vlasic at sartura.hr Fri Apr 22 19:11:16 2016 From: andrej.vlasic at sartura.hr (Andrej Vlasic) Date: Fri, 22 Apr 2016 23:11:16 +0000 Subject: [OpenWrt-Devel] [PATCH] ubox: make system log support as a selectable option Message-ID: <01000154403dda13-2aec5e01-72d9-4975-800e-6aec1bac2a29-000000@email.amazonses.com> Currently system log is always included as a part of ubox. Add a config option to optionally exclude system log from ubox package. Signed-off-by: Andrej Vlasic --- package/system/ubox/Makefile | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index b32c794..70a9273 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -26,13 +26,29 @@ define Package/ubox CATEGORY:=Base system DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt TITLE:=OpenWrt system helper toolbox + MENU:=1 +endef + +define Package/ubox/config +config UBOX_LOGD + bool + default y + depends on PACKAGE_ubox + prompt "Include system log implementation" + help + Include system log implementation which is implemented as part of ubox project. endef define Package/ubox/install - $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ $(1)/etc/init.d/ + $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,logd,logread,validate_data} $(1)/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/ + ifeq ($(CONFIG_UBOX_LOGD),y) + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/ $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log + endif + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib $(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From vasilugin at yandex.ru Fri Apr 22 23:55:29 2016 From: vasilugin at yandex.ru (=?koi8-r?B?88XSx8XKIPfB08nMwMfJzg==?=) Date: Sat, 23 Apr 2016 09:55:29 +0600 Subject: [OpenWrt-Devel] [RFC] ramips: fix bad patch awake rt305x USB controller Message-ID: <5056501461383729@web4o.yandex.ru> Sorry, fix bad patch (ticket #22248) Signed-Off-By: Serge Vasilugin diff --git a/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch b/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch index 9608f6f..2ba462d 100644 --- a/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch +++ b/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch @@ -1,15 +1,15 @@ --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -375,6 +375,12 @@ static int dwc2_driver_probe(struct plat - dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", - (unsigned long)res->start, hsotg->regs); + dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", + (unsigned long)res->start, hsotg->regs); -+ /* Enable USB port before any regs access */ -+ if(dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) { -+ dwc2_writel(0x00, hsotg->regs + PCGCTL); -+ /* TODO: mdelay(25) here? vendor driver don't use it */ -+ } ++ /* Enable USB port before any regs access */ ++ if(dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) { ++ dwc2_writel(0x00, hsotg->regs + PCGCTL); ++ /* TODO: mdelay(25) here? vendor driver don't use it */ ++ } + - hsotg->dr_mode = usb_get_dr_mode(&dev->dev); - if (IS_ENABLED(CONFIG_USB_DWC2_HOST) && - hsotg->dr_mode != USB_DR_MODE_HOST) { + hsotg->dr_mode = usb_get_dr_mode(&dev->dev); + if (IS_ENABLED(CONFIG_USB_DWC2_HOST) && + hsotg->dr_mode != USB_DR_MODE_HOST) { --- serge _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From gareth41 at orcon.net.nz Sat Apr 23 01:48:04 2016 From: gareth41 at orcon.net.nz (Gareth Parker) Date: Sat, 23 Apr 2016 17:48:04 +1200 Subject: [OpenWrt-Devel] MAC swap handling for QCA8337N Message-ID: <080401d19d23$b53c7730$1fb56590$@orcon.net.nz> First time posting to this list I am adding support for the Comfast CF-WR650AC and have it working. However this router has a QCA8337N switch and MAC exchange needs to be enabled for it to work properly or the router hangs and reboots when trying to access anything switch related. The problem is the QCA8337N in this device is not being enabled with MAC exchange by default as it should be according to r47956. There is no way to manually enable either as was the case previously by using mac06_exchange_en = true in the devices machine file. I also have an EPG5000 with exactly the same switch type QCA8337N, this device requires MAC exchange and previously had mac06_exchange_en = true in its machine file, was removed in r47956 and I can confirm this device still works no problem. I changed the following so I could manually enable it and fix the problem. It appears that the QCA8337N on at-least the CF-WR650AC is not automatically enabled with MAC exchange for some reason. If there is a better way I can do this, please advise. Gareth diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index d879782..3a84e2c 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -505,7 +505,7 @@ ar8327_hw_config_pdata(struct ar8xxx_priv *priv, data->port6_status = ar8327_get_port_init_status(&pdata->port6_cfg); t = ar8327_get_pad_cfg(pdata->pad0_cfg); - if (chip_is_ar8337(priv) && !pdata->pad0_cfg->mac06_exchange_dis) + if ((chip_is_ar8337(priv) || pdata->pad0_cfg->mac06_exchange_en) && !pdata->pad0_cfg->mac06_exchange_dis) t |= AR8337_PAD_MAC06_EXCHANGE_EN; ar8xxx_write(priv, AR8327_REG_PAD0_MODE, t); diff --git a/target/linux/generic/files/include/linux/ar8216_platform.h b/target/linux/generic/files/include/linux/ar8216_platform.h index 24bc442..a8d37ca 100644 --- a/target/linux/generic/files/include/linux/ar8216_platform.h +++ b/target/linux/generic/files/include/linux/ar8216_platform.h @@ -47,6 +47,7 @@ struct ar8327_pad_cfg { bool sgmii_delay_en; enum ar8327_clk_delay_sel txclk_delay_sel; enum ar8327_clk_delay_sel rxclk_delay_sel; + bool mac06_exchange_en; bool mac06_exchange_dis; }; _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From oswald.buddenhagen at gmx.de Sat Apr 23 05:26:56 2016 From: oswald.buddenhagen at gmx.de (Oswald Buddenhagen) Date: Sat, 23 Apr 2016 09:26:56 +0000 (UTC) Subject: [OpenWrt-Devel] [PATCH] lantiq: fix brnImage build References: <1461307150-3806-1-git-send-email-openwrt@kresin.me> Message-ID: Mathias Kresin kresin.me> writes: > Use the kernel with the appended dtb as base, otherwise the kernel will > panic with "no dtb found". > indeed. confirmed to work now. (and i'll freely admit that i failed to figure out how that appended image ends up in the symbols __dtb_start/__dtb_end (the latter in particular) ... :}) > Signed-off-by: Mathias Kresin kresin.me> > --- > target/linux/lantiq/image/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile > index c3cb48a..e63c134 100644 > --- a/target/linux/lantiq/image/Makefile > +++ b/target/linux/lantiq/image/Makefile > -37,7 +37,7 define PatchKernelLzma > endef > > define MkBrnImage > - mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) > + mkbrncmdline -i $(KDIR)/vmlinux-$(5).tmp -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) > $(call CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma) > mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma $(KDIR)/root.$(6) > endef _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hkallweit1 at gmail.com Sat Apr 23 12:42:12 2016 From: hkallweit1 at gmail.com (Heiner Kallweit) Date: Sat, 23 Apr 2016 18:42:12 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: modernize fast SPI flash read In-Reply-To: <571AAA63.8090007@gmail.com> References: <571AAA63.8090007@gmail.com> Message-ID: <571BA5E4.7000408@gmail.com> Am 23.04.2016 um 00:49 schrieb Heiner Kallweit: > OpenWRT has own support for the memory-mapped fast SPI flash read on ath79. > With mainline kernel 4.6/4.7 more elegant generic support for this feature > was added upstream consisting of these two commits: > > 556351f14e74 "spi: introduce accelerated read support for spi flash devices" > 08922f644878 "mtd: devices: m25p80: add support for mmap read request" > > I cherry-picked them for use with ar71xx default kernel version 4.1 > (new patches 460 + 461) > Once the ar71xx kernel version reaches 4.6 / 4.7 these patches > can be removed. > > New patch 462 includes changes from old patch 463 which are not related > to the fast flash read feature. > > New patch 463 includes the new implementation for the fast flash read > feature on ath79. > > These four new patches replace old patches 460-464. > > So far for testing I made the change for the 4.1 version only. > If it looks good I can do the same for the 4.4 version. > > The change was successfully tested on a TP-Link TL-WDR3600. > > Signed-off-by: Heiner Kallweit > --- > .../460-spi-add-generic-flash-read.patch | 159 ++++++++++++++++++ > .../460-spi-bitbang-export-spi_bitbang_bufs.patch | 28 ---- > .../patches-4.1/461-m25p80-add-flash-read.patch | 33 ++++ > .../461-spi-add-type-field-to-spi_transfer.patch | 23 --- > .../462-mtd-m25p80-set-spi-transfer-type.patch | 15 -- > .../patches-4.1/462-spi-extend-ath79_spi.patch | 32 ++++ > .../patches-4.1/463-spi-add-ath79-flash-read.patch | 48 ++++++ > .../463-spi-ath79-add-fast-flash-read.patch | 185 --------------------- > .../464-spi-ath79-fix-fast-flash-read.patch | 35 ---- > 9 files changed, 272 insertions(+), 286 deletions(-) > create mode 100644 target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch > create mode 100644 target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch > create mode 100644 target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch > create mode 100644 target/linux/ar71xx/patches-4.1/463-spi-add-ath79-flash-read.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch > [...] The change doesn't handle ath79_register_m25p80_multi() correctly. I'll provide a v2. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hkallweit1 at gmail.com Sat Apr 23 16:15:11 2016 From: hkallweit1 at gmail.com (Heiner Kallweit) Date: Sat, 23 Apr 2016 22:15:11 +0200 Subject: [OpenWrt-Devel] [PATCH v2] ar71xx: modernize fast SPI flash read Message-ID: <571BD7CF.40704@gmail.com> OpenWRT has own support for the memory-mapped fast SPI flash read on ath79. With mainline kernel 4.6/4.7 more elegant generic support for this feature was added upstream consisting of these two commits: 556351f14e74 "spi: introduce accelerated read support for spi flash devices" 08922f644878 "mtd: devices: m25p80: add support for mmap read request" I cherry-picked them for use with ar71xx default kernel version 4.1 (new patches 460 + 461) Once the ar71xx kernel version reaches 4.6 / 4.7 these patches can be removed. New patch 462 includes changes from old patch 463 which are not related to the fast flash read feature. New patch 463 includes the new implementation for the fast flash read feature on ath79. These four new patches replace old patches 460-464. So far for testing I made the change for the 4.1 version only. If it looks good I can do the same for the 4.4 version. The change was successfully tested on a TP-Link TL-WDR3600. Signed-off-by: Heiner Kallweit --- v2: - make change compatible with ath79_register_m25p80_multi(): >1 flash chip but one can be mmap-accessed only --- .../460-spi-add-generic-flash-read.patch | 159 ++++++++++++++++++ .../460-spi-bitbang-export-spi_bitbang_bufs.patch | 28 ---- .../patches-4.1/461-m25p80-add-flash-read.patch | 33 ++++ .../461-spi-add-type-field-to-spi_transfer.patch | 23 --- .../462-mtd-m25p80-set-spi-transfer-type.patch | 15 -- .../patches-4.1/462-spi-extend-ath79_spi.patch | 32 ++++ .../463-spi-ath79-add-fast-flash-read.patch | 185 --------------------- .../463-spi-ath79-fast-flash-read.patch | 94 +++++++++++ .../464-spi-ath79-fix-fast-flash-read.patch | 35 ---- 9 files changed, 318 insertions(+), 286 deletions(-) create mode 100644 target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch delete mode 100644 target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch create mode 100644 target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch delete mode 100644 target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch delete mode 100644 target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch create mode 100644 target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch delete mode 100644 target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch create mode 100644 target/linux/ar71xx/patches-4.1/463-spi-ath79-fast-flash-read.patch delete mode 100644 target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch diff --git a/target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch b/target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch new file mode 100644 index 0000000..afc977e --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch @@ -0,0 +1,159 @@ +diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c +index 47eff80..dcc6f6e 100644 +--- a/drivers/spi/spi.c ++++ b/drivers/spi/spi.c +@@ -1152,6 +1152,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) + } + } + ++ mutex_lock(&master->bus_lock_mutex); + trace_spi_message_start(master->cur_msg); + + if (master->prepare_message) { +@@ -1161,6 +1162,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) + "failed to prepare message: %d\n", ret); + master->cur_msg->status = ret; + spi_finalize_current_message(master); ++ mutex_unlock(&master->bus_lock_mutex); + return; + } + master->cur_msg_prepared = true; +@@ -1170,6 +1172,7 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) + if (ret) { + master->cur_msg->status = ret; + spi_finalize_current_message(master); ++ mutex_unlock(&master->bus_lock_mutex); + return; + } + +@@ -1177,8 +1180,10 @@ static void __spi_pump_messages(struct spi_master *master, bool in_kthread) + if (ret) { + dev_err(&master->dev, + "failed to transfer one message from queue\n"); ++ mutex_unlock(&master->bus_lock_mutex); + return; + } ++ mutex_unlock(&master->bus_lock_mutex); + } + + /** +@@ -2351,6 +2356,46 @@ int spi_async_locked(struct spi_device *spi, struct spi_message *message) + EXPORT_SYMBOL_GPL(spi_async_locked); + + ++int spi_flash_read(struct spi_device *spi, ++ struct spi_flash_read_message *msg) ++ ++{ ++ struct spi_master *master = spi->master; ++ int ret; ++ ++ if ((msg->opcode_nbits == SPI_NBITS_DUAL || ++ msg->addr_nbits == SPI_NBITS_DUAL) && ++ !(spi->mode & (SPI_TX_DUAL | SPI_TX_QUAD))) ++ return -EINVAL; ++ if ((msg->opcode_nbits == SPI_NBITS_QUAD || ++ msg->addr_nbits == SPI_NBITS_QUAD) && ++ !(spi->mode & SPI_TX_QUAD)) ++ return -EINVAL; ++ if (msg->data_nbits == SPI_NBITS_DUAL && ++ !(spi->mode & (SPI_RX_DUAL | SPI_RX_QUAD))) ++ return -EINVAL; ++ if (msg->data_nbits == SPI_NBITS_QUAD && ++ !(spi->mode & SPI_RX_QUAD)) ++ return -EINVAL; ++ ++ if (master->auto_runtime_pm) { ++ ret = pm_runtime_get_sync(master->dev.parent); ++ if (ret < 0) { ++ dev_err(&master->dev, "Failed to power device: %d\n", ++ ret); ++ return ret; ++ } ++ } ++ mutex_lock(&master->bus_lock_mutex); ++ ret = master->spi_flash_read(spi, msg); ++ mutex_unlock(&master->bus_lock_mutex); ++ if (master->auto_runtime_pm) ++ pm_runtime_put(master->dev.parent); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(spi_flash_read); ++ + /*-------------------------------------------------------------------------*/ + + /* Utility methods for SPI master protocol drivers, layered on +diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h +index 53be3a4..ba0dee9 100644 +--- a/include/linux/spi/spi.h ++++ b/include/linux/spi/spi.h +@@ -25,6 +25,7 @@ + struct dma_chan; + struct spi_master; + struct spi_transfer; ++struct spi_flash_read_message; + + /* + * INTERFACES between SPI master-side drivers and SPI infrastructure. +@@ -361,6 +362,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) + * @handle_err: the subsystem calls the driver to handle an error that occurs + * in the generic implementation of transfer_one_message(). + * @unprepare_message: undo any work done by prepare_message(). ++ * @spi_flash_read: to support spi-controller hardwares that provide ++ * accelerated interface to read from flash devices. + * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS + * number. Any individual value may be -ENOENT for CS lines that + * are not GPIOs (driven by the SPI controller itself). +@@ -513,6 +516,8 @@ struct spi_master { + struct spi_message *message); + int (*unprepare_message)(struct spi_master *master, + struct spi_message *message); ++ int (*spi_flash_read)(struct spi_device *spi, ++ struct spi_flash_read_message *msg); + + /* + * These hooks are for drivers that use a generic implementation +@@ -1019,6 +1024,42 @@ static inline ssize_t spi_w8r16be(struct spi_device *spi, u8 cmd) + return be16_to_cpu(result); + } + ++/** ++ * struct spi_flash_read_message - flash specific information for ++ * spi-masters that provide accelerated flash read interfaces ++ * @buf: buffer to read data ++ * @from: offset within the flash from where data is to be read ++ * @len: length of data to be read ++ * @retlen: actual length of data read ++ * @read_opcode: read_opcode to be used to communicate with flash ++ * @addr_width: number of address bytes ++ * @dummy_bytes: number of dummy bytes ++ * @opcode_nbits: number of lines to send opcode ++ * @addr_nbits: number of lines to send address ++ * @data_nbits: number of lines for data ++ */ ++struct spi_flash_read_message { ++ void *buf; ++ loff_t from; ++ size_t len; ++ size_t retlen; ++ u8 read_opcode; ++ u8 addr_width; ++ u8 dummy_bytes; ++ u8 opcode_nbits; ++ u8 addr_nbits; ++ u8 data_nbits; ++}; ++ ++/* SPI core interface for flash read support */ ++static inline bool spi_flash_read_supported(struct spi_device *spi) ++{ ++ return spi->master->spi_flash_read ? true : false; ++} ++ ++int spi_flash_read(struct spi_device *spi, ++ struct spi_flash_read_message *msg); ++ + /*---------------------------------------------------------------------------*/ + + /* diff --git a/target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch b/target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch deleted file mode 100644 index 4f0de01..0000000 --- a/target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/drivers/spi/spi-bitbang.c -+++ b/drivers/spi/spi-bitbang.c -@@ -230,13 +230,14 @@ void spi_bitbang_cleanup(struct spi_devi - } - EXPORT_SYMBOL_GPL(spi_bitbang_cleanup); - --static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t) -+int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t) - { - struct spi_bitbang_cs *cs = spi->controller_state; - unsigned nsecs = cs->nsecs; - - return cs->txrx_bufs(spi, cs->txrx_word, nsecs, t); - } -+EXPORT_SYMBOL_GPL(spi_bitbang_bufs); - - /*----------------------------------------------------------------------*/ - ---- a/include/linux/spi/spi_bitbang.h -+++ b/include/linux/spi/spi_bitbang.h -@@ -39,6 +39,7 @@ extern int spi_bitbang_setup(struct spi_ - extern void spi_bitbang_cleanup(struct spi_device *spi); - extern int spi_bitbang_setup_transfer(struct spi_device *spi, - struct spi_transfer *t); -+extern int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t); - - /* start or stop queue processing */ - extern int spi_bitbang_start(struct spi_bitbang *spi); diff --git a/target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch b/target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch new file mode 100644 index 0000000..46c6928 --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch @@ -0,0 +1,33 @@ +diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c +index c9c3b7f..9d68544 100644 +--- a/drivers/mtd/devices/m25p80.c ++++ b/drivers/mtd/devices/m25p80.c +@@ -131,6 +131,28 @@ static int m25p80_read(struct spi_nor *nor, loff_t from, size_t len, + /* convert the dummy cycles to the number of bytes */ + dummy /= 8; + ++ if (spi_flash_read_supported(spi)) { ++ struct spi_flash_read_message msg; ++ int ret; ++ ++ memset(&msg, 0, sizeof(msg)); ++ ++ msg.buf = buf; ++ msg.from = from; ++ msg.len = len; ++ msg.read_opcode = nor->read_opcode; ++ msg.addr_width = nor->addr_width; ++ msg.dummy_bytes = dummy; ++ /* TODO: Support other combinations */ ++ msg.opcode_nbits = SPI_NBITS_SINGLE; ++ msg.addr_nbits = SPI_NBITS_SINGLE; ++ msg.data_nbits = m25p80_rx_nbits(nor); ++ ++ ret = spi_flash_read(spi, &msg); ++ *retlen = msg.retlen; ++ return ret; ++ } ++ + spi_message_init(&m); + memset(t, 0, (sizeof t)); + diff --git a/target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch b/target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch deleted file mode 100644 index ce1b69c..0000000 --- a/target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/include/linux/spi/spi.h -+++ b/include/linux/spi/spi.h -@@ -506,6 +506,12 @@ extern struct spi_master *spi_busnum_to_ - - /*---------------------------------------------------------------------------*/ - -+enum spi_transfer_type { -+ SPI_TRANSFER_GENERIC = 0, -+ SPI_TRANSFER_FLASH_READ_CMD, -+ SPI_TRANSFER_FLASH_READ_DATA, -+}; -+ - /* - * I/O INTERFACE between SPI controller and protocol drivers - * -@@ -626,6 +632,7 @@ struct spi_transfer { - u8 bits_per_word; - u16 delay_usecs; - u32 speed_hz; -+ enum spi_transfer_type type; - - struct list_head transfer_list; - }; diff --git a/target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch b/target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch deleted file mode 100644 index 11bf9ff..0000000 --- a/target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/drivers/mtd/devices/m25p80.c -+++ b/drivers/mtd/devices/m25p80.c -@@ -137,10 +137,12 @@ static int m25p80_read(struct spi_nor *n - flash->command[0] = nor->read_opcode; - m25p_addr2cmd(nor, from, flash->command); - -+ t[0].type = SPI_TRANSFER_FLASH_READ_CMD; - t[0].tx_buf = flash->command; - t[0].len = m25p_cmdsz(nor) + dummy; - spi_message_add_tail(&t[0], &m); - -+ t[1].type = SPI_TRANSFER_FLASH_READ_DATA; - t[1].rx_buf = buf; - t[1].rx_nbits = m25p80_rx_nbits(nor); - t[1].len = len; diff --git a/target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch b/target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch new file mode 100644 index 0000000..312d7be --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch @@ -0,0 +1,32 @@ +--- a/drivers/spi/spi-ath79.c ++++ b/drivers/spi/spi-ath79.c +@@ -42,6 +42,9 @@ struct ath79_spi { + void __iomem *base; + struct clk *clk; + unsigned rrw_delay; ++ ++ u32 clk_div; ++ unsigned long ahb_rate; + }; + + static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) +@@ -109,9 +112,6 @@ static void ath79_spi_enable(struct ath79_spi *sp) + /* save CTRL register */ + sp->reg_ctrl = ath79_spi_rr(sp, AR71XX_SPI_REG_CTRL); + sp->ioc_base = ath79_spi_rr(sp, AR71XX_SPI_REG_IOC); +- +- /* TODO: setup speed? */ +- ath79_spi_wr(sp, AR71XX_SPI_REG_CTRL, 0x43); + } + + static void ath79_spi_disable(struct ath79_spi *sp) +@@ -280,7 +280,8 @@ static int ath79_spi_probe(struct platform_device *pdev) + if (ret) + goto err_put_master; + +- rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ); ++ sp->ahb_rate = clk_get_rate(sp->clk); ++ rate = DIV_ROUND_UP(sp->ahb_rate, MHZ); + if (!rate) { + ret = -EINVAL; + goto err_clk_disable; diff --git a/target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch b/target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch deleted file mode 100644 index 0e0e28f..0000000 --- a/target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch +++ /dev/null @@ -1,185 +0,0 @@ ---- a/drivers/spi/spi-ath79.c -+++ b/drivers/spi/spi-ath79.c -@@ -35,6 +35,11 @@ - - #define ATH79_SPI_CS_LINE_MAX 2 - -+enum ath79_spi_state { -+ ATH79_SPI_STATE_WAIT_CMD = 0, -+ ATH79_SPI_STATE_WAIT_READ, -+}; -+ - struct ath79_spi { - struct spi_bitbang bitbang; - u32 ioc_base; -@@ -42,6 +47,11 @@ struct ath79_spi { - void __iomem *base; - struct clk *clk; - unsigned rrw_delay; -+ -+ enum ath79_spi_state state; -+ u32 clk_div; -+ unsigned long read_addr; -+ unsigned long ahb_rate; - }; - - static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) -@@ -109,9 +119,6 @@ static void ath79_spi_enable(struct ath7 - /* save CTRL register */ - sp->reg_ctrl = ath79_spi_rr(sp, AR71XX_SPI_REG_CTRL); - sp->ioc_base = ath79_spi_rr(sp, AR71XX_SPI_REG_IOC); -- -- /* TODO: setup speed? */ -- ath79_spi_wr(sp, AR71XX_SPI_REG_CTRL, 0x43); - } - - static void ath79_spi_disable(struct ath79_spi *sp) -@@ -224,6 +231,110 @@ static u32 ath79_spi_txrx_mode0(struct s - return ath79_spi_rr(sp, AR71XX_SPI_REG_RDS); - } - -+static int ath79_spi_do_read_flash_data(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ -+ /* disable GPIO mode */ -+ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, 0); -+ -+ memcpy_fromio(t->rx_buf, sp->base + sp->read_addr, t->len); -+ -+ /* enable GPIO mode */ -+ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, AR71XX_SPI_FS_GPIO); -+ -+ /* restore IOC register */ -+ ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base); -+ -+ return t->len; -+} -+ -+static int ath79_spi_do_read_flash_cmd(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ int len; -+ const u8 *p; -+ -+ sp->read_addr = 0; -+ -+ len = t->len - 1; -+ p = t->tx_buf; -+ -+ while (len--) { -+ p++; -+ sp->read_addr <<= 8; -+ sp->read_addr |= *p; -+ } -+ -+ return t->len; -+} -+ -+static bool ath79_spi_is_read_cmd(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ return t->type == SPI_TRANSFER_FLASH_READ_CMD; -+} -+ -+static bool ath79_spi_is_data_read(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ return t->type == SPI_TRANSFER_FLASH_READ_DATA; -+} -+ -+static int ath79_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ int ret; -+ -+ switch (sp->state) { -+ case ATH79_SPI_STATE_WAIT_CMD: -+ if (ath79_spi_is_read_cmd(spi, t)) { -+ ret = ath79_spi_do_read_flash_cmd(spi, t); -+ sp->state = ATH79_SPI_STATE_WAIT_READ; -+ } else { -+ ret = spi_bitbang_bufs(spi, t); -+ } -+ break; -+ -+ case ATH79_SPI_STATE_WAIT_READ: -+ if (ath79_spi_is_data_read(spi, t)) { -+ ret = ath79_spi_do_read_flash_data(spi, t); -+ } else { -+ dev_warn(&spi->dev, "flash data read expected\n"); -+ ret = -EIO; -+ } -+ sp->state = ATH79_SPI_STATE_WAIT_CMD; -+ break; -+ -+ default: -+ BUG(); -+ } -+ -+ return ret; -+} -+ -+static int ath79_spi_setup_transfer(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ struct ath79_spi_controller_data *cdata; -+ int ret; -+ -+ ret = spi_bitbang_setup_transfer(spi, t); -+ if (ret) -+ return ret; -+ -+ cdata = spi->controller_data; -+ if (cdata->is_flash) -+ sp->bitbang.txrx_bufs = ath79_spi_txrx_bufs; -+ else -+ sp->bitbang.txrx_bufs = spi_bitbang_bufs; -+ -+ return ret; -+} -+ - static int ath79_spi_probe(struct platform_device *pdev) - { - struct spi_master *master; -@@ -246,6 +357,8 @@ static int ath79_spi_probe(struct platfo - sp = spi_master_get_devdata(master); - platform_set_drvdata(pdev, sp); - -+ sp->state = ATH79_SPI_STATE_WAIT_CMD; -+ - master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); - master->setup = ath79_spi_setup; - master->cleanup = ath79_spi_cleanup; -@@ -255,7 +368,7 @@ static int ath79_spi_probe(struct platfo - sp->bitbang.master = master; - sp->bitbang.chipselect = ath79_spi_chipselect; - sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0; -- sp->bitbang.setup_transfer = spi_bitbang_setup_transfer; -+ sp->bitbang.setup_transfer = ath79_spi_setup_transfer; - sp->bitbang.flags = SPI_CS_HIGH; - - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); -@@ -280,7 +393,8 @@ static int ath79_spi_probe(struct platfo - if (ret) - goto err_put_master; - -- rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ); -+ sp->ahb_rate = clk_get_rate(sp->clk); -+ rate = DIV_ROUND_UP(sp->ahb_rate, MHZ); - if (!rate) { - ret = -EINVAL; - goto err_clk_disable; ---- a/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h -+++ b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h -@@ -24,6 +24,7 @@ enum ath79_spi_cs_type { - struct ath79_spi_controller_data { - enum ath79_spi_cs_type cs_type; - unsigned cs_line; -+ bool is_flash; - }; - - #endif /* _ATH79_SPI_PLATFORM_H */ diff --git a/target/linux/ar71xx/patches-4.1/463-spi-ath79-fast-flash-read.patch b/target/linux/ar71xx/patches-4.1/463-spi-ath79-fast-flash-read.patch new file mode 100644 index 0000000..fdc9516 --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/463-spi-ath79-fast-flash-read.patch @@ -0,0 +1,94 @@ +diff --git a/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h +index 259fd2d..a3edba7 100644 +--- a/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h ++++ b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h +@@ -24,6 +24,7 @@ enum ath79_spi_cs_type { + struct ath79_spi_controller_data { + enum ath79_spi_cs_type cs_type; + unsigned cs_line; ++ bool is_flash; + }; + + #endif /* _ATH79_SPI_PLATFORM_H */ +diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c +index d72a4d1..695fc86 100644 +--- a/drivers/spi/spi-ath79.c ++++ b/drivers/spi/spi-ath79.c +@@ -172,6 +172,34 @@ static void ath79_spi_cleanup_cs(struct spi_device *spi) + } + } + ++static int ath79_spi_flash_read(struct spi_device *spi, ++ struct spi_flash_read_message *msg) ++{ ++ struct ath79_spi *sp = ath79_spidev_to_sp(spi); ++ ++ /* disable GPIO mode */ ++ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, 0); ++ ++ memcpy_fromio(msg->buf, sp->base + msg->from, msg->len); ++ ++ /* enable GPIO mode */ ++ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, AR71XX_SPI_FS_GPIO); ++ ++ /* restore IOC register */ ++ ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base); ++ ++ msg->retlen = msg->len; ++ ++ return 0; ++} ++ ++static bool ath79_spi_flash_read_supported(struct spi_device *spi) ++{ ++ struct ath79_spi_controller_data *cdata = spi->controller_data; ++ ++ return cdata->is_flash; ++} ++ + static int ath79_spi_setup(struct spi_device *spi) + { + int status = 0; +@@ -249,6 +277,8 @@ static int ath79_spi_probe(struct platform_device *pdev) + master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); + master->setup = ath79_spi_setup; + master->cleanup = ath79_spi_cleanup; ++ master->spi_flash_read = ath79_spi_flash_read; ++ master->flash_read_supported = ath79_spi_flash_read_supported; + master->bus_num = pdata->bus_num; + master->num_chipselect = pdata->num_chipselect; + +diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h +index c987e2e..531fe2d 100644 +--- a/include/linux/spi/spi.h ++++ b/include/linux/spi/spi.h +@@ -296,6 +296,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) + * @unprepare_message: undo any work done by prepare_message(). + * @spi_flash_read: to support spi-controller hardwares that provide + * accelerated interface to read from flash devices. ++ * @flash_read_supported: spi device supports flash read + * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS + * number. Any individual value may be -ENOENT for CS lines that + * are not GPIOs (driven by the SPI controller itself). +@@ -443,6 +444,7 @@ struct spi_master { + struct spi_message *message); + int (*spi_flash_read)(struct spi_device *spi, + struct spi_flash_read_message *msg); ++ bool (*flash_read_supported)(struct spi_device *spi); + + /* + * These hooks are for drivers that use a generic implementation +@@ -959,7 +961,9 @@ struct spi_flash_read_message { + /* SPI core interface for flash read support */ + static inline bool spi_flash_read_supported(struct spi_device *spi) + { +- return spi->master->spi_flash_read ? true : false; ++ return spi->master->spi_flash_read && ++ (!spi->master->flash_read_supported || ++ spi->master->flash_read_supported(spi)); + } + + int spi_flash_read(struct spi_device *spi, +-- +2.8.0 + diff --git a/target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch b/target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch deleted file mode 100644 index 758d231..0000000 --- a/target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/drivers/mtd/devices/m25p80.c -+++ b/drivers/mtd/devices/m25p80.c -@@ -137,6 +137,9 @@ static int m25p80_read(struct spi_nor *n - flash->command[0] = nor->read_opcode; - m25p_addr2cmd(nor, from, flash->command); - -+ if (dummy == 1) -+ t[0].dummy = true; -+ - t[0].type = SPI_TRANSFER_FLASH_READ_CMD; - t[0].tx_buf = flash->command; - t[0].len = m25p_cmdsz(nor) + dummy; ---- a/drivers/spi/spi-ath79.c -+++ b/drivers/spi/spi-ath79.c -@@ -260,6 +260,10 @@ static int ath79_spi_do_read_flash_cmd(s - sp->read_addr = 0; - - len = t->len - 1; -+ -+ if (t->dummy) -+ len -= 1; -+ - p = t->tx_buf; - - while (len--) { ---- a/include/linux/spi/spi.h -+++ b/include/linux/spi/spi.h -@@ -633,6 +633,7 @@ struct spi_transfer { - u16 delay_usecs; - u32 speed_hz; - enum spi_transfer_type type; -+ bool dummy; - - struct list_head transfer_list; - }; -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dhutchison at bluemesh.net Sun Apr 24 03:13:57 2016 From: dhutchison at bluemesh.net (David Hutchison) Date: Sun, 24 Apr 2016 01:13:57 -0600 Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: <2232003.crJ2yIpC41@debian64> References: <2232003.crJ2yIpC41@debian64> Message-ID: Thank you for the response Christian! Here is the PCI noise is in the kernel log from ath79_register_pci(): [ 0.510000] PCI host bridge to bus 0000:00 [ 0.510000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff] [ 0.520000] pci_bus 0000:00: root bus resource [io 0x0000] [ 0.520000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff] [ 0.530000] pci 0000:00:00.0: [168c:0050] type 00 class 0x028000 [ 0.530000] pci 0000:00:00.0: reg 10: [mem 0x10000000-0x101fffff 64bit] [ 0.530000] pci 0000:00:00.0: reg 30: [mem 0x00000000-0x0000ffff pref] [ 0.530000] pci 0000:00:00.0: supports D1 [ 0.530000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot [ 0.530000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00 [ 0.530000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64bit] [ 0.530000] pci 0000:00:00.0: BAR 6: assigned [mem 0x10200000-0x1020ffff pref] [ 0.540000] pci 0000:00:00.0: using irq 40 for pin 1 I compiled lspci in and it reports: 00:00.0 Class 0280: 168c:0050 As far as I know that's just a vendor/product ID, I tried looking it up to verify that it was indeed the atheros qca988x but couldn't find anything for certain. I verified ath10k is loaded: ath10k_pci 27629 0 ath10k_core 247226 1 ath10k_pci ath 18726 4 ath10k_core,ath9k,ath9k_common,ath9k_hw mac80211 389729 2 ath10k_core,ath9k cfg80211 217396 5 ath10k_core,ath9k,ath9k_common,ath,mac80211 compat 19304 7 ath10k_pci,ath10k_core,ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211 -- Davey On Fri, Apr 22, 2016 at 4:32 AM, Christian Lamparter wrote: > Hello, > > On Friday, April 22, 2016 02:03:01 AM David Hutchison wrote: >> I have been working on a board port and have everything working except >> for the 2nd radio. This board has a QCA9531 CPU and 2 WiFi Radios: >> AR9531 and a QCA9887 ( http://routerboard.com/RB952Ui-5ac2nD for more >> details ). >> [snip] >> >> Anyway, the Mikrotik hAP only has one radio and is 100% working. >> However the hAP AC Lite has an additional radio ( QCA988X )... I've >> compiled in ath10k, and added "ath79_register_pci()" but it doesn't >> find the radio. I've looked at ap91_pci_init() as well as >> ap94_pci_init() and haven't had any luck. > > Does ath79_register_pci actually register the pci bus (there should > be some noise in the kernel log when it registers the pci bus)? Or > does it return an error -ENODEV? > > This is what it looks like on a Archer C7: (Has a QCA9880) > [ 0.129096] ar724x-pci ar724x-pci.0: PCIe link is down > [ 0.133988] registering PCI controller with io_map_base unset > [ 0.139678] registering PCI controller with io_map_base unset > [ 0.586626] PCI host bridge to bus 0000:00 > [ 0.590553] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff] > [ 0.597148] pci_bus 0000:00: root bus resource [io 0x0000] > [ 0.602534] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0] > ... > > I looked at ath79_register_pci, it is located in /arch/mips/ath79/pci.c. > On the first look, it doesn't look like your SoC is present there. > However soc_is_qca953x is just testing soc_is_qca9533. Can you verify > that this is indeed correct and the function actually calls > ath79_register_pci_ar724x? > >> What is the normal way for initializing a platform with multiple >> radio's? Of course I don't know the exact wiring with this board, but >> I believe the QCA988X 802.11ac radio is on a PCI bus of some sort. I'm >> not entirely sure, but every example I have seen it appears to be. > Hm, I don't know much about your device. If it's a proper QCA988X mini-pcie > radio and has the calibration data on a chip on its minipcie board, then > you don't need to setup anything else. Having select kmod-ath10k > (which AFAIK includes the firmware as well) is enough. > > But if the calibration data for ath10k is part of the routerboard's caldata > partition, you need to extracted by the userspace. This is currently done > by a script: > target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata > > So you will need to add your device there with the right extraction > code. > > Regards, > Christian _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dhutchison at bluemesh.net Sun Apr 24 03:16:11 2016 From: dhutchison at bluemesh.net (David Hutchison) Date: Sun, 24 Apr 2016 01:16:11 -0600 Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: References: <2232003.crJ2yIpC41@debian64> Message-ID: I spoke too soon: https://pci-ids.ucw.cz/read/PC/168c/0050 It is the QCA9887, so it's definitely on the PCIe bus and is being seen. -- Davey On Sun, Apr 24, 2016 at 1:13 AM, David Hutchison wrote: > Thank you for the response Christian! > > Here is the PCI noise is in the kernel log from ath79_register_pci(): > > [ 0.510000] PCI host bridge to bus 0000:00 > [ 0.510000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff] > [ 0.520000] pci_bus 0000:00: root bus resource [io 0x0000] > [ 0.520000] pci_bus 0000:00: No busn resource found for root bus, > will use [bus 00-ff] > [ 0.530000] pci 0000:00:00.0: [168c:0050] type 00 class 0x028000 > [ 0.530000] pci 0000:00:00.0: reg 10: [mem 0x10000000-0x101fffff 64bit] > [ 0.530000] pci 0000:00:00.0: reg 30: [mem 0x00000000-0x0000ffff pref] > [ 0.530000] pci 0000:00:00.0: supports D1 > [ 0.530000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot > [ 0.530000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00 > [ 0.530000] pci 0000:00:00.0: BAR 0: assigned [mem > 0x10000000-0x101fffff 64bit] > [ 0.530000] pci 0000:00:00.0: BAR 6: assigned [mem > 0x10200000-0x1020ffff pref] > [ 0.540000] pci 0000:00:00.0: using irq 40 for pin 1 > > I compiled lspci in and it reports: > 00:00.0 Class 0280: 168c:0050 > > As far as I know that's just a vendor/product ID, I tried looking it > up to verify that it was indeed the atheros qca988x but couldn't find > anything for certain. > > I verified ath10k is loaded: > ath10k_pci 27629 0 > ath10k_core 247226 1 ath10k_pci > ath 18726 4 ath10k_core,ath9k,ath9k_common,ath9k_hw > mac80211 389729 2 ath10k_core,ath9k > cfg80211 217396 5 ath10k_core,ath9k,ath9k_common,ath,mac80211 > compat 19304 7 > ath10k_pci,ath10k_core,ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211 > > -- Davey > > On Fri, Apr 22, 2016 at 4:32 AM, Christian Lamparter > wrote: >> Hello, >> >> On Friday, April 22, 2016 02:03:01 AM David Hutchison wrote: >>> I have been working on a board port and have everything working except >>> for the 2nd radio. This board has a QCA9531 CPU and 2 WiFi Radios: >>> AR9531 and a QCA9887 ( http://routerboard.com/RB952Ui-5ac2nD for more >>> details ). >>> [snip] >>> >>> Anyway, the Mikrotik hAP only has one radio and is 100% working. >>> However the hAP AC Lite has an additional radio ( QCA988X )... I've >>> compiled in ath10k, and added "ath79_register_pci()" but it doesn't >>> find the radio. I've looked at ap91_pci_init() as well as >>> ap94_pci_init() and haven't had any luck. >> >> Does ath79_register_pci actually register the pci bus (there should >> be some noise in the kernel log when it registers the pci bus)? Or >> does it return an error -ENODEV? >> >> This is what it looks like on a Archer C7: (Has a QCA9880) >> [ 0.129096] ar724x-pci ar724x-pci.0: PCIe link is down >> [ 0.133988] registering PCI controller with io_map_base unset >> [ 0.139678] registering PCI controller with io_map_base unset >> [ 0.586626] PCI host bridge to bus 0000:00 >> [ 0.590553] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff] >> [ 0.597148] pci_bus 0000:00: root bus resource [io 0x0000] >> [ 0.602534] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0] >> ... >> >> I looked at ath79_register_pci, it is located in /arch/mips/ath79/pci.c. >> On the first look, it doesn't look like your SoC is present there. >> However soc_is_qca953x is just testing soc_is_qca9533. Can you verify >> that this is indeed correct and the function actually calls >> ath79_register_pci_ar724x? >> >>> What is the normal way for initializing a platform with multiple >>> radio's? Of course I don't know the exact wiring with this board, but >>> I believe the QCA988X 802.11ac radio is on a PCI bus of some sort. I'm >>> not entirely sure, but every example I have seen it appears to be. >> Hm, I don't know much about your device. If it's a proper QCA988X mini-pcie >> radio and has the calibration data on a chip on its minipcie board, then >> you don't need to setup anything else. Having select kmod-ath10k >> (which AFAIK includes the firmware as well) is enough. >> >> But if the calibration data for ath10k is part of the routerboard's caldata >> partition, you need to extracted by the userspace. This is currently done >> by a script: >> target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata >> >> So you will need to add your device there with the right extraction >> code. >> >> Regards, >> Christian _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Sun Apr 24 03:23:22 2016 From: weedy2887 at gmail.com (Weedy) Date: Sun, 24 Apr 2016 03:23:22 -0400 Subject: [OpenWrt-Devel] make -j on ar71xx dies. Message-ID: I "cat >" a few things into .config and then call defconfig. bmon, curl, iperf, etc, little things. I don't even add filesystems. My target is CONFIG_TARGET_ar71xx_generic_TLWDR4300. If I start a clean build with -j1 for a few minutes I can switch the -janything later and I'm fine. But -j anything right off a distclean breaks. $ make -j3 V=s make[1]: Entering directory '/home/weedy/projects/openwrt' make[2]: Entering directory '/home/weedy/projects/openwrt' make[2]: Entering directory '/home/weedy/projects/openwrt' + mkdir -p /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14 + cd /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14 + mkdir -p bin lib include stamp + mkdir -p /home/weedy/projects/openwrt/staging_dir/host mkdir -p /home/weedy/projects/openwrt/build_dir/target-mips_34kc_musl-1.1.14/stamp + cd /home/weedy/projects/openwrt/staging_dir/host + mkdir -p bin lib include stamp touch /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/.prepared mkdir -p /home/weedy/projects/openwrt/build_dir/host/stamp /home/weedy/projects/openwrt/staging_dir/host/include/sys install -m0644 /home/weedy/projects/openwrt/tools/include/*.h /home/weedy/projects/openwrt/staging_dir/host/include/ install -m0644 /home/weedy/projects/openwrt/tools/include/sys/*.h /home/weedy/projects/openwrt/staging_dir/host/include/sys/ ln -sf lib /home/weedy/projects/openwrt/staging_dir/host/lib64 touch /home/weedy/projects/openwrt/staging_dir/host/.prepared make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock' rm -rf /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/root-ar71xx make[2]: Leaving directory '/home/weedy/projects/openwrt' make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock' make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar' make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar' make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/sstrip' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/expat' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch' make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/sstrip' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/make-ext4fs' make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch' make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/expat' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch-image' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/firmware-utils' make -C /home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02 make_ext4fs STATIC=1 make[4]: Entering directory '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02' cc -o make_ext4fs allocate.o canned_fs_config.o contents.o crc16.o ext4fixup.o ext4_sb.o ext4_utils.o extent.o indirect.o make_ext4fs_main.o make_ext4fs.o sha1.o uuid.o wipe.o libsparse/libsparse.a -Wl,-Bstatic -lz -Wl,-Bdynamic contents.o:contents.c:function make_special: error: undefined reference to 'major' contents.o:contents.c:function make_special: error: undefined reference to 'minor' collect2: error: ld returned 1 exit status Makefile:30: recipe for target 'make_ext4fs' failed make[4]: *** [make_ext4fs] Error 1 make[4]: Leaving directory '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02' Makefile:40: recipe for target '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built' failed make[3]: *** [/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built] Error 2 make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/make-ext4fs' tools/Makefile:134: recipe for target 'tools/make-ext4fs/compile' failed make[2]: *** [tools/make-ext4fs/compile] Error 2 make[2]: *** Waiting for unfinished jobs.... make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch-image' make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/firmware-utils' make[2]: Leaving directory '/home/weedy/projects/openwrt' tools/Makefile:133: recipe for target '/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy' failed make[1]: *** [/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy] Error 2 make[1]: Leaving directory '/home/weedy/projects/openwrt' Build failed - please re-run with -j1 to see the real error message /home/weedy/projects/openwrt/include/toplevel.mk:192: recipe for target 'world' failed make: *** [world] Error 1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Sun Apr 24 03:55:23 2016 From: weedy2887 at gmail.com (Weedy) Date: Sun, 24 Apr 2016 03:55:23 -0400 Subject: [OpenWrt-Devel] rsync mirror of download.openwrt.org ? In-Reply-To: <1461339470.9664.45.camel@guerby.net> References: <1458393048.27437.162.camel@guerby.net> <56ED668A.5090404@openwrt.org> <1458928944.27437.306.camel@guerby.net> <1460411691.25322.161.camel@guerby.net> <1461339470.9664.45.camel@guerby.net> Message-ID: On 22 Apr 2016 11:38 am, "Laurent GUERBY" wrote: > > Hi, > > Having no news we completed our mirror by using wget for 15.05.1: > Lftp is good for this. Or I guess aria2c -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tim at tn-x.org Sun Apr 24 04:24:51 2016 From: tim at tn-x.org (Tim Niemeyer) Date: Sun, 24 Apr 2016 10:24:51 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: <56EB27A3.2010204@openwrt.org> References: <56EB27A3.2010204@openwrt.org> Message-ID: <1461486291-8770-1-git-send-email-tim@tn-x.org> This reverts commit 0fd48fd7dab066db8a46e51775579c9ef507ca25. We are facing some problem on rolling out the current 15.05-branch to our devices because the image name changed. The changed image name breaks compatibility for derived projects and that's something which should only happen if there is a really good reason (e.g. security fix). Signed-off-by: Tim Niemeyer --- target/linux/ar71xx/image/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 1a399ab..9b41943 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -548,21 +548,21 @@ define Device/tl-wr743nd-v2 endef TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2 -define Device/tl-wr841-v8 +define Device/tl-wr841n-v8 $(Device/tplink-4mlzma) BOARDNAME := TL-WR841N-v8 DEVICE_PROFILE := TLWR841 TPLINK_HWID := 0x08410008 endef -define Device/tl-wr841-v9 +define Device/tl-wr841n-v9 $(Device/tplink-4mlzma) BOARDNAME := TL-WR841N-v9 DEVICE_PROFILE := TLWR841 TPLINK_HWID := 0x08410009 endef -define Device/tl-wr841-v10 +define Device/tl-wr841n-v10 $(Device/tplink-4mlzma) BOARDNAME := TL-WR841N-v9 DEVICE_PROFILE := TLWR841 @@ -589,7 +589,7 @@ define Device/tl-wr847n-v8 DEVICE_PROFILE := TLWR841 TPLINK_HWID := 0x08470008 endef -TARGET_DEVICES += tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8 +TARGET_DEVICES += tl-wr841n-v8 tl-wr841n-v9 tl-wr841n-v10 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8 define Device/tl-wr941nd-v5 $(Device/tplink-4mlzma) @@ -2008,13 +2008,13 @@ $(eval $(call SingleProfile,Seama,64k,QIHOO360,qihoo-c301,QIHOO-C301,ttyS0,11520 $(eval $(call SingleProfile,Senao,squashfs-only,EAP300V2,eap300v2,EAP300V2,ttyS0,115200,$$(eap300v2_mtdlayout))) -$(eval $(call SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M)) +$(eval $(call SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701nd-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730re-v1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWA830RV1,tl-wa830re-v1,TL-WA901ND,ttyS0,115200,0x08300010,1,4M)) @@ -2023,9 +2023,9 @@ $(eval $(call SingleProfile,TPLINK,64kraw,TLWA901NV2,tl-wa901nd-v2,TL-WA901ND-v2 $(eval $(call SingleProfile,TPLINK,64kraw,TLWR740NV1,tl-wr740n-v1,TL-WR741ND,ttyS0,115200,0x07400001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR740NV3,tl-wr740n-v3,TL-WR741ND,ttyS0,115200,0x07400003,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR743NV1,tl-wr743nd-v1,TL-WR741ND,ttyS0,115200,0x07430001,1,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841nd-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841nd-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841nd-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR842V1,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV2,tl-wr941nd-v2,TL-WR941ND,ttyS0,115200,0x09410002,2,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV3,tl-wr941nd-v3,TL-WR941ND,ttyS0,115200,0x09410002,2,4M)) -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Sun Apr 24 06:32:05 2016 From: john at phrozen.org (John Crispin) Date: Sun, 24 Apr 2016 12:32:05 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: <1461486291-8770-1-git-send-email-tim@tn-x.org> References: <56EB27A3.2010204@openwrt.org> <1461486291-8770-1-git-send-email-tim@tn-x.org> Message-ID: On 24/04/2016 10:24, Tim Niemeyer wrote: > This reverts commit 0fd48fd7dab066db8a46e51775579c9ef507ca25. > > We are facing some problem on rolling out the current 15.05-branch to > our devices because the image name changed. > > The changed image name breaks compatibility for derived projects and > that's something which should only happen if there is a really good > reason (e.g. security fix). > how does it beak compatibility ? > Signed-off-by: Tim Niemeyer > --- > > target/linux/ar71xx/image/Makefile | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile > index 1a399ab..9b41943 100644 > --- a/target/linux/ar71xx/image/Makefile > +++ b/target/linux/ar71xx/image/Makefile > @@ -548,21 +548,21 @@ define Device/tl-wr743nd-v2 > endef > TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2 > > -define Device/tl-wr841-v8 > +define Device/tl-wr841n-v8 > $(Device/tplink-4mlzma) > BOARDNAME := TL-WR841N-v8 > DEVICE_PROFILE := TLWR841 > TPLINK_HWID := 0x08410008 > endef > > -define Device/tl-wr841-v9 > +define Device/tl-wr841n-v9 > $(Device/tplink-4mlzma) > BOARDNAME := TL-WR841N-v9 > DEVICE_PROFILE := TLWR841 > TPLINK_HWID := 0x08410009 > endef > > -define Device/tl-wr841-v10 > +define Device/tl-wr841n-v10 > $(Device/tplink-4mlzma) > BOARDNAME := TL-WR841N-v9 > DEVICE_PROFILE := TLWR841 > @@ -589,7 +589,7 @@ define Device/tl-wr847n-v8 > DEVICE_PROFILE := TLWR841 > TPLINK_HWID := 0x08470008 > endef > -TARGET_DEVICES += tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8 > +TARGET_DEVICES += tl-wr841n-v8 tl-wr841n-v9 tl-wr841n-v10 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8 > > define Device/tl-wr941nd-v5 > $(Device/tplink-4mlzma) > @@ -2008,13 +2008,13 @@ $(eval $(call SingleProfile,Seama,64k,QIHOO360,qihoo-c301,QIHOO-C301,ttyS0,11520 > > $(eval $(call SingleProfile,Senao,squashfs-only,EAP300V2,eap300v2,EAP300V2,ttyS0,115200,$$(eap300v2_mtdlayout))) > > -$(eval $(call SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M)) > +$(eval $(call SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M)) > > $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M)) > -$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701nd-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M)) > -$(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730re-v1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M)) > +$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M)) > +$(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLWA830RV1,tl-wa830re-v1,TL-WA901ND,ttyS0,115200,0x08300010,1,4M)) > @@ -2023,9 +2023,9 @@ $(eval $(call SingleProfile,TPLINK,64kraw,TLWA901NV2,tl-wa901nd-v2,TL-WA901ND-v2 > $(eval $(call SingleProfile,TPLINK,64kraw,TLWR740NV1,tl-wr740n-v1,TL-WR741ND,ttyS0,115200,0x07400001,1,4M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLWR740NV3,tl-wr740n-v3,TL-WR741ND,ttyS0,115200,0x07400003,1,4M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLWR743NV1,tl-wr743nd-v1,TL-WR741ND,ttyS0,115200,0x07430001,1,4M)) > -$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M)) > -$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M)) > -$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M)) > +$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841nd-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M)) > +$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841nd-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M)) > +$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841nd-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLWR842V1,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV2,tl-wr941nd-v2,TL-WR941ND,ttyS0,115200,0x09410002,2,4M)) > $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV3,tl-wr941nd-v3,TL-WR941ND,ttyS0,115200,0x09410002,2,4M)) > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Sun Apr 24 06:48:39 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Sun, 24 Apr 2016 12:48:39 +0200 Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: References: Message-ID: <2596438.Cv6xmiar05@debian64> On Sunday, April 24, 2016 01:16:11 AM David Hutchison wrote: > I spoke too soon: > https://pci-ids.ucw.cz/read/PC/168c/0050 > > It is the QCA9887, so it's definitely on the PCIe bus and is being seen. Does ath10k support the QCA9887? I see no entry for this pci-id (168c:0050) in ath10k's pci table [0] and there's no definition of it in the hardware header either [1]. The chip-id is also not present. I CC'ed ath10k, since this seems to be a new chip that might be easy to add. > On Sun, Apr 24, 2016 at 1:13 AM, David Hutchison > wrote: > > Here is the PCI noise is in the kernel log from ath79_register_pci(): > > > > [ 0.510000] PCI host bridge to bus 0000:00 > > [ 0.510000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff] > > [ 0.520000] pci_bus 0000:00: root bus resource [io 0x0000] > > [ 0.520000] pci_bus 0000:00: No busn resource found for root bus, > > will use [bus 00-ff] > > [ 0.530000] pci 0000:00:00.0: [168c:0050] type 00 class 0x028000 > > [ 0.530000] pci 0000:00:00.0: reg 10: [mem 0x10000000-0x101fffff 64bit] > > [ 0.530000] pci 0000:00:00.0: reg 30: [mem 0x00000000-0x0000ffff pref] > > [ 0.530000] pci 0000:00:00.0: supports D1 > > [ 0.530000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot > > [ 0.530000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00 > > [ 0.530000] pci 0000:00:00.0: BAR 0: assigned [mem > > 0x10000000-0x101fffff 64bit] > > [ 0.530000] pci 0000:00:00.0: BAR 6: assigned [mem > > 0x10200000-0x1020ffff pref] > > [ 0.540000] pci 0000:00:00.0: using irq 40 for pin 1 > > > > I compiled lspci in and it reports: > > 00:00.0 Class 0280: 168c:0050 > > > > As far as I know that's just a vendor/product ID, I tried looking it > > up to verify that it was indeed the atheros qca988x but couldn't find > > anything for certain. > > > > I verified ath10k is loaded: > > ath10k_pci 27629 0 > > ath10k_core 247226 1 ath10k_pci > > ath 18726 4 ath10k_core,ath9k,ath9k_common,ath9k_hw > > mac80211 389729 2 ath10k_core,ath9k > > cfg80211 217396 5 ath10k_core,ath9k,ath9k_common,ath,mac80211 > > compat 19304 7 > > ath10k_pci,ath10k_core,ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211 > > Regards, Christian [0] [1] _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From eyal.birger at gmail.com Sun Apr 24 07:47:39 2016 From: eyal.birger at gmail.com (Eyal Birger) Date: Sun, 24 Apr 2016 14:47:39 +0300 Subject: [OpenWrt-Devel] build: conditional dependencies in packages sharing the same source Message-ID: Hi All, We've encountered an interesting behavior in the OpenWRT build system, on which feedback would be appreciated: When building packages sharing the same source code, all packages prerequisites seem to be joined unconditionally, instead of each prerequisite depending on the package that required it. As an example: ppp-mod-pppoa shares its source code with the ppp package; ppp-mod-pppoa depends on linux-atm; as a result, ppp depends unconditionally on linux-atm. i.e. in the generated tmp/.packagedeps file, the following is generated: $(curdir)/ppp/compile += ... $(curdir)/linux-atm/compile ... And not: $(curdir)/ppp/compile += ... $(if $(CONFIG_ppp-mod-pppoa),$(curdir)/linux-atm/compile) ... This results in unnecessary compilation dependencies. Is this behavior intentional? Best regards, Eyal. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Sun Apr 24 09:03:46 2016 From: weedy2887 at gmail.com (Weedy) Date: Sun, 24 Apr 2016 09:03:46 -0400 Subject: [OpenWrt-Devel] undefined reference while building Message-ID: On Sun, Apr 24, 2016 at 3:23 AM, Weedy wrote: > I "cat >" a few things into .config and then call defconfig. > bmon, curl, iperf, etc, little things. I don't even add filesystems. > My target is CONFIG_TARGET_ar71xx_generic_TLWDR4300. > > If I start a clean build with -j1 for a few minutes I can switch the > -janything later and I'm fine. > But -j anything right off a distclean breaks. > > $ make -j3 V=s > make[1]: Entering directory '/home/weedy/projects/openwrt' > make[2]: Entering directory '/home/weedy/projects/openwrt' > make[2]: Entering directory '/home/weedy/projects/openwrt' > + mkdir -p /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14 > + cd /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14 > + mkdir -p bin lib include stamp > + mkdir -p /home/weedy/projects/openwrt/staging_dir/host > mkdir -p /home/weedy/projects/openwrt/build_dir/target-mips_34kc_musl-1.1.14/stamp > + cd /home/weedy/projects/openwrt/staging_dir/host > + mkdir -p bin lib include stamp > touch /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/.prepared > mkdir -p /home/weedy/projects/openwrt/build_dir/host/stamp > /home/weedy/projects/openwrt/staging_dir/host/include/sys > install -m0644 /home/weedy/projects/openwrt/tools/include/*.h > /home/weedy/projects/openwrt/staging_dir/host/include/ > install -m0644 /home/weedy/projects/openwrt/tools/include/sys/*.h > /home/weedy/projects/openwrt/staging_dir/host/include/sys/ > ln -sf lib /home/weedy/projects/openwrt/staging_dir/host/lib64 > touch /home/weedy/projects/openwrt/staging_dir/host/.prepared > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock' > rm -rf /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/root-ar71xx > make[2]: Leaving directory '/home/weedy/projects/openwrt' > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock' > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock' > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock' > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar' > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar' > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar' > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar' > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/sstrip' > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/expat' > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch' > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/sstrip' > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/make-ext4fs' > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch' > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/expat' > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch-image' > make[3]: Entering directory '/home/weedy/projects/openwrt/tools/firmware-utils' > make -C /home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02 > make_ext4fs STATIC=1 > make[4]: Entering directory > '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02' > cc -o make_ext4fs allocate.o canned_fs_config.o contents.o crc16.o > ext4fixup.o ext4_sb.o ext4_utils.o extent.o indirect.o > make_ext4fs_main.o make_ext4fs.o sha1.o uuid.o wipe.o > libsparse/libsparse.a -Wl,-Bstatic -lz -Wl,-Bdynamic > contents.o:contents.c:function make_special: error: undefined > reference to 'major' > contents.o:contents.c:function make_special: error: undefined > reference to 'minor' > collect2: error: ld returned 1 exit status > Makefile:30: recipe for target 'make_ext4fs' failed > make[4]: *** [make_ext4fs] Error 1 > make[4]: Leaving directory > '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02' > Makefile:40: recipe for target > '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built' > failed > make[3]: *** [/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built] > Error 2 > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/make-ext4fs' > tools/Makefile:134: recipe for target 'tools/make-ext4fs/compile' failed > make[2]: *** [tools/make-ext4fs/compile] Error 2 > make[2]: *** Waiting for unfinished jobs.... > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch-image' > make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/firmware-utils' > make[2]: Leaving directory '/home/weedy/projects/openwrt' > tools/Makefile:133: recipe for target > '/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy' > failed > make[1]: *** [/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy] > Error 2 > make[1]: Leaving directory '/home/weedy/projects/openwrt' > Build failed - please re-run with -j1 to see the real error message > /home/weedy/projects/openwrt/include/toplevel.mk:192: recipe for > target 'world' failed > make: *** [world] Error 1 Never mind. After a few more test and fresh git clones it seems I have a more general build failure. Basically any host utill with makedev, major or minor in it is dying. I don't understand why. Is this a gcc 5.x thing? I updated my system recently. make[4]: Entering directory '/home/weedy/projects/openwrt/build_dir/host/e2fsprogs-1.42.13/lib/uuid' MKINSTALLDIRS /home/weedy/projects/openwrt/staging_dir/host/lib /home/weedy/projects/openwrt/staging_dir/host/include/uuid /home/weedy/projects/openwrt/staging_dir/host/share/man/man3 mkdir /home/weedy/projects/openwrt/staging_dir/host/include/uuid INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/lib/libuuid.a INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/include/uuid/uuid.h INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid.3 INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_clear.3 INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_compare.3 INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_copy.3 INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_generate.3 INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_is_null.3 INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_parse.3 INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_time.3 INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_unparse.3 LINK /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_generate_random.3 LINK /home/weedy/projects/openwrt/staging_dir/host/share/man/man3/uuid_generate_time.3 INSTALL_DATA /home/weedy/projects/openwrt/staging_dir/host/lib/pkgconfig/uuid.pc make[4]: Leaving directory '/home/weedy/projects/openwrt/build_dir/host/e2fsprogs-1.42.13/lib/uuid' mkdir -p /home/weedy/projects/openwrt/staging_dir/host/include/e2fsprogs cp -fpR /home/weedy/projects/openwrt/staging_dir/host/include/uuid /home/weedy/projects/openwrt/staging_dir/host/include/e2fsprogs/ rm -rf /home/weedy/projects/openwrt/staging_dir/host/include/uuid install -m0644 /home/weedy/projects/openwrt/build_dir/host/e2fsprogs-1.42.13/lib/uuid/libuuid.a /home/weedy/projects/openwrt/staging_dir/host/lib/ mkdir -p /home/weedy/projects/openwrt/staging_dir/host/stamp touch /home/weedy/projects/openwrt/build_dir/host/e2fsprogs-1.42.13/.built touch /home/weedy/projects/openwrt/staging_dir/host/stamp/.e2fsprogs_installed make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/e2fsprogs' make[3]: Entering directory '/home/weedy/projects/openwrt/tools/mtd-utils' make -C /home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2 CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -I/home/weedy/projects/openwrt/staging_dir/host/include -I/home/weedy/projects/openwrt/staging_dir/host/usr/include -I/home/weedy/projects/openwrt/staging_dir/host/include/e2fsprogs -I/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/include -L/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2 -L/home/weedy/projects/openwrt/staging_dir/host/lib -DNO_NATIVE_SUPPORT" LDFLAGS="-L/home/weedy/projects/openwrt/staging_dir/host/lib -L/home/weedy/projects/openwrt/staging_dir/host/usr/lib " WITHOUT_LZO=1 WITHOUT_XATTR=1 SUBDIRS="" BUILDDIR="/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2" STATIC=1 V= TARGETS="mkfs.jffs2 ubi-utils/ubinize mkfs.ubifs/mkfs.ubifs" make[4]: Entering directory '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2' CHK include/version.h LD mkfs.jffs2 mkfs.jffs2.c:944: error: undefined reference to 'major' mkfs.jffs2.c:944: error: undefined reference to 'minor' mkfs.jffs2.c:1263: error: undefined reference to 'minor' mkfs.jffs2.c:1263: error: undefined reference to 'major' mkfs.jffs2.c:1273: error: undefined reference to 'minor' mkfs.jffs2.c:1273: error: undefined reference to 'major' mkfs.jffs2.c:503: error: undefined reference to 'makedev' mkfs.jffs2.c:467: error: undefined reference to 'makedev' mkfs.jffs2.c:510: error: undefined reference to 'makedev' collect2: error: ld returned 1 exit status common.mk:80: recipe for target '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2' failed make[4]: *** [/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/mkfs.jffs2] Error 1 make[4]: Leaving directory '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2' Makefile:60: recipe for target '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/.built' failed make[3]: *** [/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2/.built] Error 2 make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/mtd-utils' tools/Makefile:134: recipe for target 'tools/mtd-utils/compile' failed make[2]: *** [tools/mtd-utils/compile] Error 2 make[2]: Leaving directory '/home/weedy/projects/openwrt' tools/Makefile:133: recipe for target '/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy' failed make[1]: *** [/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyyyyyynyyyyyyyyyyyyynyyyyynnyynynyyyynnnyy] Error 2 make[1]: Leaving directory '/home/weedy/projects/openwrt' /home/weedy/projects/openwrt/include/toplevel.mk:192: recipe for target 'world' failed make: *** [world] Error 2 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Sun Apr 24 09:51:05 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Sun, 24 Apr 2016 22:51:05 +0900 Subject: [OpenWrt-Devel] [PATCHv3] ramips: add support for Planex MZK-EX300NP In-Reply-To: <44c841f7-6393-25a1-4730-ab263f1b34c0@phrozen.org> References: <44c841f7-6393-25a1-4730-ab263f1b34c0@phrozen.org> Message-ID: <1461505865-24266-1-git-send-email-tochiro.srchack@gmail.com> MZK-EX300NP is MT7620A based wifi repeater. Built-in power supply. 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. Signed-off-by: YuheiOKAWA --- Changes in v3: - rebase - change an line in 01_leds and 02_network target/linux/ramips/base-files/etc/board.d/01_leds | 3 +- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MZK-EX300NP.dts | 132 +++++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 2 + target/linux/ramips/mt7620/profiles/planex.mk | 12 ++ 8 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/MZK-EX300NP.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..3ab5f7f 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -118,7 +118,8 @@ dir-615-h1) ucidef_set_led_default "status" "Status LED (amber)" "$board:amber:status" "0" set_wifi_led "rt2800pci-phy0::radio" ;; -dir-620-d1) +dir-620-d1|\ +mzk-ex300np) set_wifi_led "$board:green:wifi" ;; dir-810l|\ diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..c89b2a2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -162,6 +162,7 @@ ramips_setup_interfaces() ;; d105|\ hpm|\ + mzk-ex300np|\ na930|\ wli-tx4-ag300n|\ wrh-300cr) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..0eda084 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -154,6 +154,7 @@ get_status_led() { whr-600d) status_led="$board:orange:wifi" ;; + mzk-ex300np|\ rt-n10-plus|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..e17aa94 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -292,6 +292,9 @@ ramips_board_detect() { *"MZK-DP150N") name="mzk-dp150n" ;; + *"MZK-EX300NP") + name="mzk-ex300np" + ;; *"MZK-W300NH2"*) name="mzk-w300nh2" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..c0ee14e 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -88,6 +88,7 @@ platform_check_image() { mt7628|\ mzk-750dhp|\ mzk-dp150n|\ + mzk-ex300np|\ mzk-w300nh2|\ mzk-wdpr|\ nbg-419n|\ diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts b/target/linux/ramips/dts/MZK-EX300NP.dts new file mode 100644 index 0000000..51e87ad --- /dev/null +++ b/target/linux/ramips/dts/MZK-EX300NP.dts @@ -0,0 +1,132 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "Planex MZK-EX300NP"; + + palmbus at 10000000 { + gpio1: gpio at 638 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x730000>; + }; + + partition at 780000 { + label = "Udata"; + reg = <0x780000 0x80000>; + }; + }; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi refclk", "rgmii1", "wled"; + ralink,function = "gpio"; + }; + }; + }; + + ethernet at 10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wifi { + label = "mzk-ex300np:green:wifi"; + gpios = <&gpio3 0 0>; + }; + + wps { + label = "mzk-ex300np:green:wps"; + gpios = <&gpio1 5 0>; + }; + + rep { + label = "mzk-ex300np:blue:rep"; + gpios = <&gpio1 4 1>; + }; + + wifi1 { + label = "mzk-ex300np:blue:wifi1"; + gpios = <&gpio1 1 1>; + }; + + wifi2 { + label = "mzk-ex300np:blue:wifi2"; + gpios = <&gpio1 2 1>; + }; + + wifi3 { + label = "mzk-ex300np:blue:wifi3"; + gpios = <&gpio1 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 1 1>; + linux,code = <0x198>; + }; + + wps { + label = "wps"; + gpios = <&gpio1 3 0>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index c76e98e..2ff32c4 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -100,6 +100,7 @@ na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) +Image/Build/Profile/MZK-EX300NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) Image/Build/Profile/HC5761=$(call BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) Image/Build/Profile/HC5861=$(call BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) @@ -145,6 +146,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/WHR1166D,$(1)) $(call Image/Build/Profile/DB-WRT01,$(1)) $(call Image/Build/Profile/MZK-750DHP,$(1)) + $(call Image/Build/Profile/MZK-EX300NP,$(1)) $(call Image/Build/Profile/NA930,$(1)) $(call Image/Build/Profile/HC5661,$(1)) $(call Image/Build/Profile/HC5761,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk index f6f2cf1..e5ea6ed 100644 --- a/target/linux/ramips/mt7620/profiles/planex.mk +++ b/target/linux/ramips/mt7620/profiles/planex.mk @@ -14,3 +14,15 @@ define Profile/MZK-750DHP/Description Package set optimized for the Planex MZK-750DHP. endef $(eval $(call Profile,MZK-750DHP)) + + +define Profile/MZK-EX300NP + NAME:=Planex MZK-EX300NP + PACKAGES:= +endef + +define Profile/MZK-EX300NP/Description + Package set optimized for the Planex MZK-EX300NP. +endef +$(eval $(call Profile,MZK-EX300NP)) + -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hkallweit1 at gmail.com Sun Apr 24 10:53:26 2016 From: hkallweit1 at gmail.com (Heiner Kallweit) Date: Sun, 24 Apr 2016 16:53:26 +0200 Subject: [OpenWrt-Devel] Issue with deferred GPIO probing on ar71xx/TL-WDR3600 under kernel 4.4 Message-ID: <571CDDE6.5070108@gmail.com> Under 4.4 I get the following errors which do not occur under 4.1: [ 0.120197] MIPS: machine is TP-LINK TL-WDR3600/4300/4310 [ 0.126234] unable to request GPIO18 for external LNA0 [ 0.132811] unable to request GPIO19 for external LNA1 Reason is that gpio_request_one() in the following calls of the board initialization code returns -EPROBE_DEFER now. ath79_wmac_set_ext_lna_gpio(0, WDR4300_GPIO_EXTERNAL_LNA0); ath79_wmac_set_ext_lna_gpio(1, WDR4300_GPIO_EXTERNAL_LNA1); I'm not sure how to handle the situation that the board initialization code wants to access resources which are not available yet. A driver could defer its loading in this case, but most likely we don't have this option for the board initialization code. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hkallweit1 at gmail.com Sun Apr 24 11:40:26 2016 From: hkallweit1 at gmail.com (Heiner Kallweit) Date: Sun, 24 Apr 2016 17:40:26 +0200 Subject: [OpenWrt-Devel] Issue with deferred GPIO probing on ar71xx/TL-WDR3600 under kernel 4.4 In-Reply-To: <571CDDE6.5070108@gmail.com> References: <571CDDE6.5070108@gmail.com> Message-ID: <571CE8EA.3020301@gmail.com> Am 24.04.2016 um 16:53 schrieb Heiner Kallweit: > Under 4.4 I get the following errors which do not occur under 4.1: > > [ 0.120197] MIPS: machine is TP-LINK TL-WDR3600/4300/4310 > [ 0.126234] unable to request GPIO18 for external LNA0 > [ 0.132811] unable to request GPIO19 for external LNA1 > > Reason is that gpio_request_one() in the following calls of > the board initialization code returns -EPROBE_DEFER now. > > ath79_wmac_set_ext_lna_gpio(0, WDR4300_GPIO_EXTERNAL_LNA0); > ath79_wmac_set_ext_lna_gpio(1, WDR4300_GPIO_EXTERNAL_LNA1); > > I'm not sure how to handle the situation that the board > initialization code wants to access resources which are not > available yet. > A driver could defer its loading in this case, but most > likely we don't have this option for the board initialization > code. > I found that manually registering the ath79 gpio driver from the board init code fixes the issue. Symbol ath79_gpio_driver needs to be exported in the ath79 gpio driver and the following has to be added to the board init code: extern struct platform_driver ath79_gpio_driver; platform_driver_register(&ath79_gpio_driver); However to me this looks more like a hack than a proper solution. Any better idea? _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sun Apr 24 11:53:54 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sun, 24 Apr 2016 17:53:54 +0200 Subject: [OpenWrt-Devel] [PATCH 1/5] lantiq: new image build process - fix kernel entry address Message-ID: <1461513238-13290-1-git-send-email-openwrt@kresin.me> Set the kernel entry address to the same value as it is used for the old image build build process. Fixes boot of uImages on VGV7510KW22NOR and others. Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index d863a91..4a358b5 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -11,7 +11,7 @@ JFFS2_BLOCKSIZE = 64k 128k 256k KERNEL_LOADADDR = 0x80002000 -KERNEL_ENTRY = 0x80a00000 +KERNEL_ENTRY = 0x80002000 include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sun Apr 24 11:53:55 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sun, 24 Apr 2016 17:53:55 +0200 Subject: [OpenWrt-Devel] [PATCH 2/5] lantiq: build sysupgrade images for lantiqImage In-Reply-To: <1461513238-13290-1-git-send-email-openwrt@kresin.me> References: <1461513238-13290-1-git-send-email-openwrt@kresin.me> Message-ID: <1461513238-13290-2-git-send-email-openwrt@kresin.me> Tested with VGV7510KW22NOR. Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 4a358b5..d78c035 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -301,6 +301,8 @@ define Device/Default FILESYSTEMS := squashfs DEVICE_PROFILE := DEVICE_DTS := + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs endef DEVICE_VARS += BOARD_ID DEVICE_PROFILE DEVICE_DTS -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sun Apr 24 11:53:56 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sun, 24 Apr 2016 17:53:56 +0200 Subject: [OpenWrt-Devel] [PATCH 3/5] lantiq: remove orphaned tp-link image build steps In-Reply-To: <1461513238-13290-1-git-send-email-openwrt@kresin.me> References: <1461513238-13290-1-git-send-email-openwrt@kresin.me> Message-ID: <1461513238-13290-3-git-send-email-openwrt@kresin.me> Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index d78c035..6bad91b 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -51,11 +51,6 @@ define MkImageLzma -d $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/uImage-$(1)$(2) endef -define TPLinkImageLzma - mktplinkfw2 -c -B $(2) -s \ - -k $(KDIR)/vmlinux$(3)-$(1).lzma -o $(KDIR)/uImage-$(1)$(3) -endef - define MkImageEVA lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/$(1)$(2).eva.prealign dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.64k bs=64k conv=sync @@ -115,12 +110,6 @@ define Image/BuildDGN3500B/squashfs endef -define Image/BuildTPLink/squashfs - mktplinkfw2 -B $(3) -s -a 0x4 -j \ - -k $(KDIR)/vmlinux-$(2).lzma -r $(KDIR)/root.$(1) \ - -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-sysupgrade.image -endef - define Image/BuildEVA/squashfs cat $(KDIR)/$(2).eva.align.64k $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva) @@ -247,17 +236,6 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) endif endef -define Image/BuildKernelTPLink/Template - $(call PatchKernelLzma,$(1)) - $(call TPLinkImageLzma,$(1),$(2)) - $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - $(call PatchKernelLzma,$(1),-initramfs) - $(call TPLinkImageLzma,$(1),$(2),-initramfs) - $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs -endif -endef - define Image/BuildKernelEVA/Template $(call PatchKernelLzma,$(1)) $(call MkImageEVA,$(1)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sun Apr 24 11:53:57 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sun, 24 Apr 2016 17:53:57 +0200 Subject: [OpenWrt-Devel] [PATCH 4/5] add a no dict version of lzma to new image build code In-Reply-To: <1461513238-13290-1-git-send-email-openwrt@kresin.me> References: <1461513238-13290-1-git-send-email-openwrt@kresin.me> Message-ID: <1461513238-13290-4-git-send-email-openwrt@kresin.me> Required to compress kernels in a brnboot compatible way. Signed-off-by: Mathias Kresin --- include/image.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/image.mk b/include/image.mk index 7c11aa1..bc383e6 100644 --- a/include/image.mk +++ b/include/image.mk @@ -336,7 +336,11 @@ define Build/fit endef define Build/lzma - $(STAGING_DIR_HOST)/bin/lzma e $@ -lc1 -lp2 -pb2 $(1) $@.new + $(call Build/lzma-no-dict,-lc1 -lp2 -pb2 $(1)) +endef + +define Build/lzma-no-dict + $(STAGING_DIR_HOST)/bin/lzma e $@ $(1) $@.new @mv $@.new $@ endef -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sun Apr 24 11:53:58 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sun, 24 Apr 2016 17:53:58 +0200 Subject: [OpenWrt-Devel] [PATCH 5/5] lantiq: use new image build process for brnImages In-Reply-To: <1461513238-13290-1-git-send-email-openwrt@kresin.me> References: <1461513238-13290-1-git-send-email-openwrt@kresin.me> Message-ID: <1461513238-13290-5-git-send-email-openwrt@kresin.me> LZMA compress the kernel without dictionary, otherwise brnboot fails to uncompress the kernel. The filesystem parameter of mkbrncmdline was dropped since the used filesystem isn't exported in the kernel build step and at least in my tests everything works without the parameter. If the parameter is required for some reason, the static keyword "squashfs" can be used. Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 42 +++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 6bad91b..f779a1b 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -39,12 +39,6 @@ define PatchKernelLzma $(call CompressLzma,$(KDIR)/vmlinux$(2)-$(1).tmp,$(KDIR)/vmlinux$(2)-$(1).lzma) endef -define MkBrnImage - mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) - $(call CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma) - mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma $(KDIR)/root.$(6) -endef - define MkImageLzma mkimage -A mips -O linux -T kernel -a 0x80002000 -C lzma \ -e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \ @@ -61,7 +55,6 @@ endef define Image/Build/squashfs cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image) - $(if $(3),$(call MkBrnImage,$(3),$(4),$(5),$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-brnImage,$(2),$(1),$(6))) endef define Image/BuildNAND/squashfs @@ -268,6 +261,14 @@ define Build/mktplinkfw2 -o $@ endef +define Build/mkbrncmdline + mkbrncmdline -i $@ -o $@.new BRN-BOOT + mv $@.new $@ +endef + +define Build/mkbrnimg + mkbrnimg -s $(SIGNATURE) -m $(MAGIC) -p $(CRC32_POLY) -o $@ $(word 1,$^) $(word 2,$^) +endef # Shared device definition: applies to every defined device define Device/Default @@ -291,6 +292,13 @@ define Device/lantiqTpLink IMAGE/tplink := mktplinkfw2 endef +define Device/lantiqBrnImage + KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict + IMAGES := factory.bin + IMAGE/factory.bin := mkbrnimg +endef +DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY + define lantiqTpLink define Device/$(1) $$(Device/lantiqTpLink) @@ -310,6 +318,17 @@ define lantiqImage TARGET_DEVICES += $(1) endef +define lantiqBrnImage + define Device/$(1) + $$(Device/lantiqBrnImage) + DEVICE_PROFILE := $(1) + DEVICE_DTS := $(1) + SIGNATURE := $(2) + MAGIC := $(3) + CRC32_POLY := $(4) + endef + TARGET_DEVICES += $(1) +endef ifeq ($(CONFIG_TARGET_lantiq_falcon),y) @@ -404,14 +423,9 @@ $(eval $(call lantiqTpLink,TDW8970,TD-W8970v1)) $(eval $(call lantiqTpLink,TDW8980,TD-W8980v1)) $(eval $(call lantiqTpLink,VR200v,ArcherVR200V)) $(eval $(call lantiqImage,VGV7510KW22NOR)) - -Image/BuildKernel/Profile/VGV7510KW22BRN=$(call Image/BuildKernel/Template,VGV7510KW22BRN,$(1)) -Image/Build/Profile/VGV7510KW22BRN=$(call Image/Build/$(1),$(1),VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7,$(1)) - +$(eval $(call lantiqBrnImage,VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7)) $(eval $(call lantiqImage,VGV7519NOR)) - -Image/BuildKernel/Profile/VGV7519BRN=$(call Image/BuildKernel/Template,VGV7519BRN,$(1)) -Image/Build/Profile/VGV7519BRN=$(call Image/Build/$(1),$(1),VGV7519BRN,5D00008000,0x12345678,0x2083b8ed,$(1)) +$(eval $(call lantiqBrnImage,VGV7519BRN,5D00008000,0x12345678,0x2083b8ed)) define Image/Prepare $(call Image/Prepare/Profile,$(PROFILE)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hkallweit1 at gmail.com Sun Apr 24 11:58:21 2016 From: hkallweit1 at gmail.com (Heiner Kallweit) Date: Sun, 24 Apr 2016 17:58:21 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: simplify patch 613 and add missing error handling Message-ID: <571CED1D.2000400@gmail.com> Dynamic allocation of label can be simplified. Also add error handling to deal with failed memory allocation. Signed-off-by: Heiner Kallweit --- .../613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch | 6 +++--- .../613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch b/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch index a832bf8..e8bbe44 100644 --- a/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch +++ b/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch @@ -18,12 +18,12 @@ +static int ath79_request_ext_lna_gpio(unsigned chain, int gpio) +{ -+ char buf[32]; + char *label; + int err; + -+ scnprintf(buf, sizeof(buf), "external LNA%u", chain); -+ label = kstrdup(buf, GFP_KERNEL); ++ label = kasprintf(GFP_KERNEL, "external LNA%u", chain); ++ if (!label) ++ return -ENOMEM; + + err = gpio_request_one(gpio, GPIOF_DIR_OUT | GPIOF_INIT_LOW, label); + if (err) { diff --git a/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch b/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch index a832bf8..e8bbe44 100644 --- a/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch +++ b/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch @@ -18,12 +18,12 @@ +static int ath79_request_ext_lna_gpio(unsigned chain, int gpio) +{ -+ char buf[32]; + char *label; + int err; + -+ scnprintf(buf, sizeof(buf), "external LNA%u", chain); -+ label = kstrdup(buf, GFP_KERNEL); ++ label = kasprintf(GFP_KERNEL, "external LNA%u", chain); ++ if (!label) ++ return -ENOMEM; + + err = gpio_request_one(gpio, GPIOF_DIR_OUT | GPIOF_INIT_LOW, label); + if (err) { -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 24 12:24:59 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 24 Apr 2016 18:24:59 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: fix brnImage build In-Reply-To: <1461307150-3806-1-git-send-email-openwrt@kresin.me> References: <1461307150-3806-1-git-send-email-openwrt@kresin.me> Message-ID: <571CF35B.7060700@hauke-m.de> On 04/22/2016 08:39 AM, Mathias Kresin wrote: > Use the kernel with the appended dtb as base, otherwise the kernel will > panic with "no dtb found". > > Signed-off-by: Mathias Kresin > --- > target/linux/lantiq/image/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile > index c3cb48a..e63c134 100644 > --- a/target/linux/lantiq/image/Makefile > +++ b/target/linux/lantiq/image/Makefile > @@ -37,7 +37,7 @@ define PatchKernelLzma > endef > > define MkBrnImage > - mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) > + mkbrncmdline -i $(KDIR)/vmlinux-$(5).tmp -o $(KDIR)/vmlinux-$(5)-brn BRN-BOOT $(7) > $(call CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma) > mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma $(KDIR)/root.$(6) > endef > Thanks for finding this. I think it should be better to rename this in PatchKernelLzma to the old name so we are sure the old code still works. Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Sun Apr 24 12:55:42 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Mon, 25 Apr 2016 01:55:42 +0900 Subject: [OpenWrt-Devel] [PATCHv4] ramips: add support for Planex MZK-EX300NP In-Reply-To: <44c841f7-6393-25a1-4730-ab263f1b34c0@phrozen.org> References: <44c841f7-6393-25a1-4730-ab263f1b34c0@phrozen.org> Message-ID: <1461516942-27461-1-git-send-email-tochiro.srchack@gmail.com> MZK-EX300NP is MT7620A based wifi repeater. Built-in power supply. 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. Signed-off-by: YuheiOKAWA --- Changes in v3: - rebase - change an line in 01_leds and 02_network - change gpio in dts target/linux/ramips/base-files/etc/board.d/01_leds | 3 +- .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MZK-EX300NP.dts | 132 +++++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 2 + target/linux/ramips/mt7620/profiles/planex.mk | 12 ++ 8 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/MZK-EX300NP.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..3ab5f7f 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -118,7 +118,8 @@ dir-615-h1) ucidef_set_led_default "status" "Status LED (amber)" "$board:amber:status" "0" set_wifi_led "rt2800pci-phy0::radio" ;; -dir-620-d1) +dir-620-d1|\ +mzk-ex300np) set_wifi_led "$board:green:wifi" ;; dir-810l|\ diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..c89b2a2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -162,6 +162,7 @@ ramips_setup_interfaces() ;; d105|\ hpm|\ + mzk-ex300np|\ na930|\ wli-tx4-ag300n|\ wrh-300cr) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..0eda084 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -154,6 +154,7 @@ get_status_led() { whr-600d) status_led="$board:orange:wifi" ;; + mzk-ex300np|\ rt-n10-plus|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..e17aa94 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -292,6 +292,9 @@ ramips_board_detect() { *"MZK-DP150N") name="mzk-dp150n" ;; + *"MZK-EX300NP") + name="mzk-ex300np" + ;; *"MZK-W300NH2"*) name="mzk-w300nh2" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..c0ee14e 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -88,6 +88,7 @@ platform_check_image() { mt7628|\ mzk-750dhp|\ mzk-dp150n|\ + mzk-ex300np|\ mzk-w300nh2|\ mzk-wdpr|\ nbg-419n|\ diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts b/target/linux/ramips/dts/MZK-EX300NP.dts new file mode 100644 index 0000000..fd5c5cd --- /dev/null +++ b/target/linux/ramips/dts/MZK-EX300NP.dts @@ -0,0 +1,132 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "Planex MZK-EX300NP"; + + palmbus at 10000000 { + gpio1: gpio at 638 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x730000>; + }; + + partition at 780000 { + label = "Udata"; + reg = <0x780000 0x80000>; + }; + }; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "spi refclk", "rgmii1", "wled"; + ralink,function = "gpio"; + }; + }; + }; + + ethernet at 10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wifi { + label = "mzk-ex300np:green:wifi"; + gpios = <&gpio3 0 1>; + }; + + wps { + label = "mzk-ex300np:green:wps"; + gpios = <&gpio1 5 1>; + }; + + rep { + label = "mzk-ex300np:blue:rep"; + gpios = <&gpio1 4 1>; + }; + + wifi1 { + label = "mzk-ex300np:blue:wifi1"; + gpios = <&gpio1 1 1>; + }; + + wifi2 { + label = "mzk-ex300np:blue:wifi2"; + gpios = <&gpio1 2 1>; + }; + + wifi3 { + label = "mzk-ex300np:blue:wifi3"; + gpios = <&gpio1 0 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 1 1>; + linux,code = <0x198>; + }; + + wps { + label = "wps"; + gpios = <&gpio1 3 0>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index c76e98e..2ff32c4 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -100,6 +100,7 @@ na930_mtd_size=20971520 Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930,$(na930_mtd_size)) Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) +Image/Build/Profile/MZK-EX300NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) Image/Build/Profile/HC5761=$(call BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) Image/Build/Profile/HC5861=$(call BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) @@ -145,6 +146,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/WHR1166D,$(1)) $(call Image/Build/Profile/DB-WRT01,$(1)) $(call Image/Build/Profile/MZK-750DHP,$(1)) + $(call Image/Build/Profile/MZK-EX300NP,$(1)) $(call Image/Build/Profile/NA930,$(1)) $(call Image/Build/Profile/HC5661,$(1)) $(call Image/Build/Profile/HC5761,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk index f6f2cf1..e5ea6ed 100644 --- a/target/linux/ramips/mt7620/profiles/planex.mk +++ b/target/linux/ramips/mt7620/profiles/planex.mk @@ -14,3 +14,15 @@ define Profile/MZK-750DHP/Description Package set optimized for the Planex MZK-750DHP. endef $(eval $(call Profile,MZK-750DHP)) + + +define Profile/MZK-EX300NP + NAME:=Planex MZK-EX300NP + PACKAGES:= +endef + +define Profile/MZK-EX300NP/Description + Package set optimized for the Planex MZK-EX300NP. +endef +$(eval $(call Profile,MZK-EX300NP)) + -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 24 13:09:55 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 24 Apr 2016 19:09:55 +0200 Subject: [OpenWrt-Devel] undefined reference while building In-Reply-To: References: Message-ID: <571CFDE3.2090800@hauke-m.de> > Never mind. After a few more test and fresh git clones it seems I have > a more general build failure. Basically any host utill with makedev, > major or minor in it is dying. I don't understand why. > > Is this a gcc 5.x thing? I updated my system recently. ...... > '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2' > CHK include/version.h > LD mkfs.jffs2 > mkfs.jffs2.c:944: error: undefined reference to 'major' > mkfs.jffs2.c:944: error: undefined reference to 'minor' > mkfs.jffs2.c:1263: error: undefined reference to 'minor' > mkfs.jffs2.c:1263: error: undefined reference to 'major' > mkfs.jffs2.c:1273: error: undefined reference to 'minor' > mkfs.jffs2.c:1273: error: undefined reference to 'major' > mkfs.jffs2.c:503: error: undefined reference to 'makedev' > mkfs.jffs2.c:467: error: undefined reference to 'makedev' > mkfs.jffs2.c:510: error: undefined reference to 'makedev' > collect2: error: ld returned 1 exit status > common.mk:80: recipe for target Hi, what Linux distribution are you using? What libc are you using? makedev and co. are some more specific functions, but they should be provided by your libc: http://man7.org/linux/man-pages/man3/major.3.html Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Sun Apr 24 13:12:01 2016 From: weedy2887 at gmail.com (Weedy) Date: Sun, 24 Apr 2016 13:12:01 -0400 Subject: [OpenWrt-Devel] undefined reference while building In-Reply-To: <571CFDE3.2090800@hauke-m.de> References: <571CFDE3.2090800@hauke-m.de> Message-ID: On 24 Apr 2016 1:09 pm, "Hauke Mehrtens" wrote: > > > Never mind. After a few more test and fresh git clones it seems I have > > a more general build failure. Basically any host utill with makedev, > > major or minor in it is dying. I don't understand why. > > > > Is this a gcc 5.x thing? I updated my system recently. > > ...... > > > '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2' > > CHK include/version.h > > LD mkfs.jffs2 > > mkfs.jffs2.c:944: error: undefined reference to 'major' > > mkfs.jffs2.c:944: error: undefined reference to 'minor' > > mkfs.jffs2.c:1263: error: undefined reference to 'minor' > > mkfs.jffs2.c:1263: error: undefined reference to 'major' > > mkfs.jffs2.c:1273: error: undefined reference to 'minor' > > mkfs.jffs2.c:1273: error: undefined reference to 'major' > > mkfs.jffs2.c:503: error: undefined reference to 'makedev' > > mkfs.jffs2.c:467: error: undefined reference to 'makedev' > > mkfs.jffs2.c:510: error: undefined reference to 'makedev' > > collect2: error: ld returned 1 exit status > > common.mk:80: recipe for target > > > Hi, > > what Linux distribution are you using? What libc are you using? > > makedev and co. are some more specific functions, but they should be > provided by your libc: > http://man7.org/linux/man-pages/man3/major.3.html > > Hauke Gentoo, glibc 2.23 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 24 13:31:24 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 24 Apr 2016 19:31:24 +0200 Subject: [OpenWrt-Devel] [PATCH] mtd-utils: fix build with glibc >= 2.23 Message-ID: <1461519084-14693-1-git-send-email-hauke@hauke-m.de> In glibc 2.23 sys/types.h does not include sys/sysmacros.h any more, this causes a build failure. To prevent this include in manually. Reported-by: Weedy Signed-off-by: Hauke Mehrtens --- tools/mtd-utils/patches/120-makedev.patch | 10 ++++++++++ tools/mtd-utils/patches/130-lzma_jffs2.patch | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tools/mtd-utils/patches/120-makedev.patch diff --git a/tools/mtd-utils/patches/120-makedev.patch b/tools/mtd-utils/patches/120-makedev.patch new file mode 100644 index 0000000..0412669 --- /dev/null +++ b/tools/mtd-utils/patches/120-makedev.patch @@ -0,0 +1,10 @@ +--- a/mkfs.jffs2.c ++++ b/mkfs.jffs2.c +@@ -50,6 +50,7 @@ + #define PROGRAM_NAME "mkfs.jffs2" + + #include ++#include + #include + #include + #include diff --git a/tools/mtd-utils/patches/130-lzma_jffs2.patch b/tools/mtd-utils/patches/130-lzma_jffs2.patch index b04f019..0d88c88 100644 --- a/tools/mtd-utils/patches/130-lzma_jffs2.patch +++ b/tools/mtd-utils/patches/130-lzma_jffs2.patch @@ -5012,7 +5012,7 @@ +} --- a/mkfs.jffs2.c +++ b/mkfs.jffs2.c -@@ -1659,11 +1659,11 @@ int main(int argc, char **argv) +@@ -1660,11 +1660,11 @@ int main(int argc, char **argv) } erase_block_size *= units; -- 2.8.0.rc3 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 24 13:32:11 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 24 Apr 2016 19:32:11 +0200 Subject: [OpenWrt-Devel] undefined reference while building In-Reply-To: References: <571CFDE3.2090800@hauke-m.de> Message-ID: <571D031B.60307@hauke-m.de> On 04/24/2016 07:12 PM, Weedy wrote: > > On 24 Apr 2016 1:09 pm, "Hauke Mehrtens" > wrote: >> >> > Never mind. After a few more test and fresh git clones it seems I have >> > a more general build failure. Basically any host utill with makedev, >> > major or minor in it is dying. I don't understand why. >> > >> > Is this a gcc 5.x thing? I updated my system recently. >> >> ...... >> >> > '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2' >> > CHK include/version.h >> > LD mkfs.jffs2 >> > mkfs.jffs2.c:944: error: undefined reference to 'major' >> > mkfs.jffs2.c:944: error: undefined reference to 'minor' >> > mkfs.jffs2.c:1263: error: undefined reference to 'minor' >> > mkfs.jffs2.c:1263: error: undefined reference to 'major' >> > mkfs.jffs2.c:1273: error: undefined reference to 'minor' >> > mkfs.jffs2.c:1273: error: undefined reference to 'major' >> > mkfs.jffs2.c:503: error: undefined reference to 'makedev' >> > mkfs.jffs2.c:467: error: undefined reference to 'makedev' >> > mkfs.jffs2.c:510: error: undefined reference to 'makedev' >> > collect2: error: ld returned 1 exit status >> > common.mk:80 : recipe for target >> >> >> Hi, >> >> what Linux distribution are you using? What libc are you using? >> >> makedev and co. are some more specific functions, but they should be >> provided by your libc: >> http://man7.org/linux/man-pages/man3/major.3.html >> >> Hauke > > Gentoo, glibc 2.23 > glibc 2.23 changed something and this is causes this build failure. See this issue for example: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cb0c6445bfe23a4d4714e15fc5baa6ecfacad25 Please try the patch I just send and report back. Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 24 13:35:21 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 24 Apr 2016 19:35:21 +0200 Subject: [OpenWrt-Devel] build: conditional dependencies in packages sharing the same source In-Reply-To: References: Message-ID: <571D03D9.2050303@hauke-m.de> On 04/24/2016 01:47 PM, Eyal Birger wrote: > Hi All, > > We've encountered an interesting behavior in the OpenWRT build system, on which > feedback would be appreciated: > > When building packages sharing the same source code, all packages > prerequisites seem to > be joined unconditionally, instead of each prerequisite depending on > the package that required > it. > > As an example: > > ppp-mod-pppoa shares its source code with the ppp package; > ppp-mod-pppoa depends on linux-atm; > as a result, ppp depends unconditionally on linux-atm. > > i.e. in the generated tmp/.packagedeps file, the following is generated: > > $(curdir)/ppp/compile += ... $(curdir)/linux-atm/compile ... > > And not: > > $(curdir)/ppp/compile += ... $(if > $(CONFIG_ppp-mod-pppoa),$(curdir)/linux-atm/compile) ... > > This results in unnecessary compilation dependencies. > > Is this behavior intentional? > > Best regards, > Eyal. Hi, When more than one package is build from one source, this is mostly done by building the source code once for all binaries and then only packaging the stuff into different packages. I assume that there is a build time dependency to atm in the ppp source. Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Sun Apr 24 13:40:29 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Sun, 24 Apr 2016 19:40:29 +0200 Subject: [OpenWrt-Devel] [PATCH] ubox: make system log support as a selectable option In-Reply-To: <01000154403dda13-2aec5e01-72d9-4975-800e-6aec1bac2a29-000000@email.amazonses.com> References: <01000154403dda13-2aec5e01-72d9-4975-800e-6aec1bac2a29-000000@email.amazonses.com> Message-ID: <571D050D.6090202@hauke-m.de> On 04/23/2016 01:11 AM, Andrej Vlasic wrote: > Currently system log is always included as a part of ubox. > Add a config option to optionally exclude system log from ubox package. > > Signed-off-by: Andrej Vlasic > --- > package/system/ubox/Makefile | 20 ++++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile > index b32c794..70a9273 100644 > --- a/package/system/ubox/Makefile > +++ b/package/system/ubox/Makefile > @@ -26,13 +26,29 @@ define Package/ubox > CATEGORY:=Base system > DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt > TITLE:=OpenWrt system helper toolbox > + MENU:=1 > +endef > + > +define Package/ubox/config > +config UBOX_LOGD > + bool > + default y > + depends on PACKAGE_ubox > + prompt "Include system log implementation" > + help > + Include system log implementation which is implemented as part of ubox project. > endef > > define Package/ubox/install > - $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ $(1)/etc/init.d/ > + $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ > > - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,logd,logread,validate_data} $(1)/sbin/ > + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/ > + ifeq ($(CONFIG_UBOX_LOGD),y) > + $(INSTALL_DIR) $(1)/etc/init.d/ > + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/ > $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log > + endif > + > $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib > > $(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod > Instead of making this a package option I think it would be better to have two packages. One named ubox and one named logd for example. Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ben.mulvihill at gmail.com Sun Apr 24 14:00:56 2016 From: ben.mulvihill at gmail.com (Ben Mulvihill) Date: Sun, 24 Apr 2016 20:00:56 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: uboot-envtools on BTHOMEHUBV3A Message-ID: <1461520856.10910.3.camel@merveille.lan> Generate fw_env.config for BTHOMEHUBV3A. Signed-off-by: Ben Mulvihill --- --- a/package/boot/uboot-envtools/files/lantiq 2016-04-24 17:39:13.800242670 +0200 +++ b/package/boot/uboot-envtools/files/lantiq 2016-04-24 17:38:23.778361298 +0200 @@ -20,6 +20,9 @@ GIGASX76X) BTHOMEHUBV2B) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" "1" ;; +BTHOMEHUBV3A) + ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1" + ;; P2812HNUF1) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1" ;; _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From eyal.birger at gmail.com Sun Apr 24 14:24:31 2016 From: eyal.birger at gmail.com (Eyal Birger) Date: Sun, 24 Apr 2016 21:24:31 +0300 Subject: [OpenWrt-Devel] build: conditional dependencies in packages sharing the same source In-Reply-To: <571D03D9.2050303@hauke-m.de> References: <571D03D9.2050303@hauke-m.de> Message-ID: On Sun, Apr 24, 2016 at 8:35 PM, Hauke Mehrtens wrote: > On 04/24/2016 01:47 PM, Eyal Birger wrote: >> Hi All, >> >> We've encountered an interesting behavior in the OpenWRT build system, on which >> feedback would be appreciated: >> >> When building packages sharing the same source code, all packages >> prerequisites seem to >> be joined unconditionally, instead of each prerequisite depending on >> the package that required >> it. >> >> As an example: >> >> ppp-mod-pppoa shares its source code with the ppp package; >> ppp-mod-pppoa depends on linux-atm; >> as a result, ppp depends unconditionally on linux-atm. >> >> i.e. in the generated tmp/.packagedeps file, the following is generated: >> >> $(curdir)/ppp/compile += ... $(curdir)/linux-atm/compile ... >> >> And not: >> >> $(curdir)/ppp/compile += ... $(if >> $(CONFIG_ppp-mod-pppoa),$(curdir)/linux-atm/compile) ... >> >> This results in unnecessary compilation dependencies. >> >> Is this behavior intentional? >> >> Best regards, >> Eyal. > > Hi, > > When more than one package is build from one source, this is mostly done > by building the source code once for all binaries and then only > packaging the stuff into different packages. I assume that there is a > build time dependency to atm in the ppp source. Thanks! that's interesting. In this particular case, there doesn't seem to be such a dependency, i.e. ppp builds fine without ppp-mod-pppoa and linux-atm (haven't tested all possible configurations though :)) But if there was a dependency, wouldn't it have been correct for it to be explicit in the ppp dependencies? (maybe if ppp-mod-pppoa got deprecated, ppp might break for no apparent reason...) Seems that the current behavior masks these subtleties; That's why I'm wondering if it is intentional, or if it should be changed, so that all dependencies must be defined exactly where they are needed. > > Hauke _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ben.mulvihill at gmail.com Sun Apr 24 15:29:39 2016 From: ben.mulvihill at gmail.com (Ben Mulvihill) Date: Sun, 24 Apr 2016 21:29:39 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A Message-ID: <1461526179.10910.6.camel@merveille.lan> Remove read-only flag on two partitions on BTHOMEHUBV3A: uboot-config - otherwise fw_setenv command cannot be used. ath9k-cal - so that ath9k calibration data can be copied to the partition on a newly installed board. Signed-off-by: Ben Mulvihill --- --- a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts 2016-04-24 17:30:44.117072962 +0200 +++ b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts 2016-04-24 17:30:08.483732762 +0200 @@ -61,12 +61,10 @@ partition at 64000 { label = "uboot-config"; reg = <0x64000 0x004000>; - read-only; }; ath9k_cal: partition at 68000 { label = "art-copy"; reg = <0x68000 0x004000>; - read-only; }; partition at 6c000 { label = "kernel"; _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Sun Apr 24 15:59:54 2016 From: me at ndoo.sg (Andrew Yong) Date: Mon, 25 Apr 2016 03:59:54 +0800 Subject: [OpenWrt-Devel] [PATCHv1] ramips: add support for SamKnows SK-WB8 Message-ID: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. Author: Andrew Yong Date: Mon Apr 25 03:27:43 2016 +0800 Initial support for SamKnows SK-WB8 Signed-off-by: Andrew Yong diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..df30085 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -241,6 +241,9 @@ rt-n14u) set_wifi_led "$board:blue:air" set_usb_led "$board:blue:usb" ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; tiny-ac) set_wifi_led "$board:orange:wifi" set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..3e876d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() pbr-m1|\ psg1208|\ sap-g3200u3|\ + sk-wb8|\ wf-2881|\ whr-300hp2|\ whr-600d|\ @@ -310,6 +311,9 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(mtd_get_mac_binary factory 32772) ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; tew-691gr) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..0997cc8 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -370,6 +370,9 @@ ramips_board_detect() { *"SAP-G3200U3") name="sap-g3200u3" ;; + *"SK-WB8") + name="sk-wb8" + ;; *"SL-R7205"*) name="sl-r7205" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..fcc1b79 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -109,6 +109,7 @@ platform_check_image() { rt-n56u|\ rut5xx|\ sap-g3200u3|\ + sk-wb8|\ sl-r7205|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..edd95ad --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,121 @@ +/dts-v1/; + +/include/ "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows SK-WB8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "twsz:green:wps"; + gpios = <&gpio1 46 1>; + }; + + usb { + label = "twsz:green:usb"; + gpios = <&gpio1 47 1>; + } + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 43 1>; + linux,code = <0x211>; + }; + label = "reset"; + gpios = <&gpio0 41 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; +}; \ No newline at end of file diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0af9596..3e2f7eb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -132,6 +132,12 @@ define Device/ubnt-erx endef TARGET_DEVICES += ubnt-erx +define Device/sk-wb8 + DTS := SK-WB8 + IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + # FIXME: is this still needed? define Image/Prepare #define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..efa4858 --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SK-WB8 Profile + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev +endef + +define Profile/SK-WB8/Description + Package set optimized for the SamKnows SK-WB8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Sun Apr 24 16:06:42 2016 From: me at ndoo.sg (Andrew Yong) Date: Mon, 25 Apr 2016 04:06:42 +0800 Subject: [OpenWrt-Devel] [PATCHv2] ramips: add support for SamKnows SK-WB8 Message-ID: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. Changes from v1: Fixed LED name in DTS. Initial support for SamKnows SK-WB8 Signed-off-by: Andrew Yong diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..df30085 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -241,6 +241,9 @@ rt-n14u) set_wifi_led "$board:blue:air" set_usb_led "$board:blue:usb" ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; tiny-ac) set_wifi_led "$board:orange:wifi" set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..3e876d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() pbr-m1|\ psg1208|\ sap-g3200u3|\ + sk-wb8|\ wf-2881|\ whr-300hp2|\ whr-600d|\ @@ -310,6 +311,9 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(mtd_get_mac_binary factory 32772) ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; tew-691gr) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..0997cc8 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -370,6 +370,9 @@ ramips_board_detect() { *"SAP-G3200U3") name="sap-g3200u3" ;; + *"SK-WB8") + name="sk-wb8" + ;; *"SL-R7205"*) name="sl-r7205" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..fcc1b79 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -109,6 +109,7 @@ platform_check_image() { rt-n56u|\ rut5xx|\ sap-g3200u3|\ + sk-wb8|\ sl-r7205|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..e783374 --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,121 @@ +/dts-v1/; + +/include/ "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows SK-WB8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 46 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 47 1>; + } + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 43 1>; + linux,code = <0x211>; + }; + label = "reset"; + gpios = <&gpio0 41 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0af9596..3e2f7eb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -132,6 +132,12 @@ define Device/ubnt-erx endef TARGET_DEVICES += ubnt-erx +define Device/sk-wb8 + DTS := SK-WB8 + IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + # FIXME: is this still needed? define Image/Prepare #define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..efa4858 --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SK-WB8 Profile + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev +endef + +define Profile/SK-WB8/Description + Package set optimized for the SamKnows SK-WB8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Sun Apr 24 20:46:50 2016 From: me at ndoo.sg (Andrew Yong) Date: Mon, 25 Apr 2016 08:46:50 +0800 Subject: [OpenWrt-Devel] [PATCHv3] ramips: add support for SamKnows SK-WB8 Message-ID: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit > poorly; 5GHz not working yet. Fixed in v3: - DTS: Syntax error fixed, LEDs and buttons mapped correctly now - diag.sh updated to blink WPS LED on boot - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset matches SamKnows firmware - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware Initial support for SamKnows SK-WB8 Signed-off-by: Andrew Yong diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..df30085 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -241,6 +241,9 @@ rt-n14u) set_wifi_led "$board:blue:air" set_usb_led "$board:blue:usb" ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; tiny-ac) set_wifi_led "$board:orange:wifi" set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..3e876d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() pbr-m1|\ psg1208|\ sap-g3200u3|\ + sk-wb8|\ wf-2881|\ whr-300hp2|\ whr-600d|\ @@ -310,6 +311,9 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(mtd_get_mac_binary factory 32772) ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; tew-691gr) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..0997cc8 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -370,6 +370,9 @@ ramips_board_detect() { *"SAP-G3200U3") name="sap-g3200u3" ;; + *"SK-WB8") + name="sk-wb8" + ;; *"SL-R7205"*) name="sl-r7205" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..fcc1b79 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -109,6 +109,7 @@ platform_check_image() { rt-n56u|\ rut5xx|\ sap-g3200u3|\ + sk-wb8|\ sl-r7205|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..ce25c7a --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,121 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows SK-WB8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 46 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 47 1>; + } + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 43 1>; + linux,code = <0x211>; + }; + label = "reset"; + gpios = <&gpio0 41 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0af9596..3e2f7eb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -132,6 +132,12 @@ define Device/ubnt-erx endef TARGET_DEVICES += ubnt-erx +define Device/sk-wb8 + DTS := SK-WB8 + IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + # FIXME: is this still needed? define Image/Prepare #define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..efa4858 --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SK-WB8 Profile + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev +endef + +define Profile/SK-WB8/Description + Package set optimized for the SamKnows SK-WB8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Sun Apr 24 21:05:24 2016 From: me at ndoo.sg (Andrew Yong) Date: Mon, 25 Apr 2016 09:05:24 +0800 Subject: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8 Message-ID: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. Fixed in v4: - I didn't commit some fixes in PATCHv3, that's fixed now - DTS: Syntax error fixed, LEDs and buttons mapped correctly now - diag.sh updated to blink WPS LED on boot - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset matches SamKnows firmware - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware Initial support for SamKnows SK-WB8 Signed-off-by: Andrew Yong diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..df30085 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -241,6 +241,9 @@ rt-n14u) set_wifi_led "$board:blue:air" set_usb_led "$board:blue:usb" ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; tiny-ac) set_wifi_led "$board:orange:wifi" set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..3e876d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() pbr-m1|\ psg1208|\ sap-g3200u3|\ + sk-wb8|\ wf-2881|\ whr-300hp2|\ whr-600d|\ @@ -310,6 +311,9 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(mtd_get_mac_binary factory 32772) ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; tew-691gr) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..a941fca 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -76,7 +76,8 @@ get_status_led() { ;; awapn2403|\ dir-645|\ - wrh-300cr) + wrh-300cr|\ + sk-wb8) status_led="$board:green:wps" ;; cf-wr800n|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..4f1bd41 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -370,6 +370,9 @@ ramips_board_detect() { *"SAP-G3200U3") name="sap-g3200u3" ;; + *"SamKnows Whitebox 8") + name="sk-wb8" + ;; *"SL-R7205"*) name="sl-r7205" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..fcc1b79 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -109,6 +109,7 @@ platform_check_image() { rt-n56u|\ rut5xx|\ sap-g3200u3|\ + sk-wb8|\ sl-r7205|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..3292194 --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,122 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows SK-WB8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 14 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 15 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 11 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio1 9 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0af9596..3e2f7eb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -132,6 +132,12 @@ define Device/ubnt-erx endef TARGET_DEVICES += ubnt-erx +define Device/sk-wb8 + DTS := SK-WB8 + IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + # FIXME: is this still needed? define Image/Prepare #define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..efa4858 --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SK-WB8 Profile + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev +endef + +define Profile/SK-WB8/Description + Package set optimized for the SamKnows SK-WB8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bittorf at bluebottle.com Mon Apr 25 02:54:19 2016 From: bittorf at bluebottle.com (Bastian Bittorf) Date: Mon, 25 Apr 2016 08:54:19 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: References: <56EB27A3.2010204@openwrt.org> <1461486291-8770-1-git-send-email-tim@tn-x.org> Message-ID: <20160425065419.GK8928@medion.lan> * John Crispin [25.04.2016 07:39]: > > The changed image name breaks compatibility for derived projects and > > that's something which should only happen if there is a really good > > reason (e.g. security fix). > > how does it beak compatibility ? I think they auto-download a preconfigured filename, which will ofcource not succeed. We circumvented this in our network-autoupdater in a way, that we download e.g. "$MODELNAME.bin" where $MODELNAME is from '/tmp/sysinfo/model' e.g. 'TP-Link TL-WDR4900 v1' and on the downloadserver we can "adjust" the symlinks... I'am against reverting the commit. Lets keep it, because it makes sense. Maybe i can give a short talk at Battlemesh v9 about proper autoupdates, because we have ~10 years experience in this (including 500 dead devices 8-))) bye, bastian _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 03:06:38 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 09:06:38 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: <20160425065419.GK8928@medion.lan> References: <56EB27A3.2010204@openwrt.org> <1461486291-8770-1-git-send-email-tim@tn-x.org> <20160425065419.GK8928@medion.lan> Message-ID: On 25/04/2016 08:54, Bastian Bittorf wrote: > * John Crispin [25.04.2016 07:39]: >>> The changed image name breaks compatibility for derived projects and >>> that's something which should only happen if there is a really good >>> reason (e.g. security fix). >> >> how does it beak compatibility ? > > I think they auto-download a preconfigured filename, > which will ofcource not succeed. We circumvented this in our > network-autoupdater in a way, that we download e.g. "$MODELNAME.bin" > where $MODELNAME is from '/tmp/sysinfo/model' e.g. 'TP-Link TL-WDR4900 v1' > and on the downloadserver we can "adjust" the symlinks... > > I'am against reverting the commit. Lets keep it, because it makes sense. > > Maybe i can give a short talk at Battlemesh v9 about proper autoupdates, > because we have ~10 years experience in this (including 500 dead devices > 8-))) > > bye, bastian > before i merged the patch i did actually look at the compat issue and concluded that only docs will be out of date, which is not really anything new. all issues mentioned are home made ones. specially the one bastian mentions here. basically fixing your download script and deploying it in this way will break forward compat as can be seen here. we now face the decision of reverting and unbreaking out of tree issues that can be fixed easily or avoided in future or not revert it and keep the fix that makes the filenames more consistent. adding the "n" is after all correct ad the antenna is not "not" detachable on the relevant models. John _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.engberg.lists at pyret.net Mon Apr 25 03:25:44 2016 From: daniel.engberg.lists at pyret.net (Daniel Engberg) Date: Mon, 25 Apr 2016 09:25:44 +0200 Subject: [OpenWrt-Devel] [PATCH v4] package/utils/usbutils: Update USB IDs list and drop gzip compression Message-ID: <571DC678.3090809@pyret.net> Change mirror to Github (Gentoo repo) and drop the gzip compression. Worst case there's about 4kbyte increase in size but most images ends up beign somewhere between 4-100kbyte smaller due to the lzma compression. Tested on ar71xx v2 Now contains the correct patch, sorry! v3 Turns out that the update-usbids.sh.in isn't executed at all... v4 Drop zlib dependency, pointed out by Hauke Mehrtens Signed-off-by: Daniel Engberg --- diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile index 9b5470a..dc57155 100644 --- a/package/utils/usbutils/Makefile +++ b/package/utils/usbutils/Makefile @@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usbutils PKG_VERSION:=007 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils PKG_MD5SUM:=a6bd63d5c44cebb717a960eae22a3ca9 -USB_IDS_VERSION:=2015-12-17 -USB_IDS_MD5SUM:=8c091fdcdbc4e8e60a518d0148b0dad3 -USB_IDS_FILE:=usb.ids.$(USB_IDS_VERSION).gz +USB_IDS_VERSION:=2016-03-03 +USB_IDS_MD5SUM:=273596b6ee101b1df454827cfa87dff8 +USB_IDS_FILE:=usb.ids PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -29,29 +29,31 @@ include $(INCLUDE_DIR)/package.mk define Package/usbutils SECTION:=utils CATEGORY:=Utilities - DEPENDS:=+libusb-1.0 +zlib +librt +libpthread + DEPENDS:=+libusb-1.0 +librt +libpthread TITLE:=USB devices listing utilities URL:=http://www.linux-usb.org/ endef define Download/usb_ids FILE:=$(USB_IDS_FILE) - URL:=http://projects.pyret.net/dump/openwrt/distfiles + URL:=https://raw.githubusercontent.com/gentoo/hwids/d9e840aa3d5cedf5637d59ef0dc555c380a0e822 MD5SUM:=$(USB_IDS_MD5SUM) endef $(eval $(call Download,usb_ids)) define Build/Prepare $(Build/Prepare/Default) - echo '#!/bin/sh' > $(PKG_BUILD_DIR)/update-usbids.sh.in - echo 'cp $(DL_DIR)/$(USB_IDS_FILE) usb.ids.gz' >> $(PKG_BUILD_DIR)/update-usbids.sh.in + $(CP) $(DL_DIR)/$(USB_IDS_FILE) $(PKG_BUILD_DIR) endef +CONFIGURE_ARGS += \ + --disable-zlib + define Package/usbutils/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/share - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/ endef $(eval $(call BuildPackage,usbutils)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Mon Apr 25 05:41:18 2016 From: weedy2887 at gmail.com (Weedy) Date: Mon, 25 Apr 2016 05:41:18 -0400 Subject: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat Message-ID: <571DE63E.2040405@gmail.com> With the update to glibc 2.23, sys/types.h doesn't inherit sys/sysmacros.h anymore. We need to include it manually. --- /dev/null 2016-04-18 05:53:30.273258717 -0400 +++ tools/make-ext4fs/patches/125-glibc-2.23-sysmacros.patch 2016-04-24 14:50:33.932873523 -0400 @@ -0,0 +1,10 @@ +--- a/ext4_utils.h 2016-04-24 14:47:50.207888150 -0400 ++++ b/ext4_utils.h 2016-04-24 14:48:11.761438966 -0400 +@@ -30,6 +30,7 @@ + #include + + #include ++#include + #include + #include + #include This is a test for my mail client. Please tell me if I need to change anything. I have patched the rest of the host packages this update broke. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ben.mulvihill at gmail.com Mon Apr 25 06:26:55 2016 From: ben.mulvihill at gmail.com (Ben Mulvihill) Date: Mon, 25 Apr 2016 12:26:55 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: use dwc2 by default on BTHOMEHUBV3A and WBMR Message-ID: <1461580015.10910.14.camel@merveille.lan> The dwc2 USB driver now works on Lantiq ar9, but the default is still ltq-hcd-ar9. This patch switches to dwc2 by default, on the two boards I can test, namely BTHOMEHUBV3A and WBMR. John, if you are happy with the principle of switching would you prefer me to send a patch covering all the ar9 boards? I presume that if one works then the others should too. Thanks, Ben Signed-off-by: Ben Mulvihill --- diff -uprN a/target/linux/lantiq/xway/profiles/bt.mk b/target/linux/lantiq/xway/profiles/bt.mk --- a/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 11:53:27.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 11:56:42.000000000 +0200 @@ -18,7 +18,7 @@ $(eval $(call Profile,BTHOMEHUBV2B)) define Profile/BTHOMEHUBV3A NAME:=BT Home Hub 3A - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ kmod-ltq-deu-ar9 \ diff -uprN a/target/linux/lantiq/xway/profiles/buffalo.mk b/target/linux/lantiq/xway/profiles/buffalo.mk --- a/target/linux/lantiq/xway/profiles/buffalo.mk 2016-04-25 11:53:27.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/buffalo.mk 2016-04-25 11:57:25.000000000 +0200 @@ -1,6 +1,6 @@ define Profile/WBMRA NAME:=Buffalo WBMR-HP-G300H (A) - WBMR - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ @@ -12,7 +12,7 @@ $(eval $(call Profile,WBMRA)) define Profile/WBMRB NAME:=Buffalo WBMR-HP-G300H (B) - WBMR - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 08:57:58 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 14:57:58 +0200 Subject: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: Message-ID: <8ee72329-9abb-2bfe-92e7-c6b189097c10@phrozen.org> Hi, few comments inline. apart from those 2 nitpicks the patch looks good. John On 25/04/2016 03:05, Andrew Yong wrote: > This patch adds support for the SamKnows version 8.0 Whitebox, built > around the MT7621 platform. 2.4GHz appears to be working, albeit > poorly; 5GHz not working yet. > > Fixed in v4: > - I didn't commit some fixes in PATCHv3, that's fixed now > - DTS: Syntax error fixed, LEDs and buttons mapped correctly now > - diag.sh updated to blink WPS LED on boot > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > matches SamKnows firmware > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > Initial support for SamKnows SK-WB8 > > Signed-off-by: Andrew Yong > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > b/target/linux/ramips/base-files/etc/board.d/01_leds > index e3b8500..df30085 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -241,6 +241,9 @@ rt-n14u) > set_wifi_led "$board:blue:air" > set_usb_led "$board:blue:usb" > ;; > +sk-wb8) > + set_usb_led "$board:green:usb" > + ;; > tiny-ac) > set_wifi_led "$board:orange:wifi" > set_usb_led "$board:green:usb" > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > index 3c958ae..3e876d2 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > pbr-m1|\ > psg1208|\ > sap-g3200u3|\ > + sk-wb8|\ > wf-2881|\ > whr-300hp2|\ > whr-600d|\ > @@ -310,6 +311,9 @@ ramips_setup_macs() > lan_mac=$(macaddr_setbit_la "$lan_mac") > wan_mac=$(mtd_get_mac_binary factory 32772) > ;; > + sk-wb8) > + wan_mac=$(mtd_get_mac_binary factory 57350) > + ;; > tew-691gr) > lan_mac=$(cat /sys/class/net/eth0/address) > wan_mac=$(macaddr_add "$lan_mac" 3) > diff --git a/target/linux/ramips/base-files/etc/diag.sh > b/target/linux/ramips/base-files/etc/diag.sh > index bd0ff05..a941fca 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -76,7 +76,8 @@ get_status_led() { > ;; > awapn2403|\ > dir-645|\ > - wrh-300cr) > + wrh-300cr|\ > + sk-wb8) alphabetic ordering please > status_led="$board:green:wps" > ;; > cf-wr800n|\ > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > index 550ec55..4f1bd41 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -370,6 +370,9 @@ ramips_board_detect() { > *"SAP-G3200U3") > name="sap-g3200u3" > ;; > + *"SamKnows Whitebox 8") > + name="sk-wb8" > + ;; alphabetic ordering please > *"SL-R7205"*) > name="sl-r7205" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index 73ba6e6..fcc1b79 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -109,6 +109,7 @@ platform_check_image() { > rt-n56u|\ > rut5xx|\ > sap-g3200u3|\ > + sk-wb8|\ > sl-r7205|\ > tew-691gr|\ > tew-692gr|\ > diff --git a/target/linux/ramips/dts/SK-WB8.dts > b/target/linux/ramips/dts/SK-WB8.dts > new file mode 100644 > index 0000000..3292194 > --- /dev/null > +++ b/target/linux/ramips/dts/SK-WB8.dts > @@ -0,0 +1,122 @@ > +/dts-v1/; > + > +#include "mt7621.dtsi" > + > +/ { > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > + model = "SamKnows SK-WB8"; > + > + memory at 0 { > + device_type = "memory"; > + reg = <0x0 0x4000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,57600"; > + }; > + > + palmbus at 1E000000 { > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "mx25l6405d"; > + reg = <0 0>; > + linux,modalias = "m25p80"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + read-only; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x7b0000>; > + }; > + > + }; > + }; > + }; > + > + pcie at 1e140000 { > + status = "okay"; > + > + pcie0 { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + > + pcie1 { > + mt76 at 1,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x0000>; > + mediatek,5ghz = <0>; > + }; > + }; > + }; > + > + ethernet at 1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + wps { > + label = "sk-wb8:green:wps"; > + gpios = <&gpio1 14 1>; > + }; > + > + usb { > + label = "sk-wb8:green:usb"; > + gpios = <&gpio1 15 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + wps { > + label = "wps"; > + gpios = <&gpio1 11 1>; > + linux,code = <0x211>; > + }; > + reset { > + label = "reset"; > + gpios = <&gpio1 9 1>; > + linux,code = <0x198>; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "i2c", "uart2", > "uart3", "rgmii2", "sdhci"; > + ralink,function = "gpio"; > + }; > + }; > + }; > +}; > diff --git a/target/linux/ramips/image/mt7621.mk > b/target/linux/ramips/image/mt7621.mk > index 0af9596..3e2f7eb 100644 > --- a/target/linux/ramips/image/mt7621.mk > +++ b/target/linux/ramips/image/mt7621.mk > @@ -132,6 +132,12 @@ define Device/ubnt-erx > endef > TARGET_DEVICES += ubnt-erx > > +define Device/sk-wb8 > + DTS := SK-WB8 > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > +endef > +TARGET_DEVICES += sk-wb8 > + > # FIXME: is this still needed? > define Image/Prepare > #define Build/Compile > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk > b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > new file mode 100644 > index 0000000..efa4858 > --- /dev/null > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > @@ -0,0 +1,18 @@ > +# > +# Copyright (C) 2015 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/SK-WB8 > + NAME:=SK-WB8 Profile > + PACKAGES:=\ > + kmod-usb-core kmod-usb3 \ > + kmod-ledtrig-usbdev > +endef > + > +define Profile/SK-WB8/Description > + Package set optimized for the SamKnows SK-WB8. > +endef > +$(eval $(call Profile,SK-WB8)) > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 09:00:49 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 15:00:49 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A In-Reply-To: <1461526179.10910.6.camel@merveille.lan> References: <1461526179.10910.6.camel@merveille.lan> Message-ID: <95995f6d-efa9-edbb-7a85-67320d226162@phrozen.org> On 24/04/2016 21:29, Ben Mulvihill wrote: > Remove read-only flag on two partitions on BTHOMEHUBV3A: > uboot-config - otherwise fw_setenv command cannot be used. > ath9k-cal - so that ath9k calibration data can be copied > to the partition on a newly installed board. > > Signed-off-by: Ben Mulvihill > --- > --- a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts 2016-04-24 17:30:44.117072962 +0200 > +++ b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts 2016-04-24 17:30:08.483732762 +0200 > @@ -61,12 +61,10 @@ > partition at 64000 { > label = "uboot-config"; > reg = <0x64000 0x004000>; > - read-only; > }; > ath9k_cal: partition at 68000 { > label = "art-copy"; > reg = <0x68000 0x004000>; > - read-only; > }; is this not a bit risky ? normally we try to keep them read-only so that users cannot accidentally kill them. is the calib data normally not located in the art partition or why do you need to copy it after flashing ? > partition at 6c000 { > label = "kernel"; > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 09:06:57 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 15:06:57 +0200 Subject: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat In-Reply-To: <571DE63E.2040405@gmail.com> References: <571DE63E.2040405@gmail.com> Message-ID: On 25/04/2016 11:41, Weedy wrote: > With the update to glibc 2.23, sys/types.h doesn't inherit > sys/sysmacros.h anymore. We need to include it manually. > > > --- /dev/null 2016-04-18 05:53:30.273258717 -0400 > +++ tools/make-ext4fs/patches/125-glibc-2.23-sysmacros.patch 2016-04-24 > 14:50:33.932873523 -0400 > @@ -0,0 +1,10 @@ > +--- a/ext4_utils.h 2016-04-24 14:47:50.207888150 -0400 > ++++ b/ext4_utils.h 2016-04-24 14:48:11.761438966 -0400 > +@@ -30,6 +30,7 @@ > + #include > + > + #include > ++#include > + #include > + #include > + #include > > > This is a test for my mail client. > Please tell me if I need to change anything. > I have patched the rest of the host packages this update broke. > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > patchwork failed to pick this up i am afraid... _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Mon Apr 25 09:08:55 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Mon, 25 Apr 2016 15:08:55 +0200 Subject: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat In-Reply-To: <571DE63E.2040405@gmail.com> References: <571DE63E.2040405@gmail.com> Message-ID: <571E16E7.9050007@openwrt.org> Hi! Thanks for the patch, I fixed the include issue directly in Git, so this patch can be dropped and make-ext4fs should be updated in tools/ to a newer version instead. ~ Jo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 09:11:10 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 15:11:10 +0200 Subject: [OpenWrt-Devel] [RFC] ramips: fix bad patch awake rt305x USB controller In-Reply-To: <5056501461383729@web4o.yandex.ru> References: <5056501461383729@web4o.yandex.ru> Message-ID: <63695107-92df-da04-a653-c5720e0b2557@phrozen.org> Hi, i dont see why this is needed.the patch in the tree does not look broken and seems to compile fine. John On 23/04/2016 05:55, ?????? ????????? wrote: > Sorry, fix bad patch (ticket #22248) > > Signed-Off-By: Serge Vasilugin > > diff --git a/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch b/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch > index 9608f6f..2ba462d 100644 > --- a/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch > +++ b/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch > @@ -1,15 +1,15 @@ > --- a/drivers/usb/dwc2/platform.c > +++ b/drivers/usb/dwc2/platform.c > @@ -375,6 +375,12 @@ static int dwc2_driver_probe(struct plat > - dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", > - (unsigned long)res->start, hsotg->regs); > + dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n", > + (unsigned long)res->start, hsotg->regs); > > -+ /* Enable USB port before any regs access */ > -+ if(dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) { > -+ dwc2_writel(0x00, hsotg->regs + PCGCTL); > -+ /* TODO: mdelay(25) here? vendor driver don't use it */ > -+ } > ++ /* Enable USB port before any regs access */ > ++ if(dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) { > ++ dwc2_writel(0x00, hsotg->regs + PCGCTL); > ++ /* TODO: mdelay(25) here? vendor driver don't use it */ > ++ } > + > - hsotg->dr_mode = usb_get_dr_mode(&dev->dev); > - if (IS_ENABLED(CONFIG_USB_DWC2_HOST) && > - hsotg->dr_mode != USB_DR_MODE_HOST) { > + hsotg->dr_mode = usb_get_dr_mode(&dev->dev); > + if (IS_ENABLED(CONFIG_USB_DWC2_HOST) && > + hsotg->dr_mode != USB_DR_MODE_HOST) { > > --- > serge > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 09:14:31 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 15:14:31 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed. In-Reply-To: <836fa2b97c0278e82b40b82424d24f42@vittgam.net> References: <5719C601.5020906@kresin.me> <836fa2b97c0278e82b40b82424d24f42@vittgam.net> Message-ID: <713f61da-42b4-a63b-1248-26d20010978a@phrozen.org> On 22/04/2016 09:13, Vittorio G (VittGam) wrote: > On 22/04/2016 08:34:41 CEST, Mathias Kresin wrote: >> Am 21.04.2016 um 23:43 schrieb Vittorio Gambaletta (VittGam): >>> After recent patches, the status LED on this router would stay >>> switched off after boot is completed. A switched off status LED >>> often indicates a boot failure (eg. kernel panic), so fix this and >>> get back to the previous behaviour. >> >> NAK >> >> This change was intentional. Personally, I don't like the idea of >> using the WPS led as permanent (running) status led. I've never tried >> it, but I may be possible to use WPS with hostapd and show the status >> of the WPS action using the WPS led. I like to prevent such a double >> use of leds. > > Well, personally I think that the WPS LED on this router should be used > as a "permanent" system status LED, since the power LED is hardwired to > the power supply, and there is no other status LED to be used. Since the > WPS LED is unused by default on OpenWrt, I think it's better to use it > as full system status LED, to avoid "dying" visually on first boot when > no DSL or Wi-Fi is configured. This is the same behaviour we have on the > TP-LINK MR3020 for example: the System LED in OpenWrt (which stays on > after boot) corresponds to the WPS LED as it was used in the original > firmware. > > Also, if things haven't changed, you need to write custom scripts to use > the WPS LED to indicate WPS status. And if you do customize your OpenWrt > install with such scripts, and you want the LED to default to off > instead of on when WPS is not being used, you can just add a section for > the WPS LED in /etc/config/system with "option trigger 'none'" and > "option default '0'" to have it switch off after boot is finished. > >> The basic idea was to let the WPS led blink as long as the device >> boots and switch it off at the time the boot has finished. Which means >> an unsuccessful boot is indicated by a still blinking WPS led. > > Nope. If there is a kernel panic, all the GPIO LEDs will stop blinking > and get switched off. At least when it happened to me it was like this, > but it was some years ago so I might not remember well (or maybe things > have changed and the kernel does not stop hardware-assisted LED blinking > on panic i understand the problem, but the WPS led is for WPS and should be left free for the WPS feature eventually. so nack on this one i am afraid. John _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 09:17:47 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 15:17:47 +0200 Subject: [OpenWrt-Devel] [PATCH] [scripts] avoid hard-coded path in sha-bang In-Reply-To: <1461315997-12107-1-git-send-email-e196819@hotmail.com> References: <1461315997-12107-1-git-send-email-e196819@hotmail.com> Message-ID: <41b6236a-cf88-e180-bc5e-55408dec17c7@phrozen.org> please avoid using slang words and add "scripts:" as a subject prefix On 22/04/2016 11:06, Iblis Lin wrote: > Signed-off-by: Iblis Lin > --- > scripts/brcmImage.pl | 2 +- > scripts/deptest.sh | 2 +- > scripts/feeds | 2 +- > scripts/mkits.sh | 2 +- > scripts/pad_image | 2 +- > scripts/redboot-script.pl | 2 +- > scripts/remote-gdb | 2 +- > 7 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/scripts/brcmImage.pl b/scripts/brcmImage.pl > index 9a3acb4..60a59f2 100755 > --- a/scripts/brcmImage.pl > +++ b/scripts/brcmImage.pl > @@ -1,4 +1,4 @@ > -#!/usr/bin/perl > +#!/usr/bin/env perl > # > # Copyright (C) 2009 Henk Vergonet > # > diff --git a/scripts/deptest.sh b/scripts/deptest.sh > index 047a0ce..03da9f5 100755 > --- a/scripts/deptest.sh > +++ b/scripts/deptest.sh > @@ -1,4 +1,4 @@ > -#!/bin/bash > +#!/usr/bin/env bash > # > # Automated OpenWrt package dependency checker > # > diff --git a/scripts/feeds b/scripts/feeds > index 79b5284..2b88eb8 100755 > --- a/scripts/feeds > +++ b/scripts/feeds > @@ -1,4 +1,4 @@ > -#!/usr/bin/perl > +#!/usr/bin/env perl > use Getopt::Std; > use FindBin; > use Cwd; > diff --git a/scripts/mkits.sh b/scripts/mkits.sh > index 6b5100e..8857996 100755 > --- a/scripts/mkits.sh > +++ b/scripts/mkits.sh > @@ -1,4 +1,4 @@ > -#!/bin/bash > +#!/usr/bin/env bash > # > # Licensed under the terms of the GNU GPL License version 2 or later. > # > diff --git a/scripts/pad_image b/scripts/pad_image > index 14f1499..b1941a2 100755 > --- a/scripts/pad_image > +++ b/scripts/pad_image > @@ -1,4 +1,4 @@ > -#!/bin/bash > +#!/usr/bin/env bash > > function usage { > echo "Usage: prepare_image image_type kernel_image rootfs_image header_size" > diff --git a/scripts/redboot-script.pl b/scripts/redboot-script.pl > index 123ebe3..e2d1264 100755 > --- a/scripts/redboot-script.pl > +++ b/scripts/redboot-script.pl > @@ -1,4 +1,4 @@ > -#!/usr/bin/perl > +#!/usr/bin/env perl > # > # Script for generating redboot configs, based on brcmImage.pl > # > diff --git a/scripts/remote-gdb b/scripts/remote-gdb > index cd59033..5230663 100755 > --- a/scripts/remote-gdb > +++ b/scripts/remote-gdb > @@ -1,4 +1,4 @@ > -#!/usr/bin/perl > +#!/usr/bin/env perl > > use strict; > use warnings; > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Mon Apr 25 09:18:44 2016 From: me at ndoo.sg (Andrew Yong) Date: Mon, 25 Apr 2016 21:18:44 +0800 Subject: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8 In-Reply-To: <8ee72329-9abb-2bfe-92e7-c6b189097c10@phrozen.org> References: <8ee72329-9abb-2bfe-92e7-c6b189097c10@phrozen.org> Message-ID: I have just found out that I need to perform this additional step on this SamKnows Whitebox 8 every boot: /usr/sbin/fw_setenv bootcount 0 Where would be an appropriate place to put this? I could add (yet another) init script in ./target/linux/ramips/base-files/etc/init.d with START=99 (this is how SamKnows does it) and add a check against $(ramips_board_name). Without this, SamKnows' custom u-boot will attempt to boot from a backup partition after bootcount exceeds 3 (3 "failed" boots). For an end-user without TTL serial access, it would be a soft brick. I'm cleaning up the rest of the patches, fixed some minor gpio mis-definitions and testing out some wifi fixes before I do a v5. On 25 Apr 2016 20:58, "John Crispin" wrote: Hi, few comments inline. apart from those 2 nitpicks the patch looks good. John On 25/04/2016 03:05, Andrew Yong wrote: > This patch adds support for the SamKnows version 8.0 Whitebox, built > around the MT7621 platform. 2.4GHz appears to be working, albeit > poorly; 5GHz not working yet. > > Fixed in v4: > - I didn't commit some fixes in PATCHv3, that's fixed now > - DTS: Syntax error fixed, LEDs and buttons mapped correctly now > - diag.sh updated to blink WPS LED on boot > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > matches SamKnows firmware > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > Initial support for SamKnows SK-WB8 > > Signed-off-by: Andrew Yong > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > b/target/linux/ramips/base-files/etc/board.d/01_leds > index e3b8500..df30085 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -241,6 +241,9 @@ rt-n14u) > set_wifi_led "$board:blue:air" > set_usb_led "$board:blue:usb" > ;; > +sk-wb8) > + set_usb_led "$board:green:usb" > + ;; > tiny-ac) > set_wifi_led "$board:orange:wifi" > set_usb_led "$board:green:usb" > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > index 3c958ae..3e876d2 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > pbr-m1|\ > psg1208|\ > sap-g3200u3|\ > + sk-wb8|\ > wf-2881|\ > whr-300hp2|\ > whr-600d|\ > @@ -310,6 +311,9 @@ ramips_setup_macs() > lan_mac=$(macaddr_setbit_la "$lan_mac") > wan_mac=$(mtd_get_mac_binary factory 32772) > ;; > + sk-wb8) > + wan_mac=$(mtd_get_mac_binary factory 57350) > + ;; > tew-691gr) > lan_mac=$(cat /sys/class/net/eth0/address) > wan_mac=$(macaddr_add "$lan_mac" 3) > diff --git a/target/linux/ramips/base-files/etc/diag.sh > b/target/linux/ramips/base-files/etc/diag.sh > index bd0ff05..a941fca 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -76,7 +76,8 @@ get_status_led() { > ;; > awapn2403|\ > dir-645|\ > - wrh-300cr) > + wrh-300cr|\ > + sk-wb8) alphabetic ordering please > status_led="$board:green:wps" > ;; > cf-wr800n|\ > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > index 550ec55..4f1bd41 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -370,6 +370,9 @@ ramips_board_detect() { > *"SAP-G3200U3") > name="sap-g3200u3" > ;; > + *"SamKnows Whitebox 8") > + name="sk-wb8" > + ;; alphabetic ordering please > *"SL-R7205"*) > name="sl-r7205" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index 73ba6e6..fcc1b79 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -109,6 +109,7 @@ platform_check_image() { > rt-n56u|\ > rut5xx|\ > sap-g3200u3|\ > + sk-wb8|\ > sl-r7205|\ > tew-691gr|\ > tew-692gr|\ > diff --git a/target/linux/ramips/dts/SK-WB8.dts > b/target/linux/ramips/dts/SK-WB8.dts > new file mode 100644 > index 0000000..3292194 > --- /dev/null > +++ b/target/linux/ramips/dts/SK-WB8.dts > @@ -0,0 +1,122 @@ > +/dts-v1/; > + > +#include "mt7621.dtsi" > + > +/ { > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > + model = "SamKnows SK-WB8"; > + > + memory at 0 { > + device_type = "memory"; > + reg = <0x0 0x4000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,57600"; > + }; > + > + palmbus at 1E000000 { > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "mx25l6405d"; > + reg = <0 0>; > + linux,modalias = "m25p80"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + read-only; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x7b0000>; > + }; > + > + }; > + }; > + }; > + > + pcie at 1e140000 { > + status = "okay"; > + > + pcie0 { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + > + pcie1 { > + mt76 at 1,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x0000>; > + mediatek,5ghz = <0>; > + }; > + }; > + }; > + > + ethernet at 1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + wps { > + label = "sk-wb8:green:wps"; > + gpios = <&gpio1 14 1>; > + }; > + > + usb { > + label = "sk-wb8:green:usb"; > + gpios = <&gpio1 15 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + wps { > + label = "wps"; > + gpios = <&gpio1 11 1>; > + linux,code = <0x211>; > + }; > + reset { > + label = "reset"; > + gpios = <&gpio1 9 1>; > + linux,code = <0x198>; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "i2c", "uart2", > "uart3", "rgmii2", "sdhci"; > + ralink,function = "gpio"; > + }; > + }; > + }; > +}; > diff --git a/target/linux/ramips/image/mt7621.mk > b/target/linux/ramips/image/mt7621.mk > index 0af9596..3e2f7eb 100644 > --- a/target/linux/ramips/image/mt7621.mk > +++ b/target/linux/ramips/image/mt7621.mk > @@ -132,6 +132,12 @@ define Device/ubnt-erx > endef > TARGET_DEVICES += ubnt-erx > > +define Device/sk-wb8 > + DTS := SK-WB8 > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > +endef > +TARGET_DEVICES += sk-wb8 > + > # FIXME: is this still needed? > define Image/Prepare > #define Build/Compile > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk > b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > new file mode 100644 > index 0000000..efa4858 > --- /dev/null > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > @@ -0,0 +1,18 @@ > +# > +# Copyright (C) 2015 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/SK-WB8 > + NAME:=SK-WB8 Profile > + PACKAGES:=\ > + kmod-usb-core kmod-usb3 \ > + kmod-ledtrig-usbdev > +endef > + > +define Profile/SK-WB8/Description > + Package set optimized for the SamKnows SK-WB8. > +endef > +$(eval $(call Profile,SK-WB8)) > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 09:22:55 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 15:22:55 +0200 Subject: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: <8ee72329-9abb-2bfe-92e7-c6b189097c10@phrozen.org> Message-ID: <6850a87b-bd8f-75aa-7853-f13f9923976f@phrozen.org> On 25/04/2016 15:18, Andrew Yong wrote: > I have just found out that I need to perform this additional step on > this SamKnows Whitebox 8 every boot: > > /usr/sbin/fw_setenv bootcount 0 > > Where would be an appropriate place to put this? I could add (yet > another) init script in ./target/linux/ramips/base-files/etc/init.d > with START=99 (this is how SamKnows does it) and add a check > against $(ramips_board_name). look at target/linux/ramips/base-files/lib/preinit/04_handle_checksumming and add a target/linux/ramips/base-files/lib/preinit/04_handle_bootcount using a similar pattern please John > > Without this, SamKnows' custom u-boot will attempt to boot from a backup > partition after bootcount exceeds 3 (3 "failed" boots). > > For an end-user without TTL serial access, it would be a soft brick. > > I'm cleaning up the rest of the patches, fixed some minor gpio > mis-definitions and testing out some wifi fixes before I do a v5. > > On 25 Apr 2016 20:58, "John Crispin" > wrote: > > Hi, > > few comments inline. apart from those 2 nitpicks the patch looks good. > > John > > On 25/04/2016 03:05, Andrew Yong wrote: > > This patch adds support for the SamKnows version 8.0 Whitebox, built > > around the MT7621 platform. 2.4GHz appears to be working, albeit > > poorly; 5GHz not working yet. > > > > Fixed in v4: > > - I didn't commit some fixes in PATCHv3, that's fixed now > > - DTS: Syntax error fixed, LEDs and buttons mapped correctly now > > - diag.sh updated to blink WPS LED on boot > > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > > matches SamKnows firmware > > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > > > Initial support for SamKnows SK-WB8 > > > > Signed-off-by: Andrew Yong > > > > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > > b/target/linux/ramips/base-files/etc/board.d/01_leds > > index e3b8500..df30085 100755 > > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > > @@ -241,6 +241,9 @@ rt-n14u) > > set_wifi_led "$board:blue:air" > > set_usb_led "$board:blue:usb" > > ;; > > +sk-wb8) > > + set_usb_led "$board:green:usb" > > + ;; > > tiny-ac) > > set_wifi_led "$board:orange:wifi" > > set_usb_led "$board:green:usb" > > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > > b/target/linux/ramips/base-files/etc/board.d/02_network > > index 3c958ae..3e876d2 100755 > > --- a/target/linux/ramips/base-files/etc/board.d/02_network > > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > > pbr-m1|\ > > psg1208|\ > > sap-g3200u3|\ > > + sk-wb8|\ > > wf-2881|\ > > whr-300hp2|\ > > whr-600d|\ > > @@ -310,6 +311,9 @@ ramips_setup_macs() > > lan_mac=$(macaddr_setbit_la "$lan_mac") > > wan_mac=$(mtd_get_mac_binary factory 32772) > > ;; > > + sk-wb8) > > + wan_mac=$(mtd_get_mac_binary factory 57350) > > + ;; > > tew-691gr) > > lan_mac=$(cat /sys/class/net/eth0/address) > > wan_mac=$(macaddr_add "$lan_mac" 3) > > diff --git a/target/linux/ramips/base-files/etc/diag.sh > > b/target/linux/ramips/base-files/etc/diag.sh > > index bd0ff05..a941fca 100644 > > --- a/target/linux/ramips/base-files/etc/diag.sh > > +++ b/target/linux/ramips/base-files/etc/diag.sh > > @@ -76,7 +76,8 @@ get_status_led() { > > ;; > > awapn2403|\ > > dir-645|\ > > - wrh-300cr) > > + wrh-300cr|\ > > + sk-wb8) > > alphabetic ordering please > > > status_led="$board:green:wps" > > ;; > > cf-wr800n|\ > > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > > b/target/linux/ramips/base-files/lib/ramips.sh > > index 550ec55..4f1bd41 100755 > > --- a/target/linux/ramips/base-files/lib/ramips.sh > > +++ b/target/linux/ramips/base-files/lib/ramips.sh > > @@ -370,6 +370,9 @@ ramips_board_detect() { > > *"SAP-G3200U3") > > name="sap-g3200u3" > > ;; > > + *"SamKnows Whitebox 8") > > + name="sk-wb8" > > + ;; > > alphabetic ordering please > > > *"SL-R7205"*) > > name="sl-r7205" > > ;; > > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > > index 73ba6e6..fcc1b79 100755 > > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > > @@ -109,6 +109,7 @@ platform_check_image() { > > rt-n56u|\ > > rut5xx|\ > > sap-g3200u3|\ > > + sk-wb8|\ > > sl-r7205|\ > > tew-691gr|\ > > tew-692gr|\ > > diff --git a/target/linux/ramips/dts/SK-WB8.dts > > b/target/linux/ramips/dts/SK-WB8.dts > > new file mode 100644 > > index 0000000..3292194 > > --- /dev/null > > +++ b/target/linux/ramips/dts/SK-WB8.dts > > @@ -0,0 +1,122 @@ > > +/dts-v1/; > > + > > +#include "mt7621.dtsi" > > + > > +/ { > > + compatible = "mediatek,mt7621-eval-board", > "mediatek,mt7621-soc"; > > + model = "SamKnows SK-WB8"; > > + > > + memory at 0 { > > + device_type = "memory"; > > + reg = <0x0 0x4000000>; > > + }; > > + > > + chosen { > > + bootargs = "console=ttyS0,57600"; > > + }; > > + > > + palmbus at 1E000000 { > > + spi at b00 { > > + status = "okay"; > > + > > + m25p80 at 0 { > > + #address-cells = <1>; > > + #size-cells = <1>; > > + compatible = "mx25l6405d"; > > + reg = <0 0>; > > + linux,modalias = "m25p80"; > > + spi-max-frequency = <10000000>; > > + > > + partition at 0 { > > + label = "u-boot"; > > + reg = <0x0 0x30000>; > > + read-only; > > + }; > > + > > + partition at 30000 { > > + label = "u-boot-env"; > > + reg = <0x30000 0x10000>; > > + read-only; > > + }; > > + > > + factory: partition at 40000 { > > + label = "factory"; > > + reg = <0x40000 0x10000>; > > + read-only; > > + }; > > + > > + partition at 50000 { > > + label = "firmware"; > > + reg = <0x50000 0x7b0000>; > > + }; > > + > > + }; > > + }; > > + }; > > + > > + pcie at 1e140000 { > > + status = "okay"; > > + > > + pcie0 { > > + mt76 at 0,0 { > > + reg = <0x0000 0 0 0 0>; > > + device_type = "pci"; > > + mediatek,mtd-eeprom = <&factory > 0x8000>; > > + mediatek,2ghz = <0>; > > + }; > > + }; > > + > > + pcie1 { > > + mt76 at 1,0 { > > + reg = <0x0000 0 0 0 0>; > > + device_type = "pci"; > > + mediatek,mtd-eeprom = <&factory > 0x0000>; > > + mediatek,5ghz = <0>; > > + }; > > + }; > > + }; > > + > > + ethernet at 1e100000 { > > + mtd-mac-address = <&factory 0xe000>; > > + }; > > + > > + gpio-leds { > > + compatible = "gpio-leds"; > > + > > + wps { > > + label = "sk-wb8:green:wps"; > > + gpios = <&gpio1 14 1>; > > + }; > > + > > + usb { > > + label = "sk-wb8:green:usb"; > > + gpios = <&gpio1 15 1>; > > + }; > > + }; > > + > > + gpio-keys-polled { > > + compatible = "gpio-keys-polled"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + poll-interval = <20>; > > + wps { > > + label = "wps"; > > + gpios = <&gpio1 11 1>; > > + linux,code = <0x211>; > > + }; > > + reset { > > + label = "reset"; > > + gpios = <&gpio1 9 1>; > > + linux,code = <0x198>; > > + }; > > + }; > > + > > + pinctrl { > > + state_default: pinctrl0 { > > + gpio { > > + ralink,group = "i2c", "uart2", > > "uart3", "rgmii2", "sdhci"; > > + ralink,function = "gpio"; > > + }; > > + }; > > + }; > > +}; > > diff --git a/target/linux/ramips/image/mt7621.mk > > b/target/linux/ramips/image/mt7621.mk > > index 0af9596..3e2f7eb 100644 > > --- a/target/linux/ramips/image/mt7621.mk > > +++ b/target/linux/ramips/image/mt7621.mk > > @@ -132,6 +132,12 @@ define Device/ubnt-erx > > endef > > TARGET_DEVICES += ubnt-erx > > > > +define Device/sk-wb8 > > + DTS := SK-WB8 > > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > > +endef > > +TARGET_DEVICES += sk-wb8 > > + > > # FIXME: is this still needed? > > define Image/Prepare > > #define Build/Compile > > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk > > > b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > > new file mode 100644 > > index 0000000..efa4858 > > --- /dev/null > > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > > @@ -0,0 +1,18 @@ > > +# > > +# Copyright (C) 2015 OpenWrt.org > > +# > > +# This is free software, licensed under the GNU General Public > License v2. > > +# See /LICENSE for more information. > > +# > > + > > +define Profile/SK-WB8 > > + NAME:=SK-WB8 Profile > > + PACKAGES:=\ > > + kmod-usb-core kmod-usb3 \ > > + kmod-ledtrig-usbdev > > +endef > > + > > +define Profile/SK-WB8/Description > > + Package set optimized for the SamKnows SK-WB8. > > +endef > > +$(eval $(call Profile,SK-WB8)) > > _______________________________________________ > > openwrt-devel mailing list > > openwrt-devel at lists.openwrt.org > > > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 09:24:33 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 15:24:33 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: use dwc2 by default on BTHOMEHUBV3A and WBMR In-Reply-To: <1461580015.10910.14.camel@merveille.lan> References: <1461580015.10910.14.camel@merveille.lan> Message-ID: <2dba80b6-68d2-3cf4-eced-a6a5ccf4616b@phrozen.org> yes please resend a new patch with all boards getting switched John On 25/04/2016 12:26, Ben Mulvihill wrote: > The dwc2 USB driver now works on Lantiq ar9, but the > default is still ltq-hcd-ar9. This patch switches to > dwc2 by default, on the two boards I can test, namely > BTHOMEHUBV3A and WBMR. John, if you are happy with the > principle of switching would you prefer me to send a patch > covering all the ar9 boards? I presume that if one works > then the others should too. > > Thanks, > > Ben > > Signed-off-by: Ben Mulvihill > --- > diff -uprN a/target/linux/lantiq/xway/profiles/bt.mk b/target/linux/lantiq/xway/profiles/bt.mk > --- a/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 11:53:27.000000000 +0200 > +++ b/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 11:56:42.000000000 +0200 > @@ -18,7 +18,7 @@ $(eval $(call Profile,BTHOMEHUBV2B)) > > define Profile/BTHOMEHUBV3A > NAME:=BT Home Hub 3A > - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ > + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ > kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ > kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ > kmod-ltq-deu-ar9 \ > diff -uprN a/target/linux/lantiq/xway/profiles/buffalo.mk b/target/linux/lantiq/xway/profiles/buffalo.mk > --- a/target/linux/lantiq/xway/profiles/buffalo.mk 2016-04-25 11:53:27.000000000 +0200 > +++ b/target/linux/lantiq/xway/profiles/buffalo.mk 2016-04-25 11:57:25.000000000 +0200 > @@ -1,6 +1,6 @@ > define Profile/WBMRA > NAME:=Buffalo WBMR-HP-G300H (A) - WBMR > - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ > + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ > kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ > kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ > ltq-adsl-app ppp-mod-pppoa \ > @@ -12,7 +12,7 @@ $(eval $(call Profile,WBMRA)) > > define Profile/WBMRB > NAME:=Buffalo WBMR-HP-G300H (B) - WBMR > - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ > + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ > kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ > kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ > ltq-adsl-app ppp-mod-pppoa \ > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Mon Apr 25 09:32:13 2016 From: me at ndoo.sg (Andrew Yong) Date: Mon, 25 Apr 2016 21:32:13 +0800 Subject: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8 In-Reply-To: <6850a87b-bd8f-75aa-7853-f13f9923976f@phrozen.org> References: <8ee72329-9abb-2bfe-92e7-c6b189097c10@phrozen.org> <6850a87b-bd8f-75aa-7853-f13f9923976f@phrozen.org> Message-ID: Stupid question - what calls these files? I assume I have to call my new function from somewhere. I'm working on it. On Mon, Apr 25, 2016 at 9:22 PM, John Crispin wrote: > > > On 25/04/2016 15:18, Andrew Yong wrote: >> I have just found out that I need to perform this additional step on >> this SamKnows Whitebox 8 every boot: >> >> /usr/sbin/fw_setenv bootcount 0 >> >> Where would be an appropriate place to put this? I could add (yet >> another) init script in ./target/linux/ramips/base-files/etc/init.d >> with START=99 (this is how SamKnows does it) and add a check >> against $(ramips_board_name). > > look at > target/linux/ramips/base-files/lib/preinit/04_handle_checksumming and > add a target/linux/ramips/base-files/lib/preinit/04_handle_bootcount > using a similar pattern please > > John > > >> >> Without this, SamKnows' custom u-boot will attempt to boot from a backup >> partition after bootcount exceeds 3 (3 "failed" boots). >> >> For an end-user without TTL serial access, it would be a soft brick. >> >> I'm cleaning up the rest of the patches, fixed some minor gpio >> mis-definitions and testing out some wifi fixes before I do a v5. >> > > > >> On 25 Apr 2016 20:58, "John Crispin" > > wrote: >> >> Hi, >> >> few comments inline. apart from those 2 nitpicks the patch looks good. >> >> John >> >> On 25/04/2016 03:05, Andrew Yong wrote: >> > This patch adds support for the SamKnows version 8.0 Whitebox, built >> > around the MT7621 platform. 2.4GHz appears to be working, albeit >> > poorly; 5GHz not working yet. >> > >> > Fixed in v4: >> > - I didn't commit some fixes in PATCHv3, that's fixed now >> > - DTS: Syntax error fixed, LEDs and buttons mapped correctly now >> > - diag.sh updated to blink WPS LED on boot >> > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset >> > matches SamKnows firmware >> > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware >> > >> > Initial support for SamKnows SK-WB8 >> > >> > Signed-off-by: Andrew Yong > >> > >> > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds >> > b/target/linux/ramips/base-files/etc/board.d/01_leds >> > index e3b8500..df30085 100755 >> > --- a/target/linux/ramips/base-files/etc/board.d/01_leds >> > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds >> > @@ -241,6 +241,9 @@ rt-n14u) >> > set_wifi_led "$board:blue:air" >> > set_usb_led "$board:blue:usb" >> > ;; >> > +sk-wb8) >> > + set_usb_led "$board:green:usb" >> > + ;; >> > tiny-ac) >> > set_wifi_led "$board:orange:wifi" >> > set_usb_led "$board:green:usb" >> > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network >> > b/target/linux/ramips/base-files/etc/board.d/02_network >> > index 3c958ae..3e876d2 100755 >> > --- a/target/linux/ramips/base-files/etc/board.d/02_network >> > +++ b/target/linux/ramips/base-files/etc/board.d/02_network >> > @@ -77,6 +77,7 @@ ramips_setup_interfaces() >> > pbr-m1|\ >> > psg1208|\ >> > sap-g3200u3|\ >> > + sk-wb8|\ >> > wf-2881|\ >> > whr-300hp2|\ >> > whr-600d|\ >> > @@ -310,6 +311,9 @@ ramips_setup_macs() >> > lan_mac=$(macaddr_setbit_la "$lan_mac") >> > wan_mac=$(mtd_get_mac_binary factory 32772) >> > ;; >> > + sk-wb8) >> > + wan_mac=$(mtd_get_mac_binary factory 57350) >> > + ;; >> > tew-691gr) >> > lan_mac=$(cat /sys/class/net/eth0/address) >> > wan_mac=$(macaddr_add "$lan_mac" 3) >> > diff --git a/target/linux/ramips/base-files/etc/diag.sh >> > b/target/linux/ramips/base-files/etc/diag.sh >> > index bd0ff05..a941fca 100644 >> > --- a/target/linux/ramips/base-files/etc/diag.sh >> > +++ b/target/linux/ramips/base-files/etc/diag.sh >> > @@ -76,7 +76,8 @@ get_status_led() { >> > ;; >> > awapn2403|\ >> > dir-645|\ >> > - wrh-300cr) >> > + wrh-300cr|\ >> > + sk-wb8) >> >> alphabetic ordering please >> >> > status_led="$board:green:wps" >> > ;; >> > cf-wr800n|\ >> > diff --git a/target/linux/ramips/base-files/lib/ramips.sh >> > b/target/linux/ramips/base-files/lib/ramips.sh >> > index 550ec55..4f1bd41 100755 >> > --- a/target/linux/ramips/base-files/lib/ramips.sh >> > +++ b/target/linux/ramips/base-files/lib/ramips.sh >> > @@ -370,6 +370,9 @@ ramips_board_detect() { >> > *"SAP-G3200U3") >> > name="sap-g3200u3" >> > ;; >> > + *"SamKnows Whitebox 8") >> > + name="sk-wb8" >> > + ;; >> >> alphabetic ordering please >> >> > *"SL-R7205"*) >> > name="sl-r7205" >> > ;; >> > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh >> > b/target/linux/ramips/base-files/lib/upgrade/platform.sh >> > index 73ba6e6..fcc1b79 100755 >> > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh >> > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh >> > @@ -109,6 +109,7 @@ platform_check_image() { >> > rt-n56u|\ >> > rut5xx|\ >> > sap-g3200u3|\ >> > + sk-wb8|\ >> > sl-r7205|\ >> > tew-691gr|\ >> > tew-692gr|\ >> > diff --git a/target/linux/ramips/dts/SK-WB8.dts >> > b/target/linux/ramips/dts/SK-WB8.dts >> > new file mode 100644 >> > index 0000000..3292194 >> > --- /dev/null >> > +++ b/target/linux/ramips/dts/SK-WB8.dts >> > @@ -0,0 +1,122 @@ >> > +/dts-v1/; >> > + >> > +#include "mt7621.dtsi" >> > + >> > +/ { >> > + compatible = "mediatek,mt7621-eval-board", >> "mediatek,mt7621-soc"; >> > + model = "SamKnows SK-WB8"; >> > + >> > + memory at 0 { >> > + device_type = "memory"; >> > + reg = <0x0 0x4000000>; >> > + }; >> > + >> > + chosen { >> > + bootargs = "console=ttyS0,57600"; >> > + }; >> > + >> > + palmbus at 1E000000 { >> > + spi at b00 { >> > + status = "okay"; >> > + >> > + m25p80 at 0 { >> > + #address-cells = <1>; >> > + #size-cells = <1>; >> > + compatible = "mx25l6405d"; >> > + reg = <0 0>; >> > + linux,modalias = "m25p80"; >> > + spi-max-frequency = <10000000>; >> > + >> > + partition at 0 { >> > + label = "u-boot"; >> > + reg = <0x0 0x30000>; >> > + read-only; >> > + }; >> > + >> > + partition at 30000 { >> > + label = "u-boot-env"; >> > + reg = <0x30000 0x10000>; >> > + read-only; >> > + }; >> > + >> > + factory: partition at 40000 { >> > + label = "factory"; >> > + reg = <0x40000 0x10000>; >> > + read-only; >> > + }; >> > + >> > + partition at 50000 { >> > + label = "firmware"; >> > + reg = <0x50000 0x7b0000>; >> > + }; >> > + >> > + }; >> > + }; >> > + }; >> > + >> > + pcie at 1e140000 { >> > + status = "okay"; >> > + >> > + pcie0 { >> > + mt76 at 0,0 { >> > + reg = <0x0000 0 0 0 0>; >> > + device_type = "pci"; >> > + mediatek,mtd-eeprom = <&factory >> 0x8000>; >> > + mediatek,2ghz = <0>; >> > + }; >> > + }; >> > + >> > + pcie1 { >> > + mt76 at 1,0 { >> > + reg = <0x0000 0 0 0 0>; >> > + device_type = "pci"; >> > + mediatek,mtd-eeprom = <&factory >> 0x0000>; >> > + mediatek,5ghz = <0>; >> > + }; >> > + }; >> > + }; >> > + >> > + ethernet at 1e100000 { >> > + mtd-mac-address = <&factory 0xe000>; >> > + }; >> > + >> > + gpio-leds { >> > + compatible = "gpio-leds"; >> > + >> > + wps { >> > + label = "sk-wb8:green:wps"; >> > + gpios = <&gpio1 14 1>; >> > + }; >> > + >> > + usb { >> > + label = "sk-wb8:green:usb"; >> > + gpios = <&gpio1 15 1>; >> > + }; >> > + }; >> > + >> > + gpio-keys-polled { >> > + compatible = "gpio-keys-polled"; >> > + #address-cells = <1>; >> > + #size-cells = <0>; >> > + poll-interval = <20>; >> > + wps { >> > + label = "wps"; >> > + gpios = <&gpio1 11 1>; >> > + linux,code = <0x211>; >> > + }; >> > + reset { >> > + label = "reset"; >> > + gpios = <&gpio1 9 1>; >> > + linux,code = <0x198>; >> > + }; >> > + }; >> > + >> > + pinctrl { >> > + state_default: pinctrl0 { >> > + gpio { >> > + ralink,group = "i2c", "uart2", >> > "uart3", "rgmii2", "sdhci"; >> > + ralink,function = "gpio"; >> > + }; >> > + }; >> > + }; >> > +}; >> > diff --git a/target/linux/ramips/image/mt7621.mk >> > b/target/linux/ramips/image/mt7621.mk >> > index 0af9596..3e2f7eb 100644 >> > --- a/target/linux/ramips/image/mt7621.mk >> > +++ b/target/linux/ramips/image/mt7621.mk >> > @@ -132,6 +132,12 @@ define Device/ubnt-erx >> > endef >> > TARGET_DEVICES += ubnt-erx >> > >> > +define Device/sk-wb8 >> > + DTS := SK-WB8 >> > + IMAGE_SIZE := $(ralink_default_fw_size_16M) >> > +endef >> > +TARGET_DEVICES += sk-wb8 >> > + >> > # FIXME: is this still needed? >> > define Image/Prepare >> > #define Build/Compile >> > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk >> >> > b/target/linux/ramips/mt7621/profiles/sk-wb8.mk >> > new file mode 100644 >> > index 0000000..efa4858 >> > --- /dev/null >> > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk >> > @@ -0,0 +1,18 @@ >> > +# >> > +# Copyright (C) 2015 OpenWrt.org >> > +# >> > +# This is free software, licensed under the GNU General Public >> License v2. >> > +# See /LICENSE for more information. >> > +# >> > + >> > +define Profile/SK-WB8 >> > + NAME:=SK-WB8 Profile >> > + PACKAGES:=\ >> > + kmod-usb-core kmod-usb3 \ >> > + kmod-ledtrig-usbdev >> > +endef >> > + >> > +define Profile/SK-WB8/Description >> > + Package set optimized for the SamKnows SK-WB8. >> > +endef >> > +$(eval $(call Profile,SK-WB8)) >> > _______________________________________________ >> > openwrt-devel mailing list >> > openwrt-devel at lists.openwrt.org >> >> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> > >> _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 09:32:32 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 15:32:32 +0200 Subject: [OpenWrt-Devel] [PATCH] Hostapd: Add support for multiple RADIUS servers In-Reply-To: <1461220774-16115-1-git-send-email-amine.ahd@gmail.com> References: <1461220774-16115-1-git-send-email-amine.ahd@gmail.com> Message-ID: <86f3303d-00dc-0913-5be6-c5c6e2ab7dca@phrozen.org> On 21/04/2016 08:39, amine.ahd wrote: > Hostapd allows more than one RADIUS server to be added in case the main server goes down. > This allows netifd to load a list of RADIUS servers from the wireless confid file and add them to hostapd. > The format of the list in the config file is as follow: > list auth_servers ... > list auth_ports ... > list auth_secrets ... > keeping 3 lists in sync is not a good solution. please use a single list and a notation such as secret at host:port John > Signed-off-by: Amine Hamed > --- > .../network/services/hostapd/files/netifd.sh | 28 ++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > > diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh > index 417cc42..ed772ff 100644 > --- a/package/network/services/hostapd/files/netifd.sh > +++ b/package/network/services/hostapd/files/netifd.sh > @@ -125,6 +125,10 @@ hostapd_common_add_bss_config() { > config_add_string auth_secret > config_add_int 'auth_port:port' 'port:port' > > + config_add_array auth_servers > + config_add_array auth_secrets > + config_add_array auth_ports > + > config_add_string acct_server > config_add_string acct_secret > config_add_int acct_port > @@ -269,10 +273,34 @@ hostapd_set_bss_options() { > > set_default vlan_naming 1 > > + # leave the default option for legacy compatibility > append bss_conf "auth_server_addr=$auth_server" "$N" > append bss_conf "auth_server_port=$auth_port" "$N" > append bss_conf "auth_server_shared_secret=$auth_secret" "$N" > > + # List of fallback RADIUS servers > + json_select "auth_servers" > + local Index="1" > + while json_get_type Var $Index && [ "$Var" = string ]; do > + json_get_var Var "$((Index))" > + append bss_conf "auth_server_addr=$Var" "$N" > + json_select ".." > + > + json_select "auth_ports" > + json_get_var Var "$((Index))" > + set_default Var 1812 > + append bss_conf "auth_server_port=$Var" "$N" > + json_select ".." > + > + json_select "auth_secrets" > + json_get_var Var "$((Index++))" > + append bss_conf "auth_server_shared_secret=$Var" "$N" > + json_select ".." > + > + json_select "auth_servers" > + done > + json_select ".." > + > [ -n "$acct_server" ] && { > append bss_conf "acct_server_addr=$acct_server" "$N" > append bss_conf "acct_server_port=$acct_port" "$N" > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 09:45:04 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 15:45:04 +0200 Subject: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: <8ee72329-9abb-2bfe-92e7-c6b189097c10@phrozen.org> <6850a87b-bd8f-75aa-7853-f13f9923976f@phrozen.org> Message-ID: <3308f487-71a4-4184-23c5-3a780c5a5eda@phrozen.org> On 25/04/2016 15:32, Andrew Yong wrote: > Stupid question - what calls these files? I assume I have to call my > new function from somewhere. > > I'm working on it. preinit gets called automagically during preinit/boot > > On Mon, Apr 25, 2016 at 9:22 PM, John Crispin wrote: >> >> >> On 25/04/2016 15:18, Andrew Yong wrote: >>> I have just found out that I need to perform this additional step on >>> this SamKnows Whitebox 8 every boot: >>> >>> /usr/sbin/fw_setenv bootcount 0 >>> >>> Where would be an appropriate place to put this? I could add (yet >>> another) init script in ./target/linux/ramips/base-files/etc/init.d >>> with START=99 (this is how SamKnows does it) and add a check >>> against $(ramips_board_name). >> >> look at >> target/linux/ramips/base-files/lib/preinit/04_handle_checksumming and >> add a target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >> using a similar pattern please >> >> John >> >> >>> >>> Without this, SamKnows' custom u-boot will attempt to boot from a backup >>> partition after bootcount exceeds 3 (3 "failed" boots). >>> >>> For an end-user without TTL serial access, it would be a soft brick. >>> >>> I'm cleaning up the rest of the patches, fixed some minor gpio >>> mis-definitions and testing out some wifi fixes before I do a v5. >>> >> >> >> >>> On 25 Apr 2016 20:58, "John Crispin" >> > wrote: >>> >>> Hi, >>> >>> few comments inline. apart from those 2 nitpicks the patch looks good. >>> >>> John >>> >>> On 25/04/2016 03:05, Andrew Yong wrote: >>> > This patch adds support for the SamKnows version 8.0 Whitebox, built >>> > around the MT7621 platform. 2.4GHz appears to be working, albeit >>> > poorly; 5GHz not working yet. >>> > >>> > Fixed in v4: >>> > - I didn't commit some fixes in PATCHv3, that's fixed now >>> > - DTS: Syntax error fixed, LEDs and buttons mapped correctly now >>> > - diag.sh updated to blink WPS LED on boot >>> > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset >>> > matches SamKnows firmware >>> > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware >>> > >>> > Initial support for SamKnows SK-WB8 >>> > >>> > Signed-off-by: Andrew Yong > >>> > >>> > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds >>> > b/target/linux/ramips/base-files/etc/board.d/01_leds >>> > index e3b8500..df30085 100755 >>> > --- a/target/linux/ramips/base-files/etc/board.d/01_leds >>> > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds >>> > @@ -241,6 +241,9 @@ rt-n14u) >>> > set_wifi_led "$board:blue:air" >>> > set_usb_led "$board:blue:usb" >>> > ;; >>> > +sk-wb8) >>> > + set_usb_led "$board:green:usb" >>> > + ;; >>> > tiny-ac) >>> > set_wifi_led "$board:orange:wifi" >>> > set_usb_led "$board:green:usb" >>> > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network >>> > b/target/linux/ramips/base-files/etc/board.d/02_network >>> > index 3c958ae..3e876d2 100755 >>> > --- a/target/linux/ramips/base-files/etc/board.d/02_network >>> > +++ b/target/linux/ramips/base-files/etc/board.d/02_network >>> > @@ -77,6 +77,7 @@ ramips_setup_interfaces() >>> > pbr-m1|\ >>> > psg1208|\ >>> > sap-g3200u3|\ >>> > + sk-wb8|\ >>> > wf-2881|\ >>> > whr-300hp2|\ >>> > whr-600d|\ >>> > @@ -310,6 +311,9 @@ ramips_setup_macs() >>> > lan_mac=$(macaddr_setbit_la "$lan_mac") >>> > wan_mac=$(mtd_get_mac_binary factory 32772) >>> > ;; >>> > + sk-wb8) >>> > + wan_mac=$(mtd_get_mac_binary factory 57350) >>> > + ;; >>> > tew-691gr) >>> > lan_mac=$(cat /sys/class/net/eth0/address) >>> > wan_mac=$(macaddr_add "$lan_mac" 3) >>> > diff --git a/target/linux/ramips/base-files/etc/diag.sh >>> > b/target/linux/ramips/base-files/etc/diag.sh >>> > index bd0ff05..a941fca 100644 >>> > --- a/target/linux/ramips/base-files/etc/diag.sh >>> > +++ b/target/linux/ramips/base-files/etc/diag.sh >>> > @@ -76,7 +76,8 @@ get_status_led() { >>> > ;; >>> > awapn2403|\ >>> > dir-645|\ >>> > - wrh-300cr) >>> > + wrh-300cr|\ >>> > + sk-wb8) >>> >>> alphabetic ordering please >>> >>> > status_led="$board:green:wps" >>> > ;; >>> > cf-wr800n|\ >>> > diff --git a/target/linux/ramips/base-files/lib/ramips.sh >>> > b/target/linux/ramips/base-files/lib/ramips.sh >>> > index 550ec55..4f1bd41 100755 >>> > --- a/target/linux/ramips/base-files/lib/ramips.sh >>> > +++ b/target/linux/ramips/base-files/lib/ramips.sh >>> > @@ -370,6 +370,9 @@ ramips_board_detect() { >>> > *"SAP-G3200U3") >>> > name="sap-g3200u3" >>> > ;; >>> > + *"SamKnows Whitebox 8") >>> > + name="sk-wb8" >>> > + ;; >>> >>> alphabetic ordering please >>> >>> > *"SL-R7205"*) >>> > name="sl-r7205" >>> > ;; >>> > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh >>> > b/target/linux/ramips/base-files/lib/upgrade/platform.sh >>> > index 73ba6e6..fcc1b79 100755 >>> > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh >>> > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh >>> > @@ -109,6 +109,7 @@ platform_check_image() { >>> > rt-n56u|\ >>> > rut5xx|\ >>> > sap-g3200u3|\ >>> > + sk-wb8|\ >>> > sl-r7205|\ >>> > tew-691gr|\ >>> > tew-692gr|\ >>> > diff --git a/target/linux/ramips/dts/SK-WB8.dts >>> > b/target/linux/ramips/dts/SK-WB8.dts >>> > new file mode 100644 >>> > index 0000000..3292194 >>> > --- /dev/null >>> > +++ b/target/linux/ramips/dts/SK-WB8.dts >>> > @@ -0,0 +1,122 @@ >>> > +/dts-v1/; >>> > + >>> > +#include "mt7621.dtsi" >>> > + >>> > +/ { >>> > + compatible = "mediatek,mt7621-eval-board", >>> "mediatek,mt7621-soc"; >>> > + model = "SamKnows SK-WB8"; >>> > + >>> > + memory at 0 { >>> > + device_type = "memory"; >>> > + reg = <0x0 0x4000000>; >>> > + }; >>> > + >>> > + chosen { >>> > + bootargs = "console=ttyS0,57600"; >>> > + }; >>> > + >>> > + palmbus at 1E000000 { >>> > + spi at b00 { >>> > + status = "okay"; >>> > + >>> > + m25p80 at 0 { >>> > + #address-cells = <1>; >>> > + #size-cells = <1>; >>> > + compatible = "mx25l6405d"; >>> > + reg = <0 0>; >>> > + linux,modalias = "m25p80"; >>> > + spi-max-frequency = <10000000>; >>> > + >>> > + partition at 0 { >>> > + label = "u-boot"; >>> > + reg = <0x0 0x30000>; >>> > + read-only; >>> > + }; >>> > + >>> > + partition at 30000 { >>> > + label = "u-boot-env"; >>> > + reg = <0x30000 0x10000>; >>> > + read-only; >>> > + }; >>> > + >>> > + factory: partition at 40000 { >>> > + label = "factory"; >>> > + reg = <0x40000 0x10000>; >>> > + read-only; >>> > + }; >>> > + >>> > + partition at 50000 { >>> > + label = "firmware"; >>> > + reg = <0x50000 0x7b0000>; >>> > + }; >>> > + >>> > + }; >>> > + }; >>> > + }; >>> > + >>> > + pcie at 1e140000 { >>> > + status = "okay"; >>> > + >>> > + pcie0 { >>> > + mt76 at 0,0 { >>> > + reg = <0x0000 0 0 0 0>; >>> > + device_type = "pci"; >>> > + mediatek,mtd-eeprom = <&factory >>> 0x8000>; >>> > + mediatek,2ghz = <0>; >>> > + }; >>> > + }; >>> > + >>> > + pcie1 { >>> > + mt76 at 1,0 { >>> > + reg = <0x0000 0 0 0 0>; >>> > + device_type = "pci"; >>> > + mediatek,mtd-eeprom = <&factory >>> 0x0000>; >>> > + mediatek,5ghz = <0>; >>> > + }; >>> > + }; >>> > + }; >>> > + >>> > + ethernet at 1e100000 { >>> > + mtd-mac-address = <&factory 0xe000>; >>> > + }; >>> > + >>> > + gpio-leds { >>> > + compatible = "gpio-leds"; >>> > + >>> > + wps { >>> > + label = "sk-wb8:green:wps"; >>> > + gpios = <&gpio1 14 1>; >>> > + }; >>> > + >>> > + usb { >>> > + label = "sk-wb8:green:usb"; >>> > + gpios = <&gpio1 15 1>; >>> > + }; >>> > + }; >>> > + >>> > + gpio-keys-polled { >>> > + compatible = "gpio-keys-polled"; >>> > + #address-cells = <1>; >>> > + #size-cells = <0>; >>> > + poll-interval = <20>; >>> > + wps { >>> > + label = "wps"; >>> > + gpios = <&gpio1 11 1>; >>> > + linux,code = <0x211>; >>> > + }; >>> > + reset { >>> > + label = "reset"; >>> > + gpios = <&gpio1 9 1>; >>> > + linux,code = <0x198>; >>> > + }; >>> > + }; >>> > + >>> > + pinctrl { >>> > + state_default: pinctrl0 { >>> > + gpio { >>> > + ralink,group = "i2c", "uart2", >>> > "uart3", "rgmii2", "sdhci"; >>> > + ralink,function = "gpio"; >>> > + }; >>> > + }; >>> > + }; >>> > +}; >>> > diff --git a/target/linux/ramips/image/mt7621.mk >>> > b/target/linux/ramips/image/mt7621.mk >>> > index 0af9596..3e2f7eb 100644 >>> > --- a/target/linux/ramips/image/mt7621.mk >>> > +++ b/target/linux/ramips/image/mt7621.mk >>> > @@ -132,6 +132,12 @@ define Device/ubnt-erx >>> > endef >>> > TARGET_DEVICES += ubnt-erx >>> > >>> > +define Device/sk-wb8 >>> > + DTS := SK-WB8 >>> > + IMAGE_SIZE := $(ralink_default_fw_size_16M) >>> > +endef >>> > +TARGET_DEVICES += sk-wb8 >>> > + >>> > # FIXME: is this still needed? >>> > define Image/Prepare >>> > #define Build/Compile >>> > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk >>> >>> > b/target/linux/ramips/mt7621/profiles/sk-wb8.mk >>> > new file mode 100644 >>> > index 0000000..efa4858 >>> > --- /dev/null >>> > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk >>> > @@ -0,0 +1,18 @@ >>> > +# >>> > +# Copyright (C) 2015 OpenWrt.org >>> > +# >>> > +# This is free software, licensed under the GNU General Public >>> License v2. >>> > +# See /LICENSE for more information. >>> > +# >>> > + >>> > +define Profile/SK-WB8 >>> > + NAME:=SK-WB8 Profile >>> > + PACKAGES:=\ >>> > + kmod-usb-core kmod-usb3 \ >>> > + kmod-ledtrig-usbdev >>> > +endef >>> > + >>> > +define Profile/SK-WB8/Description >>> > + Package set optimized for the SamKnows SK-WB8. >>> > +endef >>> > +$(eval $(call Profile,SK-WB8)) >>> > _______________________________________________ >>> > openwrt-devel mailing list >>> > openwrt-devel at lists.openwrt.org >>> >>> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >>> > >>> _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From martin.blumenstingl at googlemail.com Mon Apr 25 10:29:12 2016 From: martin.blumenstingl at googlemail.com (Martin Blumenstingl) Date: Mon, 25 Apr 2016 16:29:12 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A In-Reply-To: <95995f6d-efa9-edbb-7a85-67320d226162@phrozen.org> References: <1461526179.10910.6.camel@merveille.lan> <95995f6d-efa9-edbb-7a85-67320d226162@phrozen.org> Message-ID: On Mon, Apr 25, 2016 at 3:00 PM, John Crispin wrote: > is this not a bit risky ? normally we try to keep them read-only so that > users cannot accidentally kill them. is the calib data normally not > located in the art partition or why do you need to copy it after flashing ? I think the caldata partition is made writable because of some bug in ath9k which required HH3A users to manually modify the ath9k caldata. This is not necessary anymore since my patch (+ Felix' fix on top of it) is now upstream: [0] @Ben: one probably has to enable caldata swapping in the .dts. Then we have to figure out what to do with existing HH3A installations. Martin [0] https://github.com/torvalds/linux/commit/6fa658fd5ab26a769ca7df7bfdd53c212a0ba852 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From martin.blumenstingl at googlemail.com Mon Apr 25 10:30:29 2016 From: martin.blumenstingl at googlemail.com (Martin Blumenstingl) Date: Mon, 25 Apr 2016 16:30:29 +0200 Subject: [OpenWrt-Devel] [RFC] ramips: fix bad patch awake rt305x USB controller In-Reply-To: <63695107-92df-da04-a653-c5720e0b2557@phrozen.org> References: <5056501461383729@web4o.yandex.ru> <63695107-92df-da04-a653-c5720e0b2557@phrozen.org> Message-ID: On Mon, Apr 25, 2016 at 3:11 PM, John Crispin wrote: > i dont see why this is needed.the patch in the tree does not look broken > and seems to compile fine. It seems that Hauke already pushed a similar fix: https://dev.openwrt.org/changeset/49221/ _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Mon Apr 25 10:51:15 2016 From: me at ndoo.sg (Andrew Yong) Date: Mon, 25 Apr 2016 22:51:15 +0800 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 Message-ID: PATCHv1: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. PATCHv2: Fixed LED name in DTS. PATCHv3: DTS: Syntax error fixed, LEDs and buttons mapped correctly now - diag.sh updated to blink WPS LED on boot - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset matches SamKnows firmware - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware PATCHv4: - I didn't commit some fixes in PATCHv3, that's fixed now PATCHv5: - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter to prevent soft brick by booting into nonexistent backup partition - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, needs further investigation, effective txpower is still 0) - Experimenting on wifi but that'll be a future patch, board boots fine now. Signed-off-by: Andrew Yong diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index a759bcc..9ad5974 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -24,7 +24,8 @@ linkits7688d | \ wsr-600 | \ wsr-1166 | \ br6425 | \ -miwifi-nano) +miwifi-nano | \ +sk-wb8) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ;; esac diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..df30085 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -241,6 +241,9 @@ rt-n14u) set_wifi_led "$board:blue:air" set_usb_led "$board:blue:usb" ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; tiny-ac) set_wifi_led "$board:orange:wifi" set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..3e876d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() pbr-m1|\ psg1208|\ sap-g3200u3|\ + sk-wb8|\ wf-2881|\ whr-300hp2|\ whr-600d|\ @@ -310,6 +311,9 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(mtd_get_mac_binary factory 32772) ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; tew-691gr) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..534cc1c 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -76,6 +76,7 @@ get_status_led() { ;; awapn2403|\ dir-645|\ + sk-wb8|\ wrh-300cr) status_led="$board:green:wps" ;; diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount new file mode 100644 index 0000000..570fe16 --- /dev/null +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount @@ -0,0 +1,22 @@ +#!/bin/sh + +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts +# to boot a recovery partition when bootcount > 3. We need to ensure this is +# reset to 0 every boot + +do_bootcount_reset() { + . /lib/ramips.sh + + local board=$(ramips_board_name) + + case "$board" in + sk-wb8) + echo "Board is SamKnows Whitebox 8, resetting bootcount environment variable..." + fw_setenv bootcount 0 + ;; + esac + + return 0 +} + +boot_hook_add preinit_main do_bootcount_reset diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..5c1715d 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -367,6 +367,9 @@ ramips_board_detect() { *"RUT5XX") name="rut5xx" ;; + *"SamKnows Whitebox 8") + name="sk-wb8" + ;; *"SAP-G3200U3") name="sap-g3200u3" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..fcc1b79 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -109,6 +109,7 @@ platform_check_image() { rt-n56u|\ rut5xx|\ sap-g3200u3|\ + sk-wb8|\ sl-r7205|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..356a2b9 --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,121 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows Whitebox 8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 14 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 15 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 11 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio1 9 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0af9596..3e2f7eb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -132,6 +132,12 @@ define Device/ubnt-erx endef TARGET_DEVICES += ubnt-erx +define Device/sk-wb8 + DTS := SK-WB8 + IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + # FIXME: is this still needed? define Image/Prepare #define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..4b22ef3 --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SK-WB8 Profile + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev uboot-envtools +endef + +define Profile/SK-WB8/Description + Package set optimized for the SamKnows SK-WB8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Mon Apr 25 10:56:39 2016 From: me at ndoo.sg (Andrew Yong) Date: Mon, 25 Apr 2016 22:56:39 +0800 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: Message-ID: Re-sending, newline issues (oops) diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index a759bcc..9ad5974 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -24,7 +24,8 @@ linkits7688d | \ wsr-600 | \ wsr-1166 | \ br6425 | \ -miwifi-nano) +miwifi-nano | \ +sk-wb8) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ;; esac diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..df30085 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -241,6 +241,9 @@ rt-n14u) set_wifi_led "$board:blue:air" set_usb_led "$board:blue:usb" ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; tiny-ac) set_wifi_led "$board:orange:wifi" set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..3e876d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() pbr-m1|\ psg1208|\ sap-g3200u3|\ + sk-wb8|\ wf-2881|\ whr-300hp2|\ whr-600d|\ @@ -310,6 +311,9 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(mtd_get_mac_binary factory 32772) ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; tew-691gr) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..534cc1c 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -76,6 +76,7 @@ get_status_led() { ;; awapn2403|\ dir-645|\ + sk-wb8|\ wrh-300cr) status_led="$board:green:wps" ;; diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount new file mode 100644 index 0000000..570fe16 --- /dev/null +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount @@ -0,0 +1,22 @@ +#!/bin/sh + +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts +# to boot a recovery partition when bootcount > 3. We need to ensure this is +# reset to 0 every boot + +do_bootcount_reset() { + . /lib/ramips.sh + + local board=$(ramips_board_name) + + case "$board" in + sk-wb8) + echo "Board is SamKnows Whitebox 8, resetting bootcount environment variable..." + fw_setenv bootcount 0 + ;; + esac + + return 0 +} + +boot_hook_add preinit_main do_bootcount_reset diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..5c1715d 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -367,6 +367,9 @@ ramips_board_detect() { *"RUT5XX") name="rut5xx" ;; + *"SamKnows Whitebox 8") + name="sk-wb8" + ;; *"SAP-G3200U3") name="sap-g3200u3" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..fcc1b79 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -109,6 +109,7 @@ platform_check_image() { rt-n56u|\ rut5xx|\ sap-g3200u3|\ + sk-wb8|\ sl-r7205|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..356a2b9 --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,121 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows Whitebox 8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 14 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 15 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 11 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio1 9 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0af9596..3e2f7eb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -132,6 +132,12 @@ define Device/ubnt-erx endef TARGET_DEVICES += ubnt-erx +define Device/sk-wb8 + DTS := SK-WB8 + IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + # FIXME: is this still needed? define Image/Prepare #define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..4b22ef3 --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SK-WB8 Profile + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev uboot-envtools +endef + +define Profile/SK-WB8/Description + Package set optimized for the SamKnows SK-WB8. +endef +$(eval $(call Profile,SK-WB8)) On Mon, Apr 25, 2016 at 10:51 PM, Andrew Yong wrote: > PATCHv1: > This patch adds support for the SamKnows version 8.0 Whitebox, built > around the MT7621 platform. 2.4GHz appears to be working, albeit > poorly; 5GHz not working yet. > > PATCHv2: > Fixed LED name in DTS. > > PATCHv3: > DTS: Syntax error fixed, LEDs and buttons mapped correctly now > - diag.sh updated to blink WPS LED on boot > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > matches SamKnows firmware > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > PATCHv4: > - I didn't commit some fixes in PATCHv3, that's fixed now > > PATCHv5: > - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter > to prevent soft brick by booting into nonexistent backup partition > - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, > needs further investigation, effective txpower is still 0) > - Experimenting on wifi but that'll be a future patch, board boots fine now. > > Signed-off-by: Andrew Yong > > diff --git a/package/boot/uboot-envtools/files/ramips > b/package/boot/uboot-envtools/files/ramips > index a759bcc..9ad5974 100644 > --- a/package/boot/uboot-envtools/files/ramips > +++ b/package/boot/uboot-envtools/files/ramips > @@ -24,7 +24,8 @@ linkits7688d | \ > wsr-600 | \ > wsr-1166 | \ > br6425 | \ > -miwifi-nano) > +miwifi-nano | \ > +sk-wb8) > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" > ;; > esac > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > b/target/linux/ramips/base-files/etc/board.d/01_leds > index e3b8500..df30085 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -241,6 +241,9 @@ rt-n14u) > set_wifi_led "$board:blue:air" > set_usb_led "$board:blue:usb" > ;; > +sk-wb8) > + set_usb_led "$board:green:usb" > + ;; > tiny-ac) > set_wifi_led "$board:orange:wifi" > set_usb_led "$board:green:usb" > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > index 3c958ae..3e876d2 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > pbr-m1|\ > psg1208|\ > sap-g3200u3|\ > + sk-wb8|\ > wf-2881|\ > whr-300hp2|\ > whr-600d|\ > @@ -310,6 +311,9 @@ ramips_setup_macs() > lan_mac=$(macaddr_setbit_la "$lan_mac") > wan_mac=$(mtd_get_mac_binary factory 32772) > ;; > + sk-wb8) > + wan_mac=$(mtd_get_mac_binary factory 57350) > + ;; > tew-691gr) > lan_mac=$(cat /sys/class/net/eth0/address) > wan_mac=$(macaddr_add "$lan_mac" 3) > diff --git a/target/linux/ramips/base-files/etc/diag.sh > b/target/linux/ramips/base-files/etc/diag.sh > index bd0ff05..534cc1c 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -76,6 +76,7 @@ get_status_led() { > ;; > awapn2403|\ > dir-645|\ > + sk-wb8|\ > wrh-300cr) > status_led="$board:green:wps" > ;; > diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount > b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount > new file mode 100644 > index 0000000..570fe16 > --- /dev/null > +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount > @@ -0,0 +1,22 @@ > +#!/bin/sh > + > +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts > +# to boot a recovery partition when bootcount > 3. We need to ensure this is > +# reset to 0 every boot > + > +do_bootcount_reset() { > + . /lib/ramips.sh > + > + local board=$(ramips_board_name) > + > + case "$board" in > + sk-wb8) > + echo "Board is SamKnows Whitebox 8, resetting > bootcount environment variable..." > + fw_setenv bootcount 0 > + ;; > + esac > + > + return 0 > +} > + > +boot_hook_add preinit_main do_bootcount_reset > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > index 550ec55..5c1715d 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -367,6 +367,9 @@ ramips_board_detect() { > *"RUT5XX") > name="rut5xx" > ;; > + *"SamKnows Whitebox 8") > + name="sk-wb8" > + ;; > *"SAP-G3200U3") > name="sap-g3200u3" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index 73ba6e6..fcc1b79 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -109,6 +109,7 @@ platform_check_image() { > rt-n56u|\ > rut5xx|\ > sap-g3200u3|\ > + sk-wb8|\ > sl-r7205|\ > tew-691gr|\ > tew-692gr|\ > diff --git a/target/linux/ramips/dts/SK-WB8.dts > b/target/linux/ramips/dts/SK-WB8.dts > new file mode 100644 > index 0000000..356a2b9 > --- /dev/null > +++ b/target/linux/ramips/dts/SK-WB8.dts > @@ -0,0 +1,121 @@ > +/dts-v1/; > + > +#include "mt7621.dtsi" > + > +/ { > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > + model = "SamKnows Whitebox 8"; > + > + memory at 0 { > + device_type = "memory"; > + reg = <0x0 0x4000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,57600"; > + }; > + > + palmbus at 1E000000 { > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "mx25l6405d"; > + reg = <0 0>; > + linux,modalias = "m25p80"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x7b0000>; > + }; > + > + }; > + }; > + }; > + > + pcie at 1e140000 { > + status = "okay"; > + > + pcie0 { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x0000>; > + mediatek,5ghz = <0>; > + }; > + }; > + > + pcie1 { > + mt76 at 1,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + }; > + > + ethernet at 1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + wps { > + label = "sk-wb8:green:wps"; > + gpios = <&gpio1 14 1>; > + }; > + > + usb { > + label = "sk-wb8:green:usb"; > + gpios = <&gpio1 15 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + wps { > + label = "wps"; > + gpios = <&gpio1 11 1>; > + linux,code = <0x211>; > + }; > + reset { > + label = "reset"; > + gpios = <&gpio1 9 1>; > + linux,code = <0x198>; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "i2c", "uart2", > "uart3", "rgmii2", "sdhci"; > + ralink,function = "gpio"; > + }; > + }; > + }; > +}; > diff --git a/target/linux/ramips/image/mt7621.mk > b/target/linux/ramips/image/mt7621.mk > index 0af9596..3e2f7eb 100644 > --- a/target/linux/ramips/image/mt7621.mk > +++ b/target/linux/ramips/image/mt7621.mk > @@ -132,6 +132,12 @@ define Device/ubnt-erx > endef > TARGET_DEVICES += ubnt-erx > > +define Device/sk-wb8 > + DTS := SK-WB8 > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > +endef > +TARGET_DEVICES += sk-wb8 > + > # FIXME: is this still needed? > define Image/Prepare > #define Build/Compile > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk > b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > new file mode 100644 > index 0000000..4b22ef3 > --- /dev/null > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > @@ -0,0 +1,18 @@ > +# > +# Copyright (C) 2015 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/SK-WB8 > + NAME:=SK-WB8 Profile > + PACKAGES:=\ > + kmod-usb-core kmod-usb3 \ > + kmod-ledtrig-usbdev uboot-envtools > +endef > + > +define Profile/SK-WB8/Description > + Package set optimized for the SamKnows SK-WB8. > +endef > +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 11:04:42 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 17:04:42 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: add tools/kernel2minor package for Mikrotik NOR flash devices. In-Reply-To: <1460973907-20270-1-git-send-email-adron@yapic.net> References: <1460973907-20270-1-git-send-email-adron@yapic.net> Message-ID: Hi, comments inline On 18/04/2016 12:05, adron at yapic.net wrote: > From: Sergey Sergeev > > kernel2minor tool is used for packing openwrt kernel into modified yaffs2 file system image. > This is necessary to boot via Routerboot on new Mikrotik NOR flash devices. > --- > config/Config-images.in | 7 +++++++ > target/linux/ar71xx/image/Makefile | 3 +++ > target/linux/ar71xx/mikrotik/target.mk | 2 +- > tools/Makefile | 1 + > tools/kernel2minor/Makefile | 35 ++++++++++++++++++++++++++++++++++ > 5 files changed, 47 insertions(+), 1 deletion(-) > create mode 100644 tools/kernel2minor/Makefile > > diff --git a/config/Config-images.in b/config/Config-images.in > index a60dd50..339a5fd 100644 > --- a/config/Config-images.in > +++ b/config/Config-images.in > @@ -6,6 +6,13 @@ > > menu "Target Images" > > + config TARGET_KERNEL_MINOR_YAFFS2 > + bool "kernel.minor-yaffs2" > + default n > + depends on TARGET_ar71xx_mikrotik > + help > + Build a Mikrotik Nor Yaffs2 kernel filesystem for RouterBoot > + can you change this to be like config TARGET_ROOTFS_YAFFS2 bool "yaffs2" default y if USES_YAFFS2 help Build a YAFFS2 root filesystem. then patch scripts/metadata.pl to handle USES_YAFFS2 and finally patch target/linux/ar71xx/mikrotik/target.mk and add yaffs2 to the FEATURES list John > menuconfig TARGET_ROOTFS_INITRAMFS > bool "ramdisk" > default y if USES_INITRAMFS > diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile > index e4e2fcf..64bec18 100644 > --- a/target/linux/ar71xx/image/Makefile > +++ b/target/linux/ar71xx/image/Makefile > @@ -1658,6 +1658,9 @@ define Image/BuildKernel > $(call MkuImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(UIMAGE)-gzip.bin) > $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin) > cp $(KDIR)/loader-generic.elf $(VMLINUX)-lzma.elf > + ifeq ($(CONFIG_TARGET_KERNEL_MINOR_YAFFS2),y) > + $(STAGING_DIR_HOST)/bin/kernel2minor -k $(KDIR)/loader-generic.elf -r $(VMLINUX)-lzma.minor-yaffs2 -e > + endif > -mkdir -p $(KDIR_TMP) > $(call Image/Build/Profile/$(IMAGE_PROFILE),buildkernel) > endef > diff --git a/target/linux/ar71xx/mikrotik/target.mk b/target/linux/ar71xx/mikrotik/target.mk > index b2fb0df..250252e 100644 > --- a/target/linux/ar71xx/mikrotik/target.mk > +++ b/target/linux/ar71xx/mikrotik/target.mk > @@ -1,4 +1,4 @@ > -BOARDNAME:=Mikrotik devices with NAND flash > +BOARDNAME:=Mikrotik devices with NAND/NOR flash > FEATURES += targz ramdisk > > define Target/Description > diff --git a/tools/Makefile b/tools/Makefile > index 187655e..2ea66c40 100644 > --- a/tools/Makefile > +++ b/tools/Makefile > @@ -38,6 +38,7 @@ tools-$(CONFIG_TARGET_x86) += qemu > tools-$(CONFIG_TARGET_mxs) += elftosb sdimage > tools-$(CONFIG_TARGET_brcm2708)$(CONFIG_TARGET_sunxi)$(CONFIG_TARGET_mxs) += mtools dosfstools > tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs > +tools-$(CONFIG_TARGET_ar71xx_mikrotik) += kernel2minor > tools-y += lzma squashfs4 > tools-$(BUILD_B43_TOOLS) += b43-tools > tools-$(BUILD_PPL_CLOOG) += ppl cloog > diff --git a/tools/kernel2minor/Makefile b/tools/kernel2minor/Makefile > new file mode 100644 > index 0000000..abf4d90 > --- /dev/null > +++ b/tools/kernel2minor/Makefile > @@ -0,0 +1,35 @@ > +# > +# Copyright (C) 2016 adron at yapic.net > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > +include $(TOPDIR)/rules.mk > + > +PKG_NAME:=kernel2minor > +PKG_VERSION:=0.01 > +PKG_RELEASE:=1 > + > +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz > +PKG_SOURCE_URL:=https://github.com/adron-s/kernel2minor.git > +PKG_SOURCE_PROTO:=git > +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) > +PKG_SOURCE_VERSION:=8d59a129acb5663e130a002e47ba2e05d7e29c57 > + > +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION) > + > +include $(INCLUDE_DIR)/host-build.mk > + > +define Host/Compile > + $(MAKE) -C $(HOST_BUILD_DIR) > +endef > + > +define Host/Install > + $(INSTALL_BIN) $(HOST_BUILD_DIR)/kernel2minor $(STAGING_DIR_HOST)/bin/ > +endef > + > +define Host/Clean > + rm -f $(STAGING_DIR_HOST)/bin/kernel2minor > +endef > + > +$(eval $(call HostBuild)) > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kvalo at qca.qualcomm.com Mon Apr 25 11:21:45 2016 From: kvalo at qca.qualcomm.com (Valo, Kalle) Date: Mon, 25 Apr 2016 15:21:45 +0000 Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: <2596438.Cv6xmiar05@debian64> (Christian Lamparter's message of "Sun, 24 Apr 2016 12:48:39 +0200") References: <2596438.Cv6xmiar05@debian64> Message-ID: <87potd3e9j.fsf@kamboji.qca.qualcomm.com> Christian Lamparter writes: > On Sunday, April 24, 2016 01:16:11 AM David Hutchison wrote: >> I spoke too soon: >> https://pci-ids.ucw.cz/read/PC/168c/0050 >> >> It is the QCA9887, so it's definitely on the PCIe bus and is being >> seen. > > Does ath10k support the QCA9887? I see no entry for this pci-id (168c:0050) > in ath10k's pci table [0] and there's no definition of it in the hardware > header either [1]. The chip-id is also not present. I CC'ed ath10k, since > this seems to be a new chip that might be easy to add. Currently ath10k does not support QCA9887. -- Kalle Valo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 11:37:24 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 17:37:24 +0200 Subject: [OpenWrt-Devel] [luci] [PATCH] luci-mod-admin-full: Add option to set anonymous_identity field In-Reply-To: <1460046131-3843-1-git-send-email-kevin@koconnor.net> References: <1460046131-3843-1-git-send-email-kevin@koconnor.net> Message-ID: <73d4b1ad-8d2e-efb7-0063-5492cff2e34d@phrozen.org> please send this as a PR against the luci tree on github John On 07/04/2016 18:22, Kevin O'Connor wrote: > Add support for setting the "anonymous_identity" field on EAP type > networks. > > Signed-off-by: Kevin O'Connor > --- > > I sent a similar request to the openwrt mailing list that adds support > to the hostapd.sh script. > > --- > .../luasrc/model/cbi/admin_network/wifi.lua | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua > index 945512e..09763e8 100644 > --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua > +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua > @@ -967,6 +967,24 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then > identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"}) > identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa"}) > > + anonymous_identity = s:taboption("encryption", Value, "anonymous_identity", translate("Anonymous Identity")) > + anonymous_identity:depends({mode="sta", eap_type="fast", encryption="wpa2"}) > + anonymous_identity:depends({mode="sta", eap_type="fast", encryption="wpa"}) > + anonymous_identity:depends({mode="sta", eap_type="peap", encryption="wpa2"}) > + anonymous_identity:depends({mode="sta", eap_type="peap", encryption="wpa"}) > + anonymous_identity:depends({mode="sta", eap_type="ttls", encryption="wpa2"}) > + anonymous_identity:depends({mode="sta", eap_type="ttls", encryption="wpa"}) > + anonymous_identity:depends({mode="sta-wds", eap_type="fast", encryption="wpa2"}) > + anonymous_identity:depends({mode="sta-wds", eap_type="fast", encryption="wpa"}) > + anonymous_identity:depends({mode="sta-wds", eap_type="peap", encryption="wpa2"}) > + anonymous_identity:depends({mode="sta-wds", eap_type="peap", encryption="wpa"}) > + anonymous_identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa2"}) > + anonymous_identity:depends({mode="sta-wds", eap_type="ttls", encryption="wpa"}) > + anonymous_identity:depends({mode="sta", eap_type="tls", encryption="wpa2"}) > + anonymous_identity:depends({mode="sta", eap_type="tls", encryption="wpa"}) > + anonymous_identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"}) > + anonymous_identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa"}) > + > password = s:taboption("encryption", Value, "password", translate("Password")) > password:depends({mode="sta", eap_type="fast", encryption="wpa2"}) > password:depends({mode="sta", eap_type="fast", encryption="wpa"}) > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ben.mulvihill at gmail.com Mon Apr 25 11:38:30 2016 From: ben.mulvihill at gmail.com (Ben Mulvihill) Date: Mon, 25 Apr 2016 17:38:30 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A In-Reply-To: References: <1461526179.10910.6.camel@merveille.lan> <95995f6d-efa9-edbb-7a85-67320d226162@phrozen.org> Message-ID: <1461598710.10910.48.camel@merveille.lan> On Mon, 2016-04-25 at 16:29 +0200, Martin Blumenstingl wrote: > On Mon, Apr 25, 2016 at 3:00 PM, John Crispin wrote: > > is this not a bit risky ? normally we try to keep them read-only so that > > users cannot accidentally kill them. is the calib data normally not > > located in the art partition or why do you need to copy it after flashing ? @John: As supplied from the manufacturer, the caldata is in a file in a jffs partition, which we overwrite anyway during installation. The art partition is specifically for openwrt. Up till now we have been copying the calibration data into it manually from the uboot command line. The trouble is that the only way to access the uboot command line involves some very fiddly soldering on minuscule pads. I am working on a way to install openwrt without a serial console, but to do it the user will need to be able to write to the art partition from openwrt. > I think the caldata partition is made writable because of some bug in > ath9k which required HH3A users to manually modify the ath9k caldata. > This is not necessary anymore since my patch (+ Felix' fix on top of > it) is now upstream: [0] @Martin. No, as you say, thanks to you and Felix, manual modification of the calibration data is no longer necessary. Brilliant! See above for explanation of why I am suggesting this change. > > @Ben: one probably has to enable caldata swapping in the .dts. I saw your comment on openwrt.ebilan.co.uk that the "ath,eep-swap;" flag should be added to the dts in order to use unmodified calibration data, but actually this does not appear to be the case. I have just installed a board using unmodified calibration data and unmodified dts (apart from read-only flag) and it works fine. I then tried adding "ath,eep-swap;" just to see what would happen and it no longer worked. I haven't investigated why "ath,eep-swap;" is no longer needed. Maybe the result of Felix's latest changes? In any case so much the better! > Then we have to figure out what to do with existing HH3A installations. > We'll have to do that anyway. > Martin > > [0] https://github.com/torvalds/linux/commit/6fa658fd5ab26a769ca7df7bfdd53c212a0ba852 Thanks, Ben _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 11:40:57 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 17:40:57 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A In-Reply-To: <1461598710.10910.48.camel@merveille.lan> References: <1461526179.10910.6.camel@merveille.lan> <95995f6d-efa9-edbb-7a85-67320d226162@phrozen.org> <1461598710.10910.48.camel@merveille.lan> Message-ID: <1ad8d57c-3361-4010-34d0-a3518db77ab2@phrozen.org> On 25/04/2016 17:38, Ben Mulvihill wrote: > On Mon, 2016-04-25 at 16:29 +0200, Martin Blumenstingl wrote: >> On Mon, Apr 25, 2016 at 3:00 PM, John Crispin wrote: >>> is this not a bit risky ? normally we try to keep them read-only so that >>> users cannot accidentally kill them. is the calib data normally not >>> located in the art partition or why do you need to copy it after flashing ? > > @John: As supplied from the manufacturer, the caldata is in a file > in a jffs partition, which we overwrite anyway during installation. > The art partition is specifically for openwrt. Up till now we have > been copying the calibration data into it manually from the uboot > command line. The trouble is that the only way to access the uboot > command line involves some very fiddly soldering on minuscule pads. > I am working on a way to install openwrt without a serial console, > but to do it the user will need to be able to write to the art > partition from openwrt. > fine, i'll merge it in that case John >> I think the caldata partition is made writable because of some bug in >> ath9k which required HH3A users to manually modify the ath9k caldata. >> This is not necessary anymore since my patch (+ Felix' fix on top of >> it) is now upstream: [0] > > @Martin. No, as you say, thanks to you and Felix, manual modification > of the calibration data is no longer necessary. Brilliant! See above > for explanation of why I am suggesting this change. > >> >> @Ben: one probably has to enable caldata swapping in the .dts. > > I saw your comment on openwrt.ebilan.co.uk that the "ath,eep-swap;" > flag should be added to the dts in order to use unmodified calibration > data, but actually this does not appear to be the case. I have just > installed a board using unmodified calibration data and unmodified dts > (apart from read-only flag) and it works fine. I then tried adding > "ath,eep-swap;" just to see what would happen and it no longer worked. > > I haven't investigated why "ath,eep-swap;" is no longer needed. Maybe > the result of Felix's latest changes? In any case so much the better! > >> Then we have to figure out what to do with existing HH3A installations. >> > > We'll have to do that anyway. > >> Martin >> >> [0] https://github.com/torvalds/linux/commit/6fa658fd5ab26a769ca7df7bfdd53c212a0ba852 > > Thanks, > > Ben > > > > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 11:42:01 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 17:42:01 +0200 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: Message-ID: i'm afraid they are both badly formatted On 25/04/2016 16:51, Andrew Yong wrote: > PATCHv1: > This patch adds support for the SamKnows version 8.0 Whitebox, built > around the MT7621 platform. 2.4GHz appears to be working, albeit > poorly; 5GHz not working yet. > > PATCHv2: > Fixed LED name in DTS. > > PATCHv3: > DTS: Syntax error fixed, LEDs and buttons mapped correctly now > - diag.sh updated to blink WPS LED on boot > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > matches SamKnows firmware > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > PATCHv4: > - I didn't commit some fixes in PATCHv3, that's fixed now > > PATCHv5: > - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter > to prevent soft brick by booting into nonexistent backup partition > - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, > needs further investigation, effective txpower is still 0) > - Experimenting on wifi but that'll be a future patch, board boots fine now. > > Signed-off-by: Andrew Yong > > diff --git a/package/boot/uboot-envtools/files/ramips > b/package/boot/uboot-envtools/files/ramips > index a759bcc..9ad5974 100644 > --- a/package/boot/uboot-envtools/files/ramips > +++ b/package/boot/uboot-envtools/files/ramips > @@ -24,7 +24,8 @@ linkits7688d | \ > wsr-600 | \ > wsr-1166 | \ > br6425 | \ > -miwifi-nano) > +miwifi-nano | \ > +sk-wb8) > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" > ;; > esac > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > b/target/linux/ramips/base-files/etc/board.d/01_leds > index e3b8500..df30085 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -241,6 +241,9 @@ rt-n14u) > set_wifi_led "$board:blue:air" > set_usb_led "$board:blue:usb" > ;; > +sk-wb8) > + set_usb_led "$board:green:usb" > + ;; > tiny-ac) > set_wifi_led "$board:orange:wifi" > set_usb_led "$board:green:usb" > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > index 3c958ae..3e876d2 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > pbr-m1|\ > psg1208|\ > sap-g3200u3|\ > + sk-wb8|\ > wf-2881|\ > whr-300hp2|\ > whr-600d|\ > @@ -310,6 +311,9 @@ ramips_setup_macs() > lan_mac=$(macaddr_setbit_la "$lan_mac") > wan_mac=$(mtd_get_mac_binary factory 32772) > ;; > + sk-wb8) > + wan_mac=$(mtd_get_mac_binary factory 57350) > + ;; > tew-691gr) > lan_mac=$(cat /sys/class/net/eth0/address) > wan_mac=$(macaddr_add "$lan_mac" 3) > diff --git a/target/linux/ramips/base-files/etc/diag.sh > b/target/linux/ramips/base-files/etc/diag.sh > index bd0ff05..534cc1c 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -76,6 +76,7 @@ get_status_led() { > ;; > awapn2403|\ > dir-645|\ > + sk-wb8|\ > wrh-300cr) > status_led="$board:green:wps" > ;; > diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount > b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount > new file mode 100644 > index 0000000..570fe16 > --- /dev/null > +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount > @@ -0,0 +1,22 @@ > +#!/bin/sh > + > +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts > +# to boot a recovery partition when bootcount > 3. We need to ensure this is > +# reset to 0 every boot > + > +do_bootcount_reset() { > + . /lib/ramips.sh > + > + local board=$(ramips_board_name) > + > + case "$board" in > + sk-wb8) > + echo "Board is SamKnows Whitebox 8, resetting > bootcount environment variable..." > + fw_setenv bootcount 0 > + ;; > + esac > + > + return 0 > +} > + > +boot_hook_add preinit_main do_bootcount_reset > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > index 550ec55..5c1715d 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -367,6 +367,9 @@ ramips_board_detect() { > *"RUT5XX") > name="rut5xx" > ;; > + *"SamKnows Whitebox 8") > + name="sk-wb8" > + ;; > *"SAP-G3200U3") > name="sap-g3200u3" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index 73ba6e6..fcc1b79 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -109,6 +109,7 @@ platform_check_image() { > rt-n56u|\ > rut5xx|\ > sap-g3200u3|\ > + sk-wb8|\ > sl-r7205|\ > tew-691gr|\ > tew-692gr|\ > diff --git a/target/linux/ramips/dts/SK-WB8.dts > b/target/linux/ramips/dts/SK-WB8.dts > new file mode 100644 > index 0000000..356a2b9 > --- /dev/null > +++ b/target/linux/ramips/dts/SK-WB8.dts > @@ -0,0 +1,121 @@ > +/dts-v1/; > + > +#include "mt7621.dtsi" > + > +/ { > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > + model = "SamKnows Whitebox 8"; > + > + memory at 0 { > + device_type = "memory"; > + reg = <0x0 0x4000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,57600"; > + }; > + > + palmbus at 1E000000 { > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "mx25l6405d"; > + reg = <0 0>; > + linux,modalias = "m25p80"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x7b0000>; > + }; > + > + }; > + }; > + }; > + > + pcie at 1e140000 { > + status = "okay"; > + > + pcie0 { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x0000>; > + mediatek,5ghz = <0>; > + }; > + }; > + > + pcie1 { > + mt76 at 1,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + }; > + > + ethernet at 1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + wps { > + label = "sk-wb8:green:wps"; > + gpios = <&gpio1 14 1>; > + }; > + > + usb { > + label = "sk-wb8:green:usb"; > + gpios = <&gpio1 15 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + wps { > + label = "wps"; > + gpios = <&gpio1 11 1>; > + linux,code = <0x211>; > + }; > + reset { > + label = "reset"; > + gpios = <&gpio1 9 1>; > + linux,code = <0x198>; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "i2c", "uart2", > "uart3", "rgmii2", "sdhci"; > + ralink,function = "gpio"; > + }; > + }; > + }; > +}; > diff --git a/target/linux/ramips/image/mt7621.mk > b/target/linux/ramips/image/mt7621.mk > index 0af9596..3e2f7eb 100644 > --- a/target/linux/ramips/image/mt7621.mk > +++ b/target/linux/ramips/image/mt7621.mk > @@ -132,6 +132,12 @@ define Device/ubnt-erx > endef > TARGET_DEVICES += ubnt-erx > > +define Device/sk-wb8 > + DTS := SK-WB8 > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > +endef > +TARGET_DEVICES += sk-wb8 > + > # FIXME: is this still needed? > define Image/Prepare > #define Build/Compile > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk > b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > new file mode 100644 > index 0000000..4b22ef3 > --- /dev/null > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > @@ -0,0 +1,18 @@ > +# > +# Copyright (C) 2015 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/SK-WB8 > + NAME:=SK-WB8 Profile > + PACKAGES:=\ > + kmod-usb-core kmod-usb3 \ > + kmod-ledtrig-usbdev uboot-envtools > +endef > + > +define Profile/SK-WB8/Description > + Package set optimized for the SamKnows SK-WB8. > +endef > +$(eval $(call Profile,SK-WB8)) > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Mon Apr 25 11:52:58 2016 From: me at ndoo.sg (Andrew Yong) Date: Mon, 25 Apr 2016 23:52:58 +0800 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: Message-ID: Working on my email client choice. Anyway, preinit seems to be before fw_setenv gets its bearings: Board is SamKnows Whitebox 8, resetting bootcount environment variable... Cannot parse config file: No such file or directory Error: environment not initialized Router still soft bricks after 3 reboots because the counter doesn't get reset. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ben.mulvihill at gmail.com Mon Apr 25 12:01:09 2016 From: ben.mulvihill at gmail.com (Ben Mulvihill) Date: Mon, 25 Apr 2016 18:01:09 +0200 Subject: [OpenWrt-Devel] [PATCH v2] lantiq: use dwc2 by default on all ar9 boards Message-ID: <1461600069.10910.53.camel@merveille.lan> The dwc2 USB driver now works on Lantiq ar9, but the default is still ltq-hcd-ar9. This patch switches to dwc2 by default. v2: all ar9 boards (v1 was just for BTHOMEHUBV3A and WBMR) Signed-off-by: Ben Mulvihill --- diff -uprN a/target/linux/lantiq/xway/profiles/avm.mk b/target/linux/lantiq/xway/profiles/avm.mk --- a/target/linux/lantiq/xway/profiles/avm.mk 2016-04-25 11:53:27.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/avm.mk 2016-04-25 17:47:37.000000000 +0200 @@ -4,7 +4,7 @@ define Profile/FRITZ7320 kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ - kmod-ltq-deu-ar9 kmod-ltq-hcd-ar9 + kmod-ltq-deu-ar9 kmod-usb-dwc2 endef $(eval $(call Profile,FRITZ7320)) diff -uprN a/target/linux/lantiq/xway/profiles/aztech.mk b/target/linux/lantiq/xway/profiles/aztech.mk --- a/target/linux/lantiq/xway/profiles/aztech.mk 2016-04-25 11:53:27.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/aztech.mk 2016-04-25 17:47:55.000000000 +0200 @@ -1,7 +1,7 @@ define Profile/GR7000 NAME:=Aztech GR7000 PACKAGES:= \ - kmod-ltq-deu-ar9 kmod-ltq-hcd-ar9 \ + kmod-ltq-deu-ar9 kmod-usb-dwc2 \ swconfig endef $(eval $(call Profile,GR7000)) diff -uprN a/target/linux/lantiq/xway/profiles/bt.mk b/target/linux/lantiq/xway/profiles/bt.mk --- a/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 17:44:19.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 17:46:23.000000000 +0200 @@ -18,7 +18,7 @@ $(eval $(call Profile,BTHOMEHUBV2B)) define Profile/BTHOMEHUBV3A NAME:=BT Home Hub 3A - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ kmod-ltq-deu-ar9 \ diff -uprN a/target/linux/lantiq/xway/profiles/buffalo.mk b/target/linux/lantiq/xway/profiles/buffalo.mk --- a/target/linux/lantiq/xway/profiles/buffalo.mk 2016-04-25 17:44:06.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/buffalo.mk 2016-04-25 17:46:23.000000000 +0200 @@ -1,6 +1,6 @@ define Profile/WBMRA NAME:=Buffalo WBMR-HP-G300H (A) - WBMR - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ @@ -12,7 +12,7 @@ $(eval $(call Profile,WBMRA)) define Profile/WBMRB NAME:=Buffalo WBMR-HP-G300H (B) - WBMR - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoa \ diff -uprN a/target/linux/lantiq/xway/profiles/netgear.mk b/target/linux/lantiq/xway/profiles/netgear.mk --- a/target/linux/lantiq/xway/profiles/netgear.mk 2016-04-25 11:53:27.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/netgear.mk 2016-04-25 17:48:34.000000000 +0200 @@ -1,6 +1,6 @@ define Profile/DGN3500 NAME:=Netgear DGN3500 - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ kmod-ath9k wpad-mini \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \ @@ -12,7 +12,7 @@ $(eval $(call Profile,DGN3500)) define Profile/DGN3500B NAME:=Netgear DGN3500B - PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \ + PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \ kmod-ath9k wpad-mini \ kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ diff -uprN a/target/linux/lantiq/xway/profiles/zte.mk b/target/linux/lantiq/xway/profiles/zte.mk --- a/target/linux/lantiq/xway/profiles/zte.mk 2016-04-25 11:53:27.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/zte.mk 2016-04-25 17:48:53.000000000 +0200 @@ -4,7 +4,7 @@ define Profile/H201L kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoe \ - kmod-ltq-deu-ar9 kmod-ltq-hcd-ar9 \ + kmod-ltq-deu-ar9 kmod-usb-dwc2 \ kmod-ltq-tapi kmod-ltq-vmmc \ swconfig endef diff -uprN a/target/linux/lantiq/xway/profiles/zyxel.mk b/target/linux/lantiq/xway/profiles/zyxel.mk --- a/target/linux/lantiq/xway/profiles/zyxel.mk 2016-04-25 11:53:27.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/zyxel.mk 2016-04-25 17:49:09.000000000 +0200 @@ -4,7 +4,7 @@ define Profile/P2601HNFX kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \ kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \ ltq-adsl-app ppp-mod-pppoe \ - kmod-ltq-deu-ar9 kmod-ltq-hcd-ar9 \ + kmod-ltq-deu-ar9 kmod-usb-dwc2 \ swconfig endef $(eval $(call Profile,P2601HNFX)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Mon Apr 25 12:01:10 2016 From: me at ndoo.sg (Andrew Yong) Date: Tue, 26 Apr 2016 00:01:10 +0800 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: Message-ID: <1461600070.5902.2.camel@ndoo.sg> Hopefully third time's the charm: PATCHv1: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. PATCHv2: Fixed LED name in DTS. PATCHv3: ?DTS: Syntax error fixed, LEDs and buttons mapped correctly now - diag.sh updated to blink WPS LED on boot - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset matches SamKnows firmware - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware PATCHv4: - I didn't commit some fixes in PATCHv3, that's fixed now PATCHv5: - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter to prevent soft brick by booting into nonexistent backup partition - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, needs further investigation, effective txpower is still 0) - Experimenting on wifi but that'll be a future patch, board boots fine now. ????Signed-off-by: Andrew Yong diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index a759bcc..9ad5974 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -24,7 +24,8 @@ linkits7688d | \ ?wsr-600 | \ ?wsr-1166 | \ ?br6425 | \ -miwifi-nano) +miwifi-nano | \ +sk-wb8) ? ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ? ;; ?esac diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..df30085 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -241,6 +241,9 @@ rt-n14u) ? set_wifi_led "$board:blue:air" ? set_usb_led "$board:blue:usb" ? ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; ?tiny-ac) ? set_wifi_led "$board:orange:wifi" ? set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..3e876d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() ? pbr-m1|\ ? psg1208|\ ? sap-g3200u3|\ + sk-wb8|\ ? wf-2881|\ ? whr-300hp2|\ ? whr-600d|\ @@ -310,6 +311,9 @@ ramips_setup_macs() ? lan_mac=$(macaddr_setbit_la "$lan_mac") ? wan_mac=$(mtd_get_mac_binary factory 32772) ? ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; ? tew-691gr) ? lan_mac=$(cat /sys/class/net/eth0/address) ? wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..534cc1c 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -76,6 +76,7 @@ get_status_led() { ? ;; ? awapn2403|\ ? dir-645|\ + sk-wb8|\ ? wrh-300cr) ? status_led="$board:green:wps" ? ;; diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount new file mode 100644 index 0000000..570fe16 --- /dev/null +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount @@ -0,0 +1,22 @@ +#!/bin/sh + +# SamKnows Whitebox 8 increments a bootcount variable every??boot and attempts +# to boot a recovery partition when bootcount > 3. We need to ensure this is +# reset to 0 every boot + +do_bootcount_reset() { + . /lib/ramips.sh + + local board=$(ramips_board_name) + + case "$board" in + sk-wb8) + echo "Board is SamKnows Whitebox 8, resetting bootcount environment variable..." + fw_setenv bootcount 0 + ;; + esac + + return 0 +} + +boot_hook_add preinit_main do_bootcount_reset diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..5c1715d 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -367,6 +367,9 @@ ramips_board_detect() { ? *"RUT5XX") ? name="rut5xx" ? ;; + *"SamKnows Whitebox 8") + name="sk-wb8" + ;; ? *"SAP-G3200U3") ? name="sap-g3200u3" ? ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..fcc1b79 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -109,6 +109,7 @@ platform_check_image() { ? rt-n56u|\ ? rut5xx|\ ? sap-g3200u3|\ + sk-wb8|\ ? sl-r7205|\ ? tew-691gr|\ ? tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..356a2b9 --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,121 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows Whitebox 8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 14 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 15 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 11 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio1 9 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0af9596..3e2f7eb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -132,6 +132,12 @@ define Device/ubnt-erx ?endef ?TARGET_DEVICES += ubnt-erx ? +define Device/sk-wb8 +??DTS := SK-WB8 +??IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + ?# FIXME: is this still needed? ?define Image/Prepare ?#define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..4b22ef3 --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SK-WB8 Profile + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev uboot-envtools +endef + +define Profile/SK-WB8/Description + Package set optimized for the SamKnows SK-WB8. +endef +$(eval $(call Profile,SK-WB8)) On Mon, 2016-04-25 at 17:42 +0200, John Crispin wrote: > i'm afraid they are both badly formatted > > > > On 25/04/2016 16:51, Andrew Yong wrote: > > > > [snip] > > _______________________________________________ > > openwrt-devel mailing list > > openwrt-devel at lists.openwrt.org > > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ben.mulvihill at gmail.com Mon Apr 25 12:06:29 2016 From: ben.mulvihill at gmail.com (Ben Mulvihill) Date: Mon, 25 Apr 2016 18:06:29 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: install uboot-envtools by default on BTHOMEHUBV3A Message-ID: <1461600389.10910.57.camel@merveille.lan> The only way to access the u-boot console on the BTHOMEHUBV3A is by soldering a serial console onto some really tiny pads. To enable installation without soldering it would be helpful to be able to modify the uboot environment from within the ramdisk image used as part of the installation process. Signed-off-by: Ben Mulvihill --- diff -uprN a/target/linux/lantiq/xway/profiles/bt.mk b/target/linux/lantiq/xway/profiles/bt.mk --- a/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 12:05:49.000000000 +0200 +++ b/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 12:08:53.000000000 +0200 @@ -24,7 +24,7 @@ define Profile/BTHOMEHUBV3A kmod-ltq-deu-ar9 \ ltq-adsl-app ppp-mod-pppoa \ kmod-ath9k wpad-mini \ - swconfig + swconfig uboot-envtools endef BTHOMEHUBV3A_UBIFS_OPTS:="-m 512 -e 15872 -c 1959" _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 12:28:47 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 18:28:47 +0200 Subject: [OpenWrt-Devel] [PATCH/RFC] dnsmasq: run as dedicated UID/GID In-Reply-To: <20160422042613.GA4426@makrotopia.org> References: <20160422042613.GA4426@makrotopia.org> Message-ID: <6f5cc32c-0f52-6904-ec52-3232a50ae91a@phrozen.org> On 22/04/2016 06:26, Daniel Golle wrote: > Running dnsmasq in a dedicated user/group allows matching its outgoing > traffic more easily using iptables' owner match. > Add UID/GID to the package metadata and append the user/group > parameters to the init script. > > Signed-off-by: Daniel Golle > --- > package/network/services/dnsmasq/Makefile | 1 + > package/network/services/dnsmasq/files/dnsmasq.init | 4 +++- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile > index a5c3740..9a0f165 100644 > --- a/package/network/services/dnsmasq/Makefile > +++ b/package/network/services/dnsmasq/Makefile > @@ -34,6 +34,7 @@ define Package/dnsmasq/Default > CATEGORY:=Base system > TITLE:=DNS and DHCP server > URL:=http://www.thekelleys.org.uk/dnsmasq/ > + USERID:=dnsmasq=65453:dnsmasq=65453 please us an id between 0-999. ideally check what debian uses. John > endef > > define Package/dnsmasq > diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init > index 61ded6a..83fcbb0 100644 > --- a/package/network/services/dnsmasq/files/dnsmasq.init > +++ b/package/network/services/dnsmasq/files/dnsmasq.init > @@ -218,6 +218,8 @@ dnsmasq() { > mkdir -p /tmp/hosts /tmp/dnsmasq.d > xappend "--addn-hosts=/tmp/hosts" > xappend "--conf-dir=/tmp/dnsmasq.d" > + xappend "--user=dnsmasq" > + xappend "--group=dnsmasq" > > echo >> $CONFIGFILE > > @@ -589,7 +591,7 @@ start_service() { > > if [ ! -f "$TIMESTAMPFILE" ]; then > touch "$TIMESTAMPFILE" > - chown nobody.nogroup "$TIMESTAMPFILE" > + chown dnsmasq.dnsmasq "$TIMESTAMPFILE" > fi > > echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 12:32:38 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 18:32:38 +0200 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: <1461600070.5902.2.camel@ndoo.sg> References: <1461600070.5902.2.camel@ndoo.sg> Message-ID: On 25/04/2016 18:01, Andrew Yong wrote: > diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount > new file mode 100644 > index 0000000..570fe16 > --- /dev/null > +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount > @@ -0,0 +1,22 @@ > +#!/bin/sh > + > +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts > +# to boot a recovery partition when bootcount > 3. We need to ensure this is > +# reset to 0 every boot > + > +do_bootcount_reset() { > + . /lib/ramips.sh > + > + local board=$(ramips_board_name) > + > + case "$board" in > + sk-wb8) > + echo "Board is SamKnows Whitebox 8, resetting bootcount environment variable..." > + fw_setenv bootcount 0 > + ;; > + esac > + > + return 0 > +} > + > +boot_hook_add preinit_main do_bootcount_reset does this actually work ? thinking about it, you might need to have uci-default run for it to work properly or alternatively call uboot-env directly without the fw_* abstraction layer John _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at daniel.thecshore.com Mon Apr 25 12:34:38 2016 From: openwrt at daniel.thecshore.com (Daniel Dickinson) Date: Mon, 25 Apr 2016 12:34:38 -0400 Subject: [OpenWrt-Devel] [PATCH/RFC] dnsmasq: run as dedicated UID/GID In-Reply-To: <6f5cc32c-0f52-6904-ec52-3232a50ae91a@phrozen.org> References: <20160422042613.GA4426@makrotopia.org> <6f5cc32c-0f52-6904-ec52-3232a50ae91a@phrozen.org> Message-ID: <571E471E.7020506@daniel.thecshore.com> > > please us an id between 0-999. ideally check what debian uses. > For most system services, with a very small number exceptions, debian auto-assigns id < 500(?), and which service gets id depends on order of package installation (which can be hassle with when trying to do network filesystems). Regards, Daniel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Mon Apr 25 12:37:42 2016 From: weedy2887 at gmail.com (Weedy) Date: Mon, 25 Apr 2016 12:37:42 -0400 Subject: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat In-Reply-To: <571E16E7.9050007@openwrt.org> References: <571DE63E.2040405@gmail.com> <571E16E7.9050007@openwrt.org> Message-ID: On 25 Apr 2016 09:09, "Jo-Philipp Wich" wrote: > > Hi! > > Thanks for the patch, I fixed the include issue directly in Git, so this > patch can be dropped and make-ext4fs should be updated in tools/ to a > newer version instead. > > ~ Jo Have you fixed all the packages that need this? Make-ext4fs, e2fsprogs, mtd-utils, findutils, and both the squashfs packages. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Mon Apr 25 12:46:39 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Mon, 25 Apr 2016 18:46:39 +0200 Subject: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat In-Reply-To: References: <571DE63E.2040405@gmail.com> <571E16E7.9050007@openwrt.org> Message-ID: <571E49EF.1050908@openwrt.org> Hi, no, I only cared about make-ext4fs as I maintain this fork. ~ Jo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dhutchison at bluemesh.net Mon Apr 25 12:53:41 2016 From: dhutchison at bluemesh.net (David Hutchison) Date: Mon, 25 Apr 2016 10:53:41 -0600 Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: <87potd3e9j.fsf@kamboji.qca.qualcomm.com> References: <2596438.Cv6xmiar05@debian64> <87potd3e9j.fsf@kamboji.qca.qualcomm.com> Message-ID: Hello, So with some modifications to pci.c, hw.h and core.c I was able to get the radio initialized! :) pci.c: added QCA9887_DEVICE_ID, modified ath10k_pci_id_table and ath10k_pci_supp_chips core.c: Duplicated QCA988X entry in ath10k_hw_params_list and passed 0x4100016d as the ID ( left everything else the same ) hw.h: added definitions for QCA9887 I found "https://github.com/kvalo/ath10k-firmware/blob/master/QCA9887/firmware-5.bin_10.2.3.31.7-1" on your github and replaced /lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin on my board. hotplug.d then loaded QCA9887 firmware on next boot. Of course my approach was very much a hack. If there is anything I can contribute to creating a patch for ath10k, please let me know. I would love to help! dmesg [ 18.920000] ath10k_pci 0000:00:00.0: pci irq legacy interrupts 0 irq_mode 0 reset_mode 0 [ 19.030000] rev_id 00000000 QCA9887 [ 19.030000] dev_id 00000050 QCA9887 [ 20.460000] ath10k_pci 0000:00:00.0: qca988x hw2.0 (0x4100016d, 0x004000ff sub 0000:0000) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1 wmi-op 5 htt-op 2 cal file max-sta 1p [ 20.480000] ath10k_pci 0000:00:00.0: debug 1 debugfs 1 tracing 0 dfs 0 testmode 1 iw phy phy1 info Wiphy phy1 max # scan SSIDs: 16 max scan IEs length: 199 bytes Retry short limit: 7 Retry long limit: 4 Coverage class: 0 (up to 0m) Device supports AP-side u-APSD. Available Antennas: TX 0x1 RX 0x1 Configured Antennas: TX 0x1 RX 0x1 Supported interface modes: * managed * AP * AP/VLAN * monitor * mesh point Band 2: Capabilities: 0x19e3 RX LDPC HT20/HT40 Static SM Power Save RX HT20 SGI RX HT40 SGI TX STBC RX STBC 1-stream Max AMSDU length: 7935 bytes DSSS/CCK HT40 Maximum RX AMPDU length 65535 bytes (exponent: 0x003) Minimum RX AMPDU time spacing: 8 usec (0x06) HT TX/RX MCS rate indexes supported: 0-7 VHT Capabilities (0x338001b2): Max MPDU length: 11454 Supported Channel Width: neither 160 nor 80+80 RX LDPC short GI (80 MHz) TX STBC RX antenna pattern consistency TX antenna pattern consistency VHT RX MCS set: 1 streams: MCS 0-9 2 streams: not supported 3 streams: not supported 4 streams: not supported 5 streams: not supported 6 streams: not supported 7 streams: not supported 8 streams: not supported VHT RX highest supported: 0 Mbps VHT TX MCS set: 1 streams: MCS 0-9 2 streams: not supported 3 streams: not supported 4 streams: not supported 5 streams: not supported 6 streams: not supported 7 streams: not supported 8 streams: not supported VHT TX highest supported: 0 Mbps Frequencies: * 5180 MHz [36] (23.0 dBm) * 5200 MHz [40] (23.0 dBm) * 5220 MHz [44] (23.0 dBm) * 5240 MHz [48] (23.0 dBm) * 5260 MHz [52] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5280 MHz [56] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5300 MHz [60] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5320 MHz [64] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5500 MHz [100] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5520 MHz [104] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5540 MHz [108] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5560 MHz [112] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5580 MHz [116] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5600 MHz [120] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5620 MHz [124] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5640 MHz [128] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5660 MHz [132] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5680 MHz [136] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5700 MHz [140] (23.0 dBm) (no IR, radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5720 MHz [144] (23.0 dBm) (radar detection) DFS state: usable (for 39 sec) DFS CAC time: 60000 ms * 5745 MHz [149] (30.0 dBm) * 5765 MHz [153] (30.0 dBm) * 5785 MHz [157] (30.0 dBm) * 5805 MHz [161] (30.0 dBm) * 5825 MHz [165] (30.0 dBm) valid interface combinations: * #{ AP, mesh point } <= 8, total <= 8, #channels <= 1, STA/AP BI must match HT Capability overrides: * MCS: ff ff ff ff ff ff ff ff ff ff * maximum A-MSDU length * supported channel width * short GI for 40 MHz * max A-MPDU length exponent * min MPDU start spacing -- Davey On Mon, Apr 25, 2016 at 9:21 AM, Valo, Kalle wrote: > Christian Lamparter writes: > >> On Sunday, April 24, 2016 01:16:11 AM David Hutchison wrote: >>> I spoke too soon: >>> https://pci-ids.ucw.cz/read/PC/168c/0050 >>> >>> It is the QCA9887, so it's definitely on the PCIe bus and is being >>> seen. >> >> Does ath10k support the QCA9887? I see no entry for this pci-id (168c:0050) >> in ath10k's pci table [0] and there's no definition of it in the hardware >> header either [1]. The chip-id is also not present. I CC'ed ath10k, since >> this seems to be a new chip that might be easy to add. > > Currently ath10k does not support QCA9887. > > -- > Kalle Valo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Mon Apr 25 12:54:58 2016 From: weedy2887 at gmail.com (Weedy) Date: Mon, 25 Apr 2016 12:54:58 -0400 Subject: [OpenWrt-Devel] [PATCH 01/05] [tools] e2fsprogs glibc >= 2.23 compat Message-ID: <571E4BE2.4090605@gmail.com> With the update to glibc 2.23, sys/types.h doesn't inherit sys/sysmacros.h anymore. We need to include it manually. Signed-off-by: Weedy --- /dev/null 2016-04-18 05:53:30.273258717 -0400 +++ tools/e2fsprogs/patches/125-glibc-2.23-sysmacros.patch 2016-04-24 14:58:32.704376584 -0400 @@ -0,0 +1,20 @@ +--- a/lib/blkid/devname.c.bak 2016-04-24 14:55:25.665819444 -0400 ++++ b/lib/blkid/devname.c 2016-04-24 14:55:45.589354153 -0400 +@@ -25,6 +25,7 @@ + #include + #if HAVE_SYS_TYPES_H + #include ++#include + #endif + #include + #if HAVE_SYS_STAT_H +--- a/lib/ext2fs/ext2fs.h.bak 2016-04-24 14:56:14.822982962 -0400 ++++ b/lib/ext2fs/ext2fs.h 2016-04-24 14:56:31.613152667 -0400 +@@ -49,6 +49,7 @@ + + #ifdef HAVE_SYS_TYPES_H + #include ++#include + #endif + + #include _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Mon Apr 25 12:56:45 2016 From: weedy2887 at gmail.com (Weedy) Date: Mon, 25 Apr 2016 12:56:45 -0400 Subject: [OpenWrt-Devel] [PATCH 02/05] [tools] findutils glibc >= 2.23 compat Message-ID: <571E4C4D.3060707@gmail.com> With the update to glibc 2.23, sys/types.h doesn't inherit sys/sysmacros.h anymore. We need to include it manually. Signed-off-by: Weedy --- /dev/null 2016-04-18 05:53:30.273258717 -0400 +++ tools/findutils/patches/125-glibc-2.23-sysmacros.patch 2016-04-24 15:36:39.330172567 -0400 @@ -0,0 +1,10 @@ +--- a/gl/lib/mountlist.c.bak 2016-04-24 15:33:43.668421848 -0400 ++++ b/gl/lib/mountlist.c 2016-04-24 15:34:12.972045613 -0400 +@@ -59,6 +59,7 @@ + #ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ + # include + # include ++# include + # if !defined MOUNTED + # if defined _PATH_MOUNTED /* GNU libc */ + # define MOUNTED _PATH_MOUNTED _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Mon Apr 25 12:59:01 2016 From: weedy2887 at gmail.com (Weedy) Date: Mon, 25 Apr 2016 12:59:01 -0400 Subject: [OpenWrt-Devel] [PATCH 03/05] [tools] mtd-utils glibc >= 2.23 compat Message-ID: <571E4CD5.3090706@gmail.com> With the update to glibc 2.23, sys/types.h doesn't inherit sys/sysmacros.h anymore. We need to include it manually. Signed-off-by: Weedy --- /dev/null 2016-04-18 05:53:30.273258717 -0400 +++ tools/mtd-utils/patches/125-glibc-2.23-sysmacros.patch 2016-04-24 15:31:35.050480434 -0400 @@ -0,0 +1,50 @@ +--- a/lib/libmtd.c 2016-04-24 15:19:05.999661494 -0400 ++++ b/lib/libmtd.c 2016-04-24 15:19:12.316391945 -0400 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/lib/libmtd_legacy.c 2016-04-24 15:19:31.323250535 -0400 ++++ b/lib/libmtd_legacy.c 2016-04-24 15:19:35.886629947 -0400 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/mkfs.ubifs/mkfs.ubifs.h 2016-04-24 15:26:48.110969877 -0400 ++++ b/mkfs.ubifs/mkfs.ubifs.h 2016-04-24 15:27:15.347906492 -0400 +@@ -46,6 +46,7 @@ + + #include + #include ++#include + #include + #include + #include +--- a/ubi-utils/libubi.c 2016-04-24 15:12:47.639174301 -0400 ++++ b/ubi-utils/libubi.c 2016-04-24 15:12:57.779276691 -0400 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + #include "libubi_int.h" + #include "common.h" +--- a/mkfs.jffs2.c ++++ b/mkfs.jffs2.c +@@ -50,6 +50,7 @@ + #define PROGRAM_NAME "mkfs.jffs2" + + #include ++#include + #include + #include + #include _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Mon Apr 25 13:00:33 2016 From: weedy2887 at gmail.com (Weedy) Date: Mon, 25 Apr 2016 13:00:33 -0400 Subject: [OpenWrt-Devel] [PATCH 04/05] [tools] squashfs glibc >= 2.23 compat Message-ID: <571E4D31.3030807@gmail.com> With the update to glibc 2.23, sys/types.h doesn't inherit sys/sysmacros.h anymore. We need to include it manually. Signed-off-by: Weedy --- /dev/null 2016-04-18 05:53:30.273258717 -0400 +++ tools/squashfs/patches/125-glibc-2.23-sysmacros.patch 2016-04-24 16:16:39.524863687 -0400 @@ -0,0 +1,20 @@ +--- a/squashfs-tools/mksquashfs.c 2016-04-24 16:10:19.230996009 -0400 ++++ b/squashfs-tools/mksquashfs.c 2016-04-24 16:10:54.671356457 -0400 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/squashfs-tools/unsquashfs.c 2016-04-24 16:14:24.310155265 -0400 ++++ b/squashfs-tools/unsquashfs.c 2016-04-24 16:14:46.560381562 -0400 +@@ -25,6 +25,7 @@ + #define FALSE 0 + #include + #include ++#include + #include + #include + #include _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Mon Apr 25 13:01:46 2016 From: weedy2887 at gmail.com (Weedy) Date: Mon, 25 Apr 2016 13:01:46 -0400 Subject: [OpenWrt-Devel] [PATCH 05/05] [tools] squashfs4 glibc >= 2.23 compat Message-ID: <571E4D7A.50308@gmail.com> With the update to glibc 2.23, sys/types.h doesn't inherit sys/sysmacros.h anymore. We need to include it manually. Signed-off-by: Weedy --- /dev/null 2016-04-18 05:53:30.273258717 -0400 +++ tools/squashfs4/patches/125-glibc-2.23-sysmacros.patch 2016-04-24 16:22:30.271759670 -0400 @@ -0,0 +1,20 @@ +--- a/squashfs-tools/mksquashfs.c 2016-04-24 16:10:19.230996009 -0400 ++++ b/squashfs-tools/mksquashfs.c 2016-04-24 16:10:54.671356457 -0400 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/squashfs-tools/unsquashfs.c 2016-04-24 16:14:24.310155265 -0400 ++++ b/squashfs-tools/unsquashfs.c 2016-04-24 16:14:46.560381562 -0400 +@@ -30,6 +30,7 @@ + #include "xattr.h" + + #include ++#include + + struct cache *fragment_cache, *data_cache; + struct queue *to_reader, *to_deflate, *to_writer, *from_writer; _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Mon Apr 25 13:34:28 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Mon, 25 Apr 2016 19:34:28 +0200 Subject: [OpenWrt-Devel] [PATCH 02/05] [tools] findutils glibc >= 2.23 compat In-Reply-To: <571E4C4D.3060707@gmail.com> References: <571E4C4D.3060707@gmail.com> Message-ID: <571E5524.2040900@openwrt.org> Hi, this should be handled already, configure uses AC_HEADER_MAJOR and mountlist.c does: #ifdef MAJOR_IN_SYSMACROS #include #define HAVE_MAJOR ... did you patched findutils proactively or was there an actual build issue? ~ Jo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Mon Apr 25 14:25:54 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Mon, 25 Apr 2016 20:25:54 +0200 Subject: [OpenWrt-Devel] [PATCH/RFC] dnsmasq: run as dedicated UID/GID In-Reply-To: <6f5cc32c-0f52-6904-ec52-3232a50ae91a@phrozen.org> References: <20160422042613.GA4426@makrotopia.org> <6f5cc32c-0f52-6904-ec52-3232a50ae91a@phrozen.org> Message-ID: <20160425182553.GA1786@makrotopia.org> Hi John! On Mon, Apr 25, 2016 at 06:28:47PM +0200, John Crispin wrote: > > > On 22/04/2016 06:26, Daniel Golle wrote: > > Running dnsmasq in a dedicated user/group allows matching its outgoing > > traffic more easily using iptables' owner match. > > Add UID/GID to the package metadata and append the user/group > > parameters to the init script. > > > > Signed-off-by: Daniel Golle > > --- > > package/network/services/dnsmasq/Makefile | 1 + > > package/network/services/dnsmasq/files/dnsmasq.init | 4 +++- > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile > > index a5c3740..9a0f165 100644 > > --- a/package/network/services/dnsmasq/Makefile > > +++ b/package/network/services/dnsmasq/Makefile > > @@ -34,6 +34,7 @@ define Package/dnsmasq/Default > > CATEGORY:=Base system > > TITLE:=DNS and DHCP server > > URL:=http://www.thekelleys.org.uk/dnsmasq/ > > + USERID:=dnsmasq=65453:dnsmasq=65453 > > please us an id between 0-999. ideally check what debian uses. This is what debian does (in dnsmasq package postinst): --- # create a user to run as (code stolen from dovecot-common) if [ "$1" = "configure" ]; then if [ -z "`id -u dnsmasq 2> /dev/null`" ]; then adduser --system --home /var/lib/misc --gecos "dnsmasq" \ --no-create-home --disabled-password \ --quiet dnsmasq || true fi # Make the directory where we keep the pid file - this # has to be owned by "dnsmasq" do that the file can be unlinked. if [ ! -d /var/run/dnsmasq ]; then mkdir /var/run/dnsmasq chown dnsmasq:nogroup /var/run/dnsmasq fi --- This is what wikipedia suggests: https://en.wikipedia.org/wiki/User_identifier#Reserved_ranges What we do in OpenWrt seems to be more similar to the FreeBSD'ish way mentioned on that wikipedia page. However, FreeBSD doesn't have a UID asigned for dnsmasq (but does for bind and unbound), see http://svnweb.freebsd.org/ports/head/UIDs Considering what you wrote and looking at the above, I guess choosing a value between 100 and 499 would be the wisest thing to do, right? So I'll pick 453, that's within that range and isn't allocated for anything else in OpenWrt nor FreeBSD's UID register. I reckon that UID allocation rules should be documented and enforced for existing packages, a quick grep revealed that most packages use an UID < 100 which should only be used in post-install scripts and such according to LSB (which I wouldn't give much about). Also, there are many packages in the feed installing UIDs > 999 which is probably the convention you saw violated by using 65453 for dnsmasq, I probably had a look at the portmap package build. The only package in core seems to be network/services/lldpd/Makefile: USERID:=lldp=121:lldp=129 which is inside the range LSB suggests... Other packages adding UIDs: admin/zabbix/Makefile: USERID:=zabbix=53:zabbix=53 libs/avahi/Makefile: USERID:=avahi=105:avahi=105 libs/postgresql/Makefile: USERID:=postgres=5432:postgres=5432 mail/dovecot/Makefile: USERID:=dovecot=59:dovecot=59 mail/fdm/Makefile: USERID:=_fdm=99:_fdm=99 multimedia/icecast/Makefile: USERID:=icecast=87:icecast=87 net/transmission/Makefile: USERID:=transmission=224:transmission=224 net/prosody/Makefile: USERID:=prosody=54:prosody=54 net/knot/Makefile: USERID:=knot=5353:knot=5353 net/openssh/Makefile: USERID:=sshd=22:sshd=22 net/openssh/Makefile: USERID:=sshd=22:sshd=22 net/mosquitto/Makefile: USERID:=mosquitto=200:mosquitto=200 net/portmap/Makefile: USERID:=rpc=65533:rpc=65533 net/privoxy/Makefile: USERID:=privoxy=8118:privoxy=8118 net/ocserv/Makefile: USERID:=ocserv=72:ocserv=72 net/ntpd/Makefile: USERID:=ntp=123:ntp=123 net/dmapd/Makefile: USERID:=dmapd=56:dmapd=56 net/bind/Makefile:USERID:=bind=57:bind=57 net/gnunet/Makefile: USERID:=gnunet=400:gnunet=400 net/radicale/Makefile: USERID:=radicale=5232:radicale=5232 net/tor/Makefile: USERID:=tor=52:tor=52 net/chrony/Makefile: USERID:=chrony=323:chrony=323 sound/pulseaudio/Makefile: USERID:=pulse=51:pulse=51 sound/upmpdcli/Makefile: USERID:=upmpdcli=89:upmpdcli=89 sound/pianod/Makefile: USERID:=pianod=88:pianod=88 Cheers Daniel > John > > > endef > > > > define Package/dnsmasq > > diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init > > index 61ded6a..83fcbb0 100644 > > --- a/package/network/services/dnsmasq/files/dnsmasq.init > > +++ b/package/network/services/dnsmasq/files/dnsmasq.init > > @@ -218,6 +218,8 @@ dnsmasq() { > > mkdir -p /tmp/hosts /tmp/dnsmasq.d > > xappend "--addn-hosts=/tmp/hosts" > > xappend "--conf-dir=/tmp/dnsmasq.d" > > + xappend "--user=dnsmasq" > > + xappend "--group=dnsmasq" > > > > echo >> $CONFIGFILE > > > > @@ -589,7 +591,7 @@ start_service() { > > > > if [ ! -f "$TIMESTAMPFILE" ]; then > > touch "$TIMESTAMPFILE" > > - chown nobody.nogroup "$TIMESTAMPFILE" > > + chown dnsmasq.dnsmasq "$TIMESTAMPFILE" > > fi > > > > echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE > > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Mon Apr 25 14:40:18 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Mon, 25 Apr 2016 20:40:18 +0200 Subject: [OpenWrt-Devel] [PATCH v2] dnsmasq: run as dedicated UID/GID In-Reply-To: <6f5cc32c-0f52-6904-ec52-3232a50ae91a@phrozen.org> References: <6f5cc32c-0f52-6904-ec52-3232a50ae91a@phrozen.org> Message-ID: <20160425184009.GA2144@makrotopia.org> Running dnsmasq in a dedicated user/group allows matching its outgoing traffic more easily using iptables' owner match. Add UID/GID to the package metadata and append the user/group parameters to the init script. Signed-off-by: Daniel Golle --- package/network/services/dnsmasq/Makefile | 3 ++- package/network/services/dnsmasq/files/dnsmasq.init | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index a5c3740..a5b96a3 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dnsmasq PKG_VERSION:=2.75 -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq @@ -34,6 +34,7 @@ define Package/dnsmasq/Default CATEGORY:=Base system TITLE:=DNS and DHCP server URL:=http://www.thekelleys.org.uk/dnsmasq/ + USERID:=dnsmasq=453:dnsmasq=453 endef define Package/dnsmasq diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 61ded6a..83fcbb0 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -218,6 +218,8 @@ dnsmasq() { mkdir -p /tmp/hosts /tmp/dnsmasq.d xappend "--addn-hosts=/tmp/hosts" xappend "--conf-dir=/tmp/dnsmasq.d" + xappend "--user=dnsmasq" + xappend "--group=dnsmasq" echo >> $CONFIGFILE @@ -589,7 +591,7 @@ start_service() { if [ ! -f "$TIMESTAMPFILE" ]; then touch "$TIMESTAMPFILE" - chown nobody.nogroup "$TIMESTAMPFILE" + chown dnsmasq.dnsmasq "$TIMESTAMPFILE" fi echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at vittgam.net Mon Apr 25 14:51:26 2016 From: openwrt at vittgam.net (Vittorio G (VittGam)) Date: Mon, 25 Apr 2016 20:51:26 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed. In-Reply-To: <713f61da-42b4-a63b-1248-26d20010978a@phrozen.org> References: <5719C601.5020906@kresin.me> <836fa2b97c0278e82b40b82424d24f42@vittgam.net> <713f61da-42b4-a63b-1248-26d20010978a@phrozen.org> Message-ID: <4f1531458edc58dec13890c13ce89f09@vittgam.net> On 25/04/2016 15:14:31 CEST, John Crispin wrote: > i understand the problem, but the WPS led is for WPS and should be left > free for the WPS feature eventually. so nack on this one i am afraid. Ok, thank you anyway. For the record, if anyone wants the old behaviour they just need to put this in /etc/config/system: config led 'led_system' option name 'System' option sysfs 'tdw89x0:green:wps' option default '1' And the LED will default to on after a successful boot. Cheers, Vittorio _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Mon Apr 25 15:01:04 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Mon, 25 Apr 2016 21:01:04 +0200 Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: References: <87potd3e9j.fsf@kamboji.qca.qualcomm.com> Message-ID: <112436203.W4fT509tru@debian64> Hello, On Monday, April 25, 2016 10:53:41 AM David Hutchison wrote: > So with some modifications to pci.c, hw.h and core.c I was able to get > the radio initialized! :) Hey, that's nice! Can you make and post a patch for that? I'm sure if it's just a matter of adding the new pci and chip ids to the tables. You could just go ahead and post it, so it will be picked up. > pci.c: added QCA9887_DEVICE_ID, modified ath10k_pci_id_table and > ath10k_pci_supp_chips > core.c: Duplicated QCA988X entry in ath10k_hw_params_list and passed > 0x4100016d as the ID ( left everything else the same ) > hw.h: added definitions for QCA9887 > > I found "https://github.com/kvalo/ath10k-firmware/blob/master/QCA9887/firmware-5.bin_10.2.3.31.7-1" > on your github and replaced > /lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin on my board. > hotplug.d then loaded QCA9887 firmware on next boot. > > Of course my approach was very much a hack. If there is anything I can > contribute to creating a patch for ath10k, please let me know. I would > love to help! > > dmesg > [ 18.920000] ath10k_pci 0000:00:00.0: pci irq legacy interrupts 0 > irq_mode 0 reset_mode 0 > [ 19.030000] rev_id 00000000 QCA9887 > [ 19.030000] dev_id 00000050 QCA9887 > [ 20.460000] ath10k_pci 0000:00:00.0: qca988x hw2.0 (0x4100016d, > 0x004000ff sub 0000:0000) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1 > wmi-op 5 htt-op 2 cal file max-sta 1p > [ 20.480000] ath10k_pci 0000:00:00.0: debug 1 debugfs 1 tracing 0 > dfs 0 testmode 1 > ... Does the device work? Can you scan for networks, connect to networks and create networks? That would be good to know. Regards, Christian _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Mon Apr 25 16:02:24 2016 From: john at phrozen.org (John Crispin) Date: Mon, 25 Apr 2016 22:02:24 +0200 Subject: [OpenWrt-Devel] [RFC] ar71xx: add TP-Link TL-WR810N support In-Reply-To: <1460289627-27414-1-git-send-email-jens.steinhauser@gmail.com> References: <1460289627-27414-1-git-send-email-jens.steinhauser@gmail.com> Message-ID: Hi On 10/04/2016 14:00, Jens Steinhauser wrote: > This patch adds support for the TP-Link TL-WR810N. > https://wiki.openwrt.org/toh/tp-link/tl-wr810n > > The device has a slide switch to select its mode of operation when using > the stock firmware. After looking at how it's implemented for similar > devices, I also used 'struct gpio_keys_button { .type = EV_SW, .code = BTN_... }' > to support the switch, but both 'switch_b0' and 'switch_b1' are missing > when using 'evtest' and 'thd', only the 'reset' button shows up in the > output of the programs. > > Changing '.code' to some SW_ value, for example SW_LID and SW_TABLET_MODE, > makes them usable with both 'evtest' and 'thd'. Am I missing something, > or is EV_SW + BTN_... an invalid combination? i use EV_SW and KEY_RFKILL on various boards and it works well. look at package/base-files/files/etc/rc.button/rfkill to see how to handle the events in userland John > > Apart from this, OpenWrt is running fine on the device. > > Signed-off-by: Jens Steinhauser > --- > .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + > target/linux/ar71xx/base-files/etc/diag.sh | 1 + > target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + > .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + > target/linux/ar71xx/config-4.1 | 1 + > target/linux/ar71xx/config-4.4 | 1 + > .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++ > target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + > .../ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c | 135 +++++++++++++++++++++ > .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + > target/linux/ar71xx/generic/profiles/tp-link.mk | 11 ++ > target/linux/ar71xx/image/Makefile | 8 ++ > 12 files changed, 174 insertions(+) > create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c > > diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network > index 8fdfa07..8754e62 100755 > --- a/target/linux/ar71xx/base-files/etc/board.d/02_network > +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network > @@ -396,6 +396,7 @@ pb44 |\ > routerstation|\ > tl-wr710n |\ > tl-wr720n-v3|\ > +tl-wr810n |\ > wpe72) > ucidef_set_interfaces_lan_wan "eth1" "eth0" > ;; > diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh > index 1f9bd3f..bd6f3f8 100644 > --- a/target/linux/ar71xx/base-files/etc/diag.sh > +++ b/target/linux/ar71xx/base-files/etc/diag.sh > @@ -332,6 +332,7 @@ get_status_led() { > tl-wr703n | \ > tl-wr710n | \ > tl-wr720n-v3 | \ > + tl-wr810n | \ > tl-wr941nd-v6) > status_led="tp-link:blue:system" > ;; > diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh > index 3d4541e..522f541 100755 > --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh > +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh > @@ -922,6 +922,9 @@ ar71xx_board_detect() { > *"TL-WR720N"*) > name="tl-wr720n-v3" > ;; > + *"TL-WR810N") > + name="tl-wr810n" > + ;; > *"TL-MR10U") > name="tl-mr10u" > ;; > diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > index d44ece5..e4fb8b8 100755 > --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > @@ -377,6 +377,7 @@ platform_check_image() { > tl-wr720n-v3 | \ > tl-wr741nd | \ > tl-wr741nd-v4 | \ > + tl-wr810n | \ > tl-wr841n-v1 | \ > tl-wa830re-v2 | \ > tl-wr841n-v7 | \ > diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 > index fa98643..1baee7e 100644 > --- a/target/linux/ar71xx/config-4.1 > +++ b/target/linux/ar71xx/config-4.1 > @@ -157,6 +157,7 @@ CONFIG_ATH79_MACH_TL_WR703N=y > CONFIG_ATH79_MACH_TL_WR720N_V3=y > CONFIG_ATH79_MACH_TL_WR741ND=y > CONFIG_ATH79_MACH_TL_WR741ND_V4=y > +CONFIG_ATH79_MACH_TL_WR810N=y > CONFIG_ATH79_MACH_TL_WR841N_V1=y > CONFIG_ATH79_MACH_TL_WR841N_V8=y > CONFIG_ATH79_MACH_TL_WR841N_V9=y > diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 > index ec04c28..9c0db09 100644 > --- a/target/linux/ar71xx/config-4.4 > +++ b/target/linux/ar71xx/config-4.4 > @@ -159,6 +159,7 @@ CONFIG_ATH79_MACH_TL_WR703N=y > CONFIG_ATH79_MACH_TL_WR720N_V3=y > CONFIG_ATH79_MACH_TL_WR741ND=y > CONFIG_ATH79_MACH_TL_WR741ND_V4=y > +CONFIG_ATH79_MACH_TL_WR810N=y > CONFIG_ATH79_MACH_TL_WR841N_V1=y > CONFIG_ATH79_MACH_TL_WR841N_V8=y > CONFIG_ATH79_MACH_TL_WR841N_V9=y > diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt > index 8c77645..8ce6620 100644 > --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt > +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt > @@ -1274,6 +1274,16 @@ config ATH79_MACH_TL_WR741ND_V4 > select ATH79_DEV_USB > select ATH79_DEV_WMAC > > +config ATH79_MACH_TL_WR810N > + bool "TP-LINK TL-WR810N support" > + select SOC_QCA953X > + select ATH79_DEV_ETH > + select ATH79_DEV_GPIO_BUTTONS > + select ATH79_DEV_LEDS_GPIO > + select ATH79_DEV_M25P80 > + select ATH79_DEV_USB > + select ATH79_DEV_WMAC > + > config ATH79_MACH_TL_WR841N_V1 > bool "TP-LINK TL-WR841N v1 support" > select SOC_AR71XX > diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile > index 862a2e3..9af7e50 100644 > --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile > +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile > @@ -158,6 +158,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WDR4300) += mach-tl-wdr4300.o > obj-$(CONFIG_ATH79_MACH_TL_WDR6500_V2) += mach-tl-wdr6500-v2.o > obj-$(CONFIG_ATH79_MACH_TL_WR741ND) += mach-tl-wr741nd.o > obj-$(CONFIG_ATH79_MACH_TL_WR741ND_V4) += mach-tl-wr741nd-v4.o > +obj-$(CONFIG_ATH79_MACH_TL_WR810N) += mach-tl-wr810n.o > obj-$(CONFIG_ATH79_MACH_TL_WR841N_V1) += mach-tl-wr841n.o > obj-$(CONFIG_ATH79_MACH_TL_WR841N_V8) += mach-tl-wr841n-v8.o > obj-$(CONFIG_ATH79_MACH_TL_WR841N_V9) += mach-tl-wr841n-v9.o > diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c > new file mode 100644 > index 0000000..906c5f8 > --- /dev/null > +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c > @@ -0,0 +1,135 @@ > +/* > + * TP-LINK TL-WR810N board support > + * > + * Copyright (c) 2012 Qualcomm Atheros > + * Copyright (c) 2012 Gabor Juhos > + * Copyright (c) 2016 Jens Steinhauser > + * > + * Permission to use, copy, modify, and/or distribute this software for any > + * purpose with or without fee is hereby granted, provided that the above > + * copyright notice and this permission notice appear in all copies. > + * > + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES > + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR > + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES > + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN > + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > + */ > + > +#include > +#include > +#include > + > +#include > + > +#include "common.h" > +#include "dev-gpio-buttons.h" > +#include "dev-eth.h" > +#include "dev-leds-gpio.h" > +#include "dev-m25p80.h" > +#include "dev-usb.h" > +#include "dev-wmac.h" > +#include "machtypes.h" > + > +#define TL_WR810N_GPIO_SWITCH_B1 0 > +#define TL_WR810N_GPIO_SWITCH_B0 1 > +#define TL_WR810N_GPIO_USB_POWER 11 > +#define TL_WR810N_GPIO_BTN_RESET 12 > +#define TL_WR810N_GPIO_LED_SYSTEM 13 > + > +#define TL_WR810N_KEYS_POLL_INTERVAL 20 /* msecs */ > +#define TL_WR810N_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR810N_KEYS_POLL_INTERVAL) > + > +#define TL_WR810N_WMAC_CALDATA_OFFSET 0x1000 > + > +static const char *tl_wr810n_part_probes[] = { > + "tp-link", > + NULL, > +}; > + > +static struct flash_platform_data tl_wr810n_flash_data = { > + .part_probes = tl_wr810n_part_probes, > +}; > + > +static struct gpio_led tl_wr810n_leds_gpio[] __initdata = { > + { > + .name = "tp-link:blue:system", > + .gpio = TL_WR810N_GPIO_LED_SYSTEM, > + .active_low = 1, > + }, > +}; > + > +static struct gpio_keys_button tl_wr810n_gpio_keys[] __initdata = { > + { > + .desc = "reset", > + .type = EV_KEY, > + .code = KEY_RESTART, > + .debounce_interval = TL_WR810N_KEYS_DEBOUNCE_INTERVAL, > + .gpio = TL_WR810N_GPIO_BTN_RESET, > + .active_low = 1, > + }, > + { > + .desc = "switch_b0", > + .type = EV_SW, > + .code = BTN_0, > + .debounce_interval = TL_WR810N_KEYS_DEBOUNCE_INTERVAL, > + .gpio = TL_WR810N_GPIO_SWITCH_B0, > + .active_low = 0, > + }, > + { > + .desc = "switch_b1", > + .type = EV_SW, > + .code = BTN_1, > + .debounce_interval = TL_WR810N_KEYS_DEBOUNCE_INTERVAL, > + .gpio = TL_WR810N_GPIO_SWITCH_B1, > + .active_low = 0, > + }, > +}; > + > +static void __init tl_wr810n_setup(void) > +{ > + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); > + u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); > + > + ath79_setup_ar933x_phy4_switch(false, false); > + > + ath79_register_m25p80(&tl_wr810n_flash_data); > + ath79_register_leds_gpio(-1, > + ARRAY_SIZE(tl_wr810n_leds_gpio), > + tl_wr810n_leds_gpio); > + ath79_register_gpio_keys_polled(-1, > + TL_WR810N_KEYS_POLL_INTERVAL, > + ARRAY_SIZE(tl_wr810n_gpio_keys), > + tl_wr810n_gpio_keys); > + > + ath79_register_mdio(0, 0x0); > + > + /* WAN */ > + ath79_eth0_data.duplex = DUPLEX_FULL; > + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; > + ath79_eth0_data.speed = SPEED_100; > + ath79_eth0_data.phy_mask = BIT(4); > + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); > + ath79_register_eth(0); > + > + /* LAN */ > + ath79_switch_data.phy4_mii_en = 1; > + ath79_eth1_data.duplex = DUPLEX_FULL; > + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; > + ath79_eth1_data.speed = SPEED_1000; > + ath79_switch_data.phy_poll_mask |= BIT(4); > + ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); > + ath79_register_eth(1); > + > + ath79_register_wmac(art + TL_WR810N_WMAC_CALDATA_OFFSET, mac); > + > + gpio_request_one(TL_WR810N_GPIO_USB_POWER, > + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, > + "USB power"); > + ath79_register_usb(); > +} > + > +MIPS_MACHINE(ATH79_MACH_TL_WR810N, "TL-WR810N", "TP-LINK TL-WR810N", > + tl_wr810n_setup); > diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h > index 0363c88..a4a8252 100644 > --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h > +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h > @@ -192,6 +192,7 @@ enum ath79_mach_type { > ATH79_MACH_TL_WR720N_V3, /* TP-LINK TL-WR720N v3/v4 */ > ATH79_MACH_TL_WR741ND, /* TP-LINK TL-WR741ND */ > ATH79_MACH_TL_WR741ND_V4, /* TP-LINK TL-WR741ND v4 */ > + ATH79_MACH_TL_WR810N, /* TP-LINK TL-WR810N */ > ATH79_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */ > ATH79_MACH_TL_WR841N_V7, /* TP-LINK TL-WR841N/ND v7 */ > ATH79_MACH_TL_WR841N_V8, /* TP-LINK TL-WR841N/ND v8 */ > diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk b/target/linux/ar71xx/generic/profiles/tp-link.mk > index 2875290..c44b22c 100644 > --- a/target/linux/ar71xx/generic/profiles/tp-link.mk > +++ b/target/linux/ar71xx/generic/profiles/tp-link.mk > @@ -332,6 +332,17 @@ endef > $(eval $(call Profile,TLWR743)) > > > +define Profile/TLWR810 > + NAME:=TP-Link TL-WR810N > + PACKAGES:=kmod-usb-core kmod-usb2 > +endef > + > +define Profile/TLWR810/Description > + Package set optimized for the TP-LINK TL-WR810N. > +endef > +$(eval $(call Profile,TLWR810)) > + > + > define Profile/TLWR841 > NAME:=TP-LINK TL-WR841N/ND > PACKAGES:= > diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile > index e4e2fcf..1f0cfcd 100644 > --- a/target/linux/ar71xx/image/Makefile > +++ b/target/linux/ar71xx/image/Makefile > @@ -783,6 +783,14 @@ define Device/tl-wr741nd-v5 > CONSOLE := ttyATH0,115200 > endef > > +define Device/tl-wr810n > + $(Device/tplink-8mlzma) > + BOARDNAME := TL-WR810N > + DEVICE_PROFILE := TLWR810 > + TPLINK_HWID := 0x08100001 > +endef > +TARGET_DEVICES += tl-wr810n > + > define Device/tl-wr743nd-v1 > $(Device/tplink-4m) > BOARDNAME := TL-WR741ND > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From karlp at tweak.net.au Mon Apr 25 16:45:23 2016 From: karlp at tweak.net.au (Karl Palsson) Date: Mon, 25 Apr 2016 20:45:23 -0000 Subject: [OpenWrt-Devel] [PATCH v2] dnsmasq: run as dedicated UID/GID In-Reply-To: <20160425184009.GA2144@makrotopia.org> References: <20160425184009.GA2144@makrotopia.org> Message-ID: Would it be worthwhile keeping these userids in a wiki registry page maybe? This is a current extract from the packages feed and the base packages. 22:sshd 22:sshd 51:pulse 52:tor 53:zabbix 54:prosody 56:dmapd 57:bind 59:dovecot 72:ocserv 87:icecast 88:pianod 89:upmpdcli 99:_fdm 105:avahi 121:lldp 123:ntp 200:mosquitto 224:transmission 323:chrony 400:gnunet 400:gnunetdns 5232:radicale 5353:knot 5432:postgres 8118:privoxy 65533:rpc Daniel Golle wrote: > Running dnsmasq in a dedicated user/group allows matching its > outgoing traffic more easily using iptables' owner match. Add > UID/GID to the package metadata and append the user/group > parameters to the init script. > > Signed-off-by: Daniel Golle > --- > package/network/services/dnsmasq/Makefile | 3 ++- > package/network/services/dnsmasq/files/dnsmasq.init | 4 +++- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/package/network/services/dnsmasq/Makefile > b/package/network/services/dnsmasq/Makefile index > a5c3740..a5b96a3 100644 > --- a/package/network/services/dnsmasq/Makefile > +++ b/package/network/services/dnsmasq/Makefile > @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk > > PKG_NAME:=dnsmasq > PKG_VERSION:=2.75 > -PKG_RELEASE:=6 > +PKG_RELEASE:=7 > > PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz > PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq > @@ -34,6 +34,7 @@ define Package/dnsmasq/Default > CATEGORY:=Base system > TITLE:=DNS and DHCP server > URL:=http://www.thekelleys.org.uk/dnsmasq/ > + USERID:=dnsmasq=453:dnsmasq=453 > endef > > define Package/dnsmasq > diff --git > a/package/network/services/dnsmasq/files/dnsmasq.init > b/package/network/services/dnsmasq/files/dnsmasq.init index > 61ded6a..83fcbb0 100644 > --- a/package/network/services/dnsmasq/files/dnsmasq.init > +++ b/package/network/services/dnsmasq/files/dnsmasq.init > @@ -218,6 +218,8 @@ dnsmasq() { > mkdir -p /tmp/hosts /tmp/dnsmasq.d > xappend "--addn-hosts=/tmp/hosts" > xappend "--conf-dir=/tmp/dnsmasq.d" > + xappend "--user=dnsmasq" > + xappend "--group=dnsmasq" > > echo >> $CONFIGFILE > > @@ -589,7 +591,7 @@ start_service() { > > if [ ! -f "$TIMESTAMPFILE" ]; then > touch "$TIMESTAMPFILE" > - chown nobody.nogroup "$TIMESTAMPFILE" > + chown dnsmasq.dnsmasq "$TIMESTAMPFILE" > fi > > echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE > -- > 2.8.0 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP Digital Signature URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at vittgam.net Mon Apr 25 17:00:20 2016 From: openwrt at vittgam.net (Vittorio G (VittGam)) Date: Mon, 25 Apr 2016 23:00:20 +0200 Subject: [OpenWrt-Devel] Buildbot not building all images for Lantiq XRX200 Message-ID: <3d83318693bd39bdfea9085cdaf886c3@vittgam.net> Hello, I've seen that Lantiq XRX200 trunk images are only being built for the VG3503J. Is this intended, or a mistake? Thank you. Cheers, Vittorio _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From martin.blumenstingl at googlemail.com Mon Apr 25 17:10:22 2016 From: martin.blumenstingl at googlemail.com (Martin Blumenstingl) Date: Mon, 25 Apr 2016 23:10:22 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed. In-Reply-To: <4f1531458edc58dec13890c13ce89f09@vittgam.net> References: <5719C601.5020906@kresin.me> <836fa2b97c0278e82b40b82424d24f42@vittgam.net> <713f61da-42b4-a63b-1248-26d20010978a@phrozen.org> <4f1531458edc58dec13890c13ce89f09@vittgam.net> Message-ID: On Mon, Apr 25, 2016 at 8:51 PM, Vittorio G (VittGam) wrote: > For the record, if anyone wants the old behaviour they just need to put > this in /etc/config/system: > > config led 'led_system' > option name 'System' > option sysfs 'tdw89x0:green:wps' > option default '1' > > And the LED will default to on after a successful boot. maybe you could document this in the wiki: [0] Most people check the wiki when they are looking for configuration hints like this Martin [0] https://wiki.openwrt.org/toh/tp-link/td-w8970 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From martin.blumenstingl at googlemail.com Mon Apr 25 17:26:46 2016 From: martin.blumenstingl at googlemail.com (Martin Blumenstingl) Date: Mon, 25 Apr 2016 23:26:46 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A In-Reply-To: <1461598710.10910.48.camel@merveille.lan> References: <1461526179.10910.6.camel@merveille.lan> <95995f6d-efa9-edbb-7a85-67320d226162@phrozen.org> <1461598710.10910.48.camel@merveille.lan> Message-ID: On Mon, Apr 25, 2016 at 5:38 PM, Ben Mulvihill wrote: >> @Ben: one probably has to enable caldata swapping in the .dts. > > I saw your comment on openwrt.ebilan.co.uk that the "ath,eep-swap;" > flag should be added to the dts in order to use unmodified calibration > data, but actually this does not appear to be the case. I have just > installed a board using unmodified calibration data and unmodified dts > (apart from read-only flag) and it works fine. I then tried adding > "ath,eep-swap;" just to see what would happen and it no longer worked. probably because the values are swapped twice then, the first time using the "wrong" 32bit swap method which results in the same problem that existed before those ath9k patches. great to hear that it's working for you :-) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hauke at hauke-m.de Mon Apr 25 17:35:05 2016 From: hauke at hauke-m.de (Hauke Mehrtens) Date: Mon, 25 Apr 2016 23:35:05 +0200 Subject: [OpenWrt-Devel] [PATCH 5/5] lantiq: use new image build process for brnImages In-Reply-To: <1461513238-13290-5-git-send-email-openwrt@kresin.me> References: <1461513238-13290-1-git-send-email-openwrt@kresin.me> <1461513238-13290-5-git-send-email-openwrt@kresin.me> Message-ID: <571E8D89.7010809@hauke-m.de> On 04/24/2016 05:53 PM, Mathias Kresin wrote: > LZMA compress the kernel without dictionary, otherwise brnboot fails to > uncompress the kernel. > > The filesystem parameter of mkbrncmdline was dropped since the used > filesystem isn't exported in the kernel build step and at least in my > tests everything works without the parameter. If the parameter is > required for some reason, the static keyword "squashfs" can be used. > > Signed-off-by: Mathias Kresin > --- > target/linux/lantiq/image/Makefile | 42 +++++++++++++++++++++++++------------- > 1 file changed, 28 insertions(+), 14 deletions(-) > All these patches are looking good. Thanks for fixing my errors and extending it. I hope we will soon build every board with the new system and can build them all in parallel. Acked-by: Hauke Mehrtens _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at vittgam.net Mon Apr 25 18:03:42 2016 From: openwrt at vittgam.net (Vittorio G (VittGam)) Date: Tue, 26 Apr 2016 00:03:42 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed. In-Reply-To: References: <5719C601.5020906@kresin.me> <836fa2b97c0278e82b40b82424d24f42@vittgam.net> <713f61da-42b4-a63b-1248-26d20010978a@phrozen.org> <4f1531458edc58dec13890c13ce89f09@vittgam.net> Message-ID: On 25/04/2016 23:10:22 CEST, Martin Blumenstingl wrote: > maybe you could document this in the wiki: [0] > Most people check the wiki when they are looking for configuration > hints like this Done: https://wiki.openwrt.org/toh/tp-link/td-w8970#leds Cheers, Vittorio _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dhutchison at bluemesh.net Mon Apr 25 18:14:11 2016 From: dhutchison at bluemesh.net (David Hutchison) Date: Mon, 25 Apr 2016 16:14:11 -0600 Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: <112436203.W4fT509tru@debian64> References: <87potd3e9j.fsf@kamboji.qca.qualcomm.com> <112436203.W4fT509tru@debian64> Message-ID: Scanning appears to work ( iw dev wlan1 scan ) , As soon as I try to use hostapd to run as an AP I get: [20475.140000] ath10k_pci 0000:00:00.0: firmware crashed! (uuid b826d45e-e51f-4beb-a489-6b7a4d5c6f76) [20475.150000] ath10k_pci 0000:00:00.0: qca988x hw2.0 (0x4100016d, 0x004000ff sub 0000:0000) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1 wmi-op 5 htt-op 2 cal file max-sta 1p [20475.170000] ath10k_pci 0000:00:00.0: debug 1 debugfs 1 tracing 0 dfs 0 testmode 1 [20475.180000] ath10k_pci 0000:00:00.0: firmware register dump: [20475.180000] ath10k_pci 0000:00:00.0: [00]: 0x4100016D 0x00000000 0x004146C8 0x004146C8 [20475.190000] ath10k_pci 0000:00:00.0: [04]: 0x004146C8 0x00060530 0x0000001F 0x00955A00 [20475.200000] ath10k_pci 0000:00:00.0: [08]: 0x0040AE04 0x00400000 0x00000007 0x00000000 [20475.210000] ath10k_pci 0000:00:00.0: [12]: 0x00000002 0xFFFFFFFF 0x00958360 0x0095836B [20475.210000] ath10k_pci 0000:00:00.0: [16]: 0x809ACDE0 0x0040AD94 0x0040AE04 0x00400000 [20475.220000] ath10k_pci 0000:00:00.0: [20]: 0x00000000 0x00000000 0x00000000 0x0040E830 [20475.230000] ath10k_pci 0000:00:00.0: [24]: 0x809AC4E2 0x0040ADC4 0x00000001 0x0040AE04 [20475.240000] ath10k_pci 0000:00:00.0: [28]: 0x004133E0 0x00000001 0x0040AE08 0x00000000 [20475.250000] ath10k_pci 0000:00:00.0: [32]: 0x00000007 0x00000000 0x00000000 0x004133C8 [20475.260000] ath10k_pci 0000:00:00.0: [36]: 0x809B9C49 0x0040ADE4 0x00411568 0x0041158C [20475.260000] ath10k_pci 0000:00:00.0: [40]: 0x00000001 0x00000000 0x00955A00 0x0040E840 [20475.270000] ath10k_pci 0000:00:00.0: [44]: 0x809B944C 0x0040AE04 0x00000001 0x00000000 [20475.280000] ath10k_pci 0000:00:00.0: [48]: 0x0040AE04 0x00000001 0x004133C8 0x004117AC [20475.290000] ath10k_pci 0000:00:00.0: [52]: 0x809B9263 0x0040AEA4 0x0041ECF8 0x00411BC8 [20475.300000] ath10k_pci 0000:00:00.0: [56]: 0x004133C8 0x0040AE34 0x00411F08 0x00411F08 [20475.410000] ieee80211 phy1: Hardware restart was requested -- Davey On Mon, Apr 25, 2016 at 1:01 PM, Christian Lamparter wrote: > Hello, > > On Monday, April 25, 2016 10:53:41 AM David Hutchison wrote: >> So with some modifications to pci.c, hw.h and core.c I was able to get >> the radio initialized! :) > > Hey, that's nice! Can you make and post a patch for that? > I'm sure if it's just a matter of adding the new pci and chip > ids to the tables. You could just go ahead and post it, so it > will be picked up. > >> pci.c: added QCA9887_DEVICE_ID, modified ath10k_pci_id_table and >> ath10k_pci_supp_chips >> core.c: Duplicated QCA988X entry in ath10k_hw_params_list and passed >> 0x4100016d as the ID ( left everything else the same ) >> hw.h: added definitions for QCA9887 >> >> I found "https://github.com/kvalo/ath10k-firmware/blob/master/QCA9887/firmware-5.bin_10.2.3.31.7-1" >> on your github and replaced >> /lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin on my board. >> hotplug.d then loaded QCA9887 firmware on next boot. >> >> Of course my approach was very much a hack. If there is anything I can >> contribute to creating a patch for ath10k, please let me know. I would >> love to help! >> >> dmesg >> [ 18.920000] ath10k_pci 0000:00:00.0: pci irq legacy interrupts 0 >> irq_mode 0 reset_mode 0 >> [ 19.030000] rev_id 00000000 QCA9887 >> [ 19.030000] dev_id 00000050 QCA9887 >> [ 20.460000] ath10k_pci 0000:00:00.0: qca988x hw2.0 (0x4100016d, >> 0x004000ff sub 0000:0000) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1 >> wmi-op 5 htt-op 2 cal file max-sta 1p >> [ 20.480000] ath10k_pci 0000:00:00.0: debug 1 debugfs 1 tracing 0 >> dfs 0 testmode 1 >> > ... > > Does the device work? Can you scan for networks, connect to networks > and create networks? That would be good to know. > > Regards, > Christian > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ldpinney at gmail.com Mon Apr 25 18:23:52 2016 From: ldpinney at gmail.com (L. D. Pinney) Date: Mon, 25 Apr 2016 17:23:52 -0500 Subject: [OpenWrt-Devel] [PATCH v3] ar71xx: Add support for the OMYlink OMY-G1 Message-ID: <1461623032-31058-1-git-send-email-ldpinney@gmail.com> https://wiki.openwrt.org/toh/omylink/omy-g1 http://www.omylink.com/ Signed-off-by: L. D. Pinney --- v2 corrects the Device name in Subject v3 removes changes to mktplinkfw.c target/linux/ar71xx/base-files/etc/board.d/01_leds | 6 ++++ target/linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 3 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 6 ++++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.1 | 1 + target/linux/ar71xx/config-4.4 | 1 + target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 10 ++++++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ target/linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/generic/profiles/omy.mk | 10 ++++++ target/linux/ar71xx/image/Makefile | 9 ++++- 13 files changed, 172 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index b2469bf..39b21ca 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -399,6 +399,12 @@ om5p-ac) ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1" ;; +omy-g1) + ucidef_set_led_wlan "wlan" "WLAN" "omy:green:wlan" "phy0tpt" + ucidef_set_led_netdev "wan" "WAN" "omy:green:wan" "eth0" + ucidef_set_led_netdev "lan" "LAN" "omy:green:lan" "eth1" + ;; + omy-x1) ucidef_set_led_default "power" "POWER" "omy:green:power" "1" ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0" diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 8fdfa07..7724a08 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -220,6 +220,7 @@ tl-wr941nd) ;; dir-615-i1 |\ +omy-g1 |\ r6100 |\ smart-300 |\ tl-mr3420-v2 |\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 1f9bd3f..77fa398 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -218,6 +218,9 @@ get_status_led() { om5p-acv2) status_led="om5pac:blue:power" ;; + omy-g1) + status_led="omy:green:wlan" + ;; omy-x1) status_led="omy:green:power" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 3d4541e..588affd 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -123,6 +123,9 @@ tplink_board_detect() { "007260"*) model="TellStick ZNet Lite" ;; + "066601"*) + model="OMYlink OMY-G1" + ;; "066602"*) model="OMYlink OMY-X1" ;; @@ -655,6 +658,9 @@ ar71xx_board_detect() { *"OMY-X1") name="omy-x1" ;; + *"OMY-G1") + name="omy-g1" + ;; *"Onion Omega") name="onion-omega" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index d44ece5..5334600 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -340,6 +340,7 @@ platform_check_image() { gl-inet | \ mc-mac1200r | \ minibox-v1 |\ + omy-g1 |\ omy-x1 |\ onion-omega | \ oolite | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index fa98643..40cf453 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -111,6 +111,7 @@ CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y CONFIG_ATH79_MACH_OM5P_AC=y CONFIG_ATH79_MACH_OM5P_ACv2=y +CONFIG_ATH79_MACH_OMY_G1=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index c925ab1..9c0eac4 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -114,6 +114,7 @@ CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y CONFIG_ATH79_MACH_OM5P_AC=y CONFIG_ATH79_MACH_OM5P_ACv2=y +CONFIG_ATH79_MACH_OMY_G1=y CONFIG_ATH79_MACH_OMY_X1=y CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 8c77645..e6879a9 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -890,6 +890,16 @@ config ATH79_MACH_OM5P_ACv2 select ATH79_DEV_M25P80 select ATH79_DEV_WMAC +config ATH79_MACH_OMY_G1 + bool "OMYlink OMY G1 support" + select SOC_AR934X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_USB + select ATH79_DEV_WMAC + config ATH79_MACH_OMY_X1 bool "OMYlink OMY X1 support" select SOC_AR934X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 862a2e3..61dfccc 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -117,6 +117,7 @@ obj-$(CONFIG_ATH79_MACH_OM2P) += mach-om2p.o obj-$(CONFIG_ATH79_MACH_OM5P) += mach-om5p.o obj-$(CONFIG_ATH79_MACH_OM5P_AC) += mach-om5pac.o obj-$(CONFIG_ATH79_MACH_OM5P_ACv2) += mach-om5pacv2.o +obj-$(CONFIG_ATH79_MACH_OMY_G1) += mach-omy-g1.o obj-$(CONFIG_ATH79_MACH_OMY_X1) += mach-omy-x1.o obj-$(CONFIG_ATH79_MACH_ONION_OMEGA) += mach-onion-omega.o obj-$(CONFIG_ATH79_MACH_PB42) += mach-pb42.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c new file mode 100644 index 0000000..25ca27c --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c @@ -0,0 +1,123 @@ +/* + * OMYlink OMY-G1 board support + * + * Copyright (C) 2016 L. D. Pinney + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include + +#include +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define OMY_G1_GPIO_LED_WLAN 13 +#define OMY_G1_GPIO_LED_WAN 18 +#define OMY_G1_GPIO_LED_LAN 19 + +#define OMY_G1_GPIO_USB_POWER 4 + +#define OMY_G1_GPIO_BTN_RESET 17 + +#define OMY_G1_KEYS_POLL_INTERVAL 20 /* msecs */ +#define OMY_G1_KEYS_DEBOUNCE_INTERVAL (3 * OMY_G1_KEYS_POLL_INTERVAL) + +static const char *omy_g1_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data omy_g1_flash_data = { + .part_probes = omy_g1_part_probes, +}; + +static struct gpio_led omy_g1_leds_gpio[] __initdata = { + { + .name = "omy:green:wlan", + .gpio = OMY_G1_GPIO_LED_WLAN, + .active_low = 1, + },{ + .name = "omy:green:wan", + .gpio = OMY_G1_GPIO_LED_WAN, + .active_low = 1, + }, { + .name = "omy:green:lan", + .gpio = OMY_G1_GPIO_LED_LAN, + .active_low = 1, + }, +}; + +static struct gpio_keys_button omy_g1_gpio_keys[] __initdata = { + { + .desc = "Reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = OMY_G1_KEYS_DEBOUNCE_INTERVAL, + .gpio = OMY_G1_GPIO_BTN_RESET, + .active_low = 1, + } +}; + +static void __init omy_g1_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + ath79_gpio_function_setup(AR934X_GPIO_FUNC_JTAG_DISABLE, + AR934X_GPIO_FUNC_CLK_OBS4_EN); + + ath79_register_m25p80(&omy_g1_flash_data); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(omy_g1_leds_gpio), + omy_g1_leds_gpio); + + ath79_register_gpio_keys_polled(1, OMY_G1_KEYS_POLL_INTERVAL, + ARRAY_SIZE(omy_g1_gpio_keys), + omy_g1_gpio_keys); + + ath79_gpio_output_select(OMY_G1_GPIO_USB_POWER, + AR934X_GPIO_OUT_GPIO); + + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_PHY_SWAP); + + ath79_register_mdio(1, 0x0); + + ath79_init_mac(ath79_eth0_data.mac_addr, mac, -1); + ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); + + ath79_switch_data.phy4_mii_en = 1; + ath79_switch_data.phy_poll_mask = BIT(0); + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.phy_mask = BIT(0); + ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev; + ath79_register_eth(0); + + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_register_eth(1); + + ath79_register_wmac(ee, mac); + + ath79_gpio_output_select(OMY_G1_GPIO_USB_POWER, + AR934X_GPIO_OUT_GPIO); + + gpio_request_one(OMY_G1_GPIO_USB_POWER, + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, + "USB power"); + + ath79_register_usb(); +} + +MIPS_MACHINE(ATH79_MACH_OMY_G1, "OMY-G1", "OMYlink OMY-G1", + omy_g1_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 0363c88..b2df9c4 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -117,6 +117,7 @@ enum ath79_mach_type { ATH79_MACH_OM5P_ACv2, /* OpenMesh OM5P-ACv2 */ ATH79_MACH_OM5P_AN, /* OpenMesh OM5P-AN */ ATH79_MACH_OM5P, /* OpenMesh OM5P */ + ATH79_MACH_OMY_G1, /* OMYlink OMY-G1 */ ATH79_MACH_OMY_X1, /* OMYlink OMY-X1 */ ATH79_MACH_ONION_OMEGA, /* ONION OMEGA */ ATH79_MACH_PB42, /* Atheros PB42 */ diff --git a/target/linux/ar71xx/generic/profiles/omy.mk b/target/linux/ar71xx/generic/profiles/omy.mk index 4055dfc..397de54 100644 --- a/target/linux/ar71xx/generic/profiles/omy.mk +++ b/target/linux/ar71xx/generic/profiles/omy.mk @@ -5,6 +5,16 @@ # See /LICENSE for more information. # +define Profile/OMYG1 + NAME:=OMYlink OMY-G1 + PACKAGES:= kmod-usb-core kmod-usb2 +endef + +define Profile/OMYX1/Description + Package set optimized for the OMYlink OMY-G1. +endef +$(eval $(call Profile,OMYG1)) + define Profile/OMYX1 NAME:=OMYlink OMY-X1 PACKAGES:= diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 2b2e868..f4b2d79 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -563,13 +563,20 @@ define Device/minibox-v1 endef TARGET_DEVICES += minibox-v1 +define Device/omy-g1 + $(Device/tplink-16mlzma) + BOARDNAME := OMY-G1 + DEVICE_PROFILE := OMYG1 + TPLINK_HWID := 0x06660101 +endef + define Device/omy-x1 $(Device/tplink-8mlzma) BOARDNAME := OMY-X1 DEVICE_PROFILE := OMYX1 TPLINK_HWID := 0x06660201 endef -TARGET_DEVICES += omy-x1 +TARGET_DEVICES += omy-g1 omy-x1 define Device/onion-omega $(Device/tplink-16mlzma) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at vittgam.net Mon Apr 25 18:54:15 2016 From: openwrt at vittgam.net (Vittorio Gambaletta (VittGam)) Date: Tue, 26 Apr 2016 00:54:15 +0200 Subject: [OpenWrt-Devel] [PATCH] [CC] lantiq: Fix ath9k LED for TDW8970. Message-ID: Backport of r47911, r47912, r47969 to CC. All other required patches have already been backported in r48822. Signed-off-by: Vittorio Gambaletta --- 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 6956d61..5643f7f 100644 --- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds +++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds @@ -30,6 +30,9 @@ BTHOMEHUBV3A) ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt" ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" "pppoa-wan" ;; +TDW8970) + ucidef_set_led_wlan "wifi" "wifi" "ath9k-phy0" "phy0tpt" + ;; VGV7510KW22) ucidef_set_led_default "power" "power" "power" "1" ucidef_set_led_default "power2" "power2" "power2" "0" diff --git a/target/linux/lantiq/dts/TDW8970.dts b/target/linux/lantiq/dts/TDW8970.dts index d8dcb5d..cb4d88b 100644 --- a/target/linux/lantiq/dts/TDW8970.dts +++ b/target/linux/lantiq/dts/TDW8970.dts @@ -202,6 +202,8 @@ ath,mac-offset = <0xf100>; ath,mac-increment; ath,led-pin = <0>; + ath,disable-5ghz; + ath,led-active-high; }; gpio-keys-polled { diff --git a/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch index 04c2071..9198fe5 100644 --- a/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch +++ b/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch @@ -51,13 +51,14 @@ Signed-off-by: John Crispin obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o --- /dev/null +++ b/arch/mips/lantiq/xway/ath_eep.c -@@ -0,0 +1,282 @@ +@@ -0,0 +1,298 @@ +/* + * Copyright (C) 2011 Luca Olivetti + * Copyright (C) 2011 John Crispin + * Copyright (C) 2011 Andrej Vla?i? + * Copyright (C) 2013 ?lvaro Fern?ndez Rojas + * Copyright (C) 2013 Daniel Gimpelevich ++ * Copyright (C) 2015 Vittorio Gambaletta + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published @@ -192,6 +193,21 @@ Signed-off-by: John Crispin + dev_info(&pdev->dev, "using led pin %d.\n", led_pin); + } + ++ if (of_property_read_bool(np, "ath,led-active-high")) { ++ ath9k_pdata.led_active_high = true; ++ dev_info(&pdev->dev, "inverted LED polarity\n"); ++ } ++ ++ if (of_property_read_bool(np, "ath,disable-2ghz")) { ++ ath9k_pdata.disable_2ghz = true; ++ dev_info(&pdev->dev, "disabled 2.4 GHz band\n"); ++ } ++ ++ if (of_property_read_bool(np, "ath,disable-5ghz")) { ++ ath9k_pdata.disable_5ghz = true; ++ dev_info(&pdev->dev, "disabled 5 GHz band\n"); ++ } ++ + dev_info(&pdev->dev, "loaded ath9k eeprom\n"); + + return 0; _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at vittgam.net Mon Apr 25 18:54:16 2016 From: openwrt at vittgam.net (Vittorio Gambaletta (VittGam)) Date: Tue, 26 Apr 2016 00:54:16 +0200 Subject: [OpenWrt-Devel] [PATCH] [CC] lantiq: Fix LED handling. Message-ID: Backport of r47914 to CC. Without this patch the TDW8970 is left without any status LED at all, even during preinit and failsafe. Signed-off-by: Vittorio Gambaletta --- diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh index 26f0a3c..57a7055 100644 --- a/target/linux/lantiq/base-files/etc/diag.sh +++ b/target/linux/lantiq/base-files/etc/diag.sh @@ -3,40 +3,48 @@ . /lib/functions/leds.sh -status_led="power" +status_led=power +[ ! -d /sys/class/leds/power/ ] && [ ! -d /sys/class/leds/power1/ ] && [ ! -d /sys/class/leds/power2/ ] && [ -d /sys/class/leds/wps/ ] && status_led=wps set_state() { - [ -d /sys/class/leds/power2/ ] && { - - case "$1" in - preinit) - led_set_attr "power2" "trigger" "heartbeat" - status_led_on - ;; - failsafe) - led_off "power2" - status_led_set_timer 100 100 - ;; - done) - led_off "power2" - ;; - esac - return - } - case "$1" in preinit) - status_led_set_heartbeat + if [ -d /sys/class/leds/power2/ ]; then + status_led_on + status_led=power2 + status_led_blink_preinit + status_led=power + else + status_led_blink_preinit + fi ;; failsafe) - [ -d /sys/class/leds/power1 ] && { + if [ -d /sys/class/leds/power2/ ]; then + led_off power2 + status_led_blink_failsafe + elif [ -d /sys/class/leds/power1/ ]; then status_led_off - led_timer "power1" 100 100 - } || status_led_set_timer 100 100 + status_led=power1 + status_led_blink_failsafe + status_led=power + else + status_led_blink_failsafe + fi + ;; + preinit_regular) + if [ -d /sys/class/leds/power2/ ]; then + status_led_on + status_led=power2 + status_led_blink_preinit_regular + status_led=power + else + status_led_blink_preinit_regular + fi ;; done) status_led_on - led_off "power1" + led_off power1 + led_off power2 ;; esac } _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From lynxis at fe80.eu Mon Apr 25 21:17:21 2016 From: lynxis at fe80.eu (Alexander Couzens) Date: Tue, 26 Apr 2016 03:17:21 +0200 Subject: [OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard Message-ID: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> I'm using the beaglebone black as development tool for coreboot. The bbb can receive debug output via ehci debug and flash spi chips via spi-omap-24xx. I'm not quite sure about the config-4.4 config. I copied over the omap config-4.1 and did make kernel_oldconfig. Is there a better way to create the config for a kernel? Everthing was tested with kernel 4.4 on a bbb. The sdcard image can be used as stand-alone image or flashed to the eMMC. If the image was flashed to the eMMC, don't use a sdcard, because the kernel tries to boot the external sdcard. Aka floppy inserted bug ;). Alexander Couzens (4): omap: add sdcard creation script [RFC] omap: switch to 4.4 kernel/spi: add kernel package for spi-omap-24xx add usb gadget ehci debug driver package/kernel/linux/modules/spi.mk | 17 + package/kernel/linux/modules/usb.mk | 17 + target/linux/omap/Makefile | 2 +- target/linux/omap/config-4.4 | 525 ++++++++----------------- target/linux/omap/image/Config.in | 5 + target/linux/omap/image/Makefile | 34 +- target/linux/omap/image/gen_omap_sdcard_img.sh | 33 ++ target/linux/omap/image/uEnv.txt | 6 + tools/Makefile | 2 +- 9 files changed, 283 insertions(+), 358 deletions(-) create mode 100644 target/linux/omap/image/Config.in create mode 100755 target/linux/omap/image/gen_omap_sdcard_img.sh create mode 100644 target/linux/omap/image/uEnv.txt -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From lynxis at fe80.eu Mon Apr 25 21:17:22 2016 From: lynxis at fe80.eu (Alexander Couzens) Date: Tue, 26 Apr 2016 03:17:22 +0200 Subject: [OpenWrt-Devel] [PATCH 1/4] omap: add sdcard creation script In-Reply-To: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> Message-ID: <1461633445-1695-2-git-send-email-lynxis@fe80.eu> Signed-off-by: Alexander Couzens --- target/linux/omap/image/Config.in | 5 ++++ target/linux/omap/image/Makefile | 34 +++++++++++++++++++++++++- target/linux/omap/image/gen_omap_sdcard_img.sh | 33 +++++++++++++++++++++++++ target/linux/omap/image/uEnv.txt | 6 +++++ tools/Makefile | 2 +- 5 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 target/linux/omap/image/Config.in create mode 100755 target/linux/omap/image/gen_omap_sdcard_img.sh create mode 100644 target/linux/omap/image/uEnv.txt diff --git a/target/linux/omap/image/Config.in b/target/linux/omap/image/Config.in new file mode 100644 index 0000000..08b88eb --- /dev/null +++ b/target/linux/omap/image/Config.in @@ -0,0 +1,5 @@ +config OMAP_SD_BOOT_PARTSIZE + int "Boot (SD Card) filesystem partition size (in MB)" + depends on TARGET_omap + default 20 + diff --git a/target/linux/omap/image/Makefile b/target/linux/omap/image/Makefile index 3fa2848..10b07a7 100644 --- a/target/linux/omap/image/Makefile +++ b/target/linux/omap/image/Makefile @@ -6,12 +6,43 @@ # include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +include $(INCLUDE_DIR)/host.mk + +FAT32_BLOCK_SIZE=1024 +FAT32_BLOCKS=$(shell echo $$(($(CONFIG_OMAP_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE)))) UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048 +# $1 - name of bootloader directory under BIN_DIR +# $2 - output filename part +define Image/Build/SDCard + rm -f $(KDIR)/boot-$(2).img + mkdosfs $(KDIR)/boot-$(2).img -C $(FAT32_BLOCKS) + mcopy -i $(KDIR)/boot-$(2).img $(BIN_DIR)/uboot-omap-$(1)/MLO ::MLO + mcopy -i $(KDIR)/boot-$(2).img $(BIN_DIR)/uboot-omap-$(1)/u-boot.img ::u-boot.img + mcopy -i $(KDIR)/boot-$(2).img -s $(BIN_DIR)/dtbs/ ::dtbs + mcopy -i $(KDIR)/boot-$(2).img $(KDIR)/zImage ::zImage + mcopy -i $(KDIR)/boot-$(2).img $(KDIR)/uImage ::uImage + mcopy -i $(KDIR)/boot-$(2).img ./uEnv.txt ::uEnv.txt + chmod 755 ./gen_omap_sdcard_img.sh + ./gen_omap_sdcard_img.sh \ + $(BIN_DIR)/$(IMG_PREFIX)-$(2)-sdcard-vfat-$(1).img \ + $(KDIR)/boot-$(2).img \ + $(KDIR)/root.ext4 \ + $(CONFIG_OMAP_SD_BOOT_PARTSIZE) \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) +endef + define Image/BuildKernel + mkimage -A arm -O linux -T kernel -C none \ + -a 0x40008000 -e 0x40008000 \ + -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \ + -d $(KDIR)/zImage $(KDIR)/uImage + $(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage + $(CP) $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage + ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs endif @@ -26,7 +57,7 @@ define Image/BuildKernel $(CP) $(DTS_DIR)/omap3*.dtb $(TARGET_DIR)/boot/ $(CP) $(DTS_DIR)/omap4*.dtb $(TARGET_DIR)/boot/ endif - -mkdir $(BIN_DIR)/dtbs + -mkdir -p $(BIN_DIR)/dtbs -$(CP) $(DTS_DIR)/am335x*.dtb $(BIN_DIR)/dtbs/ -$(CP) $(DTS_DIR)/omap3*.dtb $(BIN_DIR)/dtbs/ -$(CP) $(DTS_DIR)/omap4*.dtb $(BIN_DIR)/dtbs/ @@ -34,6 +65,7 @@ endef define Image/Build $(call Image/Build/$(1),$(1)) + $(call Image/Build/SDCard,am335x_evm,beagleboneblack) endef define Image/Build/jffs2-64k diff --git a/target/linux/omap/image/gen_omap_sdcard_img.sh b/target/linux/omap/image/gen_omap_sdcard_img.sh new file mode 100755 index 0000000..c2f2aad --- /dev/null +++ b/target/linux/omap/image/gen_omap_sdcard_img.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# +# Copyright (C) 2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +set -x +[ $# -eq 5 ] || { + echo "SYNTAX: $0 " + exit 1 +} + +OUTPUT="$1" +BOOTFS="$2" +ROOTFS="$3" +BOOTFSSIZE="$4" +ROOTFSSIZE="$5" + +head=4 +sect=63 + +set `ptgen -o $OUTPUT -h $head -s $sect -l 1024 -t c -p ${BOOTFSSIZE}M -t 83 -p ${ROOTFSSIZE}M` + +BOOTOFFSET="$(($1 / 512))" +BOOTSIZE="$(($2 / 512))" +ROOTFSOFFSET="$(($3 / 512))" +ROOTFSSIZE="$(($4 / 512))" + +dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc +dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc diff --git a/target/linux/omap/image/uEnv.txt b/target/linux/omap/image/uEnv.txt new file mode 100644 index 0000000..9776ab5 --- /dev/null +++ b/target/linux/omap/image/uEnv.txt @@ -0,0 +1,6 @@ +bootdir=/ +fdtdir=/dtbs +uenvcmd=setenv bootpart ${mmcdev}:1 ; run loadfdt; run loadimage; run mmcargs; bootz ${loadaddr} - ${fdtaddr} +mmcargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 rootdelay=10 + +loadfdt=load mmc ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile} diff --git a/tools/Makefile b/tools/Makefile index 187655e..85a7124 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -36,7 +36,7 @@ tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2 tools-$(CONFIG_powerpc) += upx tools-$(CONFIG_TARGET_x86) += qemu tools-$(CONFIG_TARGET_mxs) += elftosb sdimage -tools-$(CONFIG_TARGET_brcm2708)$(CONFIG_TARGET_sunxi)$(CONFIG_TARGET_mxs) += mtools dosfstools +tools-$(CONFIG_TARGET_brcm2708)$(CONFIG_TARGET_omap)$(CONFIG_TARGET_sunxi)$(CONFIG_TARGET_mxs) += mtools dosfstools tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs tools-y += lzma squashfs4 tools-$(BUILD_B43_TOOLS) += b43-tools -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From lynxis at fe80.eu Mon Apr 25 21:17:23 2016 From: lynxis at fe80.eu (Alexander Couzens) Date: Tue, 26 Apr 2016 03:17:23 +0200 Subject: [OpenWrt-Devel] [PATCH 2/4] [RFC] omap: switch to 4.4 In-Reply-To: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> Message-ID: <1461633445-1695-3-git-send-email-lynxis@fe80.eu> Signed-off-by: Alexander Couzens --- target/linux/omap/Makefile | 2 +- target/linux/omap/config-4.4 | 525 ++++++++++++++----------------------------- 2 files changed, 171 insertions(+), 356 deletions(-) diff --git a/target/linux/omap/Makefile b/target/linux/omap/Makefile index 20f7517..d7054e9 100644 --- a/target/linux/omap/Makefile +++ b/target/linux/omap/Makefile @@ -13,7 +13,7 @@ FEATURES:=usb usbgadget ext4 targz fpu audio display nand ubifs CPU_TYPE:=cortex-a9 CPU_SUBTYPE:=vfpv3 -KERNEL_PATCHVER:=3.18 +KERNEL_PATCHVER:=4.4 MAINTAINER:=Imre Kaloz diff --git a/target/linux/omap/config-4.4 b/target/linux/omap/config-4.4 index fddf1b2..5d4f6f5 100644 --- a/target/linux/omap/config-4.4 +++ b/target/linux/omap/config-4.4 @@ -6,13 +6,15 @@ CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y CONFIG_ARCH_HAS_SG_CHAIN=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_ARCH_MULTIPLATFORM=y # CONFIG_ARCH_MULTI_CPU_AUTO is not set -CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_MULTI_V6_V7=y +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y CONFIG_ARCH_NR_GPIO=0 CONFIG_ARCH_OMAP=y CONFIG_ARCH_OMAP2PLUS=y @@ -30,49 +32,30 @@ CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y -# CONFIG_ARCH_WM8750 is not set CONFIG_ARM=y -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set -CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y -# CONFIG_ARM_CPU_SUSPEND is not set -CONFIG_ARM_ERRATA_411920=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_ARM_ERRATA_720789=y +CONFIG_ARM_ERRATA_754322=y +CONFIG_ARM_ERRATA_775420=y +CONFIG_ARM_GIC=y CONFIG_ARM_HAS_SG_CHAIN=y CONFIG_ARM_HEAVY_MB=y -CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_L1_CACHE_SHIFT_6=y # CONFIG_ARM_LPAE is not set -# CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set +CONFIG_ARM_OMAP2PLUS_CPUFREQ=y CONFIG_ARM_PATCH_PHYS_VIRT=y CONFIG_ARM_THUMB=y -CONFIG_ARM_THUMBEE=y -CONFIG_ASSOCIATIVE_ARRAY=y +# CONFIG_ARM_THUMBEE is not set +CONFIG_ARM_VIRT_EXT=y CONFIG_AT803X_PHY=y -CONFIG_ATA=y -# CONFIG_ATH_CARDS is not set -CONFIG_AUDIT=y -# CONFIG_AUDITSYSCALL is not set -CONFIG_AUDIT_GENERIC=y CONFIG_AUTO_ZRELADDR=y CONFIG_BACKLIGHT_CLASS_DEVICE=y -# CONFIG_BACKLIGHT_GENERIC is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y -# CONFIG_BACKLIGHT_PM8941_WLED is not set -# CONFIG_BACKLIGHT_PWM is not set +CONFIG_BACKLIGHT_PWM=y # CONFIG_BACKLIGHT_TPS65217 is not set CONFIG_BCH=y -CONFIG_BINFMT_MISC=y -CONFIG_BLK_CGROUP=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=16384 -CONFIG_BLK_DEV_SD=y -CONFIG_BMP085=y -CONFIG_BMP085_I2C=y CONFIG_BOUNCE=y -CONFIG_BSD_PROCESS_ACCT=y -CONFIG_BUILD_BIN2C=y CONFIG_CACHE_L2X0=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLKSRC_MMIO=y @@ -81,130 +64,115 @@ CONFIG_CLKSRC_PROBE=y CONFIG_CLKSRC_TI_32K=y # CONFIG_CLK_TWL6040 is not set CONFIG_CLONE_BACKWARDS=y -CONFIG_CMA=y -CONFIG_CMA_ALIGNMENT=8 -CONFIG_CMA_AREAS=7 -# CONFIG_CMA_DEBUG is not set -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_SIZE_MBYTES=16 -# CONFIG_CMA_SIZE_SEL_MAX is not set -CONFIG_CMA_SIZE_SEL_MBYTES=y -# CONFIG_CMA_SIZE_SEL_MIN is not set -# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set -CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" +CONFIG_CMDLINE="console=ttyO0,115200n8" CONFIG_COMMON_CLK=y -# CONFIG_COMMON_CLK_PALMAS is not set -CONFIG_CONFIGFS_FS=y -CONFIG_CONNECTOR=y -CONFIG_CPUFREQ_DT=y -CONFIG_CPUSETS=y -CONFIG_CPU_32v6=y +CONFIG_CONSOLE_TRANSLATIONS=y +# CONFIG_CPUFREQ_DT is not set CONFIG_CPU_32v6K=y -CONFIG_CPU_ABRT_EV6=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y # CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_CPU_CACHE_V6=y +CONFIG_CPU_CACHE_V7=y CONFIG_CPU_CACHE_VIPT=y CONFIG_CPU_COPY_V6=y CONFIG_CPU_CP15=y CONFIG_CPU_CP15_MMU=y CONFIG_CPU_FREQ=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_COMMON=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y CONFIG_CPU_HAS_ASID=y # CONFIG_CPU_ICACHE_DISABLE is not set CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y -CONFIG_CPU_PABRT_V6=y +CONFIG_CPU_PABRT_V7=y CONFIG_CPU_PM=y -CONFIG_CPU_THERMAL=y -CONFIG_CPU_TLB_V6=y -CONFIG_CPU_V6=y -CONFIG_CPU_V6K=y -CONFIG_CRAMFS=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_V7=y CONFIG_CRC16=y -CONFIG_CRC7=y -CONFIG_CRC_CCITT=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC_T10DIF=y +CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AEAD2=m +CONFIG_CRYPTO_CCM=m +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_CTR=m +CONFIG_CRYPTO_DRBG=m +CONFIG_CRYPTO_DRBG_HMAC=y +CONFIG_CRYPTO_DRBG_MENU=m +CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_GF128MUL=m +CONFIG_CRYPTO_GHASH=m +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_JITTERENTROPY=m +CONFIG_CRYPTO_MANAGER=m +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_NULL2=m +CONFIG_CRYPTO_RNG=m +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_RNG_DEFAULT=m +CONFIG_CRYPTO_SEQIV=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_DCACHE_WORD_ACCESS=y CONFIG_DDR=y -# CONFIG_DEBUG_BLK_CGROUP is not set -CONFIG_DEBUG_GPIO=y -CONFIG_DEBUG_INFO=y CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y # CONFIG_DEBUG_UART_8250 is not set # CONFIG_DEBUG_USER is not set -CONFIG_DEV_COREDUMP=y -CONFIG_DISPLAY_CONNECTOR_ANALOG_TV=y -CONFIG_DISPLAY_CONNECTOR_DVI=y -CONFIG_DISPLAY_CONNECTOR_HDMI=y # CONFIG_DISPLAY_ENCODER_OPA362 is not set -CONFIG_DISPLAY_ENCODER_TFP410=y -CONFIG_DISPLAY_ENCODER_TPD12S015=y CONFIG_DISPLAY_PANEL_DPI=y CONFIG_DISPLAY_PANEL_DSI_CM=y -CONFIG_DISPLAY_PANEL_LGPHILIPS_LB035Q02=y -CONFIG_DISPLAY_PANEL_NEC_NL8048HL11=y +# CONFIG_DISPLAY_PANEL_NEC_NL8048HL11 is not set CONFIG_DISPLAY_PANEL_SHARP_LS037V7DW01=y -CONFIG_DISPLAY_PANEL_SONY_ACX565AKM=y -CONFIG_DISPLAY_PANEL_TPO_TD028TTEC1=y -CONFIG_DISPLAY_PANEL_TPO_TD043MTEA1=y -CONFIG_DM9000=y -# CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL is not set +# CONFIG_DISPLAY_PANEL_SONY_ACX565AKM is not set CONFIG_DMADEVICES=y -CONFIG_DMA_CMA=y CONFIG_DMA_ENGINE=y CONFIG_DMA_OF=y CONFIG_DMA_OMAP=y CONFIG_DMA_VIRTUAL_CHANNELS=y -CONFIG_DNS_RESOLVER=y CONFIG_DTC=y +CONFIG_DUMMY_CONSOLE=y CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y -CONFIG_EEPROM_93CX6=y -# CONFIG_EVM is not set -CONFIG_EXPORTFS=y -CONFIG_EXT2_FS=y -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_POSIX_ACL is not set -# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EEPROM_AT24=y CONFIG_EXT4_FS=y -CONFIG_EXTCON=y -# CONFIG_EXTCON_ADC_JACK is not set -# CONFIG_EXTCON_GPIO is not set -CONFIG_EXTCON_PALMAS=y -# CONFIG_EXTCON_RT8973A is not set -# CONFIG_EXTCON_SM5502 is not set -CONFIG_EXTCON_USB_GPIO=y -CONFIG_FANOTIFY=y -# CONFIG_FANOTIFY_ACCESS_PERMISSIONS is not set -CONFIG_FAT_FS=y -# CONFIG_FB_OMAP2 is not set -CONFIG_FHANDLE=y +CONFIG_FB=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_CFB_REV_PIXELS_IN_BYTE=y +CONFIG_FB_CMDLINE=y +CONFIG_FB_DA8XX=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_OMAP2=y +CONFIG_FB_OMAP2_DEBUG_SUPPORT=y +CONFIG_FB_OMAP2_NUM_FBS=3 CONFIG_FIRMWARE_EDID=y CONFIG_FIX_EARLYCON_MEM=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x16=y +CONFIG_FONT_8x8=y +CONFIG_FONT_SUPPORT=y +CONFIG_FORCE_MAX_ZONEORDER=12 +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set CONFIG_FRAME_POINTER=y CONFIG_FREEZER=y CONFIG_FS_MBCACHE=y -CONFIG_FS_POSIX_ACL=y CONFIG_GENERIC_ALLOCATOR=y -CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_IDLE_POLL_SETUP=y CONFIG_GENERIC_IO=y CONFIG_GENERIC_IRQ_CHIP=y @@ -217,22 +185,13 @@ CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GLOB=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_DEVRES=y CONFIG_GPIO_OMAP=y -CONFIG_GPIO_PALMAS=y -CONFIG_GPIO_PCA953X=y -CONFIG_GPIO_PCA953X_IRQ=y -CONFIG_GPIO_PCF857X=y -CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_TPS6586X=y CONFIG_GPIO_TPS65910=y CONFIG_GPIO_TWL4030=y -CONFIG_GPIO_TWL6040=y -# CONFIG_GPIO_WM8994 is not set -CONFIG_GRACE_PERIOD=y +# CONFIG_GPIO_TWL6040 is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y @@ -246,6 +205,8 @@ CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_PFN_VALID=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_ARM_SCU=y +CONFIG_HAVE_ARM_TWD=y # CONFIG_HAVE_BOOTMEM_INFO_NODE is not set CONFIG_HAVE_BPF_JIT=y CONFIG_HAVE_CC_STACKPROTECTOR=y @@ -269,7 +230,6 @@ CONFIG_HAVE_KERNEL_LZ4=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_LZO=y CONFIG_HAVE_KERNEL_XZ=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_HAVE_NET_DSA=y @@ -280,113 +240,79 @@ CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_PROC_CPU=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_SMP=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_UID16=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HDMI=y -CONFIG_HDQ_MASTER_OMAP=y CONFIG_HIGHMEM=y -CONFIG_HIGHPTE=y -CONFIG_HSI=y -CONFIG_HSI_BOARDINFO=y -# CONFIG_HSI_CHAR is not set -# CONFIG_HW_RANDOM_OMAP is not set +# CONFIG_HIGHPTE is not set +CONFIG_HOTPLUG_CPU=y CONFIG_HWMON=y +CONFIG_HW_CONSOLE=y +CONFIG_HW_RANDOM=y +CONFIG_HW_RANDOM_OMAP=y CONFIG_HZ_FIXED=0 CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=y +CONFIG_I2C_HELPER_AUTO=y CONFIG_I2C_OMAP=y -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -# CONFIG_IMA is not set -# CONFIG_IMX_THERMAL is not set CONFIG_INITRAMFS_SOURCE="" -# CONFIG_INPUT_PALMAS_PWRBUTTON is not set -CONFIG_INPUT_TPS65218_PWRBUTTON=y +CONFIG_INPUT=y +CONFIG_INPUT_KEYBOARD=y +CONFIG_INPUT_MATRIXKMAP=y +CONFIG_INPUT_TOUCHSCREEN=y CONFIG_INPUT_TWL4030_PWRBUTTON=y -CONFIG_INPUT_TWL4030_VIBRA=y -CONFIG_INPUT_TWL6040_VIBRA=y -CONFIG_INTEGRITY=y -CONFIG_INTEGRITY_AUDIT=y -# CONFIG_INTEGRITY_SIGNATURE is not set +# CONFIG_INPUT_TWL4030_VIBRA is not set +# CONFIG_INPUT_TWL6040_VIBRA is not set CONFIG_IOMMU_HELPER=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_RARP=y CONFIG_IRQCHIP=y CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_WORK=y CONFIG_JBD2=y -CONFIG_JFFS2_LZO=y -CONFIG_JFFS2_RUBIN=y -CONFIG_KALLSYMS=y -CONFIG_KALLSYMS_ALL=y -CONFIG_KEXEC=y -CONFIG_KEXEC_CORE=y -CONFIG_KEYS=y -# CONFIG_KEYBOARD_TWL4030 is not set -CONFIG_KPROBES=y -CONFIG_KRETPROBES=y -CONFIG_KS8851=y -CONFIG_KS8851_MLL=y +CONFIG_KEYBOARD_TWL4030=y CONFIG_LCD_CLASS_DEVICE=y -CONFIG_LCD_PLATFORM=y -CONFIG_LEDS_CLASS=y +# CONFIG_LCD_PLATFORM is not set CONFIG_LEDS_GPIO=y -CONFIG_LEDS_PWM=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LIBCRC32C=y CONFIG_LIBFDT=y -CONFIG_LOCKD=y -CONFIG_LOCKDEP=y +CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_LOGO=y CONFIG_LOGO_LINUX_CLUT224=y CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y -CONFIG_LOG_BUF_SHIFT=16 CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y # CONFIG_MACH_NOKIA_RX51 is not set -CONFIG_MACH_OMAP_GENERIC=y -# CONFIG_MACH_OMAP_LDP is not set # CONFIG_MACH_OMAP3517EVM is not set # CONFIG_MACH_OMAP3_PANDORA is not set -CONFIG_MAGIC_SYSRQ=y -CONFIG_MEMCG=y -CONFIG_MEMCG_KMEM=y -CONFIG_MEMCG_SWAP=y -CONFIG_MEMCG_SWAP_ENABLED=y +CONFIG_MACH_OMAP_GENERIC=y +# CONFIG_MACH_OMAP_LDP is not set +CONFIG_MAILBOX=y +# CONFIG_MAILBOX_TEST is not set +CONFIG_MDIO_BOARDINFO=y CONFIG_MEMORY=y -CONFIG_MEMORY_ISOLATION=y -CONFIG_MENELAUS=y CONFIG_MFD_CORE=y -CONFIG_MFD_PALMAS=y CONFIG_MFD_SYSCON=y CONFIG_MFD_TI_AM335X_TSCADC=y CONFIG_MFD_TPS65217=y -CONFIG_MFD_TPS65218=y CONFIG_MFD_TPS65910=y CONFIG_MFD_TWL4030_AUDIO=y CONFIG_MIGHT_HAVE_CACHE_L2X0=y CONFIG_MIGHT_HAVE_PCI=y -CONFIG_MIGRATION=y CONFIG_MMC=y CONFIG_MMC_BLOCK=y # CONFIG_MMC_OMAP is not set CONFIG_MMC_OMAP_HS=y CONFIG_MODULES_USE_ELF_REL=y -CONFIG_MSDOS_FS=y +# CONFIG_MTD_CFI_INTELEXT is not set CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_M25P80=y +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_DATAFLASH=y +# CONFIG_MTD_DATAFLASH_OTP is not set +# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set CONFIG_MTD_NAND=y CONFIG_MTD_NAND_BCH=y CONFIG_MTD_NAND_ECC=y @@ -394,61 +320,21 @@ CONFIG_MTD_NAND_ECC_BCH=y CONFIG_MTD_NAND_OMAP2=y CONFIG_MTD_NAND_OMAP_BCH=y CONFIG_MTD_NAND_OMAP_BCH_BUILD=y -CONFIG_MTD_ONENAND=y -# CONFIG_MTD_ONENAND_2X_PROGRAM is not set -# CONFIG_MTD_ONENAND_GENERIC is not set -CONFIG_MTD_ONENAND_OMAP2=y -# CONFIG_MTD_ONENAND_OTP is not set -CONFIG_MTD_ONENAND_VERIFY_WRITE=y -CONFIG_MTD_OOPS=y CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_SPI_NOR=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_BEB_LIMIT=20 -# CONFIG_MTD_UBI_BLOCK is not set -# CONFIG_MTD_UBI_FASTMAP is not set -# CONFIG_MTD_UBI_GLUEBI is not set -CONFIG_MTD_UBI_WL_THRESHOLD=4096 +# CONFIG_MTD_PHYSMAP_OF is not set CONFIG_MULTI_IRQ_HANDLER=y -CONFIG_NAMESPACES=y +CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_PER_CPU_KM=y -CONFIG_NETFILTER=y -# CONFIG_NETLABEL is not set -# CONFIG_NET_CADENCE is not set -# CONFIG_NET_CLS_CGROUP is not set -CONFIG_NET_KEY=y -CONFIG_NET_KEY_MIGRATE=y -CONFIG_NET_NS=y +CONFIG_NEON=y +CONFIG_NET_FLOW_LIMIT=y CONFIG_NET_PTP_CLASSIFY=y -# CONFIG_NET_VENDOR_ARC is not set -# CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_VENDOR_CIRRUS is not set -# CONFIG_NET_VENDOR_FARADAY is not set -# CONFIG_NET_VENDOR_HISILICON is not set -# CONFIG_NET_VENDOR_INTEL is not set -# CONFIG_NET_VENDOR_MARVELL is not set -# CONFIG_NET_VENDOR_MICROCHIP is not set -# CONFIG_NET_VENDOR_NATSEMI is not set -# CONFIG_NET_VENDOR_QUALCOMM is not set -# CONFIG_NET_VENDOR_SAMSUNG is not set -# CONFIG_NET_VENDOR_SEEQ is not set -# CONFIG_NET_VENDOR_STMICRO is not set -# CONFIG_NET_VENDOR_VIA is not set -# CONFIG_NET_VENDOR_WIZNET is not set -CONFIG_NFS_ACL_SUPPORT=y -CONFIG_NFS_FS=y -CONFIG_NFS_USE_KERNEL_DNS=y -# CONFIG_NFS_USE_LEGACY_DNS is not set -CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y +# CONFIG_NET_VENDOR_I825XX is not set CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y CONFIG_NO_BOOTMEM=y CONFIG_NO_HZ=y CONFIG_NO_HZ_COMMON=y CONFIG_NO_HZ_IDLE=y +CONFIG_NR_CPUS=4 CONFIG_OF=y CONFIG_OF_ADDRESS=y CONFIG_OF_EARLY_FLATTREE=y @@ -459,10 +345,9 @@ CONFIG_OF_MDIO=y CONFIG_OF_MTD=y CONFIG_OF_NET=y CONFIG_OF_RESERVED_MEM=y -CONFIG_OID_REGISTRY=y CONFIG_OLD_SIGACTION=y CONFIG_OLD_SIGSUSPEND3=y -# CONFIG_OMAP_SSI is not set +CONFIG_OMAP2PLUS_MBOX=y CONFIG_OMAP2_DSS=y CONFIG_OMAP2_DSS_DPI=y CONFIG_OMAP2_DSS_DSI=y @@ -471,13 +356,11 @@ CONFIG_OMAP2_DSS_INIT=y CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 CONFIG_OMAP2_DSS_SDI=y CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y -CONFIG_OMAP2_DSS_VENC=y +# CONFIG_OMAP2_DSS_VENC is not set CONFIG_OMAP2_VRFB=y # CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set # CONFIG_OMAP3_SDRC_AC_TIMING is not set -CONFIG_OMAP3_THERMAL=y CONFIG_OMAP4_DSS_HDMI=y -CONFIG_OMAP4_THERMAL=y CONFIG_OMAP5_DSS_HDMI=y CONFIG_OMAP_32K_TIMER=y CONFIG_OMAP_CONTROL_PHY=y @@ -485,19 +368,18 @@ CONFIG_OMAP_DM_TIMER=y CONFIG_OMAP_GPMC=y # CONFIG_OMAP_GPMC_DEBUG is not set CONFIG_OMAP_INTERCONNECT=y +CONFIG_OMAP_INTERCONNECT_BARRIER=y CONFIG_OMAP_IRQCHIP=y +CONFIG_OMAP_MBOX_KFIFO_SIZE=256 CONFIG_OMAP_MUX=y -CONFIG_OMAP_MUX_DEBUG=y +# CONFIG_OMAP_MUX_DEBUG is not set CONFIG_OMAP_MUX_WARNINGS=y CONFIG_OMAP_OCP2SCP=y CONFIG_OMAP_PM_NOOP=y CONFIG_OMAP_RESET_CLOCKS=y CONFIG_OMAP_WATCHDOG=y -CONFIG_OPROFILE=y -CONFIG_OPTPROBES=y CONFIG_OUTER_CACHE=y CONFIG_OUTER_CACHE_SYNC=y -CONFIG_PAGE_COUNTER=y CONFIG_PAGE_OFFSET=0xC0000000 # CONFIG_PCI is not set # CONFIG_PCI_DOMAINS_GENERIC is not set @@ -507,29 +389,19 @@ CONFIG_PGTABLE_LEVELS=2 CONFIG_PHYLIB=y # CONFIG_PHY_DM816X_USB is not set CONFIG_PINCTRL=y -# CONFIG_PINCTRL_PALMAS is not set -# CONFIG_PL310_ERRATA_588369 is not set -# CONFIG_PL310_ERRATA_727915 is not set +CONFIG_PL310_ERRATA_588369=y +CONFIG_PL310_ERRATA_727915=y # CONFIG_PL310_ERRATA_753970 is not set # CONFIG_PL310_ERRATA_769419 is not set CONFIG_PM=y -# CONFIG_PM_ADVANCED_DEBUG is not set CONFIG_PM_CLK=y -CONFIG_PM_DEBUG=y +# CONFIG_PM_DEBUG is not set CONFIG_PM_OPP=y -CONFIG_POSIX_MQUEUE=y -CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y CONFIG_POWER_AVS=y -CONFIG_POWER_AVS_OMAP=y -CONFIG_POWER_AVS_OMAP_CLASS3=y +# CONFIG_POWER_AVS_OMAP is not set CONFIG_PPS=y -CONFIG_PRINTK_TIME=y -CONFIG_PRINT_QUOTA_WARNING=y -CONFIG_PROC_EVENTS=y -CONFIG_PROC_PID_CPUSET=y -CONFIG_PROFILING=y -CONFIG_PROVE_LOCKING=y -CONFIG_PROVE_RCU=y CONFIG_PTP_1588_CLOCK=y CONFIG_PWM=y CONFIG_PWM_SYSFS=y @@ -538,109 +410,74 @@ CONFIG_PWM_TIEHRPWM=y CONFIG_PWM_TIPWMSS=y # CONFIG_PWM_TWL is not set # CONFIG_PWM_TWL_LED is not set -# CONFIG_QFMT_V1 is not set -CONFIG_QFMT_V2=y -CONFIG_QUOTA=y -CONFIG_QUOTACTL=y -# CONFIG_QUOTA_NETLINK_INTERFACE is not set -CONFIG_QUOTA_TREE=y CONFIG_RATIONAL=y -# CONFIG_RCU_STALL_COMMON is not set +CONFIG_RCU_STALL_COMMON=y CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_IRQ=y CONFIG_REGMAP_MMIO=y CONFIG_REGMAP_SPI=y CONFIG_REGULATOR=y -CONFIG_REGULATOR_PALMAS=y -CONFIG_REGULATOR_PBIAS=y -CONFIG_REGULATOR_TI_ABB=y -CONFIG_REGULATOR_TPS62360=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_GPIO=y +# CONFIG_REGULATOR_PBIAS is not set CONFIG_REGULATOR_TPS65023=y CONFIG_REGULATOR_TPS6507X=y CONFIG_REGULATOR_TPS65217=y -CONFIG_REGULATOR_TPS65218=y CONFIG_REGULATOR_TPS65910=y CONFIG_REGULATOR_TWL4030=y -CONFIG_RING_BUFFER=y -CONFIG_RING_BUFFER_ALLOW_SWAP=y -CONFIG_ROOT_NFS=y -# CONFIG_RSI_91X is not set +CONFIG_RESET_CONTROLLER=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_DS1307=y CONFIG_RTC_DRV_OMAP=y -CONFIG_RTC_DRV_PALMAS=y -# CONFIG_RTC_DRV_TPS65910 is not set +CONFIG_RTC_DRV_TPS65910=y CONFIG_RTC_DRV_TWL4030=y -CONFIG_RTC_DRV_TWL92330=y -CONFIG_RT_GROUP_SCHED=y +CONFIG_RWSEM_SPIN_ON_OWNER=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_RXKAD=y -CONFIG_SATA_AHCI_PLATFORM=y -CONFIG_SCHEDSTATS=y CONFIG_SCHED_HRTICK=y -CONFIG_SCHED_INFO=y -CONFIG_SCSI=y -CONFIG_SCSI_SCAN_ASYNC=y -CONFIG_SDIO_UART=y -CONFIG_SECCOMP=y -CONFIG_SECCOMP_FILTER=y -CONFIG_SENSORS_GPIO_FAN=y +# CONFIG_SCHED_INFO is not set +# CONFIG_SCSI_DMA is not set CONFIG_SENSORS_LM75=y -CONFIG_SENSORS_TMP102=y -CONFIG_SENSORS_TSL2550=y -CONFIG_SERIAL_8250_DETECT_IRQ=y CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_FSL=y -CONFIG_SERIAL_8250_MANY_PORTS=y -CONFIG_SERIAL_8250_NR_UARTS=32 # CONFIG_SERIAL_8250_OMAP is not set -CONFIG_SERIAL_8250_RSA=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SERIAL_OMAP=y CONFIG_SERIAL_OMAP_CONSOLE=y -CONFIG_SERIO=y -# CONFIG_SG_SPLIT is not set -CONFIG_SMC91X=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y CONFIG_SMSC911X=y # CONFIG_SMSC911X_ARCH_HOOKS is not set -CONFIG_SMSC_PHY=y CONFIG_SND=y -# CONFIG_SND_EDMA_SOC is not set +CONFIG_SND_ARM=y +CONFIG_SND_COMPRESS_OFFLOAD=y CONFIG_SND_DAVINCI_SOC_MCASP=y -CONFIG_SND_DEBUG=y -# CONFIG_SND_DEBUG_VERBOSE is not set CONFIG_SND_DMAENGINE_PCM=y -# CONFIG_SND_EMU10K1_SEQ is not set -CONFIG_SND_MIXER_OSS=y +# CONFIG_SND_EDMA_SOC is not set +CONFIG_SND_JACK=y CONFIG_SND_OMAP_SOC=y +CONFIG_SND_OMAP_SOC_DMIC=y # CONFIG_SND_OMAP_SOC_HDMI_AUDIO is not set -# CONFIG_SND_OMAP_SOC_RX51 is not set +CONFIG_SND_OMAP_SOC_MCBSP=y +CONFIG_SND_OMAP_SOC_MCPDM=y CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=y CONFIG_SND_OMAP_SOC_OMAP_TWL4030=y -# CONFIG_SND_OPL3_LIB_SEQ is not set -# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_OMAP_SOC_RX51 is not set CONFIG_SND_PCM=y CONFIG_SND_PCM_OSS=y -# CONFIG_SND_RAWMIDI_SEQ is not set -# CONFIG_SND_SBAWE_SEQ is not set -CONFIG_SND_SIMPLE_CARD=y CONFIG_SND_SOC=y -# CONFIG_SND_SOC_AC97_CODEC is not set -# CONFIG_SND_SOC_FSL_SSI is not set +CONFIG_SND_SOC_DMIC=y CONFIG_SND_SOC_I2C_AND_SPI=y -# CONFIG_SND_SOC_IMX_AUDMUX is not set -# CONFIG_SND_SOC_RT5677_SPI is not set CONFIG_SND_SOC_TLV320AIC3X=y -CONFIG_SND_VERBOSE_PRINTK=y +CONFIG_SND_SOC_TWL4030=y +CONFIG_SND_SOC_TWL6040=y CONFIG_SOC_AM33XX=y CONFIG_SOC_AM43XX=y CONFIG_SOC_BUS=y CONFIG_SOC_HAS_OMAP2_SDRC=y -# CONFIG_SOC_OMAP2420 is not set -# CONFIG_SOC_OMAP2430 is not set -CONFIG_SOC_OMAP3430=y +# CONFIG_SOC_OMAP3430 is not set # CONFIG_SOC_TI81XX is not set CONFIG_SOUND=y CONFIG_SOUND_OSS_CORE=y @@ -648,72 +485,50 @@ CONFIG_SOUND_OSS_CORE_PRECLAIM=y CONFIG_SPARSE_IRQ=y CONFIG_SPI=y CONFIG_SPI_MASTER=y -CONFIG_SPI_OMAP24XX=y -CONFIG_SPI_TI_QSPI=y -CONFIG_SRAM=y +# CONFIG_SPI_OMAP24XX is not set CONFIG_SRCU=y -CONFIG_STACKTRACE=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -# CONFIG_SUNXI_SRAM is not set +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y CONFIG_SWIOTLB=y CONFIG_SWP_EMULATE=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_THERMAL=y -# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set -CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y -# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set -# CONFIG_THERMAL_EMULATION is not set -CONFIG_THERMAL_GOV_FAIR_SHARE=y -CONFIG_THERMAL_GOV_STEP_WISE=y -CONFIG_THERMAL_GOV_USER_SPACE=y -CONFIG_THERMAL_OF=y # CONFIG_THUMB2_KERNEL is not set CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_TIMER_STATS=y -CONFIG_TI_AM335X_ADC=y -# CONFIG_TI_CPPI41 is not set +CONFIG_TI_CPPI41=y CONFIG_TI_CPSW=y CONFIG_TI_CPSW_ALE=y CONFIG_TI_CPSW_PHY_SEL=y CONFIG_TI_CPTS=y -CONFIG_TI_DAVINCI_EMAC=y CONFIG_TI_DAVINCI_CPDMA=y +# CONFIG_TI_DAVINCI_EMAC is not set CONFIG_TI_DAVINCI_MDIO=y CONFIG_TI_DMA_CROSSBAR=y CONFIG_TI_EDMA=y CONFIG_TI_EMIF=y -CONFIG_TI_PIPE3=y -CONFIG_TI_SOC_THERMAL=y -CONFIG_TI_THERMAL=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_TRACE_CLOCK=y -CONFIG_TRACE_IRQFLAGS=y -# CONFIG_TWL4030_MADC is not set +# CONFIG_TI_PIPE3 is not set +CONFIG_TOUCHSCREEN_PROPERTIES=y +CONFIG_TOUCHSCREEN_TI_AM335X_TSC=y +CONFIG_TREE_RCU=y +CONFIG_TWL4030_CORE=y +CONFIG_TWL4030_POWER=y CONFIG_TWL4030_WATCHDOG=y CONFIG_TWL6040_CORE=y -CONFIG_UBIFS_FS=y -# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set -CONFIG_UBIFS_FS_LZO=y -CONFIG_UBIFS_FS_ZLIB=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" -CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_USB_SUPPORT=y -CONFIG_USB_DWC3_OMAP=y -# CONFIG_USERIO is not set -# CONFIG_USER_NS is not set CONFIG_USE_OF=y CONFIG_VECTORS_BASE=0xffff0000 -CONFIG_VFAT_FS=y CONFIG_VFP=y +CONFIG_VFPv3=y CONFIG_VIDEOMODE_HELPERS=y -CONFIG_W1=y -CONFIG_WANT_DEV_COREDUMP=y +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_VT_CONSOLE_SLEEP=y +CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_WATCHDOG_CORE=y -# CONFIG_WILC1000_DRIVER is not set # CONFIG_WKUP_M3_RPROC is not set -CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_ZBOOT_ROM_TEXT=0x0 -CONFIG_ZLIB_DEFLATE=y -CONFIG_ZLIB_INFLATE=y +CONFIG_XPS=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_ZBOOT_ROM_TEXT=0 CONFIG_ZONE_DMA_FLAG=0 -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From lynxis at fe80.eu Mon Apr 25 21:17:24 2016 From: lynxis at fe80.eu (Alexander Couzens) Date: Tue, 26 Apr 2016 03:17:24 +0200 Subject: [OpenWrt-Devel] [PATCH 3/4] kernel/spi: add kernel package for spi-omap-24xx In-Reply-To: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> Message-ID: <1461633445-1695-4-git-send-email-lynxis@fe80.eu> spi-omap-24xx can be found in TI based SoC like the beaglebone black Signed-off-by: Alexander Couzens --- package/kernel/linux/modules/spi.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/package/kernel/linux/modules/spi.mk b/package/kernel/linux/modules/spi.mk index 1c2a789..1d70138 100644 --- a/package/kernel/linux/modules/spi.mk +++ b/package/kernel/linux/modules/spi.mk @@ -89,3 +89,20 @@ define KernelPackage/spi-dev/description endef $(eval $(call KernelPackage,spi-dev)) + +define KernelPackage/spi-omap-24xx + SUBMENU:=$(SPI_MENU) + TITLE:=SPI omap 24xx + KCONFIG:=CONFIG_SPI_OMAP24XX \ + CONFIG_SPI=y \ + CONFIG_SPI_MASTER=y + FILES:=$(LINUX_DIR)/drivers/spi/spi-omap2-mcspi.ko + AUTOLOAD:=$(call AutoProbe,spi-omap2-mcspi) +endef + +define KernelPackage/spi-dev/description + This package contains the user mode SPI device driver +endef + +$(eval $(call KernelPackage,spi-omap-24xx)) + -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From lynxis at fe80.eu Mon Apr 25 21:17:25 2016 From: lynxis at fe80.eu (Alexander Couzens) Date: Tue, 26 Apr 2016 03:17:25 +0200 Subject: [OpenWrt-Devel] [PATCH 4/4] add usb gadget ehci debug driver In-Reply-To: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> Message-ID: <1461633445-1695-5-git-send-email-lynxis@fe80.eu> This gadget driver allow you to debug other devices via EHCI Debug Port capability. Signed-off-by: Alexander Couzens --- package/kernel/linux/modules/usb.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 8c5a2ab..7857d44 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -234,6 +234,23 @@ endef $(eval $(call KernelPackage,usb-lib-composite)) +define KernelPackage/usb-ehci-debug-gadget + TITLE:=USB EHCI debug port Gadget support + KCONFIG:=\ + CONFIG_USB_G_DBGP \ + CONFIG_USB_G_DBGP_SERIAL=y \ + CONFIG_USB_G_DBGP_PRINTK=n + DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite +kmod-usb-serial-gadget + FILES:=$(LINUX_DIR)/drivers/usb/gadget/legacy/g_dbgp.ko + AUTOLOAD:=$(call AutoLoad,52,g_dbgp) + $(call AddDepends/usb) +endef + +define KernelPackage/usb-ehci-debug-gadget/description + Kernel support for USB EHCI debug port Gadget. +endef + +$(eval $(call KernelPackage,usb-ehci-debug-gadget)) define KernelPackage/usb-eth-gadget TITLE:=USB Ethernet Gadget support -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Mon Apr 25 21:24:35 2016 From: me at ndoo.sg (Andrew Yong) Date: Tue, 26 Apr 2016 09:24:35 +0800 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: <1461600070.5902.2.camel@ndoo.sg> Message-ID: "alternatively call uboot-env directly without the fw_* abstraction layer" Pardon the obtuse question but how would I go about doing this? It sounds like the cleanest way to do things. I'd like to avoid calling uci-default earlier than it needs to be, and potentially messing up other things in the init process. If there really isn't an OpenWrt-approved way to do this, I may just advocate replacing SamKnows' u-boot entirely (writing to the same partition every boot seems bad for flash memory anyway). On Tue, Apr 26, 2016 at 12:32 AM, John Crispin wrote: > > > On 25/04/2016 18:01, Andrew Yong wrote: >> diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >> new file mode 100644 >> index 0000000..570fe16 >> --- /dev/null >> +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >> @@ -0,0 +1,22 @@ >> +#!/bin/sh >> + >> +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts >> +# to boot a recovery partition when bootcount > 3. We need to ensure this is >> +# reset to 0 every boot >> + >> +do_bootcount_reset() { >> + . /lib/ramips.sh >> + >> + local board=$(ramips_board_name) >> + >> + case "$board" in >> + sk-wb8) >> + echo "Board is SamKnows Whitebox 8, resetting bootcount environment variable..." >> + fw_setenv bootcount 0 >> + ;; >> + esac >> + >> + return 0 >> +} >> + >> +boot_hook_add preinit_main do_bootcount_reset > > > does this actually work ? thinking about it, you might need to have > uci-default run for it to work properly or alternatively call uboot-env > directly without the fw_* abstraction layer > > John _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From vasilugin at yandex.ru Mon Apr 25 22:50:30 2016 From: vasilugin at yandex.ru (=?koi8-r?B?88XSx8XKIPfB08nMwMfJzg==?=) Date: Tue, 26 Apr 2016 08:50:30 +0600 Subject: [OpenWrt-Devel] [RFC] ramips: fix bad patch awake rt305x USB controller In-Reply-To: <63695107-92df-da04-a653-c5720e0b2557@phrozen.org> References: <5056501461383729@web4o.yandex.ru> <63695107-92df-da04-a653-c5720e0b2557@phrozen.org> Message-ID: <423701461639030@web22o.yandex.ru> 25.04.2016, 19:11, "John Crispin" : > Hi, > > i dont see why this is needed.the patch in the tree does not look broken > and seems to compile fine. > > ????????John > Because fixed in changeset #49221 --- serge _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From weedy2887 at gmail.com Mon Apr 25 23:07:46 2016 From: weedy2887 at gmail.com (Weedy) Date: Mon, 25 Apr 2016 23:07:46 -0400 Subject: [OpenWrt-Devel] [PATCH 02/05] [tools] findutils glibc >= 2.23 compat In-Reply-To: <571E5524.2040900@openwrt.org> References: <571E4C4D.3060707@gmail.com> <571E5524.2040900@openwrt.org> Message-ID: On 25 Apr 2016 1:33 pm, "Jo-Philipp Wich" wrote: > > Hi, > > this should be handled already, configure uses AC_HEADER_MAJOR and > mountlist.c does: > > #ifdef MAJOR_IN_SYSMACROS > #include > #define HAVE_MAJOR > ... > > did you patched findutils proactively or was there an actual build issue? I patched everything in response to failures. If it's already in there then I dunno why it's not getting enabled. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From luizluca at gmail.com Mon Apr 25 23:25:24 2016 From: luizluca at gmail.com (Luiz Angelo Daros de Luca) Date: Tue, 26 Apr 2016 03:25:24 +0000 Subject: [OpenWrt-Devel] upstream opkg In-Reply-To: <57189ABB.3090909@openwrt.org> References: <57189ABB.3090909@openwrt.org> Message-ID: Thanks Jo, Do you have any idea how it would be possible to reduce upstream opkg size? Create a libarchive-mini? Maybe we can simply revert libarchive adoption (specially if we turn it into a ./configure option). I guess it is limited to libopkg/pkg_extract.c file. Maybe it is better to keep an openwrt customized pkg_extract.c than to maintain an full opkg fork (with known issues). deb and rpm are already possible busybox applet. Maybe opkg could also become one (and share some code with tar/gzip). Regards, -- Luiz Angelo Daros de Luca luizluca at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jaberamatogoro at gmail.com Tue Apr 26 01:43:48 2016 From: jaberamatogoro at gmail.com (Matogoro Jabera) Date: Tue, 26 Apr 2016 11:13:48 +0530 Subject: [OpenWrt-Devel] Flashing Openwrt to Mikrotik Board RB433AH Message-ID: Dear Colleagues, I have a new board with Mikrotik OS loaded in it and I want to load OpenWRT for my Wireless Project. In fact, I want to use it for my TV White Space Project in Tanzania due to its cost-benefit as compared to available TVWS Radio Devices available in the market. I am following this step-by-step guidelines ( http://vip.gatech.edu/wiki/images/d/d8/Flashing_Routerboards_with_OpenWRT.pdf) with some modifications such as the link is pointing to git clone "git:// nbd.name/openwrt.git" which seems NOT accessible in my network. Insteady, I directed to "git://git.openwrt.org/12.09/openwrt.git" I am able to make the OpenWRT available temporary to the board and failing to make it availabel permanently to the board. I am therefore writing to be directed to the alternative working step-by-step guideline to be able to accomplish this task. I am using Ubuntu 14.04 OS. Regards, -- MATOGORO Jabhera Assistant Lecturer & Coordinator - Microsoft Innovation Center, Tanzania College of Informatics and Virtual Education The University of Dodoma (www.udom.ac.tz) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Tue Apr 26 02:06:11 2016 From: john at phrozen.org (John Crispin) Date: Tue, 26 Apr 2016 08:06:11 +0200 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: <1461600070.5902.2.camel@ndoo.sg> Message-ID: <74b5406a-6669-a7d2-3085-2cec003ee695@phrozen.org> On 26/04/2016 03:24, Andrew Yong wrote: > "alternatively call uboot-env directly without the fw_* abstraction layer" > > Pardon the obtuse question but how would I go about doing this? It > sounds like the cleanest way to do things. > > I'd like to avoid calling uci-default earlier than it needs to be, and > potentially messing up other things in the init process. > > If there really isn't an OpenWrt-approved way to do this, I may just > advocate replacing SamKnows' u-boot entirely (writing to the same > partition every boot seems bad for flash memory anyway). replacing uboot is not a good idea. you should try to make this work in the prei8nit step. if the fw_setenv call fails then figure out why and try to fix it. > > On Tue, Apr 26, 2016 at 12:32 AM, John Crispin wrote: >> >> >> On 25/04/2016 18:01, Andrew Yong wrote: >>> diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >>> new file mode 100644 >>> index 0000000..570fe16 >>> --- /dev/null >>> +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >>> @@ -0,0 +1,22 @@ >>> +#!/bin/sh >>> + >>> +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts >>> +# to boot a recovery partition when bootcount > 3. We need to ensure this is >>> +# reset to 0 every boot >>> + >>> +do_bootcount_reset() { >>> + . /lib/ramips.sh >>> + >>> + local board=$(ramips_board_name) >>> + >>> + case "$board" in >>> + sk-wb8) >>> + echo "Board is SamKnows Whitebox 8, resetting bootcount environment variable..." >>> + fw_setenv bootcount 0 >>> + ;; >>> + esac >>> + >>> + return 0 >>> +} >>> + >>> +boot_hook_add preinit_main do_bootcount_reset >> >> >> does this actually work ? thinking about it, you might need to have >> uci-default run for it to work properly or alternatively call uboot-env >> directly without the fw_* abstraction layer >> >> John _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tim at tn-x.org Tue Apr 26 02:11:11 2016 From: tim at tn-x.org (Tim Niemeyer) Date: Tue, 26 Apr 2016 08:11:11 +0200 Subject: [OpenWrt-Devel] [PATCH v2][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: References: Message-ID: <1461651071-7165-1-git-send-email-tim@tn-x.org> This reverts commit 0fd48fd7dab066db8a46e51775579c9ef507ca25. We are facing some problem on rolling out the current 15.05-branch to our devices because the image name changed. The changed image name breaks compatibility for derived projects and that's something which should only happen if there is a really good reason (e.g. security fix). Signed-off-by: Tim Niemeyer --- Changes in v2: - Rebased on upstream (wr841n-v11) target/linux/ar71xx/image/Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 85a1857..9a7acbd 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -555,28 +555,28 @@ define Device/tl-wr743nd-v2 endef TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr740n-v6 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2 -define Device/tl-wr841-v8 +define Device/tl-wr841n-v8 $(Device/tplink-4mlzma) BOARDNAME := TL-WR841N-v8 DEVICE_PROFILE := TLWR841 TPLINK_HWID := 0x08410008 endef -define Device/tl-wr841-v9 +define Device/tl-wr841n-v9 $(Device/tplink-4mlzma) BOARDNAME := TL-WR841N-v9 DEVICE_PROFILE := TLWR841 TPLINK_HWID := 0x08410009 endef -define Device/tl-wr841-v10 +define Device/tl-wr841n-v10 $(Device/tplink-4mlzma) BOARDNAME := TL-WR841N-v9 DEVICE_PROFILE := TLWR841 TPLINK_HWID := 0x08410010 endef -define Device/tl-wr841-v11 +define Device/tl-wr841n-v11 $(Device/tplink-4mlzma) BOARDNAME := TL-WR841N-v9 DEVICE_PROFILE := TLWR841 @@ -603,7 +603,7 @@ define Device/tl-wr847n-v8 DEVICE_PROFILE := TLWR841 TPLINK_HWID := 0x08470008 endef -TARGET_DEVICES += tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr841-v11 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8 +TARGET_DEVICES += tl-wr841n-v8 tl-wr841n-v9 tl-wr841n-v10 tl-wr841n-v11 tl-wr842n-v2 tl-wr843nd-v1 tl-wr847n-v8 define Device/tl-wr941nd-v5 $(Device/tplink-4mlzma) @@ -2031,13 +2031,13 @@ $(eval $(call SingleProfile,Seama,64k,QIHOO360,qihoo-c301,QIHOO-C301,ttyS0,11520 $(eval $(call SingleProfile,Senao,squashfs-only,EAP300V2,eap300v2,EAP300V2,ttyS0,115200,$$(eap300v2_mtdlayout))) -$(eval $(call SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M)) +$(eval $(call SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701nd-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730re-v1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWA830RV1,tl-wa830re-v1,TL-WA901ND,ttyS0,115200,0x08300010,1,4M)) @@ -2046,9 +2046,9 @@ $(eval $(call SingleProfile,TPLINK,64kraw,TLWA901NV2,tl-wa901nd-v2,TL-WA901ND-v2 $(eval $(call SingleProfile,TPLINK,64kraw,TLWR740NV1,tl-wr740n-v1,TL-WR741ND,ttyS0,115200,0x07400001,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR740NV3,tl-wr740n-v3,TL-WR741ND,ttyS0,115200,0x07400003,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR743NV1,tl-wr743nd-v1,TL-WR741ND,ttyS0,115200,0x07430001,1,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M)) -$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841nd-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841nd-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M)) +$(eval $(call SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841nd-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR842V1,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV2,tl-wr941nd-v2,TL-WR941ND,ttyS0,115200,0x09410002,2,4M)) $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV3,tl-wr941nd-v3,TL-WR941ND,ttyS0,115200,0x09410002,2,4M)) -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Tue Apr 26 02:31:56 2016 From: me at ndoo.sg (Andrew Yong) Date: Tue, 26 Apr 2016 14:31:56 +0800 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: <74b5406a-6669-a7d2-3085-2cec003ee695@phrozen.org> References: <1461600070.5902.2.camel@ndoo.sg> <74b5406a-6669-a7d2-3085-2cec003ee695@phrozen.org> Message-ID: Alright. Is it acceptable to call `. /lib/functions/uci-defaults.sh` in a preinit file? If it does not violate the sanctity of any OpenWrt init conventions, I?ll do that and test drive it. On Tue, Apr 26, 2016 at 2:06 PM, John Crispin wrote: > > > On 26/04/2016 03:24, Andrew Yong wrote: >> "alternatively call uboot-env directly without the fw_* abstraction layer" >> >> Pardon the obtuse question but how would I go about doing this? It >> sounds like the cleanest way to do things. >> >> I'd like to avoid calling uci-default earlier than it needs to be, and >> potentially messing up other things in the init process. >> >> If there really isn't an OpenWrt-approved way to do this, I may just >> advocate replacing SamKnows' u-boot entirely (writing to the same >> partition every boot seems bad for flash memory anyway). > > > replacing uboot is not a good idea. you should try to make this work in > the prei8nit step. if the fw_setenv call fails then figure out why and > try to fix it. > > >> >> On Tue, Apr 26, 2016 at 12:32 AM, John Crispin wrote: >>> >>> >>> On 25/04/2016 18:01, Andrew Yong wrote: >>>> diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >>>> new file mode 100644 >>>> index 0000000..570fe16 >>>> --- /dev/null >>>> +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >>>> @@ -0,0 +1,22 @@ >>>> +#!/bin/sh >>>> + >>>> +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts >>>> +# to boot a recovery partition when bootcount > 3. We need to ensure this is >>>> +# reset to 0 every boot >>>> + >>>> +do_bootcount_reset() { >>>> + . /lib/ramips.sh >>>> + >>>> + local board=$(ramips_board_name) >>>> + >>>> + case "$board" in >>>> + sk-wb8) >>>> + echo "Board is SamKnows Whitebox 8, resetting bootcount environment variable..." >>>> + fw_setenv bootcount 0 >>>> + ;; >>>> + esac >>>> + >>>> + return 0 >>>> +} >>>> + >>>> +boot_hook_add preinit_main do_bootcount_reset >>> >>> >>> does this actually work ? thinking about it, you might need to have >>> uci-default run for it to work properly or alternatively call uboot-env >>> directly without the fw_* abstraction layer >>> >>> John _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Tue Apr 26 02:35:00 2016 From: blogic at openwrt.org (John Crispin) Date: Tue, 26 Apr 2016 08:35:00 +0200 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: <1461600070.5902.2.camel@ndoo.sg> <74b5406a-6669-a7d2-3085-2cec003ee695@phrozen.org> Message-ID: ok, this might not work, just move it to the init.d folder On 26/04/2016 08:31, Andrew Yong wrote: > Alright. > > Is it acceptable to call `. /lib/functions/uci-defaults.sh` in a preinit file? > > If it does not violate the sanctity of any OpenWrt init conventions, > I?ll do that and test drive it. > > On Tue, Apr 26, 2016 at 2:06 PM, John Crispin wrote: >> >> >> On 26/04/2016 03:24, Andrew Yong wrote: >>> "alternatively call uboot-env directly without the fw_* abstraction layer" >>> >>> Pardon the obtuse question but how would I go about doing this? It >>> sounds like the cleanest way to do things. >>> >>> I'd like to avoid calling uci-default earlier than it needs to be, and >>> potentially messing up other things in the init process. >>> >>> If there really isn't an OpenWrt-approved way to do this, I may just >>> advocate replacing SamKnows' u-boot entirely (writing to the same >>> partition every boot seems bad for flash memory anyway). >> >> >> replacing uboot is not a good idea. you should try to make this work in >> the prei8nit step. if the fw_setenv call fails then figure out why and >> try to fix it. >> >> >>> >>> On Tue, Apr 26, 2016 at 12:32 AM, John Crispin wrote: >>>> >>>> >>>> On 25/04/2016 18:01, Andrew Yong wrote: >>>>> diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >>>>> new file mode 100644 >>>>> index 0000000..570fe16 >>>>> --- /dev/null >>>>> +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >>>>> @@ -0,0 +1,22 @@ >>>>> +#!/bin/sh >>>>> + >>>>> +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts >>>>> +# to boot a recovery partition when bootcount > 3. We need to ensure this is >>>>> +# reset to 0 every boot >>>>> + >>>>> +do_bootcount_reset() { >>>>> + . /lib/ramips.sh >>>>> + >>>>> + local board=$(ramips_board_name) >>>>> + >>>>> + case "$board" in >>>>> + sk-wb8) >>>>> + echo "Board is SamKnows Whitebox 8, resetting bootcount environment variable..." >>>>> + fw_setenv bootcount 0 >>>>> + ;; >>>>> + esac >>>>> + >>>>> + return 0 >>>>> +} >>>>> + >>>>> +boot_hook_add preinit_main do_bootcount_reset >>>> >>>> >>>> does this actually work ? thinking about it, you might need to have >>>> uci-default run for it to work properly or alternatively call uboot-env >>>> directly without the fw_* abstraction layer >>>> >>>> John > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Tue Apr 26 02:37:19 2016 From: me at ndoo.sg (Andrew Yong) Date: Tue, 26 Apr 2016 14:37:19 +0800 Subject: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8 In-Reply-To: References: <1461600070.5902.2.camel@ndoo.sg> <74b5406a-6669-a7d2-3085-2cec003ee695@phrozen.org> Message-ID: Yeah I think that wants a RW filesystem, haha. My apologies in advance to all other ramips devices, then, I?ll add an init.d script for ./target/linux/ramips/base-files/etc/init.d/S99bootcount to do this. On Tue, Apr 26, 2016 at 2:35 PM, John Crispin wrote: > ok, this might not work, just move it to the init.d folder > > > On 26/04/2016 08:31, Andrew Yong wrote: >> Alright. >> >> Is it acceptable to call `. /lib/functions/uci-defaults.sh` in a preinit file? >> >> If it does not violate the sanctity of any OpenWrt init conventions, >> I?ll do that and test drive it. >> >> On Tue, Apr 26, 2016 at 2:06 PM, John Crispin wrote: >>> >>> >>> On 26/04/2016 03:24, Andrew Yong wrote: >>>> "alternatively call uboot-env directly without the fw_* abstraction layer" >>>> >>>> Pardon the obtuse question but how would I go about doing this? It >>>> sounds like the cleanest way to do things. >>>> >>>> I'd like to avoid calling uci-default earlier than it needs to be, and >>>> potentially messing up other things in the init process. >>>> >>>> If there really isn't an OpenWrt-approved way to do this, I may just >>>> advocate replacing SamKnows' u-boot entirely (writing to the same >>>> partition every boot seems bad for flash memory anyway). >>> >>> >>> replacing uboot is not a good idea. you should try to make this work in >>> the prei8nit step. if the fw_setenv call fails then figure out why and >>> try to fix it. >>> >>> >>>> >>>> On Tue, Apr 26, 2016 at 12:32 AM, John Crispin wrote: >>>>> >>>>> >>>>> On 25/04/2016 18:01, Andrew Yong wrote: >>>>>> diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >>>>>> new file mode 100644 >>>>>> index 0000000..570fe16 >>>>>> --- /dev/null >>>>>> +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount >>>>>> @@ -0,0 +1,22 @@ >>>>>> +#!/bin/sh >>>>>> + >>>>>> +# SamKnows Whitebox 8 increments a bootcount variable every boot and attempts >>>>>> +# to boot a recovery partition when bootcount > 3. We need to ensure this is >>>>>> +# reset to 0 every boot >>>>>> + >>>>>> +do_bootcount_reset() { >>>>>> + . /lib/ramips.sh >>>>>> + >>>>>> + local board=$(ramips_board_name) >>>>>> + >>>>>> + case "$board" in >>>>>> + sk-wb8) >>>>>> + echo "Board is SamKnows Whitebox 8, resetting bootcount environment variable..." >>>>>> + fw_setenv bootcount 0 >>>>>> + ;; >>>>>> + esac >>>>>> + >>>>>> + return 0 >>>>>> +} >>>>>> + >>>>>> +boot_hook_add preinit_main do_bootcount_reset >>>>> >>>>> >>>>> does this actually work ? thinking about it, you might need to have >>>>> uci-default run for it to work properly or alternatively call uboot-env >>>>> directly without the fw_* abstraction layer >>>>> >>>>> John >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel at lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >> > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kvalo at qca.qualcomm.com Tue Apr 26 03:20:32 2016 From: kvalo at qca.qualcomm.com (Valo, Kalle) Date: Tue, 26 Apr 2016 07:20:32 +0000 Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: <112436203.W4fT509tru@debian64> (Christian Lamparter's message of "Mon, 25 Apr 2016 21:01:04 +0200") References: <87potd3e9j.fsf@kamboji.qca.qualcomm.com> <112436203.W4fT509tru@debian64> Message-ID: <8760v425vl.fsf@kamboji.qca.qualcomm.com> Christian Lamparter writes: > Hello, > > On Monday, April 25, 2016 10:53:41 AM David Hutchison wrote: >> So with some modifications to pci.c, hw.h and core.c I was able to get >> the radio initialized! :) > > Hey, that's nice! Can you make and post a patch for that? > I'm sure if it's just a matter of adding the new pci and chip > ids to the tables. You could just go ahead and post it, so it > will be picked up. But remember that the basic functionality should somewhat work before we add the ids to ath10k. The hardware support doesn't need to be perfect but we should not enable something which is brokend and would just waste users time. -- Kalle Valo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kwadronaut at autistici.org Tue Apr 26 03:22:52 2016 From: kwadronaut at autistici.org (kwadronaut) Date: Tue, 26 Apr 2016 09:22:52 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: References: <56EB27A3.2010204@openwrt.org> <1461486291-8770-1-git-send-email-tim@tn-x.org> <20160425065419.GK8928@medion.lan> Message-ID: <571F174C.7070705@autistici.org> On 25/04/16 09:06, John Crispin wrote: > On 25/04/2016 08:54, Bastian Bittorf wrote: >> * John Crispin [25.04.2016 07:39]: >>>> The changed image name breaks compatibility for derived projects and >>>> that's something which should only happen if there is a really good >>>> reason (e.g. security fix). >>> >>> how does it beak compatibility ? >> >> I think they auto-download a preconfigured filename, >> which will ofcource not succeed. We circumvented this in our >> network-autoupdater in a way, that we download e.g. "$MODELNAME.bin" >> where $MODELNAME is from '/tmp/sysinfo/model' e.g. 'TP-Link TL-WDR4900 v1' >> and on the downloadserver we can "adjust" the symlinks... >> >> I'am against reverting the commit. Lets keep it, because it makes sense. It doesn't make sense to change naming conventions within a stable release. For a next stable release, sure fine, go ahead, there it *does* make sense. >> Maybe i can give a short talk at Battlemesh v9 about proper autoupdates, >> because we have ~10 years experience in this (including 500 dead devices >> 8-))) I agree, over the years everyone keeps improving and once in a while that hurts, but auto-updates isn't what we're aiming for. > before i merged the patch i did actually look at the compat issue and > concluded that only docs will be out of date, which is not really > anything new. all issues mentioned are home made ones. specially the one If tomorrow Sasha Levin thinks that the LTS-kernel release of 4.1 should be called 4.1-21 instead of 4.1.21 nothing really breaks. Except a bunch of home made scripts. And some distributions will need to take care of their autobuilds. And a lot of people will spend useless time into figuring out what broke in which way, and they will be angry or sad. An attitude of "Don't break current stable" is a very healthy one. When however you add or change behavior, you save that for a new release. > bastian mentions here. basically fixing your download script and > deploying it in this way will break forward compat as can be seen here. > > we now face the decision of reverting and unbreaking out of tree issues > that can be fixed easily or avoided in future or not revert it and keep > the fix that makes the filenames more consistent. adding the "n" is > after all correct ad the antenna is not "not" detachable on the relevant > models. This sounds like a minor pain. kwadronaut _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Tue Apr 26 03:28:13 2016 From: blogic at openwrt.org (John Crispin) Date: Tue, 26 Apr 2016 09:28:13 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: <571F174C.7070705@autistici.org> References: <56EB27A3.2010204@openwrt.org> <1461486291-8770-1-git-send-email-tim@tn-x.org> <20160425065419.GK8928@medion.lan> <571F174C.7070705@autistici.org> Message-ID: On 26/04/2016 09:22, kwadronaut wrote: > On 25/04/16 09:06, John Crispin wrote: >> On 25/04/2016 08:54, Bastian Bittorf wrote: >>> * John Crispin [25.04.2016 07:39]: >>>>> The changed image name breaks compatibility for derived projects and >>>>> that's something which should only happen if there is a really good >>>>> reason (e.g. security fix). >>>> >>>> how does it beak compatibility ? >>> >>> I think they auto-download a preconfigured filename, >>> which will ofcource not succeed. We circumvented this in our >>> network-autoupdater in a way, that we download e.g. "$MODELNAME.bin" >>> where $MODELNAME is from '/tmp/sysinfo/model' e.g. 'TP-Link TL-WDR4900 v1' >>> and on the downloadserver we can "adjust" the symlinks... >>> >>> I'am against reverting the commit. Lets keep it, because it makes sense. > > It doesn't make sense to change naming conventions within a stable > release. For a next stable release, sure fine, go ahead, there it *does* > make sense. > >>> Maybe i can give a short talk at Battlemesh v9 about proper autoupdates, >>> because we have ~10 years experience in this (including 500 dead devices >>> 8-))) > > I agree, over the years everyone keeps improving and once in a while > that hurts, but auto-updates isn't what we're aiming for. > >> before i merged the patch i did actually look at the compat issue and >> concluded that only docs will be out of date, which is not really >> anything new. all issues mentioned are home made ones. specially the one > > If tomorrow Sasha Levin thinks that the LTS-kernel release of 4.1 should > be called 4.1-21 instead of 4.1.21 nothing really breaks. Except a bunch > of home made scripts. And some distributions will need to take care of > their autobuilds. And a lot of people will spend useless time into > figuring out what broke in which way, and they will be angry or sad. An > attitude of "Don't break current stable" is a very healthy one. When > however you add or change behavior, you save that for a new release. > >> bastian mentions here. basically fixing your download script and >> deploying it in this way will break forward compat as can be seen here. >> >> we now face the decision of reverting and unbreaking out of tree issues >> that can be fixed easily or avoided in future or not revert it and keep >> the fix that makes the filenames more consistent. adding the "n" is >> after all correct ad the antenna is not "not" detachable on the relevant >> models. > > This sounds like a minor pain. > > kwadronaut i fail to extract from your mail what you are trying to tell us _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kwadronaut at autistici.org Tue Apr 26 03:37:35 2016 From: kwadronaut at autistici.org (kwadronaut) Date: Tue, 26 Apr 2016 09:37:35 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: References: <56EB27A3.2010204@openwrt.org> <1461486291-8770-1-git-send-email-tim@tn-x.org> <20160425065419.GK8928@medion.lan> <571F174C.7070705@autistici.org> Message-ID: <571F1ABF.1020001@autistici.org> On 26/04/16 09:28, John Crispin wrote: > i fail to extract from your mail what you are trying to tell us Common sense: don't change names within a stable release. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel.petre at posteo.net Tue Apr 26 03:40:35 2016 From: daniel.petre at posteo.net (Daniel Petre) Date: Tue, 26 Apr 2016 10:40:35 +0300 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: <571F1ABF.1020001@autistici.org> References: <56EB27A3.2010204@openwrt.org> <1461486291-8770-1-git-send-email-tim@tn-x.org> <20160425065419.GK8928@medion.lan> <571F174C.7070705@autistici.org> <571F1ABF.1020001@autistici.org> Message-ID: <28dea3c6-677e-5443-81fa-3697b141c80f@posteo.net> On 04/26/2016 10:37 AM, kwadronaut wrote: > On 26/04/16 09:28, John Crispin wrote: > >> i fail to extract from your mail what you are trying to tell us > > Common sense: don't change names within a stable release. Hi, i watched this conversation from the beginning and even if what you are saying makes sense the change is actually an improvement. > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Tue Apr 26 03:52:22 2016 From: john at phrozen.org (John Crispin) Date: Tue, 26 Apr 2016 09:52:22 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: <571F1ABF.1020001@autistici.org> References: <56EB27A3.2010204@openwrt.org> <1461486291-8770-1-git-send-email-tim@tn-x.org> <20160425065419.GK8928@medion.lan> <571F174C.7070705@autistici.org> <571F1ABF.1020001@autistici.org> Message-ID: <16854aef-a659-8bf8-1479-f56579357a40@phrozen.org> On 26/04/2016 09:37, kwadronaut wrote: > On 26/04/16 09:28, John Crispin wrote: > >> i fail to extract from your mail what you are trying to tell us > > Common sense: don't change names within a stable release. others may claim the common sense is to polish it even more and make it consistent. singular realities simply do not exist due to the nature of how perception works. however as this does cause real life problems to people the sane thing is of course to revert the change John _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From mschiffer at universe-factory.net Tue Apr 26 04:18:51 2016 From: mschiffer at universe-factory.net (Matthias Schiffer) Date: Tue, 26 Apr 2016 10:18:51 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: <16854aef-a659-8bf8-1479-f56579357a40@phrozen.org> References: <56EB27A3.2010204@openwrt.org> <1461486291-8770-1-git-send-email-tim@tn-x.org> <20160425065419.GK8928@medion.lan> <571F174C.7070705@autistici.org> <571F1ABF.1020001@autistici.org> <16854aef-a659-8bf8-1479-f56579357a40@phrozen.org> Message-ID: <571F246B.7000309@universe-factory.net> On 04/26/2016 09:52 AM, John Crispin wrote: > > > On 26/04/2016 09:37, kwadronaut wrote: >> On 26/04/16 09:28, John Crispin wrote: >> >>> i fail to extract from your mail what you are trying to tell us >> >> Common sense: don't change names within a stable release. > > others may claim the common sense is to polish it even more and make it > consistent. singular realities simply do not exist due to the nature of > how perception works. > > however as this does cause real life problems to people the sane thing > is of course to revert the change > > John Hmm, I'm not sure about this. This change broke Gluon as well when we updated our OpenWrt version, but we have adjusted to the new names now, so reverting this will break Gluon again... (and will break it again when we update from CC to a trunk version in the future) Regards, Matthias -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ardeleanalex at gmail.com Tue Apr 26 04:24:29 2016 From: ardeleanalex at gmail.com (Alexandru Ardelean) Date: Tue, 26 Apr 2016 11:24:29 +0300 Subject: [OpenWrt-Devel] [PATCH] target/linux/mpc85xx: fix EDEADLOCK define collisions with musl Message-ID: <1461659069-31664-1-git-send-email-ardeleanalex@gmail.com> libbpf fails to build. perf just emits a warning and carries on. This is a collision between linux's and musl's when building for powerpc. For powerpc, EDEADLOCK has value 58. The initial definition in the kernel include/uapi/asm-generic/errno.h : #define EDEADLOCK EDEADLK Then this gets overriden: arch/powerpc/include/uapi/asm/errno.h : #define EDEADLOCK 58 And in musl: arch/powerpc/bits/errno.h : #define EDEADLOCK 58 There would be 2 ways to solve this: 1. Patch perf, libbpf and other tools to change the inclusion order of 2. Patch the kernel just for the powerpc arch to not re-define EDEADLOCK if defined I chose 2. ======================================================================= Build failure is: CC libbpf.o In file included from /home/sandu/work/Wrt1/openwrt/build_dir/target-powerpc_8540_musl-1.1.14_ewok/linux-mpc85xx_ewok/linux-4.4.6/arch/powerpc/include/uapi/asm/errno.h:4:0, from /home/sandu/work/Wrt1/openwrt/build_dir/target-powerpc_8540_musl-1.1.14_ewok/linux-mpc85xx_ewok/linux-4.4.6/tools/include/linux/err.h:7, from libbpf.h:13, from libbpf.c:24: /home/sandu/work/Wrt1/openwrt/build_dir/target-powerpc_8540_musl-1.1.14_ewok/linux-mpc85xx_ewok/linux-4.4.6/include/uapi/asm-generic/errno.h:39:0: error: "EDEADLOCK" redefined [-Werror] #define EDEADLOCK EDEADLK ^ In file included from /home/sandu/work/Wrt1/openwrt/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/errno.h:10:0, from libbpf.c:16: /home/sandu/work/Wrt1/openwrt/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/bits/errno.h:58:0: note: this is the location of the previous definition #define EDEADLOCK 58 ^ cc1: all warnings being treated as errors CC bpf.o LD libbpf-in.o powerpc-openwrt-linux-musl-ld: cannot find libbpf.o: No such file or directory Signed-off-by: Alexandru Ardelean --- .../301-fix-edeadlock-define-collisions-with-musl.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 target/linux/mpc85xx/patches-4.4/301-fix-edeadlock-define-collisions-with-musl.patch diff --git a/target/linux/mpc85xx/patches-4.4/301-fix-edeadlock-define-collisions-with-musl.patch b/target/linux/mpc85xx/patches-4.4/301-fix-edeadlock-define-collisions-with-musl.patch new file mode 100644 index 0000000..57a35f6 --- /dev/null +++ b/target/linux/mpc85xx/patches-4.4/301-fix-edeadlock-define-collisions-with-musl.patch @@ -0,0 +1,15 @@ +diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h +index 88e0914..7549bec 100644 +--- a/include/uapi/asm-generic/errno.h ++++ b/include/uapi/asm-generic/errno.h +@@ -36,7 +36,9 @@ + #define EBADRQC 56 /* Invalid request code */ + #define EBADSLT 57 /* Invalid slot */ + +-#define EDEADLOCK EDEADLK ++#ifndef EDEADLOCK ++#define EDEADLOCK 58 ++#endif + + #define EBFONT 59 /* Bad font file format */ + #define ENOSTR 60 /* Device not a stream */ -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From helmut.schaa at googlemail.com Tue Apr 26 05:48:25 2016 From: helmut.schaa at googlemail.com (Helmut Schaa) Date: Tue, 26 Apr 2016 11:48:25 +0200 Subject: [OpenWrt-Devel] [PATCH] mpc85xx: Add T4240 sub-target Message-ID: <1461664105-19951-1-git-send-email-helmut.schaa@googlemail.com> The Freescale T4240 is a 12 core (24 threads) SoC. Add a sub-target to the mpc85xx target to build images for the T4240 Reference Design Board. Currently CPU thread support is only available in 64bit kernel builds, hence the sub-target uses the powerpc64 feature flag. Using musl libc doesn't compile properly on that sub-target yet, hence we'd select glibc by default for T4240. Networking is not yet supported as the required fman/bman/qman/dpaa drivers are not yet included in mainline. Signed-off-by: Helmut Schaa --- config/Config-devel.in | 2 +- target/linux/mpc85xx/Makefile | 2 +- target/linux/mpc85xx/image/Makefile | 2 +- target/linux/mpc85xx/t4240/config-default | 82 +++++++++++++++++++++++++++++++ target/linux/mpc85xx/t4240/target.mk | 12 +++++ toolchain/Config.in | 5 +- 6 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 target/linux/mpc85xx/t4240/config-default create mode 100644 target/linux/mpc85xx/t4240/target.mk diff --git a/config/Config-devel.in b/config/Config-devel.in index 938f0b3..474b12f 100644 --- a/config/Config-devel.in +++ b/config/Config-devel.in @@ -106,7 +106,7 @@ menuconfig DEVEL config EXTRA_OPTIMIZATION string "Additional compiler options" if DEVEL - default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc + default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc && !powerpc64 default "-fno-caller-saves" help Extra target-independent optimizations to use when building for the target. diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile index a32be90..8ba739a 100644 --- a/target/linux/mpc85xx/Makefile +++ b/target/linux/mpc85xx/Makefile @@ -12,7 +12,7 @@ BOARDNAME:=Freescale MPC85xx CPU_TYPE:=8540 FEATURES:=squashfs MAINTAINER:=Imre Kaloz -SUBTARGETS=generic p1020 +SUBTARGETS=generic p1020 t4240 KERNEL_PATCHVER:=4.4 diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile index 25a9b07..82035eb 100644 --- a/target/linux/mpc85xx/image/Makefile +++ b/target/linux/mpc85xx/image/Makefile @@ -21,7 +21,7 @@ endef zImage:=$(BIN_DIR)/$(IMG_PREFIX)-zImage -DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb +DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb fsl/t4240rdb define Image/BuildKernel cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage diff --git a/target/linux/mpc85xx/t4240/config-default b/target/linux/mpc85xx/t4240/config-default new file mode 100644 index 0000000..18fd6d6 --- /dev/null +++ b/target/linux/mpc85xx/t4240/config-default @@ -0,0 +1,82 @@ +CONFIG_64BIT=y +CONFIG_ALTIVEC=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_HAS_ILOG2_U64=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y +CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y +CONFIG_BLOCK_COMPAT=y +CONFIG_CLKDEV_LOOKUP=y +CONFIG_COMMON_CLK=y +CONFIG_COMPAT=y +CONFIG_COMPAT_BINFMT_ELF=y +CONFIG_COMPAT_NETLINK_MESSAGES=y +CONFIG_COMPAT_OLD_SIGACTION=y +CONFIG_CORENET_GENERIC=y +CONFIG_CPU_RMAP=y +# CONFIG_E5500_CPU is not set +CONFIG_E6500_CPU=y +CONFIG_EPAPR_PARAVIRT=y +CONFIG_FORCE_MAX_ZONEORDER=13 +# CONFIG_FSL_ULI1575 is not set +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +# CONFIG_GENERIC_CPU is not set +# CONFIG_HANGCHECK_TIMER is not set +CONFIG_HAVE_CLK=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_HAVE_PERF_EVENTS_NMI=y +CONFIG_HAVE_RCU_TABLE_FREE=y +CONFIG_HAVE_SETUP_PER_CPU_AREA=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +# CONFIG_HUGETLBFS is not set +CONFIG_IOMMU_SUPPORT=y +CONFIG_KERNEL_START=0xc000000000000000 +# CONFIG_LIQUIDIO is not set +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y +CONFIG_NET_FLOW_LIMIT=y +CONFIG_NR_CPUS=24 +# CONFIG_NUMA is not set +CONFIG_PAGE_OFFSET=0xc000000000000000 +CONFIG_PCI_BUS_ADDR_T_64BIT=y +CONFIG_PGTABLE_LEVELS=4 +CONFIG_PHYS_64BIT=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_PPC64=y +CONFIG_PPC_BOOK3E=y +CONFIG_PPC_BOOK3E_64=y +# CONFIG_PPC_BOOK3S_64 is not set +CONFIG_PPC_E500MC=y +CONFIG_PPC_EPAPR_HV_PIC=y +CONFIG_PPC_FPU=y +# CONFIG_PPC_I8259 is not set +CONFIG_PPC_OF_BOOT_TRAMPOLINE=y +# CONFIG_PPC_OF_PLATFORM_PCI is not set +CONFIG_PTE_64BIT=y +CONFIG_RATIONAL=y +CONFIG_RCU_STALL_COMMON=y +# CONFIG_RELOCATABLE is not set +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_SMP=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SYSVIPC_COMPAT=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +# CONFIG_THUNDER_NIC_BGX is not set +# CONFIG_THUNDER_NIC_PF is not set +# CONFIG_THUNDER_NIC_VF is not set +CONFIG_TREE_RCU=y +# CONFIG_U3_DART is not set +# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set +CONFIG_WORD_SIZE=64 +CONFIG_XPS=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZONE_DMA32=y diff --git a/target/linux/mpc85xx/t4240/target.mk b/target/linux/mpc85xx/t4240/target.mk new file mode 100644 index 0000000..1b515ab --- /dev/null +++ b/target/linux/mpc85xx/t4240/target.mk @@ -0,0 +1,12 @@ +BOARDNAME:=T4240 +FEATURES:=squashfs powerpc64 +MAINTAINER:=Helmut Schaa + +# Let the kernel figure out the correct usage of -m64 and -m32 +# for different parts. +KERNEL_CC:= + +define Target/Description + Build firmware images for Freescale T4240 based boards. +endef + diff --git a/toolchain/Config.in b/toolchain/Config.in index 49c3461..8f27cfb 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -230,7 +230,7 @@ choice config LIBC_USE_MUSL select USE_MUSL bool "Use musl" - depends on !(arc) + depends on !(arc) && !(powerpc64) endchoice @@ -257,6 +257,7 @@ config INSIGHT Enable if you want to build insight-gdb. config USE_GLIBC + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (powerpc64) bool config USE_UCLIBC @@ -264,7 +265,7 @@ config USE_UCLIBC bool config USE_MUSL - default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) && !(powerpc64) bool config USE_EXTERNAL_LIBC -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From lynxis at fe80.eu Tue Apr 26 06:52:50 2016 From: lynxis at fe80.eu (Alexander Couzens) Date: Tue, 26 Apr 2016 12:52:50 +0200 Subject: [OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard In-Reply-To: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> Message-ID: <20160426125250.41e0bf62@lazus.yip> > The following patches (submitted by you) have been updated in > patchwork: > > * openwrt: [OpenWrt-Devel,1/4] omap: add sdcard creation script > - http://patchwork.ozlabs.org/patch/614748/ > - for: OpenWrt development > was: New > now: Not Applicable > > * openwrt: [OpenWrt-Devel,2/4,RFC] omap: switch to 4.4 > - http://patchwork.ozlabs.org/patch/614749/ > - for: OpenWrt development > was: New > now: Not Applicable > > * openwrt: [OpenWrt-Devel,3/4] kernel/spi: add kernel package for > spi-omap-24xx > - http://patchwork.ozlabs.org/patch/614750/ > - for: OpenWrt development > was: New > now: Not Applicable > > * openwrt: [OpenWrt-Devel,4/4] add usb gadget ehci debug driver > - http://patchwork.ozlabs.org/patch/614751/ > - for: OpenWrt development > was: New > now: Not Applicable Any comment why those patches aren't applicable? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Tue Apr 26 06:55:50 2016 From: blogic at openwrt.org (John Crispin) Date: Tue, 26 Apr 2016 12:55:50 +0200 Subject: [OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard In-Reply-To: <20160426125250.41e0bf62@lazus.yip> References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> <20160426125250.41e0bf62@lazus.yip> Message-ID: On 26/04/2016 12:52, Alexander Couzens wrote: >> The following patches (submitted by you) have been updated in >> patchwork: >> >> * openwrt: [OpenWrt-Devel,1/4] omap: add sdcard creation script >> - http://patchwork.ozlabs.org/patch/614748/ >> - for: OpenWrt development >> was: New >> now: Not Applicable >> >> * openwrt: [OpenWrt-Devel,2/4,RFC] omap: switch to 4.4 >> - http://patchwork.ozlabs.org/patch/614749/ >> - for: OpenWrt development >> was: New >> now: Not Applicable >> >> * openwrt: [OpenWrt-Devel,3/4] kernel/spi: add kernel package for >> spi-omap-24xx >> - http://patchwork.ozlabs.org/patch/614750/ >> - for: OpenWrt development >> was: New >> now: Not Applicable >> >> * openwrt: [OpenWrt-Devel,4/4] add usb gadget ehci debug driver >> - http://patchwork.ozlabs.org/patch/614751/ >> - for: OpenWrt development >> was: New >> now: Not Applicable > > > Any comment why those patches aren't applicable? > > the maintainer of the target does not use patchwork. so they are not applicable to be listed in patchwork. sorry i normally send an email to the submitter informing him of this. i forgot to do so last night John > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kaloz at openwrt.org Tue Apr 26 06:59:08 2016 From: kaloz at openwrt.org (Imre Kaloz) Date: Tue, 26 Apr 2016 12:59:08 +0200 Subject: [OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard In-Reply-To: References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> <20160426125250.41e0bf62@lazus.yip> Message-ID: On Tue, 26 Apr 2016 12:55:50 +0200, John Crispin wrote: > the maintainer of the target does not use patchwork. so they are not > applicable to be listed in patchwork. sorry i normally send an email to > the submitter informing him of this. i forgot to do so last night "the maintainer" was told to ask jk for permissions and jk told him john handles those. Imre _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Tue Apr 26 07:00:40 2016 From: blogic at openwrt.org (John Crispin) Date: Tue, 26 Apr 2016 13:00:40 +0200 Subject: [OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard In-Reply-To: References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> <20160426125250.41e0bf62@lazus.yip> Message-ID: On 26/04/2016 12:59, Imre Kaloz wrote: > On Tue, 26 Apr 2016 12:55:50 +0200, John Crispin > wrote: > >> the maintainer of the target does not use patchwork. so they are not >> applicable to be listed in patchwork. sorry i normally send an email to >> the submitter informing him of this. i forgot to do so last night > > "the maintainer" was told to ask jk for permissions and jk told him john > handles those. > > > Imre last i asked you you said you dont use patchwork. and i was never told after that, that you want to use patchwork. had i only known or been told. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Tue Apr 26 07:04:08 2016 From: blogic at openwrt.org (John Crispin) Date: Tue, 26 Apr 2016 13:04:08 +0200 Subject: [OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard In-Reply-To: <20160426125250.41e0bf62@lazus.yip> References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> <20160426125250.41e0bf62@lazus.yip> Message-ID: On 26/04/2016 12:52, Alexander Couzens wrote: >> The following patches (submitted by you) have been updated in >> patchwork: >> >> * openwrt: [OpenWrt-Devel,1/4] omap: add sdcard creation script >> - http://patchwork.ozlabs.org/patch/614748/ >> - for: OpenWrt development >> was: New >> now: Not Applicable >> >> * openwrt: [OpenWrt-Devel,2/4,RFC] omap: switch to 4.4 >> - http://patchwork.ozlabs.org/patch/614749/ >> - for: OpenWrt development >> was: New >> now: Not Applicable >> >> * openwrt: [OpenWrt-Devel,3/4] kernel/spi: add kernel package for >> spi-omap-24xx >> - http://patchwork.ozlabs.org/patch/614750/ >> - for: OpenWrt development >> was: New >> now: Not Applicable >> >> * openwrt: [OpenWrt-Devel,4/4] add usb gadget ehci debug driver >> - http://patchwork.ozlabs.org/patch/614751/ >> - for: OpenWrt development >> was: New >> now: Not Applicable > > > Any comment why those patches aren't applicable? > changed the status back to new > > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kaloz at openwrt.org Tue Apr 26 07:07:56 2016 From: kaloz at openwrt.org (Imre Kaloz) Date: Tue, 26 Apr 2016 13:07:56 +0200 Subject: [OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard In-Reply-To: References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> <20160426125250.41e0bf62@lazus.yip> Message-ID: On Tue, 26 Apr 2016 13:00:40 +0200, John Crispin wrote: > > > On 26/04/2016 12:59, Imre Kaloz wrote: >> On Tue, 26 Apr 2016 12:55:50 +0200, John Crispin >> wrote: >> >>> the maintainer of the target does not use patchwork. so they are not >>> applicable to be listed in patchwork. sorry i normally send an email to >>> the submitter informing him of this. i forgot to do so last night >> >> "the maintainer" was told to ask jk for permissions and jk told him john >> handles those. >> >> >> Imre > > last i asked you you said you dont use patchwork. and i was never told > after that, that you want to use patchwork. had i only known or been > told. If I would have said that, why would you tell me to ask jk for an account? Non sequitur.. Can I get that account then, please? Imre _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Tue Apr 26 07:09:15 2016 From: blogic at openwrt.org (John Crispin) Date: Tue, 26 Apr 2016 13:09:15 +0200 Subject: [OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard In-Reply-To: References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> <20160426125250.41e0bf62@lazus.yip> Message-ID: <40e02e58-d71d-63c0-540b-648695dbc763@openwrt.org> On 26/04/2016 13:07, Imre Kaloz wrote: > On Tue, 26 Apr 2016 13:00:40 +0200, John Crispin > wrote: > >> >> >> On 26/04/2016 12:59, Imre Kaloz wrote: >>> On Tue, 26 Apr 2016 12:55:50 +0200, John Crispin >>> wrote: >>> >>>> the maintainer of the target does not use patchwork. so they are not >>>> applicable to be listed in patchwork. sorry i normally send an email to >>>> the submitter informing him of this. i forgot to do so last night >>> >>> "the maintainer" was told to ask jk for permissions and jk told him john >>> handles those. >>> >>> >>> Imre >> >> last i asked you you said you dont use patchwork. and i was never told >> after that, that you want to use patchwork. had i only known or been >> told. > > If I would have said that, why would you tell me to ask jk for an > account? Non sequitur.. > > Can I get that account then, please? > > > Imre sure i assume the account you created is kaloz ? _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From kaloz at openwrt.org Tue Apr 26 07:40:37 2016 From: kaloz at openwrt.org (Imre Kaloz) Date: Tue, 26 Apr 2016 13:40:37 +0200 Subject: [OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard In-Reply-To: <40e02e58-d71d-63c0-540b-648695dbc763@openwrt.org> References: <1461633445-1695-1-git-send-email-lynxis@fe80.eu> <20160426125250.41e0bf62@lazus.yip> <40e02e58-d71d-63c0-540b-648695dbc763@openwrt.org> Message-ID: On Tue, 26 Apr 2016 13:09:15 +0200, John Crispin wrote: > > > On 26/04/2016 13:07, Imre Kaloz wrote: >> On Tue, 26 Apr 2016 13:00:40 +0200, John Crispin >> wrote: >> >>> >>> >>> On 26/04/2016 12:59, Imre Kaloz wrote: >>>> On Tue, 26 Apr 2016 12:55:50 +0200, John Crispin >>>> wrote: >>>> >>>>> the maintainer of the target does not use patchwork. so they are not >>>>> applicable to be listed in patchwork. sorry i normally send an email >>>>> to >>>>> the submitter informing him of this. i forgot to do so last night >>>> >>>> "the maintainer" was told to ask jk for permissions and jk told him >>>> john >>>> handles those. >>>> >>>> >>>> Imre >>> >>> last i asked you you said you dont use patchwork. and i was never told >>> after that, that you want to use patchwork. had i only known or been >>> told. >> >> If I would have said that, why would you tell me to ask jk for an >> account? Non sequitur.. >> >> Can I get that account then, please? >> >> >> Imre > > > sure i assume the account you created is kaloz ? yup _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Tue Apr 26 07:41:50 2016 From: me at ndoo.sg (Andrew Yong) Date: Tue, 26 Apr 2016 19:41:50 +0800 Subject: [OpenWrt-Devel] [PATCHv6] ramips: add support for SamKnows SK-WB8 Message-ID: <1461670910.6344.1.camel@ndoo.sg> PATCHv1: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. PATCHv2: - Fixed LED name in DTS. PATCHv3: ?DTS: Syntax error fixed, LEDs and buttons mapped correctly now - diag.sh updated to blink WPS LED on boot - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset matches SamKnows firmware - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware PATCHv4: - I didn't commit some fixes in PATCHv3, that's fixed now PATCHv5: - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter to prevent soft brick by booting into nonexistent backup partition - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, needs further investigation, effective txpower is still 0) - Experimenting on wifi but that'll be a future patch, board boots fine now. PATCHv6: - Used init script to reset bootcount, preinit is too early to use fw-setenv ????Initial support for SamKnows Whitebox 8 ???? ????Signed-off-by: Andrew Yong diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index a759bcc..9ad5974 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -24,7 +24,8 @@ linkits7688d | \ ?wsr-600 | \ ?wsr-1166 | \ ?br6425 | \ -miwifi-nano) +miwifi-nano | \ +sk-wb8) ? ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ? ;; ?esac diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..df30085 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -241,6 +241,9 @@ rt-n14u) ? set_wifi_led "$board:blue:air" ? set_usb_led "$board:blue:usb" ? ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; ?tiny-ac) ? set_wifi_led "$board:orange:wifi" ? set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..3e876d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() ? pbr-m1|\ ? psg1208|\ ? sap-g3200u3|\ + sk-wb8|\ ? wf-2881|\ ? whr-300hp2|\ ? whr-600d|\ @@ -310,6 +311,9 @@ ramips_setup_macs() ? lan_mac=$(macaddr_setbit_la "$lan_mac") ? wan_mac=$(mtd_get_mac_binary factory 32772) ? ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; ? tew-691gr) ? lan_mac=$(cat /sys/class/net/eth0/address) ? wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..534cc1c 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -76,6 +76,7 @@ get_status_led() { ? ;; ? awapn2403|\ ? dir-645|\ + sk-wb8|\ ? wrh-300cr) ? status_led="$board:green:wps" ? ;; diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount new file mode 100755 index 0000000..b93e3c9 --- /dev/null +++ b/target/linux/ramips/base-files/etc/init.d/bootcount @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +. /lib/ramips.sh + +START=99 + +start() { + local board=$(ramips_board_name) + if [ $board = "sk-wb8" ]; then + fw_setenv bootcount 0 + fi +} diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..5c1715d 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -367,6 +367,9 @@ ramips_board_detect() { ? *"RUT5XX") ? name="rut5xx" ? ;; + *"SamKnows Whitebox 8") + name="sk-wb8" + ;; ? *"SAP-G3200U3") ? name="sap-g3200u3" ? ;; diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..356a2b9 --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,121 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows Whitebox 8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 14 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 15 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 11 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio1 9 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0af9596..3e2f7eb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -132,6 +132,12 @@ define Device/ubnt-erx ?endef ?TARGET_DEVICES += ubnt-erx ? +define Device/sk-wb8 +??DTS := SK-WB8 +??IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + ?# FIXME: is this still needed? ?define Image/Prepare ?#define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..aa2e45e --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SamKnows Whitebox 8 + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev uboot-envtools +endef + +define Profile/SK-WB8/Description + Package set compatible with the SamKnows Whitebox 8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From chunkeey at googlemail.com Tue Apr 26 08:21:01 2016 From: chunkeey at googlemail.com (Christian Lamparter) Date: Tue, 26 Apr 2016 05:21:01 -0700 (PDT) Subject: [OpenWrt-Devel] How to initialize multiple phy radios In-Reply-To: <8760v425vl.fsf@kamboji.qca.qualcomm.com> References: <112436203.W4fT509tru@debian64> <8760v425vl.fsf@kamboji.qca.qualcomm.com> Message-ID: <2910322.5mKxx5TJEB@debian64> On Tuesday, April 26, 2016 07:20:32 AM Valo, Kalle wrote: > Christian Lamparter writes: > > On Monday, April 25, 2016 10:53:41 AM David Hutchison wrote: > >> So with some modifications to pci.c, hw.h and core.c I was able to get > >> the radio initialized! :) > > > > Hey, that's nice! Can you make and post a patch for that? > > I'm sure if it's just a matter of adding the new pci and chip > > ids to the tables. You could just go ahead and post it, so it > > will be picked up. > > [...] Editing... > > Does the device work? Can you scan for networks, connect to networks > > and create networks? That would be good to know. ^^^^ > But remember that the basic functionality should somewhat work before we > add the ids to ath10k. The hardware support doesn't need to be perfect > but we should not enable something which is brokend and would just waste > users time. Don't worry about that, I did include the highlighted sentence in the previous mail as well (seems like it was lost during editing - readded it). Anyway, I think David will figure out what's working and what isn't and will let ath10k-devel know about it. it. Regards, Christian _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Tue Apr 26 08:24:05 2016 From: me at ndoo.sg (Andrew Yong) Date: Tue, 26 Apr 2016 20:24:05 +0800 Subject: [OpenWrt-Devel] [PATCHv7] ramips: add support for SamKnows SK-WB8 Message-ID: <1461673445.6344.3.camel@ndoo.sg> PATCHv1: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. PATCHv2: - Fixed LED name in DTS. PATCHv3: ?DTS: Syntax error fixed, LEDs and buttons mapped correctly now - diag.sh updated to blink WPS LED on boot - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset matches SamKnows firmware - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware PATCHv4: - I didn't commit some fixes in PATCHv3, that's fixed now PATCHv5: - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter to prevent soft brick by booting into nonexistent backup partition - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, needs further investigation, effective txpower is still 0) - Experimenting on wifi but that'll be a future patch, board boots fine now. PATCHv6: - Used init script to reset bootcount, preinit is too early to use fw-setenv PATCHv7: - Added model to sysupgrade. Tested thoroughly in general and I'm happy with this. Sorry for the many revisions. commit eeb292822edf50a6265a7cd9a6b5f920f693ada3 Author: Yong Date:???Tue Apr 26 16:09:21 2016 +0800 ????Initial support for SamKnows Whitebox 8 ???? ????Signed-off-by: Andrew Yong diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index a759bcc..9ad5974 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -24,7 +24,8 @@ linkits7688d | \ ?wsr-600 | \ ?wsr-1166 | \ ?br6425 | \ -miwifi-nano) +miwifi-nano | \ +sk-wb8) ? ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ? ;; ?esac diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index e3b8500..df30085 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -241,6 +241,9 @@ rt-n14u) ? set_wifi_led "$board:blue:air" ? set_usb_led "$board:blue:usb" ? ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; ?tiny-ac) ? set_wifi_led "$board:orange:wifi" ? set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3c958ae..3e876d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() ? pbr-m1|\ ? psg1208|\ ? sap-g3200u3|\ + sk-wb8|\ ? wf-2881|\ ? whr-300hp2|\ ? whr-600d|\ @@ -310,6 +311,9 @@ ramips_setup_macs() ? lan_mac=$(macaddr_setbit_la "$lan_mac") ? wan_mac=$(mtd_get_mac_binary factory 32772) ? ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; ? tew-691gr) ? lan_mac=$(cat /sys/class/net/eth0/address) ? wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index bd0ff05..534cc1c 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -76,6 +76,7 @@ get_status_led() { ? ;; ? awapn2403|\ ? dir-645|\ + sk-wb8|\ ? wrh-300cr) ? status_led="$board:green:wps" ? ;; diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount new file mode 100755 index 0000000..b93e3c9 --- /dev/null +++ b/target/linux/ramips/base-files/etc/init.d/bootcount @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +. /lib/ramips.sh + +START=99 + +start() { + local board=$(ramips_board_name) + if [ $board = "sk-wb8" ]; then + fw_setenv bootcount 0 + fi +} diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 550ec55..5c1715d 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -367,6 +367,9 @@ ramips_board_detect() { ? *"RUT5XX") ? name="rut5xx" ? ;; + *"SamKnows Whitebox 8") + name="sk-wb8" + ;; ? *"SAP-G3200U3") ? name="sap-g3200u3" ? ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 73ba6e6..fcc1b79 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -109,6 +109,7 @@ platform_check_image() { ? rt-n56u|\ ? rut5xx|\ ? sap-g3200u3|\ + sk-wb8|\ ? sl-r7205|\ ? tew-691gr|\ ? tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..356a2b9 --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,121 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows Whitebox 8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 14 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 15 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 11 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio1 9 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 0af9596..3e2f7eb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -132,6 +132,12 @@ define Device/ubnt-erx ?endef ?TARGET_DEVICES += ubnt-erx ? +define Device/sk-wb8 +??DTS := SK-WB8 +??IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + ?# FIXME: is this still needed? ?define Image/Prepare ?#define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..aa2e45e --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SamKnows Whitebox 8 + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev uboot-envtools +endef + +define Profile/SK-WB8/Description + Package set compatible with the SamKnows Whitebox 8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From devel-sven at geroedel.de Tue Apr 26 09:02:56 2016 From: devel-sven at geroedel.de (Sven Roederer) Date: Tue, 26 Apr 2016 15:02:56 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: References: <56EB27A3.2010204@openwrt.org> <20160425065419.GK8928@medion.lan> Message-ID: <1512048.ppQ2pjbRlI@strike> Am Monday 25 April 2016, 09:06:38 schrieb John Crispin: > On 25/04/2016 08:54, Bastian Bittorf wrote: > > * John Crispin [25.04.2016 07:39]: > >>> The changed image name breaks compatibility for derived projects and > >>> that's something which should only happen if there is a really good > >>> reason (e.g. security fix). > >> > > > > I'am against reverting the commit. Lets keep it, because it makes sense. > > > > > > bye, bastian > > before i merged the patch i did actually look at the compat issue and > concluded that only docs will be out of date, which is not really > anything new. all issues mentioned are home made ones. specially the one > bastian mentions here. basically fixing your download script and > deploying it in this way will break forward compat as can be seen here. > > we now face the decision of reverting and unbreaking out of tree issues > that can be fixed easily or avoided in future or not revert it and keep > the fix that makes the filenames more consistent. adding the "n" is > after all correct ad the antenna is not "not" detachable on the relevant > models. > > John Hi, before I published this patch also for CC I had this in "sideeffect" also in mind. As this also forces some changes in the freifunk-berlin scripts, but to have a "common name" was our preferred way. I was also checking before sending this patch for the chances to get applied and also during the days the patch was in the "queue" nobody raised the voice. So finally, as this change will come, so it comes already inside this release and some derived projects also adapted the change. Sven _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Tue Apr 26 09:13:53 2016 From: john at phrozen.org (John Crispin) Date: Tue, 26 Apr 2016 15:13:53 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: <1512048.ppQ2pjbRlI@strike> References: <56EB27A3.2010204@openwrt.org> <20160425065419.GK8928@medion.lan> <1512048.ppQ2pjbRlI@strike> Message-ID: <333584ae-932b-6952-5f34-eb10f28d41e0@phrozen.org> On 26/04/2016 15:02, Sven Roederer wrote: > Am Monday 25 April 2016, 09:06:38 schrieb John Crispin: >> On 25/04/2016 08:54, Bastian Bittorf wrote: >>> * John Crispin [25.04.2016 07:39]: >>>>> The changed image name breaks compatibility for derived projects and >>>>> that's something which should only happen if there is a really good >>>>> reason (e.g. security fix). >>>> >>> >>> I'am against reverting the commit. Lets keep it, because it makes sense. >>> >>> >>> bye, bastian >> >> before i merged the patch i did actually look at the compat issue and >> concluded that only docs will be out of date, which is not really >> anything new. all issues mentioned are home made ones. specially the one >> bastian mentions here. basically fixing your download script and >> deploying it in this way will break forward compat as can be seen here. >> >> we now face the decision of reverting and unbreaking out of tree issues >> that can be fixed easily or avoided in future or not revert it and keep >> the fix that makes the filenames more consistent. adding the "n" is >> after all correct ad the antenna is not "not" detachable on the relevant >> models. >> >> John > > > Hi, before I published this patch also for CC I had this in "sideeffect" also > in mind. As this also forces some changes in the freifunk-berlin scripts, but > to have a "common name" was our preferred way. > I was also checking before sending this patch for the chances to get applied > and also during the days the patch was in the "queue" nobody raised the voice. > > So finally, as this change will come, so it comes already inside this release > and some derived projects also adapted the change. > > Sven no matter if i merge or revert i'll have one crowd knocking on my door complaining. i agree with youfully, the gloun and berlin firmware team seems to be much more agile than the franken team and some developers from italy. please fix it in your local tree as we need to also consider communities that lack the manpower, infrastructure or whatever to handle minor changes like this. i guess that is the easiest way. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From amine.ahd at gmail.com Tue Apr 26 09:15:58 2016 From: amine.ahd at gmail.com (amine.ahd) Date: Tue, 26 Apr 2016 15:15:58 +0200 Subject: [OpenWrt-Devel] [PATCH] Hostapd: Add support for multiple RADIUS servers In-Reply-To: <1461220774-16115-1-git-send-email-amine.ahd@gmail.com> References: <1461220774-16115-1-git-send-email-amine.ahd@gmail.com> Message-ID: <1461676558-26814-1-git-send-email-amine.ahd@gmail.com> Hostapd allows more than one RADIUS server to be added in case the main server goes down. This allows netifd to load a list of RADIUS servers from the wireless confid file and add them to hostapd. The format of the list in the config file is as follow: list auth_servers 'secret at server_addr[:port]' Signed-off-by: Amine Hamed --- .../network/services/hostapd/files/netifd.sh | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index 417cc42..3e371b2 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -125,6 +125,8 @@ hostapd_common_add_bss_config() { config_add_string auth_secret config_add_int 'auth_port:port' 'port:port' + config_add_array auth_servers + config_add_string acct_server config_add_string acct_secret config_add_int acct_port @@ -269,10 +271,31 @@ hostapd_set_bss_options() { set_default vlan_naming 1 + # leave the default option for legacy compatibility append bss_conf "auth_server_addr=$auth_server" "$N" append bss_conf "auth_server_port=$auth_port" "$N" append bss_conf "auth_server_shared_secret=$auth_secret" "$N" + # List of fallback RADIUS servers, ip_add at secret[:port] + json_select "auth_servers" + local Index="1" + while json_get_type Var $Index && [ "$Var" = string ]; do + json_get_var Var "$((Index++))" + + ip_addr=$(echo "$Var" | cut -d"@" -f2 | cut -d":" -f1) + append bss_conf "auth_server_addr=$ip_addr" "$N" + + port=$(echo "$Var" | cut -d"@" -f2 | cut -d":" -f2) + if ! echo "$port" | egrep -q '^[0-9]+$' ; then + port=1812 + fi + append bss_conf "auth_server_port=$port" "$N" + + secret=$(echo "$Var" | cut -d"@" -f1) + append bss_conf "auth_server_shared_secret=$secret" "$N" + done + json_select ".." + [ -n "$acct_server" ] && { append bss_conf "acct_server_addr=$acct_server" "$N" append bss_conf "acct_server_port=$acct_port" "$N" -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Tue Apr 26 09:33:51 2016 From: blogic at openwrt.org (John Crispin) Date: Tue, 26 Apr 2016 15:33:51 +0200 Subject: [OpenWrt-Devel] [PATCH] mpc85xx: Add T4240 sub-target In-Reply-To: <1461664105-19951-1-git-send-email-helmut.schaa@googlemail.com> References: <1461664105-19951-1-git-send-email-helmut.schaa@googlemail.com> Message-ID: On 26/04/2016 11:48, Helmut Schaa wrote: > The Freescale T4240 is a 12 core (24 threads) SoC. > Add a sub-target to the mpc85xx target to build images for the T4240 > Reference Design Board. > > Currently CPU thread support is only available in 64bit kernel builds, > hence the sub-target uses the powerpc64 feature flag. > > Using musl libc doesn't compile properly on that sub-target yet, hence > we'd select glibc by default for T4240. why does it not compile ? do you get an actual compile error or does it simply not work as expected ? > > Networking is not yet supported as the required fman/bman/qman/dpaa > drivers are not yet included in mainline. > can you backport them ? > Signed-off-by: Helmut Schaa > --- > config/Config-devel.in | 2 +- > target/linux/mpc85xx/Makefile | 2 +- > target/linux/mpc85xx/image/Makefile | 2 +- > target/linux/mpc85xx/t4240/config-default | 82 +++++++++++++++++++++++++++++++ > target/linux/mpc85xx/t4240/target.mk | 12 +++++ > toolchain/Config.in | 5 +- > 6 files changed, 100 insertions(+), 5 deletions(-) > create mode 100644 target/linux/mpc85xx/t4240/config-default > create mode 100644 target/linux/mpc85xx/t4240/target.mk > > diff --git a/config/Config-devel.in b/config/Config-devel.in > index 938f0b3..474b12f 100644 > --- a/config/Config-devel.in > +++ b/config/Config-devel.in > @@ -106,7 +106,7 @@ menuconfig DEVEL > > config EXTRA_OPTIMIZATION > string "Additional compiler options" if DEVEL > - default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc > + default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc && !powerpc64 > default "-fno-caller-saves" > help > Extra target-independent optimizations to use when building for the target. > diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile > index a32be90..8ba739a 100644 > --- a/target/linux/mpc85xx/Makefile > +++ b/target/linux/mpc85xx/Makefile > @@ -12,7 +12,7 @@ BOARDNAME:=Freescale MPC85xx > CPU_TYPE:=8540 > FEATURES:=squashfs > MAINTAINER:=Imre Kaloz > -SUBTARGETS=generic p1020 > +SUBTARGETS=generic p1020 t4240 > > KERNEL_PATCHVER:=4.4 > > diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile > index 25a9b07..82035eb 100644 > --- a/target/linux/mpc85xx/image/Makefile > +++ b/target/linux/mpc85xx/image/Makefile > @@ -21,7 +21,7 @@ endef > > zImage:=$(BIN_DIR)/$(IMG_PREFIX)-zImage > > -DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb > +DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb fsl/t4240rdb > > define Image/BuildKernel > cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage > diff --git a/target/linux/mpc85xx/t4240/config-default b/target/linux/mpc85xx/t4240/config-default > new file mode 100644 > index 0000000..18fd6d6 > --- /dev/null > +++ b/target/linux/mpc85xx/t4240/config-default > @@ -0,0 +1,82 @@ > +CONFIG_64BIT=y > +CONFIG_ALTIVEC=y > +CONFIG_ARCH_DMA_ADDR_T_64BIT=y > +CONFIG_ARCH_HAS_ILOG2_U64=y > +CONFIG_ARCH_HAS_TICK_BROADCAST=y > +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y > +CONFIG_ARCH_SELECT_MEMORY_MODEL=y > +CONFIG_ARCH_SPARSEMEM_ENABLE=y > +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y > +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y > +CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y > +CONFIG_BLOCK_COMPAT=y > +CONFIG_CLKDEV_LOOKUP=y > +CONFIG_COMMON_CLK=y > +CONFIG_COMPAT=y > +CONFIG_COMPAT_BINFMT_ELF=y > +CONFIG_COMPAT_NETLINK_MESSAGES=y > +CONFIG_COMPAT_OLD_SIGACTION=y > +CONFIG_CORENET_GENERIC=y > +CONFIG_CPU_RMAP=y > +# CONFIG_E5500_CPU is not set > +CONFIG_E6500_CPU=y > +CONFIG_EPAPR_PARAVIRT=y > +CONFIG_FORCE_MAX_ZONEORDER=13 > +# CONFIG_FSL_ULI1575 is not set > +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y > +# CONFIG_GENERIC_CPU is not set > +# CONFIG_HANGCHECK_TIMER is not set > +CONFIG_HAVE_CLK=y > +CONFIG_HAVE_CLK_PREPARE=y > +CONFIG_HAVE_PERF_EVENTS_NMI=y > +CONFIG_HAVE_RCU_TABLE_FREE=y > +CONFIG_HAVE_SETUP_PER_CPU_AREA=y > +CONFIG_HAVE_VIRT_CPU_ACCOUNTING=y > +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y > +# CONFIG_HUGETLBFS is not set > +CONFIG_IOMMU_SUPPORT=y > +CONFIG_KERNEL_START=0xc000000000000000 > +# CONFIG_LIQUIDIO is not set > +CONFIG_LOCK_SPIN_ON_OWNER=y > +CONFIG_MUTEX_SPIN_ON_OWNER=y > +CONFIG_NEED_DMA_MAP_STATE=y > +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y > +CONFIG_NET_FLOW_LIMIT=y > +CONFIG_NR_CPUS=24 > +# CONFIG_NUMA is not set > +CONFIG_PAGE_OFFSET=0xc000000000000000 > +CONFIG_PCI_BUS_ADDR_T_64BIT=y > +CONFIG_PGTABLE_LEVELS=4 > +CONFIG_PHYS_64BIT=y > +CONFIG_PHYS_ADDR_T_64BIT=y > +CONFIG_PPC64=y > +CONFIG_PPC_BOOK3E=y > +CONFIG_PPC_BOOK3E_64=y > +# CONFIG_PPC_BOOK3S_64 is not set > +CONFIG_PPC_E500MC=y > +CONFIG_PPC_EPAPR_HV_PIC=y > +CONFIG_PPC_FPU=y > +# CONFIG_PPC_I8259 is not set > +CONFIG_PPC_OF_BOOT_TRAMPOLINE=y > +# CONFIG_PPC_OF_PLATFORM_PCI is not set > +CONFIG_PTE_64BIT=y > +CONFIG_RATIONAL=y > +CONFIG_RCU_STALL_COMMON=y > +# CONFIG_RELOCATABLE is not set > +CONFIG_RFS_ACCEL=y > +CONFIG_RPS=y > +CONFIG_RWSEM_SPIN_ON_OWNER=y > +CONFIG_SMP=y > +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y > +CONFIG_SYSVIPC_COMPAT=y > +CONFIG_SYS_SUPPORTS_HUGETLBFS=y > +# CONFIG_THUNDER_NIC_BGX is not set > +# CONFIG_THUNDER_NIC_PF is not set > +# CONFIG_THUNDER_NIC_VF is not set > +CONFIG_TREE_RCU=y > +# CONFIG_U3_DART is not set > +# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set > +CONFIG_WORD_SIZE=64 > +CONFIG_XPS=y > +CONFIG_ZLIB_DEFLATE=y > +CONFIG_ZONE_DMA32=y > diff --git a/target/linux/mpc85xx/t4240/target.mk b/target/linux/mpc85xx/t4240/target.mk > new file mode 100644 > index 0000000..1b515ab > --- /dev/null > +++ b/target/linux/mpc85xx/t4240/target.mk > @@ -0,0 +1,12 @@ > +BOARDNAME:=T4240 > +FEATURES:=squashfs powerpc64 > +MAINTAINER:=Helmut Schaa > + > +# Let the kernel figure out the correct usage of -m64 and -m32 > +# for different parts. > +KERNEL_CC:= > + > +define Target/Description > + Build firmware images for Freescale T4240 based boards. > +endef > + > diff --git a/toolchain/Config.in b/toolchain/Config.in > index 49c3461..8f27cfb 100644 > --- a/toolchain/Config.in > +++ b/toolchain/Config.in > @@ -230,7 +230,7 @@ choice > config LIBC_USE_MUSL > select USE_MUSL > bool "Use musl" > - depends on !(arc) > + depends on !(arc) && !(powerpc64) > > endchoice > > @@ -257,6 +257,7 @@ config INSIGHT > Enable if you want to build insight-gdb. > > config USE_GLIBC > + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (powerpc64) > bool > > config USE_UCLIBC > @@ -264,7 +265,7 @@ config USE_UCLIBC > bool > > config USE_MUSL > - default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) > + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) && !(powerpc64) > bool > > config USE_EXTERNAL_LIBC > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From helmut.schaa at googlemail.com Tue Apr 26 10:05:48 2016 From: helmut.schaa at googlemail.com (Helmut Schaa) Date: Tue, 26 Apr 2016 16:05:48 +0200 Subject: [OpenWrt-Devel] [PATCH] mpc85xx: Add T4240 sub-target In-Reply-To: References: <1461664105-19951-1-git-send-email-helmut.schaa@googlemail.com> Message-ID: Hi John, On Tue, Apr 26, 2016 at 3:33 PM, John Crispin wrote: > > > On 26/04/2016 11:48, Helmut Schaa wrote: >> The Freescale T4240 is a 12 core (24 threads) SoC. >> Add a sub-target to the mpc85xx target to build images for the T4240 >> Reference Design Board. >> >> Currently CPU thread support is only available in 64bit kernel builds, >> hence the sub-target uses the powerpc64 feature flag. >> >> Using musl libc doesn't compile properly on that sub-target yet, hence >> we'd select glibc by default for T4240. > > why does it not compile ? do you get an actual compile error or does it > simply not work as expected ? Yep, it gives an actual compile error and I did not have time to look into that yet. Hence, I'd like to go with glibc first ... uclibc seems to work fine as well, that's what we use in our internal tree for now. >> >> Networking is not yet supported as the required fman/bman/qman/dpaa >> drivers are not yet included in mainline. >> > > can you backport them ? Yep, I've got a mostly working backport here but wanted to get the basic platform code included first. Helmut > > > >> Signed-off-by: Helmut Schaa >> --- >> config/Config-devel.in | 2 +- >> target/linux/mpc85xx/Makefile | 2 +- >> target/linux/mpc85xx/image/Makefile | 2 +- >> target/linux/mpc85xx/t4240/config-default | 82 +++++++++++++++++++++++++++++++ >> target/linux/mpc85xx/t4240/target.mk | 12 +++++ >> toolchain/Config.in | 5 +- >> 6 files changed, 100 insertions(+), 5 deletions(-) >> create mode 100644 target/linux/mpc85xx/t4240/config-default >> create mode 100644 target/linux/mpc85xx/t4240/target.mk >> >> diff --git a/config/Config-devel.in b/config/Config-devel.in >> index 938f0b3..474b12f 100644 >> --- a/config/Config-devel.in >> +++ b/config/Config-devel.in >> @@ -106,7 +106,7 @@ menuconfig DEVEL >> >> config EXTRA_OPTIMIZATION >> string "Additional compiler options" if DEVEL >> - default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc >> + default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc && !powerpc64 >> default "-fno-caller-saves" >> help >> Extra target-independent optimizations to use when building for the target. >> diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile >> index a32be90..8ba739a 100644 >> --- a/target/linux/mpc85xx/Makefile >> +++ b/target/linux/mpc85xx/Makefile >> @@ -12,7 +12,7 @@ BOARDNAME:=Freescale MPC85xx >> CPU_TYPE:=8540 >> FEATURES:=squashfs >> MAINTAINER:=Imre Kaloz >> -SUBTARGETS=generic p1020 >> +SUBTARGETS=generic p1020 t4240 >> >> KERNEL_PATCHVER:=4.4 >> >> diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile >> index 25a9b07..82035eb 100644 >> --- a/target/linux/mpc85xx/image/Makefile >> +++ b/target/linux/mpc85xx/image/Makefile >> @@ -21,7 +21,7 @@ endef >> >> zImage:=$(BIN_DIR)/$(IMG_PREFIX)-zImage >> >> -DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb >> +DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb fsl/t4240rdb >> >> define Image/BuildKernel >> cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage >> diff --git a/target/linux/mpc85xx/t4240/config-default b/target/linux/mpc85xx/t4240/config-default >> new file mode 100644 >> index 0000000..18fd6d6 >> --- /dev/null >> +++ b/target/linux/mpc85xx/t4240/config-default >> @@ -0,0 +1,82 @@ >> +CONFIG_64BIT=y >> +CONFIG_ALTIVEC=y >> +CONFIG_ARCH_DMA_ADDR_T_64BIT=y >> +CONFIG_ARCH_HAS_ILOG2_U64=y >> +CONFIG_ARCH_HAS_TICK_BROADCAST=y >> +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y >> +CONFIG_ARCH_SELECT_MEMORY_MODEL=y >> +CONFIG_ARCH_SPARSEMEM_ENABLE=y >> +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y >> +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y >> +CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y >> +CONFIG_BLOCK_COMPAT=y >> +CONFIG_CLKDEV_LOOKUP=y >> +CONFIG_COMMON_CLK=y >> +CONFIG_COMPAT=y >> +CONFIG_COMPAT_BINFMT_ELF=y >> +CONFIG_COMPAT_NETLINK_MESSAGES=y >> +CONFIG_COMPAT_OLD_SIGACTION=y >> +CONFIG_CORENET_GENERIC=y >> +CONFIG_CPU_RMAP=y >> +# CONFIG_E5500_CPU is not set >> +CONFIG_E6500_CPU=y >> +CONFIG_EPAPR_PARAVIRT=y >> +CONFIG_FORCE_MAX_ZONEORDER=13 >> +# CONFIG_FSL_ULI1575 is not set >> +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y >> +# CONFIG_GENERIC_CPU is not set >> +# CONFIG_HANGCHECK_TIMER is not set >> +CONFIG_HAVE_CLK=y >> +CONFIG_HAVE_CLK_PREPARE=y >> +CONFIG_HAVE_PERF_EVENTS_NMI=y >> +CONFIG_HAVE_RCU_TABLE_FREE=y >> +CONFIG_HAVE_SETUP_PER_CPU_AREA=y >> +CONFIG_HAVE_VIRT_CPU_ACCOUNTING=y >> +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y >> +# CONFIG_HUGETLBFS is not set >> +CONFIG_IOMMU_SUPPORT=y >> +CONFIG_KERNEL_START=0xc000000000000000 >> +# CONFIG_LIQUIDIO is not set >> +CONFIG_LOCK_SPIN_ON_OWNER=y >> +CONFIG_MUTEX_SPIN_ON_OWNER=y >> +CONFIG_NEED_DMA_MAP_STATE=y >> +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y >> +CONFIG_NET_FLOW_LIMIT=y >> +CONFIG_NR_CPUS=24 >> +# CONFIG_NUMA is not set >> +CONFIG_PAGE_OFFSET=0xc000000000000000 >> +CONFIG_PCI_BUS_ADDR_T_64BIT=y >> +CONFIG_PGTABLE_LEVELS=4 >> +CONFIG_PHYS_64BIT=y >> +CONFIG_PHYS_ADDR_T_64BIT=y >> +CONFIG_PPC64=y >> +CONFIG_PPC_BOOK3E=y >> +CONFIG_PPC_BOOK3E_64=y >> +# CONFIG_PPC_BOOK3S_64 is not set >> +CONFIG_PPC_E500MC=y >> +CONFIG_PPC_EPAPR_HV_PIC=y >> +CONFIG_PPC_FPU=y >> +# CONFIG_PPC_I8259 is not set >> +CONFIG_PPC_OF_BOOT_TRAMPOLINE=y >> +# CONFIG_PPC_OF_PLATFORM_PCI is not set >> +CONFIG_PTE_64BIT=y >> +CONFIG_RATIONAL=y >> +CONFIG_RCU_STALL_COMMON=y >> +# CONFIG_RELOCATABLE is not set >> +CONFIG_RFS_ACCEL=y >> +CONFIG_RPS=y >> +CONFIG_RWSEM_SPIN_ON_OWNER=y >> +CONFIG_SMP=y >> +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y >> +CONFIG_SYSVIPC_COMPAT=y >> +CONFIG_SYS_SUPPORTS_HUGETLBFS=y >> +# CONFIG_THUNDER_NIC_BGX is not set >> +# CONFIG_THUNDER_NIC_PF is not set >> +# CONFIG_THUNDER_NIC_VF is not set >> +CONFIG_TREE_RCU=y >> +# CONFIG_U3_DART is not set >> +# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set >> +CONFIG_WORD_SIZE=64 >> +CONFIG_XPS=y >> +CONFIG_ZLIB_DEFLATE=y >> +CONFIG_ZONE_DMA32=y >> diff --git a/target/linux/mpc85xx/t4240/target.mk b/target/linux/mpc85xx/t4240/target.mk >> new file mode 100644 >> index 0000000..1b515ab >> --- /dev/null >> +++ b/target/linux/mpc85xx/t4240/target.mk >> @@ -0,0 +1,12 @@ >> +BOARDNAME:=T4240 >> +FEATURES:=squashfs powerpc64 >> +MAINTAINER:=Helmut Schaa >> + >> +# Let the kernel figure out the correct usage of -m64 and -m32 >> +# for different parts. >> +KERNEL_CC:= >> + >> +define Target/Description >> + Build firmware images for Freescale T4240 based boards. >> +endef >> + >> diff --git a/toolchain/Config.in b/toolchain/Config.in >> index 49c3461..8f27cfb 100644 >> --- a/toolchain/Config.in >> +++ b/toolchain/Config.in >> @@ -230,7 +230,7 @@ choice >> config LIBC_USE_MUSL >> select USE_MUSL >> bool "Use musl" >> - depends on !(arc) >> + depends on !(arc) && !(powerpc64) >> >> endchoice >> >> @@ -257,6 +257,7 @@ config INSIGHT >> Enable if you want to build insight-gdb. >> >> config USE_GLIBC >> + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (powerpc64) >> bool >> >> config USE_UCLIBC >> @@ -264,7 +265,7 @@ config USE_UCLIBC >> bool >> >> config USE_MUSL >> - default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) >> + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) && !(powerpc64) >> bool >> >> config USE_EXTERNAL_LIBC >> _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hkallweit1 at gmail.com Tue Apr 26 13:15:57 2016 From: hkallweit1 at gmail.com (Heiner Kallweit) Date: Tue, 26 Apr 2016 19:15:57 +0200 Subject: [OpenWrt-Devel] [PATCH v2] ar71xx: modernize fast SPI flash read In-Reply-To: <571BD7CF.40704@gmail.com> References: <571BD7CF.40704@gmail.com> Message-ID: <571FA24D.4010509@gmail.com> Am 23.04.2016 um 22:15 schrieb Heiner Kallweit: > OpenWRT has own support for the memory-mapped fast SPI flash read on ath79. > With mainline kernel 4.6/4.7 more elegant generic support for this feature > was added upstream consisting of these two commits: > > 556351f14e74 "spi: introduce accelerated read support for spi flash devices" > 08922f644878 "mtd: devices: m25p80: add support for mmap read request" > > I cherry-picked them for use with ar71xx default kernel version 4.1 > (new patches 460 + 461) > Once the ar71xx kernel version reaches 4.6 / 4.7 these patches > can be removed. > ar71xx patches 460 + 461 from this patch series can be removed now as Rafal added the same backported patches in r49233 as generic patches 45 + 80. > New patch 462 includes changes from old patch 463 which are not related > to the fast flash read feature. > > New patch 463 includes the new implementation for the fast flash read > feature on ath79. > > These four new patches replace old patches 460-464. > > So far for testing I made the change for the 4.1 version only. > If it looks good I can do the same for the 4.4 version. > > The change was successfully tested on a TP-Link TL-WDR3600. > > Signed-off-by: Heiner Kallweit > --- > v2: > - make change compatible with ath79_register_m25p80_multi(): > >1 flash chip but one can be mmap-accessed only > --- > .../460-spi-add-generic-flash-read.patch | 159 ++++++++++++++++++ > .../460-spi-bitbang-export-spi_bitbang_bufs.patch | 28 ---- > .../patches-4.1/461-m25p80-add-flash-read.patch | 33 ++++ > .../461-spi-add-type-field-to-spi_transfer.patch | 23 --- > .../462-mtd-m25p80-set-spi-transfer-type.patch | 15 -- > .../patches-4.1/462-spi-extend-ath79_spi.patch | 32 ++++ > .../463-spi-ath79-add-fast-flash-read.patch | 185 --------------------- > .../463-spi-ath79-fast-flash-read.patch | 94 +++++++++++ > .../464-spi-ath79-fix-fast-flash-read.patch | 35 ---- > 9 files changed, 318 insertions(+), 286 deletions(-) > create mode 100644 target/linux/ar71xx/patches-4.1/460-spi-add-generic-flash-read.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/460-spi-bitbang-export-spi_bitbang_bufs.patch > create mode 100644 target/linux/ar71xx/patches-4.1/461-m25p80-add-flash-read.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/461-spi-add-type-field-to-spi_transfer.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/462-mtd-m25p80-set-spi-transfer-type.patch > create mode 100644 target/linux/ar71xx/patches-4.1/462-spi-extend-ath79_spi.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/463-spi-ath79-add-fast-flash-read.patch > create mode 100644 target/linux/ar71xx/patches-4.1/463-spi-ath79-fast-flash-read.patch > delete mode 100644 target/linux/ar71xx/patches-4.1/464-spi-ath79-fix-fast-flash-read.patch > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Tue Apr 26 13:59:23 2016 From: me at ndoo.sg (Andrew Yong) Date: Wed, 27 Apr 2016 01:59:23 +0800 Subject: [OpenWrt-Devel] [PATCHv8] ramips: Add support for SamKnows Whitebox 8 Message-ID: <1461693563.6344.6.camel@ndoo.sg> PATCHv1: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. PATCHv2: - Fixed LED name in DTS. PATCHv3: ?DTS: Syntax error fixed, LEDs and buttons mapped correctly now - diag.sh updated to blink WPS LED on boot - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset matches SamKnows firmware - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware PATCHv4: - I didn't commit some fixes in PATCHv3, that's fixed now PATCHv5: - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter to prevent soft brick by booting into nonexistent backup partition - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, needs further investigation, effective txpower is still 0) - Experimenting on wifi but that'll be a future patch, board boots fine now. PATCHv6: - Used init script to reset bootcount, preinit is too early to use fw-setenv PATCHv7: - Added model to sysupgrade. Tested thoroughly in general and I'm happy with this. Sorry for the many revisions. PATCHv8: - Added SamKnows recovery partition to partition table, in case someone specifically wants to send their bootloader to it - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into mt76 kernel module (verified that signal strength on both bands is good, tested AP and STA modes commit 200a485d324ba262daa7bed9b01c2a044f9be856 Author: Andrew Yong Date:???Wed Apr 27 01:47:23 2016 +0800 ????Initial support for SamKnows Whitebox 8 ???? ????Signed-off-by: Andrew Yong diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index a759bcc..9ad5974 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -24,7 +24,8 @@ linkits7688d | \ ?wsr-600 | \ ?wsr-1166 | \ ?br6425 | \ -miwifi-nano) +miwifi-nano | \ +sk-wb8) ? ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ? ;; ?esac diff --git a/package/kernel/mt76/patches/000-mt7612.patch b/package/kernel/mt76/patches/000-mt7612.patch new file mode 100644 index 0000000..3529e35 --- /dev/null +++ b/package/kernel/mt76/patches/000-mt7612.patch @@ -0,0 +1,10 @@ +--- a/mt76x2_pci.c ++++ b/mt76x2_pci.c +@@ -20,6 +20,7 @@ +? + static const struct pci_device_id mt76pci_device_table[] = { +????????{ PCI_DEVICE(0x14c3, 0x7662) }, ++???????{ PCI_DEVICE(0x14c3, 0x7612) }, +????????{ }, + }; + diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index aeaab33..a47eacf 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -243,6 +243,9 @@ rt-n14u) ? set_wifi_led "$board:blue:air" ? set_usb_led "$board:blue:usb" ? ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; ?tiny-ac) ? set_wifi_led "$board:orange:wifi" ? set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index c6c740f..b3740d5 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() ? pbr-m1|\ ? psg1208|\ ? sap-g3200u3|\ + sk-wb8|\ ? wf-2881|\ ? whr-300hp2|\ ? whr-600d|\ @@ -313,6 +314,9 @@ ramips_setup_macs() ? lan_mac=$(macaddr_setbit_la "$lan_mac") ? wan_mac=$(mtd_get_mac_binary factory 32772) ? ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; ? tew-691gr) ? lan_mac=$(cat /sys/class/net/eth0/address) ? wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 20ff8ff..e98226d 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -78,6 +78,7 @@ get_status_led() { ? ;; ? awapn2403|\ ? dir-645|\ + sk-wb8|\ ? wrh-300cr) ? status_led="$board:green:wps" ? ;; diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount new file mode 100755 index 0000000..b93e3c9 --- /dev/null +++ b/target/linux/ramips/base-files/etc/init.d/bootcount @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +. /lib/ramips.sh + +START=99 + +start() { + local board=$(ramips_board_name) + if [ $board = "sk-wb8" ]; then + fw_setenv bootcount 0 + fi +} diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 2c669c5..f89e52d 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -373,6 +373,9 @@ ramips_board_detect() { ? *"RUT5XX") ? name="rut5xx" ? ;; + *"SamKnows Whitebox 8") + name="sk-wb8" + ;; ? *"SAP-G3200U3") ? name="sap-g3200u3" ? ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 2b24030..4e5cb07 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -111,6 +111,7 @@ platform_check_image() { ? rt-n56u|\ ? rut5xx|\ ? sap-g3200u3|\ + sk-wb8|\ ? sl-r7205|\ ? tew-691gr|\ ? tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..350cb4a --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,127 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows Whitebox 8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + partition at e30000 { + label = "recovery"; + reg = <0xe30000 0x1d0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 14 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 15 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 11 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio1 9 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; + +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 1b8d3da..a09f4ab 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -138,6 +138,12 @@ define Device/ubnt-erx ?endef ?TARGET_DEVICES += ubnt-erx ? +define Device/sk-wb8 +??DTS := SK-WB8 +??IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + ?# FIXME: is this still needed? ?define Image/Prepare ?#define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..aa2e45e --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SamKnows Whitebox 8 + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev uboot-envtools +endef + +define Profile/SK-WB8/Description + Package set compatible with the SamKnows Whitebox 8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From aczlan+openwrt at gmail.com Tue Apr 26 14:13:53 2016 From: aczlan+openwrt at gmail.com (Aaron Z) Date: Tue, 26 Apr 2016 14:13:53 -0400 Subject: [OpenWrt-Devel] Which image for the Nanostation Loco M2, WAS:Cannot flash UBNT Loco M2 In-Reply-To: <56E2F009.9080207@universe-factory.net> References: <56E2F009.9080207@universe-factory.net> Message-ID: On Fri, Mar 11, 2016 at 11:19 AM, Matthias Schiffer wrote: > As I wrote, "bullet" is the correct image for all XM devices with one > ethernet port and no USB. Finally had a chance to play with the Bullet and Nanostation images this week. What I found is that the Nano M image includes the switch driver which lets you use the switch (for example, I am using it to run 3 VLANs and 3 wireless networks from one AP). The Bullet image does not load that driver and as such, does not let you use the switch. Here is my config with working VLANs (LAN is untagged on the switch, network2 is tagged with vlan 1 and network 3 is tagged with vlan 3): *******Begin /etc/config/network on line 8 after the loopback section********** config interface 'lan' option type 'bridge' option ifname 'eth0' option proto 'dhcp' config 'switch' 'eth1' option 'reset' '1' option 'enable_vlan' '1' config 'switch_vlan' 'eth0_1' option 'device' 'eth0' option 'vlan' '1' option 'ports' '0t' config interface 'network2' option proto 'dhcp' option type 'bridge' option stp '1' option ifname 'eth0.1' config switch_vlan option device 'switch0' option vlan '3' option vid '3' option ports '0t' config interface 'network3' option proto 'dhcp' option type 'bridge' option stp '1' option ifname 'eth0.3' *******End /etc/config/network********** Aaron Z A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. ? Robert Heinlein, Time Enough for Love _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Tue Apr 26 16:06:55 2016 From: me at ndoo.sg (Andrew Yong) Date: Wed, 27 Apr 2016 04:06:55 +0800 Subject: [OpenWrt-Devel] [PATCHv8] ramips: Add support for SamKnows Whitebox 8 In-Reply-To: <1461693563.6344.6.camel@ndoo.sg> References: <1461693563.6344.6.camel@ndoo.sg> Message-ID: Documented everything that led to this here: https://wiki.openwrt.org/inbox/samknows/samknows_sk-wb8 On Wed, Apr 27, 2016 at 1:59 AM, Andrew Yong wrote: > PATCHv1: > This patch adds support for the SamKnows version 8.0 Whitebox, built > around the MT7621 platform. 2.4GHz appears to be working, albeit > poorly; 5GHz not working yet. > > PATCHv2: > - Fixed LED name in DTS. > > PATCHv3: > DTS: Syntax error fixed, LEDs and buttons mapped correctly now > - diag.sh updated to blink WPS LED on boot > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > matches SamKnows firmware > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > PATCHv4: > - I didn't commit some fixes in PATCHv3, that's fixed now > > PATCHv5: > - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter > to prevent soft brick by booting into nonexistent backup partition > - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, > needs further investigation, effective txpower is still 0) > - Experimenting on wifi but that'll be a future patch, board boots fine now. > > PATCHv6: > - Used init script to reset bootcount, preinit is too early to use fw-setenv > > PATCHv7: > - Added model to sysupgrade. Tested thoroughly in general and I'm happy with this. Sorry for the many revisions. > > PATCHv8: > - Added SamKnows recovery partition to partition table, in case someone specifically wants to send their bootloader to it > - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into mt76 kernel module (verified that signal strength on both bands is good, tested AP and STA modes > > commit 200a485d324ba262daa7bed9b01c2a044f9be856 > Author: Andrew Yong > Date: Wed Apr 27 01:47:23 2016 +0800 > > Initial support for SamKnows Whitebox 8 > > Signed-off-by: Andrew Yong > > diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips > index a759bcc..9ad5974 100644 > --- a/package/boot/uboot-envtools/files/ramips > +++ b/package/boot/uboot-envtools/files/ramips > @@ -24,7 +24,8 @@ linkits7688d | \ > wsr-600 | \ > wsr-1166 | \ > br6425 | \ > -miwifi-nano) > +miwifi-nano | \ > +sk-wb8) > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" > ;; > esac > diff --git a/package/kernel/mt76/patches/000-mt7612.patch b/package/kernel/mt76/patches/000-mt7612.patch > new file mode 100644 > index 0000000..3529e35 > --- /dev/null > +++ b/package/kernel/mt76/patches/000-mt7612.patch > @@ -0,0 +1,10 @@ > +--- a/mt76x2_pci.c > ++++ b/mt76x2_pci.c > +@@ -20,6 +20,7 @@ > + > + static const struct pci_device_id mt76pci_device_table[] = { > + { PCI_DEVICE(0x14c3, 0x7662) }, > ++ { PCI_DEVICE(0x14c3, 0x7612) }, > + { }, > + }; > + > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds > index aeaab33..a47eacf 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -243,6 +243,9 @@ rt-n14u) > set_wifi_led "$board:blue:air" > set_usb_led "$board:blue:usb" > ;; > +sk-wb8) > + set_usb_led "$board:green:usb" > + ;; > tiny-ac) > set_wifi_led "$board:orange:wifi" > set_usb_led "$board:green:usb" > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network > index c6c740f..b3740d5 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > pbr-m1|\ > psg1208|\ > sap-g3200u3|\ > + sk-wb8|\ > wf-2881|\ > whr-300hp2|\ > whr-600d|\ > @@ -313,6 +314,9 @@ ramips_setup_macs() > lan_mac=$(macaddr_setbit_la "$lan_mac") > wan_mac=$(mtd_get_mac_binary factory 32772) > ;; > + sk-wb8) > + wan_mac=$(mtd_get_mac_binary factory 57350) > + ;; > tew-691gr) > lan_mac=$(cat /sys/class/net/eth0/address) > wan_mac=$(macaddr_add "$lan_mac" 3) > diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh > index 20ff8ff..e98226d 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -78,6 +78,7 @@ get_status_led() { > ;; > awapn2403|\ > dir-645|\ > + sk-wb8|\ > wrh-300cr) > status_led="$board:green:wps" > ;; > diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount > new file mode 100755 > index 0000000..b93e3c9 > --- /dev/null > +++ b/target/linux/ramips/base-files/etc/init.d/bootcount > @@ -0,0 +1,11 @@ > +#!/bin/sh /etc/rc.common > +. /lib/ramips.sh > + > +START=99 > + > +start() { > + local board=$(ramips_board_name) > + if [ $board = "sk-wb8" ]; then > + fw_setenv bootcount 0 > + fi > +} > diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh > index 2c669c5..f89e52d 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -373,6 +373,9 @@ ramips_board_detect() { > *"RUT5XX") > name="rut5xx" > ;; > + *"SamKnows Whitebox 8") > + name="sk-wb8" > + ;; > *"SAP-G3200U3") > name="sap-g3200u3" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index 2b24030..4e5cb07 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -111,6 +111,7 @@ platform_check_image() { > rt-n56u|\ > rut5xx|\ > sap-g3200u3|\ > + sk-wb8|\ > sl-r7205|\ > tew-691gr|\ > tew-692gr|\ > diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts > new file mode 100644 > index 0000000..350cb4a > --- /dev/null > +++ b/target/linux/ramips/dts/SK-WB8.dts > @@ -0,0 +1,127 @@ > +/dts-v1/; > + > +#include "mt7621.dtsi" > + > +/ { > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > + model = "SamKnows Whitebox 8"; > + > + memory at 0 { > + device_type = "memory"; > + reg = <0x0 0x8000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,57600"; > + }; > + > + palmbus at 1E000000 { > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "mx25l6405d"; > + reg = <0 0>; > + linux,modalias = "m25p80"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x7b0000>; > + }; > + > + partition at e30000 { > + label = "recovery"; > + reg = <0xe30000 0x1d0000>; > + }; > + > + }; > + }; > + }; > + > + pcie at 1e140000 { > + status = "okay"; > + > + pcie0 { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + > + pcie1 { > + mt76 at 1,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x0000>; > + mediatek,5ghz = <0>; > + }; > + }; > + }; > + > + ethernet at 1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + wps { > + label = "sk-wb8:green:wps"; > + gpios = <&gpio1 14 1>; > + }; > + > + usb { > + label = "sk-wb8:green:usb"; > + gpios = <&gpio1 15 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + wps { > + label = "wps"; > + gpios = <&gpio1 11 1>; > + linux,code = <0x211>; > + }; > + reset { > + label = "reset"; > + gpios = <&gpio1 9 1>; > + linux,code = <0x198>; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; > + ralink,function = "gpio"; > + }; > + }; > + }; > + > +}; > diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk > index 1b8d3da..a09f4ab 100644 > --- a/target/linux/ramips/image/mt7621.mk > +++ b/target/linux/ramips/image/mt7621.mk > @@ -138,6 +138,12 @@ define Device/ubnt-erx > endef > TARGET_DEVICES += ubnt-erx > > +define Device/sk-wb8 > + DTS := SK-WB8 > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > +endef > +TARGET_DEVICES += sk-wb8 > + > # FIXME: is this still needed? > define Image/Prepare > #define Build/Compile > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > new file mode 100644 > index 0000000..aa2e45e > --- /dev/null > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > @@ -0,0 +1,18 @@ > +# > +# Copyright (C) 2016 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/SK-WB8 > + NAME:=SamKnows Whitebox 8 > + PACKAGES:=\ > + kmod-usb-core kmod-usb3 \ > + kmod-ledtrig-usbdev uboot-envtools > +endef > + > +define Profile/SK-WB8/Description > + Package set compatible with the SamKnows Whitebox 8. > +endef > +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Tue Apr 26 17:47:49 2016 From: me at ndoo.sg (Andrew Yong) Date: Wed, 27 Apr 2016 05:47:49 +0800 Subject: [OpenWrt-Devel] [PATCHv9] ramips: Add support for SamKnows Whitebox 8 Message-ID: <1461707269.28116.2.camel@ndoo.sg> PATCHv1: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. PATCHv2: - Fixed LED name in DTS. PATCHv3: ?DTS: Syntax error fixed, LEDs and buttons mapped correctly now - diag.sh updated to blink WPS LED on boot - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset matches SamKnows firmware - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware PATCHv4: - I didn't commit some fixes in PATCHv3, that's fixed now PATCHv5: - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter to prevent soft brick by booting into nonexistent backup partition - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, needs further investigation, effective txpower is still 0) - Experimenting on wifi but that'll be a future patch, board boots fine now. PATCHv6: - Used init script to reset bootcount, preinit is too early to use fw-setenv PATCHv7: - Added model to sysupgrade. Tested thoroughly in general and I'm happy with this. Sorry for the many revisions. PATCHv8: - Added SamKnows recovery partition to partition table, in case someone specifically wants to send their bootloader to it - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into mt76 kernel module (verified that signal strength on both bands is good, tested AP and STA modes PATCHv9: - Fixed LAN MAC address EEPROM offset - Fixed mt76 patch whitespace issues - Renamed mt76 patch to mt7602en to accurately reflect the physical chip it's supporting Author: Andrew Yong Date:???Wed Apr 27 05:40:26 2016 +0800 ????Initial support for SamKnows Whitebox 8 ???? ????Signed-off-by: Andrew Yong diff --git a/000-mt7602en.patch b/000-mt7602en.patch new file mode 100644 index 0000000..e357bbb --- /dev/null +++ b/000-mt7602en.patch @@ -0,0 +1,10 @@ +--- a/mt76x2_pci.c ++++ b/mt76x2_pci.c +@@ -20,6 +20,7 @@ +? + static const struct pci_device_id mt76pci_device_table[] = { +???????{ PCI_DEVICE(0x14c3, 0x7662) }, ++??????{ PCI_DEVICE(0x14c3, 0x7612) }, +???????{ }, + }; +? diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index a759bcc..9ad5974 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -24,7 +24,8 @@ linkits7688d | \ ?wsr-600 | \ ?wsr-1166 | \ ?br6425 | \ -miwifi-nano) +miwifi-nano | \ +sk-wb8) ????????ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ????????;; ?esac diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index aeaab33..a47eacf 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -243,6 +243,9 @@ rt-n14u) ????????set_wifi_led "$board:blue:air" ????????set_usb_led "$board:blue:usb" ????????;; +sk-wb8) +???????set_usb_led "$board:green:usb" +???????;; ?tiny-ac) ????????set_wifi_led "$board:orange:wifi" ????????set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index c6c740f..4bc1d6e 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() ????????pbr-m1|\ ????????psg1208|\ ????????sap-g3200u3|\ +???????sk-wb8|\ ????????wf-2881|\ ????????whr-300hp2|\ ????????whr-600d|\ @@ -313,6 +314,9 @@ ramips_setup_macs() ????????????????lan_mac=$(macaddr_setbit_la "$lan_mac") ????????????????wan_mac=$(mtd_get_mac_binary factory 32772) ????????????????;; +???????sk-wb8) +???????????????wan_mac=$(mtd_get_mac_binary factory 57344) +???????????????;; ????????tew-691gr) ????????????????lan_mac=$(cat /sys/class/net/eth0/address) ????????????????wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 20ff8ff..e98226d 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -78,6 +78,7 @@ get_status_led() { ????????????????;; ????????awapn2403|\ ????????dir-645|\ +???????sk-wb8|\ ????????wrh-300cr) ????????????????status_led="$board:green:wps" ????????????????;; diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount new file mode 100755 index 0000000..b93e3c9 --- /dev/null +++ b/target/linux/ramips/base-files/etc/init.d/bootcount @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +. /lib/ramips.sh + +START=99 + +start() { +???????local board=$(ramips_board_name) +???????if [ $board = "sk-wb8" ]; then +???????????????fw_setenv bootcount 0 +???????fi +} diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 2c669c5..f89e52d 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -373,6 +373,9 @@ ramips_board_detect() { ????????*"RUT5XX") ????????????????name="rut5xx" ????????????????;; +???????*"SamKnows Whitebox 8") +???????????????name="sk-wb8" +???????????????;; ????????*"SAP-G3200U3") ????????????????name="sap-g3200u3" ????????????????;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 2b24030..4e5cb07 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -111,6 +111,7 @@ platform_check_image() { ????????rt-n56u|\ ????????rut5xx|\ ????????sap-g3200u3|\ +???????sk-wb8|\ ????????sl-r7205|\ ????????tew-691gr|\ ????????tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..350cb4a --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,127 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { +???????compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; +???????model = "SamKnows Whitebox 8"; + +???????memory at 0 { +???????????????device_type = "memory"; +???????????????reg = <0x0 0x8000000>; +???????}; + +???????chosen { +???????????????bootargs = "console=ttyS0,57600"; +???????}; + +???????palmbus at 1E000000 { +???????????????spi at b00 { +???????????????????????status = "okay"; + +???????????????????????m25p80 at 0 { +???????????????????????????????#address-cells = <1>; +???????????????????????????????#size-cells = <1>; +???????????????????????????????compatible = "mx25l6405d"; +???????????????????????????????reg = <0 0>; +???????????????????????????????linux,modalias = "m25p80"; +???????????????????????????????spi-max-frequency = <10000000>; + +???????????????????????????????partition at 0 { +???????????????????????????????????????label = "u-boot"; +???????????????????????????????????????reg = <0x0 0x30000>; +???????????????????????????????????????read-only; +???????????????????????????????}; + +???????????????????????????????partition at 30000 { +???????????????????????????????????????label = "u-boot-env"; +???????????????????????????????????????reg = <0x30000 0x10000>; +???????????????????????????????}; + +???????????????????????????????factory: partition at 40000 { +???????????????????????????????????????label = "factory"; +???????????????????????????????????????reg = <0x40000 0x10000>; +???????????????????????????????????????read-only; +???????????????????????????????}; + +???????????????????????????????partition at 50000 { +???????????????????????????????????????label = "firmware"; +???????????????????????????????????????reg = <0x50000 0x7b0000>; +???????????????????????????????}; + +???????????????????????????????partition at e30000 { +???????????????????????????????????????label = "recovery"; +???????????????????????????????????????reg = <0xe30000 0x1d0000>; +???????????????????????????????}; + +???????????????????????}; +???????????????}; +???????}; + +???????pcie at 1e140000 { +???????????????status = "okay"; + +???????????????pcie0 { +???????????????????????mt76 at 0,0 { +???????????????????????????????reg = <0x0000 0 0 0 0>; +???????????????????????????????device_type = "pci"; +???????????????????????????????mediatek,mtd-eeprom = <&factory 0x8000>; +???????????????????????????????mediatek,2ghz = <0>; +???????????????????????}; +???????????????}; + +???????????????pcie1 { +???????????????????????mt76 at 1,0 { +???????????????????????????????reg = <0x0000 0 0 0 0>; +???????????????????????????????device_type = "pci"; +???????????????????????????????mediatek,mtd-eeprom = <&factory 0x0000>; +???????????????????????????????mediatek,5ghz = <0>; +???????????????????????}; +???????????????}; +???????}; + +???????ethernet at 1e100000 { +???????????????mtd-mac-address = <&factory 0xe000>; +???????}; + +???????gpio-leds { +???????????????compatible = "gpio-leds"; + +???????????????wps { +???????????????????????label = "sk-wb8:green:wps"; +???????????????????????gpios = <&gpio1 14 1>; +???????????????}; + +???????????????usb { +???????????????????????label = "sk-wb8:green:usb"; +???????????????????????gpios = <&gpio1 15 1>; +???????????????}; +???????}; + +???????gpio-keys-polled { +???????????????compatible = "gpio-keys-polled"; +???????????????#address-cells = <1>; +???????????????#size-cells = <0>; +???????????????poll-interval = <20>; +???????????????wps { +???????????????????????label = "wps"; +???????????????????????gpios = <&gpio1 11 1>; +???????????????????????linux,code = <0x211>; +???????????????}; +???????????????reset { +???????????????????????label = "reset"; +???????????????????????gpios = <&gpio1 9 1>; +???????????????????????linux,code = <0x198>; +???????????????}; +???????}; + +???????pinctrl { +???????????????state_default: pinctrl0 { +???????????????????????gpio { +???????????????????????????????ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; +???????????????????????????????ralink,function = "gpio"; +???????????????????????}; +???????????????}; +???????}; + +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 1b8d3da..a09f4ab 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -138,6 +138,12 @@ define Device/ubnt-erx ?endef ?TARGET_DEVICES += ubnt-erx ? +define Device/sk-wb8 +??DTS := SK-WB8 +??IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + ?# FIXME: is this still needed? ?define Image/Prepare ?#define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..aa2e45e --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 +???????NAME:=SamKnows Whitebox 8 +???????PACKAGES:=\ +???????????????kmod-usb-core kmod-usb3 \ +???????????????kmod-ledtrig-usbdev uboot-envtools +endef + +define Profile/SK-WB8/Description +???????Package set compatible with the SamKnows Whitebox 8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ardeleanalex at gmail.com Wed Apr 27 02:15:22 2016 From: ardeleanalex at gmail.com (Alexandru Ardelean) Date: Wed, 27 Apr 2016 09:15:22 +0300 Subject: [OpenWrt-Devel] [PATCH] defaults.c: remove toplevel_rule struct Message-ID: <1461737722-4217-1-git-send-email-aardelean@riverbed.com> From: Alexandru Ardelean Since commit 60f1444 , this struct is no longer used. Signed-off-by: Alexandru Ardelean --- defaults.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/defaults.c b/defaults.c index e246949..3d210f9 100644 --- a/defaults.c +++ b/defaults.c @@ -164,13 +164,6 @@ fw3_print_default_chains(struct fw3_ipt_handle *handle, struct fw3_state *state, set(defs->flags, handle->family, handle->table); } - -struct toplevel_rule { - enum fw3_table table; - const char *chain; - const char *target; -}; - void fw3_print_default_head_rules(struct fw3_ipt_handle *handle, struct fw3_state *state, bool reload) -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ardeleanalex at gmail.com Wed Apr 27 02:16:51 2016 From: ardeleanalex at gmail.com (Alexandru Ardelean) Date: Wed, 27 Apr 2016 09:16:51 +0300 Subject: [OpenWrt-Devel] [PATCH] [firewall3] defaults.c: remove toplevel_rule struct Message-ID: <1461737811-6020-1-git-send-email-aardelean@riverbed.com> From: Alexandru Ardelean Since commit 60f1444 , this struct is no longer used. Signed-off-by: Alexandru Ardelean --- defaults.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/defaults.c b/defaults.c index e246949..3d210f9 100644 --- a/defaults.c +++ b/defaults.c @@ -164,13 +164,6 @@ fw3_print_default_chains(struct fw3_ipt_handle *handle, struct fw3_state *state, set(defs->flags, handle->family, handle->table); } - -struct toplevel_rule { - enum fw3_table table; - const char *chain; - const char *target; -}; - void fw3_print_default_head_rules(struct fw3_ipt_handle *handle, struct fw3_state *state, bool reload) -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Wed Apr 27 02:22:22 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Wed, 27 Apr 2016 08:22:22 +0200 Subject: [OpenWrt-Devel] [PATCH] [firewall3] defaults.c: remove toplevel_rule struct In-Reply-To: <1461737811-6020-1-git-send-email-aardelean@riverbed.com> References: <1461737811-6020-1-git-send-email-aardelean@riverbed.com> Message-ID: <57205A9E.8090902@openwrt.org> Hi Alexandru, pushed to master - thanks! ~ Jo On 27.04.2016 08:16, Alexandru Ardelean wrote: > From: Alexandru Ardelean > > Since commit 60f1444 , this struct is no longer used. > > Signed-off-by: Alexandru Ardelean > --- > defaults.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/defaults.c b/defaults.c > index e246949..3d210f9 100644 > --- a/defaults.c > +++ b/defaults.c > @@ -164,13 +164,6 @@ fw3_print_default_chains(struct fw3_ipt_handle *handle, struct fw3_state *state, > set(defs->flags, handle->family, handle->table); > } > > - > -struct toplevel_rule { > - enum fw3_table table; > - const char *chain; > - const char *target; > -}; > - > void > fw3_print_default_head_rules(struct fw3_ipt_handle *handle, > struct fw3_state *state, bool reload) > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bittorf at bluebottle.com Wed Apr 27 02:32:56 2016 From: bittorf at bluebottle.com (Bastian Bittorf) Date: Wed, 27 Apr 2016 08:32:56 +0200 Subject: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)" In-Reply-To: <1512048.ppQ2pjbRlI@strike> References: <56EB27A3.2010204@openwrt.org> <20160425065419.GK8928@medion.lan> <1512048.ppQ2pjbRlI@strike> Message-ID: <20160427063256.GL14295@medion.lan> * Sven Roederer [27.04.2016 08:30]: > So finally, as this change will come, so it comes already inside this release > and some derived projects also adapted the change. We also adapted this change and it makes the world better. bye, bastian _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bapclenet at gmail.com Wed Apr 27 03:24:14 2016 From: bapclenet at gmail.com (Baptiste Clenet) Date: Wed, 27 Apr 2016 09:24:14 +0200 Subject: [OpenWrt-Devel] UART1 mt7688 Message-ID: Hi, I want to run an UART communication between the mt7688 and another board, console uses UART0 but I want to configure UART1 to be able to send data on it. Currently, if I send something on /dev/ttyS1, I get: write to fd 4 failed: I/O error or ash: write error: I/O error root at OpenWrt:/# stty -F /dev/ttyS1 stty: /dev/ttyS1: I/O error Should I add something in the dts? Thanks -- Baptiste _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Wed Apr 27 05:13:57 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Wed, 27 Apr 2016 11:13:57 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/6] netifd: Make sending DHCP release configurable via uci when client exits Message-ID: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> Make sending a DHCP release configurable when the client exits allowing to clean up IP/mac state info in intermediate devices. Signed-off-by: Hans Dedecker --- v1 -> v2 : Make sending DHCP release configurable via uci package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh index 0e88af9..7085bd2 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -12,6 +12,7 @@ proto_dhcp_init_config() { proto_config_add_string clientid proto_config_add_string vendorid proto_config_add_boolean 'broadcast:bool' + proto_config_add_boolean 'release:bool' proto_config_add_string 'reqopts:list(string)' proto_config_add_string iface6rd proto_config_add_string sendopts @@ -26,8 +27,8 @@ proto_dhcp_setup() { local config="$1" local iface="$2" - local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes - json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes + local ipaddr hostname clientid vendorid broadcast release reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes + json_get_vars ipaddr hostname clientid vendorid broadcast release reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes local opt dhcpopts for opt in $reqopts; do @@ -39,6 +40,7 @@ proto_dhcp_setup() { done [ "$broadcast" = 1 ] && broadcast="-B" || broadcast= + [ "$release" = 1 ] && release="-R" || release= [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C" [ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd" [ "$iface6rd" != 0 -a -f /lib/netifd/proto/6rd.sh ] && append dhcpopts "-O 212" @@ -56,7 +58,7 @@ proto_dhcp_setup() { ${ipaddr:+-r $ipaddr} \ ${hostname:+-H $hostname} \ ${vendorid:+-V $vendorid} \ - $clientid $broadcast $dhcpopts + $clientid $broadcast $release $dhcpopts } proto_dhcp_renew() { -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Wed Apr 27 05:13:58 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Wed, 27 Apr 2016 11:13:58 +0200 Subject: [OpenWrt-Devel] [PATCH 2/6] dropbear: Make utmp and putuline support configurable via seperate config options In-Reply-To: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> References: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> Message-ID: <1461748442-9469-2-git-send-email-dedeckeh@gmail.com> Utmp support tracks who is currenlty logged in by logging info to the file /var/run/utmp (supported by busybox) Putuline support will use the utmp structure to write to the utmp file Signed-off-by: Hans Dedecker --- package/network/services/dropbear/Config.in | 15 +++++++++++++++ package/network/services/dropbear/Makefile | 5 ++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in index 3316c84..7c2edd7 100644 --- a/package/network/services/dropbear/Config.in +++ b/package/network/services/dropbear/Config.in @@ -32,4 +32,19 @@ config DROPBEAR_ECC Increases binary size by about 23 kB (MIPS). +config DROPBEAR_UTMP + bool "Utmp support" + default n + depends on BUSYBOX_CONFIG_FEATURE_UTMP + help + This enables dropbear utmp support, the file /var/run/utmp is used to + track who is currently logged in. + +config DROPBEAR_PUTUTLINE + bool "Pututline support" + default n + depends on DROPBEAR_UTMP + help + Dropbear will use pututline() to write the utmp structure into the utmp file. + endmenu diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 39ab04b..593e0a8 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -68,12 +68,11 @@ CONFIGURE_ARGS += \ --enable-syslog \ $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \ --disable-lastlog \ - --disable-utmp \ - --disable-utmpx \ + $(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \ --disable-wtmp \ --disable-wtmpx \ --disable-loginfunc \ - --disable-pututline \ + $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \ --disable-pututxline \ --disable-zlib \ --enable-bundled-libtom -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Wed Apr 27 05:13:59 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Wed, 27 Apr 2016 11:13:59 +0200 Subject: [OpenWrt-Devel] [PATCH 3/6] iproute2: Add package for nstat utility In-Reply-To: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> References: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> Message-ID: <1461748442-9469-3-git-send-email-dedeckeh@gmail.com> Add support for the command line utility nstat displaying network statistics Signed-off-by: Hans Dedecker --- package/network/utils/iproute2/Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile index cb9730e..a7686cb 100644 --- a/package/network/utils/iproute2/Makefile +++ b/package/network/utils/iproute2/Makefile @@ -60,6 +60,11 @@ $(call Package/iproute2/Default) TITLE:=Socket statistics utility endef +define Package/nstat +$(call Package/iproute2/Default) + TITLE:=Network statistics utility +endef + ifeq ($(BUILD_VARIANT),tiny) IP_CONFIG_TINY:=y endif @@ -128,9 +133,15 @@ define Package/ss/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/ endef +define Package/nstat/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/nstat $(1)/usr/sbin/ +endef + $(eval $(call BuildPackage,ip)) $(eval $(call BuildPackage,ip-full)) $(eval $(call BuildPackage,tc)) $(eval $(call BuildPackage,genl)) $(eval $(call BuildPackage,ip-bridge)) $(eval $(call BuildPackage,ss)) +$(eval $(call BuildPackage,nstat)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Wed Apr 27 05:14:00 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Wed, 27 Apr 2016 11:14:00 +0200 Subject: [OpenWrt-Devel] [PATCH 4/6] dropbear: Add procd interface triggers when interface config is specified In-Reply-To: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> References: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> Message-ID: <1461748442-9469-4-git-send-email-dedeckeh@gmail.com> A dropbear instance having an interface config won't start if the interface is down as no IP address is available. Adding interface triggers for each configured interface executing the dropbear reload script will start the dropbear instance when the interface is up. Signed-off-by: Hans Dedecker --- package/network/services/dropbear/Makefile | 2 +- .../network/services/dropbear/files/dropbear.init | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index 593e0a8..8d4e7bc 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dropbear PKG_VERSION:=2015.71 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init index 03745c9..5c3345d 100755 --- a/package/network/services/dropbear/files/dropbear.init +++ b/package/network/services/dropbear/files/dropbear.init @@ -106,6 +106,12 @@ keygen() chmod 0700 /etc/dropbear } +load_interfaces() +{ + config_get interface "$1" Interface + interfaces=" ${interface} ${interfaces}" +} + start_service() { [ -s /etc/dropbear/dropbear_rsa_host_key ] || keygen @@ -119,7 +125,21 @@ start_service() service_triggers() { - procd_add_reload_trigger "dropbear" + local interfaces + + procd_open_trigger + procd_add_config_trigger "config.change" "dropbear" /etc/init.d/dropbear reload + + config_load "${NAME}" + config_foreach load_interfaces dropbear + + [ -n "${interfaces}" ] & { + for n in $interfaces ; do + procd_add_interface_trigger "interface.*" $n /etc/init.d/dropbear reload + done + } + procd_close_trigger + procd_add_validation validate_section_dropbear } -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Wed Apr 27 05:14:01 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Wed, 27 Apr 2016 11:14:01 +0200 Subject: [OpenWrt-Devel] [PATCH 5/6] dnsmasq: Add conntrack support in the full variant In-Reply-To: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> References: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> Message-ID: <1461748442-9469-5-git-send-email-dedeckeh@gmail.com> Conntrack support reads the connection track mark associated with incoming DNS queries and sets the same mark value on the upstream forwarded DNS query. This can be usefull to track traffic generated by dnsmasq to associate it with the clients who generate the queries, usefull for bandwidth accouting and firewall. Signed-off-by: Hans Dedecker --- package/network/services/dnsmasq/Makefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index a5b96a3..3f12a40 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -25,7 +25,8 @@ PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcpv6 \ CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dnssec \ CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_auth \ - CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset + CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset \ + CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_conntrack include $(INCLUDE_DIR)/package.mk @@ -51,9 +52,10 @@ endef define Package/dnsmasq-full $(call Package/dnsmasq/Default) - TITLE += (with DNSSEC, DHCPv6, Auth DNS, IPset enabled by default) + TITLE += (with DNSSEC, DHCPv6, Auth DNS, IPset, Conntrack enabled by default) DEPENDS:=+PACKAGE_dnsmasq_full_dnssec:libnettle \ - +PACKAGE_dnsmasq_full_ipset:kmod-ipt-ipset + +PACKAGE_dnsmasq_full_ipset:kmod-ipt-ipset \ + +PACKAGE_dnsmasq_full_conntrack:libnetfilter-conntrack VARIANT:=full endef @@ -70,8 +72,8 @@ endef define Package/dnsmasq-full/description $(call Package/dnsmasq/description) -This is a fully configurable variant with DHCPv6, DNSSEC, Authroitative DNS and -IPset support enabled by default. +This is a fully configurable variant with DHCPv6, DNSSEC, Authoritative DNS and +IPset, Conntrack support enabled by default. endef define Package/dnsmasq/conffiles @@ -94,6 +96,9 @@ define Package/dnsmasq-full/config config PACKAGE_dnsmasq_full_ipset bool "Build with IPset support." default y + config PACKAGE_dnsmasq_full_conntrack + bool "Build with Conntrack support." + default y endif endef @@ -113,7 +118,8 @@ ifeq ($(BUILD_VARIANT),full) COPTS += $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dhcpv6),,-DNO_DHCP6) \ $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_dnssec),-DHAVE_DNSSEC) \ $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_auth),,-DNO_AUTH) \ - $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset),,-DNO_IPSET) + $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_ipset),,-DNO_IPSET) \ + $(if $(CONFIG_PACKAGE_dnsmasq_$(BUILD_VARIANT)_conntrack),-DHAVE_CONNTRACK,) COPTS += $(if $(CONFIG_LIBNETTLE_MINI),-DNO_GMP,) else COPTS += -DNO_AUTH -DNO_IPSET -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Wed Apr 27 05:14:02 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Wed, 27 Apr 2016 11:14:02 +0200 Subject: [OpenWrt-Devel] [PATCH 6/6] ppp: Add ppp-mod-passwordfd subpackage to ppp In-Reply-To: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> References: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> Message-ID: <1461748442-9469-6-git-send-email-dedeckeh@gmail.com> Signed-off-by: Hans Dedecker --- package/network/services/ppp/Makefile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile index e0acf59..23c1e93 100644 --- a/package/network/services/ppp/Makefile +++ b/package/network/services/ppp/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ppp PKG_VERSION:=2.4.7 -PKG_RELEASE:=8 +PKG_RELEASE:=9 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/ @@ -117,6 +117,17 @@ define Package/ppp-mod-pptp/description This package contains a PPtP plugin for ppp. endef +define Package/ppp-mod-passwordfd +$(call Package/ppp/Default) + DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) + TITLE:=pap/chap secret from filedescriptor +endef + +define Package/ppp-mod-passwordfd/description +This package allows to pass the PAP/CHAP secret from a filedescriptor. +Eliminates the need for a secrets file. +endef + define Package/chat $(call Package/ppp/Default) TITLE:=Establish conversation with a modem @@ -238,6 +249,12 @@ define Package/ppp-mod-pptp/install $(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/ endef +define Package/ppp-mod-passwordfd/install + $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/passwordfd.so \ + $(1)/usr/lib/pppd/$(PKG_VERSION)/ +endef + define Package/chat/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/ @@ -260,6 +277,7 @@ $(eval $(call BuildPackage,ppp-mod-pppoe)) $(eval $(call BuildPackage,ppp-mod-radius)) $(eval $(call BuildPackage,ppp-mod-pppol2tp)) $(eval $(call BuildPackage,ppp-mod-pptp)) +$(eval $(call BuildPackage,ppp-mod-passwordfd)) $(eval $(call BuildPackage,chat)) $(eval $(call BuildPackage,pppdump)) $(eval $(call BuildPackage,pppstats)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From bapclenet at gmail.com Wed Apr 27 06:03:57 2016 From: bapclenet at gmail.com (Baptiste Clenet) Date: Wed, 27 Apr 2016 12:03:57 +0200 Subject: [OpenWrt-Devel] UART1 mt7688 In-Reply-To: References: Message-ID: Found the solution ! Need to add uart1 in dts and set the clock Le 27 avr. 2016 09:24, "Baptiste Clenet" a ?crit : > Hi, > > I want to run an UART communication between the mt7688 and another > board, console uses UART0 but I want to configure UART1 to be able to > send data on it. Currently, if I send something on /dev/ttyS1, I get: > write to fd 4 failed: I/O error > or > ash: write error: I/O error > > root at OpenWrt:/# stty -F /dev/ttyS1 > stty: /dev/ttyS1: I/O error > > Should I add something in the dts? > > Thanks > > -- > Baptiste > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From danutbug at gmail.com Wed Apr 27 10:04:52 2016 From: danutbug at gmail.com (Dan Bugnar) Date: Wed, 27 Apr 2016 17:04:52 +0300 Subject: [OpenWrt-Devel] [PATCH 1/2] [ubox] syslog: use realloc to change log buffer size Message-ID: <1461765893-16961-1-git-send-email-dnbugnar@ocedo.com> From: Dan Bugnar Change the log buffer size and copy the messages. Signed-off-by: Dan Bugnar --- log/syslog.c | 37 +++++++++++++++---------------------- log/syslog.h | 2 +- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/log/syslog.c b/log/syslog.c index e8b6774..d6cb868 100644 --- a/log/syslog.c +++ b/log/syslog.c @@ -42,7 +42,7 @@ #define PAD(x) (x % 4) ? (((x) - (x % 4)) + 4) : (x) static char *log_dev = LOG_DEFAULT_SOCKET; -static int log_size = LOG_DEFAULT_SIZE; +static int log_size = 0; static struct log_head *log, *log_end, *oldest, *newest; static int current_id = 0; static regex_t pat_prio; @@ -237,34 +237,30 @@ log_list(int count, struct log_head *h) } int -log_buffer_init(int size) +log_buffer_reinit(int size) { - struct log_head *_log = malloc(size); + if (size <= 0) + size = LOG_DEFAULT_SIZE; + if (log_size == size) + return 0; + + struct log_head *_log = realloc(log, size); if (!_log) { + oldest = newest = log = NULL; fprintf(stderr, "Failed to initialize log buffer with size %d\n", log_size); return -1; } - memset(_log, 0, size); - if (log && ((log_size + sizeof(struct log_head)) < size)) { - struct log_head *start = _log; - struct log_head *end = ((void*) _log) + size; - struct log_head *l; - - l = log_list(0, NULL); - while ((start < end) && l && l->size) { - memcpy(start, l, PAD(sizeof(struct log_head) + l->size)); - start = (struct log_head *) &l->data[PAD(l->size)]; - l = log_list(0, l); - } - free(log); - newest = start; + newest = (_log + (newest - log)); newest->size = 0; - oldest = log = _log; + memset(newest, 0, size - log_size); + oldest = (_log + (oldest - log)); + log = _log; log_end = ((void*) log) + size; } else { + memset(_log, 0, size); oldest = newest = log = _log; log_end = ((void*) log) + size; } @@ -276,13 +272,10 @@ log_buffer_init(int size) void log_init(int _log_size) { - if (_log_size > 0) - log_size = _log_size; - regcomp(&pat_prio, "^<([0-9]*)>(.*)", REG_EXTENDED); regcomp(&pat_tstamp, "^\[[ 0]*([0-9]*).([0-9]*)] (.*)", REG_EXTENDED); - if (log_buffer_init(log_size)) { + if (log_buffer_reinit(_log_size)) { fprintf(stderr, "Failed to allocate log memory\n"); exit(-1); } diff --git a/log/syslog.h b/log/syslog.h index 81a039f..ed5a41b 100644 --- a/log/syslog.h +++ b/log/syslog.h @@ -35,7 +35,7 @@ void log_shutdown(void); typedef void (*log_list_cb)(struct log_head *h); struct log_head* log_list(int count, struct log_head *h); -int log_buffer_init(int size); +int log_buffer_reinit(int size); void log_add(char *buf, int size, int source); void ubus_notify_log(struct log_head *l); -- 2.7.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From danutbug at gmail.com Wed Apr 27 10:04:53 2016 From: danutbug at gmail.com (Dan Bugnar) Date: Wed, 27 Apr 2016 17:04:53 +0300 Subject: [OpenWrt-Devel] [PATCH 2/2] [ubox] logd: add ubus reload method In-Reply-To: <1461765893-16961-1-git-send-email-dnbugnar@ocedo.com> References: <1461765893-16961-1-git-send-email-dnbugnar@ocedo.com> Message-ID: <1461765893-16961-2-git-send-email-dnbugnar@ocedo.com> From: Dan Bugnar Add logd link to uci library, to read the system config file and get the buffer size. Remove the -S option support and use just the option from the config file. Signed-off-by: Dan Bugnar --- CMakeLists.txt | 2 +- log/logd.c | 58 ++++++++++++++++++++++++++++++++++++++++++++-------------- log/syslog.c | 8 +------- log/syslog.h | 2 +- 4 files changed, 47 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 834b5b6..b635c4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ INSTALL(TARGETS validate_data ) ADD_EXECUTABLE(logd log/logd.c log/syslog.c) -TARGET_LINK_LIBRARIES(logd ubox ubus) +TARGET_LINK_LIBRARIES(logd ubox ubus uci) INSTALL(TARGETS logd RUNTIME DESTINATION sbin ) diff --git a/log/logd.c b/log/logd.c index 27d3cac..5b7659e 100644 --- a/log/logd.c +++ b/log/logd.c @@ -23,9 +23,14 @@ #include #include #include +#include #include "syslog.h" +#define SYSTEM_CONFIG_PATH "/etc/config" +#define SYSTEM_CONFIG "system" +#define LOG_DEFAULT_SIZE 16 + int debug = 0; static struct blob_buf b; static struct ubus_auto_conn conn; @@ -124,9 +129,46 @@ write_log(struct ubus_context *ctx, struct ubus_object *obj, return 0; } +static void +config_reload() +{ + struct uci_context *ctx; + struct uci_package *p; + struct uci_element *e; + int size = LOG_DEFAULT_SIZE; + + ctx = uci_alloc_context(); + if (!ctx) { + fprintf(stderr, "Could not allocate memory for config\n"); + exit(-1); + } + ctx->flags &= ~UCI_FLAG_STRICT; + uci_set_confdir(ctx, SYSTEM_CONFIG_PATH); + if (uci_load(ctx, SYSTEM_CONFIG, &p) == 0){ + uci_foreach_element(&p->sections, e){ + struct uci_section *s = uci_to_section(e); + if (strcmp(s->type, "system") == 0){ + size = atoi(uci_lookup_option_string(ctx, s, "log_buffer_size")); + break; + } + } + } + uci_free_context(ctx); + log_buffer_reinit(size * 1024); +} + +static int +reload_log(struct ubus_context *ctx, struct ubus_object *obj, + struct ubus_request_data *req, const char *method, + struct blob_attr *msg) +{ + config_reload(); + return 0; +} static const struct ubus_method log_methods[] = { { .name = "read", .handler = read_log, .policy = &read_policy, .n_policy = 1 }, { .name = "write", .handler = write_log, .policy = &write_policy, .n_policy = 1 }, + { .name = "reload", .handler = reload_log }, }; static struct ubus_object_type log_object_type = @@ -176,22 +218,10 @@ ubus_connect_handler(struct ubus_context *ctx) int main(int argc, char **argv) { - int ch, log_size = 16; - signal(SIGPIPE, SIG_IGN); - while ((ch = getopt(argc, argv, "S:")) != -1) { - switch (ch) { - case 'S': - log_size = atoi(optarg); - if (log_size < 1) - log_size = 16; - break; - } - } - log_size *= 1024; - uloop_init(); - log_init(log_size); + config_reload(); + log_init(); conn.cb = ubus_connect_handler; ubus_auto_connect(&conn); uloop_run(); diff --git a/log/syslog.c b/log/syslog.c index d6cb868..683eeb8 100644 --- a/log/syslog.c +++ b/log/syslog.c @@ -270,16 +270,10 @@ log_buffer_reinit(int size) } void -log_init(int _log_size) +log_init() { regcomp(&pat_prio, "^<([0-9]*)>(.*)", REG_EXTENDED); regcomp(&pat_tstamp, "^\[[ 0]*([0-9]*).([0-9]*)] (.*)", REG_EXTENDED); - - if (log_buffer_reinit(_log_size)) { - fprintf(stderr, "Failed to allocate log memory\n"); - exit(-1); - } - syslog_open(); klog_open(); openlog("sysinit", LOG_CONS, LOG_DAEMON); diff --git a/log/syslog.h b/log/syslog.h index ed5a41b..fe815b9 100644 --- a/log/syslog.h +++ b/log/syslog.h @@ -30,7 +30,7 @@ struct log_head { char data[]; }; -void log_init(int log_size); +void log_init(); void log_shutdown(void); typedef void (*log_list_cb)(struct log_head *h); -- 2.7.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ardeleanalex at gmail.com Wed Apr 27 10:14:19 2016 From: ardeleanalex at gmail.com (Alexandru Ardelean) Date: Wed, 27 Apr 2016 17:14:19 +0300 Subject: [OpenWrt-Devel] [PATCH] [RFC] toolchain/musl/ppc: add header guards for EDEADLOCK define Message-ID: <1461766459-14561-1-git-send-email-ardeleanalex@gmail.com> The header guard is the same as in: linux/arch/powerpc/include/uapi/asm/errno.h I've sent another patch for this issue, but reconsidered on it. Patch is here: http://patchwork.ozlabs.org/patch/614830/ The issue is a collision on the EDEADLOCK define between musl's and the kernel's when building perf, libbpf and other stuff in the kernel/tools folder. It only occurs on the PowerPc arch. I still don't know what's best: 1. Patch musl for PowerPc (as this patch does) 2. Patch the kernel for PowerPc (as with above mentioned patch) 3. Fix perf, libbpf, etc individually etc Hence the RFC on this patch. Signed-off-by: Alexandru Ardelean --- .../musl/patches/301-ppc-add-header-guards-user-h.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 toolchain/musl/patches/301-ppc-add-header-guards-user-h.patch diff --git a/toolchain/musl/patches/301-ppc-add-header-guards-user-h.patch b/toolchain/musl/patches/301-ppc-add-header-guards-user-h.patch new file mode 100644 index 0000000..2712d19 --- /dev/null +++ b/toolchain/musl/patches/301-ppc-add-header-guards-user-h.patch @@ -0,0 +1,17 @@ +diff --git a/arch/powerpc/bits/errno.h b/arch/powerpc/bits/errno.h +index 36ad2f9..1011bf7 100644 +--- a/arch/powerpc/bits/errno.h ++++ b/arch/powerpc/bits/errno.h +@@ -55,7 +55,10 @@ + #define ENOANO 55 + #define EBADRQC 56 + #define EBADSLT 57 ++#ifndef _ASM_POWERPC_ERRNO_H ++#define _ASM_POWERPC_ERRNO_H + #define EDEADLOCK 58 ++#endif + #define EBFONT 59 + #define ENOSTR 60 + #define ENODATA 61 +diff --git a/arch/powerpc/bits/user.h b/arch/powerpc/bits/user.h +index 6cc8aaf..e1d06f6 100644 -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ardeleanalex at gmail.com Wed Apr 27 11:17:11 2016 From: ardeleanalex at gmail.com (Alexandru Ardelean) Date: Wed, 27 Apr 2016 18:17:11 +0300 Subject: [OpenWrt-Devel] [PATCH] strace: fix build on mpc85xx target Message-ID: <1461770231-31507-1-git-send-email-ardeleanalex@gmail.com> This is another issue with musl and kernel headers colliding. However this one cannot seem to be fixed with header guards as my last 2 patches for mpc85xx. Patch 1: http://patchwork.ozlabs.org/patch/614830/ Patch 2: http://patchwork.ozlabs.org/patch/615669/ It seems that doing a bit inclusion black-magic in the strace package fixes this. Adding header guards in musl seems a bit tricky, because strace requires some reg definitions from the kernel headers which are not in the musl headers. The ar71xx target seems to build fine with this change. It's the only I've manually tested (other than mpc85xx). Build failure is (from buildbot): =========================================================== process.Tpo -c -o strace-process.o `test -f 'process.c' || echo './'`process.c In file included from /store/buildbot/slave/mpc85xx/build/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/linux/ptrace.h:100:0, from ptrace.h:55, from process.c:46: /store/buildbot/slave/mpc85xx/build/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/asm/ptrace.h:31:8: error: redefinition of 'struct pt_regs' struct pt_regs { ^ In file included from /store/buildbot/slave/mpc85xx/build/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/sys/user.h:11:0, from regs.h:1, from process.c:45: /store/buildbot/slave/mpc85xx/build/staging_dir/toolchain-powerpc_8540_gcc-5.3.0_musl-1.1.14/include/bits/user.h:1:8: note: originally defined here struct pt_regs { ^ Makefile:3141: recipe for target 'strace-process.o' failed =========================================================== Signed-off-by: Alexandru Ardelean --- .../ocedo-001-workaround-pt_regs-collisions-ppc.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 package/devel/strace/patches/ocedo-001-workaround-pt_regs-collisions-ppc.patch diff --git a/package/devel/strace/patches/ocedo-001-workaround-pt_regs-collisions-ppc.patch b/package/devel/strace/patches/ocedo-001-workaround-pt_regs-collisions-ppc.patch new file mode 100644 index 0000000..3a56003 --- /dev/null +++ b/package/devel/strace/patches/ocedo-001-workaround-pt_regs-collisions-ppc.patch @@ -0,0 +1,15 @@ +diff --git a/ptrace.h b/ptrace.h +index d8af976..f767378 100644 +--- a/ptrace.h ++++ b/ptrace.h +@@ -52,7 +52,10 @@ extern long ptrace(int, int, char *, long); + # define ptrace_peeksiginfo_args XXX_ptrace_peeksiginfo_args + #endif + ++#include ++#define __ASSEMBLY__ + #include ++#undef __ASSEMBLY__ + + #ifdef HAVE_STRUCT_IA64_FPREG + # undef ia64_fpreg -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hkallweit1 at gmail.com Wed Apr 27 14:36:44 2016 From: hkallweit1 at gmail.com (Heiner Kallweit) Date: Wed, 27 Apr 2016 20:36:44 +0200 Subject: [OpenWrt-Devel] [PATCH v3] ar71xx: modernize fast SPI flash read Message-ID: OpenWRT has own support for the memory-mapped fast SPI flash read on ath79. With mainline kernel 4.6/4.7 more elegant generic support for this feature was added upstream consisting of these commits: 556351f14e74 "spi: introduce accelerated read support for spi flash devices" 08922f644878 "mtd: devices: m25p80: add support for mmap read request" 7ba2f2757d84 "spi: core: add hook flash_read_supported to spi_master" The first two commits have been added as patches 045 and 080 under generic/patches-4.4 recently. The third one is added as part of this patch set as generic patch 082. The change was successfully tested on a TP-Link TL-WDR3600. Signed-off-by: Heiner Kallweit --- v2: - make change compatible with ath79_register_m25p80_multi(): >1 flash chip but one can be mmap-accessed only v3: - adjusted commit message - removed content of new generic patches 045 and 080 - added generic patch 082 --- .../460-spi-bitbang-export-spi_bitbang_bufs.patch | 28 ---- .../patches-4.4/460-spi-extend-ath79_spi.patch | 32 ++++ .../461-spi-add-type-field-to-spi_transfer.patch | 23 --- .../461-spi-ath79-fast-flash-read.patch | 56 +++++++ .../462-mtd-m25p80-set-spi-transfer-type.patch | 15 -- .../463-spi-ath79-add-fast-flash-read.patch | 185 --------------------- .../464-spi-ath79-fix-fast-flash-read.patch | 35 ---- .../082-backport-spi-flash-read-supported.patch | 29 ++++ 8 files changed, 117 insertions(+), 286 deletions(-) delete mode 100644 target/linux/ar71xx/patches-4.4/460-spi-bitbang-export-spi_bitbang_bufs.patch create mode 100644 target/linux/ar71xx/patches-4.4/460-spi-extend-ath79_spi.patch delete mode 100644 target/linux/ar71xx/patches-4.4/461-spi-add-type-field-to-spi_transfer.patch create mode 100644 target/linux/ar71xx/patches-4.4/461-spi-ath79-fast-flash-read.patch delete mode 100644 target/linux/ar71xx/patches-4.4/462-mtd-m25p80-set-spi-transfer-type.patch delete mode 100644 target/linux/ar71xx/patches-4.4/463-spi-ath79-add-fast-flash-read.patch delete mode 100644 target/linux/ar71xx/patches-4.4/464-spi-ath79-fix-fast-flash-read.patch create mode 100644 target/linux/generic/patches-4.4/082-backport-spi-flash-read-supported.patch diff --git a/target/linux/ar71xx/patches-4.4/460-spi-bitbang-export-spi_bitbang_bufs.patch b/target/linux/ar71xx/patches-4.4/460-spi-bitbang-export-spi_bitbang_bufs.patch deleted file mode 100644 index 2a8d7af..0000000 --- a/target/linux/ar71xx/patches-4.4/460-spi-bitbang-export-spi_bitbang_bufs.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/drivers/spi/spi-bitbang.c -+++ b/drivers/spi/spi-bitbang.c -@@ -231,13 +231,14 @@ void spi_bitbang_cleanup(struct spi_devi - } - EXPORT_SYMBOL_GPL(spi_bitbang_cleanup); - --static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t) -+int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t) - { - struct spi_bitbang_cs *cs = spi->controller_state; - unsigned nsecs = cs->nsecs; - - return cs->txrx_bufs(spi, cs->txrx_word, nsecs, t); - } -+EXPORT_SYMBOL_GPL(spi_bitbang_bufs); - - /*----------------------------------------------------------------------*/ - ---- a/include/linux/spi/spi_bitbang.h -+++ b/include/linux/spi/spi_bitbang.h -@@ -39,6 +39,7 @@ extern int spi_bitbang_setup(struct spi_ - extern void spi_bitbang_cleanup(struct spi_device *spi); - extern int spi_bitbang_setup_transfer(struct spi_device *spi, - struct spi_transfer *t); -+extern int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t); - - /* start or stop queue processing */ - extern int spi_bitbang_start(struct spi_bitbang *spi); diff --git a/target/linux/ar71xx/patches-4.4/460-spi-extend-ath79_spi.patch b/target/linux/ar71xx/patches-4.4/460-spi-extend-ath79_spi.patch new file mode 100644 index 0000000..312d7be --- /dev/null +++ b/target/linux/ar71xx/patches-4.4/460-spi-extend-ath79_spi.patch @@ -0,0 +1,32 @@ +--- a/drivers/spi/spi-ath79.c ++++ b/drivers/spi/spi-ath79.c +@@ -42,6 +42,9 @@ struct ath79_spi { + void __iomem *base; + struct clk *clk; + unsigned rrw_delay; ++ ++ u32 clk_div; ++ unsigned long ahb_rate; + }; + + static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) +@@ -109,9 +112,6 @@ static void ath79_spi_enable(struct ath79_spi *sp) + /* save CTRL register */ + sp->reg_ctrl = ath79_spi_rr(sp, AR71XX_SPI_REG_CTRL); + sp->ioc_base = ath79_spi_rr(sp, AR71XX_SPI_REG_IOC); +- +- /* TODO: setup speed? */ +- ath79_spi_wr(sp, AR71XX_SPI_REG_CTRL, 0x43); + } + + static void ath79_spi_disable(struct ath79_spi *sp) +@@ -280,7 +280,8 @@ static int ath79_spi_probe(struct platform_device *pdev) + if (ret) + goto err_put_master; + +- rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ); ++ sp->ahb_rate = clk_get_rate(sp->clk); ++ rate = DIV_ROUND_UP(sp->ahb_rate, MHZ); + if (!rate) { + ret = -EINVAL; + goto err_clk_disable; diff --git a/target/linux/ar71xx/patches-4.4/461-spi-add-type-field-to-spi_transfer.patch b/target/linux/ar71xx/patches-4.4/461-spi-add-type-field-to-spi_transfer.patch deleted file mode 100644 index be6233c..0000000 --- a/target/linux/ar71xx/patches-4.4/461-spi-add-type-field-to-spi_transfer.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/include/linux/spi/spi.h -+++ b/include/linux/spi/spi.h -@@ -578,6 +578,12 @@ extern struct spi_master *spi_busnum_to_ - - /*---------------------------------------------------------------------------*/ - -+enum spi_transfer_type { -+ SPI_TRANSFER_GENERIC = 0, -+ SPI_TRANSFER_FLASH_READ_CMD, -+ SPI_TRANSFER_FLASH_READ_DATA, -+}; -+ - /* - * I/O INTERFACE between SPI controller and protocol drivers - * -@@ -698,6 +704,7 @@ struct spi_transfer { - u8 bits_per_word; - u16 delay_usecs; - u32 speed_hz; -+ enum spi_transfer_type type; - - struct list_head transfer_list; - }; diff --git a/target/linux/ar71xx/patches-4.4/461-spi-ath79-fast-flash-read.patch b/target/linux/ar71xx/patches-4.4/461-spi-ath79-fast-flash-read.patch new file mode 100644 index 0000000..ea71fc2 --- /dev/null +++ b/target/linux/ar71xx/patches-4.4/461-spi-ath79-fast-flash-read.patch @@ -0,0 +1,56 @@ +--- a/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h ++++ b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h +@@ -24,6 +24,7 @@ enum ath79_spi_cs_type { + struct ath79_spi_controller_data { + enum ath79_spi_cs_type cs_type; + unsigned cs_line; ++ bool is_flash; + }; + + #endif /* _ATH79_SPI_PLATFORM_H */ +--- a/drivers/spi/spi-ath79.c ++++ b/drivers/spi/spi-ath79.c +@@ -172,6 +172,34 @@ static void ath79_spi_cleanup_cs(struct spi_device *spi) + } + } + ++static int ath79_spi_flash_read(struct spi_device *spi, ++ struct spi_flash_read_message *msg) ++{ ++ struct ath79_spi *sp = ath79_spidev_to_sp(spi); ++ ++ /* disable GPIO mode */ ++ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, 0); ++ ++ memcpy_fromio(msg->buf, sp->base + msg->from, msg->len); ++ ++ /* enable GPIO mode */ ++ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, AR71XX_SPI_FS_GPIO); ++ ++ /* restore IOC register */ ++ ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base); ++ ++ msg->retlen = msg->len; ++ ++ return 0; ++} ++ ++static bool ath79_spi_flash_read_supported(struct spi_device *spi) ++{ ++ struct ath79_spi_controller_data *cdata = spi->controller_data; ++ ++ return cdata->is_flash; ++} ++ + static int ath79_spi_setup(struct spi_device *spi) + { + int status = 0; +@@ -249,6 +277,8 @@ static int ath79_spi_probe(struct platform_device *pdev) + master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); + master->setup = ath79_spi_setup; + master->cleanup = ath79_spi_cleanup; ++ master->spi_flash_read = ath79_spi_flash_read; ++ master->flash_read_supported = ath79_spi_flash_read_supported; + master->bus_num = pdata->bus_num; + master->num_chipselect = pdata->num_chipselect; + diff --git a/target/linux/ar71xx/patches-4.4/462-mtd-m25p80-set-spi-transfer-type.patch b/target/linux/ar71xx/patches-4.4/462-mtd-m25p80-set-spi-transfer-type.patch deleted file mode 100644 index 11bf9ff..0000000 --- a/target/linux/ar71xx/patches-4.4/462-mtd-m25p80-set-spi-transfer-type.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/drivers/mtd/devices/m25p80.c -+++ b/drivers/mtd/devices/m25p80.c -@@ -137,10 +137,12 @@ static int m25p80_read(struct spi_nor *n - flash->command[0] = nor->read_opcode; - m25p_addr2cmd(nor, from, flash->command); - -+ t[0].type = SPI_TRANSFER_FLASH_READ_CMD; - t[0].tx_buf = flash->command; - t[0].len = m25p_cmdsz(nor) + dummy; - spi_message_add_tail(&t[0], &m); - -+ t[1].type = SPI_TRANSFER_FLASH_READ_DATA; - t[1].rx_buf = buf; - t[1].rx_nbits = m25p80_rx_nbits(nor); - t[1].len = len; diff --git a/target/linux/ar71xx/patches-4.4/463-spi-ath79-add-fast-flash-read.patch b/target/linux/ar71xx/patches-4.4/463-spi-ath79-add-fast-flash-read.patch deleted file mode 100644 index 408ce65..0000000 --- a/target/linux/ar71xx/patches-4.4/463-spi-ath79-add-fast-flash-read.patch +++ /dev/null @@ -1,185 +0,0 @@ ---- a/drivers/spi/spi-ath79.c -+++ b/drivers/spi/spi-ath79.c -@@ -35,6 +35,11 @@ - - #define ATH79_SPI_CS_LINE_MAX 2 - -+enum ath79_spi_state { -+ ATH79_SPI_STATE_WAIT_CMD = 0, -+ ATH79_SPI_STATE_WAIT_READ, -+}; -+ - struct ath79_spi { - struct spi_bitbang bitbang; - u32 ioc_base; -@@ -42,6 +47,11 @@ struct ath79_spi { - void __iomem *base; - struct clk *clk; - unsigned rrw_delay; -+ -+ enum ath79_spi_state state; -+ u32 clk_div; -+ unsigned long read_addr; -+ unsigned long ahb_rate; - }; - - static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) -@@ -109,9 +119,6 @@ static void ath79_spi_enable(struct ath7 - /* save CTRL register */ - sp->reg_ctrl = ath79_spi_rr(sp, AR71XX_SPI_REG_CTRL); - sp->ioc_base = ath79_spi_rr(sp, AR71XX_SPI_REG_IOC); -- -- /* TODO: setup speed? */ -- ath79_spi_wr(sp, AR71XX_SPI_REG_CTRL, 0x43); - } - - static void ath79_spi_disable(struct ath79_spi *sp) -@@ -232,6 +239,110 @@ static u32 ath79_spi_txrx_mode0(struct s - return ath79_spi_rr(sp, AR71XX_SPI_REG_RDS); - } - -+static int ath79_spi_do_read_flash_data(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ -+ /* disable GPIO mode */ -+ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, 0); -+ -+ memcpy_fromio(t->rx_buf, sp->base + sp->read_addr, t->len); -+ -+ /* enable GPIO mode */ -+ ath79_spi_wr(sp, AR71XX_SPI_REG_FS, AR71XX_SPI_FS_GPIO); -+ -+ /* restore IOC register */ -+ ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base); -+ -+ return t->len; -+} -+ -+static int ath79_spi_do_read_flash_cmd(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ int len; -+ const u8 *p; -+ -+ sp->read_addr = 0; -+ -+ len = t->len - 1; -+ p = t->tx_buf; -+ -+ while (len--) { -+ p++; -+ sp->read_addr <<= 8; -+ sp->read_addr |= *p; -+ } -+ -+ return t->len; -+} -+ -+static bool ath79_spi_is_read_cmd(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ return t->type == SPI_TRANSFER_FLASH_READ_CMD; -+} -+ -+static bool ath79_spi_is_data_read(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ return t->type == SPI_TRANSFER_FLASH_READ_DATA; -+} -+ -+static int ath79_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ int ret; -+ -+ switch (sp->state) { -+ case ATH79_SPI_STATE_WAIT_CMD: -+ if (ath79_spi_is_read_cmd(spi, t)) { -+ ret = ath79_spi_do_read_flash_cmd(spi, t); -+ sp->state = ATH79_SPI_STATE_WAIT_READ; -+ } else { -+ ret = spi_bitbang_bufs(spi, t); -+ } -+ break; -+ -+ case ATH79_SPI_STATE_WAIT_READ: -+ if (ath79_spi_is_data_read(spi, t)) { -+ ret = ath79_spi_do_read_flash_data(spi, t); -+ } else { -+ dev_warn(&spi->dev, "flash data read expected\n"); -+ ret = -EIO; -+ } -+ sp->state = ATH79_SPI_STATE_WAIT_CMD; -+ break; -+ -+ default: -+ BUG(); -+ } -+ -+ return ret; -+} -+ -+static int ath79_spi_setup_transfer(struct spi_device *spi, -+ struct spi_transfer *t) -+{ -+ struct ath79_spi *sp = ath79_spidev_to_sp(spi); -+ struct ath79_spi_controller_data *cdata; -+ int ret; -+ -+ ret = spi_bitbang_setup_transfer(spi, t); -+ if (ret) -+ return ret; -+ -+ cdata = spi->controller_data; -+ if (cdata->is_flash) -+ sp->bitbang.txrx_bufs = ath79_spi_txrx_bufs; -+ else -+ sp->bitbang.txrx_bufs = spi_bitbang_bufs; -+ -+ return ret; -+} -+ - static int ath79_spi_probe(struct platform_device *pdev) - { - struct spi_master *master; -@@ -254,6 +365,8 @@ static int ath79_spi_probe(struct platfo - sp = spi_master_get_devdata(master); - platform_set_drvdata(pdev, sp); - -+ sp->state = ATH79_SPI_STATE_WAIT_CMD; -+ - master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); - master->setup = ath79_spi_setup; - master->cleanup = ath79_spi_cleanup; -@@ -263,7 +376,7 @@ static int ath79_spi_probe(struct platfo - sp->bitbang.master = master; - sp->bitbang.chipselect = ath79_spi_chipselect; - sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0; -- sp->bitbang.setup_transfer = spi_bitbang_setup_transfer; -+ sp->bitbang.setup_transfer = ath79_spi_setup_transfer; - sp->bitbang.flags = SPI_CS_HIGH; - - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); -@@ -283,7 +396,8 @@ static int ath79_spi_probe(struct platfo - if (ret) - goto err_put_master; - -- rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ); -+ sp->ahb_rate = clk_get_rate(sp->clk); -+ rate = DIV_ROUND_UP(sp->ahb_rate, MHZ); - if (!rate) { - ret = -EINVAL; - goto err_clk_disable; ---- a/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h -+++ b/arch/mips/include/asm/mach-ath79/ath79_spi_platform.h -@@ -24,6 +24,7 @@ enum ath79_spi_cs_type { - struct ath79_spi_controller_data { - enum ath79_spi_cs_type cs_type; - unsigned cs_line; -+ bool is_flash; - }; - - #endif /* _ATH79_SPI_PLATFORM_H */ diff --git a/target/linux/ar71xx/patches-4.4/464-spi-ath79-fix-fast-flash-read.patch b/target/linux/ar71xx/patches-4.4/464-spi-ath79-fix-fast-flash-read.patch deleted file mode 100644 index f8ae4e0..0000000 --- a/target/linux/ar71xx/patches-4.4/464-spi-ath79-fix-fast-flash-read.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/drivers/mtd/devices/m25p80.c -+++ b/drivers/mtd/devices/m25p80.c -@@ -137,6 +137,9 @@ static int m25p80_read(struct spi_nor *n - flash->command[0] = nor->read_opcode; - m25p_addr2cmd(nor, from, flash->command); - -+ if (dummy == 1) -+ t[0].dummy = true; -+ - t[0].type = SPI_TRANSFER_FLASH_READ_CMD; - t[0].tx_buf = flash->command; - t[0].len = m25p_cmdsz(nor) + dummy; ---- a/drivers/spi/spi-ath79.c -+++ b/drivers/spi/spi-ath79.c -@@ -268,6 +268,10 @@ static int ath79_spi_do_read_flash_cmd(s - sp->read_addr = 0; - - len = t->len - 1; -+ -+ if (t->dummy) -+ len -= 1; -+ - p = t->tx_buf; - - while (len--) { ---- a/include/linux/spi/spi.h -+++ b/include/linux/spi/spi.h -@@ -705,6 +705,7 @@ struct spi_transfer { - u16 delay_usecs; - u32 speed_hz; - enum spi_transfer_type type; -+ bool dummy; - - struct list_head transfer_list; - }; diff --git a/target/linux/generic/patches-4.4/082-backport-spi-flash-read-supported.patch b/target/linux/generic/patches-4.4/082-backport-spi-flash-read-supported.patch new file mode 100644 index 0000000..e6bc43a --- /dev/null +++ b/target/linux/generic/patches-4.4/082-backport-spi-flash-read-supported.patch @@ -0,0 +1,29 @@ +--- a/include/linux/spi/spi.h ++++ b/include/linux/spi/spi.h +@@ -372,6 +372,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) + * @unprepare_message: undo any work done by prepare_message(). + * @spi_flash_read: to support spi-controller hardwares that provide + * accelerated interface to read from flash devices. ++ * @flash_read_supported: spi device supports flash read + * @cs_gpios: Array of GPIOs to use as chip select lines; one per CS + * number. Any individual value may be -ENOENT for CS lines that + * are not GPIOs (driven by the SPI controller itself). +@@ -529,6 +530,7 @@ struct spi_master { + struct spi_message *message); + int (*spi_flash_read)(struct spi_device *spi, + struct spi_flash_read_message *msg); ++ bool (*flash_read_supported)(struct spi_device *spi); + + /* + * These hooks are for drivers that use a generic implementation +@@ -1158,7 +1160,9 @@ struct spi_flash_read_message { + /* SPI core interface for flash read support */ + static inline bool spi_flash_read_supported(struct spi_device *spi) + { +- return spi->master->spi_flash_read ? true : false; ++ return spi->master->spi_flash_read && ++ (!spi->master->flash_read_supported || ++ spi->master->flash_read_supported(spi)); + } + + int spi_flash_read(struct spi_device *spi, -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Wed Apr 27 15:55:51 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Wed, 27 Apr 2016 21:55:51 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] lantiq: fix minor typos in 11G/22F phy driver Message-ID: <1461786952-30861-1-git-send-email-openwrt@kresin.me> Signed-off-by: Mathias Kresin --- .../patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch index 191ccf2..738a248 100644 --- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch +++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch @@ -20,7 +20,7 @@ Signed-off-by: John Crispin +config LANTIQ_PHY + tristate "Driver for Lantiq PHYs" + ---help--- -+ Supports the 11G and 22E PHYs. ++ Supports the 11G and 22F PHYs. + config FIXED_PHY tristate "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" @@ -378,7 +378,7 @@ Signed-off-by: John Crispin +========================================= + +Field Bits Type Description -+FBC 7:6 RW Fast Blink Frequency ++FBF 7:6 RW Fast Blink Frequency + --- + 0x0 (00b) F02HZ 2 Hz blinking frequency + 0x1 (01b) F04HZ 4 Hz blinking frequency -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Wed Apr 27 15:55:52 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Wed, 27 Apr 2016 21:55:52 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: use the same functionality for all ethernet phys led In-Reply-To: <1461786952-30861-1-git-send-email-openwrt@kresin.me> References: <1461786952-30861-1-git-send-email-openwrt@kresin.me> Message-ID: <1461786952-30861-2-git-send-email-openwrt@kresin.me> The VGV7510KW22 has the leds for LAN1-3 connected to pin1 of the phys and the led for LAN4 connect to pin0 of the phy. This results with the current configuration in a fast flashing LAN4 led as soon as a network cable is connected. Something similar was reported in the forum[1] for the VGV7519 as well. Since it isn't predicable to which pin a (single) phy led is connected, use the (default) pin1 functionality Constant On: 10/100/1000MBit Blink Fast: None Blink Slow: None Pulse: TX/RX for all ethernet phy leds. After checking pictures of all vr9 boards, it looks like only the VG3503J has more than one led connected per phy. Using the phy led device tree bindings to assign the functionality to the "additional" leds, the VG3503J phy leds should behave as before. Signed-off-by: Mathias Kresin [1] https://forum.openwrt.org/viewtopic.php?pid=321523 --- I know there is a fourth led functionality register (led3h/led3l), but to my knowledge only three pins to connect leds to. Can someone (with access to the datasheets) enlighten me whats the registered is used for? target/linux/lantiq/dts/VG3503J.dtsi | 8 ++++++++ .../0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi index a45e90b..5ee0a5e 100644 --- a/target/linux/lantiq/dts/VG3503J.dtsi +++ b/target/linux/lantiq/dts/VG3503J.dtsi @@ -153,10 +153,18 @@ phy11: ethernet-phy at 11 { reg = <0x11>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; + lantiq,led0h = <0x42> + lantiq,led0l = <0x10> + lantiq,led2h = <0x20> + lantiq,led2l = <0x00> }; phy13: ethernet-phy at 13 { reg = <0x13>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; + lantiq,led0h = <0x42> + lantiq,led0l = <0x10> + lantiq,led2h = <0x20> + lantiq,led2l = <0x00> }; }; }; diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch index 738a248..93bb427 100644 --- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch +++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch @@ -165,14 +165,14 @@ Signed-off-by: John Crispin + + vr9_gphy_mmd_write(phydev, 0x1e0, 0xc5); + vr9_gphy_mmd_write(phydev, 0x1e1, 0x67); -+ vr9_gphy_mmd_write(phydev, 0x1e2, 0x42); -+ vr9_gphy_mmd_write(phydev, 0x1e3, 0x10); ++ vr9_gphy_mmd_write(phydev, 0x1e2, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e3, 0x03); + vr9_gphy_mmd_write(phydev, 0x1e4, 0x70); + vr9_gphy_mmd_write(phydev, 0x1e5, 0x03); -+ vr9_gphy_mmd_write(phydev, 0x1e6, 0x20); -+ vr9_gphy_mmd_write(phydev, 0x1e7, 0x00); -+ vr9_gphy_mmd_write(phydev, 0x1e8, 0x40); -+ vr9_gphy_mmd_write(phydev, 0x1e9, 0x20); ++ vr9_gphy_mmd_write(phydev, 0x1e6, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e7, 0x03); ++ vr9_gphy_mmd_write(phydev, 0x1e8, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e9, 0x03); + + vr9_gphy_of_reg_init(phydev); + -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Wed Apr 27 16:09:44 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Wed, 27 Apr 2016 22:09:44 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/2] lantiq: fix minor typos in 11G/22F phy driver Message-ID: <1461787785-24210-1-git-send-email-openwrt@kresin.me> Signed-off-by: Mathias Kresin --- .../patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch index 191ccf2..738a248 100644 --- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch +++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch @@ -20,7 +20,7 @@ Signed-off-by: John Crispin +config LANTIQ_PHY + tristate "Driver for Lantiq PHYs" + ---help--- -+ Supports the 11G and 22E PHYs. ++ Supports the 11G and 22F PHYs. + config FIXED_PHY tristate "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" @@ -378,7 +378,7 @@ Signed-off-by: John Crispin +========================================= + +Field Bits Type Description -+FBC 7:6 RW Fast Blink Frequency ++FBF 7:6 RW Fast Blink Frequency + --- + 0x0 (00b) F02HZ 2 Hz blinking frequency + 0x1 (01b) F04HZ 4 Hz blinking frequency -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Wed Apr 27 16:09:45 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Wed, 27 Apr 2016 22:09:45 +0200 Subject: [OpenWrt-Devel] [PATCH v2 2/2] lantiq: use the same functionality for all ethernet phys led In-Reply-To: <1461787785-24210-1-git-send-email-openwrt@kresin.me> References: <1461787785-24210-1-git-send-email-openwrt@kresin.me> Message-ID: <1461787785-24210-2-git-send-email-openwrt@kresin.me> The VGV7510KW22 has the leds for LAN1-3 connected to pin1 of the phys and the led for LAN4 connect to pin0 of the phy. This results with the current configuration in a fast flashing LAN4 led as soon as a network cable is connected. Something similar was reported on the forum[1] for the VGV7519 as well. Since it isn't predicable to which pin a (single) phy led is connected, use the (default) pin1 functionality Constant On: 10/100/1000MBit Blink Fast: None Blink Slow: None Pulse: TX/RX for all ethernet phy leds. After checking pictures of all vr9 boards, it looks like only the VG3503J has more than one led connected per phy. Using the phy led device tree bindings to assign the functionality to the "additional" leds, the VG3503J phy leds should behave as before. Signed-off-by: Mathias Kresin [1] https://forum.openwrt.org/viewtopic.php?pid=321523 --- Changes in v2: - fix syntax error in VG3503J.dtsi I know there is a fourth led functionality register (led3h/led3l), but to my knowledge only three pins to connect leds to. Can someone (with access to the datasheets) enlighten me what's the register is used for? --- target/linux/lantiq/dts/VG3503J.dtsi | 8 ++++++++ .../0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi index a45e90b..780d838 100644 --- a/target/linux/lantiq/dts/VG3503J.dtsi +++ b/target/linux/lantiq/dts/VG3503J.dtsi @@ -153,10 +153,18 @@ phy11: ethernet-phy at 11 { reg = <0x11>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; + lantiq,led0h = <0x42>; + lantiq,led0l = <0x10>; + lantiq,led2h = <0x20>; + lantiq,led2l = <0x00>; }; phy13: ethernet-phy at 13 { reg = <0x13>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; + lantiq,led0h = <0x42>; + lantiq,led0l = <0x10>; + lantiq,led2h = <0x20>; + lantiq,led2l = <0x00>; }; }; }; diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch index 738a248..93bb427 100644 --- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch +++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch @@ -165,14 +165,14 @@ Signed-off-by: John Crispin + + vr9_gphy_mmd_write(phydev, 0x1e0, 0xc5); + vr9_gphy_mmd_write(phydev, 0x1e1, 0x67); -+ vr9_gphy_mmd_write(phydev, 0x1e2, 0x42); -+ vr9_gphy_mmd_write(phydev, 0x1e3, 0x10); ++ vr9_gphy_mmd_write(phydev, 0x1e2, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e3, 0x03); + vr9_gphy_mmd_write(phydev, 0x1e4, 0x70); + vr9_gphy_mmd_write(phydev, 0x1e5, 0x03); -+ vr9_gphy_mmd_write(phydev, 0x1e6, 0x20); -+ vr9_gphy_mmd_write(phydev, 0x1e7, 0x00); -+ vr9_gphy_mmd_write(phydev, 0x1e8, 0x40); -+ vr9_gphy_mmd_write(phydev, 0x1e9, 0x20); ++ vr9_gphy_mmd_write(phydev, 0x1e6, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e7, 0x03); ++ vr9_gphy_mmd_write(phydev, 0x1e8, 0x70); ++ vr9_gphy_mmd_write(phydev, 0x1e9, 0x03); + + vr9_gphy_of_reg_init(phydev); + -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Wed Apr 27 16:18:50 2016 From: blogic at openwrt.org (John Crispin) Date: Wed, 27 Apr 2016 22:18:50 +0200 Subject: [OpenWrt-Devel] [PATCH v2 2/2] lantiq: use the same functionality for all ethernet phys led In-Reply-To: <1461787785-24210-2-git-send-email-openwrt@kresin.me> References: <1461787785-24210-1-git-send-email-openwrt@kresin.me> <1461787785-24210-2-git-send-email-openwrt@kresin.me> Message-ID: <1d0a55b4-8766-846e-726d-12dc2739c2f8@openwrt.org> On 27/04/2016 22:09, Mathias Kresin wrote: > The VGV7510KW22 has the leds for LAN1-3 connected to pin1 of the phys > and the led for LAN4 connect to pin0 of the phy. This results with the > current configuration in a fast flashing LAN4 led as soon as a network > cable is connected. Something similar was reported on the forum[1] for > the VGV7519 as well. > > Since it isn't predicable to which pin a (single) phy led is connected, > use the (default) pin1 functionality > > Constant On: 10/100/1000MBit > Blink Fast: None > Blink Slow: None > Pulse: TX/RX > > for all ethernet phy leds. > > After checking pictures of all vr9 boards, it looks like only the VG3503J > has more than one led connected per phy. Using the phy led device tree > bindings to assign the functionality to the "additional" leds, the > VG3503J phy leds should behave as before. > > Signed-off-by: Mathias Kresin > > [1] https://forum.openwrt.org/viewtopic.php?pid=321523 > --- > > Changes in v2: > - fix syntax error in VG3503J.dtsi > > I know there is a fourth led functionality register (led3h/led3l), but to > my knowledge only three pins to connect leds to. Can someone (with access > to the datasheets) enlighten me what's the register is used for? led3h/l are identical to led2h/l but for pin 3 John > --- > target/linux/lantiq/dts/VG3503J.dtsi | 8 ++++++++ > .../0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch | 12 ++++++------ > 2 files changed, 14 insertions(+), 6 deletions(-) > > diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi > index a45e90b..780d838 100644 > --- a/target/linux/lantiq/dts/VG3503J.dtsi > +++ b/target/linux/lantiq/dts/VG3503J.dtsi > @@ -153,10 +153,18 @@ > phy11: ethernet-phy at 11 { > reg = <0x11>; > compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; > + lantiq,led0h = <0x42>; > + lantiq,led0l = <0x10>; > + lantiq,led2h = <0x20>; > + lantiq,led2l = <0x00>; > }; > phy13: ethernet-phy at 13 { > reg = <0x13>; > compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; > + lantiq,led0h = <0x42>; > + lantiq,led0l = <0x10>; > + lantiq,led2h = <0x20>; > + lantiq,led2l = <0x00>; > }; > }; > }; > diff --git a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch > index 738a248..93bb427 100644 > --- a/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch > +++ b/target/linux/lantiq/patches-4.4/0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch > @@ -165,14 +165,14 @@ Signed-off-by: John Crispin > + > + vr9_gphy_mmd_write(phydev, 0x1e0, 0xc5); > + vr9_gphy_mmd_write(phydev, 0x1e1, 0x67); > -+ vr9_gphy_mmd_write(phydev, 0x1e2, 0x42); > -+ vr9_gphy_mmd_write(phydev, 0x1e3, 0x10); > ++ vr9_gphy_mmd_write(phydev, 0x1e2, 0x70); > ++ vr9_gphy_mmd_write(phydev, 0x1e3, 0x03); > + vr9_gphy_mmd_write(phydev, 0x1e4, 0x70); > + vr9_gphy_mmd_write(phydev, 0x1e5, 0x03); > -+ vr9_gphy_mmd_write(phydev, 0x1e6, 0x20); > -+ vr9_gphy_mmd_write(phydev, 0x1e7, 0x00); > -+ vr9_gphy_mmd_write(phydev, 0x1e8, 0x40); > -+ vr9_gphy_mmd_write(phydev, 0x1e9, 0x20); > ++ vr9_gphy_mmd_write(phydev, 0x1e6, 0x70); > ++ vr9_gphy_mmd_write(phydev, 0x1e7, 0x03); > ++ vr9_gphy_mmd_write(phydev, 0x1e8, 0x70); > ++ vr9_gphy_mmd_write(phydev, 0x1e9, 0x03); > + > + vr9_gphy_of_reg_init(phydev); > + > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Wed Apr 27 19:15:06 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Thu, 28 Apr 2016 01:15:06 +0200 Subject: [OpenWrt-Devel] [PATCH] base-files: evalute uci-defaults on run-time installations Message-ID: <20160427231500.GA20766@makrotopia.org> Packages may install scripts into /etc/uci-defaults to be executed once after installation, usually at the first boot of the target. This works fine if the package was installed to the rootfs during build or using the ImageBuilder. If the package is installed using opkg during run-time uci-defaults were applied only after a reboot of the device. Avoid the need to reboot by evaluting the package's uci-defaults in default_postinst. Signed-off-by: Daniel Golle --- package/base-files/files/lib/functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index dde1ac4..079ada4 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -214,6 +214,11 @@ default_postinst() { ret=$? fi + [ -n "$root" ] || for i in $(grep -s "^/etc/uci-defaults/" "$root/usr/lib/opkg/info/${pkgname}.list"); do + ( . "$root/$i" ) + rm "$root/$i" + done + [ -n "$root" ] || rm -f /tmp/luci-indexcache 2>/dev/null if [ "$PKG_UPGRADE" != "1" ]; then -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Wed Apr 27 19:37:59 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Thu, 28 Apr 2016 01:37:59 +0200 Subject: [OpenWrt-Devel] [PATCH v2] base-files: evalute uci-defaults on run-time installations In-Reply-To: <20160427231500.GA20766@makrotopia.org> References: <20160427231500.GA20766@makrotopia.org> Message-ID: <20160427233755.GA21020@makrotopia.org> Packages may install scripts into /etc/uci-defaults to be executed once after installation, usually at the first boot of the target. This works fine if the package was installed to the rootfs during build or using the ImageBuilder. If the package is installed using opkg during run-time uci-defaults were applied only after a reboot of the device. Avoid the need to reboot by evaluting the package's uci-defaults in default-postinst. Signed-off-by: Daniel Golle --- v2: remove superflus expansions of always-empty variable package/base-files/files/lib/functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index dde1ac4..7db703f 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -214,6 +214,11 @@ default_postinst() { ret=$? fi + [ -n "$root" ] || for i in $(grep -s "^/etc/uci-defaults/" "$root/usr/lib/opkg/info/${pkgname}.list"); do + ( . "$i" ) + rm "$i" + done + [ -n "$root" ] || rm -f /tmp/luci-indexcache 2>/dev/null if [ "$PKG_UPGRADE" != "1" ]; then -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Wed Apr 27 20:17:10 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Thu, 28 Apr 2016 02:17:10 +0200 Subject: [OpenWrt-Devel] [PATCH v3] base-files: evaluate uci-defaults on run-time installations In-Reply-To: <20160427233755.GA21020@makrotopia.org> References: <20160427233755.GA21020@makrotopia.org> Message-ID: <20160428001704.GA26848@makrotopia.org> Packages may install scripts into /etc/uci-defaults to be executed once after installation, usually at the first boot of the target. This works fine if the package was installed onto the rootfs during build or using the ImageBuilder. If the package is installed using opkg during run-time uci-defaults were applied only after a reboot of the device. Avoid the need to reboot by evaluating the package's uci-defaults in default-postinst. Signed-off-by: Daniel Golle --- v2: remove superflus expansions of always-empty variable v3: fix typo in patch description, sorry for the noise... package/base-files/files/lib/functions.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index dde1ac4..7db703f 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -214,6 +214,11 @@ default_postinst() { ret=$? fi + [ -n "$root" ] || for i in $(grep -s "^/etc/uci-defaults/" "$root/usr/lib/opkg/info/${pkgname}.list"); do + ( . "$i" ) + rm "$i" + done + [ -n "$root" ] || rm -f /tmp/luci-indexcache 2>/dev/null if [ "$PKG_UPGRADE" != "1" ]; then -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hannu.nyman at iki.fi Thu Apr 28 02:43:44 2016 From: hannu.nyman at iki.fi (Hannu Nyman) Date: Thu, 28 Apr 2016 09:43:44 +0300 Subject: [OpenWrt-Devel] [PATCH v3] base-files: evaluate uci-defaults on run-time installations In-Reply-To: <20160428001704.GA26848@makrotopia.org> References: <20160428001704.GA26848@makrotopia.org> Message-ID: I did not try to think through if this would be the correct thing to do for all packages, but the basic change seems reasonable. Having the uci-defaults run postponed to the reboot is annoying in some cases. However, your patch seems to break the basic characteristics of an uci-defaults script: The script should be deleted only after being run successfully. I think that your patch always deletes the script file, even if it fails. + ( . "$i" ) + rm "$i" The original uci-defaults run code deletes the file only after evaluating the return value: https://dev.openwrt.org/browser/trunk/package/base-files/files/etc/init.d/boot#L15 ( . "./$(basename $file)" ) && rm -f "$file" _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Thu Apr 28 05:18:56 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Thu, 28 Apr 2016 11:18:56 +0200 Subject: [OpenWrt-Devel] [PATCH] xtables-addons: Fix Lua packet script implementation Message-ID: <1461835136-24929-1-git-send-email-dedeckeh@gmail.com> lua_packet_segment parameter start has type char pointer; in function lua_tg it's assigned an uint16 value generating compiler warnings obviously indicating posssible seg fault problems. Fix the issue by using the correct skb functions so the parameter points to the position inside the sk_buff Signed-off-by: Hans Dedecker Signed-off-by: Stijn Cleynhens --- .../xtables-addons/patches/201-fix-lua-packetscript.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch b/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch index 06a4a17..ebc952b 100644 --- a/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch +++ b/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch @@ -13,6 +13,21 @@ { uint32_t verdict; lua_packet_segment *p; +@@ -88,11 +88,11 @@ lua_tg(struct sk_buff *pskb, const struc + /* push the lua_packet_segment as a parameter */ + p = (lua_packet_segment *)lua_newuserdata(L, sizeof(lua_packet_segment)); + if (pskb->mac_header) +- p->start = pskb->mac_header; ++ p->start = skb_mac_header(pskb); + else if (pskb->network_header) +- p->start = pskb->network_header; ++ p->start = skb_network_header(pskb); + else if (pskb->transport_header) +- p->start = pskb->transport_header; ++ p->start = skb_transport_header(pskb); + p->offset = 0; + p->length = (unsigned long)pskb->tail - (unsigned long)p->start; + p->changes = NULL; @@ -208,16 +208,16 @@ static bool load_script_into_state(uint3 * some workqueue initialization. So far this is done each time this function * is called, subject to change. -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Thu Apr 28 05:49:28 2016 From: tochiro.srchack at gmail.com (YuheiOKAWA) Date: Thu, 28 Apr 2016 18:49:28 +0900 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex MZK-EX750NP. Message-ID: <1461836968-25416-1-git-send-email-tochiro.srchack@gmail.com> add support for Planex MZK-EX750NP. MZK-EX750NP is MT7620A and MT7610E based 11ac wifi repeater. Built-in power supply. 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. Signed-off-by: YuheiOKAWA --- target/linux/ramips/base-files/etc/board.d/01_leds | 4 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/etc/diag.sh | 3 +- target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MZK-EX750NP.dts | 150 +++++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 2 + target/linux/ramips/mt7620/profiles/planex.mk | 11 ++ 8 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/dts/MZK-EX750NP.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index aeaab33..47e1e6a 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -206,6 +206,10 @@ mr-102n) set_wifi_led "$board:green:wlan" set_usb_led "$board:green:usb" ;; +mzk-ex750np) + ucidef_set_led_default "power" "power" "$board:red:power" "1" + set_wifi_led "$board:red:wifi" + ;; na930) set_usb_led "$board:blue:status" ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index c6c740f..ee690f6 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -165,6 +165,7 @@ ramips_setup_interfaces() d105|\ hpm|\ mzk-ex300np|\ + mzk-ex750np|\ na930|\ wli-tx4-ag300n|\ wrh-300cr) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 20ff8ff..c638d16 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -41,7 +41,8 @@ get_status_led() { hlk-rm04|\ jhr-n825r|\ mpr-a1|\ - mpr-a2) + mpr-a2|\ + mzk-ex750np) status_led="$board:red:power" ;; ai-br100|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 2c669c5..0ac0f68 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -298,6 +298,9 @@ ramips_board_detect() { *"MZK-EX300NP") name="mzk-ex300np" ;; + *"MZK-EX750NP") + name="mzk-ex750np" + ;; *"MZK-W300NH2"*) name="mzk-w300nh2" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 2b24030..86ea4a3 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -90,6 +90,7 @@ platform_check_image() { mzk-750dhp|\ mzk-dp150n|\ mzk-ex300np|\ + mzk-ex750np|\ mzk-w300nh2|\ mzk-wdpr|\ nbg-419n|\ diff --git a/target/linux/ramips/dts/MZK-EX750NP.dts b/target/linux/ramips/dts/MZK-EX750NP.dts new file mode 100644 index 0000000..9b5b418 --- /dev/null +++ b/target/linux/ramips/dts/MZK-EX750NP.dts @@ -0,0 +1,150 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "ralink,mt7620a-soc"; + model = "Planex MZK-EX750NP"; + + palmbus at 10000000 { + gpio2: gpio at 660 { + status = "okay"; + }; + + gpio3: gpio at 688 { + status = "okay"; + }; + + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0 0>; + linux,modalias = "m25p80", "w25q64"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x730000>; + }; + + partition at 780000 { + label = "Udata"; + reg = <0x780000 0x80000>; + }; + }; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "uartf", "nd_sd", "rgmii2", "wled"; + ralink,function = "gpio"; + }; + }; + }; + + ethernet at 10100000 { + pinctrl-names = "default"; + pinctrl-0 = <&ephy_pins>; + mtd-mac-address = <&factory 0x4>; + mediatek,portmap = "llllw"; + }; + + wmac at 10180000 { + ralink,mtd-eeprom = <&factory 0>; + }; + + pcie at 10140000 { + status = "okay"; + + pcie-bridge { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + power { + label = "mzk-ex750np:red:power"; + gpios = <&gpio0 14 1>; + }; + + wifi { + label = "mzk-ex750np:red:wifi"; + gpios = <&gpio3 0 1>; + }; + + wps { + label = "mzk-ex750np:green:wps"; + gpios = <&gpio0 10 1>; + }; + + rep { + label = "mzk-ex750np:blue:rep"; + gpios = <&gpio2 16 1>; + }; + + wifi1 { + label = "mzk-ex750np:blue:wifi1"; + gpios = <&gpio2 19 1>; + }; + + wifi2 { + label = "mzk-ex750np:blue:wifi2"; + gpios = <&gpio2 18 1>; + }; + + wifi3 { + label = "mzk-ex750np:blue:wifi3"; + gpios = <&gpio2 17 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 9 1>; + linux,code = <0x198>; + }; + + wps { + label = "wps"; + gpios = <&gpio0 13 0>; + linux,code = <0x211>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 35cb46a..09c0ec2 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -102,6 +102,7 @@ Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930 Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) Image/Build/Profile/MZK-EX300NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) +Image/Build/Profile/MZK-EX750NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex750np,MZK-EX750NP) Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) Image/Build/Profile/HC5761=$(call BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) Image/Build/Profile/HC5861=$(call BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) @@ -149,6 +150,7 @@ define Image/Build/Profile/Default $(call Image/Build/Profile/DB-WRT01,$(1)) $(call Image/Build/Profile/MZK-750DHP,$(1)) $(call Image/Build/Profile/MZK-EX300NP,$(1)) + $(call Image/Build/Profile/MZK-EX750NP,$(1)) $(call Image/Build/Profile/NA930,$(1)) $(call Image/Build/Profile/HC5661,$(1)) $(call Image/Build/Profile/HC5761,$(1)) diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk index 157cf8d..f461aeb 100644 --- a/target/linux/ramips/mt7620/profiles/planex.mk +++ b/target/linux/ramips/mt7620/profiles/planex.mk @@ -39,3 +39,14 @@ define Profile/MZK-EX300NP/Description Package set optimized for the Planex MZK-EX300NP. endef $(eval $(call Profile,MZK-EX300NP)) + + +define Profile/MZK-EX750NP + NAME:=Planex MZK-EX750NP + PACKAGES:= kmod-mt76 kmod-mt7610e +endef + +define Profile/MZK-EX750NP/Description + Package set optimized for the Planex MZK-EX750NP. +endef +$(eval $(call Profile,MZK-EX750NP)) -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From pepe2k at gmail.com Thu Apr 28 06:24:05 2016 From: pepe2k at gmail.com (Piotr Dymacz) Date: Thu, 28 Apr 2016 12:24:05 +0200 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex MZK-EX750NP. In-Reply-To: <1461836968-25416-1-git-send-email-tochiro.srchack@gmail.com> References: <1461836968-25416-1-git-send-email-tochiro.srchack@gmail.com> Message-ID: Hello YuheiOKAWA, Just small question. How the user can access the device if it doesn't have Ethernet and the WiFi is disabled by default in OpenWrt? Cheers, Piotr 2016-04-28 11:49 GMT+02:00 YuheiOKAWA : > add support for Planex MZK-EX750NP. > MZK-EX750NP is MT7620A and MT7610E based 11ac wifi repeater. > Built-in power supply. > 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. > > Signed-off-by: YuheiOKAWA > --- > target/linux/ramips/base-files/etc/board.d/01_leds | 4 + > .../linux/ramips/base-files/etc/board.d/02_network | 1 + > target/linux/ramips/base-files/etc/diag.sh | 3 +- > target/linux/ramips/base-files/lib/ramips.sh | 3 + > .../ramips/base-files/lib/upgrade/platform.sh | 1 + > target/linux/ramips/dts/MZK-EX750NP.dts | 150 +++++++++++++++++++++ > target/linux/ramips/image/mt7620.mk | 2 + > target/linux/ramips/mt7620/profiles/planex.mk | 11 ++ > 8 files changed, 174 insertions(+), 1 deletion(-) > create mode 100644 target/linux/ramips/dts/MZK-EX750NP.dts > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds > index aeaab33..47e1e6a 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -206,6 +206,10 @@ mr-102n) > set_wifi_led "$board:green:wlan" > set_usb_led "$board:green:usb" > ;; > +mzk-ex750np) > + ucidef_set_led_default "power" "power" "$board:red:power" "1" > + set_wifi_led "$board:red:wifi" > + ;; > na930) > set_usb_led "$board:blue:status" > ;; > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network > index c6c740f..ee690f6 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -165,6 +165,7 @@ ramips_setup_interfaces() > d105|\ > hpm|\ > mzk-ex300np|\ > + mzk-ex750np|\ > na930|\ > wli-tx4-ag300n|\ > wrh-300cr) > diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh > index 20ff8ff..c638d16 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -41,7 +41,8 @@ get_status_led() { > hlk-rm04|\ > jhr-n825r|\ > mpr-a1|\ > - mpr-a2) > + mpr-a2|\ > + mzk-ex750np) > status_led="$board:red:power" > ;; > ai-br100|\ > diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh > index 2c669c5..0ac0f68 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -298,6 +298,9 @@ ramips_board_detect() { > *"MZK-EX300NP") > name="mzk-ex300np" > ;; > + *"MZK-EX750NP") > + name="mzk-ex750np" > + ;; > *"MZK-W300NH2"*) > name="mzk-w300nh2" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index 2b24030..86ea4a3 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -90,6 +90,7 @@ platform_check_image() { > mzk-750dhp|\ > mzk-dp150n|\ > mzk-ex300np|\ > + mzk-ex750np|\ > mzk-w300nh2|\ > mzk-wdpr|\ > nbg-419n|\ > diff --git a/target/linux/ramips/dts/MZK-EX750NP.dts b/target/linux/ramips/dts/MZK-EX750NP.dts > new file mode 100644 > index 0000000..9b5b418 > --- /dev/null > +++ b/target/linux/ramips/dts/MZK-EX750NP.dts > @@ -0,0 +1,150 @@ > +/dts-v1/; > + > +/include/ "mt7620a.dtsi" > + > +/ { > + compatible = "ralink,mt7620a-soc"; > + model = "Planex MZK-EX750NP"; > + > + palmbus at 10000000 { > + gpio2: gpio at 660 { > + status = "okay"; > + }; > + > + gpio3: gpio at 688 { > + status = "okay"; > + }; > + > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "jedec,spi-nor"; > + reg = <0 0>; > + linux,modalias = "m25p80", "w25q64"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + read-only; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x730000>; > + }; > + > + partition at 780000 { > + label = "Udata"; > + reg = <0x780000 0x80000>; > + }; > + }; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "uartf", "nd_sd", "rgmii2", "wled"; > + ralink,function = "gpio"; > + }; > + }; > + }; > + > + ethernet at 10100000 { > + pinctrl-names = "default"; > + pinctrl-0 = <&ephy_pins>; > + mtd-mac-address = <&factory 0x4>; > + mediatek,portmap = "llllw"; > + }; > + > + wmac at 10180000 { > + ralink,mtd-eeprom = <&factory 0>; > + }; > + > + pcie at 10140000 { > + status = "okay"; > + > + pcie-bridge { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + power { > + label = "mzk-ex750np:red:power"; > + gpios = <&gpio0 14 1>; > + }; > + > + wifi { > + label = "mzk-ex750np:red:wifi"; > + gpios = <&gpio3 0 1>; > + }; > + > + wps { > + label = "mzk-ex750np:green:wps"; > + gpios = <&gpio0 10 1>; > + }; > + > + rep { > + label = "mzk-ex750np:blue:rep"; > + gpios = <&gpio2 16 1>; > + }; > + > + wifi1 { > + label = "mzk-ex750np:blue:wifi1"; > + gpios = <&gpio2 19 1>; > + }; > + > + wifi2 { > + label = "mzk-ex750np:blue:wifi2"; > + gpios = <&gpio2 18 1>; > + }; > + > + wifi3 { > + label = "mzk-ex750np:blue:wifi3"; > + gpios = <&gpio2 17 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + > + reset { > + label = "reset"; > + gpios = <&gpio0 9 1>; > + linux,code = <0x198>; > + }; > + > + wps { > + label = "wps"; > + gpios = <&gpio0 13 0>; > + linux,code = <0x211>; > + }; > + }; > +}; > diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk > index 35cb46a..09c0ec2 100644 > --- a/target/linux/ramips/image/mt7620.mk > +++ b/target/linux/ramips/image/mt7620.mk > @@ -102,6 +102,7 @@ Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930 > Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) > Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) > Image/Build/Profile/MZK-EX300NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) > +Image/Build/Profile/MZK-EX750NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex750np,MZK-EX750NP) > Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) > Image/Build/Profile/HC5761=$(call BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) > Image/Build/Profile/HC5861=$(call BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) > @@ -149,6 +150,7 @@ define Image/Build/Profile/Default > $(call Image/Build/Profile/DB-WRT01,$(1)) > $(call Image/Build/Profile/MZK-750DHP,$(1)) > $(call Image/Build/Profile/MZK-EX300NP,$(1)) > + $(call Image/Build/Profile/MZK-EX750NP,$(1)) > $(call Image/Build/Profile/NA930,$(1)) > $(call Image/Build/Profile/HC5661,$(1)) > $(call Image/Build/Profile/HC5761,$(1)) > diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk > index 157cf8d..f461aeb 100644 > --- a/target/linux/ramips/mt7620/profiles/planex.mk > +++ b/target/linux/ramips/mt7620/profiles/planex.mk > @@ -39,3 +39,14 @@ define Profile/MZK-EX300NP/Description > Package set optimized for the Planex MZK-EX300NP. > endef > $(eval $(call Profile,MZK-EX300NP)) > + > + > +define Profile/MZK-EX750NP > + NAME:=Planex MZK-EX750NP > + PACKAGES:= kmod-mt76 kmod-mt7610e > +endef > + > +define Profile/MZK-EX750NP/Description > + Package set optimized for the Planex MZK-EX750NP. > +endef > +$(eval $(call Profile,MZK-EX750NP)) > -- > 1.9.1 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Thu Apr 28 06:26:13 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Thu, 28 Apr 2016 12:26:13 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/6] netifd: Make sending DHCP release configurable via uci when client exits In-Reply-To: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> References: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> Message-ID: <8468c595-b4b1-e24e-44a4-ac8afdbb080e@openwrt.org> Hi, I assume this one supersedes "netifd: Send DHCP release when client exits" ? Asking because I see no deletion of the "-R" option which would be introduced by the other patch. If this is the case can you slightly reword it to "Add configurable DHCP release behaviour" or something? Sorry for the nitpicking, otherwise it is fine. ~ Jo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Thu Apr 28 06:29:52 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Thu, 28 Apr 2016 12:29:52 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/6] netifd: Make sending DHCP release configurable via uci when client exits In-Reply-To: <8468c595-b4b1-e24e-44a4-ac8afdbb080e@openwrt.org> References: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> <8468c595-b4b1-e24e-44a4-ac8afdbb080e@openwrt.org> Message-ID: On Thu, Apr 28, 2016 at 12:26 PM, Jo-Philipp Wich wrote: > Hi, > > I assume this one supersedes "netifd: Send DHCP release when client > exits" ? > Correct > > Asking because I see no deletion of the "-R" option which would be > introduced by the other patch. > > If this is the case can you slightly reword it to "Add configurable DHCP > release behaviour" or something? > OK will do Hans > > Sorry for the nitpicking, otherwise it is fine. > > ~ Jo > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From tochiro.srchack at gmail.com Thu Apr 28 06:47:50 2016 From: tochiro.srchack at gmail.com (=?UTF-8?Q?=ef=bc=a0SRCHACK.ORG?=) Date: Thu, 28 Apr 2016 19:47:50 +0900 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex MZK-EX750NP. In-Reply-To: References: <1461836968-25416-1-git-send-email-tochiro.srchack@gmail.com> Message-ID: Hi, Dear Piotr. Status quo, is the only way there is access in the UART. Looking for a good way. I'm thinking. On 2016/04/28 19:24, Piotr Dymacz wrote: > Hello YuheiOKAWA, > > Just small question. > How the user can access the device if it doesn't have Ethernet and the > WiFi is disabled by default in OpenWrt? > > Cheers, > Piotr > > > 2016-04-28 11:49 GMT+02:00 YuheiOKAWA : >> add support for Planex MZK-EX750NP. >> MZK-EX750NP is MT7620A and MT7610E based 11ac wifi repeater. >> Built-in power supply. >> 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. >> >> Signed-off-by: YuheiOKAWA >> --- >> target/linux/ramips/base-files/etc/board.d/01_leds | 4 + >> .../linux/ramips/base-files/etc/board.d/02_network | 1 + >> target/linux/ramips/base-files/etc/diag.sh | 3 +- >> target/linux/ramips/base-files/lib/ramips.sh | 3 + >> .../ramips/base-files/lib/upgrade/platform.sh | 1 + >> target/linux/ramips/dts/MZK-EX750NP.dts | 150 +++++++++++++++++++++ >> target/linux/ramips/image/mt7620.mk | 2 + >> target/linux/ramips/mt7620/profiles/planex.mk | 11 ++ >> 8 files changed, 174 insertions(+), 1 deletion(-) >> create mode 100644 target/linux/ramips/dts/MZK-EX750NP.dts >> >> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds >> index aeaab33..47e1e6a 100755 >> --- a/target/linux/ramips/base-files/etc/board.d/01_leds >> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds >> @@ -206,6 +206,10 @@ mr-102n) >> set_wifi_led "$board:green:wlan" >> set_usb_led "$board:green:usb" >> ;; >> +mzk-ex750np) >> + ucidef_set_led_default "power" "power" "$board:red:power" "1" >> + set_wifi_led "$board:red:wifi" >> + ;; >> na930) >> set_usb_led "$board:blue:status" >> ;; >> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network >> index c6c740f..ee690f6 100755 >> --- a/target/linux/ramips/base-files/etc/board.d/02_network >> +++ b/target/linux/ramips/base-files/etc/board.d/02_network >> @@ -165,6 +165,7 @@ ramips_setup_interfaces() >> d105|\ >> hpm|\ >> mzk-ex300np|\ >> + mzk-ex750np|\ >> na930|\ >> wli-tx4-ag300n|\ >> wrh-300cr) >> diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh >> index 20ff8ff..c638d16 100644 >> --- a/target/linux/ramips/base-files/etc/diag.sh >> +++ b/target/linux/ramips/base-files/etc/diag.sh >> @@ -41,7 +41,8 @@ get_status_led() { >> hlk-rm04|\ >> jhr-n825r|\ >> mpr-a1|\ >> - mpr-a2) >> + mpr-a2|\ >> + mzk-ex750np) >> status_led="$board:red:power" >> ;; >> ai-br100|\ >> diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh >> index 2c669c5..0ac0f68 100755 >> --- a/target/linux/ramips/base-files/lib/ramips.sh >> +++ b/target/linux/ramips/base-files/lib/ramips.sh >> @@ -298,6 +298,9 @@ ramips_board_detect() { >> *"MZK-EX300NP") >> name="mzk-ex300np" >> ;; >> + *"MZK-EX750NP") >> + name="mzk-ex750np" >> + ;; >> *"MZK-W300NH2"*) >> name="mzk-w300nh2" >> ;; >> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh >> index 2b24030..86ea4a3 100755 >> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh >> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh >> @@ -90,6 +90,7 @@ platform_check_image() { >> mzk-750dhp|\ >> mzk-dp150n|\ >> mzk-ex300np|\ >> + mzk-ex750np|\ >> mzk-w300nh2|\ >> mzk-wdpr|\ >> nbg-419n|\ >> diff --git a/target/linux/ramips/dts/MZK-EX750NP.dts b/target/linux/ramips/dts/MZK-EX750NP.dts >> new file mode 100644 >> index 0000000..9b5b418 >> --- /dev/null >> +++ b/target/linux/ramips/dts/MZK-EX750NP.dts >> @@ -0,0 +1,150 @@ >> +/dts-v1/; >> + >> +/include/ "mt7620a.dtsi" >> + >> +/ { >> + compatible = "ralink,mt7620a-soc"; >> + model = "Planex MZK-EX750NP"; >> + >> + palmbus at 10000000 { >> + gpio2: gpio at 660 { >> + status = "okay"; >> + }; >> + >> + gpio3: gpio at 688 { >> + status = "okay"; >> + }; >> + >> + spi at b00 { >> + status = "okay"; >> + >> + m25p80 at 0 { >> + #address-cells = <1>; >> + #size-cells = <1>; >> + compatible = "jedec,spi-nor"; >> + reg = <0 0>; >> + linux,modalias = "m25p80", "w25q64"; >> + spi-max-frequency = <10000000>; >> + >> + partition at 0 { >> + label = "u-boot"; >> + reg = <0x0 0x30000>; >> + read-only; >> + }; >> + >> + partition at 30000 { >> + label = "u-boot-env"; >> + reg = <0x30000 0x10000>; >> + read-only; >> + }; >> + >> + factory: partition at 40000 { >> + label = "factory"; >> + reg = <0x40000 0x10000>; >> + read-only; >> + }; >> + >> + partition at 50000 { >> + label = "firmware"; >> + reg = <0x50000 0x730000>; >> + }; >> + >> + partition at 780000 { >> + label = "Udata"; >> + reg = <0x780000 0x80000>; >> + }; >> + }; >> + }; >> + }; >> + >> + pinctrl { >> + state_default: pinctrl0 { >> + gpio { >> + ralink,group = "uartf", "nd_sd", "rgmii2", "wled"; >> + ralink,function = "gpio"; >> + }; >> + }; >> + }; >> + >> + ethernet at 10100000 { >> + pinctrl-names = "default"; >> + pinctrl-0 = <&ephy_pins>; >> + mtd-mac-address = <&factory 0x4>; >> + mediatek,portmap = "llllw"; >> + }; >> + >> + wmac at 10180000 { >> + ralink,mtd-eeprom = <&factory 0>; >> + }; >> + >> + pcie at 10140000 { >> + status = "okay"; >> + >> + pcie-bridge { >> + mt76 at 0,0 { >> + reg = <0x0000 0 0 0 0>; >> + device_type = "pci"; >> + mediatek,mtd-eeprom = <&factory 0x8000>; >> + mediatek,2ghz = <0>; >> + }; >> + }; >> + }; >> + >> + gpio-leds { >> + compatible = "gpio-leds"; >> + >> + power { >> + label = "mzk-ex750np:red:power"; >> + gpios = <&gpio0 14 1>; >> + }; >> + >> + wifi { >> + label = "mzk-ex750np:red:wifi"; >> + gpios = <&gpio3 0 1>; >> + }; >> + >> + wps { >> + label = "mzk-ex750np:green:wps"; >> + gpios = <&gpio0 10 1>; >> + }; >> + >> + rep { >> + label = "mzk-ex750np:blue:rep"; >> + gpios = <&gpio2 16 1>; >> + }; >> + >> + wifi1 { >> + label = "mzk-ex750np:blue:wifi1"; >> + gpios = <&gpio2 19 1>; >> + }; >> + >> + wifi2 { >> + label = "mzk-ex750np:blue:wifi2"; >> + gpios = <&gpio2 18 1>; >> + }; >> + >> + wifi3 { >> + label = "mzk-ex750np:blue:wifi3"; >> + gpios = <&gpio2 17 1>; >> + }; >> + }; >> + >> + gpio-keys-polled { >> + compatible = "gpio-keys-polled"; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + poll-interval = <20>; >> + >> + reset { >> + label = "reset"; >> + gpios = <&gpio0 9 1>; >> + linux,code = <0x198>; >> + }; >> + >> + wps { >> + label = "wps"; >> + gpios = <&gpio0 13 0>; >> + linux,code = <0x211>; >> + }; >> + }; >> +}; >> diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk >> index 35cb46a..09c0ec2 100644 >> --- a/target/linux/ramips/image/mt7620.mk >> +++ b/target/linux/ramips/image/mt7620.mk >> @@ -102,6 +102,7 @@ Image/Build/Profile/NA930=$(call BuildFirmware/CustomFlash/$(1),$(1),na930,NA930 >> Image/Build/Profile/DB-WRT01=$(call BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) >> Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) >> Image/Build/Profile/MZK-EX300NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) >> +Image/Build/Profile/MZK-EX750NP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-ex750np,MZK-EX750NP) >> Image/Build/Profile/HC5661=$(call BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) >> Image/Build/Profile/HC5761=$(call BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) >> Image/Build/Profile/HC5861=$(call BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) >> @@ -149,6 +150,7 @@ define Image/Build/Profile/Default >> $(call Image/Build/Profile/DB-WRT01,$(1)) >> $(call Image/Build/Profile/MZK-750DHP,$(1)) >> $(call Image/Build/Profile/MZK-EX300NP,$(1)) >> + $(call Image/Build/Profile/MZK-EX750NP,$(1)) >> $(call Image/Build/Profile/NA930,$(1)) >> $(call Image/Build/Profile/HC5661,$(1)) >> $(call Image/Build/Profile/HC5761,$(1)) >> diff --git a/target/linux/ramips/mt7620/profiles/planex.mk b/target/linux/ramips/mt7620/profiles/planex.mk >> index 157cf8d..f461aeb 100644 >> --- a/target/linux/ramips/mt7620/profiles/planex.mk >> +++ b/target/linux/ramips/mt7620/profiles/planex.mk >> @@ -39,3 +39,14 @@ define Profile/MZK-EX300NP/Description >> Package set optimized for the Planex MZK-EX300NP. >> endef >> $(eval $(call Profile,MZK-EX300NP)) >> + >> + >> +define Profile/MZK-EX750NP >> + NAME:=Planex MZK-EX750NP >> + PACKAGES:= kmod-mt76 kmod-mt7610e >> +endef >> + >> +define Profile/MZK-EX750NP/Description >> + Package set optimized for the Planex MZK-EX750NP. >> +endef >> +$(eval $(call Profile,MZK-EX750NP)) >> -- >> 1.9.1 >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel at lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > -- ------------------------------------------------------ ?SRCHACK.ORG tochiro.srchack at gmail.com http://www.srchack.org/ ------------------------------------------------------ _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Thu Apr 28 07:12:45 2016 From: me at ndoo.sg (Andrew Yong) Date: Thu, 28 Apr 2016 19:12:45 +0800 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex MZK-EX750NP. In-Reply-To: References: <1461836968-25416-1-git-send-email-tochiro.srchack@gmail.com> Message-ID: @openwrt devs: Is there an upstream-approved way to remove "option disabled 1" from default WiFi config for devices with no Ethernet port? Many SOM modules and mini routers (and the Zsun card reader https://wiki.hackerspace.pl/projects:zsun-wifi-card-reader) don't have Ethernet ports and manufacturers ship custom OpenWrt with preconfigured WiFi for this, and probably will never be supported by OpenWrt releases because of how wifi-detect disables WiFi by default. On 28 Apr 2016 18:48, "?SRCHACK.ORG" wrote: > Hi, Dear Piotr. > > Status quo, is the only way there is access in the UART. > Looking for a good way. I'm thinking. > > > On 2016/04/28 19:24, Piotr Dymacz wrote: > >> Hello YuheiOKAWA, >> >> Just small question. >> How the user can access the device if it doesn't have Ethernet and the >> WiFi is disabled by default in OpenWrt? >> >> Cheers, >> Piotr >> >> >> 2016-04-28 11:49 GMT+02:00 YuheiOKAWA : >> >>> add support for Planex MZK-EX750NP. >>> MZK-EX750NP is MT7620A and MT7610E based 11ac wifi repeater. >>> Built-in power supply. >>> 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. >>> >>> Signed-off-by: YuheiOKAWA >>> --- >>> target/linux/ramips/base-files/etc/board.d/01_leds | 4 + >>> .../linux/ramips/base-files/etc/board.d/02_network | 1 + >>> target/linux/ramips/base-files/etc/diag.sh | 3 +- >>> target/linux/ramips/base-files/lib/ramips.sh | 3 + >>> .../ramips/base-files/lib/upgrade/platform.sh | 1 + >>> target/linux/ramips/dts/MZK-EX750NP.dts | 150 >>> +++++++++++++++++++++ >>> target/linux/ramips/image/mt7620.mk | 2 + >>> target/linux/ramips/mt7620/profiles/planex.mk | 11 ++ >>> 8 files changed, 174 insertions(+), 1 deletion(-) >>> create mode 100644 target/linux/ramips/dts/MZK-EX750NP.dts >>> >>> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds >>> b/target/linux/ramips/base-files/etc/board.d/01_leds >>> index aeaab33..47e1e6a 100755 >>> --- a/target/linux/ramips/base-files/etc/board.d/01_leds >>> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds >>> @@ -206,6 +206,10 @@ mr-102n) >>> set_wifi_led "$board:green:wlan" >>> set_usb_led "$board:green:usb" >>> ;; >>> +mzk-ex750np) >>> + ucidef_set_led_default "power" "power" "$board:red:power" "1" >>> + set_wifi_led "$board:red:wifi" >>> + ;; >>> na930) >>> set_usb_led "$board:blue:status" >>> ;; >>> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network >>> b/target/linux/ramips/base-files/etc/board.d/02_network >>> index c6c740f..ee690f6 100755 >>> --- a/target/linux/ramips/base-files/etc/board.d/02_network >>> +++ b/target/linux/ramips/base-files/etc/board.d/02_network >>> @@ -165,6 +165,7 @@ ramips_setup_interfaces() >>> d105|\ >>> hpm|\ >>> mzk-ex300np|\ >>> + mzk-ex750np|\ >>> na930|\ >>> wli-tx4-ag300n|\ >>> wrh-300cr) >>> diff --git a/target/linux/ramips/base-files/etc/diag.sh >>> b/target/linux/ramips/base-files/etc/diag.sh >>> index 20ff8ff..c638d16 100644 >>> --- a/target/linux/ramips/base-files/etc/diag.sh >>> +++ b/target/linux/ramips/base-files/etc/diag.sh >>> @@ -41,7 +41,8 @@ get_status_led() { >>> hlk-rm04|\ >>> jhr-n825r|\ >>> mpr-a1|\ >>> - mpr-a2) >>> + mpr-a2|\ >>> + mzk-ex750np) >>> status_led="$board:red:power" >>> ;; >>> ai-br100|\ >>> diff --git a/target/linux/ramips/base-files/lib/ramips.sh >>> b/target/linux/ramips/base-files/lib/ramips.sh >>> index 2c669c5..0ac0f68 100755 >>> --- a/target/linux/ramips/base-files/lib/ramips.sh >>> +++ b/target/linux/ramips/base-files/lib/ramips.sh >>> @@ -298,6 +298,9 @@ ramips_board_detect() { >>> *"MZK-EX300NP") >>> name="mzk-ex300np" >>> ;; >>> + *"MZK-EX750NP") >>> + name="mzk-ex750np" >>> + ;; >>> *"MZK-W300NH2"*) >>> name="mzk-w300nh2" >>> ;; >>> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh >>> b/target/linux/ramips/base-files/lib/upgrade/platform.sh >>> index 2b24030..86ea4a3 100755 >>> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh >>> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh >>> @@ -90,6 +90,7 @@ platform_check_image() { >>> mzk-750dhp|\ >>> mzk-dp150n|\ >>> mzk-ex300np|\ >>> + mzk-ex750np|\ >>> mzk-w300nh2|\ >>> mzk-wdpr|\ >>> nbg-419n|\ >>> diff --git a/target/linux/ramips/dts/MZK-EX750NP.dts >>> b/target/linux/ramips/dts/MZK-EX750NP.dts >>> new file mode 100644 >>> index 0000000..9b5b418 >>> --- /dev/null >>> +++ b/target/linux/ramips/dts/MZK-EX750NP.dts >>> @@ -0,0 +1,150 @@ >>> +/dts-v1/; >>> + >>> +/include/ "mt7620a.dtsi" >>> + >>> +/ { >>> + compatible = "ralink,mt7620a-soc"; >>> + model = "Planex MZK-EX750NP"; >>> + >>> + palmbus at 10000000 { >>> + gpio2: gpio at 660 { >>> + status = "okay"; >>> + }; >>> + >>> + gpio3: gpio at 688 { >>> + status = "okay"; >>> + }; >>> + >>> + spi at b00 { >>> + status = "okay"; >>> + >>> + m25p80 at 0 { >>> + #address-cells = <1>; >>> + #size-cells = <1>; >>> + compatible = "jedec,spi-nor"; >>> + reg = <0 0>; >>> + linux,modalias = "m25p80", "w25q64"; >>> + spi-max-frequency = <10000000>; >>> + >>> + partition at 0 { >>> + label = "u-boot"; >>> + reg = <0x0 0x30000>; >>> + read-only; >>> + }; >>> + >>> + partition at 30000 { >>> + label = "u-boot-env"; >>> + reg = <0x30000 0x10000>; >>> + read-only; >>> + }; >>> + >>> + factory: partition at 40000 { >>> + label = "factory"; >>> + reg = <0x40000 0x10000>; >>> + read-only; >>> + }; >>> + >>> + partition at 50000 { >>> + label = "firmware"; >>> + reg = <0x50000 0x730000>; >>> + }; >>> + >>> + partition at 780000 { >>> + label = "Udata"; >>> + reg = <0x780000 0x80000>; >>> + }; >>> + }; >>> + }; >>> + }; >>> + >>> + pinctrl { >>> + state_default: pinctrl0 { >>> + gpio { >>> + ralink,group = "uartf", "nd_sd", >>> "rgmii2", "wled"; >>> + ralink,function = "gpio"; >>> + }; >>> + }; >>> + }; >>> + >>> + ethernet at 10100000 { >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&ephy_pins>; >>> + mtd-mac-address = <&factory 0x4>; >>> + mediatek,portmap = "llllw"; >>> + }; >>> + >>> + wmac at 10180000 { >>> + ralink,mtd-eeprom = <&factory 0>; >>> + }; >>> + >>> + pcie at 10140000 { >>> + status = "okay"; >>> + >>> + pcie-bridge { >>> + mt76 at 0,0 { >>> + reg = <0x0000 0 0 0 0>; >>> + device_type = "pci"; >>> + mediatek,mtd-eeprom = <&factory 0x8000>; >>> + mediatek,2ghz = <0>; >>> + }; >>> + }; >>> + }; >>> + >>> + gpio-leds { >>> + compatible = "gpio-leds"; >>> + >>> + power { >>> + label = "mzk-ex750np:red:power"; >>> + gpios = <&gpio0 14 1>; >>> + }; >>> + >>> + wifi { >>> + label = "mzk-ex750np:red:wifi"; >>> + gpios = <&gpio3 0 1>; >>> + }; >>> + >>> + wps { >>> + label = "mzk-ex750np:green:wps"; >>> + gpios = <&gpio0 10 1>; >>> + }; >>> + >>> + rep { >>> + label = "mzk-ex750np:blue:rep"; >>> + gpios = <&gpio2 16 1>; >>> + }; >>> + >>> + wifi1 { >>> + label = "mzk-ex750np:blue:wifi1"; >>> + gpios = <&gpio2 19 1>; >>> + }; >>> + >>> + wifi2 { >>> + label = "mzk-ex750np:blue:wifi2"; >>> + gpios = <&gpio2 18 1>; >>> + }; >>> + >>> + wifi3 { >>> + label = "mzk-ex750np:blue:wifi3"; >>> + gpios = <&gpio2 17 1>; >>> + }; >>> + }; >>> + >>> + gpio-keys-polled { >>> + compatible = "gpio-keys-polled"; >>> + #address-cells = <1>; >>> + #size-cells = <0>; >>> + poll-interval = <20>; >>> + >>> + reset { >>> + label = "reset"; >>> + gpios = <&gpio0 9 1>; >>> + linux,code = <0x198>; >>> + }; >>> + >>> + wps { >>> + label = "wps"; >>> + gpios = <&gpio0 13 0>; >>> + linux,code = <0x211>; >>> + }; >>> + }; >>> +}; >>> diff --git a/target/linux/ramips/image/mt7620.mk >>> b/target/linux/ramips/image/mt7620.mk >>> index 35cb46a..09c0ec2 100644 >>> --- a/target/linux/ramips/image/mt7620.mk >>> +++ b/target/linux/ramips/image/mt7620.mk >>> @@ -102,6 +102,7 @@ Image/Build/Profile/NA930=$(call >>> BuildFirmware/CustomFlash/$(1),$(1),na930,NA930 >>> Image/Build/Profile/DB-WRT01=$(call >>> BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) >>> Image/Build/Profile/MZK-750DHP=$(call >>> BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) >>> Image/Build/Profile/MZK-EX300NP=$(call >>> BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) >>> +Image/Build/Profile/MZK-EX750NP=$(call >>> BuildFirmware/Default8M/$(1),$(1),mzk-ex750np,MZK-EX750NP) >>> Image/Build/Profile/HC5661=$(call >>> BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) >>> Image/Build/Profile/HC5761=$(call >>> BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) >>> Image/Build/Profile/HC5861=$(call >>> BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) >>> @@ -149,6 +150,7 @@ define Image/Build/Profile/Default >>> $(call Image/Build/Profile/DB-WRT01,$(1)) >>> $(call Image/Build/Profile/MZK-750DHP,$(1)) >>> $(call Image/Build/Profile/MZK-EX300NP,$(1)) >>> + $(call Image/Build/Profile/MZK-EX750NP,$(1)) >>> $(call Image/Build/Profile/NA930,$(1)) >>> $(call Image/Build/Profile/HC5661,$(1)) >>> $(call Image/Build/Profile/HC5761,$(1)) >>> diff --git a/target/linux/ramips/mt7620/profiles/planex.mk >>> b/target/linux/ramips/mt7620/profiles/planex.mk >>> index 157cf8d..f461aeb 100644 >>> --- a/target/linux/ramips/mt7620/profiles/planex.mk >>> +++ b/target/linux/ramips/mt7620/profiles/planex.mk >>> @@ -39,3 +39,14 @@ define Profile/MZK-EX300NP/Description >>> Package set optimized for the Planex MZK-EX300NP. >>> endef >>> $(eval $(call Profile,MZK-EX300NP)) >>> + >>> + >>> +define Profile/MZK-EX750NP >>> + NAME:=Planex MZK-EX750NP >>> + PACKAGES:= kmod-mt76 kmod-mt7610e >>> +endef >>> + >>> +define Profile/MZK-EX750NP/Description >>> + Package set optimized for the Planex MZK-EX750NP. >>> +endef >>> +$(eval $(call Profile,MZK-EX750NP)) >>> -- >>> 1.9.1 >>> _______________________________________________ >>> openwrt-devel mailing list >>> openwrt-devel at lists.openwrt.org >>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >>> >> >> > > -- > ------------------------------------------------------ > ?SRCHACK.ORG > tochiro.srchack at gmail.com > http://www.srchack.org/ > ------------------------------------------------------ > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Thu Apr 28 07:40:17 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Thu, 28 Apr 2016 13:40:17 +0200 Subject: [OpenWrt-Devel] [PATCH] netifd: Add configurable DHCP release behavior Message-ID: <1461843617-11681-1-git-send-email-dedeckeh@gmail.com> Make sending a DHCP release configurable when the client exits allowing to clean up IP/mac state info in intermediate devices. Signed-off-by: Hans Dedecker --- v1 -> v2 : Make sending DHCP release configurable via uci package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh index 0e88af9..7085bd2 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -12,6 +12,7 @@ proto_dhcp_init_config() { proto_config_add_string clientid proto_config_add_string vendorid proto_config_add_boolean 'broadcast:bool' + proto_config_add_boolean 'release:bool' proto_config_add_string 'reqopts:list(string)' proto_config_add_string iface6rd proto_config_add_string sendopts @@ -26,8 +27,8 @@ proto_dhcp_setup() { local config="$1" local iface="$2" - local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes - json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes + local ipaddr hostname clientid vendorid broadcast release reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes + json_get_vars ipaddr hostname clientid vendorid broadcast release reqopts iface6rd sendopts delegate zone6rd zone mtu6rd customroutes local opt dhcpopts for opt in $reqopts; do @@ -39,6 +40,7 @@ proto_dhcp_setup() { done [ "$broadcast" = 1 ] && broadcast="-B" || broadcast= + [ "$release" = 1 ] && release="-R" || release= [ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C" [ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd" [ "$iface6rd" != 0 -a -f /lib/netifd/proto/6rd.sh ] && append dhcpopts "-O 212" @@ -56,7 +58,7 @@ proto_dhcp_setup() { ${ipaddr:+-r $ipaddr} \ ${hostname:+-H $hostname} \ ${vendorid:+-V $vendorid} \ - $clientid $broadcast $dhcpopts + $clientid $broadcast $release $dhcpopts } proto_dhcp_renew() { -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From e196819 at hotmail.com Thu Apr 28 08:02:31 2016 From: e196819 at hotmail.com (e196819 at hotmail.com) Date: Thu, 28 Apr 2016 20:02:31 +0800 Subject: [OpenWrt-Devel] [PATCH] [scripts] avoid hard-coded path in sha-bang In-Reply-To: <41b6236a-cf88-e180-bc5e-55408dec17c7@phrozen.org> References: <1461315997-12107-1-git-send-email-e196819@hotmail.com> <41b6236a-cf88-e180-bc5e-55408dec17c7@phrozen.org> Message-ID: <20160428120205.GB7508@pandapc> Hi John, I cannot figure out the slang words you mentioned. I'm not a English native speaker... Could you explain more about that? On Mon, Apr 25, 2016 at 03:17:47PM +0200, John Crispin wrote: > please avoid using slang words and add "scripts:" as a subject prefix > > > > On 22/04/2016 11:06, Iblis Lin wrote: > > Signed-off-by: Iblis Lin > > --- > > scripts/brcmImage.pl | 2 +- > > scripts/deptest.sh | 2 +- > > scripts/feeds | 2 +- > > scripts/mkits.sh | 2 +- > > scripts/pad_image | 2 +- > > scripts/redboot-script.pl | 2 +- > > scripts/remote-gdb | 2 +- > > 7 files changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/scripts/brcmImage.pl b/scripts/brcmImage.pl > > index 9a3acb4..60a59f2 100755 > > --- a/scripts/brcmImage.pl > > +++ b/scripts/brcmImage.pl > > @@ -1,4 +1,4 @@ > > -#!/usr/bin/perl > > +#!/usr/bin/env perl > > # > > # Copyright (C) 2009 Henk Vergonet > > # > > diff --git a/scripts/deptest.sh b/scripts/deptest.sh > > index 047a0ce..03da9f5 100755 > > --- a/scripts/deptest.sh > > +++ b/scripts/deptest.sh > > @@ -1,4 +1,4 @@ > > -#!/bin/bash > > +#!/usr/bin/env bash > > # > > # Automated OpenWrt package dependency checker > > # > > diff --git a/scripts/feeds b/scripts/feeds > > index 79b5284..2b88eb8 100755 > > --- a/scripts/feeds > > +++ b/scripts/feeds > > @@ -1,4 +1,4 @@ > > -#!/usr/bin/perl > > +#!/usr/bin/env perl > > use Getopt::Std; > > use FindBin; > > use Cwd; > > diff --git a/scripts/mkits.sh b/scripts/mkits.sh > > index 6b5100e..8857996 100755 > > --- a/scripts/mkits.sh > > +++ b/scripts/mkits.sh > > @@ -1,4 +1,4 @@ > > -#!/bin/bash > > +#!/usr/bin/env bash > > # > > # Licensed under the terms of the GNU GPL License version 2 or later. > > # > > diff --git a/scripts/pad_image b/scripts/pad_image > > index 14f1499..b1941a2 100755 > > --- a/scripts/pad_image > > +++ b/scripts/pad_image > > @@ -1,4 +1,4 @@ > > -#!/bin/bash > > +#!/usr/bin/env bash > > > > function usage { > > echo "Usage: prepare_image image_type kernel_image rootfs_image header_size" > > diff --git a/scripts/redboot-script.pl b/scripts/redboot-script.pl > > index 123ebe3..e2d1264 100755 > > --- a/scripts/redboot-script.pl > > +++ b/scripts/redboot-script.pl > > @@ -1,4 +1,4 @@ > > -#!/usr/bin/perl > > +#!/usr/bin/env perl > > # > > # Script for generating redboot configs, based on brcmImage.pl > > # > > diff --git a/scripts/remote-gdb b/scripts/remote-gdb > > index cd59033..5230663 100755 > > --- a/scripts/remote-gdb > > +++ b/scripts/remote-gdb > > @@ -1,4 +1,4 @@ > > -#!/usr/bin/perl > > +#!/usr/bin/env perl > > > > use strict; > > use warnings; > > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Thu Apr 28 08:10:43 2016 From: blogic at openwrt.org (John Crispin) Date: Thu, 28 Apr 2016 14:10:43 +0200 Subject: [OpenWrt-Devel] [PATCH] [scripts] avoid hard-coded path in sha-bang In-Reply-To: <20160428120205.GB7508@pandapc> References: <1461315997-12107-1-git-send-email-e196819@hotmail.com> <41b6236a-cf88-e180-bc5e-55408dec17c7@phrozen.org> <20160428120205.GB7508@pandapc> Message-ID: Hi, please change the subject as below change [scripts] avoid hard-coded path in sha-bang to scripts: avoid hard-coded paths in scripts John On 28/04/2016 14:02, e196819 at hotmail.com wrote: > Hi John, > > I cannot figure out the slang words you mentioned. > I'm not a English native speaker... > Could you explain more about that? > > > On Mon, Apr 25, 2016 at 03:17:47PM +0200, John Crispin wrote: >> please avoid using slang words and add "scripts:" as a subject prefix >> >> >> >> On 22/04/2016 11:06, Iblis Lin wrote: >>> Signed-off-by: Iblis Lin >>> --- >>> scripts/brcmImage.pl | 2 +- >>> scripts/deptest.sh | 2 +- >>> scripts/feeds | 2 +- >>> scripts/mkits.sh | 2 +- >>> scripts/pad_image | 2 +- >>> scripts/redboot-script.pl | 2 +- >>> scripts/remote-gdb | 2 +- >>> 7 files changed, 7 insertions(+), 7 deletions(-) >>> >>> diff --git a/scripts/brcmImage.pl b/scripts/brcmImage.pl >>> index 9a3acb4..60a59f2 100755 >>> --- a/scripts/brcmImage.pl >>> +++ b/scripts/brcmImage.pl >>> @@ -1,4 +1,4 @@ >>> -#!/usr/bin/perl >>> +#!/usr/bin/env perl >>> # >>> # Copyright (C) 2009 Henk Vergonet >>> # >>> diff --git a/scripts/deptest.sh b/scripts/deptest.sh >>> index 047a0ce..03da9f5 100755 >>> --- a/scripts/deptest.sh >>> +++ b/scripts/deptest.sh >>> @@ -1,4 +1,4 @@ >>> -#!/bin/bash >>> +#!/usr/bin/env bash >>> # >>> # Automated OpenWrt package dependency checker >>> # >>> diff --git a/scripts/feeds b/scripts/feeds >>> index 79b5284..2b88eb8 100755 >>> --- a/scripts/feeds >>> +++ b/scripts/feeds >>> @@ -1,4 +1,4 @@ >>> -#!/usr/bin/perl >>> +#!/usr/bin/env perl >>> use Getopt::Std; >>> use FindBin; >>> use Cwd; >>> diff --git a/scripts/mkits.sh b/scripts/mkits.sh >>> index 6b5100e..8857996 100755 >>> --- a/scripts/mkits.sh >>> +++ b/scripts/mkits.sh >>> @@ -1,4 +1,4 @@ >>> -#!/bin/bash >>> +#!/usr/bin/env bash >>> # >>> # Licensed under the terms of the GNU GPL License version 2 or later. >>> # >>> diff --git a/scripts/pad_image b/scripts/pad_image >>> index 14f1499..b1941a2 100755 >>> --- a/scripts/pad_image >>> +++ b/scripts/pad_image >>> @@ -1,4 +1,4 @@ >>> -#!/bin/bash >>> +#!/usr/bin/env bash >>> >>> function usage { >>> echo "Usage: prepare_image image_type kernel_image rootfs_image header_size" >>> diff --git a/scripts/redboot-script.pl b/scripts/redboot-script.pl >>> index 123ebe3..e2d1264 100755 >>> --- a/scripts/redboot-script.pl >>> +++ b/scripts/redboot-script.pl >>> @@ -1,4 +1,4 @@ >>> -#!/usr/bin/perl >>> +#!/usr/bin/env perl >>> # >>> # Script for generating redboot configs, based on brcmImage.pl >>> # >>> diff --git a/scripts/remote-gdb b/scripts/remote-gdb >>> index cd59033..5230663 100755 >>> --- a/scripts/remote-gdb >>> +++ b/scripts/remote-gdb >>> @@ -1,4 +1,4 @@ >>> -#!/usr/bin/perl >>> +#!/usr/bin/env perl >>> >>> use strict; >>> use warnings; >>> > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From pepe2k at gmail.com Thu Apr 28 08:23:33 2016 From: pepe2k at gmail.com (Piotr Dymacz) Date: Thu, 28 Apr 2016 14:23:33 +0200 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex MZK-EX750NP. In-Reply-To: References: <1461836968-25416-1-git-send-email-tochiro.srchack@gmail.com> Message-ID: Hello, 2016-04-28 13:12 GMT+02:00 Andrew Yong : [...] > Many SOM modules and mini routers (and the Zsun card reader > https://wiki.hackerspace.pl/projects:zsun-wifi-card-reader) don't have > Ethernet ports and manufacturers ship custom OpenWrt with preconfigured WiFi > for this, and probably will never be supported by OpenWrt releases because > of how wifi-detect disables WiFi by default. Fully agree. There are other interesting devices, like D-Link DCH-M225 (MT7620A + audio) [1]. I know only one way how to use such devices with OpenWrt: define hardware button as rfkill and use it after flash. Cheers, Piotr [1] https://wikidevi.com/wiki/D-Link_DCH-M225_rev_A1 > > On 28 Apr 2016 18:48, "?SRCHACK.ORG" wrote: >> >> Hi, Dear Piotr. >> >> Status quo, is the only way there is access in the UART. >> Looking for a good way. I'm thinking. >> >> >> On 2016/04/28 19:24, Piotr Dymacz wrote: >>> >>> Hello YuheiOKAWA, >>> >>> Just small question. >>> How the user can access the device if it doesn't have Ethernet and the >>> WiFi is disabled by default in OpenWrt? >>> >>> Cheers, >>> Piotr >>> >>> >>> 2016-04-28 11:49 GMT+02:00 YuheiOKAWA : >>>> >>>> add support for Planex MZK-EX750NP. >>>> MZK-EX750NP is MT7620A and MT7610E based 11ac wifi repeater. >>>> Built-in power supply. >>>> 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. >>>> >>>> Signed-off-by: YuheiOKAWA >>>> --- >>>> target/linux/ramips/base-files/etc/board.d/01_leds | 4 + >>>> .../linux/ramips/base-files/etc/board.d/02_network | 1 + >>>> target/linux/ramips/base-files/etc/diag.sh | 3 +- >>>> target/linux/ramips/base-files/lib/ramips.sh | 3 + >>>> .../ramips/base-files/lib/upgrade/platform.sh | 1 + >>>> target/linux/ramips/dts/MZK-EX750NP.dts | 150 >>>> +++++++++++++++++++++ >>>> target/linux/ramips/image/mt7620.mk | 2 + >>>> target/linux/ramips/mt7620/profiles/planex.mk | 11 ++ >>>> 8 files changed, 174 insertions(+), 1 deletion(-) >>>> create mode 100644 target/linux/ramips/dts/MZK-EX750NP.dts >>>> >>>> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds >>>> b/target/linux/ramips/base-files/etc/board.d/01_leds >>>> index aeaab33..47e1e6a 100755 >>>> --- a/target/linux/ramips/base-files/etc/board.d/01_leds >>>> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds >>>> @@ -206,6 +206,10 @@ mr-102n) >>>> set_wifi_led "$board:green:wlan" >>>> set_usb_led "$board:green:usb" >>>> ;; >>>> +mzk-ex750np) >>>> + ucidef_set_led_default "power" "power" "$board:red:power" "1" >>>> + set_wifi_led "$board:red:wifi" >>>> + ;; >>>> na930) >>>> set_usb_led "$board:blue:status" >>>> ;; >>>> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network >>>> b/target/linux/ramips/base-files/etc/board.d/02_network >>>> index c6c740f..ee690f6 100755 >>>> --- a/target/linux/ramips/base-files/etc/board.d/02_network >>>> +++ b/target/linux/ramips/base-files/etc/board.d/02_network >>>> @@ -165,6 +165,7 @@ ramips_setup_interfaces() >>>> d105|\ >>>> hpm|\ >>>> mzk-ex300np|\ >>>> + mzk-ex750np|\ >>>> na930|\ >>>> wli-tx4-ag300n|\ >>>> wrh-300cr) >>>> diff --git a/target/linux/ramips/base-files/etc/diag.sh >>>> b/target/linux/ramips/base-files/etc/diag.sh >>>> index 20ff8ff..c638d16 100644 >>>> --- a/target/linux/ramips/base-files/etc/diag.sh >>>> +++ b/target/linux/ramips/base-files/etc/diag.sh >>>> @@ -41,7 +41,8 @@ get_status_led() { >>>> hlk-rm04|\ >>>> jhr-n825r|\ >>>> mpr-a1|\ >>>> - mpr-a2) >>>> + mpr-a2|\ >>>> + mzk-ex750np) >>>> status_led="$board:red:power" >>>> ;; >>>> ai-br100|\ >>>> diff --git a/target/linux/ramips/base-files/lib/ramips.sh >>>> b/target/linux/ramips/base-files/lib/ramips.sh >>>> index 2c669c5..0ac0f68 100755 >>>> --- a/target/linux/ramips/base-files/lib/ramips.sh >>>> +++ b/target/linux/ramips/base-files/lib/ramips.sh >>>> @@ -298,6 +298,9 @@ ramips_board_detect() { >>>> *"MZK-EX300NP") >>>> name="mzk-ex300np" >>>> ;; >>>> + *"MZK-EX750NP") >>>> + name="mzk-ex750np" >>>> + ;; >>>> *"MZK-W300NH2"*) >>>> name="mzk-w300nh2" >>>> ;; >>>> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh >>>> b/target/linux/ramips/base-files/lib/upgrade/platform.sh >>>> index 2b24030..86ea4a3 100755 >>>> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh >>>> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh >>>> @@ -90,6 +90,7 @@ platform_check_image() { >>>> mzk-750dhp|\ >>>> mzk-dp150n|\ >>>> mzk-ex300np|\ >>>> + mzk-ex750np|\ >>>> mzk-w300nh2|\ >>>> mzk-wdpr|\ >>>> nbg-419n|\ >>>> diff --git a/target/linux/ramips/dts/MZK-EX750NP.dts >>>> b/target/linux/ramips/dts/MZK-EX750NP.dts >>>> new file mode 100644 >>>> index 0000000..9b5b418 >>>> --- /dev/null >>>> +++ b/target/linux/ramips/dts/MZK-EX750NP.dts >>>> @@ -0,0 +1,150 @@ >>>> +/dts-v1/; >>>> + >>>> +/include/ "mt7620a.dtsi" >>>> + >>>> +/ { >>>> + compatible = "ralink,mt7620a-soc"; >>>> + model = "Planex MZK-EX750NP"; >>>> + >>>> + palmbus at 10000000 { >>>> + gpio2: gpio at 660 { >>>> + status = "okay"; >>>> + }; >>>> + >>>> + gpio3: gpio at 688 { >>>> + status = "okay"; >>>> + }; >>>> + >>>> + spi at b00 { >>>> + status = "okay"; >>>> + >>>> + m25p80 at 0 { >>>> + #address-cells = <1>; >>>> + #size-cells = <1>; >>>> + compatible = "jedec,spi-nor"; >>>> + reg = <0 0>; >>>> + linux,modalias = "m25p80", "w25q64"; >>>> + spi-max-frequency = <10000000>; >>>> + >>>> + partition at 0 { >>>> + label = "u-boot"; >>>> + reg = <0x0 0x30000>; >>>> + read-only; >>>> + }; >>>> + >>>> + partition at 30000 { >>>> + label = "u-boot-env"; >>>> + reg = <0x30000 0x10000>; >>>> + read-only; >>>> + }; >>>> + >>>> + factory: partition at 40000 { >>>> + label = "factory"; >>>> + reg = <0x40000 0x10000>; >>>> + read-only; >>>> + }; >>>> + >>>> + partition at 50000 { >>>> + label = "firmware"; >>>> + reg = <0x50000 0x730000>; >>>> + }; >>>> + >>>> + partition at 780000 { >>>> + label = "Udata"; >>>> + reg = <0x780000 0x80000>; >>>> + }; >>>> + }; >>>> + }; >>>> + }; >>>> + >>>> + pinctrl { >>>> + state_default: pinctrl0 { >>>> + gpio { >>>> + ralink,group = "uartf", "nd_sd", >>>> "rgmii2", "wled"; >>>> + ralink,function = "gpio"; >>>> + }; >>>> + }; >>>> + }; >>>> + >>>> + ethernet at 10100000 { >>>> + pinctrl-names = "default"; >>>> + pinctrl-0 = <&ephy_pins>; >>>> + mtd-mac-address = <&factory 0x4>; >>>> + mediatek,portmap = "llllw"; >>>> + }; >>>> + >>>> + wmac at 10180000 { >>>> + ralink,mtd-eeprom = <&factory 0>; >>>> + }; >>>> + >>>> + pcie at 10140000 { >>>> + status = "okay"; >>>> + >>>> + pcie-bridge { >>>> + mt76 at 0,0 { >>>> + reg = <0x0000 0 0 0 0>; >>>> + device_type = "pci"; >>>> + mediatek,mtd-eeprom = <&factory 0x8000>; >>>> + mediatek,2ghz = <0>; >>>> + }; >>>> + }; >>>> + }; >>>> + >>>> + gpio-leds { >>>> + compatible = "gpio-leds"; >>>> + >>>> + power { >>>> + label = "mzk-ex750np:red:power"; >>>> + gpios = <&gpio0 14 1>; >>>> + }; >>>> + >>>> + wifi { >>>> + label = "mzk-ex750np:red:wifi"; >>>> + gpios = <&gpio3 0 1>; >>>> + }; >>>> + >>>> + wps { >>>> + label = "mzk-ex750np:green:wps"; >>>> + gpios = <&gpio0 10 1>; >>>> + }; >>>> + >>>> + rep { >>>> + label = "mzk-ex750np:blue:rep"; >>>> + gpios = <&gpio2 16 1>; >>>> + }; >>>> + >>>> + wifi1 { >>>> + label = "mzk-ex750np:blue:wifi1"; >>>> + gpios = <&gpio2 19 1>; >>>> + }; >>>> + >>>> + wifi2 { >>>> + label = "mzk-ex750np:blue:wifi2"; >>>> + gpios = <&gpio2 18 1>; >>>> + }; >>>> + >>>> + wifi3 { >>>> + label = "mzk-ex750np:blue:wifi3"; >>>> + gpios = <&gpio2 17 1>; >>>> + }; >>>> + }; >>>> + >>>> + gpio-keys-polled { >>>> + compatible = "gpio-keys-polled"; >>>> + #address-cells = <1>; >>>> + #size-cells = <0>; >>>> + poll-interval = <20>; >>>> + >>>> + reset { >>>> + label = "reset"; >>>> + gpios = <&gpio0 9 1>; >>>> + linux,code = <0x198>; >>>> + }; >>>> + >>>> + wps { >>>> + label = "wps"; >>>> + gpios = <&gpio0 13 0>; >>>> + linux,code = <0x211>; >>>> + }; >>>> + }; >>>> +}; >>>> diff --git a/target/linux/ramips/image/mt7620.mk >>>> b/target/linux/ramips/image/mt7620.mk >>>> index 35cb46a..09c0ec2 100644 >>>> --- a/target/linux/ramips/image/mt7620.mk >>>> +++ b/target/linux/ramips/image/mt7620.mk >>>> @@ -102,6 +102,7 @@ Image/Build/Profile/NA930=$(call >>>> BuildFirmware/CustomFlash/$(1),$(1),na930,NA930 >>>> Image/Build/Profile/DB-WRT01=$(call >>>> BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) >>>> Image/Build/Profile/MZK-750DHP=$(call >>>> BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) >>>> Image/Build/Profile/MZK-EX300NP=$(call >>>> BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) >>>> +Image/Build/Profile/MZK-EX750NP=$(call >>>> BuildFirmware/Default8M/$(1),$(1),mzk-ex750np,MZK-EX750NP) >>>> Image/Build/Profile/HC5661=$(call >>>> BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) >>>> Image/Build/Profile/HC5761=$(call >>>> BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) >>>> Image/Build/Profile/HC5861=$(call >>>> BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) >>>> @@ -149,6 +150,7 @@ define Image/Build/Profile/Default >>>> $(call Image/Build/Profile/DB-WRT01,$(1)) >>>> $(call Image/Build/Profile/MZK-750DHP,$(1)) >>>> $(call Image/Build/Profile/MZK-EX300NP,$(1)) >>>> + $(call Image/Build/Profile/MZK-EX750NP,$(1)) >>>> $(call Image/Build/Profile/NA930,$(1)) >>>> $(call Image/Build/Profile/HC5661,$(1)) >>>> $(call Image/Build/Profile/HC5761,$(1)) >>>> diff --git a/target/linux/ramips/mt7620/profiles/planex.mk >>>> b/target/linux/ramips/mt7620/profiles/planex.mk >>>> index 157cf8d..f461aeb 100644 >>>> --- a/target/linux/ramips/mt7620/profiles/planex.mk >>>> +++ b/target/linux/ramips/mt7620/profiles/planex.mk >>>> @@ -39,3 +39,14 @@ define Profile/MZK-EX300NP/Description >>>> Package set optimized for the Planex MZK-EX300NP. >>>> endef >>>> $(eval $(call Profile,MZK-EX300NP)) >>>> + >>>> + >>>> +define Profile/MZK-EX750NP >>>> + NAME:=Planex MZK-EX750NP >>>> + PACKAGES:= kmod-mt76 kmod-mt7610e >>>> +endef >>>> + >>>> +define Profile/MZK-EX750NP/Description >>>> + Package set optimized for the Planex MZK-EX750NP. >>>> +endef >>>> +$(eval $(call Profile,MZK-EX750NP)) >>>> -- >>>> 1.9.1 >>>> _______________________________________________ >>>> openwrt-devel mailing list >>>> openwrt-devel at lists.openwrt.org >>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel >>> >>> >> >> >> -- >> ------------------------------------------------------ >> ?SRCHACK.ORG >> tochiro.srchack at gmail.com >> http://www.srchack.org/ >> ------------------------------------------------------ >> _______________________________________________ >> openwrt-devel mailing list >> openwrt-devel at lists.openwrt.org >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Thu Apr 28 08:25:02 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Thu, 28 Apr 2016 14:25:02 +0200 Subject: [OpenWrt-Devel] [PATCH] set mark for locally generated traffic in OUTPUT chain Message-ID: <20160428122458.GA11150@makrotopia.org> Signed-off-by: Daniel Golle --- rules.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.c b/rules.c index 756c78d..e20442e 100644 --- a/rules.c +++ b/rules.c @@ -270,7 +270,7 @@ append_chain(struct fw3_ipt_rule *r, struct fw3_rule *rule) { snprintf(chain, sizeof(chain), "zone_%s_notrack", rule->src.name); } - else if (rule->target == FW3_FLAG_MARK) + else if (rule->target == FW3_FLAG_MARK && (rule->_src || rule->src.any)) { snprintf(chain, sizeof(chain), "PREROUTING"); } -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Thu Apr 28 08:25:11 2016 From: me at ndoo.sg (Andrew Yong) Date: Thu, 28 Apr 2016 20:25:11 +0800 Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Planex MZK-EX750NP. In-Reply-To: References: <1461836968-25416-1-git-send-email-tochiro.srchack@gmail.com> Message-ID: I'll take a look at what can be done with the `wifi` script. I think it's pretty long overdue with IoT modules being huge now. On 28 Apr 2016 20:23, "Piotr Dymacz" wrote: > Hello, > > 2016-04-28 13:12 GMT+02:00 Andrew Yong : > [...] > > > Many SOM modules and mini routers (and the Zsun card reader > > https://wiki.hackerspace.pl/projects:zsun-wifi-card-reader) don't have > > Ethernet ports and manufacturers ship custom OpenWrt with preconfigured > WiFi > > for this, and probably will never be supported by OpenWrt releases > because > > of how wifi-detect disables WiFi by default. > > Fully agree. > There are other interesting devices, like D-Link DCH-M225 (MT7620A + > audio) [1]. > > I know only one way how to use such devices with OpenWrt: define > hardware button as rfkill and use it after flash. > > Cheers, > Piotr > > [1] https://wikidevi.com/wiki/D-Link_DCH-M225_rev_A1 > > > > > On 28 Apr 2016 18:48, "?SRCHACK.ORG" wrote: > >> > >> Hi, Dear Piotr. > >> > >> Status quo, is the only way there is access in the UART. > >> Looking for a good way. I'm thinking. > >> > >> > >> On 2016/04/28 19:24, Piotr Dymacz wrote: > >>> > >>> Hello YuheiOKAWA, > >>> > >>> Just small question. > >>> How the user can access the device if it doesn't have Ethernet and the > >>> WiFi is disabled by default in OpenWrt? > >>> > >>> Cheers, > >>> Piotr > >>> > >>> > >>> 2016-04-28 11:49 GMT+02:00 YuheiOKAWA : > >>>> > >>>> add support for Planex MZK-EX750NP. > >>>> MZK-EX750NP is MT7620A and MT7610E based 11ac wifi repeater. > >>>> Built-in power supply. > >>>> 64MiB RAM, 8MiB SPI Flash, non Wired Ethernet. > >>>> > >>>> Signed-off-by: YuheiOKAWA > >>>> --- > >>>> target/linux/ramips/base-files/etc/board.d/01_leds | 4 + > >>>> .../linux/ramips/base-files/etc/board.d/02_network | 1 + > >>>> target/linux/ramips/base-files/etc/diag.sh | 3 +- > >>>> target/linux/ramips/base-files/lib/ramips.sh | 3 + > >>>> .../ramips/base-files/lib/upgrade/platform.sh | 1 + > >>>> target/linux/ramips/dts/MZK-EX750NP.dts | 150 > >>>> +++++++++++++++++++++ > >>>> target/linux/ramips/image/mt7620.mk | 2 + > >>>> target/linux/ramips/mt7620/profiles/planex.mk | 11 ++ > >>>> 8 files changed, 174 insertions(+), 1 deletion(-) > >>>> create mode 100644 target/linux/ramips/dts/MZK-EX750NP.dts > >>>> > >>>> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > >>>> b/target/linux/ramips/base-files/etc/board.d/01_leds > >>>> index aeaab33..47e1e6a 100755 > >>>> --- a/target/linux/ramips/base-files/etc/board.d/01_leds > >>>> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > >>>> @@ -206,6 +206,10 @@ mr-102n) > >>>> set_wifi_led "$board:green:wlan" > >>>> set_usb_led "$board:green:usb" > >>>> ;; > >>>> +mzk-ex750np) > >>>> + ucidef_set_led_default "power" "power" "$board:red:power" "1" > >>>> + set_wifi_led "$board:red:wifi" > >>>> + ;; > >>>> na930) > >>>> set_usb_led "$board:blue:status" > >>>> ;; > >>>> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > >>>> b/target/linux/ramips/base-files/etc/board.d/02_network > >>>> index c6c740f..ee690f6 100755 > >>>> --- a/target/linux/ramips/base-files/etc/board.d/02_network > >>>> +++ b/target/linux/ramips/base-files/etc/board.d/02_network > >>>> @@ -165,6 +165,7 @@ ramips_setup_interfaces() > >>>> d105|\ > >>>> hpm|\ > >>>> mzk-ex300np|\ > >>>> + mzk-ex750np|\ > >>>> na930|\ > >>>> wli-tx4-ag300n|\ > >>>> wrh-300cr) > >>>> diff --git a/target/linux/ramips/base-files/etc/diag.sh > >>>> b/target/linux/ramips/base-files/etc/diag.sh > >>>> index 20ff8ff..c638d16 100644 > >>>> --- a/target/linux/ramips/base-files/etc/diag.sh > >>>> +++ b/target/linux/ramips/base-files/etc/diag.sh > >>>> @@ -41,7 +41,8 @@ get_status_led() { > >>>> hlk-rm04|\ > >>>> jhr-n825r|\ > >>>> mpr-a1|\ > >>>> - mpr-a2) > >>>> + mpr-a2|\ > >>>> + mzk-ex750np) > >>>> status_led="$board:red:power" > >>>> ;; > >>>> ai-br100|\ > >>>> diff --git a/target/linux/ramips/base-files/lib/ramips.sh > >>>> b/target/linux/ramips/base-files/lib/ramips.sh > >>>> index 2c669c5..0ac0f68 100755 > >>>> --- a/target/linux/ramips/base-files/lib/ramips.sh > >>>> +++ b/target/linux/ramips/base-files/lib/ramips.sh > >>>> @@ -298,6 +298,9 @@ ramips_board_detect() { > >>>> *"MZK-EX300NP") > >>>> name="mzk-ex300np" > >>>> ;; > >>>> + *"MZK-EX750NP") > >>>> + name="mzk-ex750np" > >>>> + ;; > >>>> *"MZK-W300NH2"*) > >>>> name="mzk-w300nh2" > >>>> ;; > >>>> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > >>>> b/target/linux/ramips/base-files/lib/upgrade/platform.sh > >>>> index 2b24030..86ea4a3 100755 > >>>> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > >>>> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > >>>> @@ -90,6 +90,7 @@ platform_check_image() { > >>>> mzk-750dhp|\ > >>>> mzk-dp150n|\ > >>>> mzk-ex300np|\ > >>>> + mzk-ex750np|\ > >>>> mzk-w300nh2|\ > >>>> mzk-wdpr|\ > >>>> nbg-419n|\ > >>>> diff --git a/target/linux/ramips/dts/MZK-EX750NP.dts > >>>> b/target/linux/ramips/dts/MZK-EX750NP.dts > >>>> new file mode 100644 > >>>> index 0000000..9b5b418 > >>>> --- /dev/null > >>>> +++ b/target/linux/ramips/dts/MZK-EX750NP.dts > >>>> @@ -0,0 +1,150 @@ > >>>> +/dts-v1/; > >>>> + > >>>> +/include/ "mt7620a.dtsi" > >>>> + > >>>> +/ { > >>>> + compatible = "ralink,mt7620a-soc"; > >>>> + model = "Planex MZK-EX750NP"; > >>>> + > >>>> + palmbus at 10000000 { > >>>> + gpio2: gpio at 660 { > >>>> + status = "okay"; > >>>> + }; > >>>> + > >>>> + gpio3: gpio at 688 { > >>>> + status = "okay"; > >>>> + }; > >>>> + > >>>> + spi at b00 { > >>>> + status = "okay"; > >>>> + > >>>> + m25p80 at 0 { > >>>> + #address-cells = <1>; > >>>> + #size-cells = <1>; > >>>> + compatible = "jedec,spi-nor"; > >>>> + reg = <0 0>; > >>>> + linux,modalias = "m25p80", "w25q64"; > >>>> + spi-max-frequency = <10000000>; > >>>> + > >>>> + partition at 0 { > >>>> + label = "u-boot"; > >>>> + reg = <0x0 0x30000>; > >>>> + read-only; > >>>> + }; > >>>> + > >>>> + partition at 30000 { > >>>> + label = "u-boot-env"; > >>>> + reg = <0x30000 0x10000>; > >>>> + read-only; > >>>> + }; > >>>> + > >>>> + factory: partition at 40000 { > >>>> + label = "factory"; > >>>> + reg = <0x40000 0x10000>; > >>>> + read-only; > >>>> + }; > >>>> + > >>>> + partition at 50000 { > >>>> + label = "firmware"; > >>>> + reg = <0x50000 0x730000>; > >>>> + }; > >>>> + > >>>> + partition at 780000 { > >>>> + label = "Udata"; > >>>> + reg = <0x780000 0x80000>; > >>>> + }; > >>>> + }; > >>>> + }; > >>>> + }; > >>>> + > >>>> + pinctrl { > >>>> + state_default: pinctrl0 { > >>>> + gpio { > >>>> + ralink,group = "uartf", "nd_sd", > >>>> "rgmii2", "wled"; > >>>> + ralink,function = "gpio"; > >>>> + }; > >>>> + }; > >>>> + }; > >>>> + > >>>> + ethernet at 10100000 { > >>>> + pinctrl-names = "default"; > >>>> + pinctrl-0 = <&ephy_pins>; > >>>> + mtd-mac-address = <&factory 0x4>; > >>>> + mediatek,portmap = "llllw"; > >>>> + }; > >>>> + > >>>> + wmac at 10180000 { > >>>> + ralink,mtd-eeprom = <&factory 0>; > >>>> + }; > >>>> + > >>>> + pcie at 10140000 { > >>>> + status = "okay"; > >>>> + > >>>> + pcie-bridge { > >>>> + mt76 at 0,0 { > >>>> + reg = <0x0000 0 0 0 0>; > >>>> + device_type = "pci"; > >>>> + mediatek,mtd-eeprom = <&factory > 0x8000>; > >>>> + mediatek,2ghz = <0>; > >>>> + }; > >>>> + }; > >>>> + }; > >>>> + > >>>> + gpio-leds { > >>>> + compatible = "gpio-leds"; > >>>> + > >>>> + power { > >>>> + label = "mzk-ex750np:red:power"; > >>>> + gpios = <&gpio0 14 1>; > >>>> + }; > >>>> + > >>>> + wifi { > >>>> + label = "mzk-ex750np:red:wifi"; > >>>> + gpios = <&gpio3 0 1>; > >>>> + }; > >>>> + > >>>> + wps { > >>>> + label = "mzk-ex750np:green:wps"; > >>>> + gpios = <&gpio0 10 1>; > >>>> + }; > >>>> + > >>>> + rep { > >>>> + label = "mzk-ex750np:blue:rep"; > >>>> + gpios = <&gpio2 16 1>; > >>>> + }; > >>>> + > >>>> + wifi1 { > >>>> + label = "mzk-ex750np:blue:wifi1"; > >>>> + gpios = <&gpio2 19 1>; > >>>> + }; > >>>> + > >>>> + wifi2 { > >>>> + label = "mzk-ex750np:blue:wifi2"; > >>>> + gpios = <&gpio2 18 1>; > >>>> + }; > >>>> + > >>>> + wifi3 { > >>>> + label = "mzk-ex750np:blue:wifi3"; > >>>> + gpios = <&gpio2 17 1>; > >>>> + }; > >>>> + }; > >>>> + > >>>> + gpio-keys-polled { > >>>> + compatible = "gpio-keys-polled"; > >>>> + #address-cells = <1>; > >>>> + #size-cells = <0>; > >>>> + poll-interval = <20>; > >>>> + > >>>> + reset { > >>>> + label = "reset"; > >>>> + gpios = <&gpio0 9 1>; > >>>> + linux,code = <0x198>; > >>>> + }; > >>>> + > >>>> + wps { > >>>> + label = "wps"; > >>>> + gpios = <&gpio0 13 0>; > >>>> + linux,code = <0x211>; > >>>> + }; > >>>> + }; > >>>> +}; > >>>> diff --git a/target/linux/ramips/image/mt7620.mk > >>>> b/target/linux/ramips/image/mt7620.mk > >>>> index 35cb46a..09c0ec2 100644 > >>>> --- a/target/linux/ramips/image/mt7620.mk > >>>> +++ b/target/linux/ramips/image/mt7620.mk > >>>> @@ -102,6 +102,7 @@ Image/Build/Profile/NA930=$(call > >>>> BuildFirmware/CustomFlash/$(1),$(1),na930,NA930 > >>>> Image/Build/Profile/DB-WRT01=$(call > >>>> BuildFirmware/Default8M/$(1),$(1),db-wrt01,DB-WRT01) > >>>> Image/Build/Profile/MZK-750DHP=$(call > >>>> BuildFirmware/Default8M/$(1),$(1),mzk-750dhp,MZK-750DHP) > >>>> Image/Build/Profile/MZK-EX300NP=$(call > >>>> BuildFirmware/Default8M/$(1),$(1),mzk-ex300np,MZK-EX300NP) > >>>> +Image/Build/Profile/MZK-EX750NP=$(call > >>>> BuildFirmware/Default8M/$(1),$(1),mzk-ex750np,MZK-EX750NP) > >>>> Image/Build/Profile/HC5661=$(call > >>>> BuildFirmware/Default16M/$(1),$(1),hc5661,HC5661) > >>>> Image/Build/Profile/HC5761=$(call > >>>> BuildFirmware/Default16M/$(1),$(1),hc5761,HC5761) > >>>> Image/Build/Profile/HC5861=$(call > >>>> BuildFirmware/Default16M/$(1),$(1),hc5861,HC5861) > >>>> @@ -149,6 +150,7 @@ define Image/Build/Profile/Default > >>>> $(call Image/Build/Profile/DB-WRT01,$(1)) > >>>> $(call Image/Build/Profile/MZK-750DHP,$(1)) > >>>> $(call Image/Build/Profile/MZK-EX300NP,$(1)) > >>>> + $(call Image/Build/Profile/MZK-EX750NP,$(1)) > >>>> $(call Image/Build/Profile/NA930,$(1)) > >>>> $(call Image/Build/Profile/HC5661,$(1)) > >>>> $(call Image/Build/Profile/HC5761,$(1)) > >>>> diff --git a/target/linux/ramips/mt7620/profiles/planex.mk > >>>> b/target/linux/ramips/mt7620/profiles/planex.mk > >>>> index 157cf8d..f461aeb 100644 > >>>> --- a/target/linux/ramips/mt7620/profiles/planex.mk > >>>> +++ b/target/linux/ramips/mt7620/profiles/planex.mk > >>>> @@ -39,3 +39,14 @@ define Profile/MZK-EX300NP/Description > >>>> Package set optimized for the Planex MZK-EX300NP. > >>>> endef > >>>> $(eval $(call Profile,MZK-EX300NP)) > >>>> + > >>>> + > >>>> +define Profile/MZK-EX750NP > >>>> + NAME:=Planex MZK-EX750NP > >>>> + PACKAGES:= kmod-mt76 kmod-mt7610e > >>>> +endef > >>>> + > >>>> +define Profile/MZK-EX750NP/Description > >>>> + Package set optimized for the Planex MZK-EX750NP. > >>>> +endef > >>>> +$(eval $(call Profile,MZK-EX750NP)) > >>>> -- > >>>> 1.9.1 > >>>> _______________________________________________ > >>>> openwrt-devel mailing list > >>>> openwrt-devel at lists.openwrt.org > >>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > >>> > >>> > >> > >> > >> -- > >> ------------------------------------------------------ > >> ?SRCHACK.ORG > >> tochiro.srchack at gmail.com > >> http://www.srchack.org/ > >> ------------------------------------------------------ > >> _______________________________________________ > >> openwrt-devel mailing list > >> openwrt-devel at lists.openwrt.org > >> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From e196819 at hotmail.com Thu Apr 28 08:34:13 2016 From: e196819 at hotmail.com (Iblis Lin) Date: Thu, 28 Apr 2016 20:34:13 +0800 Subject: [OpenWrt-Devel] [PATCH v2] scripts: avoid hard-coded paths in scripts Message-ID: <1461846853-90629-1-git-send-email-e196819@hotmail.com> Signed-off-by: Iblis Lin --- scripts/brcmImage.pl | 2 +- scripts/deptest.sh | 2 +- scripts/feeds | 2 +- scripts/mkits.sh | 2 +- scripts/pad_image | 2 +- scripts/redboot-script.pl | 2 +- scripts/remote-gdb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/brcmImage.pl b/scripts/brcmImage.pl index 9a3acb4..60a59f2 100755 --- a/scripts/brcmImage.pl +++ b/scripts/brcmImage.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # Copyright (C) 2009 Henk Vergonet # diff --git a/scripts/deptest.sh b/scripts/deptest.sh index 047a0ce..03da9f5 100755 --- a/scripts/deptest.sh +++ b/scripts/deptest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Automated OpenWrt package dependency checker # diff --git a/scripts/feeds b/scripts/feeds index 79b5284..2b88eb8 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use Getopt::Std; use FindBin; use Cwd; diff --git a/scripts/mkits.sh b/scripts/mkits.sh index 6b5100e..8857996 100755 --- a/scripts/mkits.sh +++ b/scripts/mkits.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Licensed under the terms of the GNU GPL License version 2 or later. # diff --git a/scripts/pad_image b/scripts/pad_image index 14f1499..b1941a2 100755 --- a/scripts/pad_image +++ b/scripts/pad_image @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function usage { echo "Usage: prepare_image image_type kernel_image rootfs_image header_size" diff --git a/scripts/redboot-script.pl b/scripts/redboot-script.pl index 123ebe3..e2d1264 100755 --- a/scripts/redboot-script.pl +++ b/scripts/redboot-script.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # Script for generating redboot configs, based on brcmImage.pl # diff --git a/scripts/remote-gdb b/scripts/remote-gdb index cd59033..5230663 100755 --- a/scripts/remote-gdb +++ b/scripts/remote-gdb @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Thu Apr 28 08:37:36 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Thu, 28 Apr 2016 14:37:36 +0200 Subject: [OpenWrt-Devel] [PATCH v4] base-files: evaluate uci-defaults on run-time installations In-Reply-To: References: Message-ID: <20160428123731.GA11326@makrotopia.org> Packages may install scripts into /etc/uci-defaults to be executed once after installation, usually at the first boot of the target. This works fine if the package was installed to the rootfs during build or using the ImageBuilder. If the package is installed using opkg during run-time uci-defaults were applied only after a reboot of the device. Avoid the need to reboot by evaluting the package's uci-defaults in default-postinst. Signed-off-by: Daniel Golle --- v2: remove superflus expansions of always-empty variable v3: fix typo in patch description, sorry for the noise... v4: mimic original uci-defaults behaviour more exactly package/base-files/files/lib/functions.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index dde1ac4..8582605 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -214,6 +214,17 @@ default_postinst() { ret=$? fi + if [ -z "$root" ] && grep -q -s "^/etc/uci-defaults/" "$root/usr/lib/opkg/info/${pkgname}.list"; then + . /lib/functions/system.sh + [ -d /tmp/.uci ] || mkdir -p /tmp/.uci + cd /etc/uci-defaults + for i in $(grep -s "^/etc/uci-defaults/" "$root/usr/lib/opkg/info/${pkgname}.list"); do + ( . "./$(basename $i)" ) && rm -f "$i" + done + uci commit + cd $OLDPWD + fi + [ -n "$root" ] || rm -f /tmp/luci-indexcache 2>/dev/null if [ "$PKG_UPGRADE" != "1" ]; then -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Thu Apr 28 08:57:31 2016 From: blogic at openwrt.org (John Crispin) Date: Thu, 28 Apr 2016 14:57:31 +0200 Subject: [OpenWrt-Devel] [PATCH] set mark for locally generated traffic in OUTPUT chain In-Reply-To: <20160428122458.GA11150@makrotopia.org> References: <20160428122458.GA11150@makrotopia.org> Message-ID: <4528f178-9268-ce79-93ac-bfda6909d7d6@openwrt.org> trivia is missing On 28/04/2016 14:25, Daniel Golle wrote: > Signed-off-by: Daniel Golle > --- > rules.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/rules.c b/rules.c > index 756c78d..e20442e 100644 > --- a/rules.c > +++ b/rules.c > @@ -270,7 +270,7 @@ append_chain(struct fw3_ipt_rule *r, struct fw3_rule *rule) > { > snprintf(chain, sizeof(chain), "zone_%s_notrack", rule->src.name); > } > - else if (rule->target == FW3_FLAG_MARK) > + else if (rule->target == FW3_FLAG_MARK && (rule->_src || rule->src.any)) > { > snprintf(chain, sizeof(chain), "PREROUTING"); > } > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Thu Apr 28 09:03:49 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Thu, 28 Apr 2016 15:03:49 +0200 Subject: [OpenWrt-Devel] [PATCH] set mark for locally generated traffic in OUTPUT chain In-Reply-To: <20160428122458.GA11150@makrotopia.org> References: <20160428122458.GA11150@makrotopia.org> Message-ID: <34c5a4e9-a89b-eeef-6ad6-1aa6a31680e8@openwrt.org> Hi Daniel, my stomach feeling tells me that this is okay but can you elaborate on the change? ~ Jo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Thu Apr 28 09:31:07 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Thu, 28 Apr 2016 15:31:07 +0200 Subject: [OpenWrt-Devel] [PATCH] set mark for locally generated traffic in OUTPUT chain In-Reply-To: <34c5a4e9-a89b-eeef-6ad6-1aa6a31680e8@openwrt.org> References: <20160428122458.GA11150@makrotopia.org> <34c5a4e9-a89b-eeef-6ad6-1aa6a31680e8@openwrt.org> Message-ID: <20160428133106.GA1151@makrotopia.org> Hi Jo! On Thu, Apr 28, 2016 at 03:03:49PM +0200, Jo-Philipp Wich wrote: > my stomach feeling tells me that this is okay but can you elaborate on > the change? Currently all marking always happends in the PREROUTING chain. This doesn't catch locally generated traffic and thus also doesn't allow using match extensions like cgroup, owner or socket which are useful e.g. to re-route traffic from a specific local process (eg. dnsmasq). Similar to the rules in other tables, I'd assume that rules without any source should affect locally generated traffic and thus MARK rules should end up in the mangle table's OUTPUT chain in that case. Cheers Daniel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ardeleanalex at gmail.com Thu Apr 28 09:57:13 2016 From: ardeleanalex at gmail.com (Alexandru Ardelean) Date: Thu, 28 Apr 2016 16:57:13 +0300 Subject: [OpenWrt-Devel] [PATCH] ubi-utils: package mkfs.ubifs and mtdinfo into ubi-utils Message-ID: <1461851833-25393-1-git-send-email-ardeleanalex@gmail.com> This is a partial backport from mtd-utils. mtd-utils exposed multiple sub-packages. I think mtd-utils was part of the oldpackages ; I haven't checked. But it seems that mtd-utils and ubi-utils are pretty much the same. The only thing we need on top of ubi-utils are the 'mkfs.ubifs' and 'mtdinfo' commands. I had thought about just adding the 2 cmds to the ubi-utils install rule but maybe for a more generic use-case they might not be needed. Signed-off-by: Alexandru Ardelean --- package/utils/ubi-utils/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/package/utils/ubi-utils/Makefile b/package/utils/ubi-utils/Makefile index b89a5d2..c34e1a2 100644 --- a/package/utils/ubi-utils/Makefile +++ b/package/utils/ubi-utils/Makefile @@ -30,6 +30,10 @@ PKG_MAINTAINER:=John Crispin include $(INCLUDE_DIR)/package.mk +FILES:= \ + mkfs.ubifs:+libuuid:+liblzo:+zlib \ + mtdinfo + define Package/ubi-utils TITLE:=Utilities for ubi info/debug SECTION:=utils @@ -42,6 +46,18 @@ define Package/ubi-utils/description Utilities for manipulating memory technology devices. endef +define PartGen +define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1)))) + TITLE:=$(firstword $(subst :, ,$(1))) package from ubi-utils + URL:=http://www.linux-mtd.infradead.org/ + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@NAND_SUPPORT +ubi-utils $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1))) +endef +endef + +$(foreach file,$(FILES),$(eval $(call PartGen,$(file)))) + MAKE_FLAGS += \ DESTDIR="$(PKG_INSTALL_DIR)" \ BUILDDIR="$(PKG_BUILD_DIR)" \ @@ -57,5 +73,16 @@ define Package/ubi-utils/install $(PKG_INSTALL_DIR)/usr/sbin/{ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/ endef +define PartInstall +define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) \ + $(PKG_INSTALL_DIR)/usr/sbin/$(firstword $(subst :, ,$(1))) \ + $$(1)/usr/sbin/ +endef +endef + +$(foreach file,$(FILES),$(eval $(call PartInstall,$(file)))) $(eval $(call BuildPackage,ubi-utils)) +$(foreach file,$(FILES),$(eval $(call BuildPackage,ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(file))))))) -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Thu Apr 28 09:57:31 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Thu, 28 Apr 2016 15:57:31 +0200 Subject: [OpenWrt-Devel] [PATCH] set mark for locally generated traffic in OUTPUT chain In-Reply-To: <20160428133106.GA1151@makrotopia.org> References: <20160428122458.GA11150@makrotopia.org> <34c5a4e9-a89b-eeef-6ad6-1aa6a31680e8@openwrt.org> <20160428133106.GA1151@makrotopia.org> Message-ID: On Thu, Apr 28, 2016 at 3:31 PM, Daniel Golle wrote: > Hi Jo! > > On Thu, Apr 28, 2016 at 03:03:49PM +0200, Jo-Philipp Wich wrote: > > my stomach feeling tells me that this is okay but can you elaborate on > > the change? > > Currently all marking always happends in the PREROUTING chain. This > doesn't catch locally generated traffic and thus also doesn't allow > using match extensions like cgroup, owner or socket which are useful > e.g. to re-route traffic from a specific local process (eg. dnsmasq). > Similar to the rules in other tables, I'd assume that rules without any > source should affect locally generated traffic and thus MARK rules > should end up in the mangle table's OUTPUT chain in that case. > Indeed an extension which is very much appreciated as we have similar use cases where we mark local traffic for routing decisions, etc ... Hans > > > Cheers > > > Daniel > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 10:01:18 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 16:01:18 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] mvebu: config-4.1: make mmc drivers builtin Message-ID: <1461852082-8290-1-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer This is especially useful on the Clearfog board which boots from mmc by default. Signed-off-by: Josua Mayer --- target/linux/mvebu/config-4.1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/target/linux/mvebu/config-4.1 b/target/linux/mvebu/config-4.1 index ee5c983..73319dd 100644 --- a/target/linux/mvebu/config-4.1 +++ b/target/linux/mvebu/config-4.1 @@ -362,3 +362,27 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y CONFIG_ZONE_DMA_FLAG=0 +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_CB710=n +CONFIG_MMC_CLKGATE=n +CONFIG_MMC_DEBUG=n +CONFIG_MMC_DW=n +CONFIG_MMC_MVSDIO=y +CONFIG_MMC_SDHCI=n +CONFIG_MMC_TEST=n +CONFIG_MMC_TIFM_SD=n +CONFIG_MMC_TOSHIBA_PCI=n +CONFIG_MMC_USDHI6ROL0=n +CONFIG_MMC_USHC=n +CONFIG_MMC_VIA_SDMMC=n +CONFIG_MMC_VUB300=n +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_F_SDH30=n +CONFIG_MMC_SDHCI_OF_ARASAN=n +CONFIG_MMC_SDHCI_PCI=n +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_PXAV3=y +CONFIG_SDIO_UART=n -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 10:01:19 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 16:01:19 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] mvebu: add squashfs image type to MMCProfile In-Reply-To: <1461852082-8290-1-git-send-email-josua.mayer97@gmail.com> References: <1461852082-8290-1-git-send-email-josua.mayer97@gmail.com> Message-ID: <1461852082-8290-2-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer Added gen_mvebu_sdcard_img.sh to create bootable sdcard images. It takes the bootloader and partition images to create a bootable sdcard image. Partition Layout: p1: fat32: for kernel, dtb and boot config files if any p2: squashfs: for openwrt This change is developed for the Clearfog, but should work on all A38x SoCs that can boot from mmc. Signed-off-by: Josua Mayer --- target/linux/mvebu/image/Makefile | 16 ++++ target/linux/mvebu/image/gen_mvebu_sdcard_img.sh | 100 +++++++++++++++++++++++ tools/Makefile | 1 + 3 files changed, 117 insertions(+) create mode 100644 target/linux/mvebu/image/gen_mvebu_sdcard_img.sh diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index cb73c3b..fc5fded 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -107,6 +107,9 @@ define MMCProfile ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) $(call Image/Build/Profile,$(1)/Initramfs) endif + ifneq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),) + $(call Image/Build/squashfs) + endif endef define Image/Build/Profile/$(1)/Initramfs @@ -114,6 +117,19 @@ define MMCProfile cp $(KDIR)/uImage-initramfs-$(2) $(BIN_DIR)/$(IMG_PREFIX)-$(2)-initramfs endef + define Image/Build/Profile/$(1)/squashfs + $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) + cp $(KDIR)/root.squashfs $(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs + rm -f $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 + mkfs.fat -C $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 $(shell echo $$((4*1024)) # 4MB) + mcopy -i $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 $(KDIR)/zImage :: + mcopy -i $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 $(DTS_DIR)/$(2).dtb :: + ./gen_mvebu_sdcard_img.sh "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-squashfs-sdcard.img" \ + "$(BIN_DIR)/uboot-mvebu-clearfog/openwrt-mvebu-clearfog-u-boot-spl.kwb" \ + c "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32" \ + 83 "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs" + endef + PROFILES_LIST += $(1) endef diff --git a/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh new file mode 100644 index 0000000..88d017a --- /dev/null +++ b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh @@ -0,0 +1,100 @@ +#!/bin/bash -x +# +# Copyright (C) 2016 Josua Mayer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# + +usage() { + echo "$0 [ ]?" +} + +# always require first 2 arguments +# then in pairs up to 8 more for a total of up to 4 partitions +if [ $# -lt 2 ] || [ $# -gt 10 ] || [ $((($#-2)%2)) -ne 0 ]; then + usage + exit 1 +fi + +# static settings +SDCARD_HEADS=16 +SDCARD_SECTORS=63 +SDCARD_ALIGNMENT=4096 + +# parameters +OUTFILE="$1" +BOOTLOADER="$2" +# up to 4 partitions +# when calculating size of images in Kilobytes, NEVER round down! +PART1_TYPE=$3 +PART1_IMG="$4" +PART1_SIZE=$((($(stat --print="%s" "$PART1_IMG")+1023)/1024))K +PART2_TYPE=$5 +PART2_IMG="$6" +PART2_SIZE=$((($(stat --print="%s" "$PART2_IMG")+1023)/1024))K +PART3_TYPE=$7 +PART3_IMG="$8" +PART3_SIZE=$((($(stat --print="%s" "$PART3_IMG")+1023)/1024))K +PART4_TYPE=$9 +PART4_IMG="${10}" +PART4_SIZE=$((($(stat --print="%s" "$PART4_IMG")+1023)/1024))K + +# So how many partitions were given? +numparts=$((($#-2)/2)) +case $numparts in + 0) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + ;; + 1) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE` + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + ;; + 2) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE \ + -t $PART2_TYPE -p $PART2_SIZE` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + dd of="$OUTFILE" if="$PART2_IMG" bs=512 seek=$(($2/512)) conv=notrunc + ;; + 3) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE \ + -t $PART2_TYPE -p $PART2_SIZE \ + -t $PART3_TYPE -p $PART3_SIZE` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + dd of="$OUTFILE" if="$PART2_IMG" bs=512 seek=$(($2/512)) conv=notrunc + dd of="$OUTFILE" if="$PART3_IMG" bs=512 seek=$(($3/512)) conv=notrunc + ;; + 4) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE \ + -t $PART2_TYPE -p $PART2_SIZE \ + -t $PART3_TYPE -p $PART3_SIZE \ + -t $PART4_TYPE -p $PART4_SIZE` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + dd of="$OUTFILE" if="$PART2_IMG" bs=512 seek=$(($2/512)) conv=notrunc + dd of="$OUTFILE" if="$PART3_IMG" bs=512 seek=$(($3/512)) conv=notrunc + dd of="$OUTFILE" if="$PART4_IMG" bs=512 seek=$(($4/512)) conv=notrunc +esac diff --git a/tools/Makefile b/tools/Makefile index 187655e..9a08573 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -38,6 +38,7 @@ tools-$(CONFIG_TARGET_x86) += qemu tools-$(CONFIG_TARGET_mxs) += elftosb sdimage tools-$(CONFIG_TARGET_brcm2708)$(CONFIG_TARGET_sunxi)$(CONFIG_TARGET_mxs) += mtools dosfstools tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs +tools-$(CONFIG_TARGET_mvebu) += squashfs dosfstools tools-y += lzma squashfs4 tools-$(BUILD_B43_TOOLS) += b43-tools tools-$(BUILD_PPL_CLOOG) += ppl cloog -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From jow at openwrt.org Thu Apr 28 10:03:08 2016 From: jow at openwrt.org (Jo-Philipp Wich) Date: Thu, 28 Apr 2016 16:03:08 +0200 Subject: [OpenWrt-Devel] [PATCH] set mark for locally generated traffic in OUTPUT chain In-Reply-To: <20160428133106.GA1151@makrotopia.org> References: <20160428122458.GA11150@makrotopia.org> <34c5a4e9-a89b-eeef-6ad6-1aa6a31680e8@openwrt.org> <20160428133106.GA1151@makrotopia.org> Message-ID: Hi Daniel, thanks for the explaination, I was missing the function context. The change is indeed fine, pushed to firewall3.git - thanks! ~ Jo _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 10:10:15 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 16:10:15 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/2] mvebu: config-4.1: make mmc drivers builtin Message-ID: <1461852616-9011-1-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer This is especially useful on the Clearfog board which boots from mmc by default. Signed-off-by: Josua Mayer --- target/linux/mvebu/config-4.1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/target/linux/mvebu/config-4.1 b/target/linux/mvebu/config-4.1 index ee5c983..73319dd 100644 --- a/target/linux/mvebu/config-4.1 +++ b/target/linux/mvebu/config-4.1 @@ -362,3 +362,27 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y CONFIG_ZONE_DMA_FLAG=0 +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_CB710=n +CONFIG_MMC_CLKGATE=n +CONFIG_MMC_DEBUG=n +CONFIG_MMC_DW=n +CONFIG_MMC_MVSDIO=y +CONFIG_MMC_SDHCI=n +CONFIG_MMC_TEST=n +CONFIG_MMC_TIFM_SD=n +CONFIG_MMC_TOSHIBA_PCI=n +CONFIG_MMC_USDHI6ROL0=n +CONFIG_MMC_USHC=n +CONFIG_MMC_VIA_SDMMC=n +CONFIG_MMC_VUB300=n +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_F_SDH30=n +CONFIG_MMC_SDHCI_OF_ARASAN=n +CONFIG_MMC_SDHCI_PCI=n +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_PXAV3=y +CONFIG_SDIO_UART=n -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 10:10:16 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 16:10:16 +0200 Subject: [OpenWrt-Devel] [PATCH v2 2/2] mvebu: add squashfs image type to MMCProfile In-Reply-To: <1461852616-9011-1-git-send-email-josua.mayer97@gmail.com> References: <1461852616-9011-1-git-send-email-josua.mayer97@gmail.com> Message-ID: <1461852616-9011-2-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer Added gen_mvebu_sdcard_img.sh to create bootable sdcard images. It takes the bootloader and partition images to create a bootable sdcard image. Partition Layout: p1: fat32: for kernel, dtb and boot config files if any p2: squashfs: for openwrt This change is developed for the Clearfog, but should work on all A38x SoCs that can boot from mmc. Signed-off-by: Josua Mayer --- target/linux/mvebu/image/Makefile | 16 ++++ target/linux/mvebu/image/gen_mvebu_sdcard_img.sh | 100 +++++++++++++++++++++++ tools/Makefile | 1 + 3 files changed, 117 insertions(+) create mode 100644 target/linux/mvebu/image/gen_mvebu_sdcard_img.sh diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index cb73c3b..fc5fded 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -107,6 +107,9 @@ define MMCProfile ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) $(call Image/Build/Profile,$(1)/Initramfs) endif + ifneq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),) + $(call Image/Build/squashfs) + endif endef define Image/Build/Profile/$(1)/Initramfs @@ -114,6 +117,19 @@ define MMCProfile cp $(KDIR)/uImage-initramfs-$(2) $(BIN_DIR)/$(IMG_PREFIX)-$(2)-initramfs endef + define Image/Build/Profile/$(1)/squashfs + $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) + cp $(KDIR)/root.squashfs $(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs + rm -f $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 + mkfs.fat -C $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 $(shell echo $$((4*1024)) # 4MB) + mcopy -i $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 $(KDIR)/zImage :: + mcopy -i $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 $(DTS_DIR)/$(2).dtb :: + ./gen_mvebu_sdcard_img.sh "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-squashfs-sdcard.img" \ + "$(BIN_DIR)/uboot-mvebu-clearfog/openwrt-mvebu-clearfog-u-boot-spl.kwb" \ + c "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32" \ + 83 "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs" + endef + PROFILES_LIST += $(1) endef diff --git a/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh new file mode 100644 index 0000000..88d017a --- /dev/null +++ b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh @@ -0,0 +1,100 @@ +#!/bin/bash -x +# +# Copyright (C) 2016 Josua Mayer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# + +usage() { + echo "$0 [ ]?" +} + +# always require first 2 arguments +# then in pairs up to 8 more for a total of up to 4 partitions +if [ $# -lt 2 ] || [ $# -gt 10 ] || [ $((($#-2)%2)) -ne 0 ]; then + usage + exit 1 +fi + +# static settings +SDCARD_HEADS=16 +SDCARD_SECTORS=63 +SDCARD_ALIGNMENT=4096 + +# parameters +OUTFILE="$1" +BOOTLOADER="$2" +# up to 4 partitions +# when calculating size of images in Kilobytes, NEVER round down! +PART1_TYPE=$3 +PART1_IMG="$4" +PART1_SIZE=$((($(stat --print="%s" "$PART1_IMG")+1023)/1024))K +PART2_TYPE=$5 +PART2_IMG="$6" +PART2_SIZE=$((($(stat --print="%s" "$PART2_IMG")+1023)/1024))K +PART3_TYPE=$7 +PART3_IMG="$8" +PART3_SIZE=$((($(stat --print="%s" "$PART3_IMG")+1023)/1024))K +PART4_TYPE=$9 +PART4_IMG="${10}" +PART4_SIZE=$((($(stat --print="%s" "$PART4_IMG")+1023)/1024))K + +# So how many partitions were given? +numparts=$((($#-2)/2)) +case $numparts in + 0) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + ;; + 1) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE` + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + ;; + 2) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE \ + -t $PART2_TYPE -p $PART2_SIZE` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + dd of="$OUTFILE" if="$PART2_IMG" bs=512 seek=$(($2/512)) conv=notrunc + ;; + 3) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE \ + -t $PART2_TYPE -p $PART2_SIZE \ + -t $PART3_TYPE -p $PART3_SIZE` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + dd of="$OUTFILE" if="$PART2_IMG" bs=512 seek=$(($2/512)) conv=notrunc + dd of="$OUTFILE" if="$PART3_IMG" bs=512 seek=$(($3/512)) conv=notrunc + ;; + 4) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE \ + -t $PART2_TYPE -p $PART2_SIZE \ + -t $PART3_TYPE -p $PART3_SIZE \ + -t $PART4_TYPE -p $PART4_SIZE` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + dd of="$OUTFILE" if="$PART2_IMG" bs=512 seek=$(($2/512)) conv=notrunc + dd of="$OUTFILE" if="$PART3_IMG" bs=512 seek=$(($3/512)) conv=notrunc + dd of="$OUTFILE" if="$PART4_IMG" bs=512 seek=$(($4/512)) conv=notrunc +esac diff --git a/tools/Makefile b/tools/Makefile index 187655e..9a08573 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -38,6 +38,7 @@ tools-$(CONFIG_TARGET_x86) += qemu tools-$(CONFIG_TARGET_mxs) += elftosb sdimage tools-$(CONFIG_TARGET_brcm2708)$(CONFIG_TARGET_sunxi)$(CONFIG_TARGET_mxs) += mtools dosfstools tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs +tools-$(CONFIG_TARGET_mvebu) += squashfs dosfstools tools-y += lzma squashfs4 tools-$(BUILD_B43_TOOLS) += b43-tools tools-$(BUILD_PPL_CLOOG) += ppl cloog -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ardeleanalex at gmail.com Thu Apr 28 10:10:19 2016 From: ardeleanalex at gmail.com (Alexandru Ardelean) Date: Thu, 28 Apr 2016 17:10:19 +0300 Subject: [OpenWrt-Devel] [PATCH] target/linux/mpc85xx: fix talitos crypto driver init Message-ID: <1461852619-29288-1-git-send-email-ardeleanalex@gmail.com> Crypto hash algorithms must provide the statesize for kernel 4.2+ Referencing commit in the kernel: commit 8996eafdcbad149ac0f772fb1649fbb75c482a6a Author: Russell King Date: Fri Oct 9 20:43:33 2015 +0100 crypto: ahash - ensure statesize is non-zero Unlike shash algorithms, ahash drivers must implement export and import as their descriptors may contain hardware state and cannot be exported as is. Unfortunately some ahash drivers did not provide them and end up causing crashes with algif_hash. This patch adds a check to prevent these drivers from registering ahash algorithms until they are fixed. Cc: stable at vger.kernel.org Signed-off-by: Russell King Signed-off-by: Herbert Xu Signed-off-by: Alexandru Ardelean --- .../302-add-statesize-to-talitos-crypto-driver.sh | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh diff --git a/target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh b/target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh new file mode 100644 index 0000000..4d77c19 --- /dev/null +++ b/target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh @@ -0,0 +1,100 @@ +diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c +index b6f9f42..b786b21 100644 +--- a/drivers/crypto/talitos.c ++++ b/drivers/crypto/talitos.c +@@ -2334,6 +2334,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = MD5_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "md5", + .cra_driver_name = "md5-talitos", +@@ -2349,6 +2350,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA1_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "sha1", + .cra_driver_name = "sha1-talitos", +@@ -2364,6 +2366,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA224_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "sha224", + .cra_driver_name = "sha224-talitos", +@@ -2379,6 +2382,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA256_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "sha256", + .cra_driver_name = "sha256-talitos", +@@ -2394,6 +2398,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA384_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "sha384", + .cra_driver_name = "sha384-talitos", +@@ -2409,6 +2414,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA512_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "sha512", + .cra_driver_name = "sha512-talitos", +@@ -2424,6 +2430,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = MD5_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "hmac(md5)", + .cra_driver_name = "hmac-md5-talitos", +@@ -2439,6 +2446,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA1_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "hmac(sha1)", + .cra_driver_name = "hmac-sha1-talitos", +@@ -2454,6 +2462,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA224_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "hmac(sha224)", + .cra_driver_name = "hmac-sha224-talitos", +@@ -2469,6 +2478,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA256_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "hmac(sha256)", + .cra_driver_name = "hmac-sha256-talitos", +@@ -2484,6 +2494,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA384_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "hmac(sha384)", + .cra_driver_name = "hmac-sha384-talitos", +@@ -2499,6 +2510,7 @@ static struct talitos_alg_template driver_algs[] = { + { .type = CRYPTO_ALG_TYPE_AHASH, + .alg.hash = { + .halg.digestsize = SHA512_DIGEST_SIZE, ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), + .halg.base = { + .cra_name = "hmac(sha512)", + .cra_driver_name = "hmac-sha512-talitos", -- 2.8.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 11:03:21 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 17:03:21 +0200 Subject: [OpenWrt-Devel] [PATCH v3 1/2] mvebu: config-4.1: make mmc drivers builtin Message-ID: <1461855802-15700-1-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer This is especially useful on the Clearfog board which boots from mmc by default. Signed-off-by: Josua Mayer --- target/linux/mvebu/config-4.1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/target/linux/mvebu/config-4.1 b/target/linux/mvebu/config-4.1 index ee5c983..73319dd 100644 --- a/target/linux/mvebu/config-4.1 +++ b/target/linux/mvebu/config-4.1 @@ -362,3 +362,27 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZLIB_DEFLATE=y CONFIG_ZLIB_INFLATE=y CONFIG_ZONE_DMA_FLAG=0 +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_CB710=n +CONFIG_MMC_CLKGATE=n +CONFIG_MMC_DEBUG=n +CONFIG_MMC_DW=n +CONFIG_MMC_MVSDIO=y +CONFIG_MMC_SDHCI=n +CONFIG_MMC_TEST=n +CONFIG_MMC_TIFM_SD=n +CONFIG_MMC_TOSHIBA_PCI=n +CONFIG_MMC_USDHI6ROL0=n +CONFIG_MMC_USHC=n +CONFIG_MMC_VIA_SDMMC=n +CONFIG_MMC_VUB300=n +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_F_SDH30=n +CONFIG_MMC_SDHCI_OF_ARASAN=n +CONFIG_MMC_SDHCI_PCI=n +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_PXAV3=y +CONFIG_SDIO_UART=n -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 11:03:22 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 17:03:22 +0200 Subject: [OpenWrt-Devel] [PATCH v3 2/2] mvebu: add squashfs image type to MMCProfile In-Reply-To: <1461855802-15700-1-git-send-email-josua.mayer97@gmail.com> References: <1461855802-15700-1-git-send-email-josua.mayer97@gmail.com> Message-ID: <1461855802-15700-2-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer Added gen_mvebu_sdcard_img.sh to create bootable sdcard images. It takes the bootloader and partition images to create a bootable sdcard image. Partition Layout: p1: fat32: for kernel, dtb and boot config files if any p2: squashfs: for openwrt This change is developed for the Clearfog, but should work on all A38x SoCs that can boot from mmc. Signed-off-by: Josua Mayer --- target/linux/mvebu/image/Makefile | 16 ++++ target/linux/mvebu/image/gen_mvebu_sdcard_img.sh | 100 +++++++++++++++++++++++ tools/Makefile | 1 + 3 files changed, 117 insertions(+) create mode 100755 target/linux/mvebu/image/gen_mvebu_sdcard_img.sh diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index cb73c3b..fc5fded 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -107,6 +107,9 @@ define MMCProfile ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) $(call Image/Build/Profile,$(1)/Initramfs) endif + ifneq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),) + $(call Image/Build/squashfs) + endif endef define Image/Build/Profile/$(1)/Initramfs @@ -114,6 +117,19 @@ define MMCProfile cp $(KDIR)/uImage-initramfs-$(2) $(BIN_DIR)/$(IMG_PREFIX)-$(2)-initramfs endef + define Image/Build/Profile/$(1)/squashfs + $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) + cp $(KDIR)/root.squashfs $(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs + rm -f $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 + mkfs.fat -C $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 $(shell echo $$((4*1024)) # 4MB) + mcopy -i $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 $(KDIR)/zImage :: + mcopy -i $(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32 $(DTS_DIR)/$(2).dtb :: + ./gen_mvebu_sdcard_img.sh "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-squashfs-sdcard.img" \ + "$(BIN_DIR)/uboot-mvebu-clearfog/openwrt-mvebu-clearfog-u-boot-spl.kwb" \ + c "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-boot.fat32" \ + 83 "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs" + endef + PROFILES_LIST += $(1) endef diff --git a/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh new file mode 100755 index 0000000..88d017a --- /dev/null +++ b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh @@ -0,0 +1,100 @@ +#!/bin/bash -x +# +# Copyright (C) 2016 Josua Mayer +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# + +usage() { + echo "$0 [ ]?" +} + +# always require first 2 arguments +# then in pairs up to 8 more for a total of up to 4 partitions +if [ $# -lt 2 ] || [ $# -gt 10 ] || [ $((($#-2)%2)) -ne 0 ]; then + usage + exit 1 +fi + +# static settings +SDCARD_HEADS=16 +SDCARD_SECTORS=63 +SDCARD_ALIGNMENT=4096 + +# parameters +OUTFILE="$1" +BOOTLOADER="$2" +# up to 4 partitions +# when calculating size of images in Kilobytes, NEVER round down! +PART1_TYPE=$3 +PART1_IMG="$4" +PART1_SIZE=$((($(stat --print="%s" "$PART1_IMG")+1023)/1024))K +PART2_TYPE=$5 +PART2_IMG="$6" +PART2_SIZE=$((($(stat --print="%s" "$PART2_IMG")+1023)/1024))K +PART3_TYPE=$7 +PART3_IMG="$8" +PART3_SIZE=$((($(stat --print="%s" "$PART3_IMG")+1023)/1024))K +PART4_TYPE=$9 +PART4_IMG="${10}" +PART4_SIZE=$((($(stat --print="%s" "$PART4_IMG")+1023)/1024))K + +# So how many partitions were given? +numparts=$((($#-2)/2)) +case $numparts in + 0) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + ;; + 1) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE` + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + ;; + 2) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE \ + -t $PART2_TYPE -p $PART2_SIZE` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + dd of="$OUTFILE" if="$PART2_IMG" bs=512 seek=$(($2/512)) conv=notrunc + ;; + 3) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE \ + -t $PART2_TYPE -p $PART2_SIZE \ + -t $PART3_TYPE -p $PART3_SIZE` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + dd of="$OUTFILE" if="$PART2_IMG" bs=512 seek=$(($2/512)) conv=notrunc + dd of="$OUTFILE" if="$PART3_IMG" bs=512 seek=$(($3/512)) conv=notrunc + ;; + 4) + set `ptgen -o "$OUTFILE" \ + -h $SDCARD_HEADS -s $SDCARD_SECTORS -l $SDCARD_ALIGNMENT \ + -t $PART1_TYPE -p $PART1_SIZE \ + -t $PART2_TYPE -p $PART2_SIZE \ + -t $PART3_TYPE -p $PART3_SIZE \ + -t $PART4_TYPE -p $PART4_SIZE` + dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc + dd of="$OUTFILE" if="$PART1_IMG" bs=512 seek=$(($1/512)) conv=notrunc + dd of="$OUTFILE" if="$PART2_IMG" bs=512 seek=$(($2/512)) conv=notrunc + dd of="$OUTFILE" if="$PART3_IMG" bs=512 seek=$(($3/512)) conv=notrunc + dd of="$OUTFILE" if="$PART4_IMG" bs=512 seek=$(($4/512)) conv=notrunc +esac diff --git a/tools/Makefile b/tools/Makefile index 187655e..9a08573 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -38,6 +38,7 @@ tools-$(CONFIG_TARGET_x86) += qemu tools-$(CONFIG_TARGET_mxs) += elftosb sdimage tools-$(CONFIG_TARGET_brcm2708)$(CONFIG_TARGET_sunxi)$(CONFIG_TARGET_mxs) += mtools dosfstools tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs +tools-$(CONFIG_TARGET_mvebu) += squashfs dosfstools tools-y += lzma squashfs4 tools-$(BUILD_B43_TOOLS) += b43-tools tools-$(BUILD_PPL_CLOOG) += ppl cloog -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From J.Eymann at gmx.net Thu Apr 28 11:18:45 2016 From: J.Eymann at gmx.net (Jonas Eymann) Date: Thu, 28 Apr 2016 17:18:45 +0200 Subject: [OpenWrt-Devel] [PATCH] target/linux/mpc85xx: fix talitos crypto driver init In-Reply-To: <1461852619-29288-1-git-send-email-ardeleanalex@gmail.com> References: <1461852619-29288-1-git-send-email-ardeleanalex@gmail.com> Message-ID: Hi Alexandru, > > Crypto hash algorithms must provide the statesize for > kernel 4.2+ > > Referencing commit in the kernel: > > commit 8996eafdcbad149ac0f772fb1649fbb75c482a6a > Author: Russell King > Date: Fri Oct 9 20:43:33 2015 +0100 > > crypto: ahash - ensure statesize is non-zero > > Unlike shash algorithms, ahash drivers must implement export > and import as their descriptors may contain hardware state and > cannot be exported as is. Unfortunately some ahash drivers did > not provide them and end up causing crashes with algif_hash. > > This patch adds a check to prevent these drivers from registering > ahash algorithms until they are fixed. > > Cc: stable at vger.kernel.org > Signed-off-by: Russell King > Signed-off-by: Herbert Xu > > Signed-off-by: Alexandru Ardelean > --- > .../302-add-statesize-to-talitos-crypto-driver.sh | 100 +++++++++++++++++++++ > 1 file changed, 100 insertions(+) > create mode 100644 target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh > > diff --git a/target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh b/target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh > new file mode 100644 > index 0000000..4d77c19 > --- /dev/null > +++ b/target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh > @@ -0,0 +1,100 @@ > +diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c > +index b6f9f42..b786b21 100644 > +--- a/drivers/crypto/talitos.c > ++++ b/drivers/crypto/talitos.c > +@@ -2334,6 +2334,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = MD5_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "md5", > + .cra_driver_name = "md5-talitos", > +@@ -2349,6 +2350,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA1_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "sha1", > + .cra_driver_name = "sha1-talitos", > +@@ -2364,6 +2366,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA224_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "sha224", > + .cra_driver_name = "sha224-talitos", > +@@ -2379,6 +2382,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA256_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "sha256", > + .cra_driver_name = "sha256-talitos", > +@@ -2394,6 +2398,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA384_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "sha384", > + .cra_driver_name = "sha384-talitos", > +@@ -2409,6 +2414,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA512_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "sha512", > + .cra_driver_name = "sha512-talitos", > +@@ -2424,6 +2430,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = MD5_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "hmac(md5)", > + .cra_driver_name = "hmac-md5-talitos", > +@@ -2439,6 +2446,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA1_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "hmac(sha1)", > + .cra_driver_name = "hmac-sha1-talitos", > +@@ -2454,6 +2462,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA224_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "hmac(sha224)", > + .cra_driver_name = "hmac-sha224-talitos", > +@@ -2469,6 +2478,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA256_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "hmac(sha256)", > + .cra_driver_name = "hmac-sha256-talitos", > +@@ -2484,6 +2494,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA384_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "hmac(sha384)", > + .cra_driver_name = "hmac-sha384-talitos", > +@@ -2499,6 +2510,7 @@ static struct talitos_alg_template driver_algs[] = { > + { .type = CRYPTO_ALG_TYPE_AHASH, > + .alg.hash = { > + .halg.digestsize = SHA512_DIGEST_SIZE, > ++ .halg.statesize = sizeof(struct talitos_ahash_req_ctx), > + .halg.base = { > + .cra_name = "hmac(sha512)", > + .cra_driver_name = "hmac-sha512-talitos", > -- > 2.8.1 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > AFAIK just setting the statesize is not sufficient as the driver also needs to implement the state import/export functions. However, this was implemented recently by Horia Geanta and already applied to cryptodev-2.6 as commit id 3639ca840df953f9af6f15fc8a6bf77f19075ab1. It assume it will be merged to the mainline kernel in the next merge window. Jonas _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From ardeleanalex at gmail.com Thu Apr 28 11:54:04 2016 From: ardeleanalex at gmail.com (Alexandru Ardelean) Date: Thu, 28 Apr 2016 18:54:04 +0300 Subject: [OpenWrt-Devel] [PATCH] target/linux/mpc85xx: fix talitos crypto driver init In-Reply-To: References: <1461852619-29288-1-git-send-email-ardeleanalex@gmail.com> Message-ID: On Thu, Apr 28, 2016 at 6:18 PM, Jonas Eymann wrote: > Hi Alexandru, > > > > > Crypto hash algorithms must provide the statesize for > > kernel 4.2+ > > > > Referencing commit in the kernel: > > > > commit 8996eafdcbad149ac0f772fb1649fbb75c482a6a > > Author: Russell King > > Date: Fri Oct 9 20:43:33 2015 +0100 > > > > crypto: ahash - ensure statesize is non-zero > > > > Unlike shash algorithms, ahash drivers must implement export > > and import as their descriptors may contain hardware state and > > cannot be exported as is. Unfortunately some ahash drivers did > > not provide them and end up causing crashes with algif_hash. > > > > This patch adds a check to prevent these drivers from registering > > ahash algorithms until they are fixed. > > > > Cc: stable at vger.kernel.org > > Signed-off-by: Russell King > > Signed-off-by: Herbert Xu > > > > Signed-off-by: Alexandru Ardelean > > --- > > .../302-add-statesize-to-talitos-crypto-driver.sh | 100 > +++++++++++++++++++++ > > 1 file changed, 100 insertions(+) > > create mode 100644 > target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh > > > > diff --git > a/target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh > b/target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh > > new file mode 100644 > > index 0000000..4d77c19 > > --- /dev/null > > +++ > b/target/linux/mpc85xx/patches-4.4/302-add-statesize-to-talitos-crypto-driver.sh > > @@ -0,0 +1,100 @@ > > +diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c > > +index b6f9f42..b786b21 100644 > > +--- a/drivers/crypto/talitos.c > > ++++ b/drivers/crypto/talitos.c > > +@@ -2334,6 +2334,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = MD5_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "md5", > > + .cra_driver_name = "md5-talitos", > > +@@ -2349,6 +2350,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA1_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "sha1", > > + .cra_driver_name = "sha1-talitos", > > +@@ -2364,6 +2366,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA224_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "sha224", > > + .cra_driver_name = "sha224-talitos", > > +@@ -2379,6 +2382,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA256_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "sha256", > > + .cra_driver_name = "sha256-talitos", > > +@@ -2394,6 +2398,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA384_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "sha384", > > + .cra_driver_name = "sha384-talitos", > > +@@ -2409,6 +2414,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA512_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "sha512", > > + .cra_driver_name = "sha512-talitos", > > +@@ -2424,6 +2430,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = MD5_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "hmac(md5)", > > + .cra_driver_name = "hmac-md5-talitos", > > +@@ -2439,6 +2446,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA1_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "hmac(sha1)", > > + .cra_driver_name = "hmac-sha1-talitos", > > +@@ -2454,6 +2462,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA224_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "hmac(sha224)", > > + .cra_driver_name = "hmac-sha224-talitos", > > +@@ -2469,6 +2478,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA256_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "hmac(sha256)", > > + .cra_driver_name = "hmac-sha256-talitos", > > +@@ -2484,6 +2494,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA384_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "hmac(sha384)", > > + .cra_driver_name = "hmac-sha384-talitos", > > +@@ -2499,6 +2510,7 @@ static struct talitos_alg_template driver_algs[] > = { > > + { .type = CRYPTO_ALG_TYPE_AHASH, > > + .alg.hash = { > > + .halg.digestsize = SHA512_DIGEST_SIZE, > > ++ .halg.statesize = sizeof(struct > talitos_ahash_req_ctx), > > + .halg.base = { > > + .cra_name = "hmac(sha512)", > > + .cra_driver_name = "hmac-sha512-talitos", > > -- > > 2.8.1 > > _______________________________________________ > > openwrt-devel mailing list > > openwrt-devel at lists.openwrt.org > > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > > > AFAIK just setting the statesize is not sufficient as the driver also > needs to implement the state import/export functions. However, this was > implemented recently by Horia Geanta and already applied to cryptodev-2.6 > as commit id > 3639ca840df953f9af6f15fc8a6bf77f19075ab1. It assume it will be merged to > the mainline kernel in the next merge window. > > Jonas > Thanks for the heads-up Jonas. Seems I was a bit naive ; I just modified the driver this and it built fine. I'll take a look there and try to backport the patch. I'll submit it to the OpenWrt list. At the moment I'm in the midst of sync-ing our tree with OpenWrt trunk and plenty of stuff needs re-sync-ing. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 13:39:19 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 19:39:19 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] mount_root: implement overlay= boot option Message-ID: <1461865160-26373-1-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer This change adds code to handle a new option on cmdline: overlay= This is used to find the rootfs_data partition / disk when it has a non-standard name or location. It takes either the device node name, or the full path to the device node: i.e. /dev/mmcblk0p3 or mmcblk0p3 This option has precedence over the default name "rootfs_data", and extroot. Signed-off-by: Josua Mayer . --- mount_root.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/mount_root.c b/mount_root.c index 47a3409..9d2c0de 100644 --- a/mount_root.c +++ b/mount_root.c @@ -33,6 +33,35 @@ start(int argc, char *argv[1]) if (!getenv("PREINIT")) return -1; + /* + * Check cmdline for a hint about overlay device + */ + if(!data) { + FILE *fp; + char buffer[100] = {0}; + + fp = fopen("/proc/cmdline", "r"); + while(!feof(fp)) { + if(fscanf(fp, "overlay=%s", buffer)) + break; + + fseek(fp, 1, SEEK_CUR); + } + fclose(fp); + + // overlay= argument was found + if(buffer[0]) { + // strip /dev/ prefix if any + int offset = 0; + if(strstr(buffer, "/dev/")) + offset = 5; + + // try to find the volume + ULOG_NOTE("Looking for overlay device given on commandline\n"); + data = volume_find(buffer + offset); + } + } + if (!data) { root = volume_find("rootfs"); volume_init(root); -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 13:39:20 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 19:39:20 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] ext4_part_match: fix bug that prevented matching names In-Reply-To: <1461865160-26373-1-git-send-email-josua.mayer97@gmail.com> References: <1461865160-26373-1-git-send-email-josua.mayer97@gmail.com> Message-ID: <1461865160-26373-2-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer Actually use the populated devname variable to compare against given name, instead of the buf variable, which incidentally contains either: MAJOR=xyz, MINOR=x, or DEVTYPE=partition, none of which ever match a name. Signed-off-by: Josua Mayer --- libfstools/ext4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfstools/ext4.c b/libfstools/ext4.c index f648aa8..b9401c3 100644 --- a/libfstools/ext4.c +++ b/libfstools/ext4.c @@ -78,7 +78,7 @@ ext4_part_match(char *dev, char *name, char *filename) continue; } /* Match partition name */ - if (strstr(buf, name)) { + if (strstr(devname, name)) { ret = 0; break; } -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 14:20:19 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 20:20:19 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/3] mount_root: implement overlay= boot option Message-ID: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer This change adds code to handle a new option on cmdline: overlay= This is used to find the rootfs_data partition / disk when it has a non-standard name or location. It takes either the device node name, or the full path to the device node: i.e. /dev/mmcblk0p3 or mmcblk0p3 This option has precedence over the default name "rootfs_data", and extroot. Signed-off-by: Josua Mayer . --- mount_root.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/mount_root.c b/mount_root.c index 47a3409..9d2c0de 100644 --- a/mount_root.c +++ b/mount_root.c @@ -33,6 +33,35 @@ start(int argc, char *argv[1]) if (!getenv("PREINIT")) return -1; + /* + * Check cmdline for a hint about overlay device + */ + if(!data) { + FILE *fp; + char buffer[100] = {0}; + + fp = fopen("/proc/cmdline", "r"); + while(!feof(fp)) { + if(fscanf(fp, "overlay=%s", buffer)) + break; + + fseek(fp, 1, SEEK_CUR); + } + fclose(fp); + + // overlay= argument was found + if(buffer[0]) { + // strip /dev/ prefix if any + int offset = 0; + if(strstr(buffer, "/dev/")) + offset = 5; + + // try to find the volume + ULOG_NOTE("Looking for overlay device given on commandline\n"); + data = volume_find(buffer + offset); + } + } + if (!data) { root = volume_find("rootfs"); volume_init(root); -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 14:20:20 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 20:20:20 +0200 Subject: [OpenWrt-Devel] [PATCH v2 2/3] ext4_part_match: fix bug that prevented matching names In-Reply-To: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> References: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> Message-ID: <1461867621-4055-2-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer Actually use the populated devname variable to compare against given name, instead of the buf variable, which incidentally contains either: MAJOR=xyz, MINOR=x, or DEVTYPE=partition, none of which ever match a name. Signed-off-by: Josua Mayer --- libfstools/ext4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfstools/ext4.c b/libfstools/ext4.c index f648aa8..b9401c3 100644 --- a/libfstools/ext4.c +++ b/libfstools/ext4.c @@ -78,7 +78,7 @@ ext4_part_match(char *dev, char *name, char *filename) continue; } /* Match partition name */ - if (strstr(buf, name)) { + if (strstr(devname, name)) { ret = 0; break; } -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Thu Apr 28 14:20:21 2016 From: josua.mayer97 at gmail.com (josua.mayer97 at gmail.com) Date: Thu, 28 Apr 2016 20:20:21 +0200 Subject: [OpenWrt-Devel] [PATCH v2 3/3] mount_root: Also handle new overlay= option in done() In-Reply-To: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> References: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> Message-ID: <1461867621-4055-3-git-send-email-josua.mayer97@gmail.com> From: Josua Mayer The done()-function is used both to initialize rootfs_data when there is no filesystem yet, but also to set ready-state on fresh filesystems. Make sure to also do that when a non-standard overlay device is specified. Signed-off-by: Josua Mayer --- mount_root.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/mount_root.c b/mount_root.c index 9d2c0de..e9b2cf3 100644 --- a/mount_root.c +++ b/mount_root.c @@ -124,8 +124,39 @@ stop(int argc, char *argv[1]) static int done(int argc, char *argv[1]) { - struct volume *v = volume_find("rootfs_data"); + struct volume *v = NULL; + FILE *fp; + char buffer[100] = {0}; + /* + * First check if there is an overlay device hint in cmdline + */ + fp = fopen("/proc/cmdline", "r"); + while(!feof(fp)) { + if(fscanf(fp, "overlay=%s", buffer)) + break; + + fseek(fp, 1, SEEK_CUR); + } + fclose(fp); + if(buffer[0]) { + // strip /dev/ prefix if any + int offset = 0; + if(strstr(buffer, "/dev/")) + offset = 5; + + v = volume_find(buffer + offset); + } + + /* + * Now look for standard overlay device name + */ + if(!v) + v = volume_find("rootfs_data"); + + /* + * If no overlay device exists, then there is nothing to do here + */ if (!v) return -1; -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From andrej.vlasic at sartura.hr Thu Apr 28 17:59:08 2016 From: andrej.vlasic at sartura.hr (Andrej Vlasic) Date: Thu, 28 Apr 2016 21:59:08 +0000 Subject: [OpenWrt-Devel] [PATCH v3 1/2] mvebu: config-4.1: make mmc drivers builtin In-Reply-To: <1461855802-15700-1-git-send-email-josua.mayer97@gmail.com> References: <1461855802-15700-1-git-send-email-josua.mayer97@gmail.com> Message-ID: <010001545ee1f9d7-e80e4bcf-6c52-461f-9076-c3be74ebbb06-000000@email.amazonses.com> Hi Josua, On 28.04.2016 17:03, josua.mayer97 at gmail.com wrote: > From: Josua Mayer > > This is especially useful on the Clearfog board which boots from mmc by > default. > > Signed-off-by: Josua Mayer > --- > target/linux/mvebu/config-4.1 | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/target/linux/mvebu/config-4.1 b/target/linux/mvebu/config-4.1 > index ee5c983..73319dd 100644 > --- a/target/linux/mvebu/config-4.1 > +++ b/target/linux/mvebu/config-4.1 > @@ -362,3 +362,27 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 > CONFIG_ZLIB_DEFLATE=y > CONFIG_ZLIB_INFLATE=y > CONFIG_ZONE_DMA_FLAG=0 > +CONFIG_MMC=y > +CONFIG_MMC_BLOCK=y > +CONFIG_MMC_BLOCK_BOUNCE=y > +CONFIG_MMC_BLOCK_MINORS=8 > +CONFIG_MMC_CB710=n > +CONFIG_MMC_CLKGATE=n > +CONFIG_MMC_DEBUG=n > +CONFIG_MMC_DW=n > +CONFIG_MMC_MVSDIO=y > +CONFIG_MMC_SDHCI=n > +CONFIG_MMC_TEST=n > +CONFIG_MMC_TIFM_SD=n > +CONFIG_MMC_TOSHIBA_PCI=n > +CONFIG_MMC_USDHI6ROL0=n > +CONFIG_MMC_USHC=n > +CONFIG_MMC_VIA_SDMMC=n > +CONFIG_MMC_VUB300=n > +CONFIG_MMC_SDHCI=y > +CONFIG_MMC_SDHCI_F_SDH30=n > +CONFIG_MMC_SDHCI_OF_ARASAN=n > +CONFIG_MMC_SDHCI_PCI=n > +CONFIG_MMC_SDHCI_PLTFM=y > +CONFIG_MMC_SDHCI_PXAV3=y > +CONFIG_SDIO_UART=n > Instead of adding those config options to default kernel config, it would be better to create new mvebu subtarget, maybe called "harddisk" that has support for external boot devices. _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From Alexey.Brodkin at synopsys.com Thu Apr 28 18:12:30 2016 From: Alexey.Brodkin at synopsys.com (Alexey Brodkin) Date: Fri, 29 Apr 2016 01:12:30 +0300 Subject: [OpenWrt-Devel] [PATCH] libffi: bump to version 3.2.1 Message-ID: <1461881550-5126-1-git-send-email-abrodkin@synopsys.com> Among many fixes and improvements this new version adds support of ARC architecture (ARC port was actually introduced in v3.1 but while at it why not to update to the most recent version). Which allows to build dependent projects like Python etc. Signed-off-by: Alexey Brodkin --- libs/libffi/Makefile | 6 ++-- libs/libffi/patches/001-fix-includedir-pkg.patch | 36 ------------------------ 2 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 libs/libffi/patches/001-fix-includedir-pkg.patch diff --git a/libs/libffi/Makefile b/libs/libffi/Makefile index cd16a85..b5daa13 100644 --- a/libs/libffi/Makefile +++ b/libs/libffi/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libffi -PKG_VERSION:=3.0.13 +PKG_VERSION:=3.2.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/ -PKG_MD5SUM:=45f3b6dbc9ee7c7dfbbbc5feba571529 +PKG_MD5SUM:=83b89587607e3eb65c70d361f13bab43 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE @@ -66,7 +66,7 @@ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/*.h \ + $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)-$(PKG_VERSION)/include/*.h \ $(1)/usr/include/ endef diff --git a/libs/libffi/patches/001-fix-includedir-pkg.patch b/libs/libffi/patches/001-fix-includedir-pkg.patch deleted file mode 100644 index 812d7a4..0000000 --- a/libs/libffi/patches/001-fix-includedir-pkg.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/libffi.pc.in -+++ b/libffi.pc.in -@@ -1,10 +1,10 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ --includedir=${libdir}/@PACKAGE_NAME at -@PACKAGE_VERSION@/include -+includedir=@includedir@ - - Name: @PACKAGE_NAME@ - Description: Library supporting Foreign Function Interfaces - Version: @PACKAGE_VERSION@ --Libs: -L${libdir} -lffi --Cflags: -I${includedir} -+Libs: -lffi -+Cflags: ---- a/include/Makefile.am -+++ b/include/Makefile.am -@@ -5,5 +5,5 @@ AUTOMAKE_OPTIONS=foreign - DISTCLEANFILES=ffitarget.h - EXTRA_DIST=ffi.h.in ffi_common.h - --includesdir = $(libdir)/@PACKAGE_NAME at -@PACKAGE_VERSION@/include -+includesdir = $(includedir) - nodist_includes_HEADERS = ffi.h ffitarget.h ---- a/include/Makefile.in -+++ b/include/Makefile.in -@@ -250,7 +250,7 @@ top_srcdir = @top_srcdir@ - AUTOMAKE_OPTIONS = foreign - DISTCLEANFILES = ffitarget.h - EXTRA_DIST = ffi.h.in ffi_common.h --includesdir = $(libdir)/@PACKAGE_NAME at -@PACKAGE_VERSION@/include -+includesdir = $(includedir) - nodist_includes_HEADERS = ffi.h ffitarget.h - all: all-am - -- 2.5.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zajec5 at gmail.com Fri Apr 29 01:47:19 2016 From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=) Date: Fri, 29 Apr 2016 07:47:19 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/3] mount_root: implement overlay= boot option In-Reply-To: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> References: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> Message-ID: On 28 April 2016 at 20:20, wrote: > @@ -33,6 +33,35 @@ start(int argc, char *argv[1]) > if (!getenv("PREINIT")) > return -1; > > + /* > + * Check cmdline for a hint about overlay device > + */ > + if(!data) { > + FILE *fp; > + char buffer[100] = {0}; > + > + fp = fopen("/proc/cmdline", "r"); > + while(!feof(fp)) { > + if(fscanf(fp, "overlay=%s", buffer)) > + break; Please keep coding style consistent across the project. You can see there is: if (!getenv("PREINIT")) with space after "if". Please update your code to use the same style, e.g.: if (!data) while (!feof(fp)) { _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From zajec5 at gmail.com Fri Apr 29 01:48:24 2016 From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=) Date: Fri, 29 Apr 2016 07:48:24 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/3] mount_root: implement overlay= boot option In-Reply-To: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> References: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> Message-ID: On 28 April 2016 at 20:20, wrote: > From: Josua Mayer > > This change adds code to handle a new option on cmdline: overlay= > This is used to find the rootfs_data partition / disk when it has a > non-standard name or location. > > It takes either the device node name, or the full path to the device node: > i.e. /dev/mmcblk0p3 or mmcblk0p3 > > This option has precedence over the default name "rootfs_data", and extroot. > > Signed-off-by: Josua Mayer . Why are you using fake e-mail address in "From"? _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Fri Apr 29 07:24:26 2016 From: john at phrozen.org (John Crispin) Date: Fri, 29 Apr 2016 13:24:26 +0200 Subject: [OpenWrt-Devel] [PATCH 2/6] dropbear: Make utmp and putuline support configurable via seperate config options In-Reply-To: <1461748442-9469-2-git-send-email-dedeckeh@gmail.com> References: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> <1461748442-9469-2-git-send-email-dedeckeh@gmail.com> Message-ID: <53c17692-a6a4-d0c0-4789-3b9ba57ca7a8@phrozen.org> Hi, comment inline On 27/04/2016 11:13, Hans Dedecker wrote: > Utmp support tracks who is currenlty logged in by logging info to the file /var/run/utmp (supported by busybox) > Putuline support will use the utmp structure to write to the utmp file > > Signed-off-by: Hans Dedecker > --- > package/network/services/dropbear/Config.in | 15 +++++++++++++++ > package/network/services/dropbear/Makefile | 5 ++--- > 2 files changed, 17 insertions(+), 3 deletions(-) > > diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in > index 3316c84..7c2edd7 100644 > --- a/package/network/services/dropbear/Config.in > +++ b/package/network/services/dropbear/Config.in > @@ -32,4 +32,19 @@ config DROPBEAR_ECC > > Increases binary size by about 23 kB (MIPS). > > +config DROPBEAR_UTMP > + bool "Utmp support" > + default n > + depends on BUSYBOX_CONFIG_FEATURE_UTMP > + help > + This enables dropbear utmp support, the file /var/run/utmp is used to > + track who is currently logged in. > + > +config DROPBEAR_PUTUTLINE > + bool "Pututline support" > + default n > + depends on DROPBEAR_UTMP > + help > + Dropbear will use pututline() to write the utmp structure into the utmp file. > + > endmenu > diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile > index 39ab04b..593e0a8 100644 > --- a/package/network/services/dropbear/Makefile > +++ b/package/network/services/dropbear/Makefile > @@ -68,12 +68,11 @@ CONFIGURE_ARGS += \ > --enable-syslog \ > $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \ > --disable-lastlog \ > - --disable-utmp \ > - --disable-utmpx \ > + $(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \ what happened to --disable-utmpx ? John > --disable-wtmp \ > --disable-wtmpx \ > --disable-loginfunc \ > - --disable-pututline \ > + $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \ > --disable-pututxline \ > --disable-zlib \ > --enable-bundled-libtom > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Fri Apr 29 07:30:47 2016 From: john at phrozen.org (John Crispin) Date: Fri, 29 Apr 2016 13:30:47 +0200 Subject: [OpenWrt-Devel] [PATCHv9] ramips: Add support for SamKnows Whitebox 8 In-Reply-To: <1461707269.28116.2.camel@ndoo.sg> References: <1461707269.28116.2.camel@ndoo.sg> Message-ID: Hi, please drop the mt76 part from the patch it is already merged in the mt76 tree on github and will hit trunk soon. also patch does not apply as shown below. John ../patchwork 615343 --2016-04-28 09:07:34-- http://patchwork.ozlabs.org/patch/615343/mbox/ Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67 Connecting to patchwork.ozlabs.org (patchwork.ozlabs.org)|103.22.144.67|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/plain] Saving to: `615343.patch' [ <=> ] 14,542 31.0K/s in 0.5s 2016-04-28 09:07:36 (31.0 KB/s) - `615343.patch' saved [14542] Applying: ramips: Add support for SamKnows Whitebox 8 fatal: corrupt patch at line 22 Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 ramips: Add support for SamKnows Whitebox 8 When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". applying 615343 FAILED On 26/04/2016 23:47, Andrew Yong wrote: > PATCHv1: > This patch adds support for the SamKnows version 8.0 Whitebox, built > around the MT7621 platform. 2.4GHz appears to be working, albeit > poorly; 5GHz not working yet. > > PATCHv2: > - Fixed LED name in DTS. > > PATCHv3: > DTS: Syntax error fixed, LEDs and buttons mapped correctly now > - diag.sh updated to blink WPS LED on boot > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > matches SamKnows firmware > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > PATCHv4: > - I didn't commit some fixes in PATCHv3, that's fixed now > > PATCHv5: > - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter > to prevent soft brick by booting into nonexistent backup partition > - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, > needs further investigation, effective txpower is still 0) > - Experimenting on wifi but that'll be a future patch, board boots fine now. > > PATCHv6: > - Used init script to reset bootcount, preinit is too early to use fw-setenv > > PATCHv7: > - Added model to sysupgrade. Tested thoroughly in general and I'm happy with this. Sorry for the many revisions. > > PATCHv8: > - Added SamKnows recovery partition to partition table, in case someone specifically wants to send their bootloader to it > - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into mt76 kernel module (verified that signal strength on both bands is good, tested AP and STA modes > > PATCHv9: > - Fixed LAN MAC address EEPROM offset > - Fixed mt76 patch whitespace issues > - Renamed mt76 patch to mt7602en to accurately reflect the physical chip it's supporting > > Author: Andrew Yong > Date: Wed Apr 27 05:40:26 2016 +0800 > > Initial support for SamKnows Whitebox 8 > > Signed-off-by: Andrew Yong > > diff --git a/000-mt7602en.patch b/000-mt7602en.patch > new file mode 100644 > index 0000000..e357bbb > --- /dev/null > +++ b/000-mt7602en.patch > @@ -0,0 +1,10 @@ > +--- a/mt76x2_pci.c > ++++ b/mt76x2_pci.c > +@@ -20,6 +20,7 @@ > + > + static const struct pci_device_id mt76pci_device_table[] = { > + { PCI_DEVICE(0x14c3, 0x7662) }, > ++ { PCI_DEVICE(0x14c3, 0x7612) }, > + { }, > + }; > + > diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips > index a759bcc..9ad5974 100644 > --- a/package/boot/uboot-envtools/files/ramips > +++ b/package/boot/uboot-envtools/files/ramips > @@ -24,7 +24,8 @@ linkits7688d | \ > wsr-600 | \ > wsr-1166 | \ > br6425 | \ > -miwifi-nano) > +miwifi-nano | \ > +sk-wb8) > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" > ;; > esac > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds > index aeaab33..a47eacf 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -243,6 +243,9 @@ rt-n14u) > set_wifi_led "$board:blue:air" > set_usb_led "$board:blue:usb" > ;; > +sk-wb8) > + set_usb_led "$board:green:usb" > + ;; > tiny-ac) > set_wifi_led "$board:orange:wifi" > set_usb_led "$board:green:usb" > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network > index c6c740f..4bc1d6e 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > pbr-m1|\ > psg1208|\ > sap-g3200u3|\ > + sk-wb8|\ > wf-2881|\ > whr-300hp2|\ > whr-600d|\ > @@ -313,6 +314,9 @@ ramips_setup_macs() > lan_mac=$(macaddr_setbit_la "$lan_mac") > wan_mac=$(mtd_get_mac_binary factory 32772) > ;; > + sk-wb8) > + wan_mac=$(mtd_get_mac_binary factory 57344) > + ;; > tew-691gr) > lan_mac=$(cat /sys/class/net/eth0/address) > wan_mac=$(macaddr_add "$lan_mac" 3) > diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh > index 20ff8ff..e98226d 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -78,6 +78,7 @@ get_status_led() { > ;; > awapn2403|\ > dir-645|\ > + sk-wb8|\ > wrh-300cr) > status_led="$board:green:wps" > ;; > diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount > new file mode 100755 > index 0000000..b93e3c9 > --- /dev/null > +++ b/target/linux/ramips/base-files/etc/init.d/bootcount > @@ -0,0 +1,11 @@ > +#!/bin/sh /etc/rc.common > +. /lib/ramips.sh > + > +START=99 > + > +start() { > + local board=$(ramips_board_name) > + if [ $board = "sk-wb8" ]; then > + fw_setenv bootcount 0 > + fi > +} > diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh > index 2c669c5..f89e52d 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -373,6 +373,9 @@ ramips_board_detect() { > *"RUT5XX") > name="rut5xx" > ;; > + *"SamKnows Whitebox 8") > + name="sk-wb8" > + ;; > *"SAP-G3200U3") > name="sap-g3200u3" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index 2b24030..4e5cb07 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -111,6 +111,7 @@ platform_check_image() { > rt-n56u|\ > rut5xx|\ > sap-g3200u3|\ > + sk-wb8|\ > sl-r7205|\ > tew-691gr|\ > tew-692gr|\ > diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts > new file mode 100644 > index 0000000..350cb4a > --- /dev/null > +++ b/target/linux/ramips/dts/SK-WB8.dts > @@ -0,0 +1,127 @@ > +/dts-v1/; > + > +#include "mt7621.dtsi" > + > +/ { > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > + model = "SamKnows Whitebox 8"; > + > + memory at 0 { > + device_type = "memory"; > + reg = <0x0 0x8000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,57600"; > + }; > + > + palmbus at 1E000000 { > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "mx25l6405d"; > + reg = <0 0>; > + linux,modalias = "m25p80"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x7b0000>; > + }; > + > + partition at e30000 { > + label = "recovery"; > + reg = <0xe30000 0x1d0000>; > + }; > + > + }; > + }; > + }; > + > + pcie at 1e140000 { > + status = "okay"; > + > + pcie0 { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + > + pcie1 { > + mt76 at 1,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x0000>; > + mediatek,5ghz = <0>; > + }; > + }; > + }; > + > + ethernet at 1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + wps { > + label = "sk-wb8:green:wps"; > + gpios = <&gpio1 14 1>; > + }; > + > + usb { > + label = "sk-wb8:green:usb"; > + gpios = <&gpio1 15 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + wps { > + label = "wps"; > + gpios = <&gpio1 11 1>; > + linux,code = <0x211>; > + }; > + reset { > + label = "reset"; > + gpios = <&gpio1 9 1>; > + linux,code = <0x198>; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; > + ralink,function = "gpio"; > + }; > + }; > + }; > + > +}; > diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk > index 1b8d3da..a09f4ab 100644 > --- a/target/linux/ramips/image/mt7621.mk > +++ b/target/linux/ramips/image/mt7621.mk > @@ -138,6 +138,12 @@ define Device/ubnt-erx > endef > TARGET_DEVICES += ubnt-erx > > +define Device/sk-wb8 > + DTS := SK-WB8 > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > +endef > +TARGET_DEVICES += sk-wb8 > + > # FIXME: is this still needed? > define Image/Prepare > #define Build/Compile > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > new file mode 100644 > index 0000000..aa2e45e > --- /dev/null > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > @@ -0,0 +1,18 @@ > +# > +# Copyright (C) 2016 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/SK-WB8 > + NAME:=SamKnows Whitebox 8 > + PACKAGES:=\ > + kmod-usb-core kmod-usb3 \ > + kmod-ledtrig-usbdev uboot-envtools > +endef > + > +define Profile/SK-WB8/Description > + Package set compatible with the SamKnows Whitebox 8. > +endef > +$(eval $(call Profile,SK-WB8)) > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Fri Apr 29 07:37:52 2016 From: me at ndoo.sg (Andrew Yong) Date: Fri, 29 Apr 2016 19:37:52 +0800 Subject: [OpenWrt-Devel] [PATCHv9] ramips: Add support for SamKnows Whitebox 8 In-Reply-To: References: <1461707269.28116.2.camel@ndoo.sg> Message-ID: Will do. Awesome. On 29 Apr 2016 19:30, "John Crispin" wrote: > Hi, > > please drop the mt76 part from the patch it is already merged in the > mt76 tree on github and will hit trunk soon. > > also patch does not apply as shown below. > > John > > ../patchwork 615343 > --2016-04-28 09:07:34-- http://patchwork.ozlabs.org/patch/615343/mbox/ > Resolving patchwork.ozlabs.org (patchwork.ozlabs.org)... 103.22.144.67 > Connecting to patchwork.ozlabs.org > (patchwork.ozlabs.org)|103.22.144.67|:80... connected. > HTTP request sent, awaiting response... 200 OK > Length: unspecified [text/plain] > Saving to: `615343.patch' > > [ <=> > ] 14,542 31.0K/s in 0.5s > > 2016-04-28 09:07:36 (31.0 KB/s) - `615343.patch' saved [14542] > > Applying: ramips: Add support for SamKnows Whitebox 8 > fatal: corrupt patch at line 22 > Repository lacks necessary blobs to fall back on 3-way merge. > Cannot fall back to three-way merge. > Patch failed at 0001 ramips: Add support for SamKnows Whitebox 8 > When you have resolved this problem run "git am --resolved". > If you would prefer to skip this patch, instead run "git am --skip". > To restore the original branch and stop patching run "git am --abort". > applying 615343 FAILED > > > > > On 26/04/2016 23:47, Andrew Yong wrote: > > PATCHv1: > > This patch adds support for the SamKnows version 8.0 Whitebox, built > > around the MT7621 platform. 2.4GHz appears to be working, albeit > > poorly; 5GHz not working yet. > > > > PATCHv2: > > - Fixed LED name in DTS. > > > > PATCHv3: > > DTS: Syntax error fixed, LEDs and buttons mapped correctly now > > - diag.sh updated to blink WPS LED on boot > > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > > matches SamKnows firmware > > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > > > PATCHv4: > > - I didn't commit some fixes in PATCHv3, that's fixed now > > > > PATCHv5: > > - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter > > to prevent soft brick by booting into nonexistent backup partition > > - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, > > needs further investigation, effective txpower is still 0) > > - Experimenting on wifi but that'll be a future patch, board boots fine > now. > > > > PATCHv6: > > - Used init script to reset bootcount, preinit is too early to use > fw-setenv > > > > PATCHv7: > > - Added model to sysupgrade. Tested thoroughly in general and I'm happy > with this. Sorry for the many revisions. > > > > PATCHv8: > > - Added SamKnows recovery partition to partition table, in case someone > specifically wants to send their bootloader to it > > - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into > mt76 kernel module (verified that signal strength on both bands is good, > tested AP and STA modes > > > > PATCHv9: > > - Fixed LAN MAC address EEPROM offset > > - Fixed mt76 patch whitespace issues > > - Renamed mt76 patch to mt7602en to accurately reflect the physical chip > it's supporting > > > > Author: Andrew Yong > > Date: Wed Apr 27 05:40:26 2016 +0800 > > > > Initial support for SamKnows Whitebox 8 > > > > Signed-off-by: Andrew Yong > > > > diff --git a/000-mt7602en.patch b/000-mt7602en.patch > > new file mode 100644 > > index 0000000..e357bbb > > --- /dev/null > > +++ b/000-mt7602en.patch > > @@ -0,0 +1,10 @@ > > +--- a/mt76x2_pci.c > > ++++ b/mt76x2_pci.c > > +@@ -20,6 +20,7 @@ > > + > > + static const struct pci_device_id mt76pci_device_table[] = { > > + { PCI_DEVICE(0x14c3, 0x7662) }, > > ++ { PCI_DEVICE(0x14c3, 0x7612) }, > > + { }, > > + }; > > + > > diff --git a/package/boot/uboot-envtools/files/ramips > b/package/boot/uboot-envtools/files/ramips > > index a759bcc..9ad5974 100644 > > --- a/package/boot/uboot-envtools/files/ramips > > +++ b/package/boot/uboot-envtools/files/ramips > > @@ -24,7 +24,8 @@ linkits7688d | \ > > wsr-600 | \ > > wsr-1166 | \ > > br6425 | \ > > -miwifi-nano) > > +miwifi-nano | \ > > +sk-wb8) > > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" > > ;; > > esac > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > b/target/linux/ramips/base-files/etc/board.d/01_leds > > index aeaab33..a47eacf 100755 > > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > > @@ -243,6 +243,9 @@ rt-n14u) > > set_wifi_led "$board:blue:air" > > set_usb_led "$board:blue:usb" > > ;; > > +sk-wb8) > > + set_usb_led "$board:green:usb" > > + ;; > > tiny-ac) > > set_wifi_led "$board:orange:wifi" > > set_usb_led "$board:green:usb" > > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > > index c6c740f..4bc1d6e 100755 > > --- a/target/linux/ramips/base-files/etc/board.d/02_network > > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > > pbr-m1|\ > > psg1208|\ > > sap-g3200u3|\ > > + sk-wb8|\ > > wf-2881|\ > > whr-300hp2|\ > > whr-600d|\ > > @@ -313,6 +314,9 @@ ramips_setup_macs() > > lan_mac=$(macaddr_setbit_la "$lan_mac") > > wan_mac=$(mtd_get_mac_binary factory 32772) > > ;; > > + sk-wb8) > > + wan_mac=$(mtd_get_mac_binary factory 57344) > > + ;; > > tew-691gr) > > lan_mac=$(cat /sys/class/net/eth0/address) > > wan_mac=$(macaddr_add "$lan_mac" 3) > > diff --git a/target/linux/ramips/base-files/etc/diag.sh > b/target/linux/ramips/base-files/etc/diag.sh > > index 20ff8ff..e98226d 100644 > > --- a/target/linux/ramips/base-files/etc/diag.sh > > +++ b/target/linux/ramips/base-files/etc/diag.sh > > @@ -78,6 +78,7 @@ get_status_led() { > > ;; > > awapn2403|\ > > dir-645|\ > > + sk-wb8|\ > > wrh-300cr) > > status_led="$board:green:wps" > > ;; > > diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount > b/target/linux/ramips/base-files/etc/init.d/bootcount > > new file mode 100755 > > index 0000000..b93e3c9 > > --- /dev/null > > +++ b/target/linux/ramips/base-files/etc/init.d/bootcount > > @@ -0,0 +1,11 @@ > > +#!/bin/sh /etc/rc.common > > +. /lib/ramips.sh > > + > > +START=99 > > + > > +start() { > > + local board=$(ramips_board_name) > > + if [ $board = "sk-wb8" ]; then > > + fw_setenv bootcount 0 > > + fi > > +} > > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > > index 2c669c5..f89e52d 100755 > > --- a/target/linux/ramips/base-files/lib/ramips.sh > > +++ b/target/linux/ramips/base-files/lib/ramips.sh > > @@ -373,6 +373,9 @@ ramips_board_detect() { > > *"RUT5XX") > > name="rut5xx" > > ;; > > + *"SamKnows Whitebox 8") > > + name="sk-wb8" > > + ;; > > *"SAP-G3200U3") > > name="sap-g3200u3" > > ;; > > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > > index 2b24030..4e5cb07 100755 > > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > > @@ -111,6 +111,7 @@ platform_check_image() { > > rt-n56u|\ > > rut5xx|\ > > sap-g3200u3|\ > > + sk-wb8|\ > > sl-r7205|\ > > tew-691gr|\ > > tew-692gr|\ > > diff --git a/target/linux/ramips/dts/SK-WB8.dts > b/target/linux/ramips/dts/SK-WB8.dts > > new file mode 100644 > > index 0000000..350cb4a > > --- /dev/null > > +++ b/target/linux/ramips/dts/SK-WB8.dts > > @@ -0,0 +1,127 @@ > > +/dts-v1/; > > + > > +#include "mt7621.dtsi" > > + > > +/ { > > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > > + model = "SamKnows Whitebox 8"; > > + > > + memory at 0 { > > + device_type = "memory"; > > + reg = <0x0 0x8000000>; > > + }; > > + > > + chosen { > > + bootargs = "console=ttyS0,57600"; > > + }; > > + > > + palmbus at 1E000000 { > > + spi at b00 { > > + status = "okay"; > > + > > + m25p80 at 0 { > > + #address-cells = <1>; > > + #size-cells = <1>; > > + compatible = "mx25l6405d"; > > + reg = <0 0>; > > + linux,modalias = "m25p80"; > > + spi-max-frequency = <10000000>; > > + > > + partition at 0 { > > + label = "u-boot"; > > + reg = <0x0 0x30000>; > > + read-only; > > + }; > > + > > + partition at 30000 { > > + label = "u-boot-env"; > > + reg = <0x30000 0x10000>; > > + }; > > + > > + factory: partition at 40000 { > > + label = "factory"; > > + reg = <0x40000 0x10000>; > > + read-only; > > + }; > > + > > + partition at 50000 { > > + label = "firmware"; > > + reg = <0x50000 0x7b0000>; > > + }; > > + > > + partition at e30000 { > > + label = "recovery"; > > + reg = <0xe30000 0x1d0000>; > > + }; > > + > > + }; > > + }; > > + }; > > + > > + pcie at 1e140000 { > > + status = "okay"; > > + > > + pcie0 { > > + mt76 at 0,0 { > > + reg = <0x0000 0 0 0 0>; > > + device_type = "pci"; > > + mediatek,mtd-eeprom = <&factory 0x8000>; > > + mediatek,2ghz = <0>; > > + }; > > + }; > > + > > + pcie1 { > > + mt76 at 1,0 { > > + reg = <0x0000 0 0 0 0>; > > + device_type = "pci"; > > + mediatek,mtd-eeprom = <&factory 0x0000>; > > + mediatek,5ghz = <0>; > > + }; > > + }; > > + }; > > + > > + ethernet at 1e100000 { > > + mtd-mac-address = <&factory 0xe000>; > > + }; > > + > > + gpio-leds { > > + compatible = "gpio-leds"; > > + > > + wps { > > + label = "sk-wb8:green:wps"; > > + gpios = <&gpio1 14 1>; > > + }; > > + > > + usb { > > + label = "sk-wb8:green:usb"; > > + gpios = <&gpio1 15 1>; > > + }; > > + }; > > + > > + gpio-keys-polled { > > + compatible = "gpio-keys-polled"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + poll-interval = <20>; > > + wps { > > + label = "wps"; > > + gpios = <&gpio1 11 1>; > > + linux,code = <0x211>; > > + }; > > + reset { > > + label = "reset"; > > + gpios = <&gpio1 9 1>; > > + linux,code = <0x198>; > > + }; > > + }; > > + > > + pinctrl { > > + state_default: pinctrl0 { > > + gpio { > > + ralink,group = "i2c", "uart2", "uart3", > "rgmii2", "sdhci"; > > + ralink,function = "gpio"; > > + }; > > + }; > > + }; > > + > > +}; > > diff --git a/target/linux/ramips/image/mt7621.mk > b/target/linux/ramips/image/mt7621.mk > > index 1b8d3da..a09f4ab 100644 > > --- a/target/linux/ramips/image/mt7621.mk > > +++ b/target/linux/ramips/image/mt7621.mk > > @@ -138,6 +138,12 @@ define Device/ubnt-erx > > endef > > TARGET_DEVICES += ubnt-erx > > > > +define Device/sk-wb8 > > + DTS := SK-WB8 > > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > > +endef > > +TARGET_DEVICES += sk-wb8 > > + > > # FIXME: is this still needed? > > define Image/Prepare > > #define Build/Compile > > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk > b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > > new file mode 100644 > > index 0000000..aa2e45e > > --- /dev/null > > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > > @@ -0,0 +1,18 @@ > > +# > > +# Copyright (C) 2016 OpenWrt.org > > +# > > +# This is free software, licensed under the GNU General Public License > v2. > > +# See /LICENSE for more information. > > +# > > + > > +define Profile/SK-WB8 > > + NAME:=SamKnows Whitebox 8 > > + PACKAGES:=\ > > + kmod-usb-core kmod-usb3 \ > > + kmod-ledtrig-usbdev uboot-envtools > > +endef > > + > > +define Profile/SK-WB8/Description > > + Package set compatible with the SamKnows Whitebox 8. > > +endef > > +$(eval $(call Profile,SK-WB8)) > > _______________________________________________ > > openwrt-devel mailing list > > openwrt-devel at lists.openwrt.org > > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Fri Apr 29 07:46:39 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Fri, 29 Apr 2016 13:46:39 +0200 Subject: [OpenWrt-Devel] [PATCH 2/6] dropbear: Make utmp and putuline support configurable via seperate config options In-Reply-To: <53c17692-a6a4-d0c0-4789-3b9ba57ca7a8@phrozen.org> References: <1461748442-9469-1-git-send-email-dedeckeh@gmail.com> <1461748442-9469-2-git-send-email-dedeckeh@gmail.com> <53c17692-a6a4-d0c0-4789-3b9ba57ca7a8@phrozen.org> Message-ID: On Fri, Apr 29, 2016 at 1:24 PM, John Crispin wrote: > Hi, > > comment inline > > On 27/04/2016 11:13, Hans Dedecker wrote: > > Utmp support tracks who is currenlty logged in by logging info to the > file /var/run/utmp (supported by busybox) > > Putuline support will use the utmp structure to write to the utmp file > > > > Signed-off-by: Hans Dedecker > > --- > > package/network/services/dropbear/Config.in | 15 +++++++++++++++ > > package/network/services/dropbear/Makefile | 5 ++--- > > 2 files changed, 17 insertions(+), 3 deletions(-) > > > > diff --git a/package/network/services/dropbear/Config.in > b/package/network/services/dropbear/Config.in > > index 3316c84..7c2edd7 100644 > > --- a/package/network/services/dropbear/Config.in > > +++ b/package/network/services/dropbear/Config.in > > @@ -32,4 +32,19 @@ config DROPBEAR_ECC > > > > Increases binary size by about 23 kB (MIPS). > > > > +config DROPBEAR_UTMP > > + bool "Utmp support" > > + default n > > + depends on BUSYBOX_CONFIG_FEATURE_UTMP > > + help > > + This enables dropbear utmp support, the file /var/run/utmp > is used to > > + track who is currently logged in. > > + > > +config DROPBEAR_PUTUTLINE > > + bool "Pututline support" > > + default n > > + depends on DROPBEAR_UTMP > > + help > > + Dropbear will use pututline() to write the utmp structure > into the utmp file. > > + > > endmenu > > diff --git a/package/network/services/dropbear/Makefile > b/package/network/services/dropbear/Makefile > > index 39ab04b..593e0a8 100644 > > --- a/package/network/services/dropbear/Makefile > > +++ b/package/network/services/dropbear/Makefile > > @@ -68,12 +68,11 @@ CONFIGURE_ARGS += \ > > --enable-syslog \ > > $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \ > > --disable-lastlog \ > > - --disable-utmp \ > > - --disable-utmpx \ > > + $(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \ > > what happened to --disable-utmpx ? > Deletion by mistake ... Will fix it in a new patch Hans > > John > > > --disable-wtmp \ > > --disable-wtmpx \ > > --disable-loginfunc \ > > - --disable-pututline \ > > + $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \ > > --disable-pututxline \ > > --disable-zlib \ > > --enable-bundled-libtom > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Fri Apr 29 08:03:35 2016 From: me at ndoo.sg (Andrew Yong) Date: Fri, 29 Apr 2016 20:03:35 +0800 Subject: [OpenWrt-Devel] [PATCHv10] ramips: Add support for SamKnows Whitebox 8 In-Reply-To: <1461707269.28116.2.camel@ndoo.sg> References: <1461707269.28116.2.camel@ndoo.sg> Message-ID: <32F54808-6FD3-4C97-B642-AD8817EBDCA1@ndoo.sg> PATCHv1: This patch adds support for the SamKnows version 8.0 Whitebox, built around the MT7621 platform. 2.4GHz appears to be working, albeit poorly; 5GHz not working yet. PATCHv2: - Fixed LED name in DTS. PATCHv3: DTS: Syntax error fixed, LEDs and buttons mapped correctly now - diag.sh updated to blink WPS LED on boot - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset matches SamKnows firmware - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware PATCHv4: - I didn't commit some fixes in PATCHv3, that's fixed now PATCHv5: - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter to prevent soft brick by booting into nonexistent backup partition - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, needs further investigation, effective txpower is still 0) - Experimenting on wifi but that'll be a future patch, board boots fine now. PATCHv6: - Used init script to reset bootcount, preinit is too early to use fw-setenv PATCHv7: - Added model to sysupgrade. Tested thoroughly in general and I'm happy with this. Sorry for the many revisions. PATCHv8: - Added SamKnows recovery partition to partition table, in case someone specifically wants to send their bootloader to it - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into mt76 kernel module (verified that signal strength on both bands is good, tested AP and STA modes PATCHv9: - Fixed LAN MAC address EEPROM offset - Fixed mt76 patch whitespace issues - Renamed mt76 patch to mt7602en to accurately reflect the physical chip it's supporting PATCHv10: - Removed mt76 patch in favor of upstream patch - I solemnly swear not to have to revision my patch >5 times every again Initial support for SamKnows Whitebox 8 Signed-off-by: Andrew Yong diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips index a759bcc..9ad5974 100644 --- a/package/boot/uboot-envtools/files/ramips +++ b/package/boot/uboot-envtools/files/ramips @@ -24,7 +24,8 @@ linkits7688d | \ wsr-600 | \ wsr-1166 | \ br6425 | \ -miwifi-nano) +miwifi-nano | \ +sk-wb8) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ;; esac diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 47e1e6a..28db48f 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -247,6 +247,9 @@ rt-n14u) set_wifi_led "$board:blue:air" set_usb_led "$board:blue:usb" ;; +sk-wb8) + set_usb_led "$board:green:usb" + ;; tiny-ac) set_wifi_led "$board:orange:wifi" set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index ee690f6..3cbf577 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ramips_setup_interfaces() pbr-m1|\ psg1208|\ sap-g3200u3|\ + sk-wb8|\ wf-2881|\ whr-300hp2|\ whr-600d|\ @@ -314,6 +315,9 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(mtd_get_mac_binary factory 32772) ;; + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; tew-691gr) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 3) diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index c638d16..e432fa6 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -79,6 +79,7 @@ get_status_led() { ;; awapn2403|\ dir-645|\ + sk-wb8|\ wrh-300cr) status_led="$board:green:wps" ;; diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount new file mode 100755 index 0000000..b93e3c9 --- /dev/null +++ b/target/linux/ramips/base-files/etc/init.d/bootcount @@ -0,0 +1,11 @@ +#!/bin/sh /etc/rc.common +. /lib/ramips.sh + +START=99 + +start() { + local board=$(ramips_board_name) + if [ $board = "sk-wb8" ]; then + fw_setenv bootcount 0 + fi +} diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 0ac0f68..9d5421b 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -376,6 +376,9 @@ ramips_board_detect() { *"RUT5XX") name="rut5xx" ;; + *"SamKnows Whitebox 8") + name="sk-wb8" + ;; *"SAP-G3200U3") name="sap-g3200u3" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 86ea4a3..6036f73 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -112,6 +112,7 @@ platform_check_image() { rt-n56u|\ rut5xx|\ sap-g3200u3|\ + sk-wb8|\ sl-r7205|\ tew-691gr|\ tew-692gr|\ diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts new file mode 100644 index 0000000..350cb4a --- /dev/null +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -0,0 +1,127 @@ +/dts-v1/; + +#include "mt7621.dtsi" + +/ { + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + model = "SamKnows Whitebox 8"; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + palmbus at 1E000000 { + spi at b00 { + status = "okay"; + + m25p80 at 0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "mx25l6405d"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <10000000>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition at 30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + }; + + factory: partition at 40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition at 50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + partition at e30000 { + label = "recovery"; + reg = <0xe30000 0x1d0000>; + }; + + }; + }; + }; + + pcie at 1e140000 { + status = "okay"; + + pcie0 { + mt76 at 0,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,2ghz = <0>; + }; + }; + + pcie1 { + mt76 at 1,0 { + reg = <0x0000 0 0 0 0>; + device_type = "pci"; + mediatek,mtd-eeprom = <&factory 0x0000>; + mediatek,5ghz = <0>; + }; + }; + }; + + ethernet at 1e100000 { + mtd-mac-address = <&factory 0xe000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wps { + label = "sk-wb8:green:wps"; + gpios = <&gpio1 14 1>; + }; + + usb { + label = "sk-wb8:green:usb"; + gpios = <&gpio1 15 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + wps { + label = "wps"; + gpios = <&gpio1 11 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio1 9 1>; + linux,code = <0x198>; + }; + }; + + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; + ralink,function = "gpio"; + }; + }; + }; + +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 1b8d3da..a09f4ab 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -138,6 +138,12 @@ define Device/ubnt-erx endef TARGET_DEVICES += ubnt-erx +define Device/sk-wb8 + DTS := SK-WB8 + IMAGE_SIZE := $(ralink_default_fw_size_16M) +endef +TARGET_DEVICES += sk-wb8 + # FIXME: is this still needed? define Image/Prepare #define Build/Compile diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk new file mode 100644 index 0000000..aa2e45e --- /dev/null +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk @@ -0,0 +1,18 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SK-WB8 + NAME:=SamKnows Whitebox 8 + PACKAGES:=\ + kmod-usb-core kmod-usb3 \ + kmod-ledtrig-usbdev uboot-envtools +endef + +define Profile/SK-WB8/Description + Package set compatible with the SamKnows Whitebox 8. +endef +$(eval $(call Profile,SK-WB8)) _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From br1 at einfach.org Fri Apr 29 08:22:53 2016 From: br1 at einfach.org (Bruno Randolf) Date: Fri, 29 Apr 2016 13:22:53 +0100 Subject: [OpenWrt-Devel] netifd hotplug event race condition for monitor interfaces Message-ID: <5723521D.3000608@einfach.org> Hello, I have a system where I want to reload a service when a monitor interface appears. The monitor interface is configured in /etc/config/wireless as: config wifi-iface 'monitor' option device 'radio0' option ifname 'moni0' option mode 'monitor' Unfortunately netifd events for monitor interfaces are not reliable at boot time. On some slower systems I never get them, on a Raspberry Pi 2 I get them about 50% of the time. I have been able to debug it down to netifd/system-linux.c handle_hotplug_msg() where system_if_force_external() is either true or false, depending whether /sys/class/net/moni0/phy80211 already exists or not. Interestingly it works well when it does not exist yet: then I get the following log, the interface gets UP, and the hotplug script which restarts my service is called: netifd: Interface 'moni' is enabled netifd: Network device 'moni0' link is up netifd: Interface 'moni' has link connectivity netifd: Interface 'moni' is setting up now netifd: Interface 'moni' is now up But when the /sys/ file does already exist, and system_if_force_external() is true, I get the following log and the interface stays down: netifd: radio0 (1144): command failed: Device or resource busy (-16) netifd: radio0 (1144): ifconfig: SIOCSIFHWADDR: Invalid argument netifd: Network device 'moni0' link is up netifd: Interface 'moni' has link connectivity root at Rpi2:~# ubus call network.interface.moni status { "up": false, "pending": false, "available": false, "autostart": true, "dynamic": false, "proto": "none", "device": "moni0", "data": { } } I guess the problem is that monitor interfaces are created almost instantly, in comparison to AP, STA and Ad-hoc interfaces which need some time to set up...? Any ideas how to fix this are appreciated, I want to do it, but I am stuck now. Thanks, bruno _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From pepe2k at gmail.com Fri Apr 29 08:30:50 2016 From: pepe2k at gmail.com (Piotr Dymacz) Date: Fri, 29 Apr 2016 14:30:50 +0200 Subject: [OpenWrt-Devel] [PATCHv10] ramips: Add support for SamKnows Whitebox 8 In-Reply-To: <32F54808-6FD3-4C97-B642-AD8817EBDCA1@ndoo.sg> References: <1461707269.28116.2.camel@ndoo.sg> <32F54808-6FD3-4C97-B642-AD8817EBDCA1@ndoo.sg> Message-ID: Hello Andrew, Just two comments. Your patch changelog should go below "---" after the Signed-off-by line, so that it won't get included in commit message. It's common to include just a small description about the hardware the patch adds support for, examples: [1], [2], [3]. Cheers, Piotr [1] https://dev.openwrt.org/changeset/44238 [2] https://dev.openwrt.org/changeset/41939 [3] https://dev.openwrt.org/changeset/46454 2016-04-29 14:03 GMT+02:00 Andrew Yong : > PATCHv1: > This patch adds support for the SamKnows version 8.0 Whitebox, built > around the MT7621 platform. 2.4GHz appears to be working, albeit > poorly; 5GHz not working yet. > > PATCHv2: > - Fixed LED name in DTS. > > PATCHv3: > DTS: Syntax error fixed, LEDs and buttons mapped correctly now > - diag.sh updated to blink WPS LED on boot > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > matches SamKnows firmware > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > PATCHv4: > - I didn't commit some fixes in PATCHv3, that's fixed now > > PATCHv5: > - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter > to prevent soft brick by booting into nonexistent backup partition > - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, > needs further investigation, effective txpower is still 0) > - Experimenting on wifi but that'll be a future patch, board boots fine now. > > PATCHv6: > - Used init script to reset bootcount, preinit is too early to use fw-setenv > > PATCHv7: > - Added model to sysupgrade. Tested thoroughly in general and I'm happy with this. Sorry for the many revisions. > > PATCHv8: > - Added SamKnows recovery partition to partition table, in case someone specifically wants to send their bootloader to it > - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into mt76 kernel module (verified that signal strength on both bands is good, tested AP and STA modes > > PATCHv9: > - Fixed LAN MAC address EEPROM offset > - Fixed mt76 patch whitespace issues > - Renamed mt76 patch to mt7602en to accurately reflect the physical chip it's supporting > > PATCHv10: > - Removed mt76 patch in favor of upstream patch > - I solemnly swear not to have to revision my patch >5 times every again > > Initial support for SamKnows Whitebox 8 > > Signed-off-by: Andrew Yong > > diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips > index a759bcc..9ad5974 100644 > --- a/package/boot/uboot-envtools/files/ramips > +++ b/package/boot/uboot-envtools/files/ramips > @@ -24,7 +24,8 @@ linkits7688d | \ > wsr-600 | \ > wsr-1166 | \ > br6425 | \ > -miwifi-nano) > +miwifi-nano | \ > +sk-wb8) > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" > ;; > esac > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds > index 47e1e6a..28db48f 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -247,6 +247,9 @@ rt-n14u) > set_wifi_led "$board:blue:air" > set_usb_led "$board:blue:usb" > ;; > +sk-wb8) > + set_usb_led "$board:green:usb" > + ;; > tiny-ac) > set_wifi_led "$board:orange:wifi" > set_usb_led "$board:green:usb" > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network > index ee690f6..3cbf577 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > pbr-m1|\ > psg1208|\ > sap-g3200u3|\ > + sk-wb8|\ > wf-2881|\ > whr-300hp2|\ > whr-600d|\ > @@ -314,6 +315,9 @@ ramips_setup_macs() > lan_mac=$(macaddr_setbit_la "$lan_mac") > wan_mac=$(mtd_get_mac_binary factory 32772) > ;; > + sk-wb8) > + wan_mac=$(mtd_get_mac_binary factory 57350) > + ;; > tew-691gr) > lan_mac=$(cat /sys/class/net/eth0/address) > wan_mac=$(macaddr_add "$lan_mac" 3) > diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh > index c638d16..e432fa6 100644 > --- a/target/linux/ramips/base-files/etc/diag.sh > +++ b/target/linux/ramips/base-files/etc/diag.sh > @@ -79,6 +79,7 @@ get_status_led() { > ;; > awapn2403|\ > dir-645|\ > + sk-wb8|\ > wrh-300cr) > status_led="$board:green:wps" > ;; > diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount > new file mode 100755 > index 0000000..b93e3c9 > --- /dev/null > +++ b/target/linux/ramips/base-files/etc/init.d/bootcount > @@ -0,0 +1,11 @@ > +#!/bin/sh /etc/rc.common > +. /lib/ramips.sh > + > +START=99 > + > +start() { > + local board=$(ramips_board_name) > + if [ $board = "sk-wb8" ]; then > + fw_setenv bootcount 0 > + fi > +} > diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh > index 0ac0f68..9d5421b 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -376,6 +376,9 @@ ramips_board_detect() { > *"RUT5XX") > name="rut5xx" > ;; > + *"SamKnows Whitebox 8") > + name="sk-wb8" > + ;; > *"SAP-G3200U3") > name="sap-g3200u3" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index 86ea4a3..6036f73 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -112,6 +112,7 @@ platform_check_image() { > rt-n56u|\ > rut5xx|\ > sap-g3200u3|\ > + sk-wb8|\ > sl-r7205|\ > tew-691gr|\ > tew-692gr|\ > diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts > new file mode 100644 > index 0000000..350cb4a > --- /dev/null > +++ b/target/linux/ramips/dts/SK-WB8.dts > @@ -0,0 +1,127 @@ > +/dts-v1/; > + > +#include "mt7621.dtsi" > + > +/ { > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > + model = "SamKnows Whitebox 8"; > + > + memory at 0 { > + device_type = "memory"; > + reg = <0x0 0x8000000>; > + }; > + > + chosen { > + bootargs = "console=ttyS0,57600"; > + }; > + > + palmbus at 1E000000 { > + spi at b00 { > + status = "okay"; > + > + m25p80 at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "mx25l6405d"; > + reg = <0 0>; > + linux,modalias = "m25p80"; > + spi-max-frequency = <10000000>; > + > + partition at 0 { > + label = "u-boot"; > + reg = <0x0 0x30000>; > + read-only; > + }; > + > + partition at 30000 { > + label = "u-boot-env"; > + reg = <0x30000 0x10000>; > + }; > + > + factory: partition at 40000 { > + label = "factory"; > + reg = <0x40000 0x10000>; > + read-only; > + }; > + > + partition at 50000 { > + label = "firmware"; > + reg = <0x50000 0x7b0000>; > + }; > + > + partition at e30000 { > + label = "recovery"; > + reg = <0xe30000 0x1d0000>; > + }; > + > + }; > + }; > + }; > + > + pcie at 1e140000 { > + status = "okay"; > + > + pcie0 { > + mt76 at 0,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x8000>; > + mediatek,2ghz = <0>; > + }; > + }; > + > + pcie1 { > + mt76 at 1,0 { > + reg = <0x0000 0 0 0 0>; > + device_type = "pci"; > + mediatek,mtd-eeprom = <&factory 0x0000>; > + mediatek,5ghz = <0>; > + }; > + }; > + }; > + > + ethernet at 1e100000 { > + mtd-mac-address = <&factory 0xe000>; > + }; > + > + gpio-leds { > + compatible = "gpio-leds"; > + > + wps { > + label = "sk-wb8:green:wps"; > + gpios = <&gpio1 14 1>; > + }; > + > + usb { > + label = "sk-wb8:green:usb"; > + gpios = <&gpio1 15 1>; > + }; > + }; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <20>; > + wps { > + label = "wps"; > + gpios = <&gpio1 11 1>; > + linux,code = <0x211>; > + }; > + reset { > + label = "reset"; > + gpios = <&gpio1 9 1>; > + linux,code = <0x198>; > + }; > + }; > + > + pinctrl { > + state_default: pinctrl0 { > + gpio { > + ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci"; > + ralink,function = "gpio"; > + }; > + }; > + }; > + > +}; > diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk > index 1b8d3da..a09f4ab 100644 > --- a/target/linux/ramips/image/mt7621.mk > +++ b/target/linux/ramips/image/mt7621.mk > @@ -138,6 +138,12 @@ define Device/ubnt-erx > endef > TARGET_DEVICES += ubnt-erx > > +define Device/sk-wb8 > + DTS := SK-WB8 > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > +endef > +TARGET_DEVICES += sk-wb8 > + > # FIXME: is this still needed? > define Image/Prepare > #define Build/Compile > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > new file mode 100644 > index 0000000..aa2e45e > --- /dev/null > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > @@ -0,0 +1,18 @@ > +# > +# Copyright (C) 2016 OpenWrt.org > +# > +# This is free software, licensed under the GNU General Public License v2. > +# See /LICENSE for more information. > +# > + > +define Profile/SK-WB8 > + NAME:=SamKnows Whitebox 8 > + PACKAGES:=\ > + kmod-usb-core kmod-usb3 \ > + kmod-ledtrig-usbdev uboot-envtools > +endef > + > +define Profile/SK-WB8/Description > + Package set compatible with the SamKnows Whitebox 8. > +endef > +$(eval $(call Profile,SK-WB8)) > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From dedeckeh at gmail.com Fri Apr 29 08:32:42 2016 From: dedeckeh at gmail.com (Hans Dedecker) Date: Fri, 29 Apr 2016 14:32:42 +0200 Subject: [OpenWrt-Devel] [PATCH v2] dropbear: Make utmp and putuline support configurable via a seperate config option Message-ID: <1461933162-22680-1-git-send-email-dedeckeh@gmail.com> Utmp support tracks who is currenlty logged in via /var/run/utmp supported by buysbox Putuline support will use the utmp structure to write to the utmp file Signed-off-by: Hans Dedecker --- v2 : Readd disable-utmpx support package/network/services/dropbear/Config.in | 15 +++++++++++++++ package/network/services/dropbear/Makefile | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in index 3316c84..7c2edd7 100644 --- a/package/network/services/dropbear/Config.in +++ b/package/network/services/dropbear/Config.in @@ -32,4 +32,19 @@ config DROPBEAR_ECC Increases binary size by about 23 kB (MIPS). +config DROPBEAR_UTMP + bool "Utmp support" + default n + depends on BUSYBOX_CONFIG_FEATURE_UTMP + help + This enables dropbear utmp support, the file /var/run/utmp is used to + track who is currently logged in. + +config DROPBEAR_PUTUTLINE + bool "Pututline support" + default n + depends on DROPBEAR_UTMP + help + Dropbear will use pututline() to write the utmp structure into the utmp file. + endmenu diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile index f48c2b5..c2fe69b 100644 --- a/package/network/services/dropbear/Makefile +++ b/package/network/services/dropbear/Makefile @@ -68,12 +68,12 @@ CONFIGURE_ARGS += \ --enable-syslog \ $(if $(CONFIG_SHADOW_PASSWORDS),,--disable-shadow) \ --disable-lastlog \ - --disable-utmp \ + $(if $(CONFIG_DROPBEAR_UTMP),,--disable-utmp) \ --disable-utmpx \ --disable-wtmp \ --disable-wtmpx \ --disable-loginfunc \ - --disable-pututline \ + $(if $(CONFIG_DROPBEAR_PUTUTLINE),,--disable-pututline) \ --disable-pututxline \ --disable-zlib \ --enable-bundled-libtom -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From rjangi at codeaurora.org Fri Apr 29 08:35:30 2016 From: rjangi at codeaurora.org (Ram Chandra Jangir) Date: Fri, 29 Apr 2016 18:05:30 +0530 Subject: [OpenWrt-Devel] [PATCH v2 2/3] ext4_part_match: fix bug that prevented matching names In-Reply-To: <1461867621-4055-2-git-send-email-josua.mayer97@gmail.com> References: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> <1461867621-4055-2-git-send-email-josua.mayer97@gmail.com> Message-ID: <008501d1a213$a0a3e930$e1ebbb90$@codeaurora.org> Thanks Josua Mayer. Devname and partname both are different. Devname is holding the device node(ex. mmcblkXpY) and given name(or partname) is the partition name(ex. rootfs or rootfs_data). For below uevent sysfs entries, it tries to populate the device node(mmcblkXpY) in devname variable and tries to match the given name with the PARTNAME(buf will have this value("PARTNAME=rootfs_data") at n'th iteration). If it is found then the loop will break, and we will get the given name's device node(/dev/mmcblkXpY) which will be mounted later. Example: root at OpenWrt:/# cat /sys/block/mmcblk0/mmcblk0p3/uevent MAJOR=179 MINOR=3 DEVNAME=mmcblk0p3 <-- device node: /dev/mmcblk0p3 DEVTYPE=partition PARTN=3 PARTNAME=rootfs_data This is required, because the emmc card may have multiple partitions too. So our aim is to get the device node from the given name's uevent file. Thanks, Ram -----Original Message----- From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On Behalf Of josua.mayer97 at gmail.com Sent: Thursday, April 28, 2016 11:50 PM To: openwrt-devel at lists.openwrt.org Cc: Josua Mayer Subject: [OpenWrt-Devel] [PATCH v2 2/3] ext4_part_match: fix bug that prevented matching names From: Josua Mayer Actually use the populated devname variable to compare against given name, instead of the buf variable, which incidentally contains either: MAJOR=xyz, MINOR=x, or DEVTYPE=partition, none of which ever match a name. Signed-off-by: Josua Mayer --- libfstools/ext4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfstools/ext4.c b/libfstools/ext4.c index f648aa8..b9401c3 100644 --- a/libfstools/ext4.c +++ b/libfstools/ext4.c @@ -78,7 +78,7 @@ ext4_part_match(char *dev, char *name, char *filename) continue; } /* Match partition name */ - if (strstr(buf, name)) { + if (strstr(devname, name)) { ret = 0; break; } -- 2.6.6 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From me at ndoo.sg Fri Apr 29 08:41:54 2016 From: me at ndoo.sg (Andrew Yong) Date: Fri, 29 Apr 2016 20:41:54 +0800 Subject: [OpenWrt-Devel] [PATCHv10] ramips: Add support for SamKnows Whitebox 8 In-Reply-To: References: <1461707269.28116.2.camel@ndoo.sg> <32F54808-6FD3-4C97-B642-AD8817EBDCA1@ndoo.sg> Message-ID: Noted. Would I need to re-send the same v10? On 29 Apr 2016 20:30, "Piotr Dymacz" wrote: > Hello Andrew, > > Just two comments. > > Your patch changelog should go below "---" after the Signed-off-by > line, so that it won't get included in commit message. > It's common to include just a small description about the hardware the > patch adds support for, examples: [1], [2], [3]. > > Cheers, > Piotr > > [1] https://dev.openwrt.org/changeset/44238 > [2] https://dev.openwrt.org/changeset/41939 > [3] https://dev.openwrt.org/changeset/46454 > > > 2016-04-29 14:03 GMT+02:00 Andrew Yong : > > PATCHv1: > > This patch adds support for the SamKnows version 8.0 Whitebox, built > > around the MT7621 platform. 2.4GHz appears to be working, albeit > > poorly; 5GHz not working yet. > > > > PATCHv2: > > - Fixed LED name in DTS. > > > > PATCHv3: > > DTS: Syntax error fixed, LEDs and buttons mapped correctly now > > - diag.sh updated to blink WPS LED on boot > > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset > > matches SamKnows firmware > > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware > > > > PATCHv4: > > - I didn't commit some fixes in PATCHv3, that's fixed now > > > > PATCHv5: > > - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter > > to prevent soft brick by booting into nonexistent backup partition > > - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS, > > needs further investigation, effective txpower is still 0) > > - Experimenting on wifi but that'll be a future patch, board boots fine > now. > > > > PATCHv6: > > - Used init script to reset bootcount, preinit is too early to use > fw-setenv > > > > PATCHv7: > > - Added model to sysupgrade. Tested thoroughly in general and I'm happy > with this. Sorry for the many revisions. > > > > PATCHv8: > > - Added SamKnows recovery partition to partition table, in case someone > specifically wants to send their bootloader to it > > - Fixed Wi-Fi by patching MT7602EN device ID (shows up as 7612) into > mt76 kernel module (verified that signal strength on both bands is good, > tested AP and STA modes > > > > PATCHv9: > > - Fixed LAN MAC address EEPROM offset > > - Fixed mt76 patch whitespace issues > > - Renamed mt76 patch to mt7602en to accurately reflect the physical chip > it's supporting > > > > PATCHv10: > > - Removed mt76 patch in favor of upstream patch > > - I solemnly swear not to have to revision my patch >5 times every again > > > > Initial support for SamKnows Whitebox 8 > > > > Signed-off-by: Andrew Yong > > > > diff --git a/package/boot/uboot-envtools/files/ramips > b/package/boot/uboot-envtools/files/ramips > > index a759bcc..9ad5974 100644 > > --- a/package/boot/uboot-envtools/files/ramips > > +++ b/package/boot/uboot-envtools/files/ramips > > @@ -24,7 +24,8 @@ linkits7688d | \ > > wsr-600 | \ > > wsr-1166 | \ > > br6425 | \ > > -miwifi-nano) > > +miwifi-nano | \ > > +sk-wb8) > > ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" > > ;; > > esac > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > b/target/linux/ramips/base-files/etc/board.d/01_leds > > index 47e1e6a..28db48f 100755 > > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > > @@ -247,6 +247,9 @@ rt-n14u) > > set_wifi_led "$board:blue:air" > > set_usb_led "$board:blue:usb" > > ;; > > +sk-wb8) > > + set_usb_led "$board:green:usb" > > + ;; > > tiny-ac) > > set_wifi_led "$board:orange:wifi" > > set_usb_led "$board:green:usb" > > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > > index ee690f6..3cbf577 100755 > > --- a/target/linux/ramips/base-files/etc/board.d/02_network > > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > > @@ -77,6 +77,7 @@ ramips_setup_interfaces() > > pbr-m1|\ > > psg1208|\ > > sap-g3200u3|\ > > + sk-wb8|\ > > wf-2881|\ > > whr-300hp2|\ > > whr-600d|\ > > @@ -314,6 +315,9 @@ ramips_setup_macs() > > lan_mac=$(macaddr_setbit_la "$lan_mac") > > wan_mac=$(mtd_get_mac_binary factory 32772) > > ;; > > + sk-wb8) > > + wan_mac=$(mtd_get_mac_binary factory 57350) > > + ;; > > tew-691gr) > > lan_mac=$(cat /sys/class/net/eth0/address) > > wan_mac=$(macaddr_add "$lan_mac" 3) > > diff --git a/target/linux/ramips/base-files/etc/diag.sh > b/target/linux/ramips/base-files/etc/diag.sh > > index c638d16..e432fa6 100644 > > --- a/target/linux/ramips/base-files/etc/diag.sh > > +++ b/target/linux/ramips/base-files/etc/diag.sh > > @@ -79,6 +79,7 @@ get_status_led() { > > ;; > > awapn2403|\ > > dir-645|\ > > + sk-wb8|\ > > wrh-300cr) > > status_led="$board:green:wps" > > ;; > > diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount > b/target/linux/ramips/base-files/etc/init.d/bootcount > > new file mode 100755 > > index 0000000..b93e3c9 > > --- /dev/null > > +++ b/target/linux/ramips/base-files/etc/init.d/bootcount > > @@ -0,0 +1,11 @@ > > +#!/bin/sh /etc/rc.common > > +. /lib/ramips.sh > > + > > +START=99 > > + > > +start() { > > + local board=$(ramips_board_name) > > + if [ $board = "sk-wb8" ]; then > > + fw_setenv bootcount 0 > > + fi > > +} > > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > > index 0ac0f68..9d5421b 100755 > > --- a/target/linux/ramips/base-files/lib/ramips.sh > > +++ b/target/linux/ramips/base-files/lib/ramips.sh > > @@ -376,6 +376,9 @@ ramips_board_detect() { > > *"RUT5XX") > > name="rut5xx" > > ;; > > + *"SamKnows Whitebox 8") > > + name="sk-wb8" > > + ;; > > *"SAP-G3200U3") > > name="sap-g3200u3" > > ;; > > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > > index 86ea4a3..6036f73 100755 > > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > > @@ -112,6 +112,7 @@ platform_check_image() { > > rt-n56u|\ > > rut5xx|\ > > sap-g3200u3|\ > > + sk-wb8|\ > > sl-r7205|\ > > tew-691gr|\ > > tew-692gr|\ > > diff --git a/target/linux/ramips/dts/SK-WB8.dts > b/target/linux/ramips/dts/SK-WB8.dts > > new file mode 100644 > > index 0000000..350cb4a > > --- /dev/null > > +++ b/target/linux/ramips/dts/SK-WB8.dts > > @@ -0,0 +1,127 @@ > > +/dts-v1/; > > + > > +#include "mt7621.dtsi" > > + > > +/ { > > + compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > > + model = "SamKnows Whitebox 8"; > > + > > + memory at 0 { > > + device_type = "memory"; > > + reg = <0x0 0x8000000>; > > + }; > > + > > + chosen { > > + bootargs = "console=ttyS0,57600"; > > + }; > > + > > + palmbus at 1E000000 { > > + spi at b00 { > > + status = "okay"; > > + > > + m25p80 at 0 { > > + #address-cells = <1>; > > + #size-cells = <1>; > > + compatible = "mx25l6405d"; > > + reg = <0 0>; > > + linux,modalias = "m25p80"; > > + spi-max-frequency = <10000000>; > > + > > + partition at 0 { > > + label = "u-boot"; > > + reg = <0x0 0x30000>; > > + read-only; > > + }; > > + > > + partition at 30000 { > > + label = "u-boot-env"; > > + reg = <0x30000 0x10000>; > > + }; > > + > > + factory: partition at 40000 { > > + label = "factory"; > > + reg = <0x40000 0x10000>; > > + read-only; > > + }; > > + > > + partition at 50000 { > > + label = "firmware"; > > + reg = <0x50000 0x7b0000>; > > + }; > > + > > + partition at e30000 { > > + label = "recovery"; > > + reg = <0xe30000 0x1d0000>; > > + }; > > + > > + }; > > + }; > > + }; > > + > > + pcie at 1e140000 { > > + status = "okay"; > > + > > + pcie0 { > > + mt76 at 0,0 { > > + reg = <0x0000 0 0 0 0>; > > + device_type = "pci"; > > + mediatek,mtd-eeprom = <&factory 0x8000>; > > + mediatek,2ghz = <0>; > > + }; > > + }; > > + > > + pcie1 { > > + mt76 at 1,0 { > > + reg = <0x0000 0 0 0 0>; > > + device_type = "pci"; > > + mediatek,mtd-eeprom = <&factory 0x0000>; > > + mediatek,5ghz = <0>; > > + }; > > + }; > > + }; > > + > > + ethernet at 1e100000 { > > + mtd-mac-address = <&factory 0xe000>; > > + }; > > + > > + gpio-leds { > > + compatible = "gpio-leds"; > > + > > + wps { > > + label = "sk-wb8:green:wps"; > > + gpios = <&gpio1 14 1>; > > + }; > > + > > + usb { > > + label = "sk-wb8:green:usb"; > > + gpios = <&gpio1 15 1>; > > + }; > > + }; > > + > > + gpio-keys-polled { > > + compatible = "gpio-keys-polled"; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + poll-interval = <20>; > > + wps { > > + label = "wps"; > > + gpios = <&gpio1 11 1>; > > + linux,code = <0x211>; > > + }; > > + reset { > > + label = "reset"; > > + gpios = <&gpio1 9 1>; > > + linux,code = <0x198>; > > + }; > > + }; > > + > > + pinctrl { > > + state_default: pinctrl0 { > > + gpio { > > + ralink,group = "i2c", "uart2", "uart3", > "rgmii2", "sdhci"; > > + ralink,function = "gpio"; > > + }; > > + }; > > + }; > > + > > +}; > > diff --git a/target/linux/ramips/image/mt7621.mk > b/target/linux/ramips/image/mt7621.mk > > index 1b8d3da..a09f4ab 100644 > > --- a/target/linux/ramips/image/mt7621.mk > > +++ b/target/linux/ramips/image/mt7621.mk > > @@ -138,6 +138,12 @@ define Device/ubnt-erx > > endef > > TARGET_DEVICES += ubnt-erx > > > > +define Device/sk-wb8 > > + DTS := SK-WB8 > > + IMAGE_SIZE := $(ralink_default_fw_size_16M) > > +endef > > +TARGET_DEVICES += sk-wb8 > > + > > # FIXME: is this still needed? > > define Image/Prepare > > #define Build/Compile > > diff --git a/target/linux/ramips/mt7621/profiles/sk-wb8.mk > b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > > new file mode 100644 > > index 0000000..aa2e45e > > --- /dev/null > > +++ b/target/linux/ramips/mt7621/profiles/sk-wb8.mk > > @@ -0,0 +1,18 @@ > > +# > > +# Copyright (C) 2016 OpenWrt.org > > +# > > +# This is free software, licensed under the GNU General Public License > v2. > > +# See /LICENSE for more information. > > +# > > + > > +define Profile/SK-WB8 > > + NAME:=SamKnows Whitebox 8 > > + PACKAGES:=\ > > + kmod-usb-core kmod-usb3 \ > > + kmod-ledtrig-usbdev uboot-envtools > > +endef > > + > > +define Profile/SK-WB8/Description > > + Package set compatible with the SamKnows Whitebox 8. > > +endef > > +$(eval $(call Profile,SK-WB8)) > > _______________________________________________ > > openwrt-devel mailing list > > openwrt-devel at lists.openwrt.org > > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From alin.nastac at gmail.com Fri Apr 29 09:00:01 2016 From: alin.nastac at gmail.com (Alin Nastac) Date: Fri, 29 Apr 2016 15:00:01 +0200 Subject: [OpenWrt-Devel] [PATCH] load running state after lock is acquired Message-ID: <1461934801-17620-1-git-send-email-alin.nastac@gmail.com> When running "/etc/init.d/firewall reload & fw3 -q restart", the fw3 instance that handle the reload might try to read the running state after firewall was stopped by the fw3 instance that does the restarting. Since a NULL run_state will transform reload operation in start operation, the resulted iptables chains will contain duplicate sets of rules. --- main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index b953020..241da62 100644 --- a/main.c +++ b/main.c @@ -546,7 +546,6 @@ int main(int argc, char **argv) } build_state(false); - build_state(true); defs = &cfg_state->defaults; if (optind >= argc) @@ -577,12 +576,18 @@ int main(int argc, char **argv) print_family = family; fw3_pr_debug = true; - rv = start(); + if (fw3_lock()) + { + build_state(true); + rv = start(); + fw3_unlock(); + } } else if (!strcmp(argv[optind], "start")) { if (fw3_lock()) { + build_state(true); rv = start(); fw3_unlock(); } @@ -591,6 +596,7 @@ int main(int argc, char **argv) { if (fw3_lock()) { + build_state(true); rv = stop(false); fw3_unlock(); } @@ -599,6 +605,7 @@ int main(int argc, char **argv) { if (fw3_lock()) { + build_state(true); rv = stop(true); fw3_unlock(); } @@ -607,6 +614,7 @@ int main(int argc, char **argv) { if (fw3_lock()) { + build_state(true); stop(true); rv = start(); fw3_unlock(); @@ -616,6 +624,7 @@ int main(int argc, char **argv) { if (fw3_lock()) { + build_state(true); rv = reload(); fw3_unlock(); } -- 1.7.12.4 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From josua.mayer97 at gmail.com Fri Apr 29 09:36:56 2016 From: josua.mayer97 at gmail.com (Josua Mayer) Date: Fri, 29 Apr 2016 15:36:56 +0200 Subject: [OpenWrt-Devel] [PATCH v2 1/3] mount_root: implement overlay= boot option In-Reply-To: References: <1461867621-4055-1-git-send-email-josua.mayer97@gmail.com> Message-ID: <57236378.707@gmail.com> Am 29.04.2016 um 07:47 schrieb Rafa? Mi?ecki: > On 28 April 2016 at 20:20, wrote: >> @@ -33,6 +33,35 @@ start(int argc, char *argv[1]) if >> (!getenv("PREINIT")) return -1; >> >> + /* + * Check cmdline for a hint about overlay >> device + */ + if(!data) { + FILE *fp; >> + char buffer[100] = {0}; + + fp = >> fopen("/proc/cmdline", "r"); + while(!feof(fp)) { + >> if(fscanf(fp, "overlay=%s", buffer)) + >> break; > > Please keep coding style consistent across the project. You can see > there is: if (!getenv("PREINIT")) with space after "if". Please > update your code to use the same style, e.g.: if (!data) while > (!feof(fp)) { > Will do, thanks for the pointer (I really didn't notice)! Meanwhile any comments on the content itself? _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From karlp at tweak.net.au Fri Apr 29 09:53:58 2016 From: karlp at tweak.net.au (Karl Palsson) Date: Fri, 29 Apr 2016 13:53:58 +0000 Subject: [OpenWrt-Devel] [PATCH 1/2] ubus: lua: return string errors, not just codes Message-ID: <1461938039-24143-1-git-send-email-karlp@tweak.net.au> From: Karl Palsson Return an extra string to lua clients, not just the code. Signed-off-by: Karl Palsson --- Makes it much more pleasant when working with ubus via lua, rather than simply getting the integer return code. example code also updated to demonstrate access to the code and message. lua/test_client.lua | 11 +++++++---- lua/ubus.c | 24 ++++++++++++++++-------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/lua/test_client.lua b/lua/test_client.lua index 0b60e0d..c006b4c 100755 --- a/lua/test_client.lua +++ b/lua/test_client.lua @@ -22,10 +22,13 @@ for i, n in ipairs(namespaces) do end end -local status = conn:call("test", "hello", { msg = "eth0" }) - -for k, v in pairs(status) do - print("key=" .. k .. " value=" .. tostring(v)) +local status, rc, desc = conn:call("test", "hello", { msg = "eth0" }) +if not status then + print("test.hello failed, code, desc: ", rc, desc) +else + for k, v in pairs(status) do + print("key=" .. k .. " value=" .. tostring(v)) + end end local status = {conn:call("test", "hello1", { msg = "eth0" })} diff --git a/lua/ubus.c b/lua/ubus.c index 86e34b7..0df2887 100644 --- a/lua/ubus.c +++ b/lua/ubus.c @@ -246,7 +246,8 @@ ubus_lua_connect(lua_State *L) /* NB: no errors from ubus_connect() yet */ lua_pushnil(L); lua_pushinteger(L, UBUS_STATUS_UNKNOWN_ERROR); - return 2; + lua_pushstring(L, ubus_strerror(UBUS_STATUS_UNKNOWN_ERROR)); + return 3; } @@ -273,7 +274,8 @@ ubus_lua_objects(lua_State *L) lua_pop(L, 1); lua_pushnil(L); lua_pushinteger(L, rv); - return 2; + lua_pushstring(L, ubus_strerror(rv)); + return 3; } return 1; @@ -335,7 +337,8 @@ static int ubus_lua_reply(lua_State *L) { lua_pushnil(L); lua_pushinteger(L, UBUS_STATUS_INVALID_ARGUMENT); - return 2; + lua_pushstring(L, ubus_strerror(UBUS_STATUS_INVALID_ARGUMENT)); + return 3; } req = lua_touserdata(L, 2); @@ -529,7 +532,8 @@ ubus_lua_signatures(lua_State *L) lua_pop(L, 1); lua_pushnil(L); lua_pushinteger(L, rv); - return 2; + lua_pushstring(L, ubus_strerror(rv)); + return 3; } return 1; @@ -564,7 +568,8 @@ ubus_lua_call(lua_State *L) { lua_pushnil(L); lua_pushinteger(L, UBUS_STATUS_INVALID_ARGUMENT); - return 2; + lua_pushstring(L, ubus_strerror(UBUS_STATUS_INVALID_ARGUMENT)); + return 3; } rv = ubus_lookup_id(c->ctx, path, &id); @@ -573,7 +578,8 @@ ubus_lua_call(lua_State *L) { lua_pushnil(L); lua_pushinteger(L, rv); - return 2; + lua_pushstring(L, ubus_strerror(rv)); + return 3; } top = lua_gettop(L); @@ -584,7 +590,8 @@ ubus_lua_call(lua_State *L) lua_pop(L, 1); lua_pushnil(L); lua_pushinteger(L, rv); - return 2; + lua_pushstring(L, ubus_strerror(rv)); + return 3; } return lua_gettop(L) - top; @@ -669,7 +676,8 @@ ubus_lua_send(lua_State *L) if (!ubus_lua_format_blob_array(L, &c->buf, true)) { lua_pushnil(L); lua_pushinteger(L, UBUS_STATUS_INVALID_ARGUMENT); - return 2; + lua_pushstring(L, ubus_strerror(UBUS_STATUS_INVALID_ARGUMENT)); + return 3; } // Send the event -- 2.4.11 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From karlp at tweak.net.au Fri Apr 29 09:53:59 2016 From: karlp at tweak.net.au (Karl Palsson) Date: Fri, 29 Apr 2016 13:53:59 +0000 Subject: [OpenWrt-Devel] [PATCH 2/2] ubus: lua: use built in pkg-config support for alternatives In-Reply-To: <1461938039-24143-1-git-send-email-karlp@tweak.net.au> References: <1461938039-24143-1-git-send-email-karlp@tweak.net.au> Message-ID: <1461938039-24143-2-git-send-email-karlp@tweak.net.au> From: Karl Palsson Different distributions have different names for the lua 5.1 package. Use cmake's built in pkg-config support to search for the first one, rather than running it explicitly and searching for a single version. Signed-off-by: Karl Palsson --- Same patch as in libubox & uci lua/CMakeLists.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt index e4821bf..abf4929 100644 --- a/lua/CMakeLists.txt +++ b/lua/CMakeLists.txt @@ -5,14 +5,8 @@ PROJECT(ubus C) SET(CMAKE_INSTALL_PREFIX /) IF(NOT LUA_CFLAGS) - FIND_PROGRAM(PKG_CONFIG pkg-config) - IF(PKG_CONFIG) - EXECUTE_PROCESS( - COMMAND pkg-config --silence-errors --cflags lua5.1 - OUTPUT_VARIABLE LUA_CFLAGS - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - ENDIF() + INCLUDE(FindPkgConfig) + pkg_search_module(LUA lua5.1 lua-5.1) ENDIF() ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -I.. ${LUA_CFLAGS}) -- 2.4.11 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From andrej.vlasic at sartura.hr Fri Apr 29 18:36:40 2016 From: andrej.vlasic at sartura.hr (Andrej Vlasic) Date: Fri, 29 Apr 2016 22:36:40 +0000 Subject: [OpenWrt-Devel] [PATCH v2] ubox: make system log support as a separate package In-Reply-To: <01000154403dda13-2aec5e01-72d9-4975-800e-6aec1bac2a29-000000@email.amazonses.com> References: <01000154403dda13-2aec5e01-72d9-4975-800e-6aec1bac2a29-000000@email.amazonses.com> Message-ID: <01000154642ab3b5-4997407d-dd9d-4c91-84b0-1cf2ae5b8fcf-000000@email.amazonses.com> Currently system log is always included as a part of ubox. Add logd as a seperate package and add it to default packages list. Signed-off-by: Andrej Vlasic --- Changes in v2: Move system log into seperate package, and add it to default packages list include/target.mk | 2 +- package/system/ubox/Makefile | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/target.mk b/include/target.mk index 76fbd99..a19edcc 100644 --- a/include/target.mk +++ b/include/target.mk @@ -12,7 +12,7 @@ __target_inc=1 DEVICE_TYPE?=router # Default packages - the really basic set -DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch +DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd # For nas targets DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm # For router targets diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index b32c794..f9f1ac1 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -28,11 +28,17 @@ define Package/ubox TITLE:=OpenWrt system helper toolbox endef +define Package/logd + SECTION:=base + CATEGORY:=Base system + DEPENDS:=+libubox +libubus +libblobmsg-json +USE_GLIBC:librt + TITLE:=OpenWrt system log implementation +endef + define Package/ubox/install - $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ $(1)/etc/init.d/ + $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,logd,logread,validate_data} $(1)/sbin/ - $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib $(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod @@ -42,4 +48,12 @@ define Package/ubox/install $(LN) ../../sbin/kmodloader $(1)/usr/sbin/modprobe endef +define Package/logd/install + $(INSTALL_DIR) $(1)/sbin $(1)/etc/init.d/ + + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/ + $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log +endef + $(eval $(call BuildPackage,ubox)) +$(eval $(call BuildPackage,logd)) -- 2.8.0 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From avijitnsec at gmail.com Fri Apr 29 20:16:36 2016 From: avijitnsec at gmail.com (Avijit Das) Date: Fri, 29 Apr 2016 17:16:36 -0700 Subject: [OpenWrt-Devel] Linksys WRT1900ACS router is not booting after flashing custom build Message-ID: Hello, I am trying to flash custom image in my router (Linksys WRT1900ACS). I have followed the step mentioned in the bellow link: https://davidsimpson.me/2015/11/14/installing-openwrt-on-a-linksys-wrt1900acs/ I end up bricking my device. Can you please suggest me how to recover my device? Also can you please tell me which image I should flash to this router ? I tried with openwrt-mvebu-armada-385-linksys-shelby-squashfs-factory.img , seems did not work. Also I have added myself in this mailing group couple of days back. Not sure if this is the right forum to ask this question. If nor please direct me to right forum. Thanks, Avijit -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From vincent.wiemann at ironai.com Fri Apr 29 21:16:00 2016 From: vincent.wiemann at ironai.com (Vincent Wiemann) Date: Sat, 30 Apr 2016 03:16:00 +0200 Subject: [OpenWrt-Devel] Linksys WRT1900ACS router is not booting after flashing custom build In-Reply-To: References: Message-ID: <57240750.80103@ironai.com> Hi Avijit, > Also I have added myself in this mailing group couple of days back. Not > sure if this is the right forum to ask this question. If nor please > direct me to right forum. this is the OpenWrt developer mailing list. You should better use the forum: https://forum.openwrt.org/ Greetz, CodeFetch _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From hannu.nyman at iki.fi Sat Apr 30 03:20:05 2016 From: hannu.nyman at iki.fi (Hannu Nyman) Date: Sat, 30 Apr 2016 10:20:05 +0300 Subject: [OpenWrt-Devel] r49252 (dnsmasq: run as dedicated UID/GID) causing major havoc Message-ID: <7318b9f4-1020-6c53-63a2-6f0e5ea470d0@iki.fi> r49252 (dnsmasq: run as dedicated UID/GID) seems to be causing major havoc. So far at least 5 bugs about it: #22271, #22277, #22278, #22300, #22303 The change to require a separate userid & group for dnsmasq without providing any transitioning mechanism effectively prevents dnsmasq from starting if the userid is not there. In practice this kills DNS & DHCP for anybody who: a) applies DD trunk sysupgrade with preserving old settings, b) restores a previous settings backup, c) upgrades later from AA/BB/CC to the forthcoming DD release while preserving settings So, this headache will not go away easily. I think that we need a transitioning mechanism to ensure that dnsmasq starts despite the possibly missing userid. I see three alternatives: 1) dnsmasq startup init script checks for dnsmasq user's presence and if yes, only then apply the separate userid parameter for dnsmasq 2) dnsmasq startup init script checks for dnsmasq user's presence and creates the user if not present 3) uci-defaults script added to dnsmasq package to create the new user at the first boot (note that this solution might not solve the case b for restoring an earlier settings backup later ) I am not sure what might be optimal in the long run. 2) creating the user might provice most uniform behaviour later _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From daniel at makrotopia.org Sat Apr 30 04:10:19 2016 From: daniel at makrotopia.org (Daniel Golle) Date: Sat, 30 Apr 2016 10:10:19 +0200 Subject: [OpenWrt-Devel] r49252 (dnsmasq: run as dedicated UID/GID) causing major havoc In-Reply-To: <7318b9f4-1020-6c53-63a2-6f0e5ea470d0@iki.fi> References: <7318b9f4-1020-6c53-63a2-6f0e5ea470d0@iki.fi> Message-ID: <20160430081017.GA1817@makrotopia.org> Hi! On Sat, Apr 30, 2016 at 10:20:05AM +0300, Hannu Nyman wrote: > r49252 (dnsmasq: run as dedicated UID/GID) seems to be causing major havoc. > > So far at least 5 bugs about it: #22271, #22277, #22278, #22300, #22303 > > The change to require a separate userid & group for dnsmasq without > providing any transitioning mechanism effectively prevents dnsmasq from > starting if the userid is not there. In practice this kills DNS & DHCP for > anybody who: > a) applies DD trunk sysupgrade with preserving old settings, > b) restores a previous settings backup, > c) upgrades later from AA/BB/CC to the forthcoming DD release while > preserving settings > > So, this headache will not go away easily. I think that we need a > transitioning mechanism to ensure that dnsmasq starts despite the possibly > missing userid. > > I see three alternatives: > > 1) dnsmasq startup init script checks for dnsmasq user's presence and if > yes, only then apply the separate userid parameter for dnsmasq > > 2) dnsmasq startup init script checks for dnsmasq user's presence and > creates the user if not present > > 3) uci-defaults script added to dnsmasq package to create the new user at > the first boot (note that this solution might not solve the case b for > restoring an earlier settings backup later ) Adding a uci-defaults script for the dnsmasq package in charge of migrating the old/existing configuration would be the appropriate thing to do. Restoring an outdated config at a later point will always break a lot of things and thus I wouldn't explicitely work-around that case, it's just something folks shouldn't do or be aware that manual cleaning will be needed when restoring a config which doesn't belong to what's actually installed. > > I am not sure what might be optimal in the long run. 2) creating the user > might provice most uniform behaviour later I don't like bloating init scripts unless there really isn't any other way to solve a problem... Cheers Daniel _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From p.wassi at gmx.at Sat Apr 30 04:17:59 2016 From: p.wassi at gmx.at (p.wassi at gmx.at) Date: Sat, 30 Apr 2016 10:17:59 +0200 Subject: [OpenWrt-Devel] [PATCH] ar71xx: Fix eth0 support for Ubiquiti UniFi AP AC Message-ID: From: Paul Wassi Fix eth0 support for the Ubiquiti UniFi AP AC Signed-off-by: Paul Wassi --- In changeset 48937 a patch was introduced which changes the default behaviour of ath79_register_eth(). The patch below addresses this issue and provides proper device setup. Eth is then working out of the box. files/arch/mips/ath79/mach-ubnt-unifiac.c | 1 + 1 file changed, 1 insertion(+) diff -rupN a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ubnt-unifiac.c @@ -84,6 +84,7 @@ static void __init ubnt_unifiac_setup(vo eeprom + UNIFIAC_MAC0_OFFSET, 0); ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; ath79_eth0_data.phy_mask = BIT(4); ath79_eth0_pll_data.pll_10 = 0x00001313; _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From blogic at openwrt.org Sat Apr 30 05:36:19 2016 From: blogic at openwrt.org (John Crispin) Date: Sat, 30 Apr 2016 11:36:19 +0200 Subject: [OpenWrt-Devel] r49252 (dnsmasq: run as dedicated UID/GID) causing major havoc In-Reply-To: <20160430081017.GA1817@makrotopia.org> References: <7318b9f4-1020-6c53-63a2-6f0e5ea470d0@iki.fi> <20160430081017.GA1817@makrotopia.org> Message-ID: <6ba50f15-3ef3-650e-09be-a256da92613a@openwrt.org> On 30/04/2016 10:10, Daniel Golle wrote: > Hi! > > On Sat, Apr 30, 2016 at 10:20:05AM +0300, Hannu Nyman wrote: >> r49252 (dnsmasq: run as dedicated UID/GID) seems to be causing major havoc. >> >> So far at least 5 bugs about it: #22271, #22277, #22278, #22300, #22303 >> >> The change to require a separate userid & group for dnsmasq without >> providing any transitioning mechanism effectively prevents dnsmasq from >> starting if the userid is not there. In practice this kills DNS & DHCP for >> anybody who: >> a) applies DD trunk sysupgrade with preserving old settings, >> b) restores a previous settings backup, >> c) upgrades later from AA/BB/CC to the forthcoming DD release while >> preserving settings >> >> So, this headache will not go away easily. I think that we need a >> transitioning mechanism to ensure that dnsmasq starts despite the possibly >> missing userid. > >> >> I see three alternatives: >> >> 1) dnsmasq startup init script checks for dnsmasq user's presence and if >> yes, only then apply the separate userid parameter for dnsmasq >> >> 2) dnsmasq startup init script checks for dnsmasq user's presence and >> creates the user if not present >> >> 3) uci-defaults script added to dnsmasq package to create the new user at >> the first boot (note that this solution might not solve the case b for >> restoring an earlier settings backup later ) > > Adding a uci-defaults script for the dnsmasq package in charge of > migrating the old/existing configuration would be the appropriate > thing to do. Restoring an outdated config at a later point will > always break a lot of things and thus I wouldn't explicitely > work-around that case, it's just something folks shouldn't do or be > aware that manual cleaning will be needed when restoring a config > which doesn't belong to what's actually installed. > >> >> I am not sure what might be optimal in the long run. 2) creating the user >> might provice most uniform behaviour later > > I don't like bloating init scripts unless there really isn't any other > way to solve a problem... > > > Cheers > > > Daniel > _______________________________________________ > openwrt-devel mailing list > openwrt-devel at lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > i am working on a uci-defaults script for base-files that will sync the user ids after sysupgrade with those in the opkg cache to mitigate the OMG HAVOC _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sat Apr 30 08:25:27 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sat, 30 Apr 2016 14:25:27 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] lantiq: add device tree binding for the phy clock source Message-ID: <1462019128-16599-1-git-send-email-openwrt@kresin.me> Signed-off-by: Mathias Kresin --- ...x200-add-gphy-clk-src-device-tree-binding.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch diff --git a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch new file mode 100644 index 0000000..7a4d239 --- /dev/null +++ b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch @@ -0,0 +1,26 @@ +--- a/arch/mips/lantiq/xway/sysctrl.c ++++ b/arch/mips/lantiq/xway/sysctrl.c +@@ -426,6 +426,8 @@ static void clkdev_add_clkout(void) + /* bring up all register ranges that we need for basic system control */ + void __init ltq_soc_init(void) + { ++ int ret; ++ u32 phy_clk_src, ifcc; + struct resource res_pmu, res_cgu, res_ebu; + struct device_node *np_pmu = + of_find_compatible_node(NULL, NULL, "lantiq,pmu-xway"); +@@ -608,4 +610,14 @@ void __init ltq_soc_init(void) + + if (of_machine_is_compatible("lantiq,vr9")) + xbar_fpi_burst_disable(); ++ ++ if (np_cgu) { ++ ret = of_property_read_u32(np_cgu, "lantiq,phy-clk-src", ++ &phy_clk_src); ++ ++ if (!ret) { ++ ifcc = ltq_cgu_r32(ifccr) & ~(0x1c); ++ ltq_cgu_w32(ifcc | (phy_clk_src << 2), ifccr); ++ } ++ } + } -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sat Apr 30 08:25:28 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sat, 30 Apr 2016 14:25:28 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: VGV7510KW22BRN - set the phy clock source In-Reply-To: <1462019128-16599-1-git-send-email-openwrt@kresin.me> References: <1462019128-16599-1-git-send-email-openwrt@kresin.me> Message-ID: <1462019128-16599-2-git-send-email-openwrt@kresin.me> VGV7510KW2 with VRX288 v1.2 has brnboot 1.8 installed. Starting with this brnboot version, the "GPHY Clock Source" isn't set anymore by brnboot, with the result that xrx200-net fails to probe/initialize the phys. Use the phy clock source device tree binding to specify the clock source. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/VGV7510KW22BRN.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/linux/lantiq/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/dts/VGV7510KW22BRN.dts index 1880c8c..d7c6b51 100644 --- a/target/linux/lantiq/dts/VGV7510KW22BRN.dts +++ b/target/linux/lantiq/dts/VGV7510KW22BRN.dts @@ -3,6 +3,12 @@ /include/ "VGV7510KW22.dtsi" / { + sram at 1F000000 { + cgu at 103000 { + lantiq,phy-clk-src = <0x2>; + }; + }; + fpi at 10000000 { localbus at 0 { nor-boot at 0 { -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sat Apr 30 08:26:10 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sat, 30 Apr 2016 14:26:10 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: VG3503J - use the same PHY led functionality as the OEM firmware Message-ID: <1462019170-16691-1-git-send-email-openwrt@kresin.me> Based on the vg3503j_gphy_led.sh script published in the VG3503J wiki article, the OEM Firmware uses the following PHY led functionality: gphy led 0: LINK/ACTIVITY gphy led 1: LINK gphy led 2: ACTIVITY Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/VG3503J.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi index 780d838..62a336c 100644 --- a/target/linux/lantiq/dts/VG3503J.dtsi +++ b/target/linux/lantiq/dts/VG3503J.dtsi @@ -153,18 +153,18 @@ phy11: ethernet-phy at 11 { reg = <0x11>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - lantiq,led0h = <0x42>; - lantiq,led0l = <0x10>; - lantiq,led2h = <0x20>; - lantiq,led2l = <0x00>; + lantiq,led1h = <0x70>; + lantiq,led1l = <0x00>; + lantiq,led2h = <0x00>; + lantiq,led2l = <0x03>; }; phy13: ethernet-phy at 13 { reg = <0x13>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; - lantiq,led0h = <0x42>; - lantiq,led0l = <0x10>; - lantiq,led2h = <0x20>; - lantiq,led2l = <0x00>; + lantiq,led1h = <0x70>; + lantiq,led1l = <0x00>; + lantiq,led2h = <0x00>; + lantiq,led2l = <0x03>; }; }; }; -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sat Apr 30 08:29:31 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sat, 30 Apr 2016 14:29:31 +0200 Subject: [OpenWrt-Devel] [PATCH] lantiq: use sysupgrade.bin postfix for tplink images Message-ID: <1462019371-29538-1-git-send-email-openwrt@kresin.me> Use the same name for TP-Link images as it was with the old image build code. Move the BOARD_ID export to the TP-Link image build recipe, to indicate that the variable is only related in this context. Signed-off-by: Mathias Kresin --- target/linux/lantiq/image/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index f779a1b..033dcc3 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -283,14 +283,15 @@ define Device/Default IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs endef -DEVICE_VARS += BOARD_ID DEVICE_PROFILE DEVICE_DTS +DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS define Device/lantiqTpLink KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-fw - IMAGES := tplink - IMAGE/tplink := mktplinkfw2 + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := mktplinkfw2 endef +DEVICE_VARS += BOARD_ID define Device/lantiqBrnImage KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sat Apr 30 08:32:42 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sat, 30 Apr 2016 14:32:42 +0200 Subject: [OpenWrt-Devel] [PATCH 1/3] lantiq: move partitions into partion table node Message-ID: <1462019564-29663-1-git-send-email-openwrt@kresin.me> Starting with kernel 4.4, the use of partitions as direct subnodes of the mtd device is discouraged and only supported for backward compatiblity reasons. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/ACMP252.dts | 67 +++--- target/linux/lantiq/dts/ARV4510PW.dts | 36 +-- target/linux/lantiq/dts/ARV4518PWR01.dtsi | 48 ++-- target/linux/lantiq/dts/ARV4519PW.dts | 46 ++-- target/linux/lantiq/dts/ARV4520PW.dts | 48 ++-- target/linux/lantiq/dts/ARV4525PW.dts | 48 ++-- target/linux/lantiq/dts/ARV452CQW.dts | 48 ++-- target/linux/lantiq/dts/ARV7510PW22.dts | 48 ++-- target/linux/lantiq/dts/ARV7518PW.dts | 46 ++-- target/linux/lantiq/dts/ARV7519PW.dts | 46 ++-- target/linux/lantiq/dts/ARV7519RW22.dts | 48 ++-- target/linux/lantiq/dts/ARV7525PW.dts | 48 ++-- target/linux/lantiq/dts/ARV752DPW.dts | 48 ++-- target/linux/lantiq/dts/ARV752DPW22.dts | 42 ++-- target/linux/lantiq/dts/ARV8539PW22.dts | 345 +++++++++++++++-------------- target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 87 ++++---- target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 56 ++--- target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 48 ++-- target/linux/lantiq/dts/DGN1000B.dts | 60 ++--- target/linux/lantiq/dts/DGN3500.dtsi | 42 ++-- target/linux/lantiq/dts/EASY50712.dts | 42 ++-- target/linux/lantiq/dts/EASY50810.dts | 42 ++-- target/linux/lantiq/dts/EASY80920.dtsi | 52 +++-- target/linux/lantiq/dts/EASY80920NAND.dts | 28 ++- target/linux/lantiq/dts/EASY80920NOR.dts | 28 ++- target/linux/lantiq/dts/FRITZ3370.dts | 52 +++-- target/linux/lantiq/dts/FRITZ7320.dts | 48 ++-- target/linux/lantiq/dts/GIGASX76X.dts | 32 +-- target/linux/lantiq/dts/GR7000.dts | 36 +-- target/linux/lantiq/dts/H201L.dts | 36 +-- target/linux/lantiq/dts/P2601HNFX.dts | 36 +-- target/linux/lantiq/dts/P2812HNUF1.dts | 36 +-- target/linux/lantiq/dts/P2812HNUF3.dts | 30 ++- target/linux/lantiq/dts/TDW89X0.dtsi | 42 ++-- target/linux/lantiq/dts/VG3503J.dtsi | 82 +++---- target/linux/lantiq/dts/VGV7510KW22.dtsi | 14 +- target/linux/lantiq/dts/VGV7510KW22BRN.dts | 82 +++---- target/linux/lantiq/dts/VGV7510KW22NOR.dts | 28 +-- target/linux/lantiq/dts/VGV7519BRN.dts | 32 +-- target/linux/lantiq/dts/VGV7519NOR.dts | 44 ++-- target/linux/lantiq/dts/VR200v.dts | 72 +++--- target/linux/lantiq/dts/WBMR.dts | 60 ++--- 42 files changed, 1253 insertions(+), 1006 deletions(-) diff --git a/target/linux/lantiq/dts/ACMP252.dts b/target/linux/lantiq/dts/ACMP252.dts index d7d5b32..06b21b6 100644 --- a/target/linux/lantiq/dts/ACMP252.dts +++ b/target/linux/lantiq/dts/ACMP252.dts @@ -29,38 +29,43 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x0 0x20000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x0 0x20000>; + read-only; + }; + + partition at 20000 { + label = "uboot_env"; + reg = <0x20000 0x20000>; + }; + + partition at 40000 { + label = "boardconfig"; + reg = <0x40000 0x60000>; + read-only; + }; + + partition at a0000 { + label = "firmware"; + reg = <0xa0000 0xf20000>; + }; + + partition at fc0000 { + label = "sysconfig"; + reg = <0xfc0000 0x40000>; + }; + + partition at 0x1000000 { + label = "rootfs_data"; + reg = <0x1000000 0x1000000>; + }; }; - - partition at 20000 { - label = "uboot_env"; - reg = <0x20000 0x20000>; - }; - - partition at 40000 { - label = "boardconfig"; - reg = <0x40000 0x60000>; - read-only; - }; - - partition at a0000 { - label = "firmware"; - reg = <0xa0000 0xf20000>; - }; - - partition at fc0000 { - label = "sysconfig"; - reg = <0xfc0000 0x40000>; - }; - - partition at 0x1000000 { - label = "rootfs_data"; - reg = <0x1000000 0x1000000>; - }; - }; }; diff --git a/target/linux/lantiq/dts/ARV4510PW.dts b/target/linux/lantiq/dts/ARV4510PW.dts index 18b2da8..bbfec2f 100644 --- a/target/linux/lantiq/dts/ARV4510PW.dts +++ b/target/linux/lantiq/dts/ARV4510PW.dts @@ -42,21 +42,27 @@ lantiq,noxip; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x40000>; - read-only; - }; - - partition at 40000 { - label = "uboot_env"; - reg = <0x40000 0x20000>; - read-only; - }; - - partition at 60000 { - label = "firmware"; - reg = <0x60000 0xfa0000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x40000>; + read-only; + }; + + partition at 40000 { + label = "uboot_env"; + reg = <0x40000 0x20000>; + read-only; + }; + + partition at 60000 { + label = "firmware"; + reg = <0x60000 0xfa0000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/ARV4518PWR01.dtsi b/target/linux/lantiq/dts/ARV4518PWR01.dtsi index e72eb6d..4a3eb05 100644 --- a/target/linux/lantiq/dts/ARV4518PWR01.dtsi +++ b/target/linux/lantiq/dts/ARV4518PWR01.dtsi @@ -36,27 +36,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; /* 64 KB */ - read-only; - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; /* 64 KB */ - read-only; - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x3d0000>; - }; - - partition at 400000 { - label = "boardconfig"; - reg = <0x3f0000 0x10000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; /* 64 KB */ + read-only; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; /* 64 KB */ + read-only; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x3d0000>; + }; + + partition at 400000 { + label = "boardconfig"; + reg = <0x3f0000 0x10000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV4519PW.dts b/target/linux/lantiq/dts/ARV4519PW.dts index 5e0b846..d6b6da3 100644 --- a/target/linux/lantiq/dts/ARV4519PW.dts +++ b/target/linux/lantiq/dts/ARV4519PW.dts @@ -40,26 +40,32 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; - read-only; - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x3d0000>; - }; - - partition at 3f0000 { - label = "boardconfig"; - reg = <0x3f0000 0x10000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; + read-only; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x3d0000>; + }; + + partition at 3f0000 { + label = "boardconfig"; + reg = <0x3f0000 0x10000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV4520PW.dts b/target/linux/lantiq/dts/ARV4520PW.dts index 75665b9..299d13c 100644 --- a/target/linux/lantiq/dts/ARV4520PW.dts +++ b/target/linux/lantiq/dts/ARV4520PW.dts @@ -41,27 +41,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x20000>; - read-only; - }; - - partition at 20000 { - label = "uboot_env"; - reg = <0x20000 0x10000>; - read-only; - }; - - partition at 30000 { - label = "firmware"; - reg = <0x30000 0x3c0000>; - }; - - partition at 7f0000 { - label = "boardconfig"; - reg = <0x3f0000 0x10000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x20000>; + read-only; + }; + + partition at 20000 { + label = "uboot_env"; + reg = <0x20000 0x10000>; + read-only; + }; + + partition at 30000 { + label = "firmware"; + reg = <0x30000 0x3c0000>; + }; + + partition at 7f0000 { + label = "boardconfig"; + reg = <0x3f0000 0x10000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV4525PW.dts b/target/linux/lantiq/dts/ARV4525PW.dts index 92e6758..6a7ca62 100644 --- a/target/linux/lantiq/dts/ARV4525PW.dts +++ b/target/linux/lantiq/dts/ARV4525PW.dts @@ -37,27 +37,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; - read-only; - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; - read-only; - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x3d0000>; - }; - - partition at 400000 { - label = "boardconfig"; - reg = <0x3f0000 0x10000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; + read-only; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; + read-only; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x3d0000>; + }; + + partition at 400000 { + label = "boardconfig"; + reg = <0x3f0000 0x10000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV452CQW.dts b/target/linux/lantiq/dts/ARV452CQW.dts index 78f00d6..57aa864 100644 --- a/target/linux/lantiq/dts/ARV452CQW.dts +++ b/target/linux/lantiq/dts/ARV452CQW.dts @@ -40,27 +40,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; - read-only; - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; - read-only; - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x3d0000>; - }; - - partition at 3f0000 { - label = "boardconfig"; - reg = <0x3f0000 0x10000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; + read-only; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; + read-only; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x3d0000>; + }; + + partition at 3f0000 { + label = "boardconfig"; + reg = <0x3f0000 0x10000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV7510PW22.dts b/target/linux/lantiq/dts/ARV7510PW22.dts index c92c393..16b4fb4 100644 --- a/target/linux/lantiq/dts/ARV7510PW22.dts +++ b/target/linux/lantiq/dts/ARV7510PW22.dts @@ -38,27 +38,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x40000>; - read-only; - }; - - partition at 40000 { - label = "uboot_env"; - reg = <0x40000 0x20000>; - read-only; - }; - - partition at 60000 { - label = "firmware"; - reg = <0x60000 0xf80000>; - }; - - partition at fe0000 { - label = "board_config"; - reg = <0xfe0000 0x20000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x40000>; + read-only; + }; + + partition at 40000 { + label = "uboot_env"; + reg = <0x40000 0x20000>; + read-only; + }; + + partition at 60000 { + label = "firmware"; + reg = <0x60000 0xf80000>; + }; + + partition at fe0000 { + label = "board_config"; + reg = <0xfe0000 0x20000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV7518PW.dts b/target/linux/lantiq/dts/ARV7518PW.dts index ec08b29..19a7442 100644 --- a/target/linux/lantiq/dts/ARV7518PW.dts +++ b/target/linux/lantiq/dts/ARV7518PW.dts @@ -39,26 +39,32 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; - read-only; - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x7d0000>; - }; - - partition at 400000 { - label = "boardconfig"; - reg = <0x7f0000 0x10000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; + read-only; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x7d0000>; + }; + + partition at 400000 { + label = "boardconfig"; + reg = <0x7f0000 0x10000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV7519PW.dts b/target/linux/lantiq/dts/ARV7519PW.dts index c60f04e..b917b2d 100644 --- a/target/linux/lantiq/dts/ARV7519PW.dts +++ b/target/linux/lantiq/dts/ARV7519PW.dts @@ -38,26 +38,32 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x40000>; - read-only; - }; - - partition at 40000 { - label = "uboot_env"; - reg = <0x40000 0x20000>; - }; - - partition at 60000 { - label = "firmware"; - reg = <0x60000 0xf80000>; - }; - - partition at fe0000 { - label = "board_config"; - reg = <0xfe0000 0x20000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x40000>; + read-only; + }; + + partition at 40000 { + label = "uboot_env"; + reg = <0x40000 0x20000>; + }; + + partition at 60000 { + label = "firmware"; + reg = <0x60000 0xf80000>; + }; + + partition at fe0000 { + label = "board_config"; + reg = <0xfe0000 0x20000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV7519RW22.dts b/target/linux/lantiq/dts/ARV7519RW22.dts index 6f5d356..a15556b 100644 --- a/target/linux/lantiq/dts/ARV7519RW22.dts +++ b/target/linux/lantiq/dts/ARV7519RW22.dts @@ -30,27 +30,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x0 0x60000>; - read-only; - }; - - partition at 60000 { - label = "uboot-env"; - reg = <0x60000 0x20000>; - read-only; - }; - - partition at 80000 { - label = "firmware"; - reg = <0x80000 0x1f00000>; - }; - - boardconfig: partition at 1f80000 { - label = "boardconfig"; - reg = <0x1f80000 0x80000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x0 0x60000>; + read-only; + }; + + partition at 60000 { + label = "uboot-env"; + reg = <0x60000 0x20000>; + read-only; + }; + + partition at 80000 { + label = "firmware"; + reg = <0x80000 0x1f00000>; + }; + + boardconfig: partition at 1f80000 { + label = "boardconfig"; + reg = <0x1f80000 0x80000>; + read-only; + }; }; }; }; diff --git a/target/linux/lantiq/dts/ARV7525PW.dts b/target/linux/lantiq/dts/ARV7525PW.dts index 2270893..62ae62b 100644 --- a/target/linux/lantiq/dts/ARV7525PW.dts +++ b/target/linux/lantiq/dts/ARV7525PW.dts @@ -39,27 +39,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; - read-only; - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; - read-only; - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x3d0000>; - }; - - partition at 400000 { - label = "board_config"; - reg = <0x3f0000 0x10000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; + read-only; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; + read-only; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x3d0000>; + }; + + partition at 400000 { + label = "board_config"; + reg = <0x3f0000 0x10000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV752DPW.dts b/target/linux/lantiq/dts/ARV752DPW.dts index 134680b..d4b5767 100644 --- a/target/linux/lantiq/dts/ARV752DPW.dts +++ b/target/linux/lantiq/dts/ARV752DPW.dts @@ -38,27 +38,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; - read-only; - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; - read-only; - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x7d0000>; - }; - - partition at 7f0000 { - label = "board_config"; - reg = <0x7f0000 0x10000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; + read-only; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; + read-only; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x7d0000>; + }; + + partition at 7f0000 { + label = "board_config"; + reg = <0x7f0000 0x10000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV752DPW22.dts b/target/linux/lantiq/dts/ARV752DPW22.dts index aec5f7e..efe4257 100644 --- a/target/linux/lantiq/dts/ARV752DPW22.dts +++ b/target/linux/lantiq/dts/ARV752DPW22.dts @@ -38,27 +38,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x30000>; - read-only; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - partition at 10000 { - label = "uboot_env"; - reg = <0x30000 0x10000>; - read-only; - }; + partition at 0 { + label = "uboot"; + reg = <0x00000 0x30000>; + read-only; + }; - partition at 20000 { - label = "firmware"; - reg = <0x40000 0x7b0000>; - }; + partition at 10000 { + label = "uboot_env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x40000 0x7b0000>; + }; - partition at 7f0000 { - label = "board_config"; - reg = <0x7f0000 0x10000>; - read-only; + partition at 7f0000 { + label = "board_config"; + reg = <0x7f0000 0x10000>; + read-only; + }; }; }; diff --git a/target/linux/lantiq/dts/ARV8539PW22.dts b/target/linux/lantiq/dts/ARV8539PW22.dts index 9e1b441..9f9db82 100644 --- a/target/linux/lantiq/dts/ARV8539PW22.dts +++ b/target/linux/lantiq/dts/ARV8539PW22.dts @@ -3,176 +3,181 @@ /include/ "danube.dtsi" / { - model = "ARV8539PW22 - Speedport W 504V Typ A"; - - chosen { - leds { - boot = &power_green; - failsafe = &power_red; - running = &power_green; - - dsl = &dsl_green; - internet = &online_green; - wifi = &wireless_green; - }; - }; + model = "ARV8539PW22 - Speedport W 504V Typ A"; + + chosen { + leds { + boot = &power_green; + failsafe = &power_red; + running = &power_green; - memory at 0 { - reg = <0x0 0x4000000>; - }; - - sram at 1F000000 { - vmmc at 107000 { - status = "okay"; - gpios = <&gpio 31 0>; - }; - }; - - fpi at 10000000 { - localbus at 0 { - nor-boot at 0 { - compatible = "lantiq,nor"; - bank-width = <2>; - reg = <0 0x0 0x800000>; - #address-cells = <1>; - #size-cells = <1>; - - partition at 0 { - label = "uboot"; - reg = <0x00000 0x30000>; /* 192 KiB */ - read-only; - }; - - partition at 30000 { - label = "uboot"; - reg = <0x30000 0x10000>; /* 64 KiB */ - read-only; - }; - - partition at 40000 { - label = "firmware"; - reg = <0x40000 0x7B0000>; /* 7872 KiB */ - }; - - partition at 7F0000 { - label = "art"; - reg = <0x7F0000 0x10000>; /* 64 KiB*/ - read-only; - }; - }; - - mac_addr { - compatible = "lantiq,eth-mac"; - reg = <0 0x7f0016 0x6>; - mac-increment = <2>; - }; - - ath9k_eep { - compatible = "ath9k,eeprom"; - reg = <0 0x7f0400 0x1000 - 0 0x7f0016 0x6>; - ath,mac-increment = <1>; - ath,pci-slot = <14>; - ath,eep-endian; - ath,arv-ath9k-fix; - }; - }; - - gpio: pinmux at E100B10 { - pinctrl-names = "default"; - pinctrl-0 = <&state_default>; - - state_default: pinmux { - - pci_in { - lantiq,groups = "req1"; - lantiq,function = "pci"; - lantiq,open-drain = <1>; - lantiq,pull = <2>; - lantiq,output = <0>; - }; - pci_out { - lantiq,groups = "gnt1"; - lantiq,function = "pci"; - lantiq,output = <1>; - }; - pci_rst { - lantiq,pins = "io21"; - lantiq,pull = <2>; - lantiq,output = <1>; - }; - relay { - lantiq,pins = "io31"; - lantiq,output = <1>; - }; - }; - }; - - etop at E180000 { - phy-mode = "mii"; - }; - - pci at E105400 { - status = "okay"; - gpio-reset = <&gpio 21 0>; - }; - - ifxhcd at E101000 { - status = "okay"; - gpios = <&gpio 14 0>; - lantiq,portmask = <0x3>; - }; - - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <100>; - - wlan { - label = "wlan"; - gpios = <&gpio 29 1>; - linux,code = <0x211>; - }; - reset { - label = "reset"; - gpios = <&gpio 30 1>; - linux,code = <0x198>; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - - power_green: power-green { - label = "arv8539pw22:green:power"; - gpios = <&gpio 24 1>; - default-state = "keep"; - }; - power_red: power-red { - label = "arv8539pw22:red:power"; - gpios = <&gpio 4 1>; - }; - - dsl_green: dsl-green { - label = "arv8539pw22:green:dsl"; - gpios = <&gpio 5 1>; - }; - - online_green: online-green { - label = "arv8539pw22:green:online"; - gpios = <&gpio 6 1>; - }; - - wireless_green: wireless-green { - label = "arv8539pw22:green:wlan"; - gpios = <&gpio 8 1>; - }; - /* - telefonie green is missing - */ - }; + dsl = &dsl_green; + internet = &online_green; + wifi = &wireless_green; + }; + }; + + memory at 0 { + reg = <0x0 0x4000000>; + }; + + sram at 1F000000 { + vmmc at 107000 { + status = "okay"; + gpios = <&gpio 31 0>; + }; + }; + + fpi at 10000000 { + localbus at 0 { + nor-boot at 0 { + compatible = "lantiq,nor"; + bank-width = <2>; + reg = <0 0x0 0x800000>; + #address-cells = <1>; + #size-cells = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x30000>; /* 192 KiB */ + read-only; + }; + + partition at 30000 { + label = "uboot"; + reg = <0x30000 0x10000>; /* 64 KiB */ + read-only; + }; + + partition at 40000 { + label = "firmware"; + reg = <0x40000 0x7B0000>; /* 7872 KiB */ + }; + + partition at 7F0000 { + label = "art"; + reg = <0x7F0000 0x10000>; /* 64 KiB*/ + read-only; + }; + }; + }; + + mac_addr { + compatible = "lantiq,eth-mac"; + reg = <0 0x7f0016 0x6>; + mac-increment = <2>; + }; + + ath9k_eep { + compatible = "ath9k,eeprom"; + reg = <0 0x7f0400 0x1000 + 0 0x7f0016 0x6>; + ath,mac-increment = <1>; + ath,pci-slot = <14>; + ath,eep-endian; + ath,arv-ath9k-fix; + }; + }; + + gpio: pinmux at E100B10 { + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinmux { + pci_in { + lantiq,groups = "req1"; + lantiq,function = "pci"; + lantiq,open-drain = <1>; + lantiq,pull = <2>; + lantiq,output = <0>; + }; + pci_out { + lantiq,groups = "gnt1"; + lantiq,function = "pci"; + lantiq,output = <1>; + }; + pci_rst { + lantiq,pins = "io21"; + lantiq,pull = <2>; + lantiq,output = <1>; + }; + relay { + lantiq,pins = "io31"; + lantiq,output = <1>; + }; + }; + }; + + etop at E180000 { + phy-mode = "mii"; + }; + + pci at E105400 { + status = "okay"; + gpio-reset = <&gpio 21 0>; + }; + + ifxhcd at E101000 { + status = "okay"; + gpios = <&gpio 14 0>; + lantiq,portmask = <0x3>; + }; + + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + wlan { + label = "wlan"; + gpios = <&gpio 29 1>; + linux,code = <0x211>; + }; + reset { + label = "reset"; + gpios = <&gpio 30 1>; + linux,code = <0x198>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + power_green: power-green { + label = "arv8539pw22:green:power"; + gpios = <&gpio 24 1>; + default-state = "keep"; + }; + power_red: power-red { + label = "arv8539pw22:red:power"; + gpios = <&gpio 4 1>; + }; + + dsl_green: dsl-green { + label = "arv8539pw22:green:dsl"; + gpios = <&gpio 5 1>; + }; + + online_green: online-green { + label = "arv8539pw22:green:online"; + gpios = <&gpio 6 1>; + }; + + wireless_green: wireless-green { + label = "arv8539pw22:green:wlan"; + gpios = <&gpio 8 1>; + }; + /* + telefonie green is missing + */ + }; }; diff --git a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts index 69b977a..0165156 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts @@ -47,29 +47,35 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x40000>; /* 256KB */ - }; - - partition at 40000 { - label = "uboot_env"; - reg = <0x40000 0x10000>; /* 64KB */ - }; - - partition at 50000 { - label = "rg_conf_1"; - reg = <0x50000 0x10000>; - }; - - partition at 60000 { - label = "rg_conf_2"; - reg = <0x60000 0x10000>; - }; - - partition at 70000 { - label = "rg_conf_factory"; - reg = <0x70000 0x10000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x40000>; /* 256KB */ + }; + + partition at 40000 { + label = "uboot_env"; + reg = <0x40000 0x10000>; /* 64KB */ + }; + + partition at 50000 { + label = "rg_conf_1"; + reg = <0x50000 0x10000>; + }; + + partition at 60000 { + label = "rg_conf_2"; + reg = <0x60000 0x10000>; + }; + + partition at 70000 { + label = "rg_conf_factory"; + reg = <0x70000 0x10000>; + }; }; }; @@ -82,22 +88,27 @@ #size-cells = <1>; req-mask = <0x1>; /* PCI request lines to mask during NAND access */ - ath9k_cal: partition at 0 { - label = "art"; /* Atheros 9160 wifi b/g/n radio EEPROM */ - reg = <0x00000 0x4000>; - read-only; - }; - - partition at 4000 { - label = "kernel"; - reg = <0x4000 0x200000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + ath9k_cal: partition at 0 { + label = "art"; /* Atheros 9160 wifi b/g/n radio EEPROM */ + reg = <0x00000 0x4000>; + read-only; + }; + + partition at 4000 { + label = "kernel"; + reg = <0x4000 0x200000>; + }; + + partition at 164000 { + label = "ubi"; + reg = <0x204000 0x1DFC000>; + }; }; - - partition at 164000 { - label = "ubi"; - reg = <0x204000 0x1DFC000>; - }; - }; diff --git a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts index 1bf514b..595668f 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts @@ -48,31 +48,37 @@ #size-cells = <1>; req-mask = <0x1>; /* PCI request lines to mask during NAND access */ - partition at 0 { - label = "preboot"; - reg = <0x00000 0x8000>; - read-only; - }; - partition at 8000 { - label = "u-boot"; - reg = <0x8000 0x05c000>; - read-only; - }; - partition at 64000 { - label = "uboot-config"; - reg = <0x64000 0x004000>; - }; - ath9k_cal: partition at 68000 { - label = "art-copy"; - reg = <0x68000 0x004000>; - }; - partition at 6c000 { - label = "kernel"; - reg = <0x6c000 0x200000>; - }; - partition at 26c000 { - label = "ubi"; - reg = <0x26c000 0x1d94000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "preboot"; + reg = <0x00000 0x8000>; + read-only; + }; + partition at 8000 { + label = "u-boot"; + reg = <0x8000 0x05c000>; + read-only; + }; + partition at 64000 { + label = "uboot-config"; + reg = <0x64000 0x004000>; + }; + ath9k_cal: partition at 68000 { + label = "art-copy"; + reg = <0x68000 0x004000>; + }; + partition at 6c000 { + label = "kernel"; + reg = <0x6c000 0x200000>; + }; + partition at 26c000 { + label = "ubi"; + reg = <0x26c000 0x1d94000>; + }; }; }; diff --git a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts index 9283f62..e62a18d 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts @@ -32,27 +32,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "u-boot"; - reg = <0x0 0x40000>; - read-only; - }; - partition at 40000 { - label = "uboot-env"; - reg = <0x40000 0x40000>; - }; - caldata: partition at 80000 { - label = "caldata"; - reg = <0x80000 0x20000>; - read-only; - }; - partition at a0000 { - label = "kernel"; - reg = <0xa0000 0x200000>; - }; - partition at 2a0000 { - label = "ubi"; - reg = <0x2a0000 0x7d60000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "u-boot"; + reg = <0x0 0x40000>; + read-only; + }; + partition at 40000 { + label = "uboot-env"; + reg = <0x40000 0x40000>; + }; + caldata: partition at 80000 { + label = "caldata"; + reg = <0x80000 0x20000>; + read-only; + }; + partition at a0000 { + label = "kernel"; + reg = <0xa0000 0x200000>; + }; + partition at 2a0000 { + label = "ubi"; + reg = <0x2a0000 0x7d60000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/DGN1000B.dts b/target/linux/lantiq/dts/DGN1000B.dts index 68415ca..a011c71 100644 --- a/target/linux/lantiq/dts/DGN1000B.dts +++ b/target/linux/lantiq/dts/DGN1000B.dts @@ -68,33 +68,39 @@ reg = <1 0>; spi-max-frequency = <5000000>; - partition at 0 { - reg = <0x0 0x20000>; - label = "SPI (RO) U-Boot Image"; - read-only; - }; - - partition at 20000 { - reg = <0x20000 0x10000>; - label = "ENV_MAC"; - read-only; - }; - - partition at 30000 { - reg = <0x30000 0x10000>; - label = "DPF"; - read-only; - }; - - partition at 40000 { - reg = <0x40000 0x10000>; - label = "NVRAM"; - read-only; - }; - - partition at 500000 { - reg = <0x50000 0x003a0000>; - label = "kernel"; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + reg = <0x0 0x20000>; + label = "SPI (RO) U-Boot Image"; + read-only; + }; + + partition at 20000 { + reg = <0x20000 0x10000>; + label = "ENV_MAC"; + read-only; + }; + + partition at 30000 { + reg = <0x30000 0x10000>; + label = "DPF"; + read-only; + }; + + partition at 40000 { + reg = <0x40000 0x10000>; + label = "NVRAM"; + read-only; + }; + + partition at 500000 { + reg = <0x50000 0x003a0000>; + label = "kernel"; + }; }; }; }; diff --git a/target/linux/lantiq/dts/DGN3500.dtsi b/target/linux/lantiq/dts/DGN3500.dtsi index 48e2471e4..89a7737 100644 --- a/target/linux/lantiq/dts/DGN3500.dtsi +++ b/target/linux/lantiq/dts/DGN3500.dtsi @@ -170,27 +170,33 @@ reg = <4 0>; spi-max-frequency = <1000000>; - partition at 0 { - reg = <0x0 0x10000>; - label = "uboot"; - read-only; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + reg = <0x0 0x10000>; + label = "uboot"; + read-only; + }; - partition at 10000 { - reg = <0x10000 0x10000>; - label = "uboot-env"; - read-only; - }; + partition at 10000 { + reg = <0x10000 0x10000>; + label = "uboot-env"; + read-only; + }; - ath9k_cal: partition at 20000 { - reg = <0x20000 0x10000>; - label = "calibration"; - read-only; - }; + ath9k_cal: partition at 20000 { + reg = <0x20000 0x10000>; + label = "calibration"; + read-only; + }; - partition at 50000 { - reg = <0x50000 0xfa0000>; - label = "firmware"; + partition at 50000 { + reg = <0x50000 0xfa0000>; + label = "firmware"; + }; }; }; }; diff --git a/target/linux/lantiq/dts/EASY50712.dts b/target/linux/lantiq/dts/EASY50712.dts index e44267a..39ba1f7 100644 --- a/target/linux/lantiq/dts/EASY50712.dts +++ b/target/linux/lantiq/dts/EASY50712.dts @@ -28,24 +28,30 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; /* 64 KB */ - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; /* 64 KB */ - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x3d0000>; - }; - - partition at 400000 { - label = "rootfs"; - reg = <0x400000 0x400000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; /* 64 KB */ + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; /* 64 KB */ + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x3d0000>; + }; + + partition at 400000 { + label = "rootfs"; + reg = <0x400000 0x400000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/EASY50810.dts b/target/linux/lantiq/dts/EASY50810.dts index 5f4b733..70d2ff5 100644 --- a/target/linux/lantiq/dts/EASY50810.dts +++ b/target/linux/lantiq/dts/EASY50810.dts @@ -28,24 +28,30 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; /* 64 KB */ - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; /* 64 KB */ - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x3d0000>; - }; - - partition at 400000 { - label = "rootfs"; - reg = <0x400000 0x400000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; /* 64 KB */ + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; /* 64 KB */ + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x3d0000>; + }; + + partition at 400000 { + label = "rootfs"; + reg = <0x400000 0x400000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/EASY80920.dtsi b/target/linux/lantiq/dts/EASY80920.dtsi index 44723a1..e8cbc42 100644 --- a/target/linux/lantiq/dts/EASY80920.dtsi +++ b/target/linux/lantiq/dts/EASY80920.dtsi @@ -222,33 +222,39 @@ reg = <4 0>; spi-max-frequency = <1000000>; - partition at 0 { - reg = <0x0 0x20000>; - label = "SPI (RO) U-Boot Image"; - read-only; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - partition at 20000 { - reg = <0x20000 0x10000>; - label = "ENV_MAC"; - read-only; - }; + partition at 0 { + reg = <0x0 0x20000>; + label = "SPI (RO) U-Boot Image"; + read-only; + }; - partition at 30000 { - reg = <0x30000 0x10000>; - label = "DPF"; - read-only; - }; + partition at 20000 { + reg = <0x20000 0x10000>; + label = "ENV_MAC"; + read-only; + }; - partition at 40000 { - reg = <0x40000 0x10000>; - label = "NVRAM"; - read-only; - }; + partition at 30000 { + reg = <0x30000 0x10000>; + label = "DPF"; + read-only; + }; - partition at 500000 { - reg = <0x50000 0x003a0000>; - label = "kernel"; + partition at 40000 { + reg = <0x40000 0x10000>; + label = "NVRAM"; + read-only; + }; + + partition at 500000 { + reg = <0x50000 0x003a0000>; + label = "kernel"; + }; }; }; }; diff --git a/target/linux/lantiq/dts/EASY80920NAND.dts b/target/linux/lantiq/dts/EASY80920NAND.dts index 88fbcaa..d7e04ee 100644 --- a/target/linux/lantiq/dts/EASY80920NAND.dts +++ b/target/linux/lantiq/dts/EASY80920NAND.dts @@ -15,19 +15,25 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x40000>; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - partition at 10000 { - label = "uboot_env"; - reg = <0x40000 0x40000>; - }; + partition at 0 { + label = "uboot"; + reg = <0x00000 0x40000>; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x40000 0x40000>; + }; - partition at 20000 { - label = "firmware"; - reg = <0x80000 0x3f80000>; + partition at 20000 { + label = "firmware"; + reg = <0x80000 0x3f80000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/EASY80920NOR.dts b/target/linux/lantiq/dts/EASY80920NOR.dts index 212ad5c..54d2fa9 100644 --- a/target/linux/lantiq/dts/EASY80920NOR.dts +++ b/target/linux/lantiq/dts/EASY80920NOR.dts @@ -14,19 +14,25 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x10000>; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - partition at 10000 { - label = "uboot_env"; - reg = <0x10000 0x10000>; - }; + partition at 0 { + label = "uboot"; + reg = <0x00000 0x10000>; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x10000 0x10000>; + }; - partition at 20000 { - label = "firmware"; - reg = <0x20000 0x7e0000>; + partition at 20000 { + label = "firmware"; + reg = <0x20000 0x7e0000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/FRITZ3370.dts b/target/linux/lantiq/dts/FRITZ3370.dts index aae5283..d802ca7 100644 --- a/target/linux/lantiq/dts/FRITZ3370.dts +++ b/target/linux/lantiq/dts/FRITZ3370.dts @@ -32,31 +32,37 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "kernel"; - reg = <0x0 0x400000>; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - partition at 400000 { - label = "rootfs_ubi"; - reg = <0x400000 0x3000000>; - }; + partition at 0 { + label = "kernel"; + reg = <0x0 0x400000>; + }; - partition at 3400000 { - label = "vr9_firmware"; - reg = <0x3400000 0x400000>; - }; - partition at 3800000 { - label = "reserved"; - reg = <0x3800000 0x3000000>; - }; - partition at 6800000 { - label = "config"; - reg = <0x6800000 0x200000>; - }; - partition at 6a00000 { - label = "nand-filesystem"; - reg = <0x6a00000 0x1600000>; + partition at 400000 { + label = "rootfs_ubi"; + reg = <0x400000 0x3000000>; + }; + + partition at 3400000 { + label = "vr9_firmware"; + reg = <0x3400000 0x400000>; + }; + partition at 3800000 { + label = "reserved"; + reg = <0x3800000 0x3000000>; + }; + partition at 6800000 { + label = "config"; + reg = <0x6800000 0x200000>; + }; + partition at 6a00000 { + label = "nand-filesystem"; + reg = <0x6a00000 0x1600000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/FRITZ7320.dts b/target/linux/lantiq/dts/FRITZ7320.dts index 8140b68..475da7a 100644 --- a/target/linux/lantiq/dts/FRITZ7320.dts +++ b/target/linux/lantiq/dts/FRITZ7320.dts @@ -32,27 +32,33 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "urlader"; - reg = <0x00000 0x20000>; - read-only; - }; - - partition at 20000 { - label = "firmware"; - reg = <0x20000 0xf60000>; - }; - - partition at f80000 { - label = "tffs (1)"; - reg = <0xf80000 0x40000>; - read-only; - }; - - partition at fc0000 { - label = "tffs (2)"; - reg = <0xfc0000 0x40000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "urlader"; + reg = <0x00000 0x20000>; + read-only; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x20000 0xf60000>; + }; + + partition at f80000 { + label = "tffs (1)"; + reg = <0xf80000 0x40000>; + read-only; + }; + + partition at fc0000 { + label = "tffs (2)"; + reg = <0xfc0000 0x40000>; + read-only; + }; }; }; }; diff --git a/target/linux/lantiq/dts/GIGASX76X.dts b/target/linux/lantiq/dts/GIGASX76X.dts index b4bb956..a43e4d4 100644 --- a/target/linux/lantiq/dts/GIGASX76X.dts +++ b/target/linux/lantiq/dts/GIGASX76X.dts @@ -29,19 +29,25 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x0 0x30000>; - }; - - partition at 10000 { - label = "uboot_env"; - reg = <0x30000 0x10000>; - }; - - partition at 40000 { - label = "firmware"; - reg = <0x40000 0x7c0000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x0 0x30000>; + }; + + partition at 10000 { + label = "uboot_env"; + reg = <0x30000 0x10000>; + }; + + partition at 40000 { + label = "firmware"; + reg = <0x40000 0x7c0000>; + }; }; }; diff --git a/target/linux/lantiq/dts/GR7000.dts b/target/linux/lantiq/dts/GR7000.dts index 27c9f4a..220eb47 100644 --- a/target/linux/lantiq/dts/GR7000.dts +++ b/target/linux/lantiq/dts/GR7000.dts @@ -31,21 +31,27 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x0 0x20000>; - read-only; - }; - - partition at 20000 { - label = "uboot_env"; - reg = <0x20000 0x10000>; - read-only; - }; - - partition at 30000 { - label = "firmware"; - reg = <0x30000 0x7d0000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x0 0x20000>; + read-only; + }; + + partition at 20000 { + label = "uboot_env"; + reg = <0x20000 0x10000>; + read-only; + }; + + partition at 30000 { + label = "firmware"; + reg = <0x30000 0x7d0000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/H201L.dts b/target/linux/lantiq/dts/H201L.dts index cab2966..e6e514f 100644 --- a/target/linux/lantiq/dts/H201L.dts +++ b/target/linux/lantiq/dts/H201L.dts @@ -33,21 +33,27 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x20000>; - read-only; - }; - - partition at 20000 { - label = "uboot_env"; - reg = <0x20000 0x10000>; - read-only; - }; - - partition at 30000 { - label = "firmware"; - reg = <0x30000 0x7d0000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x20000>; + read-only; + }; + + partition at 20000 { + label = "uboot_env"; + reg = <0x20000 0x10000>; + read-only; + }; + + partition at 30000 { + label = "firmware"; + reg = <0x30000 0x7d0000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/P2601HNFX.dts b/target/linux/lantiq/dts/P2601HNFX.dts index 7e70c2c..c1b4c61 100644 --- a/target/linux/lantiq/dts/P2601HNFX.dts +++ b/target/linux/lantiq/dts/P2601HNFX.dts @@ -40,21 +40,27 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x40000>; - read-only; - }; - - partition at 40000 { - label = "uboot_env"; - reg = <0x40000 0x20000>; - read-only; - }; - - partition at 60000 { - label = "firmware"; - reg = <0x60000 0xfa0000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x40000>; + read-only; + }; + + partition at 40000 { + label = "uboot_env"; + reg = <0x40000 0x20000>; + read-only; + }; + + partition at 60000 { + label = "firmware"; + reg = <0x60000 0xfa0000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/P2812HNUF1.dts b/target/linux/lantiq/dts/P2812HNUF1.dts index 317499b..10bc4b1 100644 --- a/target/linux/lantiq/dts/P2812HNUF1.dts +++ b/target/linux/lantiq/dts/P2812HNUF1.dts @@ -22,21 +22,27 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x40000>; - }; - partition at 40000 { - label = "uboot-env"; - reg = <0x40000 0x20000>; - }; - partition at 60000 { - label = "kernel"; - reg = <0x60000 0x200000>; - }; - partition at 260000 { - label = "ubi"; - reg = <0x260000 0x7da0000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x40000>; + }; + partition at 40000 { + label = "uboot-env"; + reg = <0x40000 0x20000>; + }; + partition at 60000 { + label = "kernel"; + reg = <0x60000 0x200000>; + }; + partition at 260000 { + label = "ubi"; + reg = <0x260000 0x7da0000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/P2812HNUF3.dts b/target/linux/lantiq/dts/P2812HNUF3.dts index a293f59..dabf5ed 100644 --- a/target/linux/lantiq/dts/P2812HNUF3.dts +++ b/target/linux/lantiq/dts/P2812HNUF3.dts @@ -14,18 +14,24 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x0 0x50000>; - read-only; - }; - partition at 50000 { - label = "uboot-env"; - reg = <0x50000 0x10000>; - }; - partition at 60000 { - label = "unused"; - reg = <0x60000 0x7a0000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x0 0x50000>; + read-only; + }; + partition at 50000 { + label = "uboot-env"; + reg = <0x50000 0x10000>; + }; + partition at 60000 { + label = "unused"; + reg = <0x60000 0x7a0000>; + }; }; }; diff --git a/target/linux/lantiq/dts/TDW89X0.dtsi b/target/linux/lantiq/dts/TDW89X0.dtsi index 312a2d6..634b296 100644 --- a/target/linux/lantiq/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/dts/TDW89X0.dtsi @@ -158,27 +158,33 @@ spi-max-frequency = <33250000>; m25p,fast-read; - partition at 0 { - reg = <0x0 0x20000>; - label = "u-boot"; - read-only; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + reg = <0x0 0x20000>; + label = "u-boot"; + read-only; + }; - partition at 20000 { - reg = <0x20000 0x7a0000>; - label = "firmware"; - }; + partition at 20000 { + reg = <0x20000 0x7a0000>; + label = "firmware"; + }; - partition at 7c0000 { - reg = <0x7c0000 0x10000>; - label = "config"; - read-only; - }; + partition at 7c0000 { + reg = <0x7c0000 0x10000>; + label = "config"; + read-only; + }; - ath9k_cal: partition at 7d0000 { - reg = <0x7d0000 0x30000>; - label = "boardconfig"; - read-only; + ath9k_cal: partition at 7d0000 { + reg = <0x7d0000 0x30000>; + label = "boardconfig"; + read-only; + }; }; }; }; diff --git a/target/linux/lantiq/dts/VG3503J.dtsi b/target/linux/lantiq/dts/VG3503J.dtsi index 62a336c..f68d22c 100644 --- a/target/linux/lantiq/dts/VG3503J.dtsi +++ b/target/linux/lantiq/dts/VG3503J.dtsi @@ -29,44 +29,50 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x20000>; - }; - - partition at 20000 { - label = "kernel"; - reg = <0x20000 0x300000>; - }; - - partition at 1a0000 { - label = "rootfs"; - reg = <0x320000 0x420000>; - }; - - partition at 740000 { - label = "btagent"; - reg = <0x740000 0x80000>; - }; - - partition at 7c0000 { - label = "pri_bfocus_cfg"; - reg = <0x7c0000 0x10000>; - }; - - partition at 7d0000 { - label = "sec_bfocus_cfg"; - reg = <0x7d0000 0x10000>; - }; - - partition at 7e0000 { - label = "sysconfig"; - reg = <0x7e0000 0x10000>; - }; - - partition at 7f0000 { - label = "misc_cfg"; - reg = <0x7f0000 0x10000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x20000>; + }; + + partition at 20000 { + label = "kernel"; + reg = <0x20000 0x300000>; + }; + + partition at 1a0000 { + label = "rootfs"; + reg = <0x320000 0x420000>; + }; + + partition at 740000 { + label = "btagent"; + reg = <0x740000 0x80000>; + }; + + partition at 7c0000 { + label = "pri_bfocus_cfg"; + reg = <0x7c0000 0x10000>; + }; + + partition at 7d0000 { + label = "sec_bfocus_cfg"; + reg = <0x7d0000 0x10000>; + }; + + partition at 7e0000 { + label = "sysconfig"; + reg = <0x7e0000 0x10000>; + }; + + partition at 7f0000 { + label = "misc_cfg"; + reg = <0x7f0000 0x10000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/VGV7510KW22.dtsi b/target/linux/lantiq/dts/VGV7510KW22.dtsi index e504dc2..c9045fa 100644 --- a/target/linux/lantiq/dts/VGV7510KW22.dtsi +++ b/target/linux/lantiq/dts/VGV7510KW22.dtsi @@ -30,10 +30,16 @@ #address-cells = <1>; #size-cells = <1>; - boardconfig: partition at fe0000 { - label = "board_config"; - reg = <0xfe0000 0x20000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + boardconfig: partition at fe0000 { + label = "board_config"; + reg = <0xfe0000 0x20000>; + read-only; + }; }; }; }; diff --git a/target/linux/lantiq/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/dts/VGV7510KW22BRN.dts index d7c6b51..5f48323 100644 --- a/target/linux/lantiq/dts/VGV7510KW22BRN.dts +++ b/target/linux/lantiq/dts/VGV7510KW22BRN.dts @@ -12,46 +12,48 @@ fpi at 10000000 { localbus at 0 { nor-boot at 0 { - partition at 0 { - label = "Boot"; - reg = <0x00000 0x40000>; - read-only; - }; - - partition at 40000 { - label = "Configuration"; - reg = <0x40000 0x40000>; - read-only; - }; - - partition at 80000 { - label = "Certificate"; - reg = <0x80000 0x20000>; - read-only; - }; - - partition at a0000 { - label = "Special_Area"; - reg = <0xa0000 0x20000>; - read-only; - }; - - partition at c0000 { - label = "Primary_Setting"; - reg = <0xc0000 0x20000>; - read-only; - }; - - partition at e0000 { - label = "firmware"; /* "Code Image 0" in OFW */ - reg = <0xe0000 0x780000>; - read-only; - }; - - partition at 860000 { - label = "Code_Image_1"; - reg = <0x860000 0x780000>; - read-only; + partitions { + partition at 0 { + label = "Boot"; + reg = <0x00000 0x40000>; + read-only; + }; + + partition at 40000 { + label = "Configuration"; + reg = <0x40000 0x40000>; + read-only; + }; + + partition at 80000 { + label = "Certificate"; + reg = <0x80000 0x20000>; + read-only; + }; + + partition at a0000 { + label = "Special_Area"; + reg = <0xa0000 0x20000>; + read-only; + }; + + partition at c0000 { + label = "Primary_Setting"; + reg = <0xc0000 0x20000>; + read-only; + }; + + partition at e0000 { + label = "firmware"; /* "Code Image 0" in OFW */ + reg = <0xe0000 0x780000>; + read-only; + }; + + partition at 860000 { + label = "Code_Image_1"; + reg = <0x860000 0x780000>; + read-only; + }; }; }; }; diff --git a/target/linux/lantiq/dts/VGV7510KW22NOR.dts b/target/linux/lantiq/dts/VGV7510KW22NOR.dts index e2fcd1b..f68cf5b 100644 --- a/target/linux/lantiq/dts/VGV7510KW22NOR.dts +++ b/target/linux/lantiq/dts/VGV7510KW22NOR.dts @@ -6,21 +6,23 @@ fpi at 10000000 { localbus at 0 { nor-boot at 0 { - partition at 0 { - label = "uboot"; - reg = <0x0 0x60000>; /* 384 KiB */ - read-only; - }; + partitions { + partition at 0 { + label = "uboot"; + reg = <0x0 0x60000>; /* 384 KiB */ + read-only; + }; - partition at 60000 { - label = "uboot-env"; - reg = <0x60000 0x20000>; /* 128 KiB */ - read-only; - }; + partition at 60000 { + label = "uboot-env"; + reg = <0x60000 0x20000>; /* 128 KiB */ + read-only; + }; - partition at 80000 { - label = "firmware"; - reg = <0x80000 0xf60000>; /* 15744 KiB */ + partition at 80000 { + label = "firmware"; + reg = <0x80000 0xf60000>; /* 15744 KiB */ + }; }; }; }; diff --git a/target/linux/lantiq/dts/VGV7519BRN.dts b/target/linux/lantiq/dts/VGV7519BRN.dts index c90b680..4f56ba8 100644 --- a/target/linux/lantiq/dts/VGV7519BRN.dts +++ b/target/linux/lantiq/dts/VGV7519BRN.dts @@ -13,19 +13,25 @@ #address-cells = <1>; #size-cells = <1>; - partition at 40000 { - label = "board_config"; - reg = <0x40000 0x10000>; - read-only; - }; - partition at 80000 { - label = "firmware"; - reg = <0x80000 0x780000>; - read-only; - }; - partition at 880000 { - label = "rootfs_data"; - reg = <0x880000 0x780000>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 40000 { + label = "board_config"; + reg = <0x40000 0x10000>; + read-only; + }; + partition at 80000 { + label = "firmware"; + reg = <0x80000 0x780000>; + read-only; + }; + partition at 880000 { + label = "rootfs_data"; + reg = <0x880000 0x780000>; + }; }; }; }; diff --git a/target/linux/lantiq/dts/VGV7519NOR.dts b/target/linux/lantiq/dts/VGV7519NOR.dts index 355a90c..24a3d16 100644 --- a/target/linux/lantiq/dts/VGV7519NOR.dts +++ b/target/linux/lantiq/dts/VGV7519NOR.dts @@ -13,25 +13,31 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x40000>; - }; - partition at 40000 { - label = "board_config"; - reg = <0x40000 0x10000>; - read-only; - }; - partition at 60000 { - label = "uboot_env"; - reg = <0x60000 0x10000>; - }; - partition at 80000 { - label = "firmware"; - reg = <0x80000 0xf80000>; - // 0x080000 - 0x01b0000 : kernel - // 0x1b0000 - 0x1000000 : rootfs (squashfs) - // 0x390000 - 0x1000000 : rootfs_data + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x40000>; + }; + partition at 40000 { + label = "board_config"; + reg = <0x40000 0x10000>; + read-only; + }; + partition at 60000 { + label = "uboot_env"; + reg = <0x60000 0x10000>; + }; + partition at 80000 { + label = "firmware"; + reg = <0x80000 0xf80000>; + // 0x080000 - 0x01b0000 : kernel + // 0x1b0000 - 0x1000000 : rootfs (squashfs) + // 0x390000 - 0x1000000 : rootfs_data + }; }; }; }; diff --git a/target/linux/lantiq/dts/VR200v.dts b/target/linux/lantiq/dts/VR200v.dts index fb01d7f..e281042 100644 --- a/target/linux/lantiq/dts/VR200v.dts +++ b/target/linux/lantiq/dts/VR200v.dts @@ -166,45 +166,51 @@ spi-max-frequency = <33250000>; m25p,fast-read; - partition at 0 { - reg = <0x0 0x20000>; - label = "u-boot"; - read-only; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - partition at 20000 { - reg = <0x20000 0xf90000>; - label = "firmware"; - }; + partition at 0 { + reg = <0x0 0x20000>; + label = "u-boot"; + read-only; + }; - partition at fb0000 { - reg = <0xfb0000 0x10000>; - label = "radioDECT"; - read-only; - }; + partition at 20000 { + reg = <0x20000 0xf90000>; + label = "firmware"; + }; - partition at fc0000 { - reg = <0xfc0000 0x10000>; - label = "config"; - read-only; - }; + partition at fb0000 { + reg = <0xfb0000 0x10000>; + label = "radioDECT"; + read-only; + }; - romfile: partition at fd0000 { - reg = <0xfd0000 0x10000>; - label = "romfile"; - read-only; - }; + partition at fc0000 { + reg = <0xfc0000 0x10000>; + label = "config"; + read-only; + }; - partition at fe0000 { - reg = <0xfe0000 0x10000>; - label = "rom"; - read-only; - }; + romfile: partition at fd0000 { + reg = <0xfd0000 0x10000>; + label = "romfile"; + read-only; + }; - partition at ff0000 { - reg = <0xff0000 0x10000>; - label = "radio"; - read-only; + partition at fe0000 { + reg = <0xfe0000 0x10000>; + label = "rom"; + read-only; + }; + + partition at ff0000 { + reg = <0xff0000 0x10000>; + label = "radio"; + read-only; + }; }; }; }; diff --git a/target/linux/lantiq/dts/WBMR.dts b/target/linux/lantiq/dts/WBMR.dts index 4a20850..5b4740c 100644 --- a/target/linux/lantiq/dts/WBMR.dts +++ b/target/linux/lantiq/dts/WBMR.dts @@ -33,33 +33,39 @@ #address-cells = <1>; #size-cells = <1>; - partition at 0 { - label = "uboot"; - reg = <0x00000 0x40000>; - read-only; - }; - - partition at 40000 { - label = "uboot_env"; - reg = <0x40000 0x20000>; - read-only; - }; - - partition at 20000 { - label = "firmware"; - reg = <0x60000 0x1f20000>; - }; - - partition at 0x1fc0000 { - label = "board"; - reg = <0x1fc0000 0x20000>; - read-only; - }; - - partition at 0x1fe0000 { - label = "calibration"; - reg = <0x1fe0000 0x20000>; - read-only; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition at 0 { + label = "uboot"; + reg = <0x00000 0x40000>; + read-only; + }; + + partition at 40000 { + label = "uboot_env"; + reg = <0x40000 0x20000>; + read-only; + }; + + partition at 20000 { + label = "firmware"; + reg = <0x60000 0x1f20000>; + }; + + partition at 0x1fc0000 { + label = "board"; + reg = <0x1fc0000 0x20000>; + read-only; + }; + + partition at 0x1fe0000 { + label = "calibration"; + reg = <0x1fe0000 0x20000>; + read-only; + }; }; }; -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sat Apr 30 08:32:43 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sat, 30 Apr 2016 14:32:43 +0200 Subject: [OpenWrt-Devel] [PATCH 2/3] lantiq: handle the dual-firmware layout of brnboot In-Reply-To: <1462019564-29663-1-git-send-email-openwrt@kresin.me> References: <1462019564-29663-1-git-send-email-openwrt@kresin.me> Message-ID: <1462019564-29663-2-git-send-email-openwrt@kresin.me> brnboot based devices can have two Image partitions. When flashing images via the brnboot recovery web interface, the Image partitions are written alternating. The current active Image partition is stored in the first byte of the Primary_Setting partition by using 0x00 for Code_Image_0 and 0x01 for Code_Image_1. By using the information about the active "Code Image", it is possible to ensure that the rootfs belongs to the current booted Image/Kernel. Signed-off-by: Mathias Kresin --- .../lantiq/patches-4.4/0101-find_active_root.patch | 93 ++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 target/linux/lantiq/patches-4.4/0101-find_active_root.patch diff --git a/target/linux/lantiq/patches-4.4/0101-find_active_root.patch b/target/linux/lantiq/patches-4.4/0101-find_active_root.patch new file mode 100644 index 0000000..978def3 --- /dev/null +++ b/target/linux/lantiq/patches-4.4/0101-find_active_root.patch @@ -0,0 +1,93 @@ +--- a/drivers/mtd/ofpart.c ++++ b/drivers/mtd/ofpart.c +@@ -25,6 +25,38 @@ static bool node_has_compatible(struct d + return of_get_property(pp, "compatible", NULL); + } + ++static uint8_t * brnboot_get_selected_root_part(struct mtd_info *master, ++ loff_t offset) ++{ ++ static uint8_t root_id; ++ int err, len; ++ ++ err = mtd_read(master, offset, 0x01, &len, &root_id); ++ ++ if (mtd_is_bitflip(err) || !err) ++ return &root_id; ++ ++ return NULL; ++} ++ ++static void brnboot_set_active_root_part(struct mtd_partition *pparts, ++ struct device_node **part_nodes, ++ int nr_parts, ++ uint8_t *root_id) ++{ ++ int i; ++ ++ for (i = 0; i < nr_parts; i++) { ++ int part_root_id; ++ ++ if (!of_property_read_u32(part_nodes[i], "brnboot,root-id", &part_root_id) ++ && part_root_id == *root_id) { ++ pparts[i].name = "firmware"; ++ break; ++ } ++ } ++} ++ + static int parse_ofpart_partitions(struct mtd_info *master, + struct mtd_partition **pparts, + struct mtd_part_parser_data *data) +@@ -35,7 +67,8 @@ static int parse_ofpart_partitions(struc + struct device_node *pp; + int nr_parts, i, ret = 0; + bool dedicated = true; +- ++ uint8_t *proot_id = NULL; ++ struct device_node **part_nodes; + + if (!data) + return 0; +@@ -73,7 +106,9 @@ static int parse_ofpart_partitions(struc + return 0; + + *pparts = kzalloc(nr_parts * sizeof(**pparts), GFP_KERNEL); +- if (!*pparts) ++ part_nodes = kzalloc(nr_parts * sizeof(*part_nodes), GFP_KERNEL); ++ ++ if (!*pparts || !part_nodes) + return -ENOMEM; + + i = 0; +@@ -121,12 +156,22 @@ static int parse_ofpart_partitions(struc + if (of_get_property(pp, "lock", &len)) + (*pparts)[i].mask_flags |= MTD_POWERUP_LOCK; + ++ if (!proot_id && of_device_is_compatible(pp, "brnboot,root-selector")) ++ proot_id = brnboot_get_selected_root_part(master, (*pparts)[i].offset); ++ ++ part_nodes[i] = pp; ++ + i++; + } + + if (!nr_parts) + goto ofpart_none; + ++ if (proot_id) ++ brnboot_set_active_root_part(*pparts, part_nodes, nr_parts, proot_id); ++ ++ kfree(part_nodes); ++ + return nr_parts; + + ofpart_fail: +@@ -136,6 +181,7 @@ ofpart_fail: + ofpart_none: + of_node_put(pp); + kfree(*pparts); ++ kfree(part_nodes); + *pparts = NULL; + return ret; + } -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sat Apr 30 08:32:44 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sat, 30 Apr 2016 14:32:44 +0200 Subject: [OpenWrt-Devel] [PATCH 3/3] lantiq: VGV7510KW22BRN - support dual-image In-Reply-To: <1462019564-29663-1-git-send-email-openwrt@kresin.me> References: <1462019564-29663-1-git-send-email-openwrt@kresin.me> Message-ID: <1462019564-29663-3-git-send-email-openwrt@kresin.me> Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/VGV7510KW22BRN.dts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/linux/lantiq/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/dts/VGV7510KW22BRN.dts index 5f48323..f93249b 100644 --- a/target/linux/lantiq/dts/VGV7510KW22BRN.dts +++ b/target/linux/lantiq/dts/VGV7510KW22BRN.dts @@ -38,20 +38,23 @@ }; partition at c0000 { + compatible = "brnboot,root-selector"; label = "Primary_Setting"; reg = <0xc0000 0x20000>; read-only; }; partition at e0000 { - label = "firmware"; /* "Code Image 0" in OFW */ + label = "Code_Image_0"; reg = <0xe0000 0x780000>; + brnboot,root-id = <0x00>; read-only; }; partition at 860000 { label = "Code_Image_1"; reg = <0x860000 0x780000>; + brnboot,root-id = <0x01>; read-only; }; }; -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Sat Apr 30 11:28:37 2016 From: john at phrozen.org (John Crispin) Date: Sat, 30 Apr 2016 17:28:37 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] lantiq: add device tree binding for the phy clock source In-Reply-To: <1462019128-16599-1-git-send-email-openwrt@kresin.me> References: <1462019128-16599-1-git-send-email-openwrt@kresin.me> Message-ID: <9bd7f0be-dab4-38b8-67da-b0c245290a5e@phrozen.org> Hi, thanks for the patches,bet that was fun to figure out. comment inline On 30/04/2016 14:25, Mathias Kresin wrote: > Signed-off-by: Mathias Kresin > --- > ...x200-add-gphy-clk-src-device-tree-binding.patch | 26 ++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > create mode 100644 target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch > > diff --git a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch > new file mode 100644 > index 0000000..7a4d239 > --- /dev/null > +++ b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch > @@ -0,0 +1,26 @@ > +--- a/arch/mips/lantiq/xway/sysctrl.c > ++++ b/arch/mips/lantiq/xway/sysctrl.c > +@@ -426,6 +426,8 @@ static void clkdev_add_clkout(void) > + /* bring up all register ranges that we need for basic system control */ > + void __init ltq_soc_init(void) > + { > ++ int ret; > ++ u32 phy_clk_src, ifcc; > + struct resource res_pmu, res_cgu, res_ebu; > + struct device_node *np_pmu = > + of_find_compatible_node(NULL, NULL, "lantiq,pmu-xway"); > +@@ -608,4 +610,14 @@ void __init ltq_soc_init(void) > + > + if (of_machine_is_compatible("lantiq,vr9")) > + xbar_fpi_burst_disable(); > ++ > ++ if (np_cgu) { > ++ ret = of_property_read_u32(np_cgu, "lantiq,phy-clk-src", > ++ &phy_clk_src); > ++ > ++ if (!ret) { > ++ ifcc = ltq_cgu_r32(ifccr) & ~(0x1c); > ++ ltq_cgu_w32(ifcc | (phy_clk_src << 2), ifccr); > ++ } > ++ } can you move this into its own function and then do a if (!np) return at the start of that function to reduce indentation John > + } > _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From john at phrozen.org Sat Apr 30 12:54:55 2016 From: john at phrozen.org (John Crispin) Date: Sat, 30 Apr 2016 18:54:55 +0200 Subject: [OpenWrt-Devel] r49252 (dnsmasq: run as dedicated UID/GID) causing major havoc In-Reply-To: <6ba50f15-3ef3-650e-09be-a256da92613a@openwrt.org> References: <7318b9f4-1020-6c53-63a2-6f0e5ea470d0@iki.fi> <20160430081017.GA1817@makrotopia.org> <6ba50f15-3ef3-650e-09be-a256da92613a@openwrt.org> Message-ID: i have just pushed a generic fix, please verify that it fixes the issue. it seems to work for me. John _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sat Apr 30 13:48:22 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sat, 30 Apr 2016 19:48:22 +0200 Subject: [OpenWrt-Devel] [PATCH 1/2] lantiq: add device tree binding for the phy clock source Message-ID: <1462038503-7297-1-git-send-email-openwrt@kresin.me> Signed-off-by: Mathias Kresin --- Changes in v2: - moved logic into its own function (no functional change) ...x200-add-gphy-clk-src-device-tree-binding.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch diff --git a/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch new file mode 100644 index 0000000..227d1cf --- /dev/null +++ b/target/linux/lantiq/patches-4.4/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch @@ -0,0 +1,30 @@ +--- a/arch/mips/lantiq/xway/sysctrl.c ++++ b/arch/mips/lantiq/xway/sysctrl.c +@@ -423,6 +423,20 @@ static void clkdev_add_clkout(void) + } + } + ++static void set_phy_clock_source(struct device_node *np_cgu) ++{ ++ u32 phy_clk_src, ifcc; ++ ++ if (!np_cgu) ++ return; ++ ++ if (of_property_read_u32(np_cgu, "lantiq,phy-clk-src", &phy_clk_src)) ++ return; ++ ++ ifcc = ltq_cgu_r32(ifccr) & ~(0x1c); ++ ltq_cgu_w32(ifcc | (phy_clk_src << 2), ifccr); ++} ++ + /* bring up all register ranges that we need for basic system control */ + void __init ltq_soc_init(void) + { +@@ -608,4 +622,6 @@ void __init ltq_soc_init(void) + + if (of_machine_is_compatible("lantiq,vr9")) + xbar_fpi_burst_disable(); ++ ++ set_phy_clock_source(np_cgu); + } -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel From openwrt at kresin.me Sat Apr 30 13:48:23 2016 From: openwrt at kresin.me (Mathias Kresin) Date: Sat, 30 Apr 2016 19:48:23 +0200 Subject: [OpenWrt-Devel] [PATCH 2/2] lantiq: VGV7510KW22BRN - set the phy clock source In-Reply-To: <1462038503-7297-1-git-send-email-openwrt@kresin.me> References: <1462038503-7297-1-git-send-email-openwrt@kresin.me> Message-ID: <1462038503-7297-2-git-send-email-openwrt@kresin.me> VGV7510KW2 with VRX288 v1.2 has brnboot 1.8 installed. Starting with this brnboot version, the "GPHY Clock Source" isn't set anymore by brnboot, with the result that xrx200-net fails to probe/initialize the phys. Use the phy clock source device tree binding to specify the clock source. Signed-off-by: Mathias Kresin --- target/linux/lantiq/dts/VGV7510KW22BRN.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/linux/lantiq/dts/VGV7510KW22BRN.dts b/target/linux/lantiq/dts/VGV7510KW22BRN.dts index 1880c8c..d7c6b51 100644 --- a/target/linux/lantiq/dts/VGV7510KW22BRN.dts +++ b/target/linux/lantiq/dts/VGV7510KW22BRN.dts @@ -3,6 +3,12 @@ /include/ "VGV7510KW22.dtsi" / { + sram at 1F000000 { + cgu at 103000 { + lantiq,phy-clk-src = <0x2>; + }; + }; + fpi at 10000000 { localbus at 0 { nor-boot at 0 { -- 1.9.1 _______________________________________________ openwrt-devel mailing list openwrt-devel at lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel