[OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8

2016-04-24 Thread Andrew Yong
This patch adds support for the SamKnows version 8.0 Whitebox, built
around the MT7621 platform. 2.4GHz appears to be working, albeit
poorly; 5GHz not working yet.

 Fixed in v4:
- I didn't commit some fixes in PATCHv3, that's fixed now
- DTS: Syntax error fixed, LEDs and buttons mapped correctly now
- diag.sh updated to blink WPS LED on boot
- 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
matches SamKnows firmware
- 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware

Initial support for SamKnows SK-WB8

Signed-off-by: Andrew Yong 

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
b/target/linux/ramips/base-files/etc/board.d/01_leds
index e3b8500..df30085 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -241,6 +241,9 @@ rt-n14u)
set_wifi_led "$board:blue:air"
set_usb_led "$board:blue:usb"
;;
+sk-wb8)
+   set_usb_led "$board:green:usb"
+   ;;
 tiny-ac)
set_wifi_led "$board:orange:wifi"
set_usb_led "$board:green:usb"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
b/target/linux/ramips/base-files/etc/board.d/02_network
index 3c958ae..3e876d2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -77,6 +77,7 @@ ramips_setup_interfaces()
pbr-m1|\
psg1208|\
sap-g3200u3|\
+   sk-wb8|\
wf-2881|\
whr-300hp2|\
whr-600d|\
@@ -310,6 +311,9 @@ ramips_setup_macs()
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(mtd_get_mac_binary factory 32772)
;;
+   sk-wb8)
+   wan_mac=$(mtd_get_mac_binary factory 57350)
+   ;;
tew-691gr)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 3)
diff --git a/target/linux/ramips/base-files/etc/diag.sh
b/target/linux/ramips/base-files/etc/diag.sh
index bd0ff05..a941fca 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -76,7 +76,8 @@ get_status_led() {
;;
awapn2403|\
dir-645|\
-   wrh-300cr)
+   wrh-300cr|\
+   sk-wb8)
status_led="$board:green:wps"
;;
cf-wr800n|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh
b/target/linux/ramips/base-files/lib/ramips.sh
index 550ec55..4f1bd41 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -370,6 +370,9 @@ ramips_board_detect() {
*"SAP-G3200U3")
name="sap-g3200u3"
;;
+   *"SamKnows Whitebox 8")
+   name="sk-wb8"
+   ;;
*"SL-R7205"*)
name="sl-r7205"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 73ba6e6..fcc1b79 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -109,6 +109,7 @@ platform_check_image() {
rt-n56u|\
rut5xx|\
sap-g3200u3|\
+   sk-wb8|\
sl-r7205|\
tew-691gr|\
tew-692gr|\
diff --git a/target/linux/ramips/dts/SK-WB8.dts
b/target/linux/ramips/dts/SK-WB8.dts
new file mode 100644
index 000..3292194
--- /dev/null
+++ b/target/linux/ramips/dts/SK-WB8.dts
@@ -0,0 +1,122 @@
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+/ {
+   compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+   model = "SamKnows SK-WB8";
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x400>;
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,57600";
+   };
+
+   palmbus@1E00 {
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "mx25l6405d";
+   reg = <0 0>;
+   linux,modalias = "m25p80";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+  

[OpenWrt-Devel] [PATCHv3] ramips: add support for SamKnows SK-WB8

2016-04-24 Thread Andrew Yong
This patch adds support for the SamKnows version 8.0 Whitebox, built
around the MT7621 platform. 2.4GHz appears to be working, albeit >
poorly; 5GHz not working yet.

Fixed in v3:
- DTS: Syntax error fixed, LEDs and buttons mapped correctly now
- diag.sh updated to blink WPS LED on boot
- 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
matches SamKnows firmware
- 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware

Initial support for SamKnows SK-WB8

Signed-off-by: Andrew Yong 

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
b/target/linux/ramips/base-files/etc/board.d/01_leds
index e3b8500..df30085 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -241,6 +241,9 @@ rt-n14u)
set_wifi_led "$board:blue:air"
set_usb_led "$board:blue:usb"
;;
+sk-wb8)
+   set_usb_led "$board:green:usb"
+   ;;
 tiny-ac)
set_wifi_led "$board:orange:wifi"
set_usb_led "$board:green:usb"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
b/target/linux/ramips/base-files/etc/board.d/02_network
index 3c958ae..3e876d2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -77,6 +77,7 @@ ramips_setup_interfaces()
pbr-m1|\
psg1208|\
sap-g3200u3|\
+   sk-wb8|\
wf-2881|\
whr-300hp2|\
whr-600d|\
@@ -310,6 +311,9 @@ ramips_setup_macs()
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(mtd_get_mac_binary factory 32772)
;;
+   sk-wb8)
+   wan_mac=$(mtd_get_mac_binary factory 57350)
+   ;;
tew-691gr)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 3)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh
b/target/linux/ramips/base-files/lib/ramips.sh
index 550ec55..0997cc8 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -370,6 +370,9 @@ ramips_board_detect() {
*"SAP-G3200U3")
name="sap-g3200u3"
;;
+   *"SK-WB8")
+   name="sk-wb8"
+   ;;
*"SL-R7205"*)
name="sl-r7205"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 73ba6e6..fcc1b79 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -109,6 +109,7 @@ platform_check_image() {
rt-n56u|\
rut5xx|\
sap-g3200u3|\
+   sk-wb8|\
sl-r7205|\
tew-691gr|\
tew-692gr|\
diff --git a/target/linux/ramips/dts/SK-WB8.dts
b/target/linux/ramips/dts/SK-WB8.dts
new file mode 100644
index 000..ce25c7a
--- /dev/null
+++ b/target/linux/ramips/dts/SK-WB8.dts
@@ -0,0 +1,121 @@
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+/ {
+   compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+   model = "SamKnows SK-WB8";
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x400>;
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,57600";
+   };
+
+   palmbus@1E00 {
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "mx25l6405d";
+   reg = <0 0>;
+   linux,modalias = "m25p80";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0x7b>;
+   };
+
+   };
+   };
+   };
+
+   pcie@1e14 {
+   status = "okay";
+

[OpenWrt-Devel] [PATCHv2] ramips: add support for SamKnows SK-WB8

2016-04-24 Thread Andrew Yong
This patch adds support for the SamKnows version 8.0 Whitebox, built
around the MT7621 platform. 2.4GHz appears to be working, albeit
poorly; 5GHz not working yet.

Changes from v1: Fixed LED name in DTS.

Initial support for SamKnows SK-WB8

Signed-off-by: Andrew Yong 

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
b/target/linux/ramips/base-files/etc/board.d/01_leds
index e3b8500..df30085 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -241,6 +241,9 @@ rt-n14u)
set_wifi_led "$board:blue:air"
set_usb_led "$board:blue:usb"
;;
+sk-wb8)
+   set_usb_led "$board:green:usb"
+   ;;
 tiny-ac)
set_wifi_led "$board:orange:wifi"
set_usb_led "$board:green:usb"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
b/target/linux/ramips/base-files/etc/board.d/02_network
index 3c958ae..3e876d2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -77,6 +77,7 @@ ramips_setup_interfaces()
pbr-m1|\
psg1208|\
sap-g3200u3|\
+   sk-wb8|\
wf-2881|\
whr-300hp2|\
whr-600d|\
@@ -310,6 +311,9 @@ ramips_setup_macs()
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(mtd_get_mac_binary factory 32772)
;;
+   sk-wb8)
+   wan_mac=$(mtd_get_mac_binary factory 57350)
+   ;;
tew-691gr)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 3)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh
b/target/linux/ramips/base-files/lib/ramips.sh
index 550ec55..0997cc8 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -370,6 +370,9 @@ ramips_board_detect() {
*"SAP-G3200U3")
name="sap-g3200u3"
;;
+   *"SK-WB8")
+   name="sk-wb8"
+   ;;
*"SL-R7205"*)
name="sl-r7205"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 73ba6e6..fcc1b79 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -109,6 +109,7 @@ platform_check_image() {
rt-n56u|\
rut5xx|\
sap-g3200u3|\
+   sk-wb8|\
sl-r7205|\
tew-691gr|\
tew-692gr|\
diff --git a/target/linux/ramips/dts/SK-WB8.dts
b/target/linux/ramips/dts/SK-WB8.dts
new file mode 100644
index 000..e783374
--- /dev/null
+++ b/target/linux/ramips/dts/SK-WB8.dts
@@ -0,0 +1,121 @@
+/dts-v1/;
+
+/include/ "mt7621.dtsi"
+
+/ {
+   compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+   model = "SamKnows SK-WB8";
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x400>;
+   };
+
+   chosen {
+   bootargs = "console=ttyS0,57600";
+   };
+
+   palmbus@1E00 {
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "mx25l6405d";
+   reg = <0 0>;
+   linux,modalias = "m25p80";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   label = "firmware";
+   reg = <0x5 0x7b>;
+   };
+
+   };
+   };
+   };
+
+   pcie@1e14 {
+   status = "okay";
+
+   pcie0 {
+   mt76@0,0 {
+   reg = <0x 0 0 0 0>;
+   device_type = "pci";
+   mediatek,mtd-eeprom = < 0x8000>;
+ 

[OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A

2016-04-24 Thread Ben Mulvihill
Remove read-only flag on two partitions on BTHOMEHUBV3A:
  uboot-config - otherwise fw_setenv command cannot be used.
  ath9k-cal- so that ath9k calibration data can be copied
 to the partition on a newly installed board.
 
Signed-off-by: Ben Mulvihill 
---
--- a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts  2016-04-24 17:30:44.117072962 
+0200
+++ b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts  2016-04-24 17:30:08.483732762 
+0200
@@ -61,12 +61,10 @@
partition@64000 {
label = "uboot-config";
reg = <0x64000 0x004000>;
-   read-only;
};
ath9k_cal: partition@68000 {
label = "art-copy";
reg = <0x68000 0x004000>;
-   read-only;
};
partition@6c000 {
label = "kernel";
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] build: conditional dependencies in packages sharing the same source

2016-04-24 Thread Eyal Birger
On Sun, Apr 24, 2016 at 8:35 PM, Hauke Mehrtens  wrote:
> On 04/24/2016 01:47 PM, Eyal Birger wrote:
>> Hi All,
>>
>> We've encountered an interesting behavior in the OpenWRT build system, on 
>> which
>> feedback would be appreciated:
>>
>> When building packages sharing the same source code, all packages
>> prerequisites seem to
>> be joined unconditionally, instead of each prerequisite depending on
>> the package that required
>> it.
>>
>> As an example:
>>
>> ppp-mod-pppoa shares its source code with the ppp package;
>> ppp-mod-pppoa depends on linux-atm;
>> as a result, ppp depends unconditionally on linux-atm.
>>
>> i.e. in the generated tmp/.packagedeps file, the following is generated:
>>
>> $(curdir)/ppp/compile += ... $(curdir)/linux-atm/compile ...
>>
>> And not:
>>
>> $(curdir)/ppp/compile += ... $(if
>> $(CONFIG_ppp-mod-pppoa),$(curdir)/linux-atm/compile) ...
>>
>> This results in unnecessary compilation dependencies.
>>
>> Is this behavior intentional?
>>
>> Best regards,
>> Eyal.
>
> Hi,
>
> When more than one package is build from one source, this is mostly done
> by building the source code once for all binaries and then only
> packaging the stuff into different packages. I assume that there is a
> build time dependency to atm in the ppp source.

Thanks! that's interesting.

In this particular case, there doesn't seem to be such a dependency, i.e. ppp
builds fine without ppp-mod-pppoa and linux-atm (haven't tested all possible
configurations though :))

But if there was a dependency, wouldn't it have been correct for it to be
explicit in the ppp dependencies?
(maybe if ppp-mod-pppoa got deprecated, ppp might break for no apparent
reason...)

Seems that the current behavior masks these subtleties; That's why I'm wondering
if it is intentional, or if it should be changed, so that all
dependencies must be defined
exactly where they are needed.

>
> Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] lantiq: uboot-envtools on BTHOMEHUBV3A

2016-04-24 Thread Ben Mulvihill
Generate fw_env.config for BTHOMEHUBV3A.

Signed-off-by: Ben Mulvihill 
---
--- a/package/boot/uboot-envtools/files/lantiq  2016-04-24 17:39:13.800242670 
+0200
+++ b/package/boot/uboot-envtools/files/lantiq  2016-04-24 17:38:23.778361298 
+0200
@@ -20,6 +20,9 @@ GIGASX76X)
 BTHOMEHUBV2B)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1" "0x1" "1"
;;
+BTHOMEHUBV3A)
+   ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x4000" "0x4000" "1"
+   ;;
 P2812HNUF1)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x2" "1"
;;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ubox: make system log support as a selectable option

2016-04-24 Thread Hauke Mehrtens
On 04/23/2016 01:11 AM, Andrej Vlasic wrote:
> Currently system log is always included as a part of ubox.
> Add a config option to optionally exclude system log from ubox package.
> 
> Signed-off-by: Andrej Vlasic 
> ---
>  package/system/ubox/Makefile | 20 ++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
> index b32c794..70a9273 100644
> --- a/package/system/ubox/Makefile
> +++ b/package/system/ubox/Makefile
> @@ -26,13 +26,29 @@ define Package/ubox
>CATEGORY:=Base system
>DEPENDS:=+libubox +ubusd +ubus +libubus +libuci +USE_GLIBC:librt
>TITLE:=OpenWrt system helper toolbox
> +  MENU:=1
> +endef
> +
> +define Package/ubox/config
> +config UBOX_LOGD
> +  bool
> +  default y
> +  depends on PACKAGE_ubox
> +  prompt "Include system log implementation"
> +  help
> + Include system log implementation which is implemented as part of ubox 
> project.
>  endef
>  
>  define Package/ubox/install
> - $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/ $(1)/etc/init.d/
> + $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib/
>  
> - $(INSTALL_BIN) 
> $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,logd,logread,validate_data} $(1)/sbin/
> + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} 
> $(1)/sbin/
> +  ifeq ($(CONFIG_UBOX_LOGD),y)
> + $(INSTALL_DIR) $(1)/etc/init.d/
> + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{logd,logread} $(1)/sbin/
>   $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log
> +  endif
> +
>   $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib
>  
>   $(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod
> 

Instead of making this a package option I think it would be better to
have two packages. One named ubox and one named logd for example.

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] build: conditional dependencies in packages sharing the same source

2016-04-24 Thread Hauke Mehrtens
On 04/24/2016 01:47 PM, Eyal Birger wrote:
> Hi All,
> 
> We've encountered an interesting behavior in the OpenWRT build system, on 
> which
> feedback would be appreciated:
> 
> When building packages sharing the same source code, all packages
> prerequisites seem to
> be joined unconditionally, instead of each prerequisite depending on
> the package that required
> it.
> 
> As an example:
> 
> ppp-mod-pppoa shares its source code with the ppp package;
> ppp-mod-pppoa depends on linux-atm;
> as a result, ppp depends unconditionally on linux-atm.
> 
> i.e. in the generated tmp/.packagedeps file, the following is generated:
> 
> $(curdir)/ppp/compile += ... $(curdir)/linux-atm/compile ...
> 
> And not:
> 
> $(curdir)/ppp/compile += ... $(if
> $(CONFIG_ppp-mod-pppoa),$(curdir)/linux-atm/compile) ...
> 
> This results in unnecessary compilation dependencies.
> 
> Is this behavior intentional?
> 
> Best regards,
> Eyal.

Hi,

When more than one package is build from one source, this is mostly done
by building the source code once for all binaries and then only
packaging the stuff into different packages. I assume that there is a
build time dependency to atm in the ppp source.

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] mtd-utils: fix build with glibc >= 2.23

2016-04-24 Thread Hauke Mehrtens
In glibc 2.23 sys/types.h does not include sys/sysmacros.h any more,
this causes a build failure. To prevent this include in manually.

Reported-by: Weedy 
Signed-off-by: Hauke Mehrtens 
---
 tools/mtd-utils/patches/120-makedev.patch| 10 ++
 tools/mtd-utils/patches/130-lzma_jffs2.patch |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 tools/mtd-utils/patches/120-makedev.patch

diff --git a/tools/mtd-utils/patches/120-makedev.patch 
b/tools/mtd-utils/patches/120-makedev.patch
new file mode 100644
index 000..0412669
--- /dev/null
+++ b/tools/mtd-utils/patches/120-makedev.patch
@@ -0,0 +1,10 @@
+--- a/mkfs.jffs2.c
 b/mkfs.jffs2.c
+@@ -50,6 +50,7 @@
+ #define PROGRAM_NAME "mkfs.jffs2"
+ 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
diff --git a/tools/mtd-utils/patches/130-lzma_jffs2.patch 
b/tools/mtd-utils/patches/130-lzma_jffs2.patch
index b04f019..0d88c88 100644
--- a/tools/mtd-utils/patches/130-lzma_jffs2.patch
+++ b/tools/mtd-utils/patches/130-lzma_jffs2.patch
@@ -5012,7 +5012,7 @@
 +}
 --- a/mkfs.jffs2.c
 +++ b/mkfs.jffs2.c
-@@ -1659,11 +1659,11 @@ int main(int argc, char **argv)
+@@ -1660,11 +1660,11 @@ int main(int argc, char **argv)
  }
  erase_block_size *= units;
  
-- 
2.8.0.rc3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] undefined reference while building

