Re: [PATCH v2] vxlan: allow for dynamic source ip selection
On 11/24/20 4:26 AM, Johannes Kimmel wrote: > By setting 'auto', the zero address or the empty string as source > address (option ipaddr, option ip6addr), vxlan will choose one > dynamically. This helps in setups where a wan ip or prefix changes. > > This corresponse to setting up an vxlan tunnel with: > > proto vxlan6: > # ip link add vx0 type vxlan id ID local :: ... > proto vxlan: > # ip link add vx0 type vxlan id ID local 0.0.0.0 ... > > While it is possible to not specify a source ip at all, the kernel will > default to setting up a ipv4 tunnel. The kernel will take any hint from > source and peer ips to figure out, what tunnel type to use. To make sure > we setup an ipv6 tunnel for proto vxlan6, this workaround is needed. > > Specifying 'inherit' as source ip, the old behaviour is used whereby > a source ip is calculated once from the tunlink interface. Do we still need the 'inherit' config, or is the new auto behaviour strictly better? > > This will not change the behaviour of currently working configurations. > However this will allow former broken configurations, namely those not > specifying both a source address and tunnel interface, to setup a > tunnel interface. Previously those configurations weren't reporting an > error and were stueck in a setup loop like in Bug FS#3426. > > This change lifts the currently very strict behaviour and should fix the > following bug: > > Fixes: FS#3426 > Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3426 > > V2: > - bump PKG_RELEASE > - add small explaination about behaviour changes > > Signed-off-by: Johannes Kimmel > --- > package/network/config/vxlan/Makefile | 2 +- > package/network/config/vxlan/files/vxlan.sh | 55 - > 2 files changed, 34 insertions(+), 23 deletions(-) > > diff --git a/package/network/config/vxlan/Makefile > b/package/network/config/vxlan/Makefile > index 0b4d6713f9..97972d6d85 100644 > --- a/package/network/config/vxlan/Makefile > +++ b/package/network/config/vxlan/Makefile > @@ -1,7 +1,7 @@ > include $(TOPDIR)/rules.mk > > PKG_NAME:=vxlan > -PKG_RELEASE:=6 > +PKG_RELEASE:=7 > PKG_LICENSE:=GPL-2.0 > > include $(INCLUDE_DIR)/package.mk > diff --git a/package/network/config/vxlan/files/vxlan.sh > b/package/network/config/vxlan/files/vxlan.sh > index 5c1c484c47..579964b385 100755 > --- a/package/network/config/vxlan/files/vxlan.sh > +++ b/package/network/config/vxlan/files/vxlan.sh > @@ -114,18 +114,23 @@ proto_vxlan_setup() { > > ( proto_add_host_dependency "$cfg" '' "$tunlink" ) > > - [ -z "$ipaddr" ] && { > - local wanif="$tunlink" > - if [ -z "$wanif" ] && ! network_find_wan wanif; then > - proto_notify_error "$cfg" "NO_WAN_LINK" > - exit > - fi > + case "$ipaddr" in > + "inherit") > + local wanif="$tunlink" > + if [ -z "$wanif" ] && ! network_find_wan wanif; then > + proto_notify_error "$cfg" "NO_WAN_LINK" > + exit > + fi > > - if ! network_get_ipaddr ipaddr "$wanif"; then > - proto_notify_error "$cfg" "NO_WAN_LINK" > - exit > - fi > - } > + if ! network_get_ipaddr ipaddr "$wanif"; then > + proto_notify_error "$cfg" "NO_WAN_LINK" > + exit > + fi > + ;; > + "auto"|"") > + ipaddr="0.0.0.0" > + ;; > + esac > > vxlan_generic_setup "$cfg" 'vxlan' "$ipaddr" "$peeraddr" > } > @@ -138,18 +143,24 @@ proto_vxlan6_setup() { > > ( proto_add_host_dependency "$cfg" '' "$tunlink" ) > > - [ -z "$ip6addr" ] && { > - local wanif="$tunlink" > - if [ -z "$wanif" ] && ! network_find_wan6 wanif; then > - proto_notify_error "$cfg" "NO_WAN_LINK" > - exit > - fi > + case "$ip6addr" in > + "inherit") > + local wanif="$tunlink" > + if [ -z "$wanif" ] && ! network_find_wan6 wanif; then > + proto_notify_error "$cfg" "NO_WAN_LINK" > + exit > + fi > > - if ! network_get_ipaddr6 ip6addr "$wanif"; then > - proto_notify_error "$cfg" "NO_WAN_LINK" > - exit > - fi > - } > + if ! network_get_ipaddr6 ip6addr "$wanif"; then > + proto_notify_error "$cfg" "NO_WAN_LINK" > + exit > + fi > + ;; > + "auto"|"") > + # ensure tunnel via ipv6 > + ip6addr="::" > + ;; > +
Re: [PATCH 1/2] mac80211: convert UniFi Outdoor+ HSR support to OF
On 1/23/21 1:58 AM, David Bauer wrote: Enable support for the Ubiquiti UniFi Outdoor+ RF filter via device-tree. The old way of using platform data is not required anymore, as it was only used on the now removed ar71xx target. Signed-off-by: David Bauer --- .../ath/551-ath9k_ubnt_uap_plus_hsr.patch | 35 ++- .../files/include/linux/ath9k_platform.h | 2 -- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch index 4454baeef1..24cffb0e0e 100644 --- a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch @@ -1,27 +1,26 @@ --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c -@@ -15,6 +15,8 @@ +@@ -15,6 +15,7 @@ */ #include "ath9k.h" -+#include +#include "hsr.h" /* Set/change channels. If the channel is really being changed, it's done * by reseting the chip. To accomplish this we must first cleanup any pending -@@ -22,6 +24,7 @@ +@@ -22,6 +23,7 @@ */ static int ath_set_channel(struct ath_softc *sc) { -+ struct ath9k_platform_data *pdata = sc->dev->platform_data; ++ struct device_node *np = sc->dev->of_node; struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ieee80211_hw *hw = sc->hw; -@@ -42,6 +45,11 @@ static int ath_set_channel(struct ath_so +@@ -42,6 +44,11 @@ static int ath_set_channel(struct ath_so ath_dbg(common, CONFIG, "Set channel: %d MHz width: %d\n", chan->center_freq, chandef->width); -+ if (pdata && pdata->ubnt_hsr) { ++ if (of_property_read_bool(np, "ath9k,ubnt-hsr")) { The vendor prefix should be "ubnt", not "ath9k" (see Documentation/devicetree/bindings/vendor-prefixes.yaml for the official list.) + ath9k_hsr_enable(ah, chandef->width, chan->center_freq); + ath9k_hsr_status(ah); + } @@ -332,30 +331,27 @@ +#endif /* HSR_H */ --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -16,8 +16,10 @@ - [...] OpenPGP_signature Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[PATCH opkg] libopkg: pkg_hash: prefer original packages to satisfy dependencies
When one package "provides" another non-virtual package, prefer to use the original package instead of the providing package. Example: Consider packages "foo" and "bar", where "foo" provides "bar". The current code will sort all candidates by name and use the last entry by default, so "foo" would be used to satisfy a dependency on "bar". Change the logic to prefer the actual package "bar" in this case. Signed-off-by: Matthias Schiffer --- libopkg/pkg_hash.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index dbed3febfbbe..a07a25ec1e0b 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -284,6 +284,7 @@ pkg_t *pkg_hash_fetch_best_installation_candidate(abstract_pkg_t * apkg, int nmatching = 0; int wrong_arch_found = 0; int arch_priority; + int good_pkg_score = 0; pkg_vec_t *matching_pkgs; abstract_pkg_vec_t *matching_apkgs; abstract_pkg_vec_t *provided_apkg_vec; @@ -409,9 +410,18 @@ pkg_t *pkg_hash_fetch_best_installation_candidate(abstract_pkg_t * apkg, for (i = 0; i < matching_pkgs->len; i++) { pkg_t *matching = matching_pkgs->pkgs[i]; if (constraint_fcn(matching, cdata)) { - opkg_msg(DEBUG, "Candidate: %s %s.\n", -matching->name, pkg_get_string(matching, PKG_VERSION)); + int score = 1; + if (strcmp(matching->name, apkg->name) == 0) + score++; + + opkg_msg(DEBUG, "Candidate: %s %s (score %d).\n", +matching->name, pkg_get_string(matching, PKG_VERSION), +score); + if (score < good_pkg_score) + continue; + good_pkg_by_name = matching; + good_pkg_score = score; /* It has been provided by hand, so it is what user want */ if (matching->provided_by_hand == 1) break; -- 2.30.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [PATCH opkg] libopkg: pkg_hash: prefer original packages to satisfy dependencies
On 3/13/21 3:52 AM, Daniel Golle wrote: On Sat, Mar 13, 2021 at 02:00:40AM +0100, Matthias Schiffer wrote: When one package "provides" another non-virtual package, prefer to use the original package instead of the providing package. Example: Consider packages "foo" and "bar", where "foo" provides "bar". The current code will sort all candidates by name and use the last entry by default, so "foo" would be used to satisfy a dependency on "bar". Change the logic to prefer the actual package "bar" in this case. Reviewed-by: Daniel Golle Signed-off-by: Matthias Schiffer --- libopkg/pkg_hash.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index dbed3febfbbe..a07a25ec1e0b 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -284,6 +284,7 @@ pkg_t *pkg_hash_fetch_best_installation_candidate(abstract_pkg_t * apkg, int nmatching = 0; int wrong_arch_found = 0; int arch_priority; + int good_pkg_score = 0; pkg_vec_t *matching_pkgs; abstract_pkg_vec_t *matching_apkgs; abstract_pkg_vec_t *provided_apkg_vec; @@ -409,9 +410,18 @@ pkg_t *pkg_hash_fetch_best_installation_candidate(abstract_pkg_t * apkg, for (i = 0; i < matching_pkgs->len; i++) { pkg_t *matching = matching_pkgs->pkgs[i]; if (constraint_fcn(matching, cdata)) { - opkg_msg(DEBUG, "Candidate: %s %s.\n", -matching->name, pkg_get_string(matching, PKG_VERSION)); + int score = 1; + if (strcmp(matching->name, apkg->name) == 0) + score++; ++score; As you are not using the return value, no need for post-increment. The compiler should be able to recognize and optmize that away by now though, so probably it doesn't matter. The difference is only meaningful in C++, where preincrement and postincrement may use different operator overloads. In C, I prefer the postincrement when I don't need the result, simply for aesthetic reasons ;) + + opkg_msg(DEBUG, "Candidate: %s %s (score %d).\n", +matching->name, pkg_get_string(matching, PKG_VERSION), +score); + if (score < good_pkg_score) + continue; + good_pkg_by_name = matching; + good_pkg_score = score; /* It has been provided by hand, so it is what user want */ if (matching->provided_by_hand == 1) break; -- 2.30.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel OpenPGP_signature Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ar71xx: use Image/BuildLoaderPatched for TPLINK-SAFELOADER images
Building the loader in Image/Build/TPLINK-SAFELOADER would break the image builder as no target compiler is available in that stage. Fixes #19580 Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/image/Makefile | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 06e2c0d..8db278d 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1078,14 +1078,10 @@ define Image/Build/TPLINK-LZMA/initramfs endef -Image/Build/TPLINK-SAFELOADER/buildkernel=$(call PatchKernelLzma,$(2),$(3) $(4)) +Image/Build/TPLINK-SAFELOADER/loader = $(call Image/BuildLoaderPatched,$(1),elf,$(2) $(3)) define Image/Build/TPLINK-SAFELOADER - -rm -rf $(KDIR)/lzma-loader - $(LOADER_MAKE) LOADER=loader-$(2).elf\ - LZMA_TEXT_START=0x80a0 LOADADDR=0x8006 \ - LOADER_DATA="$(KDIR_TMP)/vmlinux-$(2).bin.lzma" BOARD="$(2)" \ - compile loader.elf + [ -e "$(KDIR)/loader-$(2).elf" ] -$(STAGING_DIR_HOST)/bin/tplink-safeloader \ -B $(5) \ -- 2.3.7 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] ar71xx: add Image/BuildLoaderPatched macro
In contrast to Image/BuildLoader, Image/BuildLoaderPatched first patches the kernel command line in the image and then builds the loader without command line. This allows building loaders for systems which don't boot correctly when the kernel command line is provided by the loader (like the TP-LINK CPE series). Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/image/Makefile | 22 ++ 1 file changed, 22 insertions(+) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index e4f6c71..06e2c0d 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -428,6 +428,28 @@ define Image/BuildLoader endef # +# Embed patched lzma-compressed kernel inside lzma-loader. +# +# Specifying the command line via the lzma-loader doesn't work with some +# models (like the TP-LINK CPE series), so this version first patches the +# command line in the image and then builds the loader around it. +# +# $(1), suffix of output filename, e.g. generic, lowercase board name, etc. +# $(2), suffix of target file to build, e.g. bin, gz, elf +# $(3), kernel command line to pass from lzma-loader to kernel +# $(4), unused here +# $(5), suffix of kernel filename, e.g. -initramfs, or empty +define Image/BuildLoaderPatched + $(call PatchKernelLzma,$(1),$(3)) + -rm -rf $(KDIR)/lzma-loader + $(LOADER_MAKE) LOADER=loader-$(1).$(2) \ + LZMA_TEXT_START=0x80a0 LOADADDR=0x8006 \ + LOADER_DATA="$(KDIR_TMP)/vmlinux-$(1)$(5).bin.lzma" BOARD="$(1)" \ + compile loader.$(2) + -$(CP) $(KDIR)/loader-$(1).$(2) $(KDIR)/loader-$(1)$(5).$(2) +endef + +# # Build lzma-loader alone which will search for lzma-compressed kernel identified by # uImage header with magic "OKLI" at boot time. # -- 2.3.7 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/3] mpc85xx: replace WDR4900 uci-defaults ethernet MAC address hack with DTS entry
This also changes the MAC address to one of the adresses actually used by the stock firmware on one of the ethernet interfaces. Signed-off-by: Matthias Schiffer --- target/linux/mpc85xx/base-files/etc/uci-defaults/02_network| 2 -- target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network index e4e3566..525a552 100644 --- a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network @@ -20,8 +20,6 @@ tl-wdr4900-v1) ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5" ucidef_add_switch_vlan "switch0" "2" "0t 1" - ucidef_set_interface_macaddr lan "$(mtd_get_mac_binary config 338)" - ucidef_set_interface_macaddr wan "$(mtd_get_mac_binary config 344)" ;; *) ucidef_set_interfaces_lan_wan "eth0" "eth1" diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts index 49e516c..7e48e23 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts @@ -63,7 +63,7 @@ label = "rootfs"; }; - config@fe { + config: config@fe { reg = <0x00fe 0x0001>; label = "config"; read-only; @@ -118,6 +118,7 @@ enet0: ethernet@b { phy-handle = <&phy0>; phy-connection-type = "rgmii-id"; + mtd-mac-address = <&config 0x14c>; }; enet1: ethernet@b1000 { -- 2.3.7 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] mpc85xx: gianfar: add mtd-mac-address support
Signed-off-by: Matthias Schiffer --- .../101-NET-add-of_get_mac_address_mtd.patch | 76 ++ .../102-net-gianfar-use-mtd-mac-address.patch | 19 ++ 2 files changed, 95 insertions(+) create mode 100644 target/linux/mpc85xx/patches-3.18/101-NET-add-of_get_mac_address_mtd.patch create mode 100644 target/linux/mpc85xx/patches-3.18/102-net-gianfar-use-mtd-mac-address.patch diff --git a/target/linux/mpc85xx/patches-3.18/101-NET-add-of_get_mac_address_mtd.patch b/target/linux/mpc85xx/patches-3.18/101-NET-add-of_get_mac_address_mtd.patch new file mode 100644 index 000..4d05dd6 --- /dev/null +++ b/target/linux/mpc85xx/patches-3.18/101-NET-add-of_get_mac_address_mtd.patch @@ -0,0 +1,76 @@ +From 92f38460229a8816404408f036f0a374f1013d0e Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Sun, 27 Jul 2014 09:40:01 +0100 +Subject: NET: add of_get_mac_address_mtd() + +Many embedded devices have information such as mac addresses stored inside mtd +devices. This patch allows us to add a property inside a node describing a +network interface. The new property points at a mtd partition with an offset +where the mac address can be found. + +Signed-off-by: John Crispin +--- + drivers/of/of_net.c| 37 + + include/linux/of_net.h |1 + + 2 files changed, 38 insertions(+) + +--- a/drivers/of/of_net.c b/drivers/of/of_net.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + /** + * of_get_phy_mode - Get phy mode for given device_node +@@ -75,3 +76,39 @@ const void *of_get_mac_address(struct de + return NULL; + } + EXPORT_SYMBOL(of_get_mac_address); ++ ++int of_get_mac_address_mtd(struct device_node *np, void *mac) ++{ ++ struct device_node *mtd_np = NULL; ++ size_t retlen; ++ int size, ret; ++ struct mtd_info *mtd; ++ const char *part; ++ const __be32 *list; ++ phandle phandle; ++ ++ list = of_get_property(np, "mtd-mac-address", &size); ++ if (!list || (size != (2 * sizeof(*list ++ return -ENOENT; ++ ++ phandle = be32_to_cpup(list++); ++ if (phandle) ++ mtd_np = of_find_node_by_phandle(phandle); ++ ++ if (!mtd_np) ++ return -ENOENT; ++ ++ part = of_get_property(mtd_np, "label", NULL); ++ if (!part) ++ part = mtd_np->name; ++ ++ mtd = get_mtd_device_nm(part); ++ if (IS_ERR(mtd)) ++ return PTR_ERR(mtd); ++ ++ ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, (u_char *) mac); ++ put_mtd_device(mtd); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(of_get_mac_address_mtd); +--- a/include/linux/of_net.h b/include/linux/of_net.h +@@ -11,6 +11,7 @@ + #include + extern int of_get_phy_mode(struct device_node *np); + extern const void *of_get_mac_address(struct device_node *np); ++extern int of_get_mac_address_mtd(struct device_node *np, void *mac); + #else + static inline int of_get_phy_mode(struct device_node *np) + { diff --git a/target/linux/mpc85xx/patches-3.18/102-net-gianfar-use-mtd-mac-address.patch b/target/linux/mpc85xx/patches-3.18/102-net-gianfar-use-mtd-mac-address.patch new file mode 100644 index 000..1b7abc8 --- /dev/null +++ b/target/linux/mpc85xx/patches-3.18/102-net-gianfar-use-mtd-mac-address.patch @@ -0,0 +1,19 @@ +--- a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c +@@ -858,10 +858,13 @@ static int gfar_of_init(struct platform_ + if (stash_len || stash_idx) + priv->device_flags |= FSL_GIANFAR_DEV_HAS_BUF_STASHING; + +- mac_addr = of_get_mac_address(np); ++ err = of_get_mac_address_mtd(np, dev->dev_addr); ++ if (err) { ++ mac_addr = of_get_mac_address(np); + +- if (mac_addr) +- memcpy(dev->dev_addr, mac_addr, ETH_ALEN); ++ if (mac_addr) ++ memcpy(dev->dev_addr, mac_addr, ETH_ALEN); ++ } + + if (model && !strcasecmp(model, "TSEC")) + priv->device_flags |= FSL_GIANFAR_DEV_HAS_GIGABIT | -- 2.3.7 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/3] mpc85xx: move newly created files from patch files to files directory
This will make these files much more maintainable. Signed-off-by: Matthias Schiffer --- .../files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c | 168 +++ .../files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 212 .../arch/powerpc/platforms/85xx/tl_wdr4900_v1.c| 145 ++ .../140-powerpc-85xx-tl-wdr4900-v1-support.patch | 537 - .../142-add-mpic-timer-clock-frequency.patch | 48 -- 5 files changed, 525 insertions(+), 585 deletions(-) create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts create mode 100644 target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c delete mode 100644 target/linux/mpc85xx/patches-3.18/142-add-mpic-timer-clock-frequency.patch diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c b/target/linux/mpc85xx/files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c new file mode 100644 index 000..17459ef --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c @@ -0,0 +1,168 @@ +/* + * U-Boot compatibility wrapper for the TP-Link TL-WDR4900 v1 board + * + * Copyright (c) 2013 Gabor Juhos + * + * Based on: + * cuboot-85xx.c + * Author: Scott Wood + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * + * simpleboot.c + * Authors: Scott Wood + * Grant Likely + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * Copyright (c) 2008 Secret Lab Technologies Ltd. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include "ops.h" +#include "types.h" +#include "io.h" +#include "stdio.h" +#include + +BSS_STACK(4*1024); + +static unsigned long bus_freq; +static unsigned long int_freq; +static u64 mem_size; +static unsigned char enetaddr[6]; + +static void process_boot_dtb(void *boot_dtb) +{ + const u32 *na, *ns, *reg, *val32; + const char *path; + u64 memsize64; + int node, size, i; + + /* Make sure FDT blob is sane */ + if (fdt_check_header(boot_dtb) != 0) + fatal("Invalid device tree blob\n"); + + /* Find the #address-cells and #size-cells properties */ + node = fdt_path_offset(boot_dtb, "/"); + if (node < 0) + fatal("Cannot find root node\n"); + na = fdt_getprop(boot_dtb, node, "#address-cells", &size); + if (!na || (size != 4)) + fatal("Cannot find #address-cells property"); + + ns = fdt_getprop(boot_dtb, node, "#size-cells", &size); + if (!ns || (size != 4)) + fatal("Cannot find #size-cells property"); + + /* Find the memory range */ + node = fdt_node_offset_by_prop_value(boot_dtb, -1, "device_type", +"memory", sizeof("memory")); + if (node < 0) + fatal("Cannot find memory node\n"); + reg = fdt_getprop(boot_dtb, node, "reg", &size); + if (size < (*na+*ns) * sizeof(u32)) + fatal("cannot get memory range\n"); + + /* Only interested in memory based at 0 */ + for (i = 0; i < *na; i++) + if (*reg++ != 0) + fatal("Memory range is not based at address 0\n"); + + /* get the memsize and trucate it to under 4G on 32 bit machines */ + memsize64 = 0; + for (i = 0; i < *ns; i++) + memsize64 = (memsize64 << 32) | *reg++; + if (sizeof(void *) == 4 && memsize64 >= 0x1ULL) + memsize64 = 0x; + + mem_size = memsize64; + + /* get clock frequencies */ + node = fdt_node_offset_by_prop_value(boot_dtb, -1, "device_type", +"cpu", sizeof("cpu")); + if (!node) + fatal("Cannot find cpu node\n"); + + val32 = fdt_getprop(boot_dtb, node, "clock-frequency", &size); + if (!val32 || (size != 4)) + fatal("Cannot get clock frequency"); + + int_freq = *val32; + + val32 = fdt_getprop(boot_dtb, node, "bus-frequency", &size); + if (!val32 || (size != 4)) + fatal("Cannot get bus frequency"); + + bus_freq = *val32; + + path = fdt_get_alias(boot_dtb, "ethernet0"); + if (path) { + const void *p; + + node = fdt_path_offset(boot_dtb, path); + if (node < 0) + fatal("Cannot find ethernet0 node"
Re: [OpenWrt-Devel] [PATCH 2/3] mpc85xx: gianfar: add mtd-mac-address support
On 04/30/2015 11:59 AM, Jonas Gorski wrote: > Hi, > > On Thu, Apr 30, 2015 at 4:00 AM, Matthias Schiffer > wrote: >> Signed-off-by: Matthias Schiffer >> --- >> .../101-NET-add-of_get_mac_address_mtd.patch | 76 >> ++ >> .../102-net-gianfar-use-mtd-mac-address.patch | 19 ++ >> 2 files changed, 95 insertions(+) >> create mode 100644 >> target/linux/mpc85xx/patches-3.18/101-NET-add-of_get_mac_address_mtd.patch > > Just move this patch to generic-*/ instead of creating a copy of it. > > > Regards > Jonas > Makes sense, I'll send a v2. Regards, Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 1/4] generic: move of_get_mac_address_mtd() patches to generic
The ability to read MAC addresses from MTD is useful for other targets besides ramips and lantiq as well. Signed-off-by: Matthias Schiffer --- .../681-NET-add-of_get_mac_address_mtd.patch | 75 + .../681-NET-add-of_get_mac_address_mtd.patch | 75 + .../0027-NET-add-of_get_mac_address_mtd.patch | 76 -- .../0034-NET-add-of_get_mac_address_mtd.patch | 76 -- 4 files changed, 150 insertions(+), 152 deletions(-) create mode 100644 target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch create mode 100644 target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch delete mode 100644 target/linux/lantiq/patches-3.18/0027-NET-add-of_get_mac_address_mtd.patch delete mode 100644 target/linux/ramips/patches-3.18/0034-NET-add-of_get_mac_address_mtd.patch diff --git a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch new file mode 100644 index 000..bb3bf98 --- /dev/null +++ b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch @@ -0,0 +1,75 @@ +From: John Crispin +Date: Sun, 27 Jul 2014 09:40:01 +0100 +Subject: NET: add of_get_mac_address_mtd() + +Many embedded devices have information such as mac addresses stored inside mtd +devices. This patch allows us to add a property inside a node describing a +network interface. The new property points at a mtd partition with an offset +where the mac address can be found. + +Signed-off-by: John Crispin +--- + drivers/of/of_net.c| 37 + + include/linux/of_net.h |1 + + 2 files changed, 38 insertions(+) + +--- a/drivers/of/of_net.c b/drivers/of/of_net.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + /** + * of_get_phy_mode - Get phy mode for given device_node +@@ -75,3 +76,39 @@ const void *of_get_mac_address(struct de + return NULL; + } + EXPORT_SYMBOL(of_get_mac_address); ++ ++int of_get_mac_address_mtd(struct device_node *np, void *mac) ++{ ++ struct device_node *mtd_np = NULL; ++ size_t retlen; ++ int size, ret; ++ struct mtd_info *mtd; ++ const char *part; ++ const __be32 *list; ++ phandle phandle; ++ ++ list = of_get_property(np, "mtd-mac-address", &size); ++ if (!list || (size != (2 * sizeof(*list ++ return -ENOENT; ++ ++ phandle = be32_to_cpup(list++); ++ if (phandle) ++ mtd_np = of_find_node_by_phandle(phandle); ++ ++ if (!mtd_np) ++ return -ENOENT; ++ ++ part = of_get_property(mtd_np, "label", NULL); ++ if (!part) ++ part = mtd_np->name; ++ ++ mtd = get_mtd_device_nm(part); ++ if (IS_ERR(mtd)) ++ return PTR_ERR(mtd); ++ ++ ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, (u_char *) mac); ++ put_mtd_device(mtd); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(of_get_mac_address_mtd); +--- a/include/linux/of_net.h b/include/linux/of_net.h +@@ -11,6 +11,7 @@ + #include + extern int of_get_phy_mode(struct device_node *np); + extern const void *of_get_mac_address(struct device_node *np); ++extern int of_get_mac_address_mtd(struct device_node *np, void *mac); + #else + static inline int of_get_phy_mode(struct device_node *np) + { diff --git a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch new file mode 100644 index 000..bb3bf98 --- /dev/null +++ b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch @@ -0,0 +1,75 @@ +From: John Crispin +Date: Sun, 27 Jul 2014 09:40:01 +0100 +Subject: NET: add of_get_mac_address_mtd() + +Many embedded devices have information such as mac addresses stored inside mtd +devices. This patch allows us to add a property inside a node describing a +network interface. The new property points at a mtd partition with an offset +where the mac address can be found. + +Signed-off-by: John Crispin +--- + drivers/of/of_net.c| 37 + + include/linux/of_net.h |1 + + 2 files changed, 38 insertions(+) + +--- a/drivers/of/of_net.c b/drivers/of/of_net.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + /** + * of_get_phy_mode - Get phy mode for given device_node +@@ -75,3 +76,39 @@ const void *of_get_mac_address(struct de + return NULL; + } + EXPORT_SYMBOL(of_get_mac_address); ++ ++int of_get_mac_address_mtd(struct device_node *np, void *mac) ++{ ++ struct device_node *mtd_np = NULL; ++ size_t retlen; ++ int size, ret; ++ struct mtd_info *mtd; ++ const char *part; ++ const __be32 *list; ++ phandle phandle; ++ ++ list = of_get_property(np, "mtd-mac-address",
[OpenWrt-Devel] [PATCH v2 3/4] mpc85xx: gianfar: add mtd-mac-address support
Signed-off-by: Matthias Schiffer --- .../101-net-gianfar-use-mtd-mac-address.patch | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch diff --git a/target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch b/target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch new file mode 100644 index 000..1b7abc8 --- /dev/null +++ b/target/linux/mpc85xx/patches-3.18/101-net-gianfar-use-mtd-mac-address.patch @@ -0,0 +1,19 @@ +--- a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c +@@ -858,10 +858,13 @@ static int gfar_of_init(struct platform_ + if (stash_len || stash_idx) + priv->device_flags |= FSL_GIANFAR_DEV_HAS_BUF_STASHING; + +- mac_addr = of_get_mac_address(np); ++ err = of_get_mac_address_mtd(np, dev->dev_addr); ++ if (err) { ++ mac_addr = of_get_mac_address(np); + +- if (mac_addr) +- memcpy(dev->dev_addr, mac_addr, ETH_ALEN); ++ if (mac_addr) ++ memcpy(dev->dev_addr, mac_addr, ETH_ALEN); ++ } + + if (model && !strcasecmp(model, "TSEC")) + priv->device_flags |= FSL_GIANFAR_DEV_HAS_GIGABIT | -- 2.3.7 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 2/4] mpc85xx: move newly created files from patch files to files directory
This will make these files much more maintainable. Signed-off-by: Matthias Schiffer --- .../files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c | 168 +++ .../files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 212 .../arch/powerpc/platforms/85xx/tl_wdr4900_v1.c| 145 ++ .../140-powerpc-85xx-tl-wdr4900-v1-support.patch | 537 - .../142-add-mpic-timer-clock-frequency.patch | 48 -- 5 files changed, 525 insertions(+), 585 deletions(-) create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts create mode 100644 target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/tl_wdr4900_v1.c delete mode 100644 target/linux/mpc85xx/patches-3.18/142-add-mpic-timer-clock-frequency.patch diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c b/target/linux/mpc85xx/files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c new file mode 100644 index 000..17459ef --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/cuboot-tl-wdr4900-v1.c @@ -0,0 +1,168 @@ +/* + * U-Boot compatibility wrapper for the TP-Link TL-WDR4900 v1 board + * + * Copyright (c) 2013 Gabor Juhos + * + * Based on: + * cuboot-85xx.c + * Author: Scott Wood + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * + * simpleboot.c + * Authors: Scott Wood + * Grant Likely + * Copyright (c) 2007 Freescale Semiconductor, Inc. + * Copyright (c) 2008 Secret Lab Technologies Ltd. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include "ops.h" +#include "types.h" +#include "io.h" +#include "stdio.h" +#include + +BSS_STACK(4*1024); + +static unsigned long bus_freq; +static unsigned long int_freq; +static u64 mem_size; +static unsigned char enetaddr[6]; + +static void process_boot_dtb(void *boot_dtb) +{ + const u32 *na, *ns, *reg, *val32; + const char *path; + u64 memsize64; + int node, size, i; + + /* Make sure FDT blob is sane */ + if (fdt_check_header(boot_dtb) != 0) + fatal("Invalid device tree blob\n"); + + /* Find the #address-cells and #size-cells properties */ + node = fdt_path_offset(boot_dtb, "/"); + if (node < 0) + fatal("Cannot find root node\n"); + na = fdt_getprop(boot_dtb, node, "#address-cells", &size); + if (!na || (size != 4)) + fatal("Cannot find #address-cells property"); + + ns = fdt_getprop(boot_dtb, node, "#size-cells", &size); + if (!ns || (size != 4)) + fatal("Cannot find #size-cells property"); + + /* Find the memory range */ + node = fdt_node_offset_by_prop_value(boot_dtb, -1, "device_type", +"memory", sizeof("memory")); + if (node < 0) + fatal("Cannot find memory node\n"); + reg = fdt_getprop(boot_dtb, node, "reg", &size); + if (size < (*na+*ns) * sizeof(u32)) + fatal("cannot get memory range\n"); + + /* Only interested in memory based at 0 */ + for (i = 0; i < *na; i++) + if (*reg++ != 0) + fatal("Memory range is not based at address 0\n"); + + /* get the memsize and trucate it to under 4G on 32 bit machines */ + memsize64 = 0; + for (i = 0; i < *ns; i++) + memsize64 = (memsize64 << 32) | *reg++; + if (sizeof(void *) == 4 && memsize64 >= 0x1ULL) + memsize64 = 0x; + + mem_size = memsize64; + + /* get clock frequencies */ + node = fdt_node_offset_by_prop_value(boot_dtb, -1, "device_type", +"cpu", sizeof("cpu")); + if (!node) + fatal("Cannot find cpu node\n"); + + val32 = fdt_getprop(boot_dtb, node, "clock-frequency", &size); + if (!val32 || (size != 4)) + fatal("Cannot get clock frequency"); + + int_freq = *val32; + + val32 = fdt_getprop(boot_dtb, node, "bus-frequency", &size); + if (!val32 || (size != 4)) + fatal("Cannot get bus frequency"); + + bus_freq = *val32; + + path = fdt_get_alias(boot_dtb, "ethernet0"); + if (path) { + const void *p; + + node = fdt_path_offset(boot_dtb, path); + if (node < 0) + fatal("Cannot find ethernet0 node"
[OpenWrt-Devel] [PATCH v2 4/4] mpc85xx: replace WDR4900 uci-defaults ethernet MAC address hack with DTS entry
This also changes the MAC address to one of the adresses actually used by the stock firmware on one of the ethernet interfaces. Signed-off-by: Matthias Schiffer --- target/linux/mpc85xx/base-files/etc/uci-defaults/02_network| 2 -- target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network index e4e3566..525a552 100644 --- a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network @@ -20,8 +20,6 @@ tl-wdr4900-v1) ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5" ucidef_add_switch_vlan "switch0" "2" "0t 1" - ucidef_set_interface_macaddr lan "$(mtd_get_mac_binary config 338)" - ucidef_set_interface_macaddr wan "$(mtd_get_mac_binary config 344)" ;; *) ucidef_set_interfaces_lan_wan "eth0" "eth1" diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts index 49e516c..7e48e23 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts @@ -63,7 +63,7 @@ label = "rootfs"; }; - config@fe { + config: config@fe { reg = <0x00fe 0x0001>; label = "config"; read-only; @@ -118,6 +118,7 @@ enet0: ethernet@b { phy-handle = <&phy0>; phy-connection-type = "rgmii-id"; + mtd-mac-address = <&config 0x14c>; }; enet1: ethernet@b1000 { -- 2.3.7 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: add support for the UniFi AP Outdoor Plus
On 03/21/2015 10:16 AM, Stefan Rompf wrote: > Hi Sergey, > >> You should be a wizard to reveal hw protocol without touching hw :) > > I cannot say 'Mischief managed!' by now, but it's slowly making progress ;-) > >> Unlikely that iwconfig changes something directly, I would bet on the >> driver. > > Indeed. So far > > -The RF filter is controlled by the GPIO pins on the AR928x wifi chip via > some > kind of serial protocol. > -The functions responsible for the filter are ath_hal_hsr_init(), called once > on initialisation, ath_hal_hsr_disable() and ath_hal_hsr_enable() on channel > change. There is an ath_hal_hsr_get_lock_status() that does not seem to be > used. > -There seems to be no filter tuning after it has been setup on channel change. > > Reverse engineering this unreadable MIPS assembly mess will take some time... > anyone willing to help? Does it make sense to open a ticket to track the > issue > or is this mailing list ok? > > Stefan Any news here? I know a lot of people who are eager to run OpenWrt on their UAP Outdoor+ ... If you don't have time to do further work on this, I'd be glad to continue where you left off. Have you found out anything substantial that might help? Regards, Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] ar71xx: use Image/BuildLoaderPatched for TPLINK-SAFELOADER images
Ping? On 04/29/2015 11:38 PM, Matthias Schiffer wrote: > Building the loader in Image/Build/TPLINK-SAFELOADER would break the image > builder as no target compiler is available in that stage. > > Fixes #19580 > > Signed-off-by: Matthias Schiffer > --- > target/linux/ar71xx/image/Makefile | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/target/linux/ar71xx/image/Makefile > b/target/linux/ar71xx/image/Makefile > index 06e2c0d..8db278d 100644 > --- a/target/linux/ar71xx/image/Makefile > +++ b/target/linux/ar71xx/image/Makefile > @@ -1078,14 +1078,10 @@ define Image/Build/TPLINK-LZMA/initramfs > endef > > > -Image/Build/TPLINK-SAFELOADER/buildkernel=$(call PatchKernelLzma,$(2),$(3) > $(4)) > +Image/Build/TPLINK-SAFELOADER/loader = $(call > Image/BuildLoaderPatched,$(1),elf,$(2) $(3)) > > define Image/Build/TPLINK-SAFELOADER > - -rm -rf $(KDIR)/lzma-loader > - $(LOADER_MAKE) LOADER=loader-$(2).elf\ > - LZMA_TEXT_START=0x80a0 LOADADDR=0x8006 \ > - LOADER_DATA="$(KDIR_TMP)/vmlinux-$(2).bin.lzma" BOARD="$(2)" \ > - compile loader.elf > + [ -e "$(KDIR)/loader-$(2).elf" ] > > -$(STAGING_DIR_HOST)/bin/tplink-safeloader \ > -B $(5) \ > signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ar71xx: fix AR71XX_MODEL for TP-Link TL-WA830RE v1
The v1 identifies as v10 internally. As there is no TL-WA830RE v10, add a workaround to avoid confusing users. Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/base-files/lib/ar71xx.sh | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index d5dd561..b13be1e 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -151,6 +151,10 @@ tplink_board_detect() { ;; "083000"*) model="TP-Link TL-WA830RE" + + if [ "$hwver" = 'v10' ]; then + hwver='v1' + fi ;; "084100"*) model="TP-Link TL-WR841N/ND" -- 2.4.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files: add /etc/profile.d support
On 06/10/2015 02:01 PM, Bastian Bittorf wrote: > * thomas.lan...@lantiq.com [10.06.2015 13:59]: >> I think this will not work, as /etc/profile (and these additional files) is >> expected to be executed in the current shell context. >> Otherwise adding shell variables or extending $PATH will not work. So you >> cannot execute them in a subshell. > > ok, then please: > [ -e "$FILE" ] && sh -n "$FILE" && . "$FILE" > >> Maybe it is possible to skip this for FAILSAFE mode? If there are errors, >> they can be corrected in this way. > > this is a good point: > > [ -z "$FAILSAFE" ] && { > ...yourlogic... > } > > bye, bastian Why should errors in these files cause login issues? This is shell and there's no -e, problematic lines will print an error and be skipped. Hendrik's patch adds exactly the lines used by Debian. On Arch Linux, it looks very similar. The only way to break login using profile snippets is causing the shell to exit explicitly (using `exit` or something like that), but there's no sane way to protect against that... Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files: add /etc/profile.d support
On 06/10/2015 04:27 PM, Hendrik Lüth wrote: > Am 10.06.2015 um 14:31 schrieb Bastian Bittorf: >> * Matthias Schiffer [10.06.2015 14:26]: >>> Why should errors in these files cause login issues? This is shell and >>> there's no -e, problematic lines will print an error and be skipped. >> i have seen a lot of strange things. think about >> flash readerrors or stack corruption or $youridea 8-) >> >> i think we can agree that we will not use a subshell, >> but ignore profile.d in failsafe mode, ok? the 'sh -n' >> thing is just a small 'insurance' - do you think it hurts/is too much? >> >> bye, bastian > > I'd like to see, that the scripts in profile.d are getting called > without the 'sh' because those scripts could be written in Lua, too. > Weather a script needs to get called in failsafe mode or not depends on > the script, so I'd like to not skip it. > > regards, Hendrik That's not at all what profile.d is about. profile.d is for shell snippets that are *sourced* into the login shell, not executed, so they must be shell code. If you want to call Lua scripts, just call Lua from the shell code. I agree that it would make sense to skip profile.d in failsafe mode. signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: add support for tp-link wr740n v5.0 (EU)
On 06/08/2015 05:47 PM, Daniel Petre wrote: > TP-Link ships wr740n v5.0 to Romania (so probably everywhere except > China) with 4 MB flash and 32 MB memory (confirmed by their local > support). This patch adds support for the v5.0 clone of v4, i just > tested it on my own v5.0 router and it works. > > Signed-off-by: Daniel Petre > By the way, the same image also works on the WR741ND v5. TP-LINK decided to use the same HWID 0x0745 for the 741v5 as well, instead of 0x07410005 one might expect. So regarding the software, there isn't any difference between 740 and 741 v5. I think it would make sense to explicitly create images with the name tl-wr741nd-v5 even though they will be identical to the tl-wr740n-v5, so the images get built when the TLWR741 profile is selected. I'll provide a patch to do that (as soon as this one has been applied, to avoid unnecessary conflicts ;) ) Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ar71xx: add support for TL-WR741ND v5
This device is identical to the TL-WR740N v5, it even uses the same HWID (which wasn't the case for older TL-WR741ND revisions). Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/image/Makefile | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 3956927..7dc28b5 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -540,6 +540,14 @@ define Device/tl-wr741nd-v4 CONSOLE := ttyATH0,115200 endef +define Device/tl-wr741nd-v5 +$(Device/tplink-4mlzma) +BOARDNAME := TL-WR741ND-v4 +DEVICE_PROFILE := TLWR741 +TPLINK_HWID := 0x0745 +CONSOLE := ttyATH0,115200 +endef + define Device/tl-wr743nd-v2 $(Device/tplink-4mlzma) BOARDNAME := TL-WR741ND-v4 @@ -547,7 +555,7 @@ define Device/tl-wr743nd-v2 TPLINK_HWID := 0x07430002 CONSOLE := ttyATH0,115200 endef -TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2 +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-wr841n-v8 $(Device/tplink-4mlzma) -- 2.4.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/2] ar71xx: rework patch for qca953x/956x
On 07/02/2015 08:49 AM, miaoq...@qti.qualcomm.com wrote: > From: Miaoqing Pan > > Patch cherry-picked from the following location: > https://www.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?h=release/coconut_ioe4531_2.0&id=5c357bf6c763e4140dddcc9a3bc5f005525a9c0e > > Changelist, > - add more register defines > - add EHCI support > - fix GPIO pin count to 18 > - fix chained irq disabled > - fix GMAC0/GMAC1 initial > - fix WMAC irq number to 47 > - merge the changes of dev-eth.c from the patch to file. > > Signed-off-by: Miaoqing Pan > --- > .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 18 +- > ...07-MIPS-ath79-add-support-for-QCA953x-SoC.patch | 352 > + > ...35-MIPS-ath79-add-support-for-QCA956x-SoC.patch | 183 --- > .../736-MIPS-ath79-fix-chained-irq-disable.patch | 21 +- > 4 files changed, 387 insertions(+), 187 deletions(-) Hi, which OpenWrt tree did you base your patch on? I had some trouble getting it to apply to the current OpenWrt trunk to test it... I've attached a fixed up version that applies cleanly. I've noticed that this patch breaks the ethernet ports on the TP-LINK TL-WR841N v9 (which is based on the QCA9533 ver 1 rev 1). I've fixed it up using the following snippet, the Compex WPJ531 will probably need the same fix (it uses pretty much the same initialization code). --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c @@ -109,12 +109,18 @@ static void __init tl_ap143_setup(void) ath79_register_mdio(0, 0x0); /* LAN */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_switch_data.phy_poll_mask |= BIT(4); ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); ath79_register_eth(1); /* WAN */ ath79_switch_data.phy4_mii_en = 1; ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.phy_mask = BIT(4); ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); ath79_register_eth(0); Do you want to pick up this change and submit it together with an updated version of your patchset, or should I submit it myself? By the way, does the WMAC IRQ number fix have a noticable effect? WLAN was working fine on the TL-WR841N v9 both before and after your patch, so I'm wondering if it would be worth to backport it to my older Barrier-Breaker- and Chaos-Calmer-based branches. Apart from that, thanks for your patch! Matthias From a3f31e9039c21e12b7246f6c705333e418b9075b Mon Sep 17 00:00:00 2001 Message-Id: From: Miaoqing Pan Date: Thu, 2 Jul 2015 14:49:37 +0800 Subject: [PATCH] ar71xx: rework patch for qca953x/956x Patch cherry-picked from the following location: https://www.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?h=release/coconut_ioe4531_2.0&id=5c357bf6c763e4140dddcc9a3bc5f005525a9c0e Changelist, - add more register defines - add EHCI support - fix GPIO pin count to 18 - fix chained irq disabled - fix GMAC0/GMAC1 initial - fix WMAC irq number to 47 - merge the changes of dev-eth.c from the patch to file. Signed-off-by: Miaoqing Pan --- .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 18 +- ...07-MIPS-ath79-add-support-for-QCA953x-SoC.patch | 326 +++-- ...35-MIPS-ath79-add-support-for-QCA956x-SoC.patch | 171 --- .../736-MIPS-ath79-fix-chained-irq-disable.patch | 21 +- 4 files changed, 379 insertions(+), 157 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c index ae3db4c..ff94e2e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -198,6 +198,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask) case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: mdio_dev = &ath79_mdio1_device; mdio_data = &ath79_mdio1_data; break; @@ -256,6 +258,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask) break; case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: mdio_data->builtin_switch = 1; break; @@ -571,6 +575,8 @@ static void __init ath79_init_eth_pll_data(unsigned int id) case ATH79_SOC_QCA9533: case ATH79_SOC_QCA9556: case ATH79_SOC_QCA9558: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pll_10 = AR934X_PLL_VAL_10; pll_100 = AR934X_PLL_VAL_100; pll_1000 = AR934X_PLL_VAL_1000; @@ -627,6 +633,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->phy_if_mod
Re: [OpenWrt-Devel] [PATCH 1/2] ar71xx: rework patch for qca953x/956x
On 07/04/2015 10:32 PM, Christian Mehlis wrote: > Am 02.07.2015 um 23:10 schrieb Matthias Schiffer: >> I've fixed it >> up using the following snippet, the Compex WPJ531 will probably need the >> same fix (it uses pretty much the same initialization code). > > Thanks Matthias, > > When submitting the fix for the WR841Nv9 please also include the fix for > the wpj531. > > I'll test and verify! > > Best > Christian Hi, could you send me the output of `swconfig dev eth1 show` (or eth0?) on OpenWrt? The current initialization code looks a bit weird as it's the same one would use for a device with 4 LAN ports, even though the WPJ531 has only one. Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 1/3] ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link TL-WR841N/ND v9, Compex WPJ531)
The initialization routines for these boards were relying on some (wrong) defaults for the QCA953x ethernet. Make these defaults explicit to prevent breaking them when the QCA953x defaults are fixed. Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c | 6 ++ target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 7 +++ 2 files changed, 13 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c index c28afc6..3e5c2a2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c @@ -109,12 +109,18 @@ static void __init tl_ap143_setup(void) ath79_register_mdio(0, 0x0); /* LAN */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_switch_data.phy_poll_mask |= BIT(4); ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); ath79_register_eth(1); /* WAN */ ath79_switch_data.phy4_mii_en = 1; ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.phy_mask = BIT(4); ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); ath79_register_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c index bc13d70..e665a2e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c @@ -105,12 +105,19 @@ static void __init common_setup(void) ath79_register_mdio(0, 0x0); /* LAN */ + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.phy_mask = BIT(4); ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0); ath79_register_eth(0); /* WAN */ ath79_switch_data.phy4_mii_en = 1; + ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth1_data.speed = SPEED_100; + ath79_switch_data.phy_poll_mask |= BIT(4); ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1); ath79_register_eth(1); -- 2.4.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 0/3] QCA953x fixes, AP143 support
This patchset was originally submitted by Miaoqing Pan. * 1/3 fixes the initialization on TP-Link TL-WR841N/ND v9 and Compex WPJ531 (TL-WR841N/ND v9 is working, Compex WPJ531 compile-tested only, please test!) * 2/3 is 1/2 from the original submission rebased to apply to the current trunk * 3/3 is 2/2 from the original submission without changes Matthias Schiffer (1): ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link TL-WR841N/ND v9, Compex WPJ531) Miaoqing Pan (2): ar71xx: rework patch for qca953x/956x ar71xx: add support for ap143 .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + target/linux/ar71xx/config-3.18| 1 + .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 18 +- .../ar71xx/files/arch/mips/ath79/mach-ap143.c | 142 + .../files/arch/mips/ath79/mach-tl-wr841n-v9.c | 6 + .../ar71xx/files/arch/mips/ath79/mach-wpj531.c | 7 + target/linux/ar71xx/generic/profiles/atheros.mk| 12 + target/linux/ar71xx/image/Makefile | 5 + ...07-MIPS-ath79-add-support-for-QCA953x-SoC.patch | 326 +++-- ...35-MIPS-ath79-add-support-for-QCA956x-SoC.patch | 171 --- .../736-MIPS-ath79-fix-chained-irq-disable.patch | 21 +- .../810-MIPS-ath79-wmac-enable-set-led-pin.patch | 24 ++ .../811-MIPS-ath79-gpio-enable-set-direction.patch | 43 +++ .../812-MIPS-ath79-add-ap143-support.patch | 43 +++ 15 files changed, 666 insertions(+), 157 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ap143.c create mode 100644 target/linux/ar71xx/patches-3.18/810-MIPS-ath79-wmac-enable-set-led-pin.patch create mode 100644 target/linux/ar71xx/patches-3.18/811-MIPS-ath79-gpio-enable-set-direction.patch create mode 100644 target/linux/ar71xx/patches-3.18/812-MIPS-ath79-add-ap143-support.patch -- 2.4.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 3/3] ar71xx: add support for ap143
From: Miaoqing Pan Signed-off-by: Miaoqing Pan --- .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + target/linux/ar71xx/config-3.18| 1 + .../ar71xx/files/arch/mips/ath79/mach-ap143.c | 142 + target/linux/ar71xx/generic/profiles/atheros.mk| 12 ++ target/linux/ar71xx/image/Makefile | 5 + .../810-MIPS-ath79-wmac-enable-set-led-pin.patch | 24 .../811-MIPS-ath79-gpio-enable-set-direction.patch | 43 +++ .../812-MIPS-ath79-add-ap143-support.patch | 43 +++ 9 files changed, 274 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ap143.c create mode 100644 target/linux/ar71xx/patches-3.18/810-MIPS-ath79-wmac-enable-set-led-pin.patch create mode 100644 target/linux/ar71xx/patches-3.18/811-MIPS-ath79-gpio-enable-set-direction.patch create mode 100644 target/linux/ar71xx/patches-3.18/812-MIPS-ath79-add-ap143-support.patch diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 2fab4c2..6d76af8 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -383,6 +383,7 @@ wpj558) ap121 |\ ap121-mini |\ +ap143 |\ ap96 |\ airrouter |\ dir-600-a1 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 00e39ae..4fee82c 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -359,6 +359,9 @@ ar71xx_board_detect() { *"AP135-020 reference board") name="ap135-020" ;; + *"AP143 reference board") + name="ap143" + ;; *AP81) name="ap81" ;; diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18 index 17f33bd..0af087d 100644 --- a/target/linux/ar71xx/config-3.18 +++ b/target/linux/ar71xx/config-3.18 @@ -35,6 +35,7 @@ CONFIG_ATH79_MACH_AP113=y CONFIG_ATH79_MACH_AP121=y CONFIG_ATH79_MACH_AP132=y CONFIG_ATH79_MACH_AP136=y +CONFIG_ATH79_MACH_AP143=y CONFIG_ATH79_MACH_AP81=y CONFIG_ATH79_MACH_AP83=y CONFIG_ATH79_MACH_AP96=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-ap143.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-ap143.c new file mode 100644 index 000..098420b --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-ap143.c @@ -0,0 +1,142 @@ +/* + * Atheros AP143 reference board support + * + * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012 Gabor Juhos + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include +#include +#include + +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-spi.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define AP143_GPIO_LED_WLAN12 +#define AP143_GPIO_LED_WPS 13 +#define AP143_GPIO_LED_STATUS 13 + +#define AP143_GPIO_LED_WAN 4 +#define AP143_GPIO_LED_LAN116 +#define AP143_GPIO_LED_LAN215 +#define AP143_GPIO_LED_LAN314 +#define AP143_GPIO_LED_LAN411 + +#define AP143_GPIO_BTN_WPS 17 + +#define AP143_KEYS_POLL_INTERVAL 20 /* msecs */ +#define AP143_KEYS_DEBOUNCE_INTERVAL (3 * AP143_KEYS_POLL_INTERVAL) + +#define AP143_MAC0_OFFSET 0 +#define AP143_MAC1_OFFSET 6 +#define AP143_WMAC_CALDATA_OFFSET 0x1000 + +static struct gpio_led ap143_leds_gpio[] __initdata = { + { + .name = "ap143:green:status", + .gpio = AP143_GPIO_LED_STATUS, + .active_low = 1, + }, + { + .name = "ap143:green:wlan", + .gpio = AP143_GPIO_LED_WLAN, + .active_low = 1, + } +}; + +static struct gpio_keys_button ap143_gpio_keys[] __initdata = { + { + .desc = "WPS button", +
[OpenWrt-Devel] [PATCH v2 2/3] ar71xx: rework patch for qca953x/956x
From: Miaoqing Pan Patch cherry-picked from the following location: https://www.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?h=release/coconut_ioe4531_2.0&id=5c357bf6c763e4140dddcc9a3bc5f005525a9c0e Changelist, - add more register defines - add EHCI support - fix GPIO pin count to 18 - fix chained irq disabled - fix GMAC0/GMAC1 initial - fix WMAC irq number to 47 - merge the changes of dev-eth.c from the patch to file. Signed-off-by: Miaoqing Pan Signed-off-by: Matthias Schiffer --- .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 18 +- ...07-MIPS-ath79-add-support-for-QCA953x-SoC.patch | 326 +++-- ...35-MIPS-ath79-add-support-for-QCA956x-SoC.patch | 171 --- .../736-MIPS-ath79-fix-chained-irq-disable.patch | 21 +- 4 files changed, 379 insertions(+), 157 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c index ae3db4c..ff94e2e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -198,6 +198,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask) case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: mdio_dev = &ath79_mdio1_device; mdio_data = &ath79_mdio1_data; break; @@ -256,6 +258,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask) break; case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: mdio_data->builtin_switch = 1; break; @@ -571,6 +575,8 @@ static void __init ath79_init_eth_pll_data(unsigned int id) case ATH79_SOC_QCA9533: case ATH79_SOC_QCA9556: case ATH79_SOC_QCA9558: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pll_10 = AR934X_PLL_VAL_10; pll_100 = AR934X_PLL_VAL_100; pll_1000 = AR934X_PLL_VAL_1000; @@ -627,6 +633,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->phy_if_mode = PHY_INTERFACE_MODE_MII; break; @@ -687,7 +695,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR7241: case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: - case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->phy_if_mode = PHY_INTERFACE_MODE_GMII; break; @@ -697,6 +706,7 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR9341: case ATH79_SOC_AR9342: case ATH79_SOC_AR9344: + case ATH79_SOC_QCA9533: switch (pdata->phy_if_mode) { case PHY_INTERFACE_MODE_MII: case PHY_INTERFACE_MODE_GMII: @@ -986,6 +996,7 @@ void __init ath79_register_eth(unsigned int id) case ATH79_SOC_AR9341: case ATH79_SOC_AR9342: case ATH79_SOC_AR9344: + case ATH79_SOC_QCA9533: if (id == 0) { pdata->reset_bit = AR934X_RESET_GE0_MAC | AR934X_RESET_GE0_MDIO; @@ -1017,7 +1028,8 @@ void __init ath79_register_eth(unsigned int id) pdata->fifo_cfg3 = 0x01f00140; break; - case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: if (id == 0) { pdata->reset_bit = AR933X_RESET_GE0_MAC | AR933X_RESET_GE0_MDIO; @@ -1123,6 +1135,8 @@ void __init ath79_register_eth(unsigned int id) case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->mii_bus_dev = &ath79_mdio1_device.dev; break; diff --git a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch index 4f5d203..be4f547 100644 --- a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch +++ b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch @@ -44,7 +44,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. c
[OpenWrt-Devel] [PATCH] ebtables: fix miscompilation on 64bit targets
The musl build "fix" introduced in r45108 removed all netinet/ether.h includes, which made the prototypes of ether_aton and ether_ntoa unavailable. As a result, the compiler assumed they return int instead of a pointer. This currupted the pointer on 64bit targets, causing ebtables to segfault in commands containing MAC addresses. Since r46161 made it possible to include both the kernel and the libc if_ether.h as long as the libc version is included first, this patch changes the fix to remove the linux/if_ether.h from the ebtables source (so the fixed version from the kernel is used) and ensures netinet/ether.h is included early. Signed-off-by: Matthias Schiffer --- A similar fix is necessary in the 15.05 tree, but as r46161 has not been backported, this patch won't work without changes. Of course, one option would be to remove musl and all musl-related patches from 15.05, as it is broken anyways without the musl fixes committed to trunk in the last few weeks... Regards, Matthias package/network/utils/ebtables/Makefile| 2 +- .../utils/ebtables/patches/100-musl_fix.patch | 132 - 2 files changed, 132 insertions(+), 2 deletions(-) diff --git a/package/network/utils/ebtables/Makefile b/package/network/utils/ebtables/Makefile index 4f6d7f5..30bf426 100644 --- a/package/network/utils/ebtables/Makefile +++ b/package/network/utils/ebtables/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ebtables PKG_VERSION:=2.0.10-4 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/ebtables diff --git a/package/network/utils/ebtables/patches/100-musl_fix.patch b/package/network/utils/ebtables/patches/100-musl_fix.patch index 462fea6..84aeb39 100644 --- a/package/network/utils/ebtables/patches/100-musl_fix.patch +++ b/package/network/utils/ebtables/patches/100-musl_fix.patch @@ -40,11 +40,141 @@ #include --- a/include/ebtables_u.h +++ b/include/ebtables_u.h -@@ -23,6 +23,7 @@ +@@ -23,6 +23,8 @@ #ifndef EBTABLES_U_H #define EBTABLES_U_H +#include ++#include #include #include #include +--- a/include/linux/if_ether.h /dev/null +@@ -1,126 +0,0 @@ +-/* +- * INET An implementation of the TCP/IP protocol suite for the LINUX +- *operating system. INET is implemented using the BSD Socket +- *interface as the means of communication with the user level. +- * +- *Global definitions for the Ethernet IEEE 802.3 interface. +- * +- * Version: @(#)if_ether.h 1.0.1a 02/08/94 +- * +- * Author:Fred N. van Kempen, +- *Donald Becker, +- *Alan Cox, +- *Steve Whitehouse, +- * +- *This program is free software; you can redistribute it and/or +- *modify it under the terms of the GNU General Public License +- *as published by the Free Software Foundation; either version +- *2 of the License, or (at your option) any later version. +- */ +- +-#ifndef _LINUX_IF_ETHER_H +-#define _LINUX_IF_ETHER_H +- +-#include +- +-/* +- *IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble +- *and FCS/CRC (frame check sequence). +- */ +- +-#define ETH_ALEN 6 /* Octets in one ethernet addr */ +-#define ETH_HLEN 14 /* Total octets in header. */ +-#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ +-#define ETH_DATA_LEN 1500/* Max. octets in payload*/ +-#define ETH_FRAME_LEN 1514/* Max. octets in frame sans FCS */ +-#define ETH_FCS_LEN 4 /* Octets in the FCS */ +- +-/* +- *These are the defined Ethernet Protocol ID's. +- */ +- +-#define ETH_P_LOOP0x0060 /* Ethernet Loopback packet */ +-#define ETH_P_PUP 0x0200 /* Xerox PUP packet */ +-#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */ +-#define ETH_P_IP 0x0800 /* Internet Protocol packet */ +-#define ETH_P_X25 0x0805 /* CCITT X.25 */ +-#define ETH_P_ARP 0x0806 /* Address Resolution packet*/ +-#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ +-#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ +-#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ +-#define ETH_P_DEC 0x6000 /* DEC Assigned proto */ +-#define ETH_P_DNA_DL0x6001 /* DEC DNA Dump/Load*/ +-#define ETH_P_DNA_RC0x6002 /* DEC DNA Remote Console */ +-#define ETH_P_DNA_RT0x6003 /* DEC DNA Routing */ +-#define ETH_P_LAT 0x6004 /* DEC LAT */ +-#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */
Re: [OpenWrt-Devel] Raspberry Pi 2 sysupgrade
On 07/08/2015 07:42 PM, Bruno Randolf wrote: > Hi! > > I have the below change to add rudimentary support for sysupgrade on the > Raspberry Pi. I looked at the way platform_copy_config() is implemented > for x86 and tried to do the same, but I get the following error on mount: > > mount: mounting /dev/mmcblk0p2 on /mnt failed: Device or resource busy > > I believe I'd need some way to re-read the partition table after the dd > command. How does it work on x86? Any ideas? > > Also would it be OK to gzip the sdcard image to save space? It > compresses from 76M to 11M. I think it would be nice to put the gzip command into an ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) check. CONFIG_TARGET_IMAGES_GZIP defaults to y, but is currently only respected on x86... I guess it would make sense to handle it on other targets with ext4 images as well. Matthias > > Below is the diff, but this is not a properly formatted patch, yet. > > bruno > > diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh > b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh > new file mode 100644 > index 000..95ade38 > --- /dev/null > +++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh > @@ -0,0 +1,19 @@ > +platform_check_image() { > + # i know no way to verify the image > + return 0; > +} > + > +platform_do_upgrade() { > + sync > + get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync > + sleep 1 > +} > + > +## mount does not work. I think I'd need to re-read the partition table! > +#platform_copy_config() { > +# echo "*** platform_copy_config called" > /dev/console > +# mount -t ext4 -o rw,noatime /dev/mmcblk0p2 /mnt > +# cp -af "$CONF_TAR" /mnt/ > +# umount /mnt > +# echo "*** platform_copy_config done" > /dev/console > +#} > diff --git a/target/linux/brcm2708/image/Makefile > b/target/linux/brcm2708/image/Makefile > index e70bdd0..095cf0d 100644 > --- a/target/linux/brcm2708/image/Makefile > +++ b/target/linux/brcm2708/image/Makefile > @@ -28,6 +28,7 @@ define Image/Build/RaspberryPi > mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img # Copy > OpenWrt built kernel > ./gen_rpi_sdcard_img.sh > $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img $(KDIR)/boot.img > $(KDIR)/root.$(1) \ > $(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) > $(CONFIG_TARGET_ROOTFS_PARTSIZE) > + gzip -k -f $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img > endef > > define Image/Build > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Hard float ABI for BCM2708/BCM2709
Hi, I've noticed that OpenWrt currently uses the soft-float ABI in the Raspberry Pi images. Is there a specific reason hard float is not used, even though most other distributions like Raspbian have switched to it? I tried adding "fpu" to FEATURES to enable hard-float, and the generated images seem to work fine. Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Hard float ABI for BCM2708/BCM2709
On 07/11/2015 07:21 PM, Florian Fainelli wrote: > Le 11 juil. 2015 09:52, "Matthias Schiffer" > a écrit : >> >> Hi, >> I've noticed that OpenWrt currently uses the soft-float ABI in the >> Raspberry Pi images. Is there a specific reason hard float is not used, >> even though most other distributions like Raspbian have switched to it? > > I do not think there was any particular reason. This was one of the few > ARM-based targets that are not armv5, however armv5 may have been used as a > template to kick the initial port. > >> >> I tried adding "fpu" to FEATURES to enable hard-float, and the generated >> images seem to work fine. > > If you want to submit a patch doing this, I will gladly apply it, we may > have to set a different FPU ABI between brcm2708 and 09 though. > -- > Florian > Okay, I'll do some more tests on both brcm2708 and 09 and prepare a patch. I've noticed that currently the toolchain directory naming is somewhat broken in regard to FP ABIs: the 'fpu' FEATURES flag affects the flags the toolchain is built with (--with-float=soft), but this difference isn't reflected in the directory name. I currently see two ways to fix this: 1. Add a 'fpu' or 'softfp' suffix to the directory name (as it is done with 'spe') 2. Don't configure fpu in FEATURES, but make the value of CONFIG_HAS_FPU depend on CPU_TYPE/CPU_SUBTYPE. Can it ever happen that we need the same CPU_TYPE/CPU_SUBTYPE combination both with and without HAS_FPU? I see the flag has been introduced in r11337 by kaloz. Or even both, so the directory suffix will be adjusted accordingly when CONFIG_SOFT_FLOAT is changed manually. Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] sunxi: respect CONFIG_TARGET_IMAGES_GZIP
The ext4 images are huge uncompressed. Signed-off-by: Matthias Schiffer --- target/linux/sunxi/image/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 19ab935..d3f4409 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -43,6 +43,10 @@ define Image/Build/SDCard $(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin + + ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) + gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img + endif endef define Image/Build/Profile/A10-OLinuXino-Lime -- 2.4.6 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] sunxi: fix uboot install location
Install uboot files to KERNEL_BUILD_DIR instead of BIN_DIR to fix the ImageBuilder. Similar fixes are necessary for many (all?) other uboot targets. Also remove the DTS copy command, BIN_DIR was unnecessarily cluttered with DTS files unrelated to the chosen profile. Signed-off-by: Matthias Schiffer --- package/boot/uboot-sunxi/Makefile | 15 --- target/linux/sunxi/image/Makefile | 34 +++--- 2 files changed, 15 insertions(+), 34 deletions(-) Please also backport to CC. Regards, Matthias diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 14ba922..9032600 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -6,6 +6,7 @@ # include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=u-boot PKG_VERSION:=2015.01 @@ -16,7 +17,7 @@ PKG_SOURCE_URL:= \ PKG_MD5SUM:=7f08dc9e98a71652bd696ed6ec95 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0 GPL-2.0+ PKG_LICENSE_FILES:=Licenses/README @@ -136,16 +137,16 @@ define Build/Compile endef define Package/uboot/install/default - $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) $(CP) $(PKG_BUILD_DIR)/u-boot.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin $(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-spl.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin $(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin $(CP) uEnv.txt \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt - mkimage -C none -A arm -T script -d $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-boot.scr + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt + mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \ + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr endef define Package/uboot/install/template diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 6fcd61f..19ab935 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -11,28 +11,12 @@ include $(INCLUDE_DIR)/host.mk FAT32_BLOCK_SIZE=1024 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE -BOARDS:= \ - sun4i-a10-cubieboard \ - sun4i-a10-olinuxino-lime \ - sun4i-a10-pcduino \ - sun5i-a13-olinuxino \ - sun6i-a31-colombus \ - sun6i-a31-m9 \ - sun7i-a20-bananapi \ - sun7i-a20-bananapro \ - sun7i-a20-cubieboard2 \ - sun7i-a20-cubietruck \ - sun7i-a20-olinuxino-lime \ - sun7i-a20-olinuxino-micro \ - sun7i-a20-pcduino3 \ - sun7i-a20-lamobo-r1 - define Image/BuildKernel mkimage -A arm -O linux -T kernel -C none \ -a 0x40008000 -e 0x40008000 \ -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \ -d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage - + ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs @@ -42,27 +26,23 @@ define Image/BuildKernel $(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \ ) endif - - $(foreach board,$(BOARDS), - $(CP) $(DTS_DIR)/$(board).dtb $(BIN_DIR)/ - ) endef define Image/Build/SDCard rm -f $(KDIR)/boot.img mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS) - - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(2).dtb ::dtb + + mcopy -i $(KDIR)/boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr + mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage - + ./gen_sunxi_sdcard_img.sh \ $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \ $(KDIR)/boot.img \ $(KDIR)/root.$(1) \ $(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ - $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-u-boot-with-spl.bin + $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-wit
Re: [OpenWrt-Devel] [RFC] brcm2708: enable hard float ABI
As I wrote in my last mail, using the same toolchain build/staging dirs with different float ABIs seems broken to me and should be fixed before any further work is done towards adding hard float support to BCM270x. After thinking a bit more about this, I came to the conclusion that the whole CONFIG_SOFT_FLOAT/CONFIG_HAS_FPU mess should be removed. Currently, having two targets using the same CPU_TYPE/CPU_SUBTYPE combination, but with different HAS_FPU, will break. In my opinion, the float ABI toolchain flags should only depend on the CPU_SUBTYPE, so when similar CPUs should use different float ABIs, a separate CPU_SUBTYPE would need to be created and thus separate build/staging dirs are used. If we really want to keep the CONFIG_SOFT_FLOAT option, at least a "softfp" suffix or similar would need to be added to the toolchain build/staging dir names, as mentioned before. I can write patches for that, but the OpenWrt team must decide which way to go. Regards, Matthias On 07/17/2015 07:28 PM, Álvaro Fernández Rojas wrote: > This enables hard float abi on BCM2708 (RPi1) and also enables neon on > BCM2709 (RPi2). > Attention: minimally tested, but seems to be OK. > The toolchain directory changes on BCM2709 due to switching the CPU subtype > to neon, but BCM2708 needs a distclean. > > Signed-off-by: Álvaro Fernández Rojas > --- > target/linux/brcm2708/Makefile | 4 +--- > target/linux/brcm2708/bcm2708/target.mk | 2 ++ > target/linux/brcm2708/bcm2709/target.mk | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile > index 6d8aba0..a3e35e4 100644 > --- a/target/linux/brcm2708/Makefile > +++ b/target/linux/brcm2708/Makefile > @@ -10,10 +10,8 @@ include $(INCLUDE_DIR)/host.mk > ARCH:=arm > BOARD:=brcm2708 > BOARDNAME:=Broadcom BCM2708/BCM2709 > -FEATURES:=ext4 audio usb usbgadget display gpio > +FEATURES:=ext4 audio usb usbgadget display gpio fpu > MAINTAINER:=Florian Fainelli > -CPU_TYPE:=arm1176jzf-s > -CPU_SUBTYPE:=vfp > SUBTARGETS:=bcm2708 bcm2709 > > KERNEL_PATCHVER:=4.1 > diff --git a/target/linux/brcm2708/bcm2708/target.mk > b/target/linux/brcm2708/bcm2708/target.mk > index 10fae2f..a35ec66 100644 > --- a/target/linux/brcm2708/bcm2708/target.mk > +++ b/target/linux/brcm2708/bcm2708/target.mk > @@ -4,6 +4,8 @@ > > SUBTARGET:=bcm2708 > BOARDNAME:=BCM2708 based boards > +CPU_TYPE:=arm1176jzf-s > +CPU_SUBTYPE:=vfp > > define Target/Description > Build firmware image for Broadcom BCM2708 SoC devices. > diff --git a/target/linux/brcm2708/bcm2709/target.mk > b/target/linux/brcm2708/bcm2709/target.mk > index 565c12a..b910b36 100644 > --- a/target/linux/brcm2708/bcm2709/target.mk > +++ b/target/linux/brcm2708/bcm2709/target.mk > @@ -5,7 +5,7 @@ > SUBTARGET:=bcm2709 > BOARDNAME:=BCM2709 based boards > CPU_TYPE:=cortex-a7 > -CPU_SUBTYPE:=vfp > +CPU_SUBTYPE:=neon > > define Target/Description > Build firmware image for Broadcom BCM2709 SoC devices. > signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] CC: brcm2708: Add gzip image compression
On 07/17/2015 07:18 PM, Bruno Randolf wrote: > Signed-off-by: Bruno Randolf > --- > target/linux/brcm2708/image/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target/linux/brcm2708/image/Makefile > b/target/linux/brcm2708/image/Makefile > index e70bdd0..90d54bb 100644 > --- a/target/linux/brcm2708/image/Makefile > +++ b/target/linux/brcm2708/image/Makefile > @@ -28,6 +28,9 @@ define Image/Build/RaspberryPi > mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img # Copy OpenWrt > built kernel > ./gen_rpi_sdcard_img.sh $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img > $(KDIR)/boot.img $(KDIR)/root.$(1) \ > $(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) > $(CONFIG_TARGET_ROOTFS_PARTSIZE) > + ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) > + gzip -9n -k -f $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img > + endif > endef > > define Image/Build > Please don't use gzip -k, it requires gzip 1.6, which is not generally available. Regards, Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ar71xx: fix wndr3700_board_detect for some NETGEAR WNDR3700v2
There are a few NETGEAR devices which don't terminate the model name in the ART with a NUL byte, at least some NETGEAR WNDR3700v2. The current awk expression doesn't match 0xFF bytes, so AR71XX_MODEL contains lots of trailing 0xFF garbage in this case. Fix this by matching for the first non-printable character and explicitly setting LC_CTYPE=C (probably not strictly necessary on OpenWrt, but will definitely work like this, even when awk supports locales and LANG is set). Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/base-files/lib/ar71xx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Hi, this is another little fix that should also be applied to CC. Matthias diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 9edd0cd..e1c47ee 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -38,7 +38,7 @@ wndr3700_board_detect() { ;; "33373031") # Use awk to remove everything after the first zero byte - model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')" + model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | LC_CTYPE=C awk -v 'FS=[^[:print:]]' '{print $1; exit}')" case $model in $'\xff'*) if [ "${model:24:1}" = 'N' ]; then -- 2.4.6 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/2] sunxi: fix uboot install location
On 07/24/2015 09:30 AM, John Crispin wrote: > > > On 16/07/2015 22:20, Matthias Schiffer wrote: >> -BOARDS:= \ >> -sun4i-a10-cubieboard \ >> -sun4i-a10-olinuxino-lime \ >> -sun4i-a10-pcduino \ >> -sun5i-a13-olinuxino \ >> -sun6i-a31-colombus \ >> -sun6i-a31-m9 \ >> -sun7i-a20-bananapi \ >> -sun7i-a20-bananapro \ >> -sun7i-a20-cubieboard2 \ >> -sun7i-a20-cubietruck \ >> -sun7i-a20-olinuxino-lime \ >> -sun7i-a20-olinuxino-micro \ >> -sun7i-a20-pcduino3 \ >> -sun7i-a20-lamobo-r1 >> - >> define Image/BuildKernel >> mkimage -A arm -O linux -T kernel -C none \ >> -a 0x40008000 -e 0x40008000 \ >> -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \ >> -d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage >> - >> + >> ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) >> $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs >> echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs >> @@ -42,27 +26,23 @@ define Image/BuildKernel >> $(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \ >> ) >> endif >> - >> -$(foreach board,$(BOARDS), >> -$(CP) $(DTS_DIR)/$(board).dtb $(BIN_DIR)/ >> -) >> endef > > not sure about this change. maybe just stage the dtb file of the > selected profile. i am not sure if zoltan added this for a reason. > > John I don't see why anyone would care, but I'll send a v2 anyways (I also want to fix that the boot.img is generated in $(KDIR) instead of $(KDIR_TMP) or $(BIN_DIR), even in the ImageBuilder). If you want, I can also include copying the profile's DTB file to $(BIN_DIR). Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Split kernel modules out of the base opkg repo?
Hi, I'd like to propose to split the current "base" opkg repo into two, one for userspace applications and one for kernel modules. This would greatly simplify providing your own kernel module repository with modules for a customized kernel, while still being able to rely on the upstream "base" repo for userspace. I'll provide a patch for this if you think this is a reasonable idea. Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Split kernel modules out of the base opkg repo?
On 07/25/2015 03:55 PM, John Crispin wrote: > > > On 25/07/2015 14:46, Matthias Schiffer wrote: >> Hi, >> I'd like to propose to split the current "base" opkg repo into two, one >> for userspace applications and one for kernel modules. This would >> greatly simplify providing your own kernel module repository with >> modules for a customized kernel, while still being able to rely on the >> upstream "base" repo for userspace. >> >> I'll provide a patch for this if you think this is a reasonable idea. >> >> Matthias >> > > i think the current setup works very well for open drivers and code. > fixing up openwrt for out of tree modules is imho not a good idea as it > allows companies to easily avoid upstreaming stuff. > > why dont you just include your magic USP into openwrt and/or upstream ? I'm not talking about out-of-tree modules at all, I'm talking about the kmod-* packages in the base repo. I want to provide an own opkg repo with the same kernel modules, but built for a customized kernel. As these modules' ABI depends on the kernel configuration (and thus the kernel configuration is included in the version number as "vermagic"), I need to provide the kernel modules built matching my configuration. As far as I know there's no way to tell opkg to prefer the modules from my repo, regardless of the version number, so I'm asking for a base repo without any kmod-* packages. signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Split kernel modules out of the base opkg repo?
On 07/25/2015 06:16 PM, Florian Fainelli wrote: > On Jul 25, 2015 7:39 AM, "Matthias Schiffer" > wrote: >> >> On 07/25/2015 03:55 PM, John Crispin wrote: >>> >>> >>> On 25/07/2015 14:46, Matthias Schiffer wrote: >>>> Hi, >>>> I'd like to propose to split the current "base" opkg repo into two, one >>>> for userspace applications and one for kernel modules. This would >>>> greatly simplify providing your own kernel module repository with >>>> modules for a customized kernel, while still being able to rely on the >>>> upstream "base" repo for userspace. >>>> >>>> I'll provide a patch for this if you think this is a reasonable idea. >>>> >>>> Matthias >>>> >>> >>> i think the current setup works very well for open drivers and code. >>> fixing up openwrt for out of tree modules is imho not a good idea as it >>> allows companies to easily avoid upstreaming stuff. >>> >>> why dont you just include your magic USP into openwrt and/or upstream ? >> >> I'm not talking about out-of-tree modules at all, I'm talking about the >> kmod-* packages in the base repo. I want to provide an own opkg repo >> with the same kernel modules, but built for a customized kernel. >> >> As these modules' ABI depends on the kernel configuration (and thus the >> kernel configuration is included in the version number as "vermagic"), I >> need to provide the kernel modules built matching my configuration. As >> far as I know there's no way to tell opkg to prefer the modules from my >> repo, regardless of the version number, so I'm asking for a base repo >> without any kmod-* packages. > > But since this is already a custom repository, why not take care yourself > of synchronizing the base packages (but not kmod-*) from OpenWrt's upstream > directly? Sure, that would be the alternative, but it would be much easier if I could just take the upstream repo as is. > > If you dedicate a custom kernel image version to make sure that OpenWrt > kmods cannot be installed, does not that work already? > If I ensure that my custom kernel version number is higher than the version number of the official OpenWrt image's kernel, that would work (so opkg will select my modules and not the upstream ones); I guess I can live with that. Can I assume that the LINUX_RELEASE variable will never have a value different from 1 in official OpenWrt builds? signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/2] sunxi: fix uboot install location
On 07/31/2015 06:06 PM, Zoltan HERPAI wrote: > On Sun, 26 Jul 2015, Zoltan HERPAI wrote: > >> On Fri, 24 Jul 2015, John Crispin wrote: >> >>> On 16/07/2015 22:20, Matthias Schiffer wrote: >>>> -BOARDS:= \ >>>> -sun4i-a10-cubieboard \ >>>> -sun4i-a10-olinuxino-lime \ >>>> -sun4i-a10-pcduino \ >>>> -sun5i-a13-olinuxino \ >>>> -sun6i-a31-colombus \ >>>> -sun6i-a31-m9 \ >>>> -sun7i-a20-bananapi \ >>>> -sun7i-a20-bananapro \ >>>> -sun7i-a20-cubieboard2 \ >>>> -sun7i-a20-cubietruck \ >>>> -sun7i-a20-olinuxino-lime \ >>>> -sun7i-a20-olinuxino-micro \ >>>> -sun7i-a20-pcduino3 \ >>>> -sun7i-a20-lamobo-r1 >>>> - >>>> define Image/BuildKernel >>>> mkimage -A arm -O linux -T kernel -C none \ >>>> -a 0x40008000 -e 0x40008000 \ >>>> -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \ >>>> -d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage >>>> - >>>> + >>>> ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) >>>> $(CP) $(KDIR)/zImage-initramfs >>>> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs >>>> echo -ne '\x00\x00\x00\x00' >> >>>> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs >>>> @@ -42,27 +26,23 @@ define Image/BuildKernel >>>> $(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \ >>>> ) >>>> endif >>>> - >>>> -$(foreach board,$(BOARDS), >>>> -$(CP) $(DTS_DIR)/$(board).dtb $(BIN_DIR)/ >>>> -) >>>> endef >>> >>> not sure about this change. maybe just stage the dtb file of the >>> selected profile. i am not sure if zoltan added this for a reason. >> >> Thanks John and Matthias for checking on this. I'm offline until the >> 30th, will get back on this at that time. > > Before the sdcard imagebuilder, the dtb files for the supported boards > were copied to BIN_DIR so the user could pick the correct dtb for the > board. When the imagebuilder was rolled out, this was not removed from > the Makefile - now it can go away, so I'm OK with removing this part. > Although it's a good place to see which boards are supported, there are > much better ways to do this. > > Building boot.img is probably fine to stay in KDIR - that's an interim > file and not the final image. If you want that changed, please send a v2 > - if not, I'm happy to apply the series in its current form. > > Thanks, > -w- I think KDIR should be considered read-only for the Image Builder, it should not put files there (please correct me if I'm wrong, I'm only deducing this from how it's done on other targets...). My updated patch will build the boot image in KDIR_TMP instead, which is more appropriate in my opinion. Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ar71xx: fix TP-LINK TL-WR941ND v6 support
The images currently generated for the TL-WR941ND v6 try to treat it like a TL-WDR3500, which doesn't make any sense and causes the kernel to panic in early boot. I don't think this has ever worked (the TL-WR941ND v6 has a different SoC, uses another MDIO bus, has only one WMAC and no USB...). Fix this by adding proper support for the device. Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/base-files/etc/diag.sh | 3 +- .../ar71xx/base-files/etc/uci-defaults/01_leds | 9 ++ .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.1 | 1 + .../files/arch/mips/ath79/mach-tl-wr941nd-v6.c | 151 + target/linux/ar71xx/image/Makefile | 2 +- .../700-MIPS-ath79-openwrt-machines.patch | 23 +++- 9 files changed, 186 insertions(+), 8 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd-v6.c diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 561c5da..46b83fc 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -277,7 +277,8 @@ get_status_led() { tl-wdr4300 | \ tl-wr703n | \ tl-wr710n | \ - tl-wr720n-v3) + tl-wr720n-v3 | \ + tl-wr941nd-v6) status_led="tp-link:blue:system" ;; tl-wr841n-v9) diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 2aced37..3344d97 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -474,6 +474,15 @@ tl-wr941nd-v5) ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" ;; +tl-wr941nd-v6) + ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth0" + ucidef_set_led_switch "lan1" "LAN1" "tp-link:blue:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "tp-link:blue:lan2" "switch0" "0x08" + ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04" + ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02" + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:blue:wlan" "phy0tpt" + ;; + tl-wa830re-v2) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 2893e62..a6507db 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -227,6 +227,7 @@ tl-mr3420-v2 |\ tl-wr841n-v8 |\ tl-wr842n-v2 |\ tl-wr941nd-v5 |\ +tl-wr941nd-v6 |\ wnr2000-v3 |\ wnr2000-v4 |\ wnr2200 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 256bd10..5d27538 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -793,6 +793,9 @@ ar71xx_board_detect() { *"TL-WR941N/ND v5") name="tl-wr941nd-v5" ;; + *"TL-WR941N/ND v6") + name="tl-wr941nd-v6" + ;; *"TL-WR703N v1") name="tl-wr703n" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 76d8c5b..55ff568 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -353,6 +353,7 @@ platform_check_image() { tl-wr842n-v2 | \ tl-wr941nd | \ tl-wr941nd-v5 | \ + tl-wr941nd-v6 | \ tl-wr1041n-v2 | \ tl-wr1043nd | \ tl-wr1043nd-v2 | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index 1e31a01..ecaf454 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -134,6 +134,7 @@ CONFIG_ATH79_MACH_TL_WR841N_V1=y CONFIG_ATH79_MACH_TL_WR841N_V8=y CONFIG_ATH79_MACH_TL_WR841N_V9=y CONFIG_ATH79_MACH_TL_WR941ND=y +CONFIG_ATH79_MACH_TL_WR941ND_V6=y CONFIG_ATH79_MACH_TUBE2H=y CO
Re: [OpenWrt-Devel] [PATCH] ar71xx: fix TP-LINK TL-WR941ND v6 support
Please ignore this patch for now, the WLAN isn't working correctly, I'll have a look at that first. Matthias On 08/06/2015 02:40 AM, Matthias Schiffer wrote: > The images currently generated for the TL-WR941ND v6 try to treat it like > a TL-WDR3500, which doesn't make any sense and causes the kernel to panic > in early boot. I don't think this has ever worked (the TL-WR941ND v6 has > a different SoC, uses another MDIO bus, has only one WMAC and no USB...). > > Fix this by adding proper support for the device. > > Signed-off-by: Matthias Schiffer > --- > target/linux/ar71xx/base-files/etc/diag.sh | 3 +- > .../ar71xx/base-files/etc/uci-defaults/01_leds | 9 ++ > .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + > target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + > .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + > target/linux/ar71xx/config-4.1 | 1 + > .../files/arch/mips/ath79/mach-tl-wr941nd-v6.c | 151 > + > target/linux/ar71xx/image/Makefile | 2 +- > .../700-MIPS-ath79-openwrt-machines.patch | 23 +++- > 9 files changed, 186 insertions(+), 8 deletions(-) > create mode 100644 > target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd-v6.c > > diff --git a/target/linux/ar71xx/base-files/etc/diag.sh > b/target/linux/ar71xx/base-files/etc/diag.sh > index 561c5da..46b83fc 100644 > --- a/target/linux/ar71xx/base-files/etc/diag.sh > +++ b/target/linux/ar71xx/base-files/etc/diag.sh > @@ -277,7 +277,8 @@ get_status_led() { > tl-wdr4300 | \ > tl-wr703n | \ > tl-wr710n | \ > - tl-wr720n-v3) > + tl-wr720n-v3 | \ > + tl-wr941nd-v6) > status_led="tp-link:blue:system" > ;; > tl-wr841n-v9) > diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds > b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds > index 2aced37..3344d97 100644 > --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds > +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds > @@ -474,6 +474,15 @@ tl-wr941nd-v5) > ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" > ;; > > +tl-wr941nd-v6) > + ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth0" > + ucidef_set_led_switch "lan1" "LAN1" "tp-link:blue:lan1" "switch0" "0x10" > + ucidef_set_led_switch "lan2" "LAN2" "tp-link:blue:lan2" "switch0" "0x08" > + ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04" > + ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02" > + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:blue:wlan" "phy0tpt" > + ;; > + > tl-wa830re-v2) > ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" > ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" > diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > index 2893e62..a6507db 100755 > --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network > @@ -227,6 +227,7 @@ tl-mr3420-v2 |\ > tl-wr841n-v8 |\ > tl-wr842n-v2 |\ > tl-wr941nd-v5 |\ > +tl-wr941nd-v6 |\ > wnr2000-v3 |\ > wnr2000-v4 |\ > wnr2200 |\ > diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh > b/target/linux/ar71xx/base-files/lib/ar71xx.sh > index 256bd10..5d27538 100755 > --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh > +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh > @@ -793,6 +793,9 @@ ar71xx_board_detect() { > *"TL-WR941N/ND v5") > name="tl-wr941nd-v5" > ;; > + *"TL-WR941N/ND v6") > + name="tl-wr941nd-v6" > + ;; > *"TL-WR703N v1") > name="tl-wr703n" > ;; > diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > index 76d8c5b..55ff568 100755 > --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh > @@ -353,6 +353,7 @@ platform_check_image() { >
[OpenWrt-Devel] Unable to get TP9343/QCA9561 WLAN working with ath9k (was: ar71xx: fix TP-LINK TL-WR941ND v6 support)
Hi, as I've already written on the OpenWrt ML, I'm currently porting OpenWrt to the TP-LINK TL-WR941ND v6, which uses a TP9343 SoC (which is confusingly part of the QCA956x series). The WMAC identifies as QCA9561 (0x600 rev 0). I'm unable to get the WLAN working at all. The TX seems to work fine (at least I can see the beacons when I put the card into AP mode), but RX is completely dead (iw scan is empty, etc...). As I'm not familar with ath9k, I need some help debugging this. I'm using the OpenWrt trunk, which contains a recent version of mac80211 based on wireless-testing, it already contains the patches "ath9k_hw: fix device ID check for AR956x" and "ath9k: Fix register definitions for QCA956x". I've attached a dump of all debugfs information ath9k provides while the WLAN is configured in IBSS mode in a cell that should be quite active. Thanks in advance, Matthias phy0.tar Description: Unix tar archive signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] base-files: default_postinst: propagate the real postinst return code
Using the postinst script for sanity checks and expecting opkg to fail if the postinst didn't return 0 was possible in Barrier Breaker, propagate the real postinst return code through default_postinst to restore this behaviour. Signed-off-by: Matthias Schiffer --- package/base-files/files/lib/functions.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 8d045fa..2f78d67 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -174,7 +174,8 @@ default_prerm() { } default_postinst() { - local pkgname rusers + local pkgname rusers ret + ret=0 pkgname=$(basename ${1%.*}) rusers=$(grep "Require-User:" ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.control) [ -n "$rusers" ] && { @@ -215,7 +216,10 @@ default_postinst() { done } - [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ] && ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ) + if [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ]; then + ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ) + ret=$? + fi [ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null [ "$PKG_UPGRADE" = "1" ] || for i in `cat ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.list | grep "^/etc/init.d/"`; do @@ -225,7 +229,7 @@ default_postinst() { $i start } done - return 0 + return $ret } include() { -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v4 1/4] sunxi: don't copy DTS files to BIN_DIR
The DTS files aren't useful (other targets don't copy them either) and clutter BIN_DIR with files unrelated to the chosen profile. Signed-off-by: Matthias Schiffer --- target/linux/sunxi/image/Makefile | 30 +- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 6fcd61f..b96a360 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -11,28 +11,12 @@ include $(INCLUDE_DIR)/host.mk FAT32_BLOCK_SIZE=1024 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE -BOARDS:= \ - sun4i-a10-cubieboard \ - sun4i-a10-olinuxino-lime \ - sun4i-a10-pcduino \ - sun5i-a13-olinuxino \ - sun6i-a31-colombus \ - sun6i-a31-m9 \ - sun7i-a20-bananapi \ - sun7i-a20-bananapro \ - sun7i-a20-cubieboard2 \ - sun7i-a20-cubietruck \ - sun7i-a20-olinuxino-lime \ - sun7i-a20-olinuxino-micro \ - sun7i-a20-pcduino3 \ - sun7i-a20-lamobo-r1 - define Image/BuildKernel mkimage -A arm -O linux -T kernel -C none \ -a 0x40008000 -e 0x40008000 \ -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \ -d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage - + ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs @@ -42,20 +26,16 @@ define Image/BuildKernel $(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \ ) endif - - $(foreach board,$(BOARDS), - $(CP) $(DTS_DIR)/$(board).dtb $(BIN_DIR)/ - ) endef define Image/Build/SDCard rm -f $(KDIR)/boot.img mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS) - + mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(2).dtb ::dtb + mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage - + ./gen_sunxi_sdcard_img.sh \ $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \ $(KDIR)/boot.img \ @@ -124,7 +104,7 @@ endef define Image/Build $(call Image/Build/$(1),$(1)) $(call Image/Build/Profile/$(PROFILE),$(1)) - + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync endef -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v4 2/4] sunxi: fix uboot install location
Install uboot files to KERNEL_BUILD_DIR instead of BIN_DIR to fix ImageBuilder. Similar fixes are necessary for many (all?) other uboot targets. Signed-off-by: Matthias Schiffer --- package/boot/uboot-sunxi/Makefile | 14 +++--- target/linux/sunxi/image/Makefile | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 1aeeceb..b08f9ed 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -17,7 +17,7 @@ PKG_SOURCE_URL:= \ PKG_MD5SUM:=3dac9a0b46fed77fc768ad3bd2d68c05 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0 GPL-2.0+ PKG_LICENSE_FILES:=Licenses/README @@ -138,16 +138,16 @@ define Build/Compile endef define Package/uboot/install/default - $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) $(CP) $(PKG_BUILD_DIR)/u-boot.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin $(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-spl.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin $(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin $(CP) uEnv.txt \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt - mkimage -C none -A arm -T script -d $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-boot.scr + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt + mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \ + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr endef define Package/uboot/install/template diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index b96a360..19ab935 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -32,7 +32,7 @@ define Image/Build/SDCard rm -f $(KDIR)/boot.img mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS) - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr + mcopy -i $(KDIR)/boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage @@ -42,7 +42,7 @@ define Image/Build/SDCard $(KDIR)/root.$(1) \ $(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ - $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-u-boot-with-spl.bin + $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin endef define Image/Build/Profile/A10-OLinuXino-Lime -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v4 4/4] sunxi: respect CONFIG_TARGET_IMAGES_GZIP
Signed-off-by: Matthias Schiffer --- target/linux/sunxi/image/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 45e8dea..905188b 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -47,6 +47,10 @@ define Image/Build/SDCard $(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin + + ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) + gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img + endif endef define Image/Build/Profile/A10-OLinuXino-Lime -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v4 3/4] sunxi: create KDIR_TMP, build boot.img in it
It's nice to have a distinction between files which are built during the normal OpenWrt build process and ones that are created by the ImageBuilder (like it already exists on some other targets). This also gives boot.img a profile-specific prefix as it contains profile- specific data. Signed-off-by: Matthias Schiffer --- target/linux/sunxi/image/Makefile | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 19ab935..45e8dea 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -8,10 +8,14 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk include $(INCLUDE_DIR)/host.mk +KDIR_TMP:=$(KDIR)/tmp + FAT32_BLOCK_SIZE=1024 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE define Image/BuildKernel + -mkdir -p $(KDIR_TMP) + mkimage -A arm -O linux -T kernel -C none \ -a 0x40008000 -e 0x40008000 \ -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \ @@ -29,16 +33,16 @@ define Image/BuildKernel endef define Image/Build/SDCard - rm -f $(KDIR)/boot.img - mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS) + rm -f $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img + mkdosfs $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img -C $(FAT32_BLOCKS) - mcopy -i $(KDIR)/boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr - mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage + mcopy -i $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr + mcopy -i $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img $(DTS_DIR)/$(2).dtb ::dtb + mcopy -i $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage ./gen_sunxi_sdcard_img.sh \ $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \ - $(KDIR)/boot.img \ + $(KDIR_TMP)/$(IMG_PREFIX)-$(PROFILE)-boot.img \ $(KDIR)/root.$(1) \ $(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 0/2] Avoid unnecessary libopenssl build dependencies
Hi, these two patches allow building OpenWrt in its default configuration without having to download and build libopenssl (which seems desirable as the OpenSSL download links break so often). Matthias Schiffer (2): opkg: work around unconditional libopenssl build dependency hostapd: work around unconditional libopenssl build dependency package/network/services/hostapd/Makefile | 2 +- package/system/opkg/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] hostapd: work around unconditional libopenssl build dependency
As the OpenWrt build system only resolves build dependencies per directory, all hostapd variants were causing libopenssl to be downloaded and built, not only wpad-mesh. Fix this by applying the same workaround as in ustream-ssl. Signed-off-by: Matthias Schiffer --- package/network/services/hostapd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index c16cb11..c39b6b4 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -177,7 +177,7 @@ endef define Package/wpad-mesh $(call Package/wpad/Default) TITLE+= (with 802.11s mesh and SAE support) - DEPENDS:=$(DRV_DEPENDS) +libubus +libopenssl +@CONFIG_WPA_SUPPLICANT_OPENSSL @(!TARGET_uml||BROKEN) + DEPENDS:=$(DRV_DEPENDS) +libubus +PACKAGE_wpad-mesh:libopenssl +@CONFIG_WPA_SUPPLICANT_OPENSSL @(!TARGET_uml||BROKEN) CONFLICTS:=@WPA_SUPPLICANT_INTERNAL VARIANT:=wpad-mesh endef -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] opkg: work around unconditional libopenssl build dependency
As the OpenWrt build system only resolves build dependencies per directory, all opkg variants were causing libopenssl to be downloaded and built, not only opkg-smime. Fix this by applying the same workaround as in ustream-ssl. Signed-off-by: Matthias Schiffer --- package/system/opkg/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 32bcf2b..4da4d46 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -72,7 +72,7 @@ endef define Package/opkg-smime $(call Package/opkg/Default) TITLE+= (with S/MIME signature support) - DEPENDS+=+libopenssl + DEPENDS+=+PACKAGE_opkg-smime:libopenssl VARIANT:=smime endef -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 4/4] mac80211: ath9k: enable hw manual peak calibration for QCA9561
On 09/01/2015 06:21 AM, miaoq...@qti.qualcomm.com wrote: > From: Miaoqing Pan > > This patch fix https://lists.openwrt.org/pipermail/openwrt-devel/ > 2015-August/034979.html. As the peak detect calibration is set > incorrectly. > > Signed-off-by: Miaoqing Pan Tested-by: Matthias Schiffer Thanks a lot :) > --- > ...6-ath9k_enable_hw_manual_peak_calibration.patch | 22 > ++ > 1 file changed, 22 insertions(+) > create mode 100644 > package/kernel/mac80211/patches/546-ath9k_enable_hw_manual_peak_calibration.patch > > diff --git > a/package/kernel/mac80211/patches/546-ath9k_enable_hw_manual_peak_calibration.patch > > b/package/kernel/mac80211/patches/546-ath9k_enable_hw_manual_peak_calibration.patch > new file mode 100644 > index 000..8606493 > --- /dev/null > +++ > b/package/kernel/mac80211/patches/546-ath9k_enable_hw_manual_peak_calibration.patch > @@ -0,0 +1,22 @@ > +--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c > b/drivers/net/wireless/ath/ath9k/ar9003_calib.c > +@@ -1249,7 +1249,8 @@ static void ar9003_hw_manual_peak_cal(struct ath_hw > *ah, u8 chain, bool is_2g) > + REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain), > + AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR, 0x0); > + > +-if (AR_SREV_9003_PCOEM(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah)) { > ++if (AR_SREV_9003_PCOEM(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) || > ++AR_SREV_9561(ah)) { > + if (is_2g) > + REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain), > + AR_PHY_65NM_RXRF_AGC_AGC2G_DBDAC_OVR, > +@@ -1640,7 +1641,8 @@ static bool ar9003_hw_init_cal_soc(struct ath_hw *ah, > + > + skip_tx_iqcal: > + if (run_agc_cal || !(ah->ah_flags & AH_FASTCC)) { > +-if (AR_SREV_9330_11(ah) || AR_SREV_9531(ah) || > AR_SREV_9550(ah)) { > ++if (AR_SREV_9330_11(ah) || AR_SREV_9531(ah) || AR_SREV_9550(ah) > || > ++AR_SREV_9561(ah)) { > + for (i = 0; i < AR9300_MAX_CHAINS; i++) { > + if (!(ah->rxchainmask & (1 << i))) > + continue; > signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] musl-1.1.10.tar.gz md5sum doesn't match
Your .config doesn't match the current OpenWrt trunk (the musl version number is set in .config). Just run `make oldconfig` (or `make menuconfig` and save without changing anything) to fix it. On 09/06/2015 12:23 AM, Derek Werthmuller wrote: > Not sue where the Makefile is for this package, but I suspect the musl > version was changed but the md5sum not changed. > here is the fresh build output. > > /home/derek/development/openwrt/scripts/download.pl > "/home/derek/development/openwrt/dl" "musl-1.1.10.tar.gz" > "48be0777e32f374d387e9cf85e36ec4d" "http://www.musl-libc.org/releases"; > --2015-09-05 18:07:15-- > http://www.musl-libc.org/releases/musl-1.1.10.tar.gz > Resolving www.musl-libc.org (www.musl-libc.org)... 45.63.0.111, > 2001:19f0:4009:4061:5400:ff:fe11:6da2 > Connecting to www.musl-libc.org (www.musl-libc.org)|45.63.0.111|:80... > connected. > HTTP request sent, awaiting response... 200 OK > Length: 907181 (886K) [application/x-tar] > Saving to: 'STDOUT' > > - 100%[=>] 885.92K 805KB/s in > 1.1s > > 2015-09-05 18:07:17 (805 KB/s) - written to stdout [907181/907181] > > MD5 sum of the downloaded file does not match (file: > fc30892ee582c91920505bbd0021049f, requested: > 48be0777e32f374d387e9cf85e36ec4d) - deleting download. > > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] CC: ar71xx: add support for the TP-LINK TL-WR1043ND v3
On 02/07/2016 05:29 AM, Sven Roederer wrote: > The hardware of the v3 is identical to the v2. > > Based-on-patch-by: nbd (b9d5ee8) > > - Backport to CC > - add TPL-WR1043v3 to list of supported boards in config-menu > - was tested for all 3 boards by freifunk-community Berlin > > Signed-off-by: Sven Roederer Hi, see my comments inline. > --- > target/linux/ar71xx/image/Makefile | 22 > ++ > .../610-MIPS-ath79-openwrt-machines.patch | 2 +- > 2 files changed, 23 insertions(+), 1 deletion(-) > > diff --git a/target/linux/ar71xx/image/Makefile > b/target/linux/ar71xx/image/Makefile > index 4336697..8805812 100644 > --- a/target/linux/ar71xx/image/Makefile > +++ b/target/linux/ar71xx/image/Makefile > @@ -598,6 +598,28 @@ define Device/tl-wr1041n-v2 > endef > TARGET_DEVICES += tl-wr1041n-v2 > > +define Device/tl-wr1043nd-v1 > +$(Device/tplink-8m) > +BOARDNAME := TL-WR1043ND > +DEVICE_PROFILE := TLWR1043 > +TPLINK_HWID := 0x10430001 > +endef > + > +define Device/tl-wr1043nd-v2 > +$(Device/tplink-8mlzma) > +BOARDNAME := TL-WR1043ND-v2 > +DEVICE_PROFILE := TLWR1043 > +TPLINK_HWID := 0x10430002 > +endef > + > +define Device/tl-wr1043nd-v3 > +$(Device/tplink-8mlzma) > +BOARDNAME := TL-WR1043ND-v2 > +DEVICE_PROFILE := TLWR1043 > +TPLINK_HWID := 0x10430003 > +endef > +TARGET_DEVICES += tl-wr1043nd-v1 tl-wr1043nd-v2 tl-wr1043nd-v3 This looks wrong. You are adding new-style definitions for all revisions of the WR1043ND without removing the old-style definitions. Either remove the old-style definitions, or just add an old-style definition for the v3, like this: https://github.com/freifunk-gluon/gluon/blob/master/patches/openwrt/0037-ar71xx-add-support-for-TP-Link-TL-WR1043ND-v3.patch (on a related note: we have a lot of such backport patches in Gluon, I should finally get down to submitting them here...) > + > define Device/tl-wdr4900-v2 > $(Device/tplink-8mlzma) > BOARDNAME := TL-WDR4900-v2 > diff --git > a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch > b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch > index 2fa041b..ca1b194 100644 > --- a/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch > +++ b/target/linux/ar71xx/patches-3.18/610-MIPS-ath79-openwrt-machines.patch > @@ -1268,7 +1268,7 @@ > +select ATH79_DEV_WMAC > + > +config ATH79_MACH_TL_WR1043ND_V2 > -+bool "TP-LINK TL-WR1043ND v2 support" > ++bool "TP-LINK TL-WR1043ND v2/v3 support" > +select SOC_QCA955X > +select ATH79_DEV_ETH > +select ATH79_DEV_GPIO_BUTTONS > The Kconfig change is not necessary at all, these strings are never seen by humans anyways (unless you use kernel_menuconfig or similar). We could start to care, but this should be done in trunk first, and there are many many more occurences of multiple models using the same BOARDNAME (TL-WR741ND is used 7 times for some very different models, I'm not sure if we want to list them all ;) ). Thanks, Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Weird ethernet setup on DIR-505
Hi, I've noticed that the DIR-505 has a very weird network setup: (1) The kernel sets up eth0 and eth1; the DIR-505 has only one ethernet port though, so eth0 is always dead. /etc/config/network is setup to only use eth1. (2) The single status LED is currently abused as ethernet traffic indicator. This is quite confusing if you use the device as a repeater or mesh node without ethernet, as the LED is just off all the time. I'd prefer to just keep it the status LED by default, the stock firmware doesn't have an ethernet indicator either. Would patches for these issues be accepted? Especially issue (1) obviously leads to migration issues (and it's like this since BB), as making the single LAN port eth0 will leave failsafe mode as the only way to access the device with eth1 in /etc/config/network. I'd like to see this fixed, but I could understand if you see fixing this as a greater hassle than keeping it broken... Regards, Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/3] firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile warnings
Signed-off-by: Matthias Schiffer --- tools/firmware-utils/Makefile| 2 +- tools/firmware-utils/src/mkfwimage.c | 12 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 7a4403c..2573d8c 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -32,7 +32,7 @@ define Host/Compile $(call cc,mkzynfw) $(call cc,lzma2eva,-lz) $(call cc,mkcasfw) - $(call cc,mkfwimage,-lz) + $(call cc,mkfwimage,-lz -Wall) $(call cc,mkfwimage2,-lz) $(call cc,imagetag imagetag_cmdline cyg_crc32) $(call cc,add_header) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index e3a03c1..00bf439 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -104,8 +104,6 @@ typedef struct part_data { #define OPTIONS "B:hv:m:o:r:k:" -static int debug = 0; - typedef struct image_info { char magic[16]; char version[256]; @@ -236,9 +234,9 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c fw_layout_t* p; p = &fw_layout_data[0]; - while ((strlen(p->name) != 0) && (strncmp(p->name, board_name, sizeof(board_name)) != 0)) + while (*p->name && (strcmp(p->name, board_name) != 0)) p++; - if (p->name == NULL) { + if (!*p->name) { printf("BUG! Unable to find default fw layout!\n"); exit(-1); } @@ -247,7 +245,7 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c strcpy(kernel->partition_name, "kernel"); kernel->partition_index = 1; kernel->partition_baseaddr = p->kern_start; - if ( (kernel->partition_length = filelength(kernelfile)) < 0) return (-1); + if ( (kernel->partition_length = filelength(kernelfile)) == (u_int32_t)-1) return (-1); kernel->partition_memaddr = p->kern_entry; kernel->partition_entryaddr = p->kern_entry; strncpy(kernel->filename, kernelfile, sizeof(kernel->filename)); @@ -263,8 +261,8 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c rootfs->partition_entryaddr = 0x; strncpy(rootfs->filename, rootfsfile, sizeof(rootfs->filename)); -printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr); -printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr); + printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr); + printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr); im->part_count = 2; return 0; -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] ar71xx, firmware-utils: split ubdev01 flash layout from XM
The ubdev01 profile defines its own MTDPARTS with smaller firmware partition, so give it its own UBNT_BOARD in mkfwimage. Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/image/Makefile | 2 +- tools/firmware-utils/src/mkfwimage.c | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index cb11104..ca4437b 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1203,7 +1203,7 @@ define Device/ubdev01 $(Device/ubnt-xm) MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7488k(firmware),64k(certs),256k(cfg)ro,64k(EEPROM)ro BOARDNAME := UBNT-UF - UBNT_BOARD := XM + UBNT_BOARD := UBDEV01 UBNT_TYPE := XM UBNT_CHIP := ar7240 endef diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index 00bf439..5dae284 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -81,6 +81,12 @@ fw_layout_t fw_layout_data[] = { .kern_entry = 0x80002000, .firmware_max_length= 0x006A, }, + { + .name = "UBDEV01", + .kern_start = 0x9f05, + .kern_entry = 0x80002000, + .firmware_max_length= 0x006A, + }, { .name = "", }, }; -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/3] firmware-utils: mkfwimage: fix firmware_max_length for XM layout
The new u-boot version bundled with the 5.6.x firmwares from Ubiquiti gets confused by the smaller rootfs partition size; this can lead to various issues: 1. We've gotten reports that flashing from the 5.6.x stock firmware to OpenWrt will brick devices; I wasn't able to reproduce this myself 2. Flashing from 5.5.x stock firmware to OpenWrt and back to stock (via TFTP recovery), following by an update to 5.6.x via web interface can yield a bricked device with the following properties: - It can't be booted without entering commands over a serial console, as u-boot supplies the wrong MTD layout - The web interface won't accept any image with the original flash layout, so stock firmware upgrades are impossible - As the TFTP recovery doesn't update u-boot, returning to the old u-boot from firmware 5.5.x is impossible To recover from 2., creating an OpenWrt image which doesn't set u-boot as read-only and flashing a backup of the old u-boot from there is the only way known to me. (Fixing the mtdparts variable in u-boot-env from OpenWrt might also work; settings this from u-boot over serial didn't have any permanent effect.) Fix all of this by setting the correct flash layout also used by the stock firmware. Flashing has been tested from both firmware 5.5.x and 5.6.x. The fixed layout also matches the mtdparts defined by OpenWrt. Signed-off-by: Matthias Schiffer --- tools/firmware-utils/src/mkfwimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index 5dae284..d8d5239 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -79,7 +79,7 @@ fw_layout_t fw_layout_data[] = { .name = "XM", .kern_start = 0x9f05, .kern_entry = 0x80002000, - .firmware_max_length= 0x006A, + .firmware_max_length= 0x0076, }, { .name = "UBDEV01", -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC] kernel: take bcm47xx_nvram.h from kernel and not backports
compat-wireless/backports now contains a bcm47xx_nvram.h file to backport some of the functions in it which are used by the bcmfmac driver. This file just checks for the kernel versions and provide an empty implementations on older kernel versions. This is OK on most systems, but on bcm47xx / bcm53xx systems we want to call the real functions here. This commit removes the file from backports in our build process like we do it with the bcma and ssb header files. Instead we add a recent version into our kernel so all code uses only one header file. On bcm47xx / bcm53xx the real implementations of this code will be used. Reported-by: Hante Meuleman Signed-off-by: Hauke Mehrtens [Backport of r47467. The recent mac80211 backport was missing this patch, breaking the build of the brcmfmac module] Signed-off-by: Matthias Schiffer --- This fixes the compile failure of the brcmfmac module (and thus ALL_KMODS builds) in CC after the latest mac80211 backport. Compile tested kernel and mac80211 with ALL_KMODS on brcm47xx and bcm53xx. .../bcm53xx/files/include/linux/bcm47xx_nvram.h| 49 ...xx-Move-NVRAM-header-to-the-include-linux.patch | 37 --- ...x-allow-retrieval-of-complete-nvram-conte.patch | 36 --- .../patches-3.18/030-backport_bcm47xx_nvram.patch | 52 ++ 4 files changed, 52 insertions(+), 122 deletions(-) delete mode 100644 target/linux/bcm53xx/files/include/linux/bcm47xx_nvram.h create mode 100644 target/linux/generic/patches-3.18/030-backport_bcm47xx_nvram.patch diff --git a/target/linux/bcm53xx/files/include/linux/bcm47xx_nvram.h b/target/linux/bcm53xx/files/include/linux/bcm47xx_nvram.h deleted file mode 100644 index 2793652..000 --- a/target/linux/bcm53xx/files/include/linux/bcm47xx_nvram.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#ifndef __BCM47XX_NVRAM_H -#define __BCM47XX_NVRAM_H - -#include -#include -#include - -#ifdef CONFIG_BCM47XX_NVRAM -int bcm47xx_nvram_init_from_mem(u32 base, u32 lim); -int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len); -int bcm47xx_nvram_gpio_pin(const char *name); -char *bcm47xx_nvram_get_contents(size_t *val_len); -static inline void bcm47xx_nvram_release_contents(char *nvram) -{ - vfree(nvram); -}; -#else -static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) -{ - return -ENOTSUPP; -}; -static inline int bcm47xx_nvram_getenv(const char *name, char *val, - size_t val_len) -{ - return -ENOTSUPP; -}; -static inline int bcm47xx_nvram_gpio_pin(const char *name) -{ - return -ENOTSUPP; -}; - -static inline char *bcm47xx_nvram_get_contents(size_t *val_len) -{ - return NULL; -}; - -static inline void bcm47xx_nvram_release_contents(char *nvram) -{ -}; -#endif - -#endif /* __BCM47XX_NVRAM_H */ diff --git a/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch b/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch index c1c0927..e9e3873 100644 --- a/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch +++ b/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch @@ -182,40 +182,3 @@ Signed-off-by: Ralf Baechle #endif #include "ssb_private.h" /dev/null -+++ b/include/linux/bcm47xx_nvram.h -@@ -0,0 +1,34 @@ -+/* -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ */ -+ -+#ifndef __BCM47XX_NVRAM_H -+#define __BCM47XX_NVRAM_H -+ -+#include -+#include -+ -+#ifdef CONFIG_BCM47XX -+int bcm47xx_nvram_init_from_mem(u32 base, u32 lim); -+int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len); -+int bcm47xx_nvram_gpio_pin(const char *name); -+#else -+static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) -+{ -+ return -ENOTSUPP; -+}; -+static inline int bcm47xx_nvram_getenv(const char *name, char *val, -+ size_t val_len) -+{ -+ return -ENOTSUPP; -+}; -+static inline int bcm47xx_nvram_gpio_pin(const char *name) -+{ -+ return -ENOTSUPP; -+}; -+#endif -+ -+#endif /* __BCM47XX_NVRAM_H */ diff --git a/target/linux/brcm47xx/patches-3.18/032-08-mips-bcm47xx-allow-retrieval-of-complete-nvram-conte.patch b/target/linux/brcm47xx/patches-3.18/032-08-mips-bcm47xx-allow-retrieval-of-complete-nvram-conte.patch index 105c651..254be46 100644 --- a/target/linu
[OpenWrt-Devel] [PATCH CC 00/32] The CC backport wishlist
Hi, nbd asked for suggestions for patches to backport to CC, so here I deliver the set of patches we're currently carrying in Gluon and that I deem worthy for backporting. See below for some additional comments regarding the patches. We also carry two kernel bugfixes backported from 4.x to 3.18. Would you prefer me to send them for the OpenWrt trunk first, or is 3.18 not relevant for the trunk anymore and I should just send them for CC? Thanks, Matthias > ar71xx: add support for tp-link wr740n v5.0 (EU) > ar71xx: add support for TL-WR741ND v5 Trivial hardware support. > sunxi: don't copy DTS files to BIN_DIR > sunxi: fix uboot install location > sunxi: respect CONFIG_TARGET_IMAGES_GZIP Fixes the image builder for sunxi; misc cleanup. > odhcp6c: add option "sourcefilter" to disable source filter Source routing may make the source address selection very non-intuitive. Backport support for the "sourcefilter" option to allow switching of source routing when desired. > base-files: default_postinst: propagate the real postinst return code Required for our sanity-checking postinst scripts. > odhcp6c: minor fixes Significatly reduces the number of spawned processes and thus load/memory consumption in large broadcast domains, especially in networks with multiple radvds. > tools/firmware-utils: tplink-safeloader: clean up code > tools/firmware-utils: tplink-safeloader: fix support-list format, >clean up vendor information > tools/firmware-utils: tplink-safeloader: add version 1.1 support to >CPE210/220/510/520 Add support for CPE210/510... v1.1; misc cleanup. > ar71xx: add support for the TP-LINK TL-WR1043ND v3 Trivial hardware support. > ar71xx: fix AR71XX_MODEL on TP-Link TL-WR703N AR71XX_MODEL fix. > OpenSSL: Added source/old to PKG_SOURCE_URL Allows building older trees without having to fixup the OpenSSL URL (especially annoying when OpenSSL is just a build dep, but not actually used). > firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile >warnings > ar71xx, firmware-utils: split ubdev01 flash layout from XM > firmware-utils: mkfwimage: fix firmware_max_length for XM layout > kernel: disable software protection bits for macronix flash chips at >init These four patches fix compatiblity with the bootloader of AirOS 5.6.x on Airmax M XM/XW devices. > brcm2708-gpu-fw: move pkg build dir to kernel build dir to fix rebuild >bugs after cleaning the kernel tree Build fix. > kernel/gpio_keys: load module on pre-init Fix failsafe mode on WDR4900. > ar71xx/lzma-loader: fix O32 ABI conformance We suspect we might have hit this bug. Although we are still in the process of verifying that this patch actually fixes our issues, applying it certainly doesn't hurt. > ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link >TL-WR841N/ND v9, Compex WPJ531) > ar71xx: rework patch for qca953x/956x > ar71xx: compex wpj531 fix ethernet registration > ar71xx: compex wpj531 fix setting mac address on ethernet > ar71xx: compex wpj531 register usb support QCA953x stability improvents and related fixes. We've had reports of stability issues on TL-WR841 v9 (QCA9533) before adding these patches. We're not sure if they improve the situation, but they don't make it worse. > mac80211: set mcast-rate for mesh point interfaces I'm not sure why this was excluded from the mac80211 backport, but we need this feature. > ar71xx: rename firmware for Chinese version of TL-WR941ND v6 > ar71xx: add support for TP-LINK TL-WR941ND v6 (international version) Prevent people from bricking their devices because of installing the image for the Chinese version... > x86/generic: enable pata_atiixp driver Adds support for devices like the Futro thin-clients. > base-files: add /etc/profile.d support Simple feature, we want to use it. > kernel: add Realtek USB to Ethernet modules Add packages for two kernel modules. package/base-files/files/etc/profile | 7 + package/base-files/files/lib/functions.sh | 10 +- package/boot/uboot-sunxi/Makefile | 15 +- package/kernel/brcm2708-gpu-fw/Makefile| 2 +- package/kernel/linux/modules/input.mk | 2 +- package/kernel/linux/modules/usb.mk| 30 +++ .../mac80211/files/lib/netifd/wireless/mac80211.sh | 14 +- package/libs/openssl/Makefile | 5 +- package/network/ipv6/odhcp6c/Makefile | 4 +- package/network/ipv6/odhcp6c/files/dhcpv6.script | 9 +- package/network/ipv6/odhcp6c/files/dhcpv6.sh | 6 +- target/linux/ar71xx/base-files/etc/diag.sh | 3 +- .../ar71xx/base-files/etc/uci-defaults/01_leds | 9 + .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 5 +- .../lib/preinit/05_set_preinit_iface_ar71xx| 1 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3
[OpenWrt-Devel] [PATCH CC 02/32] ar71xx: add support for TL-WR741ND v5
This device is identical to the TL-WR740N v5, it even uses the same HWID (which wasn't the case for older TL-WR741ND revisions). Signed-off-by: Matthias Schiffer Backport of r46238 --- target/linux/ar71xx/image/Makefile | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 1fe88d5..78d35e1 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -531,6 +531,14 @@ define Device/tl-wr741nd-v4 CONSOLE := ttyATH0,115200 endef +define Device/tl-wr741nd-v5 +$(Device/tplink-4mlzma) +BOARDNAME := TL-WR741ND-v4 +DEVICE_PROFILE := TLWR741 +TPLINK_HWID := 0x0745 +CONSOLE := ttyATH0,115200 +endef + define Device/tl-wr743nd-v2 $(Device/tplink-4mlzma) BOARDNAME := TL-WR741ND-v4 @@ -538,7 +546,7 @@ define Device/tl-wr743nd-v2 TPLINK_HWID := 0x07430002 CONSOLE := ttyATH0,115200 endef -TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2 +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-wr841n-v8 $(Device/tplink-4mlzma) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 01/32] ar71xx: add support for tp-link wr740n v5.0 (EU)
TP-Link ships wr740n v5.0 to Romania (so probably everywhere except China) with 4 MB flash and 32 MB memory (confirmed by their local support). This patch adds support for the v5.0 clone of v4, i just tested it on my own v5.0 router and it works. Signed-off-by: Daniel Petre Backport of r46115 --- target/linux/ar71xx/image/Makefile | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 4336697..1fe88d5 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -501,6 +501,14 @@ define Device/tl-wr740n-v4 CONSOLE := ttyATH0,115200 endef +define Device/tl-wr740n-v5 +$(Device/tplink-4mlzma) +BOARDNAME := TL-WR741ND-v4 +DEVICE_PROFILE := TLWR740 +TPLINK_HWID := 0x0745 +CONSOLE := ttyATH0,115200 +endef + define Device/tl-wr741nd-v1 $(Device/tplink-4m) BOARDNAME := TL-WR741ND @@ -530,7 +538,7 @@ define Device/tl-wr743nd-v2 TPLINK_HWID := 0x07430002 CONSOLE := ttyATH0,115200 endef -TARGET_DEVICES += tl-wr740n-v4 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2 +TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2 define Device/tl-wr841n-v8 $(Device/tplink-4mlzma) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 03/32] sunxi: don't copy DTS files to BIN_DIR
The DTS files aren't useful (other targets don't copy them either) and clutter BIN_DIR with files unrelated to the chosen profile. Signed-off-by: Matthias Schiffer Backport of r46604 --- target/linux/sunxi/image/Makefile | 30 +- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 6fcd61f..b96a360 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -11,28 +11,12 @@ include $(INCLUDE_DIR)/host.mk FAT32_BLOCK_SIZE=1024 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE -BOARDS:= \ - sun4i-a10-cubieboard \ - sun4i-a10-olinuxino-lime \ - sun4i-a10-pcduino \ - sun5i-a13-olinuxino \ - sun6i-a31-colombus \ - sun6i-a31-m9 \ - sun7i-a20-bananapi \ - sun7i-a20-bananapro \ - sun7i-a20-cubieboard2 \ - sun7i-a20-cubietruck \ - sun7i-a20-olinuxino-lime \ - sun7i-a20-olinuxino-micro \ - sun7i-a20-pcduino3 \ - sun7i-a20-lamobo-r1 - define Image/BuildKernel mkimage -A arm -O linux -T kernel -C none \ -a 0x40008000 -e 0x40008000 \ -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \ -d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage - + ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs @@ -42,20 +26,16 @@ define Image/BuildKernel $(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \ ) endif - - $(foreach board,$(BOARDS), - $(CP) $(DTS_DIR)/$(board).dtb $(BIN_DIR)/ - ) endef define Image/Build/SDCard rm -f $(KDIR)/boot.img mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS) - + mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(2).dtb ::dtb + mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage - + ./gen_sunxi_sdcard_img.sh \ $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \ $(KDIR)/boot.img \ @@ -124,7 +104,7 @@ endef define Image/Build $(call Image/Build/$(1),$(1)) $(call Image/Build/Profile/$(PROFILE),$(1)) - + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync endef -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 04/32] sunxi: fix uboot install location
Install uboot files to KERNEL_BUILD_DIR instead of BIN_DIR to fix ImageBuilder. Similar fixes are necessary for many (all?) other uboot targets. Signed-off-by: Matthias Schiffer Backport of r46605 --- package/boot/uboot-sunxi/Makefile | 15 --- target/linux/sunxi/image/Makefile | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 14ba922..9032600 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -6,6 +6,7 @@ # include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=u-boot PKG_VERSION:=2015.01 @@ -16,7 +17,7 @@ PKG_SOURCE_URL:= \ PKG_MD5SUM:=7f08dc9e98a71652bd696ed6ec95 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0 GPL-2.0+ PKG_LICENSE_FILES:=Licenses/README @@ -136,16 +137,16 @@ define Build/Compile endef define Package/uboot/install/default - $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) $(CP) $(PKG_BUILD_DIR)/u-boot.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin $(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-spl.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin $(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin $(CP) uEnv.txt \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt - mkimage -C none -A arm -T script -d $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-boot.scr + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt + mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \ + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr endef define Package/uboot/install/template diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index b96a360..19ab935 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -32,7 +32,7 @@ define Image/Build/SDCard rm -f $(KDIR)/boot.img mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS) - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr + mcopy -i $(KDIR)/boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage @@ -42,7 +42,7 @@ define Image/Build/SDCard $(KDIR)/root.$(1) \ $(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ - $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-u-boot-with-spl.bin + $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin endef define Image/Build/Profile/A10-OLinuXino-Lime -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 05/32] sunxi: respect CONFIG_TARGET_IMAGES_GZIP
Signed-off-by: Matthias Schiffer Backport of r46608 --- target/linux/sunxi/image/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 19ab935..d3f4409 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -43,6 +43,10 @@ define Image/Build/SDCard $(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin + + ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) + gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img + endif endef define Image/Build/Profile/A10-OLinuXino-Lime -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 06/32] odhcp6c: add option "sourcefilter" to disable source filter
Signed-off-by: Steven Barth Backport of r46408 --- package/network/ipv6/odhcp6c/Makefile| 2 +- package/network/ipv6/odhcp6c/files/dhcpv6.script | 2 +- package/network/ipv6/odhcp6c/files/dhcpv6.sh | 6 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 5bf43bd..75de54c 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_VERSION:=2015-07-13 +PKG_VERSION:=2015-07-18 PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index b8cbddb..33f6d9b 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -76,7 +76,7 @@ setup_interface () { done for entry in $RA_ROUTES; do - local duplicate=0 + local duplicate=$NOSOURCEFILTER local addr="${entry%%/*}" entry="${entry#*/}" local mask="${entry%%,*}" diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index adcb100..4a453fd 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -28,14 +28,15 @@ proto_dhcpv6_init_config() { proto_config_add_boolean delegate proto_config_add_int "soltimeout" proto_config_add_boolean fakeroutes + proto_config_add_boolean sourcefilter } proto_dhcpv6_setup() { local config="$1" local iface="$2" - local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes - json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes + local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter + json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter # Configure @@ -76,6 +77,7 @@ proto_dhcpv6_setup() { [ -n "$zone_464xlat" ] && proto_export "ZONE_464XLAT=$zone_464xlat" [ -n "$zone" ] && proto_export "ZONE=$zone" [ "$fakeroutes" != "0" ] && proto_export "FAKE_ROUTES=1" + [ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1" proto_export "INTERFACE=$config" proto_run_command "$config" odhcp6c \ -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 07/32] base-files: default_postinst: propagate the real postinst return code
Using the postinst script for sanity checks and expecting opkg to fail if the postinst didn't return 0 was possible in Barrier Breaker, propagate the real postinst return code through default_postinst to restore this behaviour. Signed-off-by: Matthias Schiffer Backport of r46653 --- package/base-files/files/lib/functions.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 8d045fa..2f78d67 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -174,7 +174,8 @@ default_prerm() { } default_postinst() { - local pkgname rusers + local pkgname rusers ret + ret=0 pkgname=$(basename ${1%.*}) rusers=$(grep "Require-User:" ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.control) [ -n "$rusers" ] && { @@ -215,7 +216,10 @@ default_postinst() { done } - [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ] && ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ) + if [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ]; then + ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ) + ret=$? + fi [ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null [ "$PKG_UPGRADE" = "1" ] || for i in `cat ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.list | grep "^/etc/init.d/"`; do @@ -225,7 +229,7 @@ default_postinst() { $i start } done - return 0 + return $ret } include() { -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 08/32] odhcp6c: minor fixes
Better synchronize RA & DHCPv6 events Accumulate some events to avoid flooding Restart softwires for address and prefix changes Signed-off-by: Steven Barth Backport of r46518 --- package/network/ipv6/odhcp6c/Makefile| 4 ++-- package/network/ipv6/odhcp6c/files/dhcpv6.script | 7 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 75de54c..aa81e02 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_VERSION:=2015-07-18 +PKG_VERSION:=2015-07-29 PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/sbyx/odhcp6c.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=024525798c5f6aba3af9b2ef7b3af2f3c14f1db8 +PKG_SOURCE_VERSION:=dc186d6d2b0dd4ad23ca5fc69c00e81f796ff6d9 PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0 diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index 33f6d9b..677d35f 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -5,6 +5,8 @@ setup_interface () { local device="$1" + local prefsig="" + local addrsig="" proto_init_update "*" 1 # Merge RA-DNS @@ -34,6 +36,7 @@ setup_interface () { for prefix in $PREFIXES; do proto_add_ipv6_prefix "$prefix" + prefsig="$prefsig ${prefix%%,*}" local entry="${prefix#*/}" entry="${entry#*,}" entry="${entry#*,}" @@ -68,6 +71,7 @@ setup_interface () { local valid="${entry%%,*}" proto_add_ipv6_address "$addr" "$mask" "$preferred" "$valid" 1 + addrsig="$addrsig $addr/$mask" if [ -z "$RA_ADDRESSES" -a -z "$RA_ROUTES" -a \ -z "$RA_DNS" -a "$FAKE_ROUTES" = 1 ]; then @@ -136,6 +140,8 @@ setup_interface () { json_add_string ifname "@$INTERFACE" json_add_string proto map json_add_string type "$MAPTYPE" + json_add_string _prefsig "$prefsig" + [ "$MAPTYPE" = lw4o6 ] && json_add_string _addrsig "$addrsig" json_add_string rule "$MAPRULE" json_add_string tunlink "$INTERFACE" [ -n "$ZONE_MAP" ] || ZONE_MAP=$ZONE @@ -163,6 +169,7 @@ setup_interface () { json_add_string ifname "@$INTERFACE" json_add_string proto "464xlat" json_add_string tunlink "$INTERFACE" + json_add_string _addrsig "$addrsig" [ -n "$ZONE_464XLAT" ] || ZONE_464XLAT=$ZONE [ -n "$ZONE_464XLAT" ] && json_add_string zone "$ZONE_464XLAT" [ -n "$IFACE_464XLAT_DELEGATE" ] && json_add_boolean delegate "$IFACE_464XLAT_DELEGATE" -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 09/32] tools/firmware-utils: tplink-safeloader: clean up code
There is no reason for the internal functions not to be static. Signed-off-by: Matthias Schiffer Backport of r47210 --- tools/firmware-utils/src/tplink-safeloader.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 9c5bb54..4607a1d 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -152,7 +152,7 @@ static const unsigned char cpe510_support_list[] = /** Allocates a new image partition */ -struct image_partition_entry alloc_image_partition(const char *name, size_t len) { +static struct image_partition_entry alloc_image_partition(const char *name, size_t len) { struct image_partition_entry entry = {name, len, malloc(len)}; if (!entry.data) error(1, errno, "malloc"); @@ -161,12 +161,12 @@ struct image_partition_entry alloc_image_partition(const char *name, size_t len) } /** Frees an image partition */ -void free_image_partition(struct image_partition_entry entry) { +static void free_image_partition(struct image_partition_entry entry) { free(entry.data); } /** Generates the partition-table partition */ -struct image_partition_entry make_partition_table(const struct flash_partition_entry *p) { +static struct image_partition_entry make_partition_table(const struct flash_partition_entry *p) { struct image_partition_entry entry = alloc_image_partition("partition-table", 0x800); char *s = (char *)entry.data, *end = (char *)(s+entry.size); @@ -202,7 +202,7 @@ static inline uint8_t bcd(uint8_t v) { /** Generates the soft-version partition */ -struct image_partition_entry make_soft_version(uint32_t rev) { +static struct image_partition_entry make_soft_version(uint32_t rev) { struct image_partition_entry entry = alloc_image_partition("soft-version", sizeof(struct soft_version)); struct soft_version *s = (struct soft_version *)entry.data; @@ -233,14 +233,14 @@ struct image_partition_entry make_soft_version(uint32_t rev) { } /** Generates the support-list partition */ -struct image_partition_entry make_support_list(const unsigned char *support_list, size_t len) { +static struct image_partition_entry make_support_list(const unsigned char *support_list, size_t len) { struct image_partition_entry entry = alloc_image_partition("support-list", len); memcpy(entry.data, support_list, len); return entry; } /** Creates a new image partition with an arbitrary name from a file */ -struct image_partition_entry read_file(const char *part_name, const char *filename, bool add_jffs2_eof) { +static struct image_partition_entry read_file(const char *part_name, const char *filename, bool add_jffs2_eof) { struct stat statbuf; if (stat(filename, &statbuf) < 0) @@ -300,7 +300,7 @@ struct image_partition_entry read_file(const char *part_name, const char *filena I think partition-table must be the first partition in the firmware image. */ -void put_partitions(uint8_t *buffer, const struct image_partition_entry *parts) { +static void put_partitions(uint8_t *buffer, const struct image_partition_entry *parts) { size_t i; char *image_pt = (char *)buffer, *end = image_pt + 0x800; @@ -325,7 +325,7 @@ void put_partitions(uint8_t *buffer, const struct image_partition_entry *parts) } /** Generates and writes the image MD5 checksum */ -void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) { +static void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) { MD5_CTX ctx; MD5_Init(&ctx); @@ -349,7 +349,7 @@ void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) { 1014-1813Image partition table (2048 bytes, padded with 0xff) 1814-Firmware partitions */ -void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, const struct image_partition_entry *parts, size_t *len) { +static void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, const struct image_partition_entry *parts, size_t *len) { *len = 0x1814; size_t i; @@ -381,7 +381,7 @@ void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, co should be generalized when TP-LINK starts building its safeloader into hardware with different flash layouts. */ -void * generate_sysupgrade_image(const struct flash_partition_entry *flash_parts, const struct image_partition_entry *image_parts, size_t *len) { +static void * generate_sysupgrade_image(const struct flash_partition_entry *flash_parts, const struct image_partition_entry *image_parts, size_t *len) { const struct flash_partition_entry *flash_os_image = &flash_parts[5]; const struct flash_partition_entry *flash_soft_version = &
[OpenWrt-Devel] [PATCH CC 11/32] tools/firmware-utils: tplink-safeloader: add version 1.1 support to CPE210/220/510/520
The hardware is identical to version 1.0, add the new models to the support list. Also remove the empty line at the end of the support list, the current stock images don't have it either. Signed-off-by: Matthias Schiffer Backport of r47212 --- tools/firmware-utils/src/tplink-safeloader.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 66658aa..77a894b 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -129,17 +129,17 @@ static const struct flash_partition_entry cpe510_partitions[] = { /** The support list for CPE210/220/510/520 - - The stock images also contain strings for two more devices: BS510 and BS210. - At the moment, there exists no public information about these devices. */ static const char cpe510_support_list[] = "SupportList:\r\n" "CPE510(TP-LINK|UN|N300-5):1.0\r\n" + "CPE510(TP-LINK|UN|N300-5):1.1\r\n" "CPE520(TP-LINK|UN|N300-5):1.0\r\n" + "CPE520(TP-LINK|UN|N300-5):1.1\r\n" "CPE210(TP-LINK|UN|N300-2):1.0\r\n" + "CPE210(TP-LINK|UN|N300-2):1.1\r\n" "CPE220(TP-LINK|UN|N300-2):1.0\r\n" - "\r\n"; + "CPE220(TP-LINK|UN|N300-2):1.1\r\n"; #define error(_ret, _errno, _str, ...) \ do {\ -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 10/32] tools/firmware-utils: tplink-safeloader: fix support-list format, clean up vendor information
The first 4 bytes of the support list and the vendor information are supposed to contain the length of these fields. Signed-off-by: Matthias Schiffer Backport of r47211 --- tools/firmware-utils/src/tplink-safeloader.c | 47 ++-- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 4607a1d..66658aa 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -103,7 +103,7 @@ static const uint8_t md5_salt[16] = { /** Vendor information for CPE210/220/510/520 */ -static const unsigned char cpe510_vendor[] = "\x00\x00\x00\x1f""CPE510(TP-LINK|UN|N300-5):1.0\r\n"; +static const char cpe510_vendor[] = "CPE510(TP-LINK|UN|N300-5):1.0\r\n"; /** @@ -133,14 +133,13 @@ static const struct flash_partition_entry cpe510_partitions[] = { The stock images also contain strings for two more devices: BS510 and BS210. At the moment, there exists no public information about these devices. */ -static const unsigned char cpe510_support_list[] = - "\x00\x00\x00\xc8\x00\x00\x00\x00" +static const char cpe510_support_list[] = "SupportList:\r\n" "CPE510(TP-LINK|UN|N300-5):1.0\r\n" "CPE520(TP-LINK|UN|N300-5):1.0\r\n" "CPE210(TP-LINK|UN|N300-2):1.0\r\n" "CPE220(TP-LINK|UN|N300-2):1.0\r\n" - "\r\n\xff"; + "\r\n"; #define error(_ret, _errno, _str, ...) \ do {\ @@ -151,6 +150,14 @@ static const unsigned char cpe510_support_list[] = } while (0) +/** Stores a uint32 as big endian */ +static inline void put32(uint8_t *buf, uint32_t val) { + buf[0] = val >> 24; + buf[1] = val >> 16; + buf[2] = val >> 8; + buf[3] = val; +} + /** Allocates a new image partition */ static struct image_partition_entry alloc_image_partition(const char *name, size_t len) { struct image_partition_entry entry = {name, len, malloc(len)}; @@ -233,9 +240,15 @@ static struct image_partition_entry make_soft_version(uint32_t rev) { } /** Generates the support-list partition */ -static struct image_partition_entry make_support_list(const unsigned char *support_list, size_t len) { - struct image_partition_entry entry = alloc_image_partition("support-list", len); - memcpy(entry.data, support_list, len); +static struct image_partition_entry make_support_list(const char *support_list) { + size_t len = strlen(support_list); + struct image_partition_entry entry = alloc_image_partition("support-list", len + 9); + + put32(entry.data, len); + memset(entry.data+4, 0, 4); + memcpy(entry.data+8, support_list, len); + entry.data[len+8] = '\xff'; + return entry; } @@ -344,12 +357,13 @@ static void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) { --- - -0003Image size (4 bytes, big endian) 0004-0013MD5 hash (hash of a 16 byte salt and the image data starting with byte 0x14) - 0014-1013Vendor information (4096 bytes, padded with 0xff; there seem to be older + 0014-0017Vendor information length (without padding) (4 bytes, big endian) + 0018-1013Vendor information (4092 bytes, padded with 0xff; there seem to be older (VxWorks-based) TP-LINK devices which use a smaller vendor information block) 1014-1813Image partition table (2048 bytes, padded with 0xff) 1814-Firmware partitions */ -static void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, const struct image_partition_entry *parts, size_t *len) { +static void * generate_factory_image(const char *vendor, const struct image_partition_entry *parts, size_t *len) { *len = 0x1814; size_t i; @@ -360,13 +374,12 @@ static void * generate_factory_image(const unsigned char *vendor, size_t vendor_ if (!image) error(1, errno, "malloc"); - image[0] = *len >> 24; - image[1] = *len >> 16; - image[2] = *len >> 8; - image[3] = *len; + put32(image, *len); - memcpy(image+0x14, vendor, vendor_len); - memset(image+0x14+vendor_len, 0xff, 4096-vendor_len); + size_t vendor_len = strlen(vendor); + put32(image+0x14, vendor_len); + memcpy(image+0x18, vendor, vendor_len); + memset(image+0x18+vendor_len, 0xff, 4092-vendor_len); put_partitions(image + 0x1014, parts); put_md5(image+0x04, image+0x14, *len-0x14); @@ -430,7 +443,7 @@ static void do_cpe510(const char *output, const char *kernel_image, const char * parts[0] = make
[OpenWrt-Devel] [PATCH CC 12/32] ar71xx: add support for the TP-LINK TL-WR1043ND v3
The hardware of the v3 is identical to the v2. Based-on-patch-by: Andreas Ziegler Signed-off-by: Matthias Schiffer Backport of r47406 --- target/linux/ar71xx/image/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 78d35e1..d28d6b3 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -2023,6 +2023,7 @@ $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV4,tl-wr941nd-v4,TL-WR741ND,tt $(eval $(call SingleProfile,TPLINK,64kraw,TLWR1043V1,tl-wr1043nd-v1,TL-WR1043ND,ttyS0,115200,0x10430001,1,8M)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V2,tl-wr1043nd-v2,TL-WR1043ND-v2,ttyS0,115200,0x10430002,1,8M)) +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V3,tl-wr1043nd-v3,TL-WR1043ND-v2,ttyS0,115200,0x10430003,1,8M)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99)) $(eval $(call SingleProfile,TPLINK-SAFELOADER,64kraw,CPE510,cpe210-220-510-520,CPE510,ttyS0,115200,$$(cpe510_mtdlayout),CPE510)) @@ -2087,7 +2088,7 @@ $(eval $(call MultiProfile,TLWR743,TLWR743NV1)) $(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7)) $(eval $(call MultiProfile,TLWR842,TLWR842V1)) $(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4)) -$(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2)) +$(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2 TLWR1043V3)) $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4300V1IL TLWDR4310V1 MW4530RV1)) $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M)) $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTROCKETMXW UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO UBNTAIRGW)) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 13/32] ar71xx: fix AR71XX_MODEL on TP-Link TL-WR703N
The hwid check was wrong, causing the AR71XX_MODEL value to end with a space (as $hwver was unset). Signed-off-by: Matthias Schiffer Backport of r47553 --- target/linux/ar71xx/base-files/lib/ar71xx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 0b2857d..f1f5561 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -123,7 +123,7 @@ tplink_board_detect() { "3C0002"*) model="MINIBOX_V1" ;; - "070300"*) + "070301"*) model="TP-Link TL-WR703N" ;; "071000"*) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 18/32] kernel: disable software protection bits for macronix flash chips at init
Signed-off-by: Felix Fietkau Backport r47626 --- .../462-m25p80-mx-disable-software-protection.patch| 10 ++ 1 file changed, 10 insertions(+) create mode 100644 target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch diff --git a/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch new file mode 100644 index 000..d7d7eec --- /dev/null +++ b/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch @@ -0,0 +1,10 @@ +--- a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c +@@ -962,6 +962,7 @@ int spi_nor_scan(struct spi_nor *nor, co + + if (JEDEC_MFR(info->jedec_id) == CFI_MFR_ATMEL || + JEDEC_MFR(info->jedec_id) == CFI_MFR_INTEL || ++ JEDEC_MFR(info->jedec_id) == CFI_MFR_MACRONIX || + JEDEC_MFR(info->jedec_id) == CFI_MFR_SST) { + write_enable(nor); + write_sr(nor, 0); -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 20/32] kernel/gpio_keys: load module on pre-init
fix rescue mode on wdr4900 Signed-off-by: Alexander Couzens Backport of r48793 --- package/kernel/linux/modules/input.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk index 86ff33c..eed9aa2 100644 --- a/package/kernel/linux/modules/input.mk +++ b/package/kernel/linux/modules/input.mk @@ -75,7 +75,7 @@ define KernelPackage/input-gpio-keys CONFIG_KEYBOARD_GPIO \ CONFIG_INPUT_KEYBOARD=y FILES:=$(LINUX_DIR)/drivers/input/keyboard/gpio_keys.ko - AUTOLOAD:=$(call AutoProbe,gpio_keys) + AUTOLOAD:=$(call AutoProbe,gpio_keys,1) endef define KernelPackage/input-gpio-keys/description -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 21/32] ar71xx/lzma-loader: fix O32 ABI conformance
According to the calling convention of the o32 ABI the caller function must reserve stack space for $a0-$a3 registers in case the callee needs to save its arguments. The assembly code of the loader does not reserve stack space for these registers thus when the 'loader_main' function needs to save its arguments, those will be stored in the 'workspace' area instead of the stack. Because the workspace area is also used by other part of the code, the saved register values gets overwritten and this often leads to failed kernel boots. Fix the code to reserve stack space for the registers to avoid this error. Signed-off-by: Gabor Juhos Backport of r48279 --- target/linux/ar71xx/image/lzma-loader/src/head.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/ar71xx/image/lzma-loader/src/head.S b/target/linux/ar71xx/image/lzma-loader/src/head.S index 543996a..47a7c9b 100644 --- a/target/linux/ar71xx/image/lzma-loader/src/head.S +++ b/target/linux/ar71xx/image/lzma-loader/src/head.S @@ -109,6 +109,9 @@ __bss_check: /* Setup new "C" stack */ la sp, _stack + /* reserve stack space for a0-a3 registers */ + subusp, 16 + /* jump to the decompressor routine */ la t0, loader_main jr t0 -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 22/32] ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link TL-WR841N/ND v9, Compex WPJ531)
The initialization routines for these boards were relying on some (wrong) defaults for the QCA953x ethernet. Make these defaults explicit to prevent breaking them when the QCA953x defaults are fixed. Signed-off-by: Matthias Schiffer Backport of r46206 --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c | 6 ++ target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 7 +++ 2 files changed, 13 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c index c28afc6..3e5c2a2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c @@ -109,12 +109,18 @@ static void __init tl_ap143_setup(void) ath79_register_mdio(0, 0x0); /* LAN */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_switch_data.phy_poll_mask |= BIT(4); ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); ath79_register_eth(1); /* WAN */ ath79_switch_data.phy4_mii_en = 1; ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.phy_mask = BIT(4); ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); ath79_register_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c index bc13d70..e665a2e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c @@ -105,12 +105,19 @@ static void __init common_setup(void) ath79_register_mdio(0, 0x0); /* LAN */ + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.phy_mask = BIT(4); ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0); ath79_register_eth(0); /* WAN */ ath79_switch_data.phy4_mii_en = 1; + ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth1_data.speed = SPEED_100; + ath79_switch_data.phy_poll_mask |= BIT(4); ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1); ath79_register_eth(1); -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 24/32] ar71xx: compex wpj531 fix ethernet registration
In fb6f62e97733312053ab593fcf68eea47a21169e several settings are set on the ethernet device, but they are not working. Fix Ethernet by setting the right values. Signed-off-by: Christian Mehlis Backport of r46281 --- target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c index e665a2e..b106917 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c @@ -115,8 +115,8 @@ static void __init common_setup(void) /* WAN */ ath79_switch_data.phy4_mii_en = 1; ath79_eth1_data.duplex = DUPLEX_FULL; - ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII; - ath79_eth1_data.speed = SPEED_100; + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.speed = SPEED_1000; ath79_switch_data.phy_poll_mask |= BIT(4); ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1); ath79_register_eth(1); -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 26/32] ar71xx: compex wpj531 register usb support
Signed-off-by: Christian Mehlis Backport of r46283 --- target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c index 2cc2fe8..8a238da 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c @@ -123,6 +123,7 @@ static void __init common_setup(void) ath79_register_wmac(art + WPJ531_WMAC_CALDATA_OFFSET, NULL); ath79_register_pci(); + ath79_register_usb(); } static void __init wpj531_setup(void) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 23/32] ar71xx: rework patch for qca953x/956x
Patch cherry-picked from the following location: https://www.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?h=release/coconut_ioe4531_2.0&id=5c357bf6c763e4140dddcc9a3bc5f005525a9c0e Changelist, - add more register defines - add EHCI support - fix GPIO pin count to 18 - fix chained irq disabled - fix GMAC0/GMAC1 initial - fix WMAC irq number to 47 - merge the changes of dev-eth.c from the patch to file. Signed-off-by: Miaoqing Pan Signed-off-by: Matthias Schiffer Backport of r46207 --- .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 18 +- ...07-MIPS-ath79-add-support-for-QCA953x-SoC.patch | 300 - ...35-MIPS-ath79-add-support-for-QCA956x-SoC.patch | 113 ++-- .../736-MIPS-ath79-fix-chained-irq-disable.patch | 21 +- 4 files changed, 339 insertions(+), 113 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c index ae3db4c..ff94e2e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -198,6 +198,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask) case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: mdio_dev = &ath79_mdio1_device; mdio_data = &ath79_mdio1_data; break; @@ -256,6 +258,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask) break; case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: mdio_data->builtin_switch = 1; break; @@ -571,6 +575,8 @@ static void __init ath79_init_eth_pll_data(unsigned int id) case ATH79_SOC_QCA9533: case ATH79_SOC_QCA9556: case ATH79_SOC_QCA9558: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pll_10 = AR934X_PLL_VAL_10; pll_100 = AR934X_PLL_VAL_100; pll_1000 = AR934X_PLL_VAL_1000; @@ -627,6 +633,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->phy_if_mode = PHY_INTERFACE_MODE_MII; break; @@ -687,7 +695,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR7241: case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: - case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->phy_if_mode = PHY_INTERFACE_MODE_GMII; break; @@ -697,6 +706,7 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR9341: case ATH79_SOC_AR9342: case ATH79_SOC_AR9344: + case ATH79_SOC_QCA9533: switch (pdata->phy_if_mode) { case PHY_INTERFACE_MODE_MII: case PHY_INTERFACE_MODE_GMII: @@ -986,6 +996,7 @@ void __init ath79_register_eth(unsigned int id) case ATH79_SOC_AR9341: case ATH79_SOC_AR9342: case ATH79_SOC_AR9344: + case ATH79_SOC_QCA9533: if (id == 0) { pdata->reset_bit = AR934X_RESET_GE0_MAC | AR934X_RESET_GE0_MDIO; @@ -1017,7 +1028,8 @@ void __init ath79_register_eth(unsigned int id) pdata->fifo_cfg3 = 0x01f00140; break; - case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: if (id == 0) { pdata->reset_bit = AR933X_RESET_GE0_MAC | AR933X_RESET_GE0_MDIO; @@ -1123,6 +1135,8 @@ void __init ath79_register_eth(unsigned int id) case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->mii_bus_dev = &ath79_mdio1_device.dev; break; diff --git a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch index f3b4446..cf10af3 100644 --- a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch +++ b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch @@ -175,6 +175,48 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL
[OpenWrt-Devel] [PATCH CC 28/32] ar71xx: rename firmware for Chinese version of TL-WR941ND v6
It seems there are two *different* versions on TL-WR941ND v6: Chinese and European one. Currently supported by OpenWrt is Chinese one. Rename firmware to make it clear. For details see: http://wiki.openwrt.org/toh/tp-link/tl-wr941nd https://forum.openwrt.org/viewtopic.php?id=59295 Signed-off-by: Rafał Miłecki Backport of r47107 --- target/linux/ar71xx/image/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 05ef1d2..24c60f5 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -598,13 +598,14 @@ define Device/tl-wr941nd-v5 TPLINK_HWID := 0x09410005 endef -define Device/tl-wr941nd-v6 +# Chinese version (unlike European) is similar to the TL-WDR3500 +define Device/tl-wr941nd-v6-cn $(Device/tplink-4mlzma) BOARDNAME := TL-WDR3500 DEVICE_PROFILE := TLWR941 TPLINK_HWID := 0x09410006 endef -TARGET_DEVICES += tl-wr941nd-v5 tl-wr941nd-v6 +TARGET_DEVICES += tl-wr941nd-v5 tl-wr941nd-v6-cn define Device/tl-wr1041n-v2 $(Device/tplink-4mlzma) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 14/32] OpenSSL: Added source/old to PKG_SOURCE_URL
OpenSSL moves old versions of the library from http://www.openssl.org/source/ to http://www.openssl.org/source/old/$version/ breaking the old links. That behavior breaks the OpenWRT-build every time OpenSSL releases a new version. This patch adds http://www.openssl.org/source/old/$version/ to the PKG_SOURCE_URL of OpenSSL to avoid breaking the build whenever OpenSSL releases a new version. Signed-off-by: Kevin Kirsch Reviewed-by: Alexander Dahl Backport of r47860 --- package/libs/openssl/Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index ad93678..8cd32a7 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -8,7 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl -PKG_VERSION:=1.0.2f +PKG_BASE:=1.0.2 +PKG_BUGFIX:=f +PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) PKG_RELEASE:=1 PKG_USE_MIPS16:=0 @@ -16,6 +18,7 @@ PKG_BUILD_PARALLEL:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.openssl.org/source/ \ + http://www.openssl.org/source/old/$(PKG_BASE)/ \ ftp://ftp.funet.fi/pub/crypt/mirrors/ftp.openssl.org/source \ ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/ PKG_MD5SUM:=b3bf73f507172be9292ea2a8c28b659d -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 27/32] mac80211: set mcast-rate for mesh point interfaces
In order to set the multicast rate for mesh point interfaces the "mesh join" was made explicit and moved to mac80211_setup_vif(), similar to how it is done for IBSS interfaces. Previously, the mesh join was made implicit in case authentication (i.e. $key) was not used when creating the interface in mac80211_prepare_vif(), while using authentication would create the interface first, then join later in mac80211_setup_vif() by starting authsae. Signed-off-by: Nils Schneider Backport of r47408 --- .../kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 2852f3e..fb2f928 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -455,12 +455,7 @@ mac80211_prepare_vif() { } ;; mesh) - json_get_vars key mesh_id - if [ -n "$key" ]; then - iw phy "$phy" interface add "$ifname" type mp - else - iw phy "$phy" interface add "$ifname" type mp mesh_id "$mesh_id" - fi + iw phy "$phy" interface add "$ifname" type mp ;; monitor) iw phy "$phy" interface add "$ifname" type monitor @@ -606,6 +601,13 @@ mac80211_setup_vif() { wireless_vif_parse_encryption mac80211_setup_supplicant || failed=1 fi + else + json_get_vars mesh_id mcast_rate + + mcval= + [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate" + + iw dev "$ifname" mesh join "$mesh_id" ${mcval:+mcast-rate $mcval} fi for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 29/32] ar71xx: add support for TP-LINK TL-WR941ND v6 (international version)
The international version is completely different from the already supported Chinese version. The WLAN of the QCA956x SoC used by this router has been fixed in r46948. This patch looks like it changes a lot in 700-MIPS-ath79-openwrt-machines.patch; that is not the case. Unfortunately, quilt decided to completely reorganize the Kconfig patch even though only a single section has been added. Signed-off-by: Matthias Schiffer Backport of r47420 --- target/linux/ar71xx/base-files/etc/diag.sh | 3 +- .../ar71xx/base-files/etc/uci-defaults/01_leds | 9 ++ .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../lib/preinit/05_set_preinit_iface_ar71xx| 1 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3.18| 1 + .../files/arch/mips/ath79/mach-tl-wr941nd-v6.c | 149 + target/linux/ar71xx/image/Makefile | 9 +- .../610-MIPS-ath79-openwrt-machines.patch | 17 ++- 10 files changed, 189 insertions(+), 5 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd-v6.c diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 89fe53c..3e80c32 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -279,7 +279,8 @@ get_status_led() { tl-wdr4300 | \ tl-wr703n | \ tl-wr710n | \ - tl-wr720n-v3) + tl-wr720n-v3 | \ + tl-wr941nd-v6) status_led="tp-link:blue:system" ;; tl-wr841n-v9) diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 5241db2..11b3fa0 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -460,6 +460,15 @@ tl-wr941nd-v5) ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" ;; +tl-wr941nd-v6) + ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth0" + ucidef_set_led_switch "lan1" "LAN1" "tp-link:blue:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "tp-link:blue:lan2" "switch0" "0x08" + ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04" + ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02" + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:blue:wlan" "phy0tpt" + ;; + tl-wa830re-v2) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 8143d2d..5a74461 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -226,6 +226,7 @@ tl-mr3420-v2 |\ tl-wr841n-v8 |\ tl-wr842n-v2 |\ tl-wr941nd-v5 |\ +tl-wr941nd-v6 |\ wnr2000-v3 |\ wnr2000-v4 |\ wnr2200 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index f1f5561..d0abf42 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -800,6 +800,9 @@ ar71xx_board_detect() { *"TL-WR941N/ND v5") name="tl-wr941nd-v5" ;; + *"TL-WR941N/ND v6") + name="tl-wr941nd-v6" + ;; *"TL-WR703N v1") name="tl-wr703n" ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx index f11ea8c..fd337e1 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx +++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx @@ -35,6 +35,7 @@ set_preinit_iface() { tl-wr720n-v3 |\ tl-wr841n-v8 |\ tl-wr842n-v2 |\ + tl-wr941nd-v6 |\ wnr2000-v3 |\ wnr2200 |\ wnr612-v2 |\ diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 8dea48f..2fc1d10 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/l
[OpenWrt-Devel] [PATCH CC 25/32] ar71xx: compex wpj531 fix setting mac address on ethernet
Signed-off-by: Christian Mehlis Backport of r46282 --- target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c index b106917..2cc2fe8 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c @@ -94,9 +94,8 @@ static struct gpio_keys_button wpj531_gpio_keys[] __initdata = { static void __init common_setup(void) { - u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); - u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); - u8 tmpmac[ETH_ALEN]; + u8 *art = (u8 *) KSEG1ADDR(0x1fff); + u8 *mac = (u8 *) KSEG1ADDR(0x1f02e000); ath79_register_m25p80(NULL); @@ -109,7 +108,7 @@ static void __init common_setup(void) ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ath79_eth0_data.speed = SPEED_100; ath79_eth0_data.phy_mask = BIT(4); - ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0); + ath79_init_mac(ath79_eth0_data.mac_addr, mac + WPJ531_MAC0_OFFSET, 0); ath79_register_eth(0); /* WAN */ @@ -118,10 +117,10 @@ static void __init common_setup(void) ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; ath79_eth1_data.speed = SPEED_1000; ath79_switch_data.phy_poll_mask |= BIT(4); - ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1); + ath79_init_mac(ath79_eth1_data.mac_addr, mac + WPJ531_MAC1_OFFSET, 0); ath79_register_eth(1); - ath79_register_wmac(ee, tmpmac); + ath79_register_wmac(art + WPJ531_WMAC_CALDATA_OFFSET, NULL); ath79_register_pci(); } -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 32/32] kernel: add Realtek USB to Ethernet modules
https://forum.openwrt.org/viewtopic.php?pid=279394 Signed-off-by: Dirk Neukirchen Backport of r46031 --- package/kernel/linux/modules/usb.mk | 30 ++ 1 file changed, 30 insertions(+) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index d1ff455..8f6013c 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1267,6 +1267,36 @@ endef $(eval $(call KernelPackage,usb-net-qmi-wwan)) +define KernelPackage/usb-net-rtl8150 + TITLE:=Kernel module for USB-to-Ethernet Realtek convertors + KCONFIG:=CONFIG_USB_RTL8150 + FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/rtl8150.ko + AUTOLOAD:=$(call AutoProbe,rtl8150) + $(call AddDepends/usb-net) +endef + +define KernelPackage/usb-net-rtl8150/description + Kernel module for USB-to-Ethernet Realtek 8150 convertors +endef + +$(eval $(call KernelPackage,usb-net-rtl8150)) + + +define KernelPackage/usb-net-rtl8152 + TITLE:=Kernel module for USB-to-Ethernet Realtek convertors + KCONFIG:=CONFIG_USB_RTL8152 + FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/r8152.ko + AUTOLOAD:=$(call AutoProbe,r8152) + $(call AddDepends/usb-net) +endef + +define KernelPackage/usb-net-rtl8152/description + Kernel module for USB-to-Ethernet Realtek 8152 USB2.0/3.0 convertors +endef + +$(eval $(call KernelPackage,usb-net-rtl8152)) + + define KernelPackage/usb-net-rndis TITLE:=Support for RNDIS connections KCONFIG:=CONFIG_USB_NET_RNDIS_HOST -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 31/32] base-files: add /etc/profile.d support
OpenWrt should support an optional /etc/profile.d directory like most other Linux distributions. This allows packages to install their own scripts into /etc/profile.d/ directory. The file suffix should make clear, that these scripts are (sourced) shell-snippets. If the user needs e.g. php or lua, one must make sure that the interpreter is called. The reverse failsafe test makes sure, that the effective returncode is 0. A typcal usecase is the inclusion of private helpers, special variables or aliases, which at the moment needs patching the sourcecode and is not well maintainable. Now the builder can simply add there files. v1 initial work of Hendrik Lüth v2 changes regarding RFC (e.g. thomas.lan...@lantiq.com) v3 changes regarding RFC (e.g. mschif...@universe-factory.net) v4 keep it simple and mimic OpenWrt style Signed-off-by: Bastian Bittorf Backport of r46965 --- package/base-files/files/etc/profile | 7 +++ 1 file changed, 7 insertions(+) diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index 170f487..bd008a8 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -14,3 +14,10 @@ export PS1='\u@\h:\w\$ ' [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; } + +[ -n "$FAILSAFE" ] || { + for FILE in /etc/profile.d/*.sh; do + [ -e "$FILE" ] && . "$FILE" + done + unset FILE +} -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 19/32] brcm2708-gpu-fw: move pkg build dir to kernel build dir to fix rebuild bugs after cleaning the kernel tree
Signed-off-by: Felix Fietkau Backport of r48732 --- package/kernel/brcm2708-gpu-fw/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/brcm2708-gpu-fw/Makefile b/package/kernel/brcm2708-gpu-fw/Makefile index eee85e0..286984b 100644 --- a/package/kernel/brcm2708-gpu-fw/Makefile +++ b/package/kernel/brcm2708-gpu-fw/Makefile @@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_REV).tar.gz PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/ PKG_MD5SUM:=f5683c1dcb255714942f7c9fd61b3a0a -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV) include $(INCLUDE_DIR)/package.mk -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 15/32] firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile warnings
Signed-off-by: Matthias Schiffer Backport of r48827 --- tools/firmware-utils/Makefile| 2 +- tools/firmware-utils/src/mkfwimage.c | 12 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index bd69cb4..6d88845 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -32,7 +32,7 @@ define Host/Compile $(call cc,mkzynfw) $(call cc,lzma2eva,-lz) $(call cc,mkcasfw) - $(call cc,mkfwimage,-lz) + $(call cc,mkfwimage,-lz -Wall) $(call cc,mkfwimage2,-lz) $(call cc,imagetag imagetag_cmdline cyg_crc32) $(call cc,add_header) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index e3a03c1..00bf439 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -104,8 +104,6 @@ typedef struct part_data { #define OPTIONS "B:hv:m:o:r:k:" -static int debug = 0; - typedef struct image_info { char magic[16]; char version[256]; @@ -236,9 +234,9 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c fw_layout_t* p; p = &fw_layout_data[0]; - while ((strlen(p->name) != 0) && (strncmp(p->name, board_name, sizeof(board_name)) != 0)) + while (*p->name && (strcmp(p->name, board_name) != 0)) p++; - if (p->name == NULL) { + if (!*p->name) { printf("BUG! Unable to find default fw layout!\n"); exit(-1); } @@ -247,7 +245,7 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c strcpy(kernel->partition_name, "kernel"); kernel->partition_index = 1; kernel->partition_baseaddr = p->kern_start; - if ( (kernel->partition_length = filelength(kernelfile)) < 0) return (-1); + if ( (kernel->partition_length = filelength(kernelfile)) == (u_int32_t)-1) return (-1); kernel->partition_memaddr = p->kern_entry; kernel->partition_entryaddr = p->kern_entry; strncpy(kernel->filename, kernelfile, sizeof(kernel->filename)); @@ -263,8 +261,8 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c rootfs->partition_entryaddr = 0x; strncpy(rootfs->filename, rootfsfile, sizeof(rootfs->filename)); -printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr); -printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr); + printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr); + printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr); im->part_count = 2; return 0; -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 17/32] firmware-utils: mkfwimage: fix firmware_max_length for XM layout
The new u-boot version bundled with the 5.6.x firmwares from Ubiquiti gets confused by the smaller rootfs partition size; this can lead to various issues: 1. We've gotten reports that flashing from the 5.6.x stock firmware to OpenWrt will brick devices; I wasn't able to reproduce this myself 2. Flashing from 5.5.x stock firmware to OpenWrt and back to stock (via TFTP recovery), following by an update to 5.6.x via web interface can yield a bricked device with the following properties: - It can't be booted without entering commands over a serial console, as u-boot supplies the wrong MTD layout - The web interface won't accept any image with the original flash layout, so stock firmware upgrades are impossible - As the TFTP recovery doesn't update u-boot, returning to the old u-boot from firmware 5.5.x is impossible To recover from 2., creating an OpenWrt image which doesn't set u-boot as read-only and flashing a backup of the old u-boot from there is the only way known to me. (Fixing the mtdparts variable in u-boot-env from OpenWrt might also work; settings this from u-boot over serial didn't have any permanent effect.) Fix all of this by setting the correct flash layout also used by the stock firmware. Flashing has been tested from both firmware 5.5.x and 5.6.x. The fixed layout also matches the mtdparts defined by OpenWrt. Signed-off-by: Matthias Schiffer Backport of r48829 --- tools/firmware-utils/src/mkfwimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index 5dae284..d8d5239 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -79,7 +79,7 @@ fw_layout_t fw_layout_data[] = { .name = "XM", .kern_start = 0x9f05, .kern_entry = 0x80002000, - .firmware_max_length= 0x006A, + .firmware_max_length= 0x0076, }, { .name = "UBDEV01", -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 16/32] ar71xx, firmware-utils: split ubdev01 flash layout from XM
The ubdev01 profile defines its own MTDPARTS with smaller firmware partition, so give it its own UBNT_BOARD in mkfwimage. Signed-off-by: Matthias Schiffer Backport of r48828 --- target/linux/ar71xx/image/Makefile | 2 +- tools/firmware-utils/src/mkfwimage.c | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index d28d6b3..05ef1d2 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -2031,7 +2031,7 @@ $(eval $(call SingleProfile,TPLINK-SAFELOADER,64kraw,CPE510,cpe210-220-510-520,C $(eval $(call SingleProfile,UAPPRO,64k,UAPPRO,ubnt-uap-pro,UAP-PRO,ttyS0,115200,BZ,BZ,ar934x)) $(eval $(call SingleProfile,UAPPRO,64k,UBNTUNIFIOUTDOORPLUS,ubnt-unifi-outdoor-plus,UBNT-UOP,ttyS0,115200,BZ,BZ,ar7240)) -$(eval $(call SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,XM,XM,ar7240)) +$(eval $(call SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,UBDEV01,XM,ar7240)) $(eval $(call SingleProfile,UBNT,64k,UBNTRS,ubnt-rs,UBNT-RS,ttyS0,115200,RS,RSx,ar7100)) $(eval $(call SingleProfile,UBNT,64k,UBNTRSPRO,ubnt-rspro,UBNT-RSPRO,ttyS0,115200,RSPRO,RSPRO,ar7100pro)) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index 00bf439..5dae284 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -81,6 +81,12 @@ fw_layout_t fw_layout_data[] = { .kern_entry = 0x80002000, .firmware_max_length= 0x006A, }, + { + .name = "UBDEV01", + .kern_start = 0x9f05, + .kern_entry = 0x80002000, + .firmware_max_length= 0x006A, + }, { .name = "", }, }; -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 30/32] x86/generic: enable pata_atiixp driver
This enables booting from devices that use an ATI PATA controller for the boot device, such as the embedded CF cards in Fujitsu-Siemens Futro thin-clients. Signed-off-by: Felix Kaechele Backport of r47304 --- target/linux/x86/generic/config-default | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/x86/generic/config-default b/target/linux/x86/generic/config-default index eb4b357..9e963bf 100644 --- a/target/linux/x86/generic/config-default +++ b/target/linux/x86/generic/config-default @@ -153,6 +153,7 @@ CONFIG_NLS=y CONFIG_NO_HZ=y # CONFIG_PANASONIC_LAPTOP is not set CONFIG_PATA_AMD=y +CONFIG_PATA_ATIIXP=y CONFIG_PATA_LEGACY=y CONFIG_PATA_MPIIX=y CONFIG_PATA_OLDPIIX=y -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] lua: host: install lnum_config.h
One of the host patches introduces the new header file lnum_config.h included by luaconf.h, but doesn't install it. Install it to allow building C modules for the host Lua. Signed-off-by: Matthias Schiffer --- .../lua/patches-host/010-lua-5.1.3-lnum-full-260308.patch | 11 +++ 1 file changed, 11 insertions(+) diff --git a/package/utils/lua/patches-host/010-lua-5.1.3-lnum-full-260308.patch b/package/utils/lua/patches-host/010-lua-5.1.3-lnum-full-260308.patch index 74b8c6f..2a04ce0 100644 --- a/package/utils/lua/patches-host/010-lua-5.1.3-lnum-full-260308.patch +++ b/package/utils/lua/patches-host/010-lua-5.1.3-lnum-full-260308.patch @@ -1,3 +1,14 @@ +--- a/Makefile b/Makefile +@@ -42,7 +42,7 @@ + + # What to install. + TO_BIN= lua luac +-TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp ++TO_INC= lua.h luaconf.h lualib.h lauxlib.h lnum_config.h ../etc/lua.hpp + TO_LIB= liblua.a + TO_MAN= lua.1 luac.1 + --- a/src/Makefile +++ b/src/Makefile @@ -25,7 +25,7 @@ PLATS= aix ansi bsd freebsd generic linu -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Cannot flash UBNT Loco M2
On 03/11/2016 02:46 PM, Joseph Marlin wrote: > We certainly haven't. I've tried applying these patches - > http://thread.gmane.org/gmane.comp.embedded.openwrt.devel/39001 > > to no avail. I still get hit by a "Error code 2 - Firmware Check Failed". > > I'm really suspecting this comes down to an intentional check by Ubiquiti to > prevent us from flashing, as described on this list and in this comment on > the ticket - https://dev.openwrt.org/ticket/20982#comment:16 > > I have not yet had a chance to change the image header and CRC to look like a > Ubiquiti image, nor do I know how to offhand, but I hope to give it a shot > soon. Hi, there is a lot of misinformation about this issue going around, in particular, the wiki is plain wrong (I'll fix that some time soon.) Here's what's going on: * OpenWrt had wrong partition sizes in its UBNT AirMax firmware for a long time * Old AirOS and the corresponding U-boot version had a bug that made U-boot ignore the partition sizes defined in the firmware image. This made OpenWrt work with the old U-boot despite its broken partition sizes * The new AirOS has been fixed in this regard (but contains a new bug). This also means that the broken OpenWrt images don't work anymore and can cause even more breakage * The new U-boot/AirOS did *not* change the flash layout. Both AirOS 5.5.x and 5.6.x use the same flash layout, the changed flash layout reported in the wiki is caused by broken OpenWrt images! * The OpenWrt trunk since r48829 and the CC branch since r48849 are fixed, meaning they define the correct partition sizes * The "Newly-erased block contained word ..." messages are a consequence of a missing patch in CC that has been backported as r48849 (the new U-boot doesn't remove flash protection, so the flash is just read-only from OpenWrt; TFTP recovery is the only way to upgrade in this state) * AFAIR "Error code 2 - Firmware Check Failed" is the consequence of a bug in the new U-boot: after flashing an image with broken (smaller) partition sizes, the recovery doesn't accept images with the original partition sizes anymore Getting out of this state is not easy: you have a U-boot on your device that doesn't accept correct images, and an OpenWrt version that doesn't allow writing to the flash. Through a serial console, you can try fixing the settings in U-boot; when I tried this the last time, I wasn't able to do so, but maybe I did something wrong. The U-boot console has a few interesting settings (I forgot the exact commands, but the "help" command should tell you everything you need to know): * You can reset the MTD layout to the defaults. This makes the recovery accept correct images again. Unfortunately, in my experiments, this setting was not permanent even when I saves the environment after resetting the layout. In the hindsight, I remember there being a setting to disable flash protection, maybe that would made have the environment saving effective. In the end, I fixed this by creating a patched OpenWrt image that allowed me to write to the uboot and uboot-env partitions; this allowed me to write back backups I had made of the uboot and uboot-env before I broke the flash layout by flashing OpenWrt. Obviously, this does not work if you don't have backups... * If you don't plan to ever go back to AirOS again, it might be okay to just ignore the broken MTD layout in the U-boot settings. Get into the U-boot console, reset the MTD layout, start recovery, and flash an OpenWrt version after trunk r48829 or CC r48849. I hope this helps. I'd be interested if you find a way to parmanently reset the MTD layout from the U-boot console; unfortunately, I don't have a test device available at the moment. Regards, Matthias PS. Completely unrelated to this issue: I noticed in your log that you used the wrong image ("nanostation" instead of "bullet") for your Loco. This isn't really an issue, as the nanostation and bullet images only differ by the number of ethernet ports they define, but you'll have a dead "eth1" device. The image "nanostation" should used for the NanoStation (as it is the only device with two ethernet ports), and "bullet" for everything from the AirMax XM series except NanoStation and Rocket (Bullet, Loco, PicoStation, ...) > > - Original Message - > From: "Outback Dingo" > To: "Joseph Marlin" > Cc: "Bill Moffitt" , openwrt-devel@lists.openwrt.org > Sent: Friday, March 11, 2016 6:22:39 AM > Subject: Re: [OpenWrt-Devel] Cannot flash UBNT Loco M2 > > so, have we gotten past the ubiquiti bootloader downgrade issues yet ? > > On Fri, Feb 12, 2016 at 11:09 PM, Joseph Marlin > wrote: > >> Yes, we've been fighting this bug unsuccessfully for quite a while. It's >> the result of a new version of uboot changing the partition sizes. >> >> Here's the ticket: https://dev.openwrt.org/ticket/20982 >> >> >> >> - Original Message - >> From: "Outback Dingo" >> To: "Bill Moffitt" >> Cc: openwrt-devel@lists.openwrt.org >> Sent: Fri
Re: [OpenWrt-Devel] Which image for the Nanostation Loco M2, WAS:Cannot flash UBNT Loco M2
On 03/11/2016 05:15 PM, Aaron Z wrote: > )On Fri, Mar 11, 2016 at 9:28 AM, Matthias Schiffer > wrote: >> PS. Completely unrelated to this issue: I noticed in your log that you used >> the wrong image ("nanostation" instead of "bullet") for your Loco. This >> isn't really an issue, as the nanostation and bullet images only differ by >> the number of ethernet ports they define, but you'll have a dead "eth1" >> device. The image "nanostation" should used for the NanoStation (as it is >> the only device with two ethernet ports), and "bullet" for everything from >> the AirMax XM series except NanoStation and Rocket (Bullet, Loco, >> PicoStation, ...) > So, which should be used for the Nanostation Loco M2 ( > http://www.amazon.com/Ubiquiti-NanoStation-locoM2-2-4GHz-Outdoor/dp/B004EGI3CI/ > ) which has one Ethernet port? > The one I have is an older (non-XW) device. For CC, I see: > openwrt-15.05-ar71xx-generic-ubnt-bullet-m-squashfs-sysupgrade.bin and > openwrt-15.05-ar71xx-generic-ubnt-nano-m-squashfs-sysupgrade.bin > I had used the nano build, but it has a non-functional eth1 port. > > Aaron Z As I wrote, "bullet" is the correct image for all XM devices with one ethernet port and no USB. Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Cannot flash UBNT Loco M2
On 03/12/2016 02:08 PM, John Crispin wrote: > > > On 11/03/2016 15:28, Matthias Schiffer wrote: >> On 03/11/2016 02:46 PM, Joseph Marlin wrote: >>> We certainly haven't. I've tried applying these patches - >>> http://thread.gmane.org/gmane.comp.embedded.openwrt.devel/39001 >>> >>> to no avail. I still get hit by a "Error code 2 - Firmware Check Failed". >>> >>> I'm really suspecting this comes down to an intentional check by Ubiquiti >>> to prevent us from flashing, as described on this list and in this comment >>> on the ticket - https://dev.openwrt.org/ticket/20982#comment:16 >>> >>> I have not yet had a chance to change the image header and CRC to look like >>> a Ubiquiti image, nor do I know how to offhand, but I hope to give it a >>> shot soon. >> >> Hi, >> there is a lot of misinformation about this issue going around, in >> particular, the wiki is plain wrong (I'll fix that some time soon.) >> >> Here's what's going on: >> >> * OpenWrt had wrong partition sizes in its UBNT AirMax firmware for a long >> time >> * Old AirOS and the corresponding U-boot version had a bug that made U-boot >> ignore the partition sizes defined in the firmware image. This made OpenWrt >> work with the old U-boot despite its broken partition sizes >> * The new AirOS has been fixed in this regard (but contains a new bug). >> This also means that the broken OpenWrt images don't work anymore and can >> cause even more breakage >> * The new U-boot/AirOS did *not* change the flash layout. Both AirOS 5.5.x >> and 5.6.x use the same flash layout, the changed flash layout reported in >> the wiki is caused by broken OpenWrt images! >> * The OpenWrt trunk since r48829 and the CC branch since r48849 are fixed, >> meaning they define the correct partition sizes >> * The "Newly-erased block contained word ..." messages are a consequence of >> a missing patch in CC that has been backported as r48849 (the new U-boot >> doesn't remove flash protection, so the flash is just read-only from >> OpenWrt; TFTP recovery is the only way to upgrade in this state) >> * AFAIR "Error code 2 - Firmware Check Failed" is the consequence of a bug >> in the new U-boot: after flashing an image with broken (smaller) partition >> sizes, the recovery doesn't accept images with the original partition sizes >> anymore >> >> Getting out of this state is not easy: you have a U-boot on your device >> that doesn't accept correct images, and an OpenWrt version that doesn't >> allow writing to the flash. >> >> Through a serial console, you can try fixing the settings in U-boot; when I >> tried this the last time, I wasn't able to do so, but maybe I did something >> wrong. The U-boot console has a few interesting settings (I forgot the >> exact commands, but the "help" command should tell you everything you need >> to know): >> >> * You can reset the MTD layout to the defaults. This makes the recovery >> accept correct images again. Unfortunately, in my experiments, this setting >> was not permanent even when I saves the environment after resetting the >> layout. In the hindsight, I remember there being a setting to disable flash >> protection, maybe that would made have the environment saving effective. >> >> In the end, I fixed this by creating a patched OpenWrt image that allowed >> me to write to the uboot and uboot-env partitions; this allowed me to write >> back backups I had made of the uboot and uboot-env before I broke the flash >> layout by flashing OpenWrt. Obviously, this does not work if you don't have >> backups... >> >> * If you don't plan to ever go back to AirOS again, it might be okay to >> just ignore the broken MTD layout in the U-boot settings. Get into the >> U-boot console, reset the MTD layout, start recovery, and flash an OpenWrt >> version after trunk r48829 or CC r48849. >> >> >> I hope this helps. I'd be interested if you find a way to parmanently reset >> the MTD layout from the U-boot console; unfortunately, I don't have a test >> device available at the moment. >> >> Regards, >> Matthias >> > > Hi Matthias > > looking at a US and EU image i see only 1 bit changed in the header. and > reading what you wrote above it sound like a small change to our image > generation process will make EU unit flashable again ? if so do we have > a patch or could you tell me which unit to order on amazon.de
Re: [OpenWrt-Devel] Cannot flash UBNT Loco M2
On 03/12/2016 03:43 PM, Outback Dingo wrote: > On Fri, Mar 11, 2016 at 3:28 PM, Matthias Schiffer < > mschif...@universe-factory.net> wrote: > >> On 03/11/2016 02:46 PM, Joseph Marlin wrote: >>> We certainly haven't. I've tried applying these patches - >> http://thread.gmane.org/gmane.comp.embedded.openwrt.devel/39001 >>> >>> to no avail. I still get hit by a "Error code 2 - Firmware Check Failed". >>> >>> I'm really suspecting this comes down to an intentional check by >> Ubiquiti to prevent us from flashing, as described on this list and in this >> comment on the ticket - https://dev.openwrt.org/ticket/20982#comment:16 >>> >>> I have not yet had a chance to change the image header and CRC to look >> like a Ubiquiti image, nor do I know how to offhand, but I hope to give it >> a shot soon. >> >> Hi, >> there is a lot of misinformation about this issue going around, in >> particular, the wiki is plain wrong (I'll fix that some time soon.) >> >> Here's what's going on: >> >> * OpenWrt had wrong partition sizes in its UBNT AirMax firmware for a long >> time >> * Old AirOS and the corresponding U-boot version had a bug that made U-boot >> ignore the partition sizes defined in the firmware image. This made OpenWrt >> work with the old U-boot despite its broken partition sizes >> * The new AirOS has been fixed in this regard (but contains a new bug). >> This also means that the broken OpenWrt images don't work anymore and can >> cause even more breakage >> * The new U-boot/AirOS did *not* change the flash layout. Both AirOS 5.5.x >> and 5.6.x use the same flash layout, the changed flash layout reported in >> the wiki is caused by broken OpenWrt images! >> * The OpenWrt trunk since r48829 and the CC branch since r48849 are fixed, >> meaning they define the correct partition sizes >> * The "Newly-erased block contained word ..." messages are a consequence of >> a missing patch in CC that has been backported as r48849 (the new U-boot >> doesn't remove flash protection, so the flash is just read-only from >> OpenWrt; TFTP recovery is the only way to upgrade in this state) >> > > > > Okay sooo... does it work with openwrt after r48849 if we never wish to go > back to AirOs, and is it sysupgrade flashable after we flash to later then > this release If I remember correctly, this is possible: * Use a serial console to enter the u-boot command prompt * Reset the MTD layout (command "mtdparts default" or something like that). This won't survive a reboot, but when you now start the TFTP rescue (I think the command is "urescue"), it will accept the image with the correct partition sizes. A fixed OpenWrt image flashed this way should just work (and normal sysupgrades aren't a problem either, as OpenWrt doesn't care about the mtdlayout known by u-boot.) Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] 15.05.1 - Chaos Calmer
On 03/16/2016 01:06 PM, John Crispin wrote: > The OpenWrt developers are proud to announce the minor fix release of > OpenWrt Chaos Calmer. > >___ __ > | |.-.-.-.| | | |..| |_ > | - || _ | -__| || | | || _|| _| > |___|| __|_|__|__||||__| || > |__| W I R E L E S S F R E E D O M > - > CHAOS CALMER (15.05.1) > - > * 1 1/2 oz GinShake with a glassful > * 1/4 oz Triple Sec of broken ice and pour > * 3/4 oz Lime Juice unstrained into a goblet. > * 1 1/2 oz Orange Juice > * 1 tsp. Grenadine Syrup > - > > - > http://downloads.openwrt.org/chaos_calmer/15.05.1/ > > > ** Highlights since Chaos Calmer 15.05 ** > > * Linux kernel updated to version 3.18.23 Great work! :) One note about the kernel version: 3.18.23 is a very unfortunate choice, as it contains a regression causing nondeterministic boot hangs (caused by a faulty backport), which is very easy to trigger on some hardware. This has been fixed in 3.18.24 (see [1]). Regards, Matthias [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/?h=v3.18.24 signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] 15.05.1 - Chaos Calmer
On 03/16/2016 02:07 PM, Matthias Schiffer wrote: > On 03/16/2016 01:06 PM, John Crispin wrote: >> The OpenWrt developers are proud to announce the minor fix release of >> OpenWrt Chaos Calmer. >> >>___ __ >> | |.-.-.-.| | | |..| |_ >> | - || _ | -__| || | | || _|| _| >> |___|| __|_|__|__||||__| || >> |__| W I R E L E S S F R E E D O M >> - >> CHAOS CALMER (15.05.1) >> - >> * 1 1/2 oz GinShake with a glassful >> * 1/4 oz Triple Sec of broken ice and pour >> * 3/4 oz Lime Juice unstrained into a goblet. >> * 1 1/2 oz Orange Juice >> * 1 tsp. Grenadine Syrup >> - >> >> - >> http://downloads.openwrt.org/chaos_calmer/15.05.1/ >> >> >> ** Highlights since Chaos Calmer 15.05 ** >> >> * Linux kernel updated to version 3.18.23 > > Great work! :) > > One note about the kernel version: 3.18.23 is a very unfortunate choice, as > it contains a regression causing nondeterministic boot hangs (caused by a > faulty backport), which is very easy to trigger on some hardware. This has > been fixed in 3.18.24 (see [1]). > > Regards, > Matthias > > [1] > https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/?h=v3.18.24 I must correct myself on this issue: 3.18.24 did not fix it, but only hide it. 3.18.27 is affected as well. I'll try to find out what is causing it. Fortunately, the official 15.05.1 images seem to be unaffected (at least on the two devices I've seen the issue on, TL-WR841 v5 and v7), but building the CC HEAD will often yield broken images. There are multiple reports of this issue already, I've found the following: https://dev.openwrt.org/ticket/21773 https://dev.openwrt.org/ticket/21857 The issue is extremely suspectible to timing (or minor differences in the kernel image?), adding any additional debug output just made it go away in my tests so far... :/ Matthias signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel