Re: [OpenWrt-Devel] [PATCH] [brcm47xx] Belkin F7DXXXX (BCM47XX based) support for Linux 3.18

2015-06-23 Thread Joseph East
Thanks for the feedback, will have another attempt at submitting the patch. 

 @@ -184,7 +204,7 @@ mtd_fixtrx(const char *mtd, size_t offset)
   }

   trx = (struct trx_header *) (buf + offset);
 - if (trx-magic != STORE32_LE(0x30524448)) {
 + if (!is_trx_magic(trx-magic)) {
 Is dropping STORE32_LE safe? Should this be sth like
 le32_to_cpu(trx-magic)
 ?
I think this is a misunderstanding, both otrx.c and trx.c were modified
to have a function named is_trx_magic(). trx.c uses the STORE32_LE macro
whereas otrx uses the cpu_to_le32() / le32_to_cpu() methods, the two
files and is_trx_magic() implementations shouldn't be related otherwise. 

 diff --git a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
 b/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
 index cbadefb..9f12715 100644
 --- a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
 @@ -51,6 +51,10 @@ platform_expected_image() {
Linksys WRT310N V2) echo cybertan 310N; return;;
Linksys WRT610N V1) echo cybertan 610N; return;;
Linksys WRT610N V2) echo cybertan 610N; return;;
 +  Belkin F7D3301) echo 22031020; return;;
 +  Belkin F7D3302) echo 28090920; return;;
 +  Belkin F7D4302) echo 06101020; return;;
 +  Belkin F7D4401)   echo 17850100; return;;
 I just think if we should follow type id logic like beltrx
 22031020. I did that for other formats to make sure there won't be
 collisions like two different formats using the same magic. In case of
 Belkin it's a bit tricky because their every ID could be treated as
 separated format.
Have updated to follow this convention, but also realised that the
F7D4401 won't take the generic squashfs trx image (CFE indicates bad
boot block when flashed). Have made an additional change to platform.sh
to check that if a generic trx is detected, verify that the machine
isn't on a 'generic blacklist'. This is indicated by a third field in
platform_expected_image() which should read 'nogeneric'

 @@ -124,6 +144,25 @@ platform_check_image() {
  error=1
 fi
;;
 +  beltrx)
 +   local dev_board_id=$(platform_expected_image)
 +   local machine=$(platform_machine)
 +   local magic=$(get_magic_long $1)
 +   echo Found TRX image with Belkin Magic TRX
 +   echo Anticipating a $machine, checking...
 You don't really need this $machine. And if you think we should print
 it for whatever reason, propose it as global change for all formats.
 I'm not sure if that's needed however.
Removed echoed comment
 diff --git
 a/target/linux/brcm47xx/patches-3.18/032-11-MIPS-BCM47XX-Include-Belkin-F7D4XXX-F7D3XXX-TRX-for-mtd.patch
 b/target/linux/brcm47xx/patches-3.18/032-11-MIPS-BCM47XX-Include-Belkin-F7D4XXX-F7D3XXX-TRX-for-mtd.patch
 new file mode 100644
 index 000..8e2c1df
 --- /dev/null
 +++
 b/target/linux/brcm47xx/patches-3.18/032-11-MIPS-BCM47XX-Include-Belkin-F7D4XXX-F7D3XXX-TRX-for-mtd.patch
 @@ -0,0 +1,43 @@
 +--- a/drivers/mtd/bcm47xxpart.c
  b/drivers/mtd/bcm47xxpart.c
 +@@ -45,6 +45,10 @@
 + #define TRX_MAGIC   0x30524448
 + #define SHSQ_MAGIC   0x71736873 /* shsq (weird ZTE H218N endianness) */
 + #define UBI_EC_MAGIC   0x23494255 /* UBI# */
 ++#define BELKIN_F7D3301_MAGIC  0x20100322 /* Belkin TRX */
 ++#define BELKIN_F7D3302_MAGIC  0x20090928
 ++#define BELKIN_F7D4302_MAGIC  0x20101006
 ++#define BELKIN_F7D4401_MAGIC  0x00018517
 Please send this patch for mainline inclusion, base it on top of:
 http://git.infradead.org/l2-mtd.git
 I don't want to have more brcm47xx patches noone will ever upstream ;)
Will try and do so, but would this stop this patch from going through if
it isn't in mainline?

For Hauke's comment -

 +static int is_trx_magic(uint32_t magic) {
 +magic = cpu_to_le32(magic);
 +if(use_trx_override) {
 +if(magic == trx_override) {
 +return 1;
 +}
 +else {
 +return 0;
 +}
 +}
 +else {
 +if(magic == TRX_MAGIC) {
 +return 1;
 +}
 +else {
 +return 0;
  
 Make this function return bool and then you can simplify it like this:
 if(use_trx_override)
   return magic == trx_override;
 else
   return magic == TRX_MAGIC;

I was initially working within the constraints of defined libraries,
otrx.c now includes stdbool.h to allow boolean evaluation and this
simplified version. 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [brcm47xx] Belkin F7DXXXX (BCM47XX based) support for Linux 3.18

2015-06-23 Thread Joseph East
From d38c8c72b99908d3d9a39bd858d1c76e9864faac Mon Sep 17 00:00:00 2001
From: Joseph East east...@gmail.com
Date: Wed, 10 Jun 2015 19:19:26 +0930
Subject: [PATCH] Belkin F7D (BCM47XX based) Support for Linux 3.18

Patchset based on previous work by Cody Schafer and Luc Forcier to allow TRX 
images with Belkin IDs to be compiled as part of the BRCM47XX platform for 
Linux 3.18.

The patchset has been tested with a Belkin F7D4401 (PlayMax N600), other 
devices part of the previous patch are untested but have been included, however 
the Belkin QA TRX signature has been removed.

The otrx tool has been modified to accept a -m argument which allows comparison 
against a user defined TRX signature, this works in tandem with the changes in 
platform.sh to verify the different Belkin TRXs for supported models.

Signed-off-by: Joseph East east...@gmail.com
---
 package/system/mtd/src/trx.c   | 28 --
 package/utils/otrx/src/otrx.c  | 23 +++-
 .../brcm47xx/base-files/lib/upgrade/platform.sh| 42 +
 target/linux/brcm47xx/image/Makefile   | 19 ++
 .../brcm47xx/image/lzma-loader/src/decompress.c| 25 -
 ...nclude-Belkin-F7D4XXX-F7D3XXX-TRX-for-mtd.patch | 43 ++
 6 files changed, 172 insertions(+), 8 deletions(-)
 create mode 100644 
target/linux/brcm47xx/patches-3.18/032-11-MIPS-BCM47XX-Include-Belkin-F7D4XXX-F7D3XXX-TRX-for-mtd.patch

diff --git a/package/system/mtd/src/trx.c b/package/system/mtd/src/trx.c
index 245ee76..8e4980c 100644
--- a/package/system/mtd/src/trx.c
+++ b/package/system/mtd/src/trx.c
@@ -35,7 +35,12 @@
 #include mtd.h
 #include crc32.h
 
-#define TRX_MAGIC   0x30524448  /* HDR0 */
+#define TRX_MAGIC   0x30524448  /* HDR0 */
+#define BELKIN_F7D3301_MAGIC0x20100322
+#define BELKIN_F7D3302_MAGIC0x20090928
+#define BELKIN_F7D4302_MAGIC0x20101006
+#define BELKIN_F7D4401_MAGIC0x00018517
+
 struct trx_header {
uint32_t magic; /* HDR0 */
uint32_t len;   /* Length of file including header */
@@ -55,6 +60,21 @@ struct trx_header {
 ssize_t pread(int fd, void *buf, size_t count, off_t offset);
 ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
 
+static bool is_trx_magic(uint32_t magic)
+{
+magic = STORE32_LE(magic);
+switch (magic) {
+case TRX_MAGIC:
+case BELKIN_F7D3301_MAGIC:
+case BELKIN_F7D3302_MAGIC:
+case BELKIN_F7D4302_MAGIC:
+case BELKIN_F7D4401_MAGIC:
+return true;
+default:
+return false;
+}
+}
+
 int
 trx_fixup(int fd, const char *name)
 {
@@ -83,7 +103,7 @@ trx_fixup(int fd, const char *name)
}
 
trx = ptr;
-   if (trx-magic != TRX_MAGIC) {
+   if (!is_trx_magic(trx-magic)) {
fprintf(stderr, TRX header not found\n);
goto err;
}
@@ -118,7 +138,7 @@ trx_check(int imagefd, const char *mtd, char *buf, int *len)
return 0;
}
 
-   if (trx-magic != TRX_MAGIC || trx-len  sizeof(struct trx_header)) {
+   if (!is_trx_magic(trx-magic) || trx-len  sizeof(struct trx_header)) {
if (quiet  2) {
fprintf(stderr, Bad trx header\n);
fprintf(stderr, This is not the correct file format; 
refusing to flash.\n
@@ -184,7 +204,7 @@ mtd_fixtrx(const char *mtd, size_t offset)
}
 
trx = (struct trx_header *) (buf + offset);
-   if (trx-magic != STORE32_LE(0x30524448)) {
+   if (!is_trx_magic(trx-magic)) {
fprintf(stderr, No trx magic found\n);
exit(1);
}
diff --git a/package/utils/otrx/src/otrx.c b/package/utils/otrx/src/otrx.c
index 101a310..4e74d00 100644
--- a/package/utils/otrx/src/otrx.c
+++ b/package/utils/otrx/src/otrx.c
@@ -12,6 +12,7 @@
 #include byteswap.h
 #include endian.h
 #include errno.h
+#include stdbool.h
 #include stdint.h
 #include stdio.h
 #include stdlib.h
@@ -47,6 +48,8 @@ struct trx_header {
 
 char *trx_path;
 size_t trx_offset = 0;
+uint8_t use_trx_override = 0;
+uint32_t trx_override = 0;
 char *partition[TRX_MAX_PARTS] = {};
 
 static inline size_t otrx_min(size_t x, size_t y) {
@@ -143,15 +146,30 @@ uint32_t otrx_crc32(uint8_t *buf, size_t len) {
 static void otrx_check_parse_options(int argc, char **argv) {
int c;
 
-   while ((c = getopt(argc, argv, o:)) != -1) {
+   while ((c = getopt(argc, argv, m:o:)) != -1) {
switch (c) {
case 'o':
trx_offset = atoi(optarg);
break;
+   case 'm':
+   trx_override = strtol(optarg, NULL, 16);
+   use_trx_override = 1;
+   break;
}
}
 }
 
+static bool is_trx_magic(uint32_t magic) {
+   if(use_trx_override)
+   {
+   return magic == trx_override;
+   

[OpenWrt-Devel] oldpackages for CC

2015-06-23 Thread Saso Slavicic
Hi,

Oldpackages feed in CC still points to head of packages.git. As packages are
being removed, they will no longer be available for CC (pptpd for instance
has been moved to github, but is not present in 'for-15.05' branch of
packages). Is there a specific revision/commit of oldpackages that should be
used or will it be branched the same as BB?

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


[OpenWrt-Devel] [PATCH] px5g-standalone: fix compilation after fortify-headers

2015-06-23 Thread Hannu Nyman

px5g-standalone: fix compilation after fortify-headers

New fortify-headers functionality (default after r46117) is apparently 
conflicting with gcc -pedantic option. The package px5g-standalone fails to 
compile due to error: #include_next is a GCC extension errors. See 
https://dev.openwrt.org/ticket/19975


Fix the compilation of px5g-standalone by removing the -pedantic gcc option.

Signed-off-by: Hannu Nyman hannu.ny...@iki.fi

Index: package/utils/px5g-standalone/src/Makefile
===
--- package/utils/px5g-standalone/src/Makefile  (revision 46117)
+++ package/utils/px5g-standalone/src/Makefile  (working copy)
@@ -1,7 +1,7 @@
 CFLAGS?=-O2
 CFLAGS+=
 SFLAGS:=--std=gnu99
-WFLAGS:=-Wall -Werror -pedantic
+WFLAGS:=-Wall -Werror
 LDFLAGS?=
 BINARY:=px5g
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] musl breaks python

2015-06-23 Thread Alexandru Ardelean
@micke.prag : mind to re-test.
I could not reproduce it with an x86 VM.
I don't have an ar71xx around to test with; i.e. I have pre-CC firmware on
them.

This issue could be a temp-issue.
At the moment the OpenWRT trunk with musl is shifting like an earth-quake,
and this could have been fixed already.
There was an issue with Ruby 2.2 and musl (segfault) which was resolved
with an update to musl.
https://github.com/openwrt/packages/issues/1440



On Tue, Jun 23, 2015 at 1:48 PM, Szabolcs Nagy n...@port70.net wrote:

 * micke.p...@telldus.se micke.p...@telldus.se [2015-06-22 12:37:47
 +0200]:
  I have discovered that python is broken using musl. When a thread created
  using the threading library exists, python segfaults.
 
  This is a simple example application showing the issue:

 fwiw i cant reproduce this on alpine-linux
 so this is either arch specific, openwrt specific
 or python version specific.
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

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


Re: [OpenWrt-Devel] oldpackages for CC

2015-06-23 Thread Steven Barth
oldpackages are obsolete and in many instances riddled with security issues.
They should not be used at all.


Cheers,

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


Re: [OpenWrt-Devel] [PATCHv2] scripts/feeds: observe -p flag for preferential feeds

2015-06-23 Thread Karl Palsson

Karl Palsson ka...@tweak.net.au wrote:
  John Crispin blo...@openwrt.org wrote:
   On 27/05/2015 18:03, Karl Palsson wrote:
+   my $this_feed_target = lookup_target($feed, $name);
+   $this_feed_target and do {
   
   how about just calling it $target ?
  
  Because even though the method is lookup_target it actually returns a
  feed for the target $name.
  
  I could change the method to lookup_feed_for_target too, if that would
  help.
 
 Is anything else needed here?  Would be nice to get this fixed before
 it's branched.
 

Anything?  It now should be backported to CC as well, given that this is
documented behaviour of scripts/feeds that's regressed.

Sincerely,
Karl Palsson___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [brcm47xx] Belkin F7DXXXX (BCM47XX based) support for Linux 3.18

2015-06-23 Thread Rafał Miłecki
As Hauke noted, whole patch is white space damaged. Please re-send properly.


 @@ -184,7 +204,7 @@ mtd_fixtrx(const char *mtd, size_t offset)
   }

   trx = (struct trx_header *) (buf + offset);
 - if (trx-magic != STORE32_LE(0x30524448)) {
 + if (!is_trx_magic(trx-magic)) {

Is dropping STORE32_LE safe? Should this be sth like
le32_to_cpu(trx-magic)
?


 +static int is_trx_magic(uint32_t magic) {
 +magic = cpu_to_le32(magic);

Are you sure about this? First you call le32_to_cp and then
cpu_to_l32. I think you also just broke TRX_MAGIC support.
Previously we got:
if (le32_to_cpu(hdr.magic) != TRX_MAGIC)



 @@ -186,7 +212,7 @@ static int otrx_check(int argc, char **argv) {
goto err_close;
   }

 - if (le32_to_cpu(hdr.magic) != TRX_MAGIC) {
 + if (!is_trx_magic(le32_to_cpu(hdr.magic))) {

There is a call related to above comment.


 diff --git a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
 b/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
 index cbadefb..9f12715 100644
 --- a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh
 @@ -51,6 +51,10 @@ platform_expected_image() {
Linksys WRT310N V2) echo cybertan 310N; return;;
Linksys WRT610N V1) echo cybertan 610N; return;;
Linksys WRT610N V2) echo cybertan 610N; return;;
 +  Belkin F7D3301) echo 22031020; return;;
 +  Belkin F7D3302) echo 28090920; return;;
 +  Belkin F7D4302) echo 06101020; return;;
 +  Belkin F7D4401)   echo 17850100; return;;

I just think if we should follow type id logic like beltrx
22031020. I did that for other formats to make sure there won't be
collisions like two different formats using the same magic. In case of
Belkin it's a bit tricky because their every ID could be treated as
separated format.


 @@ -124,6 +144,25 @@ platform_check_image() {
  error=1
 fi
;;
 +  beltrx)
 +   local dev_board_id=$(platform_expected_image)
 +   local machine=$(platform_machine)
 +   local magic=$(get_magic_long $1)
 +   echo Found TRX image with Belkin Magic TRX
 +   echo Anticipating a $machine, checking...


You don't really need this $machine. And if you think we should print
it for whatever reason, propose it as global change for all formats.
I'm not sure if that's needed however.


 diff --git
 a/target/linux/brcm47xx/patches-3.18/032-11-MIPS-BCM47XX-Include-Belkin-F7D4XXX-F7D3XXX-TRX-for-mtd.patch
 b/target/linux/brcm47xx/patches-3.18/032-11-MIPS-BCM47XX-Include-Belkin-F7D4XXX-F7D3XXX-TRX-for-mtd.patch
 new file mode 100644
 index 000..8e2c1df
 --- /dev/null
 +++
 b/target/linux/brcm47xx/patches-3.18/032-11-MIPS-BCM47XX-Include-Belkin-F7D4XXX-F7D3XXX-TRX-for-mtd.patch
 @@ -0,0 +1,43 @@
 +--- a/drivers/mtd/bcm47xxpart.c
  b/drivers/mtd/bcm47xxpart.c
 +@@ -45,6 +45,10 @@
 + #define TRX_MAGIC   0x30524448
 + #define SHSQ_MAGIC   0x71736873 /* shsq (weird ZTE H218N endianness) */
 + #define UBI_EC_MAGIC   0x23494255 /* UBI# */
 ++#define BELKIN_F7D3301_MAGIC  0x20100322 /* Belkin TRX */
 ++#define BELKIN_F7D3302_MAGIC  0x20090928
 ++#define BELKIN_F7D4302_MAGIC  0x20101006
 ++#define BELKIN_F7D4401_MAGIC  0x00018517

Please send this patch for mainline inclusion, base it on top of:
http://git.infradead.org/l2-mtd.git
I don't want to have more brcm47xx patches noone will ever upstream ;)


Good work in general!

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


Re: [OpenWrt-Devel] musl breaks python

2015-06-23 Thread Szabolcs Nagy
* micke.p...@telldus.se micke.p...@telldus.se [2015-06-22 12:37:47 +0200]:
 I have discovered that python is broken using musl. When a thread created
 using the threading library exists, python segfaults.
 
 This is a simple example application showing the issue:

fwiw i cant reproduce this on alpine-linux
so this is either arch specific, openwrt specific
or python version specific.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] uml: fix mac80211 hwim for uml

2015-06-23 Thread Martin Tippmann
A duplicate include guard prevents inclusion of barrier.h in UML build and
this prevents mac80211 from building.

This patch re-enables mac80211 hwsim and renames the include guard.

See https://lists.openwrt.org/pipermail/openwrt-devel/2015-June/033614.html
for details.

Signed-off-by: Martin Tippmann martin.tippm...@gmail.com
From 16cbe45c30f6d812fbeb910e61f141de1fac7fca Mon Sep 17 00:00:00 2001
From: mt m...@i3o.de
Date: Sat, 13 Jun 2015 14:16:07 +0200
Subject: [PATCH] fix mac80211 build for uml

---
 package/kernel/mac80211/Makefile|  1 -
 package/kernel/mac80211/patches/010-fix-uml-build.patch | 15 +++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 package/kernel/mac80211/patches/010-fix-uml-build.patch

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 2af5d39..068ea67 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -60,7 +60,6 @@ define KernelPackage/mac80211/Default
   SUBMENU:=$(WMENU)
   URL:=https://wireless.wiki.kernel.org/
   MAINTAINER:=Felix Fietkau n...@openwrt.org
-  DEPENDS:=@!TARGET_uml
 endef
 
 define KernelPackage/cfg80211
diff --git a/package/kernel/mac80211/patches/010-fix-uml-build.patch b/package/kernel/mac80211/patches/010-fix-uml-build.patch
new file mode 100644
index 000..0d53e08
--- /dev/null
+++ b/package/kernel/mac80211/patches/010-fix-uml-build.patch
@@ -0,0 +1,15 @@
+--- a/backport-include/asm/barrier.h
 b/backport-include/asm/barrier.h
+@@ -1,9 +1,9 @@
+-#ifndef __BACKPORT_ASM_GENERIC_BARRIER_H
+-#define __BACKPORT_ASM_GENERIC_BARRIER_H
++#ifndef __BACKPORT_ASM_BARRIER_H
++#define __BACKPORT_ASM_BARRIER_H
+ #include_next asm/barrier.h
+ 
+ #ifndef dma_rmb
+ #define dma_rmb()	rmb()
+ #endif
+ 
+-#endif /* __BACKPORT_ASM_GENERIC_BARRIER_H */
++#endif /* __BACKPORT_ASM_BARRIER_H */
-- 
1.9.1

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


[OpenWrt-Devel] Build ERRORS : Ubiquiti EdgeRouter Lite

2015-06-23 Thread openwrt-de...@couprie.net

Hi,

I am tried to build the firmware for Ubiquiti EdgeRouter Lite.

CONFIG_HAVE_DOT_CONFIG=y
CONFIG_TARGET_octeon=y
CONFIG_TARGET_octeon_generic=y
CONFIG_TARGET_BOARD=octeon
CONFIG_TARGET_ARCH_PACKAGES=octeon

When compiling the images, i get the following build error.

How can i fix this ?

Perry

  LINKvmlinux
  LD  vmlinux.o
  MODPOST vmlinux.o
  GEN .version
  CHK include/generated/compile.h
  UPD include/generated/compile.h
  CC  init/version.o
  LD  init/built-in.o
  KSYM.tmp_kallsyms1.o
  KSYM.tmp_kallsyms2.o
  LD  vmlinux
  SORTEX  vmlinux
  SYSMAP  System.map
  Building modules, stage 2.
  MODPOST 130 modules
ERROR: param_ops_int [net/sched/sch_teql.ko] undefined!
ERROR: unregister_qdisc [net/sched/sch_teql.ko] undefined!
ERROR: free_netdev [net/sched/sch_teql.ko] undefined!
ERROR: unregister_netdev [net/sched/sch_teql.ko] undefined!
ERROR: register_qdisc [net/sched/sch_teql.ko] undefined!
ERROR: strlcpy [net/sched/sch_teql.ko] undefined!
ERROR: register_netdev [net/sched/sch_teql.ko] undefined!
ERROR: alloc_netdev_mqs [net/sched/sch_teql.ko] undefined!
ERROR: consume_skb [net/sched/sch_teql.ko] undefined!
ERROR: warn_slowpath_null [net/sched/sch_teql.ko] undefined!
ERROR: _raw_spin_unlock [net/sched/sch_teql.ko] undefined!
ERROR: _raw_spin_trylock [net/sched/sch_teql.ko] undefined!
ERROR: memcpy [net/sched/sch_teql.ko] undefined!
ERROR: __neigh_event_send [net/sched/sch_teql.ko] undefined!
ERROR: jiffies [net/sched/sch_teql.ko] undefined!
ERROR: neigh_destroy [net/sched/sch_teql.ko] undefined!
ERROR: __neigh_create [net/sched/sch_teql.ko] undefined!
ERROR: neigh_lookup [net/sched/sch_teql.ko] undefined!
ERROR: noop_qdisc [net/sched/sch_teql.ko] undefined!
ERROR: kfree_skb [net/sched/sch_teql.ko] undefined!
ERROR: __raw_spin_lock_init [net/sched/sch_teql.ko] undefined!
ERROR: _raw_spin_unlock_bh [net/sched/sch_teql.ko] undefined!
ERROR: qdisc_reset [net/sched/sch_teql.ko] undefined!
ERROR: _raw_spin_lock_bh [net/sched/sch_teql.ko] undefined!
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Alsa-lib (libasound) segfaults on TLS variable (musl on mips)

2015-06-23 Thread Ted Hess
I believe this to be an independent problem from the pthread_detach() 
discussion: musl breaks python. I’m re-posting this to openwrt-devel to get 
more devos aware of the issue. Note that I am using the latest musl/gcc patches 
as of today (23-Jun).


FWIW -- Here's what I know...
To easily reproduce:

   Build alsa-lib  alsa-utils
   Execute: 'aplay -L'(fails - see below)

--
Segfault in 'snd_lib_error_set_local' (error.c) referencing
static __thread snd_local_error_handler_t local_error;

Program received signal SIGSEGV, Segmentation fault.
0x0041b164 in snd_lib_error_set_local ()
(gdb) bt
#0 0x0041b164 in snd_lib_error_set_local ()
#1 0x0041fb68 in try_config ()
#2 0x00420d80 in snd_device_name_hint ()
#3 0x0040a3be in pcm_list ()
#4 0x0040e92a in main ()
(gdb) disas
Dump of assembler code for function snd_lib_error_set_local:
0x0041b12c +0: lui gp,0x8
0x0041b130 +4: addiu gp,gp,23668
0x0041b134 +8: addu gp,gp,t9
0x0041b138 +12: addiu sp,sp,-16
0x0041b13c +16: lw t9,-29872(gp)
0x0041b140 +20: sw ra,12(sp)
0x0041b144 +24: sw s0,8(sp)
0x0041b148 +28: sw gp,0(sp)
0x0041b14c +32: move s0,a0
0x0041b150 +36: addiu a0,gp,-29376
0x0041b154 +40: jalr t9
0x0041b158 +44: nop
0x0041b15c +48: lui v1,0x0
0x0041b160 +52: addu v1,v1,v0
= 0x0041b164 +56: lw v0,-32768(v1)
0x0041b168 +60: sw s0,-32768(v1)
0x0041b16c +64: lw ra,12(sp)
0x0041b170 +68: lw s0,8(sp)
0x0041b174 +72: jr ra
0x0041b178 +76: addiu sp,sp,16
End of assembler dump.


Fails on ar71xx and ramips. Works OK on armeb (NSLU2)
Removing __thread qualifier, rebuild, works OK.

/ted 
___

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