2016-04-24 Thread Hauke Mehrtens
On 04/24/2016 07:12 PM, Weedy wrote:
> 
> On 24 Apr 2016 1:09 pm, "Hauke Mehrtens"  > wrote:
>>
>> > Never mind. After a few more test and fresh git clones it seems I have
>> > a more general build failure. Basically any host utill with makedev,
>> > major or minor in it is dying. I don't understand why.
>> >
>> > Is this a gcc 5.x thing? I updated my system recently.
>>
>> ..
>>
>> > '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2'
>> >   CHK include/version.h
>> >   LD  mkfs.jffs2
>> > mkfs.jffs2.c:944: error: undefined reference to 'major'
>> > mkfs.jffs2.c:944: error: undefined reference to 'minor'
>> > mkfs.jffs2.c:1263: error: undefined reference to 'minor'
>> > mkfs.jffs2.c:1263: error: undefined reference to 'major'
>> > mkfs.jffs2.c:1273: error: undefined reference to 'minor'
>> > mkfs.jffs2.c:1273: error: undefined reference to 'major'
>> > mkfs.jffs2.c:503: error: undefined reference to 'makedev'
>> > mkfs.jffs2.c:467: error: undefined reference to 'makedev'
>> > mkfs.jffs2.c:510: error: undefined reference to 'makedev'
>> > collect2: error: ld returned 1 exit status
>> > common.mk:80 : recipe for target
>>
>>
>> Hi,
>>
>> what Linux distribution are you using? What libc are you using?
>>
>> makedev and co. are some more specific functions, but they should be
>> provided by your libc:
>> http://man7.org/linux/man-pages/man3/major.3.html
>>
>> Hauke
> 
> Gentoo, glibc 2.23
> 

glibc 2.23 changed something and this is causes this build failure. See
this issue for example:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cb0c6445bfe23a4d4714e15fc5baa6ecfacad25

Please try the patch I just send and report back.

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] undefined reference while building

2016-04-24 Thread Weedy
On 24 Apr 2016 1:09 pm, "Hauke Mehrtens"  wrote:
>
> > Never mind. After a few more test and fresh git clones it seems I have
> > a more general build failure. Basically any host utill with makedev,
> > major or minor in it is dying. I don't understand why.
> >
> > Is this a gcc 5.x thing? I updated my system recently.
>
> ..
>
> > '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2'
> >   CHK include/version.h
> >   LD  mkfs.jffs2
> > mkfs.jffs2.c:944: error: undefined reference to 'major'
> > mkfs.jffs2.c:944: error: undefined reference to 'minor'
> > mkfs.jffs2.c:1263: error: undefined reference to 'minor'
> > mkfs.jffs2.c:1263: error: undefined reference to 'major'
> > mkfs.jffs2.c:1273: error: undefined reference to 'minor'
> > mkfs.jffs2.c:1273: error: undefined reference to 'major'
> > mkfs.jffs2.c:503: error: undefined reference to 'makedev'
> > mkfs.jffs2.c:467: error: undefined reference to 'makedev'
> > mkfs.jffs2.c:510: error: undefined reference to 'makedev'
> > collect2: error: ld returned 1 exit status
> > common.mk:80: recipe for target
>
>
> Hi,
>
> what Linux distribution are you using? What libc are you using?
>
> makedev and co. are some more specific functions, but they should be
> provided by your libc:
> http://man7.org/linux/man-pages/man3/major.3.html
>
> Hauke

Gentoo, glibc 2.23
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] undefined reference while building

2016-04-24 Thread Hauke Mehrtens
> Never mind. After a few more test and fresh git clones it seems I have
> a more general build failure. Basically any host utill with makedev,
> major or minor in it is dying. I don't understand why.
> 
> Is this a gcc 5.x thing? I updated my system recently.

..

> '/home/weedy/projects/openwrt/build_dir/host/mtd-utils-1.5.2'
>   CHK include/version.h
>   LD  mkfs.jffs2
> mkfs.jffs2.c:944: error: undefined reference to 'major'
> mkfs.jffs2.c:944: error: undefined reference to 'minor'
> mkfs.jffs2.c:1263: error: undefined reference to 'minor'
> mkfs.jffs2.c:1263: error: undefined reference to 'major'
> mkfs.jffs2.c:1273: error: undefined reference to 'minor'
> mkfs.jffs2.c:1273: error: undefined reference to 'major'
> mkfs.jffs2.c:503: error: undefined reference to 'makedev'
> mkfs.jffs2.c:467: error: undefined reference to 'makedev'
> mkfs.jffs2.c:510: error: undefined reference to 'makedev'
> collect2: error: ld returned 1 exit status
> common.mk:80: recipe for target


Hi,

what Linux distribution are you using? What libc are you using?

makedev and co. are some more specific functions, but they should be
provided by your libc:
http://man7.org/linux/man-pages/man3/major.3.html

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCHv4] ramips: add support for Planex MZK-EX300NP

2016-04-24 Thread YuheiOKAWA
MZK-EX300NP is MT7620A based wifi repeater.
Built-in power supply.
64MiB RAM, 8MiB SPI Flash, non Wired Ethernet.

Signed-off-by: YuheiOKAWA 
---
Changes in v3:
- rebase
- change an line in 01_leds and 02_network
- change gpio in dts

 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +-
 .../linux/ramips/base-files/etc/board.d/02_network |   1 +
 target/linux/ramips/base-files/etc/diag.sh |   1 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/MZK-EX300NP.dts| 132 +
 target/linux/ramips/image/mt7620.mk|   2 +
 target/linux/ramips/mt7620/profiles/planex.mk  |  12 ++
 8 files changed, 154 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/MZK-EX300NP.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index e3b8500..3ab5f7f 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -118,7 +118,8 @@ dir-615-h1)
ucidef_set_led_default "status" "Status LED (amber)" 
"$board:amber:status" "0"
set_wifi_led "rt2800pci-phy0::radio"
;;
-dir-620-d1)
+dir-620-d1|\
+mzk-ex300np)
set_wifi_led "$board:green:wifi"
;;
 dir-810l|\
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index 3c958ae..c89b2a2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -162,6 +162,7 @@ ramips_setup_interfaces()
;;
d105|\
hpm|\
+   mzk-ex300np|\
na930|\
wli-tx4-ag300n|\
wrh-300cr)
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index bd0ff05..0eda084 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -154,6 +154,7 @@ get_status_led() {
whr-600d)
status_led="$board:orange:wifi"
;;
+   mzk-ex300np|\
rt-n10-plus|\
tew-691gr|\
tew-692gr|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 550ec55..e17aa94 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -292,6 +292,9 @@ ramips_board_detect() {
*"MZK-DP150N")
name="mzk-dp150n"
;;
+   *"MZK-EX300NP")
+   name="mzk-ex300np"
+   ;;
*"MZK-W300NH2"*)
name="mzk-w300nh2"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 73ba6e6..c0ee14e 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -88,6 +88,7 @@ platform_check_image() {
mt7628|\
mzk-750dhp|\
mzk-dp150n|\
+   mzk-ex300np|\
mzk-w300nh2|\
mzk-wdpr|\
nbg-419n|\
diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts 
b/target/linux/ramips/dts/MZK-EX300NP.dts
new file mode 100644
index 000..fd5c5cd
--- /dev/null
+++ b/target/linux/ramips/dts/MZK-EX300NP.dts
@@ -0,0 +1,132 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+   compatible = "ralink,mt7620a-soc";
+   model = "Planex MZK-EX300NP";
+
+   palmbus@1000 {
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   gpio3: gpio@688 {
+   status = "okay";
+   };
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "jedec,spi-nor";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q64";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 

Re: [OpenWrt-Devel] [PATCH] lantiq: fix brnImage build

2016-04-24 Thread Hauke Mehrtens
On 04/22/2016 08:39 AM, Mathias Kresin wrote:
> Use the kernel with the appended dtb as base, otherwise the kernel will
> panic with "no dtb found".
> 
> Signed-off-by: Mathias Kresin 
> ---
>  target/linux/lantiq/image/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/lantiq/image/Makefile 
> b/target/linux/lantiq/image/Makefile
> index c3cb48a..e63c134 100644
> --- a/target/linux/lantiq/image/Makefile
> +++ b/target/linux/lantiq/image/Makefile
> @@ -37,7 +37,7 @@ define PatchKernelLzma
>  endef
>  
>  define MkBrnImage
> - mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn 
> BRN-BOOT $(7)
> + mkbrncmdline -i $(KDIR)/vmlinux-$(5).tmp -o $(KDIR)/vmlinux-$(5)-brn 
> BRN-BOOT $(7)
>   $(call 
> CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma)
>   mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma 
> $(KDIR)/root.$(6)
>  endef
> 
Thanks for finding this.

I think it should be better to rename this in PatchKernelLzma to the old
name so we are sure the old code still works.

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: simplify patch 613 and add missing error handling

2016-04-24 Thread Heiner Kallweit
Dynamic allocation of label can be simplified.
Also add error handling to deal with failed memory allocation.

Signed-off-by: Heiner Kallweit 
---
 .../613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch   | 6 +++---
 .../613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch   | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
 
b/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
index a832bf8..e8bbe44 100644
--- 
a/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
+++ 
b/target/linux/ar71xx/patches-4.1/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
@@ -18,12 +18,12 @@
  
 +static int ath79_request_ext_lna_gpio(unsigned chain, int gpio)
 +{
-+  char buf[32];
 +  char *label;
 +  int err;
 +
-+  scnprintf(buf, sizeof(buf), "external LNA%u", chain);
-+  label = kstrdup(buf, GFP_KERNEL);
++  label = kasprintf(GFP_KERNEL, "external LNA%u", chain);
++  if (!label)
++  return -ENOMEM;
 +
 +  err = gpio_request_one(gpio, GPIOF_DIR_OUT | GPIOF_INIT_LOW, label);
 +  if (err) {
diff --git 
a/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
 
b/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
index a832bf8..e8bbe44 100644
--- 
a/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
+++ 
b/target/linux/ar71xx/patches-4.4/613-MIPS-ath79-add-ath79_wmac_setup_ext_lna_gpio-helper.patch
@@ -18,12 +18,12 @@
  
 +static int ath79_request_ext_lna_gpio(unsigned chain, int gpio)
 +{
-+  char buf[32];
 +  char *label;
 +  int err;
 +
-+  scnprintf(buf, sizeof(buf), "external LNA%u", chain);
-+  label = kstrdup(buf, GFP_KERNEL);
++  label = kasprintf(GFP_KERNEL, "external LNA%u", chain);
++  if (!label)
++  return -ENOMEM;
 +
 +  err = gpio_request_one(gpio, GPIOF_DIR_OUT | GPIOF_INIT_LOW, label);
 +  if (err) {
-- 
2.8.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] lantiq: use new image build process for brnImages

2016-04-24 Thread Mathias Kresin
LZMA compress the kernel without dictionary, otherwise brnboot fails to
uncompress the kernel.

The filesystem parameter of mkbrncmdline was dropped since the used
filesystem isn't exported in the kernel build step and at least in my
tests everything works without the parameter. If the parameter is
required for some reason, the static keyword "squashfs" can be used.

Signed-off-by: Mathias Kresin 
---
 target/linux/lantiq/image/Makefile | 42 +-
 1 file changed, 28 insertions(+), 14 deletions(-)

diff --git a/target/linux/lantiq/image/Makefile 
b/target/linux/lantiq/image/Makefile
index 6bad91b..f779a1b 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -39,12 +39,6 @@ define PatchKernelLzma
$(call 
CompressLzma,$(KDIR)/vmlinux$(2)-$(1).tmp,$(KDIR)/vmlinux$(2)-$(1).lzma)
 endef
 
-define MkBrnImage
-   mkbrncmdline -i $(KDIR)/vmlinux-$(5) -o $(KDIR)/vmlinux-$(5)-brn 
BRN-BOOT $(7)
-   $(call 
CompressLzma,$(KDIR)/vmlinux-$(5)-brn,$(KDIR)/vmlinux-$(5)-brn.lzma)
-   mkbrnimg -s $(1) -m $(2) -p $(3) -o $(4) $(KDIR)/vmlinux-$(5)-brn.lzma 
$(KDIR)/root.$(6)
-endef
-
 define MkImageLzma
mkimage -A mips -O linux -T kernel -a 0x80002000 -C lzma \
-e 0x80002000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
@@ -61,7 +55,6 @@ endef
 define Image/Build/squashfs
cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > 
$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
$(call 
prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
-   $(if $(3),$(call 
MkBrnImage,$(3),$(4),$(5),$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-brnImage,$(2),$(1),$(6)))
 endef
 
 define Image/BuildNAND/squashfs
@@ -268,6 +261,14 @@ define Build/mktplinkfw2
-o $@
 endef
 
+define Build/mkbrncmdline
+   mkbrncmdline -i $@ -o $@.new BRN-BOOT
+   mv $@.new $@
+endef
+
+define Build/mkbrnimg
+   mkbrnimg -s $(SIGNATURE) -m $(MAGIC) -p $(CRC32_POLY) -o $@ $(word 1,$^) 
$(word 2,$^)
+endef
 
 # Shared device definition: applies to every defined device
 define Device/Default
@@ -291,6 +292,13 @@ define Device/lantiqTpLink
   IMAGE/tplink := mktplinkfw2
 endef
 
+define Device/lantiqBrnImage
+  KERNEL := kernel-bin | append-dtb | mkbrncmdline | lzma-no-dict
+  IMAGES := factory.bin
+  IMAGE/factory.bin := mkbrnimg
+endef
+DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY
+
 define lantiqTpLink
   define Device/$(1)
 $$(Device/lantiqTpLink)
@@ -310,6 +318,17 @@ define lantiqImage
   TARGET_DEVICES += $(1)
 endef
 
+define lantiqBrnImage
+  define Device/$(1)
+$$(Device/lantiqBrnImage)
+DEVICE_PROFILE := $(1)
+DEVICE_DTS := $(1)
+SIGNATURE := $(2)
+MAGIC := $(3)
+CRC32_POLY := $(4)
+  endef
+  TARGET_DEVICES += $(1)
+endef
 
 ifeq ($(CONFIG_TARGET_lantiq_falcon),y)
 
@@ -404,14 +423,9 @@ $(eval $(call lantiqTpLink,TDW8970,TD-W8970v1))
 $(eval $(call lantiqTpLink,TDW8980,TD-W8980v1))
 $(eval $(call lantiqTpLink,VR200v,ArcherVR200V))
 $(eval $(call lantiqImage,VGV7510KW22NOR))
-
-Image/BuildKernel/Profile/VGV7510KW22BRN=$(call 
Image/BuildKernel/Template,VGV7510KW22BRN,$(1))
-Image/Build/Profile/VGV7510KW22BRN=$(call 
Image/Build/$(1),$(1),VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7,$(1))
-
+$(eval $(call lantiqBrnImage,VGV7510KW22BRN,BRNDA6431,0x12345678,0x04c11db7))
 $(eval $(call lantiqImage,VGV7519NOR))
-
-Image/BuildKernel/Profile/VGV7519BRN=$(call 
Image/BuildKernel/Template,VGV7519BRN,$(1))
-Image/Build/Profile/VGV7519BRN=$(call 
Image/Build/$(1),$(1),VGV7519BRN,5D8000,0x12345678,0x2083b8ed,$(1))
+$(eval $(call lantiqBrnImage,VGV7519BRN,5D8000,0x12345678,0x2083b8ed))
 
 define Image/Prepare
$(call Image/Prepare/Profile,$(PROFILE))
-- 
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 2/5] lantiq: build sysupgrade images for lantiqImage

2016-04-24 Thread Mathias Kresin
Tested with VGV7510KW22NOR.

Signed-off-by: Mathias Kresin 
---
 target/linux/lantiq/image/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/lantiq/image/Makefile 
b/target/linux/lantiq/image/Makefile
index 4a358b5..d78c035 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -301,6 +301,8 @@ define Device/Default
   FILESYSTEMS := squashfs
   DEVICE_PROFILE :=
   DEVICE_DTS :=
+  IMAGES := sysupgrade.bin
+  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs
 endef
 DEVICE_VARS += BOARD_ID DEVICE_PROFILE DEVICE_DTS
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/5] add a no dict version of lzma to new image build code

2016-04-24 Thread Mathias Kresin
Required to compress kernels in a brnboot compatible way.

Signed-off-by: Mathias Kresin 
---
 include/image.mk | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/image.mk b/include/image.mk
index 7c11aa1..bc383e6 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -336,7 +336,11 @@ define Build/fit
 endef
 
 define Build/lzma
-   $(STAGING_DIR_HOST)/bin/lzma e $@ -lc1 -lp2 -pb2 $(1) $@.new
+   $(call Build/lzma-no-dict,-lc1 -lp2 -pb2 $(1))
+endef
+
+define Build/lzma-no-dict
+   $(STAGING_DIR_HOST)/bin/lzma e $@ $(1) $@.new
@mv $@.new $@
 endef
 
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/5] lantiq: remove orphaned tp-link image build steps

2016-04-24 Thread Mathias Kresin
Signed-off-by: Mathias Kresin 
---
 target/linux/lantiq/image/Makefile | 22 --
 1 file changed, 22 deletions(-)

diff --git a/target/linux/lantiq/image/Makefile 
b/target/linux/lantiq/image/Makefile
index d78c035..6bad91b 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -51,11 +51,6 @@ define MkImageLzma
-d $(KDIR)/vmlinux$(2)-$(1).lzma $(KDIR)/uImage-$(1)$(2)
 endef
 
-define TPLinkImageLzma
-   mktplinkfw2 -c -B $(2) -s \
-   -k $(KDIR)/vmlinux$(3)-$(1).lzma -o $(KDIR)/uImage-$(1)$(3)
-endef
-
 define MkImageEVA
lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux$(2)-$(1).lzma 
$(KDIR)/$(1)$(2).eva.prealign
dd if=$(KDIR)/$(1)$(2).eva.prealign of=$(KDIR)/$(1)$(2).eva.align.64k 
bs=64k conv=sync
@@ -115,12 +110,6 @@ define Image/BuildDGN3500B/squashfs
 endef
 
 
-define Image/BuildTPLink/squashfs
-   mktplinkfw2 -B $(3) -s -a 0x4 -j \
-   -k $(KDIR)/vmlinux-$(2).lzma -r $(KDIR)/root.$(1) \
-   -o $(BIN_DIR)/$(IMG_PREFIX)-$(2)-sysupgrade.image
-endef
-
 define Image/BuildEVA/squashfs
cat $(KDIR)/$(2).eva.align.64k $(KDIR)/root.$(1) > 
$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva
$(call 
prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva)
@@ -247,17 +236,6 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
 endif
 endef
 
-define Image/BuildKernelTPLink/Template
-   $(call PatchKernelLzma,$(1))
-   $(call TPLinkImageLzma,$(1),$(2))
-   $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
-ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
-   $(call PatchKernelLzma,$(1),-initramfs)
-   $(call TPLinkImageLzma,$(1),$(2),-initramfs)
-   $(CP) $(KDIR)/uImage-$(1)-initramfs 
$(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs
-endif
-endef
-
 define Image/BuildKernelEVA/Template
$(call PatchKernelLzma,$(1))
$(call MkImageEVA,$(1))
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/5] lantiq: new image build process - fix kernel entry address

2016-04-24 Thread Mathias Kresin
Set the kernel entry address to the same value as it is used for the old
image build build process.

Fixes boot of uImages on VGV7510KW22NOR and others.

Signed-off-by: Mathias Kresin 
---
 target/linux/lantiq/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/lantiq/image/Makefile 
b/target/linux/lantiq/image/Makefile
index d863a91..4a358b5 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -11,7 +11,7 @@
 JFFS2_BLOCKSIZE = 64k 128k 256k
 
 KERNEL_LOADADDR = 0x80002000
-KERNEL_ENTRY = 0x80a0
+KERNEL_ENTRY = 0x80002000
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Issue with deferred GPIO probing on ar71xx/TL-WDR3600 under kernel 4.4

2016-04-24 Thread Heiner Kallweit
Am 24.04.2016 um 16:53 schrieb Heiner Kallweit:
> Under 4.4 I get the following errors which do not occur under 4.1:
> 
> [0.120197] MIPS: machine is TP-LINK TL-WDR3600/4300/4310
> [0.126234] unable to request GPIO18 for external LNA0
> [0.132811] unable to request GPIO19 for external LNA1
> 
> Reason is that gpio_request_one() in the following calls of
> the board initialization code returns -EPROBE_DEFER now.
> 
> ath79_wmac_set_ext_lna_gpio(0, WDR4300_GPIO_EXTERNAL_LNA0);
> ath79_wmac_set_ext_lna_gpio(1, WDR4300_GPIO_EXTERNAL_LNA1);
> 
> I'm not sure how to handle the situation that the board
> initialization code wants to access resources which are not
> available yet.
> A driver could defer its loading in this case, but most
> likely we don't have this option for the board initialization
> code.
> 
I found that manually registering the ath79 gpio driver from
the board init code fixes the issue.
Symbol ath79_gpio_driver needs to be exported in the ath79 gpio
driver and the following has to be added to the board init code:

extern struct platform_driver ath79_gpio_driver;
platform_driver_register(_gpio_driver);

However to me this looks more like a hack than a proper solution.
Any better idea?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Issue with deferred GPIO probing on ar71xx/TL-WDR3600 under kernel 4.4

2016-04-24 Thread Heiner Kallweit
Under 4.4 I get the following errors which do not occur under 4.1:

[0.120197] MIPS: machine is TP-LINK TL-WDR3600/4300/4310
[0.126234] unable to request GPIO18 for external LNA0
[0.132811] unable to request GPIO19 for external LNA1

Reason is that gpio_request_one() in the following calls of
the board initialization code returns -EPROBE_DEFER now.

ath79_wmac_set_ext_lna_gpio(0, WDR4300_GPIO_EXTERNAL_LNA0);
ath79_wmac_set_ext_lna_gpio(1, WDR4300_GPIO_EXTERNAL_LNA1);

I'm not sure how to handle the situation that the board
initialization code wants to access resources which are not
available yet.
A driver could defer its loading in this case, but most
likely we don't have this option for the board initialization
code.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCHv3] ramips: add support for Planex MZK-EX300NP

2016-04-24 Thread YuheiOKAWA
MZK-EX300NP is MT7620A based wifi repeater.
Built-in power supply.
64MiB RAM, 8MiB SPI Flash, non Wired Ethernet.

Signed-off-by: YuheiOKAWA 
---
Changes in v3:
- rebase
- change an line in 01_leds and 02_network

 target/linux/ramips/base-files/etc/board.d/01_leds |   3 +-
 .../linux/ramips/base-files/etc/board.d/02_network |   1 +
 target/linux/ramips/base-files/etc/diag.sh |   1 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/MZK-EX300NP.dts| 132 +
 target/linux/ramips/image/mt7620.mk|   2 +
 target/linux/ramips/mt7620/profiles/planex.mk  |  12 ++
 8 files changed, 154 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/MZK-EX300NP.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index e3b8500..3ab5f7f 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -118,7 +118,8 @@ dir-615-h1)
ucidef_set_led_default "status" "Status LED (amber)" 
"$board:amber:status" "0"
set_wifi_led "rt2800pci-phy0::radio"
;;
-dir-620-d1)
+dir-620-d1|\
+mzk-ex300np)
set_wifi_led "$board:green:wifi"
;;
 dir-810l|\
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index 3c958ae..c89b2a2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -162,6 +162,7 @@ ramips_setup_interfaces()
;;
d105|\
hpm|\
+   mzk-ex300np|\
na930|\
wli-tx4-ag300n|\
wrh-300cr)
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index bd0ff05..0eda084 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -154,6 +154,7 @@ get_status_led() {
whr-600d)
status_led="$board:orange:wifi"
;;
+   mzk-ex300np|\
rt-n10-plus|\
tew-691gr|\
tew-692gr|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 550ec55..e17aa94 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -292,6 +292,9 @@ ramips_board_detect() {
*"MZK-DP150N")
name="mzk-dp150n"
;;
+   *"MZK-EX300NP")
+   name="mzk-ex300np"
+   ;;
*"MZK-W300NH2"*)
name="mzk-w300nh2"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 73ba6e6..c0ee14e 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -88,6 +88,7 @@ platform_check_image() {
mt7628|\
mzk-750dhp|\
mzk-dp150n|\
+   mzk-ex300np|\
mzk-w300nh2|\
mzk-wdpr|\
nbg-419n|\
diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts 
b/target/linux/ramips/dts/MZK-EX300NP.dts
new file mode 100644
index 000..51e87ad
--- /dev/null
+++ b/target/linux/ramips/dts/MZK-EX300NP.dts
@@ -0,0 +1,132 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+   compatible = "ralink,mt7620a-soc";
+   model = "Planex MZK-EX300NP";
+
+   palmbus@1000 {
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   gpio3: gpio@688 {
+   status = "okay";
+   };
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "jedec,spi-nor";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "w25q64";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+ 

[OpenWrt-Devel] undefined reference while building

2016-04-24 Thread Weedy
On Sun, Apr 24, 2016 at 3:23 AM, Weedy  wrote:
> I "cat >" a few things into .config and then call defconfig.
> bmon, curl, iperf, etc, little things. I don't even add filesystems.
> My target is CONFIG_TARGET_ar71xx_generic_TLWDR4300.
>
> If I start a clean build with -j1 for a few minutes I can switch the
> -janything later and I'm fine.
> But -j anything right off a distclean breaks.
>
> $ make -j3 V=s
> make[1]: Entering directory '/home/weedy/projects/openwrt'
> make[2]: Entering directory '/home/weedy/projects/openwrt'
> make[2]: Entering directory '/home/weedy/projects/openwrt'
> + mkdir -p 
> /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14
> + cd /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14
> + mkdir -p bin lib include stamp
> + mkdir -p /home/weedy/projects/openwrt/staging_dir/host
> mkdir -p 
> /home/weedy/projects/openwrt/build_dir/target-mips_34kc_musl-1.1.14/stamp
> + cd /home/weedy/projects/openwrt/staging_dir/host
> + mkdir -p bin lib include stamp
> touch 
> /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/.prepared
> mkdir -p /home/weedy/projects/openwrt/build_dir/host/stamp
> /home/weedy/projects/openwrt/staging_dir/host/include/sys
> install -m0644 /home/weedy/projects/openwrt/tools/include/*.h
> /home/weedy/projects/openwrt/staging_dir/host/include/
> install -m0644 /home/weedy/projects/openwrt/tools/include/sys/*.h
> /home/weedy/projects/openwrt/staging_dir/host/include/sys/
> ln -sf lib /home/weedy/projects/openwrt/staging_dir/host/lib64
> touch /home/weedy/projects/openwrt/staging_dir/host/.prepared
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock'
> rm -rf 
> /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/root-ar71xx
> make[2]: Leaving directory '/home/weedy/projects/openwrt'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/sstrip'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/expat'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/sstrip'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/make-ext4fs'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/expat'
> make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch-image'
> make[3]: Entering directory 
> '/home/weedy/projects/openwrt/tools/firmware-utils'
> make -C /home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02
> make_ext4fs STATIC=1
> make[4]: Entering directory
> '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02'
> cc -o make_ext4fs allocate.o canned_fs_config.o contents.o crc16.o
> ext4fixup.o ext4_sb.o ext4_utils.o extent.o indirect.o
> make_ext4fs_main.o make_ext4fs.o sha1.o uuid.o wipe.o
> libsparse/libsparse.a -Wl,-Bstatic -lz -Wl,-Bdynamic
> contents.o:contents.c:function make_special: error: undefined
> reference to 'major'
> contents.o:contents.c:function make_special: error: undefined
> reference to 'minor'
> collect2: error: ld returned 1 exit status
> Makefile:30: recipe for target 'make_ext4fs' failed
> make[4]: *** [make_ext4fs] Error 1
> make[4]: Leaving directory
> '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02'
> Makefile:40: recipe for target
> '/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built'
> failed
> make[3]: *** 
> [/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built]
> Error 2
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/make-ext4fs'
> tools/Makefile:134: recipe for target 'tools/make-ext4fs/compile' failed
> make[2]: *** [tools/make-ext4fs/compile] Error 2
> make[2]: *** Waiting for unfinished jobs
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch-image'
> make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/firmware-utils'
> make[2]: Leaving directory '/home/weedy/projects/openwrt'
> tools/Makefile:133: recipe for target
> '/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyynynynnyynynnnnyy'
> failed
> make[1]: *** 
> [/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyynynynnyynynnnnyy]
> Error 2
> make[1]: Leaving directory 

Re: [OpenWrt-Devel] How to initialize multiple phy radios

2016-04-24 Thread Christian Lamparter
On Sunday, April 24, 2016 01:16:11 AM David Hutchison wrote:
> I spoke too soon:
> https://pci-ids.ucw.cz/read/PC/168c/0050
> 
> It is the QCA9887, so it's definitely on the PCIe bus and is being seen.
Does ath10k support the QCA9887? I see no entry for this pci-id (168c:0050)
in ath10k's pci table [0] and there's no definition of it in the hardware
header either [1]. The chip-id is also not present. I CC'ed ath10k, since
this seems to be a new chip that might be easy to add.
 
> On Sun, Apr 24, 2016 at 1:13 AM, David Hutchison
>  wrote:
> > Here is the PCI noise is in the kernel log from ath79_register_pci():
> >
> > [0.51] PCI host bridge to bus :00
> > [0.51] pci_bus :00: root bus resource [mem 
> > 0x1000-0x11ff]
> > [0.52] pci_bus :00: root bus resource [io  0x]
> > [0.52] pci_bus :00: No busn resource found for root bus,
> > will use [bus 00-ff]
> > [0.53] pci :00:00.0: [168c:0050] type 00 class 0x028000
> > [0.53] pci :00:00.0: reg 10: [mem 0x1000-0x101f 64bit]
> > [0.53] pci :00:00.0: reg 30: [mem 0x-0x pref]
> > [0.53] pci :00:00.0: supports D1
> > [0.53] pci :00:00.0: PME# supported from D0 D1 D3hot
> > [0.53] pci_bus :00: busn_res: [bus 00-ff] end is updated to 00
> > [0.53] pci :00:00.0: BAR 0: assigned [mem
> > 0x1000-0x101f 64bit]
> > [0.53] pci :00:00.0: BAR 6: assigned [mem
> > 0x1020-0x1020 pref]
> > [0.54] pci :00:00.0: using irq 40 for pin 1
> >
> > I compiled lspci in and it reports:
> > 00:00.0 Class 0280: 168c:0050
> >
> > As far as I know that's just a vendor/product ID, I tried looking it
> > up to verify that it was indeed the atheros qca988x but couldn't find
> > anything for certain.
> >
> > I verified ath10k is loaded:
> > ath10k_pci 27629  0
> > ath10k_core   247226  1 ath10k_pci
> > ath18726  4 ath10k_core,ath9k,ath9k_common,ath9k_hw
> > mac80211  389729  2 ath10k_core,ath9k
> > cfg80211  217396  5 ath10k_core,ath9k,ath9k_common,ath,mac80211
> > compat 19304  7
> > ath10k_pci,ath10k_core,ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211
> >

Regards,
Christian

[0] 


[1] 

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)"

2016-04-24 Thread John Crispin


On 24/04/2016 10:24, Tim Niemeyer wrote:
> This reverts commit 0fd48fd7dab066db8a46e51775579c9ef507ca25.
> 
> We are facing some problem on rolling out the current 15.05-branch to
> our devices because the image name changed.
> 
> The changed image name breaks compatibility for derived projects and
> that's something which should only happen if there is a really good
> reason (e.g. security fix).
> 

how does it beak compatibility ?



> Signed-off-by: Tim Niemeyer 
> ---
> 
>  target/linux/ar71xx/image/Makefile | 20 ++--
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/target/linux/ar71xx/image/Makefile 
> b/target/linux/ar71xx/image/Makefile
> index 1a399ab..9b41943 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -548,21 +548,21 @@ define Device/tl-wr743nd-v2
>  endef
>  TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 
> tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2
>  
> -define Device/tl-wr841-v8
> +define Device/tl-wr841n-v8
>  $(Device/tplink-4mlzma)
>  BOARDNAME := TL-WR841N-v8
>  DEVICE_PROFILE := TLWR841
>  TPLINK_HWID := 0x08410008
>  endef
>  
> -define Device/tl-wr841-v9
> +define Device/tl-wr841n-v9
>  $(Device/tplink-4mlzma)
>  BOARDNAME := TL-WR841N-v9
>  DEVICE_PROFILE := TLWR841
>  TPLINK_HWID := 0x08410009
>  endef
>  
> -define Device/tl-wr841-v10
> +define Device/tl-wr841n-v10
>  $(Device/tplink-4mlzma)
>  BOARDNAME := TL-WR841N-v9
>  DEVICE_PROFILE := TLWR841
> @@ -589,7 +589,7 @@ define Device/tl-wr847n-v8
>  DEVICE_PROFILE := TLWR841
>  TPLINK_HWID := 0x08470008
>  endef
> -TARGET_DEVICES += tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr842n-v2 
> tl-wr843nd-v1 tl-wr847n-v8
> +TARGET_DEVICES += tl-wr841n-v8 tl-wr841n-v9 tl-wr841n-v10 tl-wr842n-v2 
> tl-wr843nd-v1 tl-wr847n-v8
>  
>  define Device/tl-wr941nd-v5
>  $(Device/tplink-4mlzma)
> @@ -2008,13 +2008,13 @@ $(eval $(call 
> SingleProfile,Seama,64k,QIHOO360,qihoo-c301,QIHOO-C301,ttyS0,11520
>  
>  $(eval $(call 
> SingleProfile,Senao,squashfs-only,EAP300V2,eap300v2,EAP300V2,ttyS0,115200,$$(eap300v2_mtdlayout)))
>  
> -$(eval $(call 
> SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M))
> +$(eval $(call 
> SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M))
>  
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x3221,1,4M))
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x3421,1,4M))
> -$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701nd-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
> -$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730re-v1,TL-WA901ND,ttyS0,115200,0x0731,1,4M))
> +$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
> +$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x0731,1,4M))
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x7511,1,4M))
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWA830RV1,tl-wa830re-v1,TL-WA901ND,ttyS0,115200,0x08300010,1,4M))
> @@ -2023,9 +2023,9 @@ $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWA901NV2,tl-wa901nd-v2,TL-WA901ND-v2
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR740NV1,tl-wr740n-v1,TL-WR741ND,ttyS0,115200,0x0741,1,4M))
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR740NV3,tl-wr740n-v3,TL-WR741ND,ttyS0,115200,0x0743,1,4M))
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR743NV1,tl-wr743nd-v1,TL-WR741ND,ttyS0,115200,0x07430001,1,4M))
> -$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M))
> -$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M))
> -$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M))
> +$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841nd-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M))
> +$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841nd-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M))
> +$(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841nd-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M))
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR842V1,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M))
>  $(eval $(call 
> SingleProfile,TPLINK,64kraw,TLWR941NV2,tl-wr941nd-v2,TL-WR941ND,ttyS0,115200,0x09410002,2,4M))
>  $(eval 

[OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)"

2016-04-24 Thread Tim Niemeyer
This reverts commit 0fd48fd7dab066db8a46e51775579c9ef507ca25.

We are facing some problem on rolling out the current 15.05-branch to
our devices because the image name changed.

The changed image name breaks compatibility for derived projects and
that's something which should only happen if there is a really good
reason (e.g. security fix).

Signed-off-by: Tim Niemeyer 
---

 target/linux/ar71xx/image/Makefile | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 1a399ab..9b41943 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -548,21 +548,21 @@ define Device/tl-wr743nd-v2
 endef
 TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 
tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2
 
-define Device/tl-wr841-v8
+define Device/tl-wr841n-v8
 $(Device/tplink-4mlzma)
 BOARDNAME := TL-WR841N-v8
 DEVICE_PROFILE := TLWR841
 TPLINK_HWID := 0x08410008
 endef
 
-define Device/tl-wr841-v9
+define Device/tl-wr841n-v9
 $(Device/tplink-4mlzma)
 BOARDNAME := TL-WR841N-v9
 DEVICE_PROFILE := TLWR841
 TPLINK_HWID := 0x08410009
 endef
 
-define Device/tl-wr841-v10
+define Device/tl-wr841n-v10
 $(Device/tplink-4mlzma)
 BOARDNAME := TL-WR841N-v9
 DEVICE_PROFILE := TLWR841
@@ -589,7 +589,7 @@ define Device/tl-wr847n-v8
 DEVICE_PROFILE := TLWR841
 TPLINK_HWID := 0x08470008
 endef
-TARGET_DEVICES += tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr842n-v2 
tl-wr843nd-v1 tl-wr847n-v8
+TARGET_DEVICES += tl-wr841n-v8 tl-wr841n-v9 tl-wr841n-v10 tl-wr842n-v2 
tl-wr843nd-v1 tl-wr847n-v8
 
 define Device/tl-wr941nd-v5
 $(Device/tplink-4mlzma)
@@ -2008,13 +2008,13 @@ $(eval $(call 
SingleProfile,Seama,64k,QIHOO360,qihoo-c301,QIHOO-C301,ttyS0,11520
 
 $(eval $(call 
SingleProfile,Senao,squashfs-only,EAP300V2,eap300v2,EAP300V2,ttyS0,115200,$$(eap300v2_mtdlayout)))
 
-$(eval $(call 
SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M))
+$(eval $(call 
SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M))
 
 $(eval $(call 
SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x3221,1,4M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x3421,1,4M))
-$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701nd-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
-$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730re-v1,TL-WA901ND,ttyS0,115200,0x0731,1,4M))
+$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
+$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x0731,1,4M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x7511,1,4M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWA830RV1,tl-wa830re-v1,TL-WA901ND,ttyS0,115200,0x08300010,1,4M))
@@ -2023,9 +2023,9 @@ $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWA901NV2,tl-wa901nd-v2,TL-WA901ND-v2
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR740NV1,tl-wr740n-v1,TL-WR741ND,ttyS0,115200,0x0741,1,4M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR740NV3,tl-wr740n-v3,TL-WR741ND,ttyS0,115200,0x0743,1,4M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR743NV1,tl-wr743nd-v1,TL-WR741ND,ttyS0,115200,0x07430001,1,4M))
-$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M))
-$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M))
-$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M))
+$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR841NV3,tl-wr841nd-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M))
+$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR841NV5,tl-wr841nd-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M))
+$(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR841NV7,tl-wr841nd-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR842V1,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR941NV2,tl-wr941nd-v2,TL-WR941ND,ttyS0,115200,0x09410002,2,4M))
 $(eval $(call 
SingleProfile,TPLINK,64kraw,TLWR941NV3,tl-wr941nd-v3,TL-WR941ND,ttyS0,115200,0x09410002,2,4M))
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] rsync mirror of download.openwrt.org ?

2016-04-24 Thread Weedy
On 22 Apr 2016 11:38 am, "Laurent GUERBY"  wrote:
>
> Hi,
>
> Having no news we completed our mirror by using wget for 15.05.1:
>

Lftp is good for this. Or I guess aria2c
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] make -j on ar71xx dies.

2016-04-24 Thread Weedy
I "cat >" a few things into .config and then call defconfig.
bmon, curl, iperf, etc, little things. I don't even add filesystems.
My target is CONFIG_TARGET_ar71xx_generic_TLWDR4300.

If I start a clean build with -j1 for a few minutes I can switch the
-janything later and I'm fine.
But -j anything right off a distclean breaks.

$ make -j3 V=s
make[1]: Entering directory '/home/weedy/projects/openwrt'
make[2]: Entering directory '/home/weedy/projects/openwrt'
make[2]: Entering directory '/home/weedy/projects/openwrt'
+ mkdir -p /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14
+ cd /home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14
+ mkdir -p bin lib include stamp
+ mkdir -p /home/weedy/projects/openwrt/staging_dir/host
mkdir -p 
/home/weedy/projects/openwrt/build_dir/target-mips_34kc_musl-1.1.14/stamp
+ cd /home/weedy/projects/openwrt/staging_dir/host
+ mkdir -p bin lib include stamp
touch 
/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/.prepared
mkdir -p /home/weedy/projects/openwrt/build_dir/host/stamp
/home/weedy/projects/openwrt/staging_dir/host/include/sys
install -m0644 /home/weedy/projects/openwrt/tools/include/*.h
/home/weedy/projects/openwrt/staging_dir/host/include/
install -m0644 /home/weedy/projects/openwrt/tools/include/sys/*.h
/home/weedy/projects/openwrt/staging_dir/host/include/sys/
ln -sf lib /home/weedy/projects/openwrt/staging_dir/host/lib64
touch /home/weedy/projects/openwrt/staging_dir/host/.prepared
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock'
rm -rf 
/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/root-ar71xx
make[2]: Leaving directory '/home/weedy/projects/openwrt'
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/flock'
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/flock'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar'
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/tar'
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/tar'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/sstrip'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/expat'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch'
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/sstrip'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/make-ext4fs'
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch'
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/expat'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/patch-image'
make[3]: Entering directory '/home/weedy/projects/openwrt/tools/firmware-utils'
make -C /home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02
make_ext4fs STATIC=1
make[4]: Entering directory
'/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02'
cc -o make_ext4fs allocate.o canned_fs_config.o contents.o crc16.o
ext4fixup.o ext4_sb.o ext4_utils.o extent.o indirect.o
make_ext4fs_main.o make_ext4fs.o sha1.o uuid.o wipe.o
libsparse/libsparse.a -Wl,-Bstatic -lz -Wl,-Bdynamic
contents.o:contents.c:function make_special: error: undefined
reference to 'major'
contents.o:contents.c:function make_special: error: undefined
reference to 'minor'
collect2: error: ld returned 1 exit status
Makefile:30: recipe for target 'make_ext4fs' failed
make[4]: *** [make_ext4fs] Error 1
make[4]: Leaving directory
'/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02'
Makefile:40: recipe for target
'/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built'
failed
make[3]: *** 
[/home/weedy/projects/openwrt/build_dir/host/make-ext4fs-2015-12-02/.built]
Error 2
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/make-ext4fs'
tools/Makefile:134: recipe for target 'tools/make-ext4fs/compile' failed
make[2]: *** [tools/make-ext4fs/compile] Error 2
make[2]: *** Waiting for unfinished jobs
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/patch-image'
make[3]: Leaving directory '/home/weedy/projects/openwrt/tools/firmware-utils'
make[2]: Leaving directory '/home/weedy/projects/openwrt'
tools/Makefile:133: recipe for target
'/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyynynynnyynynnnnyy'
failed
make[1]: *** 
[/home/weedy/projects/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.tools_install_yynyynynynyyynynynnyynynnnnyy]
Error 2
make[1]: Leaving directory '/home/weedy/projects/openwrt'
Build failed - please re-run with -j1 to see the real error message
/home/weedy/projects/openwrt/include/toplevel.mk:192: recipe for
target 'world' failed
make: *** [world] Error 1

Re: [OpenWrt-Devel] How to initialize multiple phy radios

2016-04-24 Thread David Hutchison
I spoke too soon:
https://pci-ids.ucw.cz/read/PC/168c/0050

It is the QCA9887, so it's definitely on the PCIe bus and is being seen.

-- Davey

On Sun, Apr 24, 2016 at 1:13 AM, David Hutchison
 wrote:
> Thank you for the response Christian!
>
> Here is the PCI noise is in the kernel log from ath79_register_pci():
>
> [0.51] PCI host bridge to bus :00
> [0.51] pci_bus :00: root bus resource [mem 0x1000-0x11ff]
> [0.52] pci_bus :00: root bus resource [io  0x]
> [0.52] pci_bus :00: No busn resource found for root bus,
> will use [bus 00-ff]
> [0.53] pci :00:00.0: [168c:0050] type 00 class 0x028000
> [0.53] pci :00:00.0: reg 10: [mem 0x1000-0x101f 64bit]
> [0.53] pci :00:00.0: reg 30: [mem 0x-0x pref]
> [0.53] pci :00:00.0: supports D1
> [0.53] pci :00:00.0: PME# supported from D0 D1 D3hot
> [0.53] pci_bus :00: busn_res: [bus 00-ff] end is updated to 00
> [0.53] pci :00:00.0: BAR 0: assigned [mem
> 0x1000-0x101f 64bit]
> [0.53] pci :00:00.0: BAR 6: assigned [mem
> 0x1020-0x1020 pref]
> [0.54] pci :00:00.0: using irq 40 for pin 1
>
> I compiled lspci in and it reports:
> 00:00.0 Class 0280: 168c:0050
>
> As far as I know that's just a vendor/product ID, I tried looking it
> up to verify that it was indeed the atheros qca988x but couldn't find
> anything for certain.
>
> I verified ath10k is loaded:
> ath10k_pci 27629  0
> ath10k_core   247226  1 ath10k_pci
> ath18726  4 ath10k_core,ath9k,ath9k_common,ath9k_hw
> mac80211  389729  2 ath10k_core,ath9k
> cfg80211  217396  5 ath10k_core,ath9k,ath9k_common,ath,mac80211
> compat 19304  7
> ath10k_pci,ath10k_core,ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211
>
> -- Davey
>
> On Fri, Apr 22, 2016 at 4:32 AM, Christian Lamparter
>  wrote:
>> Hello,
>>
>> On Friday, April 22, 2016 02:03:01 AM David Hutchison wrote:
>>> I have been working on a board port and have everything working except
>>> for the 2nd radio. This board has a QCA9531 CPU and 2 WiFi Radios:
>>> AR9531 and a QCA9887 ( http://routerboard.com/RB952Ui-5ac2nD for more
>>> details ).
>>> [snip]
>>>
>>> Anyway, the Mikrotik hAP only has one radio and is 100% working.
>>> However the hAP AC Lite has an additional radio ( QCA988X )... I've
>>> compiled in ath10k, and added "ath79_register_pci()" but it doesn't
>>> find the radio. I've looked at ap91_pci_init() as well as
>>> ap94_pci_init() and haven't had any luck.
>>
>> Does ath79_register_pci actually register the pci bus (there should
>> be some noise in the kernel log when it registers the pci bus)? Or
>> does it return an error -ENODEV?
>>
>> This is what it looks like on a Archer C7: (Has a QCA9880)
>> [0.129096] ar724x-pci ar724x-pci.0: PCIe link is down
>> [0.133988] registering PCI controller with io_map_base unset
>> [0.139678] registering PCI controller with io_map_base unset
>> [0.586626] PCI host bridge to bus :00
>> [0.590553] pci_bus :00: root bus resource [mem 0x1000-0x11ff]
>> [0.597148] pci_bus :00: root bus resource [io  0x]
>> [0.602534] pci_bus :00: root bus resource [??? 0x flags 0x0]
>> ...
>>
>> I looked at ath79_register_pci, it is located in /arch/mips/ath79/pci.c.
>> On the first look, it doesn't look like your SoC is present there.
>> However soc_is_qca953x is just testing soc_is_qca9533. Can you verify
>> that this is indeed correct and the function actually calls
>> ath79_register_pci_ar724x?
>>
>>> What is the normal way for initializing a platform with multiple
>>> radio's? Of course I don't know the exact wiring with this board, but
>>> I believe the QCA988X 802.11ac radio is on a PCI bus of some sort. I'm
>>> not entirely sure, but every example I have seen it appears to be.
>> Hm, I don't know much about your device. If it's a proper QCA988X mini-pcie
>> radio and has the calibration data on a chip on its minipcie board, then
>> you don't need to setup anything else. Having select kmod-ath10k
>> (which AFAIK includes the firmware as well) is enough.
>>
>> But if the calibration data for ath10k is part of the routerboard's caldata
>> partition, you need to extracted by the userspace. This is currently done
>> by a script:
>> target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
>>
>> So you will need to add your device there with the right extraction
>> code.
>>
>> Regards,
>> Christian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to initialize multiple phy radios

2016-04-24 Thread David Hutchison
Thank you for the response Christian!

Here is the PCI noise is in the kernel log from ath79_register_pci():

[0.51] PCI host bridge to bus :00
[0.51] pci_bus :00: root bus resource [mem 0x1000-0x11ff]
[0.52] pci_bus :00: root bus resource [io  0x]
[0.52] pci_bus :00: No busn resource found for root bus,
will use [bus 00-ff]
[0.53] pci :00:00.0: [168c:0050] type 00 class 0x028000
[0.53] pci :00:00.0: reg 10: [mem 0x1000-0x101f 64bit]
[0.53] pci :00:00.0: reg 30: [mem 0x-0x pref]
[0.53] pci :00:00.0: supports D1
[0.53] pci :00:00.0: PME# supported from D0 D1 D3hot
[0.53] pci_bus :00: busn_res: [bus 00-ff] end is updated to 00
[0.53] pci :00:00.0: BAR 0: assigned [mem
0x1000-0x101f 64bit]
[0.53] pci :00:00.0: BAR 6: assigned [mem
0x1020-0x1020 pref]
[0.54] pci :00:00.0: using irq 40 for pin 1

I compiled lspci in and it reports:
00:00.0 Class 0280: 168c:0050

As far as I know that's just a vendor/product ID, I tried looking it
up to verify that it was indeed the atheros qca988x but couldn't find
anything for certain.

I verified ath10k is loaded:
ath10k_pci 27629  0
ath10k_core   247226  1 ath10k_pci
ath18726  4 ath10k_core,ath9k,ath9k_common,ath9k_hw
mac80211  389729  2 ath10k_core,ath9k
cfg80211  217396  5 ath10k_core,ath9k,ath9k_common,ath,mac80211
compat 19304  7
ath10k_pci,ath10k_core,ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211

-- Davey

On Fri, Apr 22, 2016 at 4:32 AM, Christian Lamparter
 wrote:
> Hello,
>
> On Friday, April 22, 2016 02:03:01 AM David Hutchison wrote:
>> I have been working on a board port and have everything working except
>> for the 2nd radio. This board has a QCA9531 CPU and 2 WiFi Radios:
>> AR9531 and a QCA9887 ( http://routerboard.com/RB952Ui-5ac2nD for more
>> details ).
>> [snip]
>>
>> Anyway, the Mikrotik hAP only has one radio and is 100% working.
>> However the hAP AC Lite has an additional radio ( QCA988X )... I've
>> compiled in ath10k, and added "ath79_register_pci()" but it doesn't
>> find the radio. I've looked at ap91_pci_init() as well as
>> ap94_pci_init() and haven't had any luck.
>
> Does ath79_register_pci actually register the pci bus (there should
> be some noise in the kernel log when it registers the pci bus)? Or
> does it return an error -ENODEV?
>
> This is what it looks like on a Archer C7: (Has a QCA9880)
> [0.129096] ar724x-pci ar724x-pci.0: PCIe link is down
> [0.133988] registering PCI controller with io_map_base unset
> [0.139678] registering PCI controller with io_map_base unset
> [0.586626] PCI host bridge to bus :00
> [0.590553] pci_bus :00: root bus resource [mem 0x1000-0x11ff]
> [0.597148] pci_bus :00: root bus resource [io  0x]
> [0.602534] pci_bus :00: root bus resource [??? 0x flags 0x0]
> ...
>
> I looked at ath79_register_pci, it is located in /arch/mips/ath79/pci.c.
> On the first look, it doesn't look like your SoC is present there.
> However soc_is_qca953x is just testing soc_is_qca9533. Can you verify
> that this is indeed correct and the function actually calls
> ath79_register_pci_ar724x?
>
>> What is the normal way for initializing a platform with multiple
>> radio's? Of course I don't know the exact wiring with this board, but
>> I believe the QCA988X 802.11ac radio is on a PCI bus of some sort. I'm
>> not entirely sure, but every example I have seen it appears to be.
> Hm, I don't know much about your device. If it's a proper QCA988X mini-pcie
> radio and has the calibration data on a chip on its minipcie board, then
> you don't need to setup anything else. Having select kmod-ath10k
> (which AFAIK includes the firmware as well) is enough.
>
> But if the calibration data for ath10k is part of the routerboard's caldata
> partition, you need to extracted by the userspace. This is currently done
> by a script:
> target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
>
> So you will need to add your device there with the right extraction
> code.
>
> Regards,
> Christian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel