[OpenWrt-Devel] A Popular European Cable Modem Is Now Open-Source.
Hi http://www.phoronix.com/scan.php?page=news_item&px=Technicolor-Opens-TC72 Not shor if any of the code can be used in or helpful for Openwrt. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] A Popular European Cable Modem Is Now Open-Source.
opensource means the source is open. this release is based on closed source from brcm. the tree is full of pre compile brcm blobs --> https://github.com/tch-opensrc/TC72XX_LxG1.0.10mp5_OpenSrc/tree/master/bcmdrivers/broadcom/net/fpm/impl4 to me it smells like technicolor marketing it trying to sell us closed source as opens source, shame on them ... On 10/12/2015 09:13, tapper wrote: > Hi > http://www.phoronix.com/scan.php?page=news_item&px=Technicolor-Opens-TC72 > > Not shor if any of the code can be used in > or helpful for Openwrt. > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [enhancement] ar71xx: Moving UART related GPIO initialization into the serial drivers.
dont send patches as attachements. please inline them On 10/12/2015 01:46, Piotr Madalinski wrote: >> Here are my patches for ar71xx enabling UART to be turned on and off >> at runtime to free up the GPIO pins, > And I forgot to attach the patches. Sorry. Here they are. > > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v5] Add support for Ubiquiti EdgeRouter X (UBNT-ERX)
it is the correct list, just been real busy this week with other stuff. i'll be merging stuff again as of the weekend, sorry for the delay. On 09/12/2015 16:34, Nikolay Martynov wrote: > Hi. > > I know you guys a probably very busy, but could you please confirm > that this is the right list to submit such patches and format of this > patch is correct - so I could fix it if it's not. > > Thanks! > > 2015-12-03 2:16 GMT-05:00 Nikolay Martynov : >> This router is based on MT7621 SoC, no wifi, nand. >> >> Works: >> * Boots. >> * Ethernet. >> * Switch. >> * Button (reset). >> * Flashing OpenWrt from stock firmware. >> * Upgrading OpenWrt. >> >> Doesn't work: >> * No GPIO leds. All leds are controlled by switch, >> but stock firmware was able to control them. >> * SoC has crypto engine but no open driver. >> * SoC has nat acceleration, but no open driver. >> * This router has 2MB spi flash soldered in but MT >> nand/spi drivers do not support pin sharing, >> so it is not accessable and disabled. Stock >> firmware could read it and it was empty. >> >> Unknown status: PoE support. >> >> Router has serial pins populated. If looking at the top >> of the router, then counting from Eth sockets pins go as: >> 'GND, RX, TX, GND'. 3.3v, 57600. >> >> U-boot bootloader supports tftpboot, controlled from serial. >> This router has two kernel partitions: 'live' and 'backup'. >> They are swapped during flashing (on both stock and OpenWrt). >> Active partition is controlled by a flag in factory partition. >> U-boot has cusotm command to switch active kernel partition. >> Kernel partitions are 'bare flash' 3MB. Stock bootloader has >> no UBI support. Stock rootfs is UBIFS. >> >> Flashing procedure. >> Stock firmware uses custom kernel patch to mount squashfs >> from a file that is located on UBIFS volume. This makes wiping >> out this volume from within stock firmware difficult. >> Instead this patch builds image that is flashable by stock firmware >> and contains initrams image (with minimal set of packages >> to fit into kernel partition). Once this is flashed one can reboot >> into initramfs OpenWrt and use sysupgrade to flash OpenWrt including >> rootfs into nand. >> Note: factory image is only built if initramfs image is enabled. >> >> v2: Fix building all mt7621 targets along with ubnt-erx. >> v3: Undo change to MT7621 nand partitions, make nand detection >> less likely to affect other nands. >> v4: Update as per Piotr Dymacz comments. >> v5: Fix upgrading code to actually upgrade kernel. >> >> Signed-off-by: Nikolay Martynov >> --- >> package/system/procd/files/nand.sh | 4 + >> .../linux/ramips/base-files/etc/board.d/02_network | 1 + >> target/linux/ramips/base-files/lib/ramips.sh | 5 +- >> .../ramips/base-files/lib/upgrade/platform.sh | 24 + >> target/linux/ramips/base-files/lib/upgrade/ubnt.sh | 71 + >> target/linux/ramips/dts/MT7621.dts | 22 >> target/linux/ramips/dts/UBNT-ERX.dts | 117 >> + >> target/linux/ramips/dts/mt7621.dtsi| 20 >> target/linux/ramips/image/Makefile | 61 ++- >> target/linux/ramips/mt7621/profiles/ubnt.mk| 17 +++ >> .../patches-3.18/0901-spansion_nand_id_fix.patch | 43 >> 11 files changed, 363 insertions(+), 22 deletions(-) >> create mode 100644 target/linux/ramips/base-files/lib/upgrade/ubnt.sh >> create mode 100644 target/linux/ramips/dts/UBNT-ERX.dts >> create mode 100644 target/linux/ramips/mt7621/profiles/ubnt.mk >> create mode 100644 >> target/linux/ramips/patches-3.18/0901-spansion_nand_id_fix.patch >> >> diff --git a/package/system/procd/files/nand.sh >> b/package/system/procd/files/nand.sh >> index 0c179cb..67867da 100644 >> --- a/package/system/procd/files/nand.sh >> +++ b/package/system/procd/files/nand.sh >> @@ -275,6 +275,10 @@ nand_upgrade_tar() { >> nand_do_upgrade_stage2() { >> local file_type=$(identify $1) >> >> + if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then >> + platform_nand_pre_upgrade "$1" >> + fi >> + >> [ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs" >> >> case "$file_type" in >> 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 7e51229..de81553 100755 >> --- a/target/linux/ramips/base-files/etc/board.d/02_network >> +++ b/target/linux/ramips/base-files/etc/board.d/02_network >> @@ -122,6 +122,7 @@ ramips_setup_interfaces() >> f5d8235-v2|\ >> hg255d|\ >> rt-n14u|\ >> + ubnt-erx|\ >> ur-326n4g|\ >> wrtnode|\ >> wt3020|\ >> diff --git a/target/linux/ramips/base-files/lib/ramips.sh >> b/target/linux/ramips/base-files/lib/ramips.sh >> index 92e13c0..ba23939 100755 >> --- a/target/linux/ramips/base-files/lib/ramips.sh >> +++ b/target/linux/ramips/base
Re: [OpenWrt-Devel] [PATCH] ncurses: Fix build of libncursew
On 09/12/2015 19:45, Ted Hess wrote: > Packages using libncursesw can fail to build if both libncurses and > libncursesw > are not installed. Currently the ncurses.h file is installed in > "usr/include/ncursesw" > directory and includes other .h files in the "usr/include" directory > incorrectly. > For example: Including fails due to these references. > These build > changes will set the correct include paths within the developer includes. > > Packages that expect ncurses.h (or curses.h) in the default "usr/include" > path fail > even when expecting to build with libncursesw and will need to be fixed as > well. However, > they cannot be fixed until this patch is applied. > will this require that we fix packages linked against the w version to lib as the headers are now at a different location int he staging area ? John > Signed-off-by: Ted Hess > --- > package/libs/ncurses/Makefile | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile > index 1f7ea9b..924033f 100644 > --- a/package/libs/ncurses/Makefile > +++ b/package/libs/ncurses/Makefile > @@ -1,5 +1,5 @@ > # > -# Copyright (C) 2006-2013 OpenWrt.org > +# Copyright (C) 2006-2015 OpenWrt.org > # > # This is free software, licensed under the GNU General Public License v2. > # See /LICENSE for more information. > @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk > > PKG_NAME:=ncurses > PKG_VERSION:=5.9 > -PKG_RELEASE:=2 > +PKG_RELEASE:=3 > > PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) > PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz > @@ -91,6 +91,7 @@ endif > ifeq ($(BUILD_VARIANT),libncursesw) > CONFIGURE_ARGS += \ > --enable-widec \ > + --includedir="/usr/include/ncursesw" \ > --with-build-cppflags=-D_GNU_SOURCE > endif > > @@ -138,7 +139,7 @@ endef > ifeq ($(BUILD_VARIANT),libncursesw) > define Build/InstallDev > $(INSTALL_DIR) $(1)/usr/include/ncursesw/ > - $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ncursesw/ > + $(CP) $(PKG_INSTALL_DIR)/usr/include/ncursesw/*.h > $(1)/usr/include/ncursesw/ > > $(INSTALL_DIR) $(1)/usr/lib > $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.{a,so*} > $(1)/usr/lib/ > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Board detection for Lamobo R1 fails
Hi Vasco, thats certainly possible, I merely did a logical translation of the code. Can you please check that after changing "Lamobo R1" in the case switch to "Lamobo Banana Pi R1" the defaults are working properly? You can test with the following command: rm -f /etc/board.json /etc/config/network board_detect Regards, Jo-Philipp ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] add opkg host dependency
fixes a missing host opkg found by: unselect base-files, opkg Signed-off-by: Dirk Neukirchen --- package/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/Makefile b/package/Makefile index cc691b5..aa5d522 100644 --- a/package/Makefile +++ b/package/Makefile @@ -91,7 +91,7 @@ PACKAGE_INSTALL_FILES:= \ $(curdir)/cleanup: $(TMP_DIR)/.build rm -rf $(STAGING_DIR_ROOT) -$(curdir)/install: $(TMP_DIR)/.build +$(curdir)/install: $(TMP_DIR)/.build $(curdir)/system/opkg/host/install - find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755 rm -rf $(TARGET_DIR) [ -d $(TARGET_DIR)/tmp ] || mkdir -p $(TARGET_DIR)/tmp -- 2.6.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] kernel/modules: fix crypto API RNG for >=4.2
Since kernel 4.2, DRBG is the default crypto API RNG, replacing krng. As DRBG is not enabled, there is no crypto API RNG available when running kernel 4.2 or later. Because of this, IPsec SAs fail to install. In strongSwan, this results in a vague error that is difficult to debug: received netlink error: No such file or directory (2) Solve this by adding DRBG to the kmod-crypto-rng package. As enabling DRBG in the kernel config also enables the Jitterentropy RNG, include it in kmod-crypto-rng instead of having it in a separate package. Signed-off-by: Stijn Tintel --- package/kernel/linux/modules/crypto.mk | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk index 062afe7..fe64db4 100644 --- a/package/kernel/linux/modules/crypto.mk +++ b/package/kernel/linux/modules/crypto.mk @@ -100,26 +100,21 @@ $(eval $(call KernelPackage,crypto-wq)) define KernelPackage/crypto-rng TITLE:=CryptoAPI random number generation - KCONFIG:=CONFIG_CRYPTO_RNG2 - FILES:=$(LINUX_DIR)/crypto/rng.ko -ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,4.2.0)),1) - FILES+=$(LINUX_DIR)/crypto/krng.ko -endif - AUTOLOAD:=$(call AutoLoad,09,rng krng) + KCONFIG:= \ + CONFIG_CRYPTO_DRBG \ + CONFIG_CRYPTO_JITTERENTROPY \ + CONFIG_CRYPTO_RNG2 + FILES:= \ + $(LINUX_DIR)/crypto/drbg.ko@ge4.2 \ + $(LINUX_DIR)/crypto/jitterentropy_rng.ko@ge4.2 \ + $(LINUX_DIR)/crypto/krng.ko@lt4.2 \ + $(LINUX_DIR)/crypto/rng.ko + AUTOLOAD:=$(call AutoLoad,09,drbg@ge4.2 jitterentropy_rng@ge4.2 krng@lt4.2 rng) $(call AddDepends/crypto) endef $(eval $(call KernelPackage,crypto-rng)) -define KernelPackage/crypto-rng-jitterentropy - TITLE:=Jitterentropy Non-Deterministic Random Number Generator - KCONFIG:=CONFIG_CRYPTO_JITTERENTROPY - FILES:= $(LINUX_DIR)/crypto/jitterentropy_rng.ko - AUTOLOAD:=$(call AutoLoad,10,jitterentropy-rng) - $(call AddDepends/crypto) -endef - -$(eval $(call KernelPackage,crypto-rng-jitterentropy)) define KernelPackage/crypto-iv TITLE:=CryptoAPI initialization vectors -- 2.4.10 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lantiq, xrx200-net: add new 'id' devicetree property
This patch adds the new 'id' devicetree property, which makes it possible to renumber the physical mac ports. This change has only cosmetical reasons (e.g. appearance in swconfig, kernel messages on link change). Signed-off-by: Martin Schiller --- .../0025-NET-MIPS-lantiq-adds-xrx200-net.patch | 39 -- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/target/linux/lantiq/patches-4.1/0025-NET-MIPS-lantiq-adds-xrx200-net.patch b/target/linux/lantiq/patches-4.1/0025-NET-MIPS-lantiq-adds-xrx200-net.patch index 48c7395..4ab09e2 100644 --- a/target/linux/lantiq/patches-4.1/0025-NET-MIPS-lantiq-adds-xrx200-net.patch +++ b/target/linux/lantiq/patches-4.1/0025-NET-MIPS-lantiq-adds-xrx200-net.patch @@ -209,7 +209,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net +}; --- /dev/null +++ b/drivers/net/ethernet/lantiq_xrx200.c -@@ -0,0 +1,1798 @@ +@@ -0,0 +1,1815 @@ +/* + * 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 @@ -404,6 +404,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + +struct xrx200_port { + u8 num; ++ u8 id; + u8 phy_addr; + u16 flags; + phy_interface_t phy_if; @@ -461,6 +462,9 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + struct xrx200_hw *hw; +}; + ++static int id_to_mac[XRX200_MAX_PORT] = {0,1,2,3,4,5,6}; ++static int mac_to_id[XRX200_MAX_PORT] = {0,1,2,3,4,5,6}; ++ +static __iomem void *xrx200_switch_membase; +static __iomem void *xrx200_mii_membase; +static __iomem void *xrx200_mdio_membase; @@ -789,9 +793,9 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + { + struct switch_port *p = &val->value.ports[i]; + -+ portmap |= (1 << p->id); ++ portmap |= (1 << id_to_mac[p->id]); + if (p->flags & (1 << SWITCH_PORT_FLAG_TAGGED)) -+ tagmap |= (1 << p->id); ++ tagmap |= (1 << id_to_mac[p->id]); + } + + tem.table = XRX200_PCE_VLANMAP_IDX; @@ -855,7 +859,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + continue; + + p = &val->value.ports[val->len++]; -+ p->id = i; ++ p->id = mac_to_id[i]; + if (tags & (1 << i)) + p->flags = (1 << SWITCH_PORT_FLAG_TAGGED); + else @@ -898,8 +902,9 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net +} + +// port -+static int xrx200sw_get_port_pvid(struct switch_dev *dev, int port, int *val) ++static int xrx200sw_get_port_pvid(struct switch_dev *dev, int port_id, int *val) +{ ++ int port = id_to_mac[port_id]; + struct xrx200_pce_table_entry tev; + + if (port >= XRX200_MAX_PORT) @@ -914,9 +919,11 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net +} + +static int xrx200sw_get_port_link(struct switch_dev *dev, -+int port, ++int port_id, +struct switch_port_link *link) +{ ++ int port = id_to_mac[port_id]; ++ + if (port >= XRX200_MAX_PORT) + return -EINVAL; + @@ -1432,7 +1439,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + xrx200_gmac_update(&priv->port[i]); + priv->port[i].link = priv->port[i].phydev->link; + netdev_info(dev, "port %d %s link\n", -+ priv->port[i].num, ++ priv->port[i].id, + (priv->port[i].link)?("got"):("lost")); + } + } @@ -1633,7 +1640,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + for (i = 0; i < priv->num_port; i++) + if (xrx200_mdio_probe(dev, &priv->port[i])) + pr_warn("xrx200-mdio: probing phy of port %d failed\n", -+ priv->port[i].num); ++ priv->port[i].id); + + return 0; + @@ -1787,19 +1794,25 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds xrx200-net + +static void xrx200_of_port(struct xrx200_priv *priv, struct device_node *port) +{ -+ const __be32 *addr, *id = of_get_property(port, "reg", NULL); ++ const __be32 *addr, *id, *mac = of_get_property(port, "reg", NULL); + struct xrx200_port *p = &priv->port[priv->num_port]; + -+ if (!id) ++ if (!mac) + return; + ++ id = of_get_property(port, "id", NULL); ++ ++ if (!id) ++ id = mac; ++ + memset(p, 0, sizeof(struct xrx200_port)); + p->phy_node = of_parse_phandle(port, "phy-handle", 0); + addr = of_get_property(p->phy_node, "reg", NULL); + if (!addr) + return; + -+ p->num = *id; ++ p->num = *mac; ++ p->i
Re: [OpenWrt-Devel] [PATCH] lantiq, xrx200-net: add new 'id' devicetree property
Hello Martin, Martin Schiller wrote on 2015-12-10: > This patch adds the new 'id' devicetree property, which makes it possible to > renumber the physical mac ports. I think the numbering should be done by the "aliases" node in the devicetree, as this is the recommended way upstream. Please check for "of_alias_get_id" in the kernel sources. > > This change has only cosmetical reasons (e.g. appearance in swconfig, > kernel messages on link change). > > Signed-off-by: Martin Schiller > --- > .../0025-NET-MIPS-lantiq-adds-xrx200-net.patch | 39 > -- 1 file changed, 28 insertions(+), 11 deletions(-) > diff --git a/target/linux/lantiq/patches-4.1/0025-NET-MIPS-lantiq-adds- > xrx200-net.patch b/target/linux/lantiq/patches-4.1/0025-NET-MIPS-lantiq- > adds-xrx200-net.patch index 48c7395..4ab09e2 100644 --- > a/target/linux/lantiq/patches-4.1/0025-NET-MIPS-lantiq-adds-xrx200- > net.patch +++ > b/target/linux/lantiq/patches-4.1/0025-NET-MIPS-lantiq-adds-xrx200- > net.patch @@ -209,7 +209,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: > adds xrx200-net > +}; > --- /dev/null > +++ b/drivers/net/ethernet/lantiq_xrx200.c > -@@ -0,0 +1,1798 @@ > +@@ -0,0 +1,1815 @@ > +/* > + * 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 > @@ -404,6 +404,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds > xrx200-net > + +struct xrx200_port { +u8 num; ++ u8 id; +u8 phy_addr; + > u16 flags; > +phy_interface_t phy_if; > @@ -461,6 +462,9 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds > xrx200-net > +struct xrx200_hw *hw; > +}; > + > ++static int id_to_mac[XRX200_MAX_PORT] = {0,1,2,3,4,5,6}; > ++static int mac_to_id[XRX200_MAX_PORT] = {0,1,2,3,4,5,6}; > ++ > +static __iomem void *xrx200_switch_membase; > +static __iomem void *xrx200_mii_membase; > +static __iomem void *xrx200_mdio_membase; > @@ -789,9 +793,9 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds > xrx200-net > +{ > +struct switch_port *p = &val->value.ports[i]; > + > -+portmap |= (1 << p->id); > ++portmap |= (1 << id_to_mac[p->id]); > +if (p->flags & (1 << SWITCH_PORT_FLAG_TAGGED)) > -+tagmap |= (1 << p->id); > ++tagmap |= (1 << id_to_mac[p->id]); > +} > + > +tem.table = XRX200_PCE_VLANMAP_IDX; > @@ -855,7 +859,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds > xrx200-net > +continue; > + > +p = &val->value.ports[val->len++]; > -+p->id = i; > ++p->id = mac_to_id[i]; > +if (tags & (1 << i)) > +p->flags = (1 << SWITCH_PORT_FLAG_TAGGED); > +else > @@ -898,8 +902,9 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds > xrx200-net > +} > + > +// port > -+static int xrx200sw_get_port_pvid(struct switch_dev *dev, int port, > int *val) ++static int xrx200sw_get_port_pvid(struct switch_dev *dev, > int port_id, int *val) > +{ ++int port = id_to_mac[port_id]; +struct > xrx200_pce_table_entry > tev; + + if (port >= XRX200_MAX_PORT) > @@ -914,9 +919,11 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds > xrx200-net > +} > + > +static int xrx200sw_get_port_link(struct switch_dev *dev, > -+ int port, > ++ int port_id, > + struct switch_port_link *link) > +{ > ++int port = id_to_mac[port_id]; > ++ > +if (port >= XRX200_MAX_PORT) > +return -EINVAL; > + > @@ -1432,7 +1439,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds > xrx200-net > +xrx200_gmac_update(&priv->port[i]); > +priv->port[i].link = priv->port[i].phydev->link; > +netdev_info(dev, "port %d %s link\n", > -+priv->port[i].num, > ++priv->port[i].id, > +(priv->port[i].link)?("got"):("lost")); > +} > +} > @@ -1633,7 +1640,7 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds > xrx200-net > +for (i = 0; i < priv->num_port; i++) > +if (xrx200_mdio_probe(dev, &priv->port[i])) > +pr_warn("xrx200-mdio: probing phy of port %d > failed\n", > -+ priv->port[i].num); > ++ priv->port[i].id); > + > +return 0; > + > @@ -1787,19 +1794,25 @@ Subject: [PATCH 25/36] NET: MIPS: lantiq: adds > xrx200-net > + +static void xrx200_of_port(struct xrx200_priv *priv, struct > device_node *port) +{ > -+const __be32 *addr, *id = of_get_property(port, "reg", NULL); > ++const __be32 *addr, *id, *mac = of_get_property(port, "reg", NULL); > +struct xrx200_port *p = &priv->port[priv->num_port]; > + > -+if (!id) > ++if (!mac) > +
Re: [OpenWrt-Devel] [PATCH] ncurses: Fix build of libncursew
Date: Thu, 10 Dec 2015 09:30:44 +0100 From: John Crispin To: openwrt-devel@lists.openwrt.org Subject: Re: [OpenWrt-Devel] [PATCH] ncurses: Fix build of libncursew On 09/12/2015 19:45, Ted Hess wrote: Packages using libncursesw can fail to build if both libncurses and libncursesw are not installed. Currently the ncurses.h file is installed in "usr/include/ncursesw" directory and includes other .h files in the "usr/include" directory incorrectly. For example: Including fails due to these references. These build changes will set the correct include paths within the developer includes. Packages that expect ncurses.h (or curses.h) in the default "usr/include" path fail even when expecting to build with libncursesw and will need to be fixed as well. However, they cannot be fixed until this patch is applied. will this require that we fix packages linked against the w version to lib as the headers are now at a different location int he staging area ? John No, it should not. The actual include path in the staging_directory does not change. The patch just fixes the headers built for that location to work as intended. Packages that can build with the 'w' version without needing the non-w version installed can now remove that requirement and maybe fix them if they are just wrong (as was with zile). There should be no immediate changes required since the headers were broken in the first place and the installation of the non-w version of the headers made it work. /ted Signed-off-by: Ted Hess --- package/libs/ncurses/Makefile | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile index 1f7ea9b..924033f 100644 --- a/package/libs/ncurses/Makefile +++ b/package/libs/ncurses/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2013 OpenWrt.org +# Copyright (C) 2006-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ncurses PKG_VERSION:=5.9 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -91,6 +91,7 @@ endif ifeq ($(BUILD_VARIANT),libncursesw) CONFIGURE_ARGS += \ --enable-widec \ + --includedir="/usr/include/ncursesw" \ --with-build-cppflags=-D_GNU_SOURCE endif @@ -138,7 +139,7 @@ endef ifeq ($(BUILD_VARIANT),libncursesw) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/ncursesw/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ncursesw/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/ncursesw/*.h $(1)/usr/include/ncursesw/ $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.{a,so*} $(1)/usr/lib/ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Ubiquiti UniFI AC Lite
I would like to know as well, It looks like they made a lot of progress; are patchsets available to build the "openwrt-ar71xx-generic-ubnt-unifiac-squashfs-sysupgrade.bin" ? Any information would be much appreciated. -- Davey On Wed, Dec 9, 2015 at 9:33 AM, Andrew Margarit | Cucumber WiFI wrote: > Does anyone know who's maintaining this page? > > https://wiki.openwrt.org/toh/ubiquiti/unifiac > > Want to give out a hand with that porting. > > Cheers, > A > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Ubiquiti UniFI AC Lite
I'm digging for the same info :) Have one near me so can give a hand out with the profile. Andrew On 10/12/15 17:06, David Hutchison wrote: I would like to know as well, It looks like they made a lot of progress; are patchsets available to build the "openwrt-ar71xx-generic-ubnt-unifiac-squashfs-sysupgrade.bin" ? Any information would be much appreciated. -- Davey On Wed, Dec 9, 2015 at 9:33 AM, Andrew Margarit | Cucumber WiFI wrote: Does anyone know who's maintaining this page? https://wiki.openwrt.org/toh/ubiquiti/unifiac Want to give out a hand with that porting. Cheers, A ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Board detection for Lamobo R1 fails
A quick test seems to work, the switch is added and during boot the system happily reports the board. Detected lamobo-r1 // Lamobo Banana Pi R1 root@OpenWrt:/etc/board.d# cat /etc/board.json { "model": { "id": "lamobo-r1", "name": "Lamobo Banana Pi R1" }, "switch": { ... VG, Vasco Am Donnerstag 10 Dezember 2015, 09:36:38 schrieb Jo-Philipp Wich: > Hi Vasco, > > thats certainly possible, I merely did a logical translation of the code. > > Can you please check that after changing "Lamobo R1" in the case switch > to "Lamobo Banana Pi R1" the defaults are working properly? > > You can test with the following command: > > rm -f /etc/board.json /etc/config/network > board_detect > > > Regards, > Jo-Philipp > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Ubiquiti UniFI AC Lite
I have one as well torn apart on hooked to serial; I started a port but couldn't figure out how to get the bootloader to write my image via tftp to flash. I tricked it by modifying the magic header, so the tftp portion would happen but then It looked like it ran a ubnt script within their custom u-boot build; which did some sort of RSA check and failed. I ended up using dd on the stock UniFi firmware and just forcing it to write to the kernel0 partition; Even with boot ${address_of_kernel}; I would get an error and it would automatically boot into the backup partition. I didn't want to brick my board completely; so I left kernel1 in-tact so I could always have a way to revert it. Let me know if you find any information; :-) I can't wait to help. -- Davey On Thu, Dec 10, 2015 at 10:14 AM, Andrew Margarit | Cucumber WiFI wrote: > I'm digging for the same info :) > Have one near me so can give a hand out with the profile. > > Andrew > > > On 10/12/15 17:06, David Hutchison wrote: >> >> I would like to know as well, >> >> It looks like they made a lot of progress; are patchsets available to >> build the "openwrt-ar71xx-generic-ubnt-unifiac-squashfs-sysupgrade.bin" >> ? >> >> Any information would be much appreciated. >> >> -- Davey >> >> On Wed, Dec 9, 2015 at 9:33 AM, Andrew Margarit | Cucumber WiFI >> wrote: >>> >>> Does anyone know who's maintaining this page? >>> >>> https://wiki.openwrt.org/toh/ubiquiti/unifiac >>> >>> Want to give out a hand with that porting. >>> >>> Cheers, >>> A >>> ___ >>> openwrt-devel mailing list >>> openwrt-devel@lists.openwrt.org >>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] ath10k adhoc working?
Is anyone able to get ath10k to work with adhoc mode? I noticed that Felix removed the older QCA STA firmware (firmware-2.bin_999.999.0.636) in r46197 and that was the only firmware I know of (other than Ben Greear's custom firmware) that supports adhoc (although it does have some flaws, like not honoring EEPROM calibration data). Regards, Tim Tim Harvey - Principal Software Engineer Gateworks Corporation - http://www.gateworks.com/ 3026 S. Higuera St. San Luis Obispo CA 93401 805-781-2000 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v5] Add support for Ubiquiti EdgeRouter X (UBNT-ERX)
Hi, John. It looks like 4.3 has just landed for this platform and this patch probably will not apply. Should I resubmit it? I was also playing with 4.3 (and 4.4) on this platform and I have some patches that would make it use CPS multiprocessing (instead of MIPS CMP which is obsolete). Would you be interested in these? Thanks. 2015-12-10 3:29 GMT-05:00 John Crispin : > it is the correct list, just been real busy this week with other stuff. > i'll be merging stuff again as of the weekend, sorry for the delay. > > On 09/12/2015 16:34, Nikolay Martynov wrote: >> Hi. >> >> I know you guys a probably very busy, but could you please confirm >> that this is the right list to submit such patches and format of this >> patch is correct - so I could fix it if it's not. >> >> Thanks! >> >> 2015-12-03 2:16 GMT-05:00 Nikolay Martynov : >>> This router is based on MT7621 SoC, no wifi, nand. >>> >>> Works: >>> * Boots. >>> * Ethernet. >>> * Switch. >>> * Button (reset). >>> * Flashing OpenWrt from stock firmware. >>> * Upgrading OpenWrt. >>> >>> Doesn't work: >>> * No GPIO leds. All leds are controlled by switch, >>> but stock firmware was able to control them. >>> * SoC has crypto engine but no open driver. >>> * SoC has nat acceleration, but no open driver. >>> * This router has 2MB spi flash soldered in but MT >>> nand/spi drivers do not support pin sharing, >>> so it is not accessable and disabled. Stock >>> firmware could read it and it was empty. >>> >>> Unknown status: PoE support. >>> >>> Router has serial pins populated. If looking at the top >>> of the router, then counting from Eth sockets pins go as: >>> 'GND, RX, TX, GND'. 3.3v, 57600. >>> >>> U-boot bootloader supports tftpboot, controlled from serial. >>> This router has two kernel partitions: 'live' and 'backup'. >>> They are swapped during flashing (on both stock and OpenWrt). >>> Active partition is controlled by a flag in factory partition. >>> U-boot has cusotm command to switch active kernel partition. >>> Kernel partitions are 'bare flash' 3MB. Stock bootloader has >>> no UBI support. Stock rootfs is UBIFS. >>> >>> Flashing procedure. >>> Stock firmware uses custom kernel patch to mount squashfs >>> from a file that is located on UBIFS volume. This makes wiping >>> out this volume from within stock firmware difficult. >>> Instead this patch builds image that is flashable by stock firmware >>> and contains initrams image (with minimal set of packages >>> to fit into kernel partition). Once this is flashed one can reboot >>> into initramfs OpenWrt and use sysupgrade to flash OpenWrt including >>> rootfs into nand. >>> Note: factory image is only built if initramfs image is enabled. >>> >>> v2: Fix building all mt7621 targets along with ubnt-erx. >>> v3: Undo change to MT7621 nand partitions, make nand detection >>> less likely to affect other nands. >>> v4: Update as per Piotr Dymacz comments. >>> v5: Fix upgrading code to actually upgrade kernel. >>> >>> Signed-off-by: Nikolay Martynov >>> --- >>> package/system/procd/files/nand.sh | 4 + >>> .../linux/ramips/base-files/etc/board.d/02_network | 1 + >>> target/linux/ramips/base-files/lib/ramips.sh | 5 +- >>> .../ramips/base-files/lib/upgrade/platform.sh | 24 + >>> target/linux/ramips/base-files/lib/upgrade/ubnt.sh | 71 + >>> target/linux/ramips/dts/MT7621.dts | 22 >>> target/linux/ramips/dts/UBNT-ERX.dts | 117 >>> + >>> target/linux/ramips/dts/mt7621.dtsi| 20 >>> target/linux/ramips/image/Makefile | 61 ++- >>> target/linux/ramips/mt7621/profiles/ubnt.mk| 17 +++ >>> .../patches-3.18/0901-spansion_nand_id_fix.patch | 43 >>> 11 files changed, 363 insertions(+), 22 deletions(-) >>> create mode 100644 target/linux/ramips/base-files/lib/upgrade/ubnt.sh >>> create mode 100644 target/linux/ramips/dts/UBNT-ERX.dts >>> create mode 100644 target/linux/ramips/mt7621/profiles/ubnt.mk >>> create mode 100644 >>> target/linux/ramips/patches-3.18/0901-spansion_nand_id_fix.patch >>> >>> diff --git a/package/system/procd/files/nand.sh >>> b/package/system/procd/files/nand.sh >>> index 0c179cb..67867da 100644 >>> --- a/package/system/procd/files/nand.sh >>> +++ b/package/system/procd/files/nand.sh >>> @@ -275,6 +275,10 @@ nand_upgrade_tar() { >>> nand_do_upgrade_stage2() { >>> local file_type=$(identify $1) >>> >>> + if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then >>> + platform_nand_pre_upgrade "$1" >>> + fi >>> + >>> [ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs" >>> >>> case "$file_type" in >>> 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 7e51229..de81553 100755 >>> --- a/target/linux/ramips/base-files/etc/board.d/02_network >>> +++ b/t
[OpenWrt-Devel] little fix for unifi AP
factory install work again now on UBNT unifi AP & inifi AP LR -- SMA -From fc69198fa40c56b8ee9ee60b835292791d1243a1 Mon Sep 17 00:00:00 2001 From: smail Date: Fri, 11 Dec 2015 00:19:29 +0300 Subject: [PATCH] Unifi Ap board id fixed --- target/linux/ar71xx/image/Makefile | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index d12ad8b..be82cb3 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1030,6 +1030,19 @@ define Device/ubnt-bz IMAGE/sysupgrade.bin = append-kernel (BLOCKSIZE) | append-rootfs | pad-rootfs | check-size (IMAGE_SIZE) endef +define Device/ubnt-bz7 + DEVICE_PROFILE := UBNT + IMAGE_SIZE := 7552k + MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7552k(firmware),256k(cfg)ro,64k(EEPROM)ro + UBNT_TYPE := BZ + UBNT_BOARD := XM + UBNT_CHIP := ar7240 + IMAGES := sysupgrade.bin factory.bin + IMAGE/factory.bin = $$(IMAGE/sysupgrade.bin) | mkubntimage-split + IMAGE/sysupgrade.bin = append-kernel (BLOCKSIZE) | append-rootfs | pad-rootfs | check-size (IMAGE_SIZE) +endef + + define Device/rw2458n $(Device/ubnt-xm) BOARDNAME := RW2458N @@ -1057,7 +1070,7 @@ endef TARGET_DEVICES += rw2458n ubnt-airrouter ubnt-bullet-m ubnt-rocket-m ubnt-nano-m define Device/ubnt-unifi - $(Device/ubnt-bz) + $(Device/ubnt-bz7) BOARDNAME := UBNT-UF DEVICE_PROFILE := UBNT UBNTUNIFI endef -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] dnsmasq: Add option "--all-servers"
Add the option "--all-servers" which forces dnsmasq to send all queries to all servers and then take the first answer. Signed-off-by: Andréas Gustafsson --- diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 1b42cff..d593a51 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -136,6 +136,7 @@ dnsmasq() { append_bool "$cfg" localservice "--local-service" append_bool "$cfg" quietdhcp "--quiet-dhcp" append_bool "$cfg" sequential_ip "--dhcp-sequential-ip" + append_bool "$cfg" allservers "--all-servers" append_parm "$cfg" dhcpscript "--dhcp-script" append_parm "$cfg" cachesize "--cache-size" ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 0/9] Add CPS support to mt7621 and add ubnt-erx support to work with it
That patch series adds support for Ubiquiti ERX router. This router is based on mt7621 and it looks like there are some issues with this SoC in 4.3. This patchset also addresses them by enabling CPS support for multiprocessing. Nikolay Martynov (9): ramips: add support for Ubiquiti EdgeRouter X (UBNT-ERX) ramips: mt7621: use symbolic names of gic interrupt settings ramips: backport batch fixing illegal instruction when booting secodnary CPUs in CPS mode ramips: backport series of patches that ensure GCRs of other CPUs are accessed properly ramips: fold gic patch into mt7621 support patch ramips: Fix CM_GCR_CPC_BASE_CPCBASE_{MSK,SHF} values ramips: enable CPS for mt7621 ramips: irq handlers do not get irq in 4.3 kernel, update patches ramips: use gic timer as clocksource for mt7621 package/system/procd/files/nand.sh | 4 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/lib/ramips.sh | 5 +- .../ramips/base-files/lib/upgrade/platform.sh | 24 ++ target/linux/ramips/base-files/lib/upgrade/ubnt.sh | 71 target/linux/ramips/dts/DIR-860L-B1.dts| 2 +- target/linux/ramips/dts/FIREWRT.dts| 2 +- target/linux/ramips/dts/MT7621.dts | 24 +- target/linux/ramips/dts/PBR-M1.dts | 2 +- target/linux/ramips/dts/RE6500.dts | 2 +- target/linux/ramips/dts/SAP-G3200U3.dts| 2 +- target/linux/ramips/dts/UBNT-ERX.dts | 119 ++ target/linux/ramips/dts/WF-2881.dts| 2 +- target/linux/ramips/dts/WSR-1166.dts | 2 +- target/linux/ramips/dts/WSR-600.dts| 2 +- target/linux/ramips/dts/ZBT-WG2626.dts | 2 +- target/linux/ramips/dts/mt7621.dtsi| 64 ++-- target/linux/ramips/image/Makefile | 61 ++- target/linux/ramips/mt7621/config-4.3 | 12 +- target/linux/ramips/mt7621/profiles/ubnt.mk| 17 + .../0001-arch-mips-ralink-add-mt7621-support.patch | 409 ++--- ...IPS-ralink-add-gpio-driver-for-ralink-SoC.patch | 17 +- ...28-GPIO-ralink-add-mt7621-gpio-controller.patch | 16 +- target/linux/ramips/patches-4.3/0053-gic.patch | 305 --- ...55-MIPS-CPS-drop-.set-mips64r2-directives.patch | 53 +++ ...-cm-intoruce-core-other-locking-functions.patch | 140 +++ .../0057-cm-use-core-other-locking-function.patch | 80 ...nsure-core-other-GCR-reflect-correct-core.patch | 49 +++ .../patches-4.3/0059-correct-CPC_BASE_MASK.patch | 13 + .../patches-4.3/0901-spansion_nand_id_fix.patch| 43 +++ .../patches-4.3/0902-mt7621-use-gic-timer.patch| 83 + 31 files changed, 872 insertions(+), 756 deletions(-) create mode 100644 target/linux/ramips/base-files/lib/upgrade/ubnt.sh create mode 100644 target/linux/ramips/dts/UBNT-ERX.dts create mode 100644 target/linux/ramips/mt7621/profiles/ubnt.mk delete mode 100644 target/linux/ramips/patches-4.3/0053-gic.patch create mode 100644 target/linux/ramips/patches-4.3/0055-MIPS-CPS-drop-.set-mips64r2-directives.patch create mode 100644 target/linux/ramips/patches-4.3/0056-cm-intoruce-core-other-locking-functions.patch create mode 100644 target/linux/ramips/patches-4.3/0057-cm-use-core-other-locking-function.patch create mode 100644 target/linux/ramips/patches-4.3/0058-backport-ensure-core-other-GCR-reflect-correct-core.patch create mode 100644 target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch create mode 100644 target/linux/ramips/patches-4.3/0901-spansion_nand_id_fix.patch create mode 100644 target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch -- 2.6.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/9] ramips: mt7621: use symbolic names of gic interrupt settings
This also adds dts nodes for cpc and mc for documentation purposes Signed-off-by: Nikolay Martynov --- target/linux/ramips/dts/DIR-860L-B1.dts | 2 +- target/linux/ramips/dts/FIREWRT.dts | 2 +- target/linux/ramips/dts/MT7621.dts | 2 +- target/linux/ramips/dts/PBR-M1.dts | 2 +- target/linux/ramips/dts/RE6500.dts | 2 +- target/linux/ramips/dts/SAP-G3200U3.dts | 2 +- target/linux/ramips/dts/WF-2881.dts | 2 +- target/linux/ramips/dts/WSR-1166.dts| 2 +- target/linux/ramips/dts/WSR-600.dts | 2 +- target/linux/ramips/dts/ZBT-WG2626.dts | 2 +- target/linux/ramips/dts/mt7621.dtsi | 28 11 files changed, 30 insertions(+), 18 deletions(-) diff --git a/target/linux/ramips/dts/DIR-860L-B1.dts b/target/linux/ramips/dts/DIR-860L-B1.dts index cae93c4..51cb8e6 100644 --- a/target/linux/ramips/dts/DIR-860L-B1.dts +++ b/target/linux/ramips/dts/DIR-860L-B1.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc"; diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index b72066a..b3f66a1 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; diff --git a/target/linux/ramips/dts/MT7621.dts b/target/linux/ramips/dts/MT7621.dts index 96f3416..341d8f2 100644 --- a/target/linux/ramips/dts/MT7621.dts +++ b/target/linux/ramips/dts/MT7621.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; diff --git a/target/linux/ramips/dts/PBR-M1.dts b/target/linux/ramips/dts/PBR-M1.dts index 7702d9c..d3225f4 100644 --- a/target/linux/ramips/dts/PBR-M1.dts +++ b/target/linux/ramips/dts/PBR-M1.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; diff --git a/target/linux/ramips/dts/RE6500.dts b/target/linux/ramips/dts/RE6500.dts index b65ade4..e950700 100644 --- a/target/linux/ramips/dts/RE6500.dts +++ b/target/linux/ramips/dts/RE6500.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; diff --git a/target/linux/ramips/dts/SAP-G3200U3.dts b/target/linux/ramips/dts/SAP-G3200U3.dts index e2798fb..a3ac8fd 100644 --- a/target/linux/ramips/dts/SAP-G3200U3.dts +++ b/target/linux/ramips/dts/SAP-G3200U3.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; diff --git a/target/linux/ramips/dts/WF-2881.dts b/target/linux/ramips/dts/WF-2881.dts index 7228dc5..9cd1aea 100644 --- a/target/linux/ramips/dts/WF-2881.dts +++ b/target/linux/ramips/dts/WF-2881.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; diff --git a/target/linux/ramips/dts/WSR-1166.dts b/target/linux/ramips/dts/WSR-1166.dts index 2dc59cc..18d4d33 100644 --- a/target/linux/ramips/dts/WSR-1166.dts +++ b/target/linux/ramips/dts/WSR-1166.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc"; diff --git a/target/linux/ramips/dts/WSR-600.dts b/target/linux/ramips/dts/WSR-600.dts index 5eb813f..f5b6575 100644 --- a/target/linux/ramips/dts/WSR-600.dts +++ b/target/linux/ramips/dts/WSR-600.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc"; diff --git a/target/linux/ramips/dts/ZBT-WG2626.dts b/target/linux/ramips/dts/ZBT-WG2626.dts index 6170454..47c9a59 100644 --- a/target/linux/ramips/dts/ZBT-WG2626.dts +++ b/target/linux/ramips/dts/ZBT-WG2626.dts @@ -1,6 +1,6 @@ /dts-v1/; -/include/ "mt7621.dtsi" +#include "mt7621.dtsi" / { compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index cc6b873..1f2f5b5 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -1,3 +1,5 @@ +#include + / { #address-cells = <1>; #size-cells = <1>; @@ -72,12 +74,22 @@ reg = <0x300 0x100>; }; + cpc@1fbf { +compatible = "mtk,mt7621-cpc"; +reg = <0x1fbf 0x8000>; + }; + + mc@1fbf8000 { + compatible = "mtk,mt7621-mc"; +
[OpenWrt-Devel] [PATCH 1/9] ramips: add support for Ubiquiti EdgeRouter X (UBNT-ERX)
This router is based on MT7621 SoC, no wifi, nand. Works: * Boots. * Ethernet. * Switch. * Button (reset). * Flashing OpenWrt from stock firmware. * Upgrading OpenWrt. Doesn't work: * No GPIO leds. All leds are controlled by switch, but stock firmware was able to control them. * SoC has crypto engine but no open driver. * SoC has nat acceleration, but no open driver. * This router has 2MB spi flash soldered in but MT nand/spi drivers do not support pin sharing, so it is not accessable and disabled. Stock firmware could read it and it was empty. * PoE out. Router has serial pins populated. If looking at the top of the router, then counting from Eth sockets pins go as: 'GND, RX, TX, GND'. 3.3v, 57600. U-boot bootloader supports tftpboot, controlled from serial. This router has two kernel partitions: 'live' and 'backup'. They are swapped during flashing (on both stock and OpenWrt). Active partition is controlled by a flag in a factory partition. U-boot has custom command to switch active kernel partition. Kernel partitions are 'bare flash' 3MB. Stock bootloader has no UBI support. Stock rootfs is UBIFS. Flashing procedure. Stock firmware uses custom kernel patch to mount squashfs from a file that is located on UBIFS volume. This makes wiping out this volume from within stock firmware difficult. Instead this patch builds image that is flashable by stock firmware and contains initrams image (with minimal set of packages to fit into kernel partition). Once this is flashed one can reboot into initramfs OpenWrt and use sysupgrade to flash OpenWrt including rootfs into nand. Note: factory image is only built if initramfs image is enabled. v2: Fix building all mt7621 targets along with ubnt-erx. v3: Undo change to MT7621 nand partitions, make nand detection less likely to affect other nands. v4: Update as per Piotr Dymacz comments. v5: Fix upgrading code to actually upgrade kernel. v6: Rebase on 4.3 kernel that landed. Signed-off-by: Nikolay Martynov --- package/system/procd/files/nand.sh | 4 + .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/lib/ramips.sh | 5 +- .../ramips/base-files/lib/upgrade/platform.sh | 24 + target/linux/ramips/base-files/lib/upgrade/ubnt.sh | 71 target/linux/ramips/dts/MT7621.dts | 22 target/linux/ramips/dts/UBNT-ERX.dts | 119 + target/linux/ramips/dts/mt7621.dtsi| 20 target/linux/ramips/image/Makefile | 61 ++- target/linux/ramips/mt7621/profiles/ubnt.mk| 17 +++ .../patches-4.3/0901-spansion_nand_id_fix.patch| 43 11 files changed, 365 insertions(+), 22 deletions(-) create mode 100644 target/linux/ramips/base-files/lib/upgrade/ubnt.sh create mode 100644 target/linux/ramips/dts/UBNT-ERX.dts create mode 100644 target/linux/ramips/mt7621/profiles/ubnt.mk create mode 100644 target/linux/ramips/patches-4.3/0901-spansion_nand_id_fix.patch diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh index 0c179cb..67867da 100644 --- a/package/system/procd/files/nand.sh +++ b/package/system/procd/files/nand.sh @@ -275,6 +275,10 @@ nand_upgrade_tar() { nand_do_upgrade_stage2() { local file_type=$(identify $1) + if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then + platform_nand_pre_upgrade "$1" + fi + [ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs" case "$file_type" in 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 aee0e72..c4a6e7e 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -113,6 +113,7 @@ ramips_setup_interfaces() f5d8235-v2|\ hg255d|\ rt-n14u|\ + ubnt-erx|\ ur-326n4g|\ wrtnode|\ wt3020|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 92e13c0..ba23939 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -349,6 +349,9 @@ ramips_board_detect() { *"TEW-692GR") name="tew-692gr" ;; + *"UBNT-ERX") + name="ubnt-erx" + ;; *"UR-326N4G") name="ur-326n4g" ;; @@ -396,7 +399,7 @@ ramips_board_detect() { ;; *"WizFi630A") name="wizfi630a" - ;; + ;; *"WL-330N") name="wl-330n" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 073593a..b0d624e 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform
[OpenWrt-Devel] [PATCH 3/9] ramips: backport batch fixing illegal instruction when booting secodnary CPUs in CPS mode
Signed-off-by: Nikolay Martynov --- ...55-MIPS-CPS-drop-.set-mips64r2-directives.patch | 53 ++ 1 file changed, 53 insertions(+) create mode 100644 target/linux/ramips/patches-4.3/0055-MIPS-CPS-drop-.set-mips64r2-directives.patch diff --git a/target/linux/ramips/patches-4.3/0055-MIPS-CPS-drop-.set-mips64r2-directives.patch b/target/linux/ramips/patches-4.3/0055-MIPS-CPS-drop-.set-mips64r2-directives.patch new file mode 100644 index 000..049efb9 --- /dev/null +++ b/target/linux/ramips/patches-4.3/0055-MIPS-CPS-drop-.set-mips64r2-directives.patch @@ -0,0 +1,53 @@ +From patchwork Wed Aug 5 22:42:40 2015 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [6/6] MIPS: CPS: drop .set mips64r2 directives +From: Paul Burton +X-Patchwork-Id: 10869 +Message-Id: <1438814560-19821-7-git-send-email-paul.bur...@imgtec.com> +To: +Cc: Paul Burton , + Markos Chandras , + , , + James Hogan , "Ralf Baechle" +Date: Wed, 5 Aug 2015 15:42:40 -0700 + +Commit 977e043d5ea1 ("MIPS: kernel: cps-vec: Replace mips32r2 ISA level +with mips64r2") leads to .set mips64r2 directives being present in 32 +bit (ie. CONFIG_32BIT=y) kernels. This is incorrect & leads to MIPS64 +instructions being emitted by the assembler when expanding +pseudo-instructions. For example the "move" instruction can legitimately +be expanded to a "daddu". This causes problems when the kernel is run on +a MIPS32 CPU, as CONFIG_32BIT kernels of course often are... + +Fix this by dropping the .set directives entirely now that Kconfig +should be ensuring that kernels including this code are built with a +suitable -march= compiler flag. + +Signed-off-by: Paul Burton +Cc: Markos Chandras +Cc: # 3.16+ +--- + + arch/mips/kernel/cps-vec.S | 2 -- + 1 file changed, 2 deletions(-) + +--- a/arch/mips/kernel/cps-vec.S b/arch/mips/kernel/cps-vec.S +@@ -229,7 +229,6 @@ LEAF(mips_cps_core_init) + has_mt t0, 3f + + .setpush +- .setmips64r2 + .setmt + + /* Only allow 1 TC per VPE to execute... */ +@@ -348,7 +347,6 @@ LEAF(mips_cps_boot_vpes) +nop + + .setpush +- .setmips64r2 + .setmt + + 1:/* Enter VPE configuration state */ -- 2.6.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/9] ramips: backport series of patches that ensure GCRs of other CPUs are accessed properly
Signed-off-by: Nikolay Martynov --- ...-cm-intoruce-core-other-locking-functions.patch | 140 + .../0057-cm-use-core-other-locking-function.patch | 80 ...nsure-core-other-GCR-reflect-correct-core.patch | 49 3 files changed, 269 insertions(+) create mode 100644 target/linux/ramips/patches-4.3/0056-cm-intoruce-core-other-locking-functions.patch create mode 100644 target/linux/ramips/patches-4.3/0057-cm-use-core-other-locking-function.patch create mode 100644 target/linux/ramips/patches-4.3/0058-backport-ensure-core-other-GCR-reflect-correct-core.patch diff --git a/target/linux/ramips/patches-4.3/0056-cm-intoruce-core-other-locking-functions.patch b/target/linux/ramips/patches-4.3/0056-cm-intoruce-core-other-locking-functions.patch new file mode 100644 index 000..e7c5a0b --- /dev/null +++ b/target/linux/ramips/patches-4.3/0056-cm-intoruce-core-other-locking-functions.patch @@ -0,0 +1,140 @@ +commit 23d5de8efb9aed48074a72bf3d43841e1556ca42 +Author: Paul Burton +Date: Tue Sep 22 11:12:16 2015 -0700 + +MIPS: CM: Introduce core-other locking functions + +Introduce mips_cm_lock_other & mips_cm_unlock_other, mirroring the +existing CPC equivalents, in order to lock access from the current core +to another via the core-other GCR region. This hasn't been required in +the past but with CM3 the CPC starts using GCR_CL_OTHER rather than +CPC_CL_OTHER and this will be required for safety. + +[r...@linux-mips.org: Fix merge conflict.] + +Signed-off-by: Paul Burton +Cc: linux-m...@linux-mips.org +Cc: linux-ker...@vger.kernel.org +Cc: James Hogan +Cc: Markos Chandras +Patchwork: https://patchwork.linux-mips.org/patch/11207/ +Signed-off-by: Ralf Baechle + +--- a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h +@@ -334,6 +334,10 @@ BUILD_CM_Cx_R_(tcid_8_priority, 0x80) + /* GCR_Cx_OTHER register fields */ + #define CM_GCR_Cx_OTHER_CORENUM_SHF 16 + #define CM_GCR_Cx_OTHER_CORENUM_MSK (_ULCAST_(0x) << 16) ++#define CM3_GCR_Cx_OTHER_CORE_SHF 8 ++#define CM3_GCR_Cx_OTHER_CORE_MSK (_ULCAST_(0x3f) << 8) ++#define CM3_GCR_Cx_OTHER_VP_SHF 0 ++#define CM3_GCR_Cx_OTHER_VP_MSK (_ULCAST_(0x7) << 0) + + /* GCR_Cx_RESET_BASE register fields */ + #define CM_GCR_Cx_RESET_BASE_BEVEXCBASE_SHF 12 +@@ -444,4 +448,32 @@ static inline unsigned int mips_cm_vp_id + return (core * mips_cm_max_vp_width()) + vp; + } + ++#ifdef CONFIG_MIPS_CM ++ ++/** ++ * mips_cm_lock_other - lock access to another core ++ * @core: the other core to be accessed ++ * @vp: the VP within the other core to be accessed ++ * ++ * Call before operating upon a core via the 'other' register region in ++ * order to prevent the region being moved during access. Must be followed ++ * by a call to mips_cm_unlock_other. ++ */ ++extern void mips_cm_lock_other(unsigned int core, unsigned int vp); ++ ++/** ++ * mips_cm_unlock_other - unlock access to another core ++ * ++ * Call after operating upon another core via the 'other' register region. ++ * Must be called after mips_cm_lock_other. ++ */ ++extern void mips_cm_unlock_other(void); ++ ++#else /* !CONFIG_MIPS_CM */ ++ ++static inline void mips_cm_lock_other(unsigned int core) { } ++static inline void mips_cm_unlock_other(void) { } ++ ++#endif /* !CONFIG_MIPS_CM */ ++ + #endif /* __MIPS_ASM_MIPS_CM_H__ */ +--- a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c +@@ -9,6 +9,8 @@ + */ + + #include ++#include ++#include + + #include + #include +@@ -136,6 +138,9 @@ static char *cm3_causes[32] = { + "0x19", "0x1a", "0x1b", "0x1c", "0x1d", "0x1e", "0x1f" + }; + ++static DEFINE_PER_CPU_ALIGNED(spinlock_t, cm_core_lock); ++static DEFINE_PER_CPU_ALIGNED(unsigned long, cm_core_lock_flags); ++ + phys_addr_t __mips_cm_phys_base(void) + { + u32 config3 = read_c0_config3(); +@@ -200,6 +205,7 @@ int mips_cm_probe(void) + { + phys_addr_t addr; + u32 base_reg; ++ unsigned cpu; + + /* +* No need to probe again if we have already been +@@ -247,9 +253,42 @@ int mips_cm_probe(void) + /* determine register width for this CM */ + mips_cm_is64 = config_enabled(CONFIG_64BIT) && (mips_cm_revision() >= CM_REV_CM3); + ++ for_each_possible_cpu(cpu) ++ spin_lock_init(&per_cpu(cm_core_lock, cpu)); ++ + return 0; + } + ++void mips_cm_lock_other(unsigned int core, unsigned int vp) ++{ ++ unsigned curr_core; ++ u32 val; ++ ++ preempt_disable(); ++ curr_core = current_cpu_data.core; ++ spin_lock_irqsave(&per_cpu(cm_core_lock, curr_core), ++per_cpu(cm_core_lock_flags, curr_core)); ++ ++ if (mips_cm_revision() >= CM_REV_CM3) { ++ val = core << CM3_GCR_Cx_OTHER_CORE_SHF; ++ val |= vp << CM3_GCR_Cx_OTHER_VP_SHF; ++ } else { ++
[OpenWrt-Devel] [PATCH 5/9] ramips: fold gic patch into mt7621 support patch
All gic patch was doing is removing code added by mt7621 support patch. Signed-off-by: Nikolay Martynov --- .../0001-arch-mips-ralink-add-mt7621-support.patch | 289 ++- target/linux/ramips/patches-4.3/0053-gic.patch | 305 - 2 files changed, 23 insertions(+), 571 deletions(-) delete mode 100644 target/linux/ramips/patches-4.3/0053-gic.patch diff --git a/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch b/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch index 504c572..67d816c 100644 --- a/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch +++ b/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch @@ -22,9 +22,6 @@ Signed-off-by: John Crispin create mode 100644 arch/mips/ralink/malta-amon.c create mode 100644 arch/mips/ralink/mt7621.c -diff --git a/arch/mips/include/asm/mach-ralink/irq.h b/arch/mips/include/asm/mach-ralink/irq.h -new file mode 100644 -index 000..4321865 --- /dev/null +++ b/arch/mips/include/asm/mach-ralink/irq.h @@ -0,0 +1,9 @@ @@ -37,9 +34,6 @@ index 000..4321865 +#include_next + +#endif -diff --git a/arch/mips/include/asm/mach-ralink/mt7621.h b/arch/mips/include/asm/mach-ralink/mt7621.h -new file mode 100644 -index 000..21c8dc2 --- /dev/null +++ b/arch/mips/include/asm/mach-ralink/mt7621.h @@ -0,0 +1,39 @@ @@ -82,8 +76,6 @@ index 000..21c8dc2 +#define MIPS_GIC_IRQ_BASE (MIPS_CPU_IRQ_BASE + 8) + +#endif -diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c -index b8ceee5..b97de1d 100644 --- a/arch/mips/kernel/mips-cm.c +++ b/arch/mips/kernel/mips-cm.c @@ -232,7 +232,7 @@ int mips_cm_probe(void) @@ -104,8 +96,6 @@ index b8ceee5..b97de1d 100644 /* probe for an L2-only sync region */ mips_cm_probe_l2sync(); -diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S -index 07d32a4..86c6284 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -51,6 +51,7 @@ SECTIONS @@ -116,8 +106,6 @@ index 07d32a4..86c6284 100644 TEXT_TEXT SCHED_TEXT LOCK_TEXT -diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig -index e9bc8c9..d078e61 100644 --- a/arch/mips/ralink/Kconfig +++ b/arch/mips/ralink/Kconfig @@ -12,6 +12,11 @@ config RALINK_ILL_ACC @@ -142,9 +130,9 @@ index e9bc8c9..d078e61 100644 + select SYS_SUPPORTS_MULTITHREADING + select SYS_SUPPORTS_SMP + select SYS_SUPPORTS_MIPS_CMP ++ select MIPS_GIC + select IRQ_GIC + select HW_HAS_PCI -+ endchoice choice @@ -159,8 +147,6 @@ index e9bc8c9..d078e61 100644 endchoice endif -diff --git a/arch/mips/ralink/Makefile b/arch/mips/ralink/Makefile -index a6c9d00..ca501db 100644 --- a/arch/mips/ralink/Makefile +++ b/arch/mips/ralink/Makefile @@ -6,16 +6,21 @@ @@ -175,7 +161,7 @@ index a6c9d00..ca501db 100644 obj-$(CONFIG_RALINK_ILL_ACC) += ill_acc.o +obj-$(CONFIG_IRQ_INTC) += irq.o -+obj-$(CONFIG_IRQ_GIC) += irq-gic.o ++obj-$(CONFIG_MIPS_GIC_IPI) += irq-gic.o +obj-$(CONFIG_MIPS_MT_SMP) += malta-amon.o + obj-$(CONFIG_SOC_RT288X) += rt288x.o @@ -186,11 +172,9 @@ index a6c9d00..ca501db 100644 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o -diff --git a/arch/mips/ralink/Platform b/arch/mips/ralink/Platform -index 6d9c8c4..6095fcc 100644 --- a/arch/mips/ralink/Platform +++ b/arch/mips/ralink/Platform -@@ -27,3 +27,8 @@ cflags-$(CONFIG_SOC_RT3883) += -I$(srctree)/arch/mips/include/asm/mach-ralink/rt +@@ -27,3 +27,8 @@ cflags-$(CONFIG_SOC_RT3883) += -I$(srctr # load-$(CONFIG_SOC_MT7620) += 0x8000 cflags-$(CONFIG_SOC_MT7620) += -I$(srctree)/arch/mips/include/asm/mach-ralink/mt7620 @@ -199,12 +183,9 @@ index 6d9c8c4..6095fcc 100644 +# +load-$(CONFIG_SOC_MT7621) += 0x80001000 +cflags-$(CONFIG_SOC_MT7621) += -I$(srctree)/arch/mips/include/asm/mach-ralink/mt7621 -diff --git a/arch/mips/ralink/irq-gic.c b/arch/mips/ralink/irq-gic.c -new file mode 100644 -index 000..f1c541b --- /dev/null +++ b/arch/mips/ralink/irq-gic.c -@@ -0,0 +1,268 @@ +@@ -0,0 +1,42 @@ +#include +#include +#include @@ -223,248 +204,22 @@ index 000..f1c541b +#include +#include + -+#include ++#include ++#include + +#include -+#define GIC_BASE_ADDR 0x1fbc -+ -+unsigned long _gcmp_base; -+static int gic_resched_int_base = 56; -+static int gic_call_int_base = 60; -+static struct irq_chip *irq_gic; -+static struct gic_intr_map gic_intr_map[GIC_NUM_INTRS]; -+ -+#if defined(CONFIG_MIPS_MT_SMP) -+static int gic_resched_int_base; -+static int gic_call_int_base; -+ -+#define GIC_RESCHED_INT(cpu) (gic_resched_int_base+(cpu)) -+#define GIC_CALL_INT(cpu) (gic_call_int_base+(cpu)) -+ -+static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id) -+{ -+
[OpenWrt-Devel] [PATCH 7/9] ramips: enable CPS for mt7621
Enables CPS multiprocessing instead ob obsoleted CMP for mt7621. This patch fixes a few issues currently existing on 4.3 kernel with at least ubnt-erx: * iperf shows only 50Mbits on direct gigabit connection to desktop, * ping times jump to 5-6ms to dorectly connected desktop * /proc/interrupts shows spurious interrups (ERR) Signed-off-by: Nikolay Martynov --- target/linux/ramips/dts/mt7621.dtsi| 2 +- target/linux/ramips/mt7621/config-4.3 | 8 +- .../0001-arch-mips-ralink-add-mt7621-support.patch | 134 +++-- 3 files changed, 21 insertions(+), 123 deletions(-) diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 1f2f5b5..53ac45c 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -237,7 +237,7 @@ gic: interrupt-controller@1fbc { compatible = "mti,gic"; - reg = <0x1fbc 0x80>; + reg = <0x1fbc 0x2000>; interrupt-controller; #interrupt-cells = <3>; diff --git a/target/linux/ramips/mt7621/config-4.3 b/target/linux/ramips/mt7621/config-4.3 index 3657460..f25850a 100644 --- a/target/linux/ramips/mt7621/config-4.3 +++ b/target/linux/ramips/mt7621/config-4.3 @@ -5,10 +5,12 @@ CONFIG_ARCH_HAS_ELF_RANDOMIZE=y # CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set CONFIG_ARCH_HAS_RESET_CONTROLLER=y # CONFIG_ARCH_HAS_SG_CHAIN is not set +CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y CONFIG_ARCH_REQUIRE_GPIOLIB=y CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_BOARD_SCACHE=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -117,7 +119,8 @@ CONFIG_LZO_DECOMPRESS=y CONFIG_MDIO_BOARDINFO=y CONFIG_MIPS=y CONFIG_MIPS_CM=y -CONFIG_MIPS_CMP=y +CONFIG_MIPS_CPC=y +CONFIG_MIPS_CPS=y CONFIG_MIPS_CPU_SCACHE=y CONFIG_MIPS_GIC=y CONFIG_MIPS_GIC_IPI=y @@ -226,9 +229,10 @@ CONFIG_SYS_HAS_CPU_MIPS32_R2=y CONFIG_SYS_HAS_EARLY_PRINTK=y CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y CONFIG_SYS_SUPPORTS_MIPS16=y -CONFIG_SYS_SUPPORTS_MIPS_CMP=y +CONFIG_SYS_SUPPORTS_MIPS_CPS=y CONFIG_SYS_SUPPORTS_MULTITHREADING=y CONFIG_SYS_SUPPORTS_SCHED_SMT=y CONFIG_SYS_SUPPORTS_SMP=y diff --git a/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch b/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch index 67d816c..153dd9e 100644 --- a/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch +++ b/target/linux/ramips/patches-4.3/0001-arch-mips-ralink-add-mt7621-support.patch @@ -120,7 +120,7 @@ Signed-off-by: John Crispin choice prompt "Ralink SoC selection" default SOC_RT305X -@@ -34,6 +39,15 @@ choice +@@ -34,6 +39,14 @@ choice config SOC_MT7620 bool "MT7620/8" @@ -129,14 +129,13 @@ Signed-off-by: John Crispin + select MIPS_CPU_SCACHE + select SYS_SUPPORTS_MULTITHREADING + select SYS_SUPPORTS_SMP -+ select SYS_SUPPORTS_MIPS_CMP ++ select SYS_SUPPORTS_MIPS_CPS + select MIPS_GIC -+ select IRQ_GIC + select HW_HAS_PCI endchoice choice -@@ -65,6 +79,10 @@ choice +@@ -65,6 +78,10 @@ choice depends on SOC_MT7620 select BUILTIN_DTB @@ -149,7 +148,7 @@ Signed-off-by: John Crispin endif --- a/arch/mips/ralink/Makefile +++ b/arch/mips/ralink/Makefile -@@ -6,16 +6,21 @@ +@@ -6,16 +6,20 @@ # Copyright (C) 2009-2011 Gabor Juhos # Copyright (C) 2013 John Crispin @@ -161,8 +160,7 @@ Signed-off-by: John Crispin obj-$(CONFIG_RALINK_ILL_ACC) += ill_acc.o +obj-$(CONFIG_IRQ_INTC) += irq.o -+obj-$(CONFIG_MIPS_GIC_IPI) += irq-gic.o -+obj-$(CONFIG_MIPS_MT_SMP) += malta-amon.o ++obj-$(CONFIG_MIPS_GIC) += irq-gic.o + obj-$(CONFIG_SOC_RT288X) += rt288x.o obj-$(CONFIG_SOC_RT305X) += rt305x.o @@ -185,136 +183,28 @@ Signed-off-by: John Crispin +cflags-$(CONFIG_SOC_MT7621) += -I$(srctree)/arch/mips/include/asm/mach-ralink/mt7621 --- /dev/null +++ b/arch/mips/ralink/irq-gic.c -@@ -0,0 +1,42 @@ +@@ -0,0 +1,18 @@ +#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include + -+#include -+#include ++#include ++#include + -+#include +#include + -+#include -+ -+extern int __init gic_of_init(struct device_node *node, -+struct device_node *parent); -+ +unsigned int get_c0_compare_int(void) +{ + return gic_get_c0_compare_int(); +} + -+static struct of_device_id __initdata of_irq_ids[] = { -+ { .compatible = "mti,cpu-interrupt-controller", .data = mips_cpu_irq_of_init }, -+ { .compatible = "mti,
[OpenWrt-Devel] [PATCH 8/9] ramips: irq handlers do not get irq in 4.3 kernel, update patches
This resolves compilation warnings like this: drivers/gpio/gpio-mt7621.c: In function 'mediatek_gpio_probe': drivers/gpio/gpio-mt7621.c:328:46: warning: passing argument 2 of 'irq_set_chained_handler' from incompatible pointer type [-Wincompatible-pointer-types] irq_set_chained_handler(mediatek_gpio_irq, mediatek_gpio_irq_handler); Signed-off-by: Nikolay Martynov --- ...PIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch | 17 ++--- .../0028-GPIO-ralink-add-mt7621-gpio-controller.patch | 16 ++-- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/target/linux/ramips/patches-4.3/0027-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch b/target/linux/ramips/patches-4.3/0027-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch index cc09987..f1e2169 100644 --- a/target/linux/ramips/patches-4.3/0027-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch +++ b/target/linux/ramips/patches-4.3/0027-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch @@ -18,9 +18,6 @@ Cc: linux-g...@vger.kernel.org create mode 100644 arch/mips/include/asm/mach-ralink/gpio.h create mode 100644 drivers/gpio/gpio-ralink.c -diff --git a/arch/mips/include/asm/mach-ralink/gpio.h b/arch/mips/include/asm/mach-ralink/gpio.h -new file mode 100644 -index 000..f68ee16 --- /dev/null +++ b/arch/mips/include/asm/mach-ralink/gpio.h @@ -0,0 +1,24 @@ @@ -48,8 +45,6 @@ index 000..f68ee16 +#define gpio_to_irq __gpio_to_irq + +#endif /* __ASM_MACH_RALINK_GPIO_H */ -diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index 8949b3f..4a3e7df 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -404,6 +404,12 @@ config GPIO_SCH311X @@ -65,11 +60,9 @@ index 8949b3f..4a3e7df 100644 config GPIO_SPEAR_SPICS bool "ST SPEAr13xx SPI Chip Select as GPIO support" depends on PLAT_SPEAR -diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile -index f79a7c4..13448d78 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile -@@ -75,6 +75,7 @@ obj-$(CONFIG_GPIO_PCF857X) += gpio-pcf857x.o +@@ -75,6 +75,7 @@ obj-$(CONFIG_GPIO_PCF857X) += gpio-pcf85 obj-$(CONFIG_GPIO_PCH)+= gpio-pch.o obj-$(CONFIG_GPIO_PL061) += gpio-pl061.o obj-$(CONFIG_GPIO_PXA)+= gpio-pxa.o @@ -77,9 +70,6 @@ index f79a7c4..13448d78 100644 obj-$(CONFIG_GPIO_RC5T583)+= gpio-rc5t583.o obj-$(CONFIG_GPIO_RDC321X)+= gpio-rdc321x.o obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o -diff --git a/drivers/gpio/gpio-ralink.c b/drivers/gpio/gpio-ralink.c -new file mode 100644 -index 000..2be9b8a --- /dev/null +++ b/drivers/gpio/gpio-ralink.c @@ -0,0 +1,355 @@ @@ -208,7 +198,7 @@ index 000..2be9b8a + return irq_create_mapping(rg->domain, pin); +} + -+static void ralink_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) ++static void ralink_gpio_irq_handler(struct irq_desc *desc) +{ + int i; + @@ -438,6 +428,3 @@ index 000..2be9b8a +} + +subsys_initcall(ralink_gpio_init); --- -1.7.10.4 - diff --git a/target/linux/ramips/patches-4.3/0028-GPIO-ralink-add-mt7621-gpio-controller.patch b/target/linux/ramips/patches-4.3/0028-GPIO-ralink-add-mt7621-gpio-controller.patch index 9e16aa3..e18032d 100644 --- a/target/linux/ramips/patches-4.3/0028-GPIO-ralink-add-mt7621-gpio-controller.patch +++ b/target/linux/ramips/patches-4.3/0028-GPIO-ralink-add-mt7621-gpio-controller.patch @@ -12,8 +12,6 @@ Signed-off-by: John Crispin 4 files changed, 364 insertions(+) create mode 100644 drivers/gpio/gpio-mt7621.c -diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig -index 0098bff..94ea345 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -559,6 +559,9 @@ config RALINK @@ -26,8 +24,6 @@ index 0098bff..94ea345 100644 config SGI_IP22 bool "SGI IP22 (Indy/Indigo2)" -diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig -index 4a3e7df..13f860c 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -269,6 +269,12 @@ config GPIO_MB86S7X @@ -43,18 +39,13 @@ index 4a3e7df..13f860c 100644 config GPIO_MM_LANTIQ bool "Lantiq Memory mapped GPIOs" depends on LANTIQ && SOC_XWAY -diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile -index 13448d78..5563d6e 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile -@@ -119,3 +119,4 @@ obj-$(CONFIG_GPIO_XTENSA) += gpio-xtensa.o +@@ -119,3 +119,4 @@ obj-$(CONFIG_GPIO_XTENSA) += gpio-xtensa obj-$(CONFIG_GPIO_ZEVIO) += gpio-zevio.o obj-$(CONFIG_GPIO_ZYNQ) += gpio-zynq.o obj-$(CONFIG_GPIO_ZX) += gpio-zx.o +obj-$(CONFIG_GPIO_MT7621) += gpio-mt7621.o -diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c -new file mode 100644 -index 000..7a98b94 --- /dev/null +++ b/drivers/gpio/gpio-mt7621.c @@ -0,0 +1,354 @@ @@ -243,7 +234,7 @@ index 000..7a98b94 +} + +static void -+mediatek_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) +
[OpenWrt-Devel] [PATCH 6/9] ramips: Fix CM_GCR_CPC_BASE_CPCBASE_{MSK, SHF} values
Update CM_GCR_CPC_BASE_CPCBASE_{MSK,SHF} to match datasheet Signed-off-by: Nikolay Martynov --- .../ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch | 13 + 1 file changed, 13 insertions(+) create mode 100644 target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch diff --git a/target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch b/target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch new file mode 100644 index 000..b267137 --- /dev/null +++ b/target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch @@ -0,0 +1,13 @@ +--- a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h +@@ -270,8 +270,8 @@ BUILD_CM_Cx_R_(tcid_8_priority,0x80) + #define CM_GCR_GIC_BASE_GICEN_MSK (_ULCAST_(0x1) << 0) + + /* GCR_CPC_BASE register fields */ +-#define CM_GCR_CPC_BASE_CPCBASE_SHF 17 +-#define CM_GCR_CPC_BASE_CPCBASE_MSK (_ULCAST_(0x7fff) << 17) ++#define CM_GCR_CPC_BASE_CPCBASE_SHF 15 ++#define CM_GCR_CPC_BASE_CPCBASE_MSK (_ULCAST_(0x1) << 15) + #define CM_GCR_CPC_BASE_CPCEN_SHF 0 + #define CM_GCR_CPC_BASE_CPCEN_MSK (_ULCAST_(0x1) << 0) + -- 2.6.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 9/9] ramips: use gic timer as clocksource for mt7621
* Switches clocksource to gic timer. * Moves frequency definitions to dtsi since frequency was hardcoded anyway Will work on proper frequency detection later. Signed-off-by: Nikolay Martynov --- target/linux/ramips/dts/mt7621.dtsi| 14 target/linux/ramips/mt7621/config-4.3 | 4 ++ .../patches-4.3/0902-mt7621-use-gic-timer.patch| 83 ++ 3 files changed, 101 insertions(+) create mode 100644 target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 53ac45c..4b38f18 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -88,6 +88,9 @@ compatible = "ns16550a"; reg = <0xc00 0x100>; + /* FIXME: there should be way to detect this */ + clock-frequency = <5000>; + interrupt-parent = <&gic>; interrupts = ; @@ -102,6 +105,9 @@ compatible = "ralink,mt7621-spi"; reg = <0xb00 0x100>; + /* FIXME: there should be way to detect this */ + clock-frequency = <5000>; + resets = <&rstctrl 18>; reset-names = "spi"; @@ -243,6 +249,14 @@ #interrupt-cells = <3>; mti,reserved-cpu-vectors = <7>; + + timer { + compatible = "mti,gic-timer"; + interrupts = ; + + /* FIXME: there should be way to detect this */ + clock-frequency = <88000>; + }; }; nand@1e003000 { diff --git a/target/linux/ramips/mt7621/config-4.3 b/target/linux/ramips/mt7621/config-4.3 index f25850a..a56395c 100644 --- a/target/linux/ramips/mt7621/config-4.3 +++ b/target/linux/ramips/mt7621/config-4.3 @@ -17,10 +17,13 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_CEVT_R4K=y # CONFIG_CEVT_SYSTICK_QUIRK is not set CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLKSRC_MIPS_GIC=y +CONFIG_CLKSRC_OF=y CONFIG_CLONE_BACKWARDS=y CONFIG_CMDLINE="rootfstype=squashfs,jffs2" CONFIG_CMDLINE_BOOL=y # CONFIG_CMDLINE_OVERRIDE is not set +CONFIG_COMMON_CLK=y CONFIG_CPU_GENERIC_DUMP_TLB=y CONFIG_CPU_HAS_PREFETCH=y CONFIG_CPU_HAS_SYNC=y @@ -78,6 +81,7 @@ CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_BPF_JIT=y CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_HAVE_CLK=y +CONFIG_HAVE_CLK_PREPARE=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y diff --git a/target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch b/target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch new file mode 100644 index 000..5a78b88 --- /dev/null +++ b/target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch @@ -0,0 +1,83 @@ +--- a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig +@@ -52,6 +52,8 @@ choice + select SYS_SUPPORTS_SMP + select SYS_SUPPORTS_MIPS_CPS + select MIPS_GIC ++ select COMMON_CLK ++ select CLKSRC_MIPS_GIC + select HW_HAS_PCI + endchoice + +--- a/arch/mips/ralink/Makefile b/arch/mips/ralink/Makefile +@@ -6,14 +6,18 @@ + # Copyright (C) 2009-2011 Gabor Juhos + # Copyright (C) 2013 John Crispin + +-obj-y := prom.o of.o reset.o clk.o timer.o ++obj-y := prom.o of.o reset.o ++ ++ifndef CONFIG_MIPS_GIC ++ obj-y += clk.o timer.o ++endif + + obj-$(CONFIG_CLKEVT_RT3352) += cevt-rt3352.o + + obj-$(CONFIG_RALINK_ILL_ACC) += ill_acc.o + + obj-$(CONFIG_IRQ_INTC) += irq.o +-obj-$(CONFIG_MIPS_GIC) += irq-gic.o ++obj-$(CONFIG_MIPS_GIC) += irq-gic.o timer-gic.o + + obj-$(CONFIG_SOC_RT288X) += rt288x.o + obj-$(CONFIG_SOC_RT305X) += rt305x.o +--- a/arch/mips/ralink/irq-gic.c b/arch/mips/ralink/irq-gic.c +@@ -3,13 +3,6 @@ + #include + #include + +-#include +- +-unsigned int get_c0_compare_int(void) +-{ +- return gic_get_c0_compare_int(); +-} +- + void __init + arch_init_irq(void) + { +--- /dev/null b/arch/mips/ralink/timer-gic.c +@@ -0,0 +1,13 @@ ++#include ++ ++#include ++#include ++ ++#include "common.h" ++ ++void __init plat_time_init(void) ++{ ++ ralink_of_remap(); ++ ++ clocksource_of_init(); ++} +--- a/arch/mips/ralink/mt7621.c b/arch/mips/ralink/mt7621.c +@@ -152,11 +152,14 @@ void __init ralink_clk_init(void) + } + break; + } ++ /* ++FIXME: detect frequency automatically + cpu_clk = 88000; + ralink_clk_add("cpu", cpu_clk); + ralink_clk_add("1e000b00.spi", 5000); + ralink_clk_add("1e000c00.uartlite", 5000); + ralink_clk_add("1e000d00.uart", 5000); ++ */ + } + + void __init ralink_of_remap(void) -- 2.6.4 ___ openwrt-devel
Re: [OpenWrt-Devel] [PATCH v5] Add support for Ubiquiti EdgeRouter X (UBNT-ERX)
Hi, Nikolay, On 3 December 2015 at 15:16, Nikolay Martynov wrote: > This router is based on MT7621 SoC, no wifi, nand. > > Works: > * Boots. > * Ethernet. > * Switch. > * Button (reset). > * Flashing OpenWrt from stock firmware. > * Upgrading OpenWrt. > > Doesn't work: > * No GPIO leds. All leds are controlled by switch, > but stock firmware was able to control them. Try enabling SWCONFIG_LEDS and configure the trigger with ucidef_set_led_switch like other platforms have done. This works for me with a mt7620 board. > * SoC has crypto engine but no open driver. > * SoC has nat acceleration, but no open driver. > * This router has 2MB spi flash soldered in but MT > nand/spi drivers do not support pin sharing, > so it is not accessable and disabled. Stock > firmware could read it and it was empty. > > Unknown status: PoE support. > > Router has serial pins populated. If looking at the top > of the router, then counting from Eth sockets pins go as: > 'GND, RX, TX, GND'. 3.3v, 57600. > > U-boot bootloader supports tftpboot, controlled from serial. > This router has two kernel partitions: 'live' and 'backup'. > They are swapped during flashing (on both stock and OpenWrt). > Active partition is controlled by a flag in factory partition. > U-boot has cusotm command to switch active kernel partition. > Kernel partitions are 'bare flash' 3MB. Stock bootloader has > no UBI support. Stock rootfs is UBIFS. > > Flashing procedure. > Stock firmware uses custom kernel patch to mount squashfs > from a file that is located on UBIFS volume. This makes wiping > out this volume from within stock firmware difficult. > Instead this patch builds image that is flashable by stock firmware > and contains initrams image (with minimal set of packages > to fit into kernel partition). Once this is flashed one can reboot > into initramfs OpenWrt and use sysupgrade to flash OpenWrt including > rootfs into nand. > Note: factory image is only built if initramfs image is enabled. Most of these info should go to a wiki page for the device. > > v2: Fix building all mt7621 targets along with ubnt-erx. > v3: Undo change to MT7621 nand partitions, make nand detection > less likely to affect other nands. > v4: Update as per Piotr Dymacz comments. > v5: Fix upgrading code to actually upgrade kernel. The changelog should go below the three-dashes line (---). A few indentation issues were spotted and pointed out inline. > > Signed-off-by: Nikolay Martynov > --- > package/system/procd/files/nand.sh | 4 + > .../linux/ramips/base-files/etc/board.d/02_network | 1 + > target/linux/ramips/base-files/lib/ramips.sh | 5 +- > .../ramips/base-files/lib/upgrade/platform.sh | 24 + > target/linux/ramips/base-files/lib/upgrade/ubnt.sh | 71 + > target/linux/ramips/dts/MT7621.dts | 22 > target/linux/ramips/dts/UBNT-ERX.dts | 117 > + > target/linux/ramips/dts/mt7621.dtsi| 20 > target/linux/ramips/image/Makefile | 61 ++- > target/linux/ramips/mt7621/profiles/ubnt.mk| 17 +++ > .../patches-3.18/0901-spansion_nand_id_fix.patch | 43 > 11 files changed, 363 insertions(+), 22 deletions(-) > create mode 100644 target/linux/ramips/base-files/lib/upgrade/ubnt.sh > create mode 100644 target/linux/ramips/dts/UBNT-ERX.dts > create mode 100644 target/linux/ramips/mt7621/profiles/ubnt.mk > create mode 100644 > target/linux/ramips/patches-3.18/0901-spansion_nand_id_fix.patch > > diff --git a/package/system/procd/files/nand.sh > b/package/system/procd/files/nand.sh > index 0c179cb..67867da 100644 > --- a/package/system/procd/files/nand.sh > +++ b/package/system/procd/files/nand.sh > @@ -275,6 +275,10 @@ nand_upgrade_tar() { > nand_do_upgrade_stage2() { > local file_type=$(identify $1) > > + if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then > + platform_nand_pre_upgrade "$1" bad indentation (tab replaced with blank spaces). And this should be in a separate patch > + fi > + > [ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs" > > case "$file_type" in > 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 7e51229..de81553 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -122,6 +122,7 @@ ramips_setup_interfaces() > f5d8235-v2|\ > hg255d|\ > rt-n14u|\ > + ubnt-erx|\ > ur-326n4g|\ > wrtnode|\ > wt3020|\ > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > index 92e13c0..ba23939 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -349,6 +349,9 @@ ramips_board_det
Re: [OpenWrt-Devel] [PATCH v5] Add support for Ubiquiti EdgeRouter X (UBNT-ERX)
yousong On 11 December 2015 at 13:33, Yousong Zhou wrote: > Hi, Nikolay, > > On 3 December 2015 at 15:16, Nikolay Martynov wrote: >> This router is based on MT7621 SoC, no wifi, nand. >> >> Works: >> * Boots. >> * Ethernet. >> * Switch. >> * Button (reset). >> * Flashing OpenWrt from stock firmware. >> * Upgrading OpenWrt. >> >> Doesn't work: >> * No GPIO leds. All leds are controlled by switch, >> but stock firmware was able to control them. > > Try enabling SWCONFIG_LEDS and configure the trigger with > ucidef_set_led_switch like other platforms have done. This works for > me with a mt7620 board. > >> * SoC has crypto engine but no open driver. >> * SoC has nat acceleration, but no open driver. >> * This router has 2MB spi flash soldered in but MT >> nand/spi drivers do not support pin sharing, >> so it is not accessable and disabled. Stock >> firmware could read it and it was empty. >> >> Unknown status: PoE support. >> >> Router has serial pins populated. If looking at the top >> of the router, then counting from Eth sockets pins go as: >> 'GND, RX, TX, GND'. 3.3v, 57600. >> >> U-boot bootloader supports tftpboot, controlled from serial. >> This router has two kernel partitions: 'live' and 'backup'. >> They are swapped during flashing (on both stock and OpenWrt). >> Active partition is controlled by a flag in factory partition. >> U-boot has cusotm command to switch active kernel partition. >> Kernel partitions are 'bare flash' 3MB. Stock bootloader has >> no UBI support. Stock rootfs is UBIFS. >> >> Flashing procedure. >> Stock firmware uses custom kernel patch to mount squashfs >> from a file that is located on UBIFS volume. This makes wiping >> out this volume from within stock firmware difficult. >> Instead this patch builds image that is flashable by stock firmware >> and contains initrams image (with minimal set of packages >> to fit into kernel partition). Once this is flashed one can reboot >> into initramfs OpenWrt and use sysupgrade to flash OpenWrt including >> rootfs into nand. >> Note: factory image is only built if initramfs image is enabled. > > Most of these info should go to a wiki page for the device. > >> >> v2: Fix building all mt7621 targets along with ubnt-erx. >> v3: Undo change to MT7621 nand partitions, make nand detection >> less likely to affect other nands. >> v4: Update as per Piotr Dymacz comments. >> v5: Fix upgrading code to actually upgrade kernel. > > The changelog should go below the three-dashes line (---). > > A few indentation issues were spotted and pointed out inline. > >> >> Signed-off-by: Nikolay Martynov >> --- >> package/system/procd/files/nand.sh | 4 + >> .../linux/ramips/base-files/etc/board.d/02_network | 1 + >> target/linux/ramips/base-files/lib/ramips.sh | 5 +- >> .../ramips/base-files/lib/upgrade/platform.sh | 24 + >> target/linux/ramips/base-files/lib/upgrade/ubnt.sh | 71 + >> target/linux/ramips/dts/MT7621.dts | 22 >> target/linux/ramips/dts/UBNT-ERX.dts | 117 >> + >> target/linux/ramips/dts/mt7621.dtsi| 20 >> target/linux/ramips/image/Makefile | 61 ++- >> target/linux/ramips/mt7621/profiles/ubnt.mk| 17 +++ >> .../patches-3.18/0901-spansion_nand_id_fix.patch | 43 >> 11 files changed, 363 insertions(+), 22 deletions(-) >> create mode 100644 target/linux/ramips/base-files/lib/upgrade/ubnt.sh >> create mode 100644 target/linux/ramips/dts/UBNT-ERX.dts >> create mode 100644 target/linux/ramips/mt7621/profiles/ubnt.mk >> create mode 100644 >> target/linux/ramips/patches-3.18/0901-spansion_nand_id_fix.patch >> >> diff --git a/package/system/procd/files/nand.sh >> b/package/system/procd/files/nand.sh >> index 0c179cb..67867da 100644 >> --- a/package/system/procd/files/nand.sh >> +++ b/package/system/procd/files/nand.sh >> @@ -275,6 +275,10 @@ nand_upgrade_tar() { >> nand_do_upgrade_stage2() { >> local file_type=$(identify $1) >> >> + if type 'platform_nand_pre_upgrade' >/dev/null 2>/dev/null; then >> + platform_nand_pre_upgrade "$1" > > bad indentation (tab replaced with blank spaces). And this should be > in a separate patch > >> + fi >> + >> [ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs" >> >> case "$file_type" in >> 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 7e51229..de81553 100755 >> --- a/target/linux/ramips/base-files/etc/board.d/02_network >> +++ b/target/linux/ramips/base-files/etc/board.d/02_network >> @@ -122,6 +122,7 @@ ramips_setup_interfaces() >> f5d8235-v2|\ >> hg255d|\ >> rt-n14u|\ >> + ubnt-erx|\ >> ur-326n4g|\ >> wrtnode|\ >> wt3020|\ >> diff --git a/target/linux/ramips/base-files/lib/ramips.sh >> b/target/linu
Re: [OpenWrt-Devel] [PATCH 0/9] Add CPS support to mt7621 and add ubnt-erx support to work with it
oh nice, i'll fold these today. i was about to send mt7621 support upstream but decided to wait until you sent your CPS patches. On 11/12/2015 05:01, Nikolay Martynov wrote: > That patch series adds support for Ubiquiti ERX router. > This router is based on mt7621 and it looks like there are some issues with > this SoC > in 4.3. This patchset also addresses them by enabling CPS support for > multiprocessing. > > Nikolay Martynov (9): > ramips: add support for Ubiquiti EdgeRouter X (UBNT-ERX) > ramips: mt7621: use symbolic names of gic interrupt settings > ramips: backport batch fixing illegal instruction when booting > secodnary CPUs in CPS mode > ramips: backport series of patches that ensure GCRs of other CPUs are > accessed properly > ramips: fold gic patch into mt7621 support patch > ramips: Fix CM_GCR_CPC_BASE_CPCBASE_{MSK,SHF} values > ramips: enable CPS for mt7621 > ramips: irq handlers do not get irq in 4.3 kernel, update patches > ramips: use gic timer as clocksource for mt7621 > > package/system/procd/files/nand.sh | 4 + > .../linux/ramips/base-files/etc/board.d/02_network | 1 + > target/linux/ramips/base-files/lib/ramips.sh | 5 +- > .../ramips/base-files/lib/upgrade/platform.sh | 24 ++ > target/linux/ramips/base-files/lib/upgrade/ubnt.sh | 71 > target/linux/ramips/dts/DIR-860L-B1.dts| 2 +- > target/linux/ramips/dts/FIREWRT.dts| 2 +- > target/linux/ramips/dts/MT7621.dts | 24 +- > target/linux/ramips/dts/PBR-M1.dts | 2 +- > target/linux/ramips/dts/RE6500.dts | 2 +- > target/linux/ramips/dts/SAP-G3200U3.dts| 2 +- > target/linux/ramips/dts/UBNT-ERX.dts | 119 ++ > target/linux/ramips/dts/WF-2881.dts| 2 +- > target/linux/ramips/dts/WSR-1166.dts | 2 +- > target/linux/ramips/dts/WSR-600.dts| 2 +- > target/linux/ramips/dts/ZBT-WG2626.dts | 2 +- > target/linux/ramips/dts/mt7621.dtsi| 64 ++-- > target/linux/ramips/image/Makefile | 61 ++- > target/linux/ramips/mt7621/config-4.3 | 12 +- > target/linux/ramips/mt7621/profiles/ubnt.mk| 17 + > .../0001-arch-mips-ralink-add-mt7621-support.patch | 409 > ++--- > ...IPS-ralink-add-gpio-driver-for-ralink-SoC.patch | 17 +- > ...28-GPIO-ralink-add-mt7621-gpio-controller.patch | 16 +- > target/linux/ramips/patches-4.3/0053-gic.patch | 305 --- > ...55-MIPS-CPS-drop-.set-mips64r2-directives.patch | 53 +++ > ...-cm-intoruce-core-other-locking-functions.patch | 140 +++ > .../0057-cm-use-core-other-locking-function.patch | 80 > ...nsure-core-other-GCR-reflect-correct-core.patch | 49 +++ > .../patches-4.3/0059-correct-CPC_BASE_MASK.patch | 13 + > .../patches-4.3/0901-spansion_nand_id_fix.patch| 43 +++ > .../patches-4.3/0902-mt7621-use-gic-timer.patch| 83 + > 31 files changed, 872 insertions(+), 756 deletions(-) > create mode 100644 target/linux/ramips/base-files/lib/upgrade/ubnt.sh > create mode 100644 target/linux/ramips/dts/UBNT-ERX.dts > create mode 100644 target/linux/ramips/mt7621/profiles/ubnt.mk > delete mode 100644 target/linux/ramips/patches-4.3/0053-gic.patch > create mode 100644 > target/linux/ramips/patches-4.3/0055-MIPS-CPS-drop-.set-mips64r2-directives.patch > create mode 100644 > target/linux/ramips/patches-4.3/0056-cm-intoruce-core-other-locking-functions.patch > create mode 100644 > target/linux/ramips/patches-4.3/0057-cm-use-core-other-locking-function.patch > create mode 100644 > target/linux/ramips/patches-4.3/0058-backport-ensure-core-other-GCR-reflect-correct-core.patch > create mode 100644 > target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch > create mode 100644 > target/linux/ramips/patches-4.3/0901-spansion_nand_id_fix.patch > create mode 100644 > target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/9] ramips: mt7621: use symbolic names of gic interrupt settings
On 11/12/2015 05:01, Nikolay Martynov wrote: > This also adds dts nodes for cpc and mc for documentation purposes > > Signed-off-by: Nikolay Martynov > --- > target/linux/ramips/dts/DIR-860L-B1.dts | 2 +- > target/linux/ramips/dts/FIREWRT.dts | 2 +- > target/linux/ramips/dts/MT7621.dts | 2 +- > target/linux/ramips/dts/PBR-M1.dts | 2 +- > target/linux/ramips/dts/RE6500.dts | 2 +- > target/linux/ramips/dts/SAP-G3200U3.dts | 2 +- > target/linux/ramips/dts/WF-2881.dts | 2 +- > target/linux/ramips/dts/WSR-1166.dts| 2 +- > target/linux/ramips/dts/WSR-600.dts | 2 +- > target/linux/ramips/dts/ZBT-WG2626.dts | 2 +- > target/linux/ramips/dts/mt7621.dtsi | 28 > 11 files changed, 30 insertions(+), 18 deletions(-) > > diff --git a/target/linux/ramips/dts/DIR-860L-B1.dts > b/target/linux/ramips/dts/DIR-860L-B1.dts > index cae93c4..51cb8e6 100644 > --- a/target/linux/ramips/dts/DIR-860L-B1.dts > +++ b/target/linux/ramips/dts/DIR-860L-B1.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" interesting, i actually spent half and hour trying to figure out how to do this and failed. did not realize the include directive needs to be different John > > / { > compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc"; > diff --git a/target/linux/ramips/dts/FIREWRT.dts > b/target/linux/ramips/dts/FIREWRT.dts > index b72066a..b3f66a1 100644 > --- a/target/linux/ramips/dts/FIREWRT.dts > +++ b/target/linux/ramips/dts/FIREWRT.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" > > / { > compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > diff --git a/target/linux/ramips/dts/MT7621.dts > b/target/linux/ramips/dts/MT7621.dts > index 96f3416..341d8f2 100644 > --- a/target/linux/ramips/dts/MT7621.dts > +++ b/target/linux/ramips/dts/MT7621.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" > > / { > compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > diff --git a/target/linux/ramips/dts/PBR-M1.dts > b/target/linux/ramips/dts/PBR-M1.dts > index 7702d9c..d3225f4 100644 > --- a/target/linux/ramips/dts/PBR-M1.dts > +++ b/target/linux/ramips/dts/PBR-M1.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" > > / { > compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > diff --git a/target/linux/ramips/dts/RE6500.dts > b/target/linux/ramips/dts/RE6500.dts > index b65ade4..e950700 100644 > --- a/target/linux/ramips/dts/RE6500.dts > +++ b/target/linux/ramips/dts/RE6500.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" > > / { > compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > diff --git a/target/linux/ramips/dts/SAP-G3200U3.dts > b/target/linux/ramips/dts/SAP-G3200U3.dts > index e2798fb..a3ac8fd 100644 > --- a/target/linux/ramips/dts/SAP-G3200U3.dts > +++ b/target/linux/ramips/dts/SAP-G3200U3.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" > > / { > compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > diff --git a/target/linux/ramips/dts/WF-2881.dts > b/target/linux/ramips/dts/WF-2881.dts > index 7228dc5..9cd1aea 100644 > --- a/target/linux/ramips/dts/WF-2881.dts > +++ b/target/linux/ramips/dts/WF-2881.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" > > / { > compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > diff --git a/target/linux/ramips/dts/WSR-1166.dts > b/target/linux/ramips/dts/WSR-1166.dts > index 2dc59cc..18d4d33 100644 > --- a/target/linux/ramips/dts/WSR-1166.dts > +++ b/target/linux/ramips/dts/WSR-1166.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" > > / { > compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc"; > diff --git a/target/linux/ramips/dts/WSR-600.dts > b/target/linux/ramips/dts/WSR-600.dts > index 5eb813f..f5b6575 100644 > --- a/target/linux/ramips/dts/WSR-600.dts > +++ b/target/linux/ramips/dts/WSR-600.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" > > / { > compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc"; > diff --git a/target/linux/ramips/dts/ZBT-WG2626.dts > b/target/linux/ramips/dts/ZBT-WG2626.dts > index 6170454..47c9a59 100644 > --- a/target/linux/ramips/dts/ZBT-WG2626.dts > +++ b/target/linux/ramips/dts/ZBT-WG2626.dts > @@ -1,6 +1,6 @@ > /dts-v1/; > > -/include/ "mt7621.dtsi" > +#include "mt7621.dtsi" > > / { > compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; > diff --git a/target/linux/ramips/dts/mt7621.dtsi > b/target/linux/ramips/dts/mt7621.dtsi > index cc6b873..1f2f5b5 100644 > --- a/target/linux/ramips
Re: [OpenWrt-Devel] [PATCH 6/9] ramips: Fix CM_GCR_CPC_BASE_CPCBASE_{MSK, SHF} values
Hi, On 11/12/2015 05:01, Nikolay Martynov wrote: > Update CM_GCR_CPC_BASE_CPCBASE_{MSK,SHF} to match datasheet > do you mean the GIC or the mt7621 datasheet ? is this a mt7621 specific change or is this an upstream bug that we need to submit a patch for ? John > Signed-off-by: Nikolay Martynov > --- > .../ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch | 13 > + > 1 file changed, 13 insertions(+) > create mode 100644 > target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch > > diff --git a/target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch > b/target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch > new file mode 100644 > index 000..b267137 > --- /dev/null > +++ b/target/linux/ramips/patches-4.3/0059-correct-CPC_BASE_MASK.patch > @@ -0,0 +1,13 @@ > +--- a/arch/mips/include/asm/mips-cm.h > b/arch/mips/include/asm/mips-cm.h > +@@ -270,8 +270,8 @@ BUILD_CM_Cx_R_(tcid_8_priority, 0x80) > + #define CM_GCR_GIC_BASE_GICEN_MSK (_ULCAST_(0x1) << 0) > + > + /* GCR_CPC_BASE register fields */ > +-#define CM_GCR_CPC_BASE_CPCBASE_SHF 17 > +-#define CM_GCR_CPC_BASE_CPCBASE_MSK (_ULCAST_(0x7fff) << 17) > ++#define CM_GCR_CPC_BASE_CPCBASE_SHF 15 > ++#define CM_GCR_CPC_BASE_CPCBASE_MSK (_ULCAST_(0x1) << 15) > + #define CM_GCR_CPC_BASE_CPCEN_SHF 0 > + #define CM_GCR_CPC_BASE_CPCEN_MSK (_ULCAST_(0x1) << 0) > + > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 9/9] ramips: use gic timer as clocksource for mt7621
On 11/12/2015 05:01, Nikolay Martynov wrote: > * Switches clocksource to gic timer. > * Moves frequency definitions to dtsi since frequency was hardcoded anyway > Will work on proper frequency detection later. Hi, This is a pretty crue way to patch common clock into the ralink support ;) i'll merge it into openwrt but before we send this one upstream we should consider bumping the whole target to common clock properly. i might look into that during the weekend John > > Signed-off-by: Nikolay Martynov > --- > target/linux/ramips/dts/mt7621.dtsi| 14 > target/linux/ramips/mt7621/config-4.3 | 4 ++ > .../patches-4.3/0902-mt7621-use-gic-timer.patch| 83 > ++ > 3 files changed, 101 insertions(+) > create mode 100644 > target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch > > diff --git a/target/linux/ramips/dts/mt7621.dtsi > b/target/linux/ramips/dts/mt7621.dtsi > index 53ac45c..4b38f18 100644 > --- a/target/linux/ramips/dts/mt7621.dtsi > +++ b/target/linux/ramips/dts/mt7621.dtsi > @@ -88,6 +88,9 @@ > compatible = "ns16550a"; > reg = <0xc00 0x100>; > > + /* FIXME: there should be way to detect this */ > + clock-frequency = <5000>; > + > interrupt-parent = <&gic>; > interrupts = ; > > @@ -102,6 +105,9 @@ > compatible = "ralink,mt7621-spi"; > reg = <0xb00 0x100>; > > + /* FIXME: there should be way to detect this */ > + clock-frequency = <5000>; > + > resets = <&rstctrl 18>; > reset-names = "spi"; > > @@ -243,6 +249,14 @@ > #interrupt-cells = <3>; > > mti,reserved-cpu-vectors = <7>; > + > + timer { > + compatible = "mti,gic-timer"; > + interrupts = ; > + > + /* FIXME: there should be way to detect this */ > + clock-frequency = <88000>; > + }; > }; > > nand@1e003000 { > diff --git a/target/linux/ramips/mt7621/config-4.3 > b/target/linux/ramips/mt7621/config-4.3 > index f25850a..a56395c 100644 > --- a/target/linux/ramips/mt7621/config-4.3 > +++ b/target/linux/ramips/mt7621/config-4.3 > @@ -17,10 +17,13 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y > CONFIG_CEVT_R4K=y > # CONFIG_CEVT_SYSTICK_QUIRK is not set > CONFIG_CLKDEV_LOOKUP=y > +CONFIG_CLKSRC_MIPS_GIC=y > +CONFIG_CLKSRC_OF=y > CONFIG_CLONE_BACKWARDS=y > CONFIG_CMDLINE="rootfstype=squashfs,jffs2" > CONFIG_CMDLINE_BOOL=y > # CONFIG_CMDLINE_OVERRIDE is not set > +CONFIG_COMMON_CLK=y > CONFIG_CPU_GENERIC_DUMP_TLB=y > CONFIG_CPU_HAS_PREFETCH=y > CONFIG_CPU_HAS_SYNC=y > @@ -78,6 +81,7 @@ CONFIG_HAVE_ARCH_TRACEHOOK=y > CONFIG_HAVE_BPF_JIT=y > CONFIG_HAVE_CC_STACKPROTECTOR=y > CONFIG_HAVE_CLK=y > +CONFIG_HAVE_CLK_PREPARE=y > CONFIG_HAVE_CONTEXT_TRACKING=y > CONFIG_HAVE_C_RECORDMCOUNT=y > CONFIG_HAVE_DEBUG_KMEMLEAK=y > diff --git a/target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch > b/target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch > new file mode 100644 > index 000..5a78b88 > --- /dev/null > +++ b/target/linux/ramips/patches-4.3/0902-mt7621-use-gic-timer.patch > @@ -0,0 +1,83 @@ > +--- a/arch/mips/ralink/Kconfig > b/arch/mips/ralink/Kconfig > +@@ -52,6 +52,8 @@ choice > + select SYS_SUPPORTS_SMP > + select SYS_SUPPORTS_MIPS_CPS > + select MIPS_GIC > ++select COMMON_CLK > ++select CLKSRC_MIPS_GIC > + select HW_HAS_PCI > + endchoice > + > +--- a/arch/mips/ralink/Makefile > b/arch/mips/ralink/Makefile > +@@ -6,14 +6,18 @@ > + # Copyright (C) 2009-2011 Gabor Juhos > + # Copyright (C) 2013 John Crispin > + > +-obj-y := prom.o of.o reset.o clk.o timer.o > ++obj-y := prom.o of.o reset.o > ++ > ++ifndef CONFIG_MIPS_GIC > ++obj-y += clk.o timer.o > ++endif > + > + obj-$(CONFIG_CLKEVT_RT3352) += cevt-rt3352.o > + > + obj-$(CONFIG_RALINK_ILL_ACC) += ill_acc.o > + > + obj-$(CONFIG_IRQ_INTC) += irq.o > +-obj-$(CONFIG_MIPS_GIC) += irq-gic.o > ++obj-$(CONFIG_MIPS_GIC) += irq-gic.o timer-gic.o > + > + obj-$(CONFIG_SOC_RT288X) += rt288x.o > + obj-$(CONFIG_SOC_RT305X) += rt305x.o > +--- a/arch/mips/ralink/irq-gic.c > b/arch/mips/ralink/irq-gic.c > +@@ -3,13 +3,6 @@ > + #include > + #include > + > +-#include > +- > +-unsigned int get_c0_compare_int(void) > +-{ > +-return gic_get_c0_compare_int(); > +-} > +- > + void __init > + arch_init_irq(void) > + { > +--- /dev/null > b/arch/mips/ralink/timer-gic.c > +@@ -0,0 +1,13 @@ > ++#include > ++ > ++#include > ++#include > ++ > ++#include "common.h" > ++ > ++void __init plat_time_init(void) > ++{ > ++ralink_of_remap(); > ++ > ++clocksource_of_init(); > ++} > +--- a/arch/mips/ralink/mt7
Re: [OpenWrt-Devel] Fast build testing [Was: Git mirror with branches, tags and full history]
* John Szakmeister [02.12.2015 16:04]: > > today tested PowerPC/mpc85xx and this needs 160 seconds: > > make clean; make -j25 > > Do these numbers include building the toolchain? And I assume it does > not include downloading all the sources, correct? just bumping this thread: is there a way to just build *all* (or nearly all) packages? here is the script for copy/paste for measuring *your* time: (please make sure '/usr/bin/time' is installed) work() { echo "CONFIG_TARGET_${1:-mpc85xx}=y" >.config THREADS=$( grep -sc ^processor /proc/cpuinfo ) THREADS=$(( THREADS + 1 )) S0='defconfig' S1="tools/install $( test "$(id -u)" = 0 && echo FORCE_UNSAFE_CONFIGURE=1 )" S2='toolchain/install' S3='target/compile' S4='package/compile' S5='package/install' S6='package/preconfig' S7='target/install' S8='package/index' S9='clean' for STEP in "$S0" "$S1" "$S2" "$S3" "$S4" "$S5" "$S6" "$S7" "$S8" "$S9" '' dirclean; do COMMAND="make -j$THREADS $STEP" echo "real: $COMMAND | $( cat /proc/loadavg ) - space: $( du -sh )" /usr/bin/time -f "real %e secs" $COMMAND || break done } you can run it (inside the openwrt-dir) with: # work ar71xx 2>&1 | tee LOG after it has run you can get the stats with the horrible one-liner: # grep ^real LOG | while read -r L; do set -- $L; test "$1" != 'real:' && echo "$L $O" || { shift; O="$*"; }; done bye, bastian PS: i asked some of my customers if they agree to setup some strong boxes inside theire data-center for just building openwrt and at least 3 are fine with this. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel