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

2015-06-22 Thread Hauke Mehrtens


On 06/22/2015 02:25 PM, Joseph East wrote:
 Patch didn't seem to mail properly, trying again.
 
 From: Joseph East east...@gmail.com
 
 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  | 31 +++-
  .../brcm47xx/base-files/lib/upgrade/platform.sh| 39
 
  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, 177 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)) {

This is probably an unwanted line break.

Please use git format-patch to create the patch and git send-email
to send them. these two tools make sure it does not get corrupted.

  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..36ebe62 100644
 --- a/package/utils/otrx/src/otrx.c
 +++ b/package/utils/otrx/src/otrx.c
 @@ -47,6 +47,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,11 +145,35 @@ 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 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;
 +}
 +}
 +   

Re: [OpenWrt-Devel] [PATCH 6/6] bcm53xx: R8000 handle PEX8603 switch

2015-06-22 Thread Hauke Mehrtens


On 06/22/2015 02:51 AM, Ian Kent wrote:
 On Sun, 2015-06-21 at 19:19 +0200, Rafał Miłecki wrote:
 On 10 March 2015 at 04:30, Ian Kent ra...@themaw.net wrote:
 The Netgear R8000 has a PEX8603 connected to the BCM53012 and if
 it isn't configured during the bus scan the PCI layer goes crazy
 trying to configure phantom devices.

 This is kind of magic for me.
 Hauke: are you able to review this?
 
 Yeah, it's a bridge so it needs upstream and downstream bus ids set but
 the main issue is that it doesn't respond with appropriate return values
 for non-existent devices.
 
 I modelled the code on the corresponding source from the Broadcom SDK
 file that this source was originally developed from (at least it
 appeared to match).
 
 I confirmed that PEX860X devices don't return proper return code from
 another PEX driver, from the WRT1900 source I think, its been a while
 now.
 
 Ian

Hi,

I completely missed these patches, thanks for pointing me to them again.
I will try to review them in the net days. I already saw this code in
the vendor driver but did not add it because my devices did not use it.
We will change to a different PCIe driver with the next kernel in
OpenWrt, because Broadcom added a kernel for this PCIe core into the
mainline kernel. We should get it into this new driver. Then also some
people from Broadcom can review this.

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


Re: [OpenWrt-Devel] [PATCH] Snort version bump 2.9.7.2 to 2.9.7.3

2015-05-23 Thread Hauke Mehrtens
Hi,

this package is maintained in our package feed at github, please send a
pull request on github at https://github.com/openwrt/packages

Hauke

On 05/23/2015 02:26 PM, Derek Werthmuller wrote:
 Signed-off-by:Derek Werthmuller thewerth...@gmail.com 
 mailto:thewerth...@gmail.com
 
 
 
 diff -rupN a/Makefile b/Makefile
 --- a/Makefile2015-05-22 22:13:00.458081167 -0400
 +++ b/Makefile2015-05-22 22:18:58.695857500 -0400
 @@ -8,13 +8,13 @@
  include $(TOPDIR)/rules.mk http://rules.mk
  
  PKG_NAME:=snort
 -PKG_VERSION:=2.9.7.2
 +PKG_VERSION:=2.9.7.3
  PKG_RELEASE:=2
  
  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
  @SF/$(PKG_NAME)
 -PKG_MD5SUM:=b01e9964827394c39194a0147bc15705
 +PKG_MD5SUM:=839e648607fd32726b2f7965134bf0a4
  
  PKG_BUILD_DEPENDS:=librpc
  PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION)
 
 
 
 
 Cheers
 - Derek

  By making a contribution to this project, I certify that:
   
 (a) The contribution was created in whole or in part by me and I
 have the right to submit it under the open source license
 indicated in the file; or
   
 (b) The contribution is based upon previous work that, to the best
 of my knowledge, is covered under an appropriate open source
 license and I have the right under that license to submit that
 work with modifications, whether created in whole or in part
 by me, under the same open source license (unless I am
 permitted to submit under a different license), as indicated
 in the file; or
   
 (c) The contribution was provided directly to me by some other
 person who certified (a), (b) or (c) and I have not modified
 it.
   
 (d) I understand and agree that this project and the contribution
 are public and that a record of the contribution (including all
 personal information I submit with it, including my sign-off) is
 maintained indefinitely and may be redistributed consistent with
 this project or the open source license(s) involved.
 
 
 
 
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/1] Fix bridge-utils file offset handling

2015-05-23 Thread Hauke Mehrtens
On 05/22/2015 11:01 PM, Nikolay Martynov wrote:
 Hi.
 
   Thanks for you response!
 
   Please forgive my noobiness but I wasn't able to find brigde-utils
 in https://github.com/openwrt/packages. Is it supposed to be somo
 other feed? I would really appreciate if you could clarify.

brigde-utils was not moved from oldpackages to github. You can take over
the maintainership of that package and create a pull request on github
which adds it to the feed on github and also add your changes to it.
Then you have to take care of this package as it looks like nobody else
is interested in this package.

Hauke

 
 2015-05-22 14:43 GMT-04:00 John Crispin blo...@openwrt.org:
 Hi,

 brigde-utils is part of the github feed. please file an issue there

 John

 On 12/05/2015 03:48, Nikolay Martynov wrote:
 Make sure brctl build uses appropriate defines (_FILE_OFFSET_BITS) that 
 match uClibc settings.
 Without this patch running brctl leads to 'unresolved alphasort symbol' 
 message.

 Signed-off-by: Nikolay Martynov mar.ko...@gmail.com
 ---
  net/bridge-utils/Makefile | 2 ++
  1 file changed, 2 insertions(+)

 diff --git a/net/bridge-utils/Makefile b/net/bridge-utils/Makefile
 index ad95b87..10e44c5 100644
 --- a/net/bridge-utils/Makefile
 +++ b/net/bridge-utils/Makefile
 @@ -30,6 +30,8 @@ define Package/bridge/description
   form a larger network.
  endef

 +TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 
 -D_GNU_SOURCE
 +
  CONFIGURE_ARGS += \
   --with-linux-headers=$(LINUX_DIR) \


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


Re: [OpenWrt-Devel] [PATCH v2] mac80211: add mt7601u driver

2015-08-16 Thread Hauke Mehrtens
On 08/16/2015 09:54 AM, Dirk Neukirchen wrote:
 Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
 ---
 v2: fix TITLE c/p error
 
  package/kernel/mac80211/Makefile | 13 -
  1 file changed, 12 insertions(+), 1 deletion(-)

Doesn't this need some firmware? I see that this driver loads mt7601u.bin

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


Re: [OpenWrt-Devel] [PATCH 6/6] bcm53xx: R8000 handle PEX8603 switch

2015-08-21 Thread Hauke Mehrtens


On 08/16/2015 06:19 AM, Ian Kent wrote:
 On Tue, 2015-06-23 at 07:58 +0800, Ian Kent wrote:
 On Mon, 2015-06-22 at 18:42 +0200, Hauke Mehrtens wrote:

 On 03/10/2015 04:30 AM, Ian Kent wrote:
 The Netgear R8000 has a PEX8603 connected to the BCM53012 and if
 it isn't configured during the bus scan the PCI layer goes crazy
 trying to configure phantom devices.

 Could you provide some diagram how this is connected?

 I could try, when I get a chance, ascii art isn't my strong suit.


 My current assumption is that on one of the 3 PCIe ports is this switch,
 so the scan will find this switch as a PCIe device, bu how does it go
 from there?

 I can only infer from looking at sysfs, which is what I have done.

 Perhaps I'm not correct but it looks to me that there are is a BCM53012
 connected with two legs, one has one wireless device, and the other has
 a PEX8603 bridge which has two legs, each with a wireless device.

 From the vendor driver I would assume that that the two devices behind
 the switch are device function 0x08 and 0x10 on the switch device.

 I'll have to reacquaint myself with the code before I respond to the
 comments below, its been a while.
  

 Can you also post the output of lspci on your device?

 Don't think I have lspci in the build I was using, I'll need to add it
 and rebuild. That probably won't be until the weekend.
 
 OK, I've been able get a build.

I think we do not get this into OpenWrt CC any more. You should probably
base your work on top of the new PCIe host driver in the trunk used with
kernel 4.1.

Will you send a new Version or should I look into this?

 My updated patch doesn't yet function so I've used the driver we're
 discussing here to get info.
 
 TBH, looking at this, I'm not so sure the patch is wrong now.
 
 lspci gives:
 :00:00.0 PCI bridge: Broadcom Corporation Device 8012 (rev 01)
 :01:00.0 Network controller: Broadcom Corporation Device aa52 (rev 01)
 0001:00:00.0 PCI bridge: Broadcom Corporation Device 8012 (rev 01)
 0001:01:00.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev ab)
 0001:02:01.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev ab)
 0001:02:02.0 PCI bridge: PLX Technology, Inc. Device 8603 (rev ab)
 0001:03:00.0 Network controller: Broadcom Corporation Device aa52 (rev 01)
 0001:04:00.0 Network controller: Broadcom Corporation Device aa52 (rev 01)
 
 and a list of /sys/bus/pci/devices on a Vendor firmware install gives:
 :00:00.0  :00:06.0  :00:0b.1  :00:11.0  0002:01:00.0
 :00:01.0  :00:07.0  :00:0c.0  :00:12.0  0002:02:01.0
 :00:02.0  :00:08.0  :00:0d.0  :00:13.0  0002:02:02.0
 :00:03.0  :00:09.0  :00:0e.0  0001:00:00.0  0002:03:00.0
 :00:04.0  :00:0a.0  :00:0f.0  0001:01:00.0  0002:04:00.0
 :00:05.0  :00:0b.0  :00:10.0  0002:00:00.0

Thanks for these information.
Without your patch the PCI subsystem will find lots of strange devices
and will report broken data and does not only show nothing, is that
correct?

 which looks like the topology is the same.
 
 So, possibly, my description of how I believe the devices are connected
 is accurate.
 
   bcm8012

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


Re: [OpenWrt-Devel] [PATCH 1/1] [kernel] Fix kmod-v4l2 modules have missing symbols due to lack of clk support

2015-08-21 Thread Hauke Mehrtens


On 08/20/2015 01:30 AM, Daniel Dickinson wrote:
 Your patch resolves the issue of compiling - I have not yet tested the
 functionality of the resulting v4l module.  I suspect the disadvantage
 of this patch is that it will silently fail to work for the types of
 devices (DV primarily) that depend on clock support whereas my patch
 omits building code/modules for devices that depend on clock support a
 kernel config option that prevents building useless modules (although I
 realized the DV_SUPPORT should depend on CLK_COMMON since that's the
 whole reason for making that a config option) and (and of course
 #ifdef's out the code and dependencies on clk support when it's not
 present).
 
 Regards,
 
 Daniel

Hi Daniel,

I do not know if they will still work, but if some driver has to change
some clock of the SoC and the SoC does not support this it should fail.
The problem not only exist with ar71xx, but with all SoC in the mainline
kernel, so I assume that this is already handled. If we return the wrong
number in the ar71xx code it should be changed, different SoC code
returned different values in the same cases so I was unsure.

Have you experienced any runtime problems with the clocks with the
current trunk version?

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


Re: [OpenWrt-Devel] [PATCH 1/1] [kernel] Fix kmod-v4l2 modules have missing symbols due to lack of clk support

2015-08-21 Thread Hauke Mehrtens


On 08/20/2015 01:30 AM, Daniel Dickinson wrote:
 Your patch resolves the issue of compiling - I have not yet tested the
 functionality of the resulting v4l module.  I suspect the disadvantage
 of this patch is that it will silently fail to work for the types of
 devices (DV primarily) that depend on clock support whereas my patch
 omits building code/modules for devices that depend on clock support a
 kernel config option that prevents building useless modules (although I
 realized the DV_SUPPORT should depend on CLK_COMMON since that's the
 whole reason for making that a config option) and (and of course
 #ifdef's out the code and dependencies on clk support when it's not
 present).
 
 Regards,
 
 Daniel

Hi Daniel,

I do not know if they will still work, but if some driver has to change
some clock of the SoC and the SoC does not support this it should fail.
The problem not only exist with ar71xx, but with all SoC in the mainline
kernel, so I assume that this is already handled. If we return the wrong
number in the ar71xx code it should be changed, different SoC code
returned different values in the same cases so I was unsure.

Have you experienced any runtime problems with the clocks with the
current trunk version?

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


Re: [OpenWrt-Devel] [PATCH 4/7] mac80211: refresh Intel firmware

2015-08-23 Thread Hauke Mehrtens


On 08/23/2015 12:56 PM, Dirk Neukirchen wrote:
 - sort firmware
 - add newer firmware for Intel chipsets
 - newer Intel MVM require firmware
 - ucode 13 requires Kernel 4.1+
 
 only compile tested

Have you looked if this would close any open feature requests / issues
in OpenWrt trac?

 Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de
 ---
  package/kernel/mac80211/Makefile | 198 
 ++-
  1 file changed, 133 insertions(+), 65 deletions(-)
 
 +
 + config IWL3160_FW
 + bool Intel 3160 Firmware
 + default y
 + help
 +   Download and install firmware for:
 + Intel Wireless WiFi 3160
 +
 + config IWL3160_13_FW
 + bool Intel 3160 Firmware ucode 13 (4.1+)
 + default y
 + depends on LINUX_4_1
 + help
 +   Download and install firmware for:
 + Intel Wireless WiFi 3160

Does this really depend on the kernel version and not on the iwl driver
version? OpenWrt uses the driver from a very recent wireless tree, so it
should be equivalent to something between 4.2 and 4.3 now.

I would suggest just using the most recent firmware files for the Intel
wifi devices.

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


Re: [OpenWrt-Devel] Linux kernel config options handling in OpenWRT

2015-08-17 Thread Hauke Mehrtens
On 08/17/2015 10:43 AM, Alexey Brodkin wrote:
 Hello,
 
 I'm playing with OpenWRT for a new platform and have a question on
 how OpenWRT handles KCONFIG kernel options.
 
 For example I select KernelPackage/crypto-core in OpenWRT's menuconfig
 then KCONFIG is populated with:
 --8
 CONFIG_CRYPTO=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_BLKCIPHER
 CONFIG_CRYPTO_ALGAPI
 --8
 
 From what I may see from grepping through OpenWRT that KCONFIG value
 is only used to determine if those options are enabled in kernel configuration
 but not for force selection of options in kernel.

They are mainly used for selecting the config options in the kernel. I
do not know how exactly it is done.

 In other words if I want to get crypto core built I need to make sure first
 that in my say target/linux/board/config-4.1 options mentioned above are
 enabled. Is that observation correct?

no

 I'm asking because my initial assumption was I need to provide a minimal
 kernel configuration in target/linux/board/config-4.1 and then on
 selection of kmods in OpenWRT's menuconfig missing config options
 will be automatically added in kernel config.

Your initial assumption was correct. You should provide a minimal
target/linux/board/config-4.1 which selects all kernel options which
will be compiled into the main kernel image, it should not contain any
option selected as a module, everything you want to build as a module
should be defined in a OpenWrt kernel package and they it can be
selected optional.

 But apparently no options are auto-enabled because I'm seeing that kind
 of build failure if CONFIG_CRYPTO_BLKCIPHER is not explicitly set in my
 kernel config:
 --8
 NOTICE: module 'xxx/openwrt/build_dir/target-yyy/linux-zzz/linux
 -4.1.3/crypto/crypto_algapi.ko' is built-in.
 ERROR: module 'xxx/openwrt/build_dir/target-yyy/linux-zzz/linux
 -4.1.3/crypto/crypto_blkcipher.ko' is missing.
 modules/crypto.mk:30: recipe for target 'xxx/openwrt/bin/axs10x
 -uClibc/packages/base/kmod-crypto-core_4.1.3-1_axs10x.ipk' failed
 make[3]: *** [xxx/openwrt/bin/axs10x
 -uClibc/packages/base/kmod-crypto-core_4.1.3-1_axs10x.ipk] Error 1
 --8

The kmod-crypto-core from KernelPackage/crypto-core should select the
CONFIG_CRYPTO_BLKCIPHER option.

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


Re: [OpenWrt-Devel] [PATCHv2 5/7] mac80211/linux-firmware: include firmware for brcmfmac-sdio

2015-08-03 Thread Hauke Mehrtens
On 07/30/2015 06:34 PM, Rafał Miłecki wrote:
 On 30 July 2015 at 10:52, Daniel Golle dan...@makrotopia.org wrote:
 @@ -2000,6 +2000,50 @@ endef

  define KernelPackage/brcmfmac/install
 $(INSTALL_DIR) $(1)/lib/firmware/brcm
 +ifneq ($(CONFIG_BRCMFMAC_SDIO),)
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43241b0-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43241b4-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43241b5-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4329-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4330-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4334-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4334-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43340-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43362-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4339-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43430-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43435-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +   $(INSTALL_DATA) \
 +   
 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4354-sdio.bin \
 +   $(1)/lib/firmware/brcm/
 +endef
 
 Looks much better, thanks.
 
 Two things:
 1) Do we want to include firmware for all brcmfmac supported devices?
 I guess some of them are e.g. smartphones and I'm not sure if anyone
 wants to run OpenWrt on them. Or should we split it into more options
 maybe?

I think we should only add the firmware files we found on devices
running OpenWrt, each firmware is 216 to 580 KBytes.

You could do it similar to the iwlwifi firmware and only select the
firmware files by default which are found in routers and if some special
firmware could be needed from some target only select it by default for
that target.

 2) If we want all firmware files then for SDIO devices we could try
 something clever like: $(PKG_BUILD_DIR)/brcm/brcmfmac*-sdio.bin maybe?
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 6/6] bcm53xx: R8000 handle PEX8603 switch

2015-08-14 Thread Hauke Mehrtens
On 08/14/2015 06:03 AM, Ian Kent wrote:
 On Wed, 2015-08-12 at 22:01 +0200, Hauke Mehrtens wrote:
 On 07/15/2015 12:11 PM, Ian Kent wrote:
 On Tue, 2015-07-14 at 18:19 +0200, Rafał Miłecki wrote:
 On 28 June 2015 at 05:37, Ian Kent ra...@themaw.net wrote:
 Let me rework this using the bus number as you recommend.
 I'll repost my updated patch series once I've done that.

 Hi Ian,

 Is there any chance you'll find a moment for it anytime soon? It'd be
 awesome to get R8000 support for CC release.

 I have reworked the patch and a broken package build problem I had is
 gone but I didn't get time to fix build problems with a third patch I
 have.

 Just didn't get time last weekend and this week has been quite busy too.
 I'll try and get onto this in the next few days.

 Ian

 Hi Ian,

 you patch looks better than the hack Broadcom did in their vendor driver.
 
 I thought so, ;)
 

 Could you send me a lspci output or the content of /proc/bus/pci/devices
 of the original firmware or of OpenWrt with your patch applied? I would
 prefer lspci because it is easier to read but cat from
 /proc/bus/pci/devices also works. I do not have such a device and want
 to understand how this PCIe switch looks like on the software side, so
 we can fix the domain, bus, slot, function mixup.
 
 I haven't been able to build OpenWrt for a while now and that's why I
 haven't been able to test my changes to the patch.

I haven't noticed a problem in the OpenWrt build system, do you still
have this problem? Have you tried to clean and rebuild again?

 I really wish we could avoid committing changes that don't build but I
 know it isn't that simple.
 
 I have got some other lists (around somewhere) based on output, mostly
 from the Vendor firmware, and one where I went through the devices and
 listed what they are along with and their pci ids so I could try and
 understand what was going on.

I found some boot log of OpenWrt in the OpenWrt forum in this post, it
shows how the PCIe devices are looking without your patch.
https://forum.openwrt.org/viewtopic.php?pid=269905#p269905
I am used to search for some boot logs random people posted on the
Internet. ;-)

 I could try and find that and post it if it would be useful.
 Note that it was just used to understand what was what so it isn't
 pretty but should have quite a bit of info in it.
 
 There's no question the current patch is wrong so I don't recommend it
 be used.
 
 I can however post my updated patch now on the understanding that it
 hasn't been tested at all, which might be good for initial review
 anyway.
 

 On the hardware side this SoC has 3 PCIe controllers, but one shares a
 PHY with the USB 3.0 controller. Instead of using the 3rd PCIe
 controller they used USB 3.0 and split one of the PCIe controllers into
 2 PCIE lanes.
 
 Right, I didn't get that, mmm ...

With kernel 4.1 OpenWrt switched to a different PICe driver, which is
also in the mainline kernel and supported by Broadcom.

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


Re: [OpenWrt-Devel] [PATCH] kmod-crypto-manager: autoload aead module

2015-08-15 Thread Hauke Mehrtens
On 08/05/2015 03:30 PM, Doug Goldstein wrote:
 This package provides the aead module which other modules need loaded
 when they depend on this package.
 
 Signed-off-by: Doug Goldstein car...@cardoe.com
 ---
  package/kernel/linux/modules/crypto.mk | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/package/kernel/linux/modules/crypto.mk 
 b/package/kernel/linux/modules/crypto.mk
 index efa69b7..7295b98 100644
 --- a/package/kernel/linux/modules/crypto.mk
 +++ b/package/kernel/linux/modules/crypto.mk
 @@ -58,6 +58,7 @@ define KernelPackage/crypto-manager
   CONFIG_CRYPTO_MANAGER \
   $(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_confvar,$(mod)))
FILES:=$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_file,$(mod)))
 +  AUTOLOAD:=$(call AutoLoad,08,aead)
$(call AddDepends/crypto)
  endef
  

I think https://dev.openwrt.org/changeset/46574 fixes your problem in trunk.

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


Re: [OpenWrt-Devel] [PATCH 1/1] [buildroot] Fix for liblzma breaks redhat-like systems

2015-08-15 Thread Hauke Mehrtens
On 08/09/2015 05:50 AM, Daniel Dickinson wrote:
 On RedHat/Fedora and derivatives we must use the system liblzma
 from xz-devel because the liblzma in tools/xz breaks these
 systems due to system tools (which use liblzma) having
 missing symbols when staging_dir/host/lib has liblzma
 (because buildroot puts staging_dir/host/lib first in
 library load path and therefore all binaries not just
 buildroot's binaries use liblzma from staging_dir/host/lib, at
 least while building OpenWrt).
 
 Closes: 20134
 Signed-off-by: Daniel Dickinson open...@daniel.thecshore.com
 ---
  include/host.mk  |  7 ++-
  include/prereq-build.mk  |  7 +++
  tools/Makefile   | 11 ---
  tools/squashfs4/Makefile |  2 +-
  4 files changed, 22 insertions(+), 5 deletions(-)
 
Please check if your patch is still needed with r46603
https://dev.openwrt.org/changeset/46603

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


Re: [OpenWrt-Devel] [PATCH 1/1] [kernel] Fix kmod-v4l2 modules have missing symbols due to lack of clk support

2015-08-15 Thread Hauke Mehrtens
On 08/02/2015 04:34 PM, Daniel Dickinson wrote:
 The v4l kernel modules fail to compile on latest kernels due to a new
 dependency on a clock source.  Since most routers won't have a suitable
 clock source, I have added a kernel config option that omits the functionality
 that requires the clock source.  
 
 That means v4l modules in OpenWrt can't support DV devices (DV requires
 the clock source support) but unless clock source support was addded to
 OpenWrt the other alternative is to drop v4l altogether).
 
 Signed-off-by: Daniel Dickinson open...@daniel.thecshore.com
 ---
  package/kernel/linux/modules/video.mk  |   3 +-
  ...avoid-clk-for-devices-that-do-not-need-it.patch | 348 
 +
  2 files changed, 350 insertions(+), 1 deletion(-)
  create mode 100644 
 target/linux/generic/patches-4.1/273-v4l-avoid-clk-for-devices-that-do-not-need-it.patch
 

The build problem of ar71xx was fixed here:
https://dev.openwrt.org/changeset/46572

The arch code did not export all the clk functions needed, but claimed
to do so. Is your patch needed with r46572 any more? When an arch really
does not support clocks it a driver would use the static inline
functions doing nothing instead.

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


Re: [OpenWrt-Devel] [PATCH 1/5] kernel: move linux, part-probe dt parsing in generic code

2015-08-15 Thread Hauke Mehrtens
On 08/15/2015 02:50 AM, Mathieu Olivari wrote:
 The linux,part-probe dts parsing is a pretty neat generic feature.
 It has been posted to kernel.org and could easily be reused by all
 targets.
 
 This change moves the patch to the 3.18 and 4.1 generic folders, and
 makes the feature available to all platforms who may want to use it.
 
 Signed-off-by: Mathieu Olivari math...@codeaurora.org
 ---
  ...t-add-generic-parsing-of-linux-part-probe.patch | 175 
 -
  ...t-add-generic-parsing-of-linux-part-probe.patch | 175 
 +
  .../400-mtd-add-rootfs-split-support.patch |  16 +-
  ...port-for-different-partition-parser-types.patch |   4 +-
  ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
  .../404-mtd-add-more-helper-functions.patch|   6 +-
  .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
  .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
  .../411-mtd-partial_eraseblock_write.patch |   8 +-
  .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
  ...t-add-generic-parsing-of-linux-part-probe.patch | 175 
 +
  .../400-mtd-add-rootfs-split-support.patch |  15 +-
  ...port-for-different-partition-parser-types.patch |   4 +-
  ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
  .../404-mtd-add-more-helper-functions.patch|   6 +-
  .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
  .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
  .../411-mtd-partial_eraseblock_write.patch |   8 +-
  .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
  19 files changed, 400 insertions(+), 224 deletions(-)
  delete mode 100644 
 target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
  create mode 100644 
 target/linux/generic/patches-3.18/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch
  create mode 100644 
 target/linux/generic/patches-4.1/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch

Acked-by: Hauke Mehrtens ha...@hauke-m.de

We should still find a way to get this or an other patch doing similar
stuff into mainline Linux kernel.

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


[OpenWrt-Devel] [PATCH][procd] fix generating syscall-names.h

2015-08-15 Thread Hauke Mehrtens
Sometimes the syscall number is not defined with a number but with an
offset to an other syscall and then make_syscall_h.sh created some
broken header file.

For example the bit/syscall.h from musl for i386 has this:

  #define __NR_timer_create 259
  #define __NR_timer_settime(__NR_timer_create+1)

With this patch the resulting array looks like this:

 [259] = timer_create,
 [(__NR_timer_create+1)] = timer_settime,

This fixes this bug from OpenWrt:
https://dev.openwrt.org/ticket/20195

Signed-off-by: Hauke Mehrtens ha...@hauke-m.de
---
 make_syscall_h.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/make_syscall_h.sh b/make_syscall_h.sh
index 57333fd..3363bc7 100755
--- a/make_syscall_h.sh
+++ b/make_syscall_h.sh
@@ -14,5 +14,5 @@ CC=$1
 echo #include asm/unistd.h
 echo static const char *syscall_names[] = {
 echo #include sys/syscall.h | ${CC} -E -dM - | grep '^#define __NR_' | \
-   LC_ALL=C sed -r -n -e 's/^\#define[ \t]+__NR_([a-z0-9_]+)[ \t]+([ 
()+0-9NR_Linux]+)(.*)/ [\2] = \1,/p'
+   LC_ALL=C sed -r -n -e 's/^\#define[ \t]+__NR_([a-z0-9_]+)[ \t]+([ 
()+0-9a-zNR_Linux]+)(.*)/ [\2] = \1,/p'
 echo };
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 6/6] bcm53xx: R8000 handle PEX8603 switch

2015-08-15 Thread Hauke Mehrtens
On 08/15/2015 05:05 AM, Ian Kent wrote:
 On Sat, 2015-08-15 at 09:55 +0800, Ian Kent wrote:
 On Fri, 2015-08-14 at 19:55 +0200, Hauke Mehrtens wrote:
 On 08/14/2015 06:03 AM, Ian Kent wrote:
 On Wed, 2015-08-12 at 22:01 +0200, Hauke Mehrtens wrote:
 On 07/15/2015 12:11 PM, Ian Kent wrote:
 On Tue, 2015-07-14 at 18:19 +0200, Rafał Miłecki wrote:
 On 28 June 2015 at 05:37, Ian Kent ra...@themaw.net wrote:
 Let me rework this using the bus number as you recommend.
 I'll repost my updated patch series once I've done that.

 Hi Ian,

 Is there any chance you'll find a moment for it anytime soon? It'd be
 awesome to get R8000 support for CC release.

 I have reworked the patch and a broken package build problem I had is
 gone but I didn't get time to fix build problems with a third patch I
 have.

 Just didn't get time last weekend and this week has been quite busy too.
 I'll try and get onto this in the next few days.

 Ian

 Hi Ian,

 you patch looks better than the hack Broadcom did in their vendor driver.

 I thought so, ;)


 Could you send me a lspci output or the content of /proc/bus/pci/devices
 of the original firmware or of OpenWrt with your patch applied? I would
 prefer lspci because it is easier to read but cat from
 /proc/bus/pci/devices also works. I do not have such a device and want
 to understand how this PCIe switch looks like on the software side, so
 we can fix the domain, bus, slot, function mixup.

 I haven't been able to build OpenWrt for a while now and that's why I
 haven't been able to test my changes to the patch.

 I haven't noticed a problem in the OpenWrt build system, do you still
 have this problem? Have you tried to clean and rebuild again?

 The problem I have now is with mkimage.

 It started after a distclean and reconfigure to ensure I was getting a
 fully up to date repo.
 
 OK, I had a quick look around for this problem and, much to my surprise,
 I found this (I hadn't found anything previously).
 
 https://dev.openwrt.org/ticket/20134#comment:10
 
 I'll try reverting the commit and see if I can make some progress over
 the weekend.
 
 Ian
 

I hopefully fixed the problem reported in that ticket, I am able to
build on CentOS 7 without problems. If the problem still exists for you
could you please send me the error message you get.

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


Re: [OpenWrt-Devel] [PATCH 6/6] bcm53xx: R8000 handle PEX8603 switch

2015-08-12 Thread Hauke Mehrtens
On 07/15/2015 12:11 PM, Ian Kent wrote:
 On Tue, 2015-07-14 at 18:19 +0200, Rafał Miłecki wrote:
 On 28 June 2015 at 05:37, Ian Kent ra...@themaw.net wrote:
 Let me rework this using the bus number as you recommend.
 I'll repost my updated patch series once I've done that.

 Hi Ian,

 Is there any chance you'll find a moment for it anytime soon? It'd be
 awesome to get R8000 support for CC release.
 
 I have reworked the patch and a broken package build problem I had is
 gone but I didn't get time to fix build problems with a third patch I
 have.
 
 Just didn't get time last weekend and this week has been quite busy too.
 I'll try and get onto this in the next few days.
 
 Ian

Hi Ian,

you patch looks better than the hack Broadcom did in their vendor driver.

Could you send me a lspci output or the content of /proc/bus/pci/devices
of the original firmware or of OpenWrt with your patch applied? I would
prefer lspci because it is easier to read but cat from
/proc/bus/pci/devices also works. I do not have such a device and want
to understand how this PCIe switch looks like on the software side, so
we can fix the domain, bus, slot, function mixup.

On the hardware side this SoC has 3 PCIe controllers, but one shares a
PHY with the USB 3.0 controller. Instead of using the 3rd PCIe
controller they used USB 3.0 and split one of the PCIe controllers into
2 PCIE lanes.

If someone else has an Netgear R8000 or any other device with this PCIe
switch also feel free to send some information about the PCIe switch.

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


Re: [OpenWrt-Devel] [PATCH] Make virtualization guests built for pentium4 with SMP

2015-07-12 Thread Hauke Mehrtens
On 07/11/2015 05:37 AM, Daniel Gimpelevich wrote:
 Signed-off-by: Daniel Gimpelevich dan...@gimpelevich.san-francisco.ca.us
 ---
  include/target.mk |  1 +
  target/linux/x86/kvm_guest/config-default | 15 ++-
  target/linux/x86/kvm_guest/target.mk  |  1 +
  target/linux/x86/xen_domu/target.mk   |  1 +
  4 files changed, 17 insertions(+), 1 deletion(-)
 
 diff --git a/include/target.mk b/include/target.mk
 index bfead52..3e7f17d 100644
 --- a/include/target.mk
 +++ b/include/target.mk
 @@ -222,6 +222,7 @@ ifeq ($(DUMP),1)
ifeq ($(ARCH),i386)
  CPU_TYPE ?= i486
  CPU_CFLAGS_i486 = -march=i486
 +CPU_CFLAGS_pentium4 = -march=pentium4

Will this work on most CPUs also the Atoms and so on?
I would rather prefer -march=i686 and -mtune=generic for the x86 virtual
machine images, but I am not an x86 expert. Do I need hardware support
for visualization in my host CPU for all these images? Are all the AMD
CPUs with hardware visualization support when IO build with
-march=pentium4 ?

  CPU_CFLAGS_geode = -march=geode -mmmx -m3dnow
endif
ifneq ($(findstring arm,$(ARCH)),)
 diff --git a/target/linux/x86/kvm_guest/config-default 
 b/target/linux/x86/kvm_guest/config-default
 index f26e268..b54b1df 100644
 --- a/target/linux/x86/kvm_guest/config-default
 +++ b/target/linux/x86/kvm_guest/config-default
 @@ -19,12 +19,14 @@ CONFIG_ACPI_PROCESSOR=y
  # CONFIG_ACPI_THERMAL is not set
  # CONFIG_ACPI_WMI is not set
  CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
 +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
  # CONFIG_ASUS_LAPTOP is not set
  CONFIG_CPU_IDLE_GOV_MENU=y
  # CONFIG_EEEPC_LAPTOP is not set
  # CONFIG_EFI is not set
  CONFIG_HAVE_ACPI_APEI=y
  CONFIG_HAVE_ACPI_APEI_NMI=y
 +# CONFIG_HIGHMEM64G is not set
  CONFIG_HOTPLUG_PCI=y
  CONFIG_HOTPLUG_PCI_ACPI=y
  # CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
 @@ -45,17 +47,21 @@ CONFIG_HYPERVISOR_GUEST=y
  CONFIG_KVM_GUEST=y
  # CONFIG_LGUEST is not set
  # CONFIG_LGUEST_GUEST is not set
 -CONFIG_NLS=y
  CONFIG_NO_HZ=y
 +# CONFIG_M486 is not set
 +CONFIG_MPENTIUM4=y
 +CONFIG_NR_CPUS=4
  CONFIG_PARAVIRT=y
  CONFIG_PARAVIRT_CLOCK=y
  # CONFIG_PARAVIRT_DEBUG is not set
 +CONFIG_PARAVIRT_SPINLOCKS=y
  CONFIG_PARAVIRT_TIME_ACCOUNTING=y
  CONFIG_PCIEAER=y
  CONFIG_PCIEPORTBUS=y
  CONFIG_PCI_IOAPIC=y
  CONFIG_PCI_LABEL=y
  CONFIG_PCI_MMCONFIG=y
 +CONFIG_PHYS_ADDR_T_64BIT=y
  CONFIG_PNP=y
  CONFIG_PNPACPI=y
  CONFIG_PNP_DEBUG_MESSAGES=y
 @@ -64,6 +70,8 @@ CONFIG_RAS=y
  # CONFIG_SAMSUNG_Q10 is not set
  # CONFIG_SCSI_VIRTIO is not set
  CONFIG_SERIAL_8250_PNP=y
 +CONFIG_SLUB_CPU_PARTIAL=y
 +CONFIG_SMP=y
  # CONFIG_THINKPAD_ACPI is not set
  # CONFIG_TOPSTAR_LAPTOP is not set
  # CONFIG_TOSHIBA_BT_RFKILL is not set
 @@ -76,14 +84,19 @@ CONFIG_VIRTIO_PCI=y
  CONFIG_VIRTUALIZATION=y
  # CONFIG_VMWARE_BALLOON is not set
  # CONFIG_VT_HW_CONSOLE_BINDING is not set
 +CONFIG_X86_32_SMP=y
  # CONFIG_X86_ACPI_CPUFREQ is not set
 +# CONFIG_X86_BIGSMP is not set
  # CONFIG_X86_E_POWERSAVER is not set
  # CONFIG_X86_GENERIC is not set
 +CONFIG_X86_HT=y
  # CONFIG_X86_INTEL_LPSS is not set
  CONFIG_X86_INTERNODE_CACHE_SHIFT=4
  CONFIG_X86_L1_CACHE_SHIFT=4
  # CONFIG_X86_LONGHAUL is not set
 +CONFIG_X86_PAE=y
  # CONFIG_X86_PAT is not set
  # CONFIG_X86_PCC_CPUFREQ is not set
  CONFIG_X86_PM_TIMER=y
  # CONFIG_X86_PPRO_FENCE is not set
 +# CONFIG_XEN is not set
 diff --git a/target/linux/x86/kvm_guest/target.mk 
 b/target/linux/x86/kvm_guest/target.mk
 index d3f950f..4bdfbc6 100644
 --- a/target/linux/x86/kvm_guest/target.mk
 +++ b/target/linux/x86/kvm_guest/target.mk
 @@ -1,3 +1,4 @@
  BOARDNAME:=KVM Guest
  FEATURES:=ext4 pci usb
  DEFAULT_PACKAGES += kmod-virtio-balloon kmod-virtio-net kmod-virtio-random
 +CPU_TYPE := pentium4
 diff --git a/target/linux/x86/xen_domu/target.mk 
 b/target/linux/x86/xen_domu/target.mk
 index f7a69bf..31d110c 100644
 --- a/target/linux/x86/xen_domu/target.mk
 +++ b/target/linux/x86/xen_domu/target.mk
 @@ -1,3 +1,4 @@
  BOARDNAME:=Xen Paravirt Guest
  DEFAULT_PACKAGES += kmod-xen-fs kmod-xen-evtchn kmod-xen-netdev 
 kmod-xen-kbddev
  FEATURES:=display ext4 targz
 +CPU_TYPE := pentium4
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] target/linux/generic: allow up to 4 8250-compatible UARTS

2015-08-24 Thread Hauke Mehrtens
On 08/24/2015 10:23 PM, Alexey Brodkin wrote:
 Default value of both SERIAL_8250_NR_UARTS  SERIAL_8250_RUNTIME_UARTS is 4,
 see: 
 http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/8250/Kconfig
 
 And some boards rely on that default setting.
 What's worse some boards use 3rd or even 4th UART as its primary
 serial console.
 
 For example Synopsys DesignWare SDP board, see console=ttyS3,115200n8
 here: 
 http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arc/boot/dts/axs101.dts
 
 So having expected default value allows usage of kernel configs that are
 closer to their upstream versions.
 
 Cc: Jonas Gorski j...@openwrt.org
 Cc: Zoltan HERPAI wigy...@uid0.hu
 Cc: Hauke Mehrtens ha...@hauke-m.de
 Cc: Dirk Neukirchen dirkneukirc...@web.de
 Signed-off-by: Alexey Brodkin abrod...@synopsys.com
 ---

Nack.

Most targets are using 2 uarts. If your target needs more just overwrite
this in your target/linux/target name/config-4.1 file like it is done
in target/linux/sunxi/config-4.1 for example.

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


Re: [OpenWrt-Devel] [PATCH] pinctrl/lantiq: split xway_mfp into dedicated tables

2015-11-16 Thread Hauke Mehrtens
Hi Martin,

The get_maintainer.pl helps to find the correct mailing list, it
searches the MAINTAINERS file.

./scripts/get_maintainer.pl -f drivers/pinctrl/pinctrl-xway.c
Linus Walleij  (maintainer:PIN CONTROL SUBSYSTEM)
linux-g...@vger.kernel.org (open list:PIN CONTROL SUBSYSTEM)
linux-ker...@vger.kernel.org (open list)

You should probably not send it to linux-ker...@vger.kernel.org.
In addition you should send it to blo...@openwrt.org as he is the main
author.

I assume John is ok if you also send his patch
0012-pinctrl-lantiq-fix-up-pinmux.patch upstream. When you use git
send-mail it should preserve the author name.

Can you please also add me in cc as well, thanks.

You changed the compatible string, this is considered ABI in the Linux
kernel and should stay compatible with older versions, so that you can
use an older DTS file with a recent kernel. Could you only add the new
names in of_device_id xway_match and not remove the old ones, so that
both will work.

I send some patches to add basic support for the xrx300 upstream and it
is included in Linux 4.4, it boots. ;-)

Hauke

On 11/16/2015 11:20 AM, Martin Schiller wrote:
> Hi,
> 
> ok, I will split this patch into 2 patches:
> 
> [1/2] pinctrl/lantiq: split xway_mfp into dedicated tables
> [2/2] pinctrl/lantiq: adapt device-trees to new tables
> 
> Would that be ok?
> 
> To get the pinctrl patch upstream, we also have to send the 
> 0012-pinctrl-lantiq-fix-up-pinmux.patch upstream.
> Should I do this in a patch series as well?
> 
> To whom should this patch be sent? (maintainer/mailing-list?)
> 
> Martin
> 
> -Ursprüngliche Nachricht-
> Von: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] Im 
> Auftrag von John Crispin
> Gesendet: Montag, 16. November 2015 10:50
> An: openwrt-devel@lists.openwrt.org
> Betreff: Re: [OpenWrt-Devel] [PATCH] pinctrl/lantiq: split xway_mfp into 
> dedicated tables
> 
> Hi,
> 
> the dts and kernel changes should be in separate patches.
> 
> also please send the pinctrl patch upstream.
> 
> John
> 
> On 16/11/2015 10:42, Martin Schiller wrote:
>> This patch splits the inadequate "pinctrl-xway" and "pinctrl-xr9" settings
>> into dedicated "pinctrl-ase", "pinctrl-danube", "pinctrl-xrx100" and
>> "pinctrl-xrx200" configuration tables.
>>
>> Based on the newest Lantiq Hardware Description it turend out, that there are
>> some differences in the GPIO alternative functions of the Danube, xRX100 and
>> xRX200 families, which makes it impossible to use only one xway_mfp table.
>>
>> This patch is also the first step to add support for the xRX300 family.
>>
>> Signed-off-by: Martin Schiller 
>> ---
>>  target/linux/lantiq/dts/BTHOMEHUBV2B.dts   |2 +-
>>  target/linux/lantiq/dts/BTHOMEHUBV3A.dts   |2 +-
>>  target/linux/lantiq/dts/EASY50712.dts  |2 +-
>>  target/linux/lantiq/dts/EASY50810.dts  |2 +-
>>  target/linux/lantiq/dts/EASY80920.dtsi |2 +-
>>  target/linux/lantiq/dts/GR7000.dts |2 +-
>>  target/linux/lantiq/dts/P2601HNFX.dts  |2 +-
>>  target/linux/lantiq/dts/P2812HNUFX.dtsi|2 +-
>>  target/linux/lantiq/dts/VGV7519.dtsi   |2 +-
>>  target/linux/lantiq/dts/ar9.dtsi   |2 +-
>>  target/linux/lantiq/dts/danube.dtsi|2 +-
>>  target/linux/lantiq/dts/vr9.dtsi   |2 +-
>>  .../patches-4.1/0150-lantiq-pinctrl-xway.patch | 1059 
>> +++-
>>  13 files changed, 1061 insertions(+), 22 deletions(-)
>>
>> diff --git a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts 
>> b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts
>> index 9b3180c..e2d713e 100644
>> --- a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts
>> +++ b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts
>> @@ -102,7 +102,7 @@
>>  };
>>
>>  gpio: pinmux@E100B10 {
>> -compatible = "lantiq,pinctrl-xway";
>> +compatible = "lantiq,pinctrl-danube";
>>  pinctrl-names = "default";
>>  pinctrl-0 = <_default>;
>>
>> diff --git a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts 
>> b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts
>> index 1ae9840..9383498 100644
>> --- a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts
>> +++ b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts
>> @@ -79,7 +79,7 @@
>>  };
>>
>>  gpio: pinmux@E100B10 {
>> -compatible = "lantiq,pinctrl-xr9";
>> +compatible = "lantiq,pinctrl-xrx100";
>>  pinctrl-names = "default";
>>  pinctrl-0 = <_default>;
>>
>> diff --git a/target/linux/lantiq/dts/EASY50712.dts 
>> b/target/linux/lantiq/dts/EASY50712.dts
>> index e44267a..e0d5ed1 100644
>> --- a/target/linux/lantiq/dts/EASY50712.dts
>> +++ b/target/linux/lantiq/dts/EASY50712.dts
>> @@ -51,7 +51,7 @@
>>  };
>>
>>  gpio: pinmux@E100B10 {
>> -compatible = "lantiq,pinctrl-xway";
>> +compatible = "lantiq,pinctrl-danube";
>>  pinctrl-names = "default";
>>  pinctrl-0 = <_default>;
>>
>> diff --git a/target/linux/lantiq/dts/EASY50810.dts 
>> 

Re: [OpenWrt-Devel] [PATCH] kernel: fix building RTC drivers

2015-11-15 Thread Hauke Mehrtens
On 11/09/2015 06:05 PM, Helmut Schaa wrote:
> All RTC drivers require the kernel to be built with CONFIG_RTC_CLASS=y.
> Set it accordingly.
> 
> Tested only with DS1307.
> 
> Signed-off-by: Helmut Schaa 
> ---
>  package/kernel/linux/modules/other.mk | 24 
>  1 file changed, 16 insertions(+), 8 deletions(-)
> 

With this patch the OpenWrt releases would contain the RTC_CLASS code
for all targets which would increase the size of the kernel. Currently
only some targets are activating CONFIG_RTC_CLASS.

Have you measured how much bigger the kernel would be with this option?

On which target do you need this?

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


Re: [OpenWrt-Devel] [PATCH] update mtd-utils to 1.5.2

2015-11-15 Thread Hauke Mehrtens
On 11/13/2015 12:20 AM, Sven Roederer wrote:
>  - update mtd-utils to 1.5.2 (git a494d30ab1ae40cb7665680cadf5af3ca3830a73)
>  - remove patches that went upstream
>  - fixes build from scratch as of broken patches
> 
> just had a crash-course to git send-email 
> 
> Signed-off-by: Sven Roederer 
> ---
>  tools/mtd-utils/Makefile   |  6 ++--
>  tools/mtd-utils/patches/110-portability.patch  | 21 ---
>  tools/mtd-utils/patches/137-no_extern_inline.patch | 41 
> --
>  .../300-libfec_use_standard_unsigned_long.patch| 35 --
>  4 files changed, 3 insertions(+), 100 deletions(-)
>  delete mode 100644 tools/mtd-utils/patches/137-no_extern_inline.patch
>  delete mode 100644 
> tools/mtd-utils/patches/300-libfec_use_standard_unsigned_long.patch


your patch is not formatted correctly.

Why are you using some random commit and not the commit of the 1.5.2 tag?

When I build it I get this warning, can you fix it?

compr_lzma.c:95:14: warning: initialization from incompatible pointer
type [-Wincompatible-pointer-types]
  .compress = _lzma_compress,
  ^
compr_lzma.c:95:14: note: (near initialization for
'jffs2_lzma_comp.compress')
compr_lzma.c:96:16: warning: initialization from incompatible pointer
type [-Wincompatible-pointer-types]
  .decompress = _lzma_decompress,
^
compr_lzma.c:96:16: note: (near initialization for
'jffs2_lzma_comp.decompress')

Hauke

> 
> diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile
> index b863179..d38798b 100644
> --- a/tools/mtd-utils/Makefile
> +++ b/tools/mtd-utils/Makefile
> @@ -7,14 +7,14 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=mtd-utils
> -PKG_VERSION:=1.5.1
> +PKG_VERSION:=1.5.2
>  
> -PKG_SOURCE_VERSION:=92686f212c9a4e16891c6a3c57629cbf4f0f8360
> +PKG_SOURCE_VERSION:=a494d30ab1ae40cb7665680cadf5af3ca3830a73
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
>  PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
>  PKG_SOURCE_PROTO:=git
>  PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
> -PKG_MIRROR_MD5SUM:=9fe0518213feddacd1842935dddeb6c8
> +PKG_MIRROR_MD5SUM:=0785919dc5888e9397a8bb77e7e0e19c

Where did you get this md5sum from?

>  PKG_CAT:=zcat
>  
>  HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [RFC] ar71xx: add Arduino Yun

2015-11-01 Thread Hauke Mehrtens
This is based on patches from Federico Fissore <f.fiss...@arduino.cc>
especially this one:
https://github.com/arduino/openwrt-yun/commit/7e2976fa83fb0d72a955574499178c387a1b3c92

The console is running with 25 baud which is a non standard baud
rate and needs an extra patch to be applied, I will try to get this
patch upstream or something else which accomplish the same.

Some upstream code looks like there are many different versions of this
SoC, are these only internal versions and all versions on the consumer
market are the same? I saw different GPIO configuration and flash sizes
of 8MB and 16MB?

Should I name it Arduino Yun or Genuino Yun or Linino Yun? My device
has Arduino Yun printed on it so I would prefer that.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
CC: Federico Fissore <f.fiss...@arduino.cc>
---
 .../ar71xx/base-files/etc/uci-defaults/01_leds |   5 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   5 +-
 .../files/arch/mips/ath79/mach-arduino-yun.c   | 137 +
 target/linux/ar71xx/generic/profiles/linino.mk |  18 +++
 target/linux/ar71xx/image/Makefile |   5 +
 .../700-MIPS-ath79-openwrt-machines.patch  |   2 +-
 .../817-MIPS-ath79-Linino-gpio-support.patch   |  68 ++
 .../818-MIPS-ath79-Linino-uart-fix-baudrate.patch  |  57 +
 .../819-MIPS-ath79-Linino-support.patch|  42 +++
 12 files changed, 342 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c
 create mode 100644 target/linux/ar71xx/generic/profiles/linino.mk
 create mode 100644 
target/linux/ar71xx/patches-4.1/817-MIPS-ath79-Linino-gpio-support.patch
 create mode 100644 
target/linux/ar71xx/patches-4.1/818-MIPS-ath79-Linino-uart-fix-baudrate.patch
 create mode 100644 
target/linux/ar71xx/patches-4.1/819-MIPS-ath79-Linino-support.patch

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 abed456..8c1a0bc 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -43,6 +43,11 @@ antminer-s3)
ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
;;
 
+arduino-yun)
+   ucidef_set_led_wlan "wlan" "WLAN" "arduino:blue:wlan" "phy0tpt"
+   ucidef_set_led_usbdev "usb" "USB" "arduino:white:usb" "1-1.1"
+   ;;
+
 ap113)
ucidef_set_led_usbdev "usb" "USB" "ap113:green:usb" "1-1"
;;
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 f6ac891..c729594 100644
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -386,6 +386,7 @@ wp543)
ucidef_set_interface_lan "eth0"
;;
 
+arduino-yun | \
 dir-505-a1)
ucidef_set_interface_lan "eth1"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 5f02e4e..5a0c322 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() {
*Antminer-S3)
name="antminer-s3"
;;
+   *"Arduino Yun")
+   name="arduino-yun"
+   ;;
*AP113)
name="ap113"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index a464fee..987e4cf 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -173,6 +173,7 @@ platform_check_image() {
;;
alfa-ap96 | \
alfa-nx | \
+   arduino-yun | \
ap113 | \
ap121 | \
ap121-mini | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 6d31f67..30f22e6 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -46,6 +46,7 @@ CONFIG_ATH79_MACH_AP81=y
 CONFIG_ATH79_MACH_AP83=y
 CONFIG_ATH79_MACH_AP96=y
 CONFIG_ATH79_MACH_ARCHER_C7=y
+CONFIG_ATH79_MACH_ARDUINO_YUN=y
 CONFIG_ATH79_MACH_AW_NR580=y
 CONFIG_ATH79_MACH_BHU_BXU2000N2_A=y
 CONFIG_ATH79_MACH_BSB=y
@@ -192,6 +193,8 @@ CONFIG_CPU_R4K_FPU=y
 CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO

Re: [OpenWrt-Devel] building a mips/uclibc toolchain relying on gcc 4.9

2015-10-18 Thread Hauke Mehrtens
On 10/18/2015 03:47 PM, Arturo Rinaldi wrote:
> Hello folks,
> 
> I need to build a mips-uclicbx-ar71xx toolchain based on the gcc v4.9
> series for purposes of my own. I reverted the trunk to this commit with :
> 
> /commit d39916a2a31fa41c5e2dc5a1941d3b5337ad9dd4//
> //Author: nbd //
> //Date:   Sun Sep 6 09:57:02 2015 +//
> //
> //uboot-ar71xx: fix gcc 5.2 compile errors//
> ////
> //Signed-off-by: Felix Fietkau //
> ////
> //git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46797
> 3c298f89-4303-0410-b956-a3cf2f4a3e73/
> 
> which is the latest one, I think, allowing the selection of gcc v4.9
> from the toolchain advanced options. Altough I run :
> /
> //$ make distclean V=99/
> 
> before launching the "make menuconfig" command, I am still not able to
> select the gcc v4.9 to build my toolchain. I have double-checked and the
> patches and the configuration option files residing in :
> 
> /$(ROOT)/toolchain/gcc//
> /
> seems to be ok. Please give me some pointers about it.

GCC 4.9 was always marked as broken, because we had some problems with
it, you also have to activate that you want to see broken packages.

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


Re: [OpenWrt-Devel] How to add 6LoWPAN to OpenWRT

2015-07-09 Thread Hauke Mehrtens
On 07/09/2015 04:51 PM, Firas wrote:
 When I tried to compile the kernel and configure it I found only 6LoWPAN
 over Bluetooth support, and I need to add 6LoWPAN to work over RF module
 like Jenic JN51xx.
 
  
 
 I’m using OpenWRT Kernel 3.18!
 
 So how can I implement that please can you guide me please !
 

Currently 6lowpan over ieee802.15.4 links is only available for kernel
version = 4.0, I do not know why it is not available on older kernel
versions. You could try to remove the version check and fix the problems
that will probably occur. I am currently looking into 6lowpan, but on
bluetooth because these are the cheapest radios. ;-)

Which Linux driver do you want to use for your radio?

The ieee802.15.4 modules are in this file:
package/kernel/linux/modules/wpan.mk

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


Re: [OpenWrt-Devel] How to get higher version (2.0) of radvd package

2015-07-09 Thread Hauke Mehrtens
On 07/09/2015 02:32 PM, Pratik Prajapati wrote:
 Hi,
 
 I want to build radvd (2.0 version) on OpenWrt but it supports radvd
 1.9 version.
 
 I have two options:
 
 1) either configure OpenWrt to download radvd's 2.0 version instead of 1.9
 or
 2) disable radvd in oldpackages and create a new package for 2.0 version
 under /openwrt/package/ (like this
 https://forum.openwrt.org/viewtopic.php?id=6809)
 
 I want to know is option 1 possible ? If yes then how ?
 If No then, is it possible to disable radvd of oldpackages ?
 
 Thanks,
 Pratik

The packages in oldpackages are not maintained any more.
see: https://lists.openwrt.org/pipermail/openwrt-devel/2014-June/025810.html

You can take over maintainership of that package and send a pull request
to our github repo with the new version of the package, then it will be
removed from oldpackages:
https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md

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


Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi

2015-07-12 Thread Hauke Mehrtens
On 07/12/2015 06:44 AM, Michael Neurohr wrote:
 Hi,
 
 I'm trying to activate the Device Tree for Raspberry Pi builds.
 
 Therefore I changed the flag
 
 # CONFIG_BCM2709_DT is not set
 to
 CONFIG_BCM2709_DT=y
 
 in
 
 /home/mine/gitrepos/openwrt2/target/linux/brcm2708/bcm2709/config-default
 and
 /home/mine/gitrepos/openwrt2/target/linux/brcm2708/bcm2708/config-default
 
 When building for BRCM2709/08 I'm getting the error
 
 ==
   LD  init/built-in.o
 drivers/built-in.o: In function `of_get_mac_address_mtd':
 /home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/drivers/of/of_net.c:106:
 undefined reference to `get_mtd_device_nm'
 /home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/drivers/of/of_net.c:110:
 undefined reference to `mtd_read'
 /home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/drivers/of/of_net.c:111:
 undefined reference to `put_mtd_device'
 make[5]: *** [vmlinux] Error 1
 make[5]: Leaving directory
 `/home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17'
 
 make[4]: ***
 [/home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/.image]
 Error 2
 make[4]: Leaving directory
 `/home/mine/gitrepos/openwrt2/target/linux/brcm2708'
 make[3]: *** [install] Error 2
 make[3]: Leaving directory `/home/mine/gitrepos/openwrt2/target/linux'
 make[2]: *** [target/linux/install] Error 2
 make[2]: Leaving directory `/home/mine/gitrepos/openwrt2'
 make[1]: ***
 [/home/mine/gitrepos/openwrt2/staging_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/stamp/.target_install]
 Error 2
 make[1]: Leaving directory `/home/mine/gitrepos/openwrt2'
 make: *** [world] Error 2
 ==
 
 
 Is it possible at all to activate the Device Tree for Raspberry builds
 at all?
 
 I'm working on the master of git://openwrt.org/openwrt.git
 
 Thanks,
 Michael

Somehow CONFIG_MTD is not activate in your config, please try the
attached patch t make OpenWrt still build in such cases.

Hauke

From f98ce9c7abf1e13443d129aba0e01fe63265445f Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens ha...@hauke-m.de
Date: Sun, 12 Jul 2015 13:39:30 +0200
Subject: [PATCH 2/2] kernel: fix build with CONFIG_MTD unset

of_get_mac_address_mtd() accesses functions behind CONFIG_MTD without
checking if it is available, deactivate this function if
of_get_mac_address_mtd is not available.

Signed-off-by: Hauke Mehrtens ha...@hauke-m.de
---
 .../patches-3.18/681-NET-add-of_get_mac_address_mtd.patch   | 13 +++--
 .../patches-4.0/681-NET-add-of_get_mac_address_mtd.patch| 13 +++--
 .../patches-4.1/681-NET-add-of_get_mac_address_mtd.patch| 13 +++--
 3 files changed, 33 insertions(+), 6 deletions(-)

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
index 8ce17fe..2603f11 100644
--- 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
@@ -23,11 +23,12 @@ Signed-off-by: John Crispin blo...@openwrt.org
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -75,3 +76,43 @@ const void *of_get_mac_address(struct de
+@@ -75,3 +76,45 @@ const void *of_get_mac_address(struct de
  	return NULL;
  }
  EXPORT_SYMBOL(of_get_mac_address);
 +
++#ifdef CONFIG_MTD
 +int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac)
 +{
 +	struct device_node *mtd_np = NULL;
@@ -67,13 +68,21 @@ Signed-off-by: John Crispin blo...@openwrt.org
 +	return ret;
 +}
 +EXPORT_SYMBOL_GPL(of_get_mac_address_mtd);
++#endif
 --- a/include/linux/of_net.h
 +++ b/include/linux/of_net.h
-@@ -11,6 +11,7 @@
+@@ -11,6 +11,14 @@
  #include linux/of.h
  extern int of_get_phy_mode(struct device_node *np);
  extern const void *of_get_mac_address(struct device_node *np);
++#ifdef CONFIG_MTD
 +extern int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac);
++#else
++static inline int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac)
++{
++	return -ENOENT;
++}
++endif
  #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
index 8ce17fe..2603f11 100644
--- 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
@@ -23,11 +23,12 @@ Signed-off-by: John Crispin blo...@openwrt.org

Re: [OpenWrt-Devel] Hyper-V Support for X86 or X86_64

2015-07-12 Thread Hauke Mehrtens
On 01/21/2015 08:04 PM, Ning Ye wrote:
 This is the latest Hyper-V patch to support Linux 3.14.

Could you rebase it to current trunk.
You should probably create a subtarget like target/linux/x86/kvm_guest/
for Hyper-V and activate there CONFIG_HYPERV=y and CONFIG_HYPERV_STORAGE=y

 
 Signed-off-by: Ning Ye n...@oaklight.us
 
 diff --git a/config/Config-images.in b/config/Config-images.in
 old mode 100644
 new mode 100755
 index 5c2e79e..b8e9d9d
 --- a/config/Config-images.in
 +++ b/config/Config-images.in
 @@ -239,6 +239,16 @@ menu Target Images
   select TARGET_IMAGES_PAD
   select PACKAGE_kmod-e1000
  
 + config VHD_IMAGES
 + bool Build Hyper-V image files (VHD)
 + depends on TARGET_x86 || TARGET_x86_64
 + select GRUB_IMAGES
 + select TARGET_IMAGES_PAD
 + select PACKAGE_kmod-hyperv-balloon
 + select PACKAGE_kmod-hyperv-net-vsc
 + select PACKAGE_kmod-hyperv-util
 + select PACKAGE_kmod-hyperv-storage
 +
   config TARGET_IMAGES_PAD
   bool Pad images to filesystem size (for JFFS2)
   depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
 diff --git a/package/kernel/linux/modules/virtual.mk 
 b/package/kernel/linux/modules/virtual.mk
 old mode 100644
 new mode 100755
 index 190d844..a67d71c
 --- a/package/kernel/linux/modules/virtual.mk
 +++ b/package/kernel/linux/modules/virtual.mk
 @@ -186,3 +186,85 @@ define KernelPackage/xen-pcidev/description
  endef
  
  $(eval $(call KernelPackage,xen-pcidev))
 +
 +#
 +# Hyper-V Drives depends on x86 or x86_64.
 +#
 +define KernelPackage/hyperv-balloon
 +  SUBMENU:=$(VIRTUAL_MENU)
 +  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
 +  TITLE:=Microsoft Hyper-V Balloon Driver
 +  KCONFIG:= \
 +CONFIG_HYPERV_BALLOON \
 +CONFIG_HYPERVISOR_GUEST=y \
 +CONFIG_PARAVIRT=n \
 +CONFIG_HYPERV=y

Why do you build CONFIG_HYPERV into the kernel? This should be build as
a module, because this package will be build on all x86 kernels.

 +  FILES:=$(LINUX_DIR)/drivers/hv/hv_balloon.ko
 +  AUTOLOAD:=$(call AutoLoad,06,hv_balloon)
 +endef
 +
 +define KernelPackage/hyperv-balloon/description
 +  Microsofot Hyper-V balloon driver.
 +endef
 +
 +$(eval $(call KernelPackage,hyperv-balloon))
 +
 +define KernelPackage/hyperv-net-vsc
 +  SUBMENU:=$(VIRTUAL_MENU)
 +  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
 +  TITLE:=Microsoft Hyper-V Network Driver
 +  KCONFIG:= \
 +CONFIG_HYPERV_NET \
 +CONFIG_HYPERVISOR_GUEST=y \
 +CONFIG_PARAVIRT=n \
 +CONFIG_HYPERV=y
 +  FILES:=$(LINUX_DIR)/drivers/net/hyperv/hv_netvsc.ko
 +  AUTOLOAD:=$(call AutoLoad,35,hv_netvsc)
 +endef
 +
 +define KernelPackage/hyperv-net-vsc/description
 +  Microsoft Hyper-V Network Driver
 +endef
 +
 +$(eval $(call KernelPackage,hyperv-net-vsc))
 +
 +define KernelPackage/hyperv-util
 +  SUBMENU:=$(VIRTUAL_MENU)
 +  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
 +  TITLE:=Microsoft Hyper-V Utility Driver
 +  KCONFIG:= \
 +CONFIG_HYPERV_UTILS \
 +CONFIG_HYPERVISOR_GUEST=y \
 +CONFIG_PARAVIRT=n \
 +CONFIG_HYPERV=y
 +  FILES:=$(LINUX_DIR)/drivers/hv/hv_util.ko
 +  AUTOLOAD:=$(call AutoLoad,10,hv_util)
 +endef
 +
 +define KernelPackage/hyperv-util/description
 +  Microsoft Hyper-V Utility Driver
 +endef
 +
 +$(eval $(call KernelPackage,hyperv-util))
 +
 +#
 +# Hyper-V Storage Drive needs to be in kernel rather than module to load the 
 root fs.
 +#
 +define KernelPackage/hyperv-storage
 +  SUBMENU:=$(VIRTUAL_MENU)
 +  DEPENDS:=@(TARGET_x86||TARGET_x86_64) +kmod-scsi-core
 +  TITLE:=Microsoft Hyper-V Storage Driver
 +  KCONFIG:= \
 +CONFIG_HYPERV_STORAGE=y \
 +CONFIG_HYPERVISOR_GUEST=y \
 +CONFIG_PARAVIRT=n \
 +CONFIG_HYPERV=y 
 +  FILES:=$(LINUX_DIR)/drivers/scsi/hv_storvsc.ko
 +  AUTOLOAD:=$(call AutoLoad,40,hv_storvsc)
 +endef

You should not crate a OpenWrt kernel module package which build stuff
into the kernel image.

 +
 +define KernelPackage/hyperv-storage/description
 +  Microsoft Hyper-V Storage Driver
 +endef
 +
 +$(eval $(call KernelPackage,hyperv-storage))
 diff --git a/target/linux/x86/config-3.14 b/target/linux/x86/config-3.14
 old mode 100644
 new mode 100755
 index 591fa17..f3f5456
 --- a/target/linux/x86/config-3.14
 +++ b/target/linux/x86/config-3.14
 @@ -197,6 +197,15 @@ CONFIG_HW_RANDOM=y
  CONFIG_HW_RANDOM_GEODE=y
  CONFIG_HW_RANDOM_VIA=y
  # CONFIG_HYPERVISOR_GUEST is not set
 +# CONFIG_HYPERV is not set
 +# CONFIG_HYPERV_BALLOON is not set
 +# CONFIG_HYPERV_NET is not set
 +# CONFIG_HYPERV_STORAGE is not set
 +# CONFIG_HYPERV_UTILS is not set
 +# CONFIG_HYPERV_KEYBOARD is not set
 +# CONFIG_FB_HYPERV is not set
 +# CONFIG_HID_HYPERV_MOUSE is not set
 +# CONFIG_VMWARE_BALLOON is not set
  CONFIG_HZ_PERIODIC=y
  CONFIG_I8253_LOCK=y
  # CONFIG_I8K is not set
 diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
 old mode 100644
 new mode 100755
 

Re: [OpenWrt-Devel] Questions about "binutils: add binutils 2.25.1"

2015-09-15 Thread Hauke Mehrtens
On 09/14/2015 02:24 PM, Alexey Brodkin wrote:
> Hi Hauke,
> 
> I noticed your change made in "toolchain/binutils" recently:
> ->8-
> http://git.openwrt.org/?p=openwrt.git;a=commit;h=fece50d94033c1dcfc3f290acbd428f9125c30aa
> 
> binutils: add binutils 2.25.1
> 
> This adds binutils 2.25.1 as an option to OpenWrt.
> 
> Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
> 
> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46874 
> 3c298f89-4303-0410-b956-a3cf2f4a3e73
> ->8-
> 
> First of all I cannot find that patch in neither OpenWRT mailing list
> (I mean openwrt-devel@lists.openwrt.org) nor in OpenWRT patchwork.
> 
> Did I overlook something?

I was not on the mailing list, I created the patch directly and
committed it.

> But my real question was in "toolchain/binutils/Config.in" you added
> the following:
> ->8-
>config BINUTILS_VERSION_2_25_1
>bool "Linaro binutils 2.25.1" <-- note "Linaro" word
> ->8-
> 
> But in all other places I see there's no mention of "Linaro" for that
> 2.25.1 version.
> 
> In fact PKG_SOURCE_URL:=@GNU/binutils/ for it so it looks like this is
> pristine binutils with no Linaro changes.
> 
> So probably description of BINUTILS_VERSION_2_25_1 should be changed.

Thanks for the report, the description was wrong, I committed a fixed
description in r46946.

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


Re: [OpenWrt-Devel] [PATCH] Add 'traceroute6' to busybox default features

2015-09-11 Thread Hauke Mehrtens
On 09/03/2015 11:51 AM, Hannu Nyman wrote:
> This patch adds 'traceroute6' to the default features of Busybox.
> 
> Signed-off-by: Hannu Nyman 
> ---
> 
> Reference to earlier discussion:
> https://lists.openwrt.org/pipermail/openwrt-devel/2015-August/034828.html
> 
> On Sat Aug 1 16:47:02 CEST 2015 Felix Fietkau wrote:
>> On 2015-08-01 13:04, Bastian Bittorf wrote:
>> > i build it for ar71xx, and these are the numbers [bytes]:
>> >
>> > before:
>> > 359736 build_dir/target-mips_34kc_musl-1.1.10/busybox-1.23.2/busybox
>> > 208071 bin/ar71xx/packages/base/busybox_1.23.2-1_ar71xx.ipk
>> >
>> > after:
>> > 359884 build_dir/target-mips_34kc_musl-1.1.10/busybox-1.23.2/busybox
>> > 209115 bin/ar71xx/packages/base/busybox_1.23.2-1_ar71xx.ipk
>> >
>> > so it adds ~1k to the image. (strange that uncompressed ~148 bytes)
>> > it's as simple as adding CONFIG_BUSYBOX_CONFIG_TRACEROUTE6=y
>> > what do you think?
>> Feel free to send a patch.
>>
>> - Felix

This already went into trunk with this commit:
https://dev.openwrt.org/changeset/46829

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


Re: [OpenWrt-Devel] [PATCH] mac80211: install new firmware for ath9k-htc on target

2015-11-27 Thread Hauke Mehrtens
On 11/27/2015 04:36 PM, Alexey Brodkin wrote:
> For quite some time new firmware for ath9k-htc devices
> is available in
> http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/ath9k_htc/
> 
> Moreover ath9k-htc kernel driver expects this new v1.4
> firmware to exist in /lib/firmware/ath9k_htc.
> 
> What happens currently:
> >8--
> [7.83] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw
> requested
> [7.84] usb 1-1: Direct firmware load for
> ath9k_htc/htc_9271-1.4.0.fw failed with error -2
> [7.85] usb 1-1: Falling back to user helper
> [7.87] usbcore: registered new interface driver ath9k_htc
> [7.88] firmware ath9k_htc!htc_9271-1.4.0.fw:
> firmware_loading_store: map pages failed
> [7.89] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
> [8.20] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size:
> 50980
> [8.44] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33
> credits
> [   10.72] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3
> [   10.74] ath9k_htc 1-1:1.0: FW RMW support: Off
> [   10.76] ieee80211 phy0: Atheros AR9271 Rev:1
> >8--
> 
> And with that patch new firmware is used instead:
> >8--
> [   33.92] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw
> requested
> [   34.23] usb 1-1: ath9k_htc: Transferred FW:
> ath9k_htc/htc_9271-1.4.0.fw, size: 51008
> [   34.48] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33
> credits
> [   34.74] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.4
> [   34.75] ath9k_htc 1-1:1.0: FW RMW support: On
> >8--
> 
> Signed-off-by: Alexey Brodkin 
> Cc: Felix Fietkau 
> ---
>  package/kernel/mac80211/Makefile | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/kernel/mac80211/Makefile 
> b/package/kernel/mac80211/Makefile
> index 4b4f774..7165fc3 100644
> --- a/package/kernel/mac80211/Makefile
> +++ b/package/kernel/mac80211/Makefile
> @@ -1828,6 +1828,11 @@ define KernelPackage/ath9k-htc/install
>   $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_9271.fw \
>   $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_7010.fw \
>   $(1)/lib/firmware/
> + $(INSTALL_DIR) $(1)/lib/firmware/ath9k_htc
> + $(INSTALL_DATA) \
> + 
> $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ath9k_htc/htc_9271-1.4.0.fw \
> + 
> $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ath9k_htc/htc_7010-1.4.0.fw \
> + $(1)/lib/firmware/ath9k_htc
>  endef
>  
>  define KernelPackage/b43/install
> 


Are the old files needed by this driver any more? If the new firmware
files are supporting all devices which are supported by the old ones,
please do not include the old firmware files any more.

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


Re: [OpenWrt-Devel] [PATCH v3] bcm53xx: add support for Huawei WS880

2015-12-02 Thread Hauke Mehrtens
On 12/02/2015 03:48 PM, Sergey Shatunov wrote:
> From: Prototik 
> 
> Changes since v2:
> LED default state modified
> 
> Signed-off-by: Sergey Shatunov 
> ---
>  target/linux/bcm53xx/image/Makefile|  14 +++
>  .../910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch | 115 
> +
>  .../910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch | 115 
> +
>  3 files changed, 244 insertions(+)
>  create mode 100644 
> target/linux/bcm53xx/patches-4.1/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch
>  create mode 100644 
> target/linux/bcm53xx/patches-4.3/910-ARM-BCM5301X-Add-DT-for-Huawei-WS880.patch
> 
The new patch looks good.

...

> ++
> ++leds {
> ++compatible = "gpio-leds";
> ++
> ++wlan {
> ++label = "bcm53xx:white:wlan";
> ++gpios = < 0 GPIO_ACTIVE_LOW>;
> ++linux,default-trigger = "default-off";
> ++};
> ++
> ++lan {
> ++label = "bcm53xx:white:lan";
> ++gpios = < 1 GPIO_ACTIVE_LOW>;
> ++linux,default-trigger = "default-on";
> ++};

When is this lan led activated and when deactivated?

> ++
> ++wps {
> ++label = "bcm53xx:white:wps";
> ++gpios = < 6 GPIO_ACTIVE_LOW>;
> ++linux,default-trigger = "default-off";
> ++};
> ++
> ++internet {
> ++label = "bcm53xx:white:internet";
> ++gpios = < 12 GPIO_ACTIVE_HIGH>;
> ++linux,default-trigger = "default-on";
> ++};
> ++
> ++usb {
> ++label = "bcm53xx:white:usb";
> ++gpios = < 14 GPIO_ACTIVE_LOW>;
> ++linux,default-trigger = "default-off";
> ++};
> ++};
> ++
> ++gpio-keys {
> ++compatible = "gpio-keys";
> ++#address-cells = <1>;
> ++#size-cells = <0>;
> ++
> ++restart {
> ++label = "Reset";
> ++linux,code = ;
> ++gpios = < 2 GPIO_ACTIVE_LOW>;
> ++};
> ++
> ++wps {
> ++label = "WPS";
> ++linux,code = ;
> ++gpios = < 3 GPIO_ACTIVE_LOW>;
> ++};
> ++
> ++power {
> ++label = "Power";
> ++linux,code = ;
> ++gpios = < 15 GPIO_ACTIVE_LOW>;
> ++};
> ++};
> ++
> ++nand@18028000 {
> ++nandcs@0 {
> ++nand-ecc-strength = <4>;
> ++};
> ++};
> ++};
> ++
> ++ {
> ++status = "okay";
> ++};
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/8] lantiq: add dsl-vr9-firmware-xdsl

2015-12-02 Thread Hauke Mehrtens
On 11/26/2015 07:25 AM, John Crispin wrote:
> 
> 
> On 26/11/2015 07:11, Florian Eckert wrote:
>> Sounds good,
>>
>> Lantiq will move as discussed on the openwrt summit.
>> Does this mean that in the future other firmwares (older/newer) are
>> provided by lantiq?
>>
>> Flo
>>
> 
> 
> gphy firmwares for xrx200
> DECT firmware
> gphy firmwares for xrx300
> 
> 
> 
> 

I will try to get more firmware files released under a redistributable
license for OpenWrt and other communities. The plan is also to release
more firmware files for this and other SoCs, we just started with this
because in my opinion the DSL firmware for the VRX200 is currently the
most interesting one for the community, the grx300, grx350 and the
vrx318 are on my todo list.

@Florian are you also working on the grx350?

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


Re: [OpenWrt-Devel] [PATCH] kernel: Hyper-V support for Linux 3.18

2015-12-02 Thread Hauke Mehrtens
On 11/27/2015 05:25 PM, Ning Ye wrote:
> kernel: Update Hyper-V support for Linux 3.18 and OpenWRT  trunk.  Now
> requires at least 96 MB memory for VM.
> 
> Signed-off-by: Ning Ye 

Getting Hyper-V guest support into OpenWrt is a good plan.

I am still thinking about how it should be integrated.

hyperv needs some parts build into the kernel image, so these parts
should not be selected in the virtual.mk file. As most of the parts
which have to be build in are already in the kvm subtarget I would
suggest to extend the kvm and the 64 subtarget to also support hyperv.

You should make your hyperv packages depend on
DEPENDS:=@TARGET_x86_kvm_guest||TARGET_x86_64
These subtargets already have CONFIG_HYPERVISOR_GUEST=y set.

Then you can add OpenWrt kernel packages for the modules you already
added modules and please also make CONFIG_HYPERV a module if it is
possible.

> ---
>  config/Config-images.in | 10 
>  package/kernel/linux/modules/virtual.mk | 86
> +
>  target/linux/x86/config-3.18|  9 
>  target/linux/x86/image/Makefile | 10 
>  4 files changed, 115 insertions(+)
> 
> diff --git a/config/Config-images.in b/config/Config-images.in index
> a60dd50..ff16ef0 100644
> --- a/config/Config-images.in
> +++ b/config/Config-images.in
> @@ -238,6 +238,16 @@ menu "Target Images"
>   select TARGET_IMAGES_PAD
>   select PACKAGE_kmod-e1000
>  
> + config VHD_IMAGES
> + bool "Build Hyper-V image files (VHD)"
> + depends on TARGET_x86 || TARGET_x86_64
> + select GRUB_IMAGES
> + select TARGET_IMAGES_PAD
> + select PACKAGE_kmod-hyperv-balloon
> + select PACKAGE_kmod-hyperv-net-vsc
> + select PACKAGE_kmod-hyperv-util
> + select PACKAGE_kmod-hyperv-storage
> +
>   config TARGET_IMAGES_PAD
>   bool "Pad images to filesystem size (for JFFS2)"
>   depends on GRUB_IMAGES
> diff --git a/package/kernel/linux/modules/virtual.mk
> b/package/kernel/linux/modules/virtual.mk
> index 61a8a87..2d9f8dd 100644
> --- a/package/kernel/linux/modules/virtual.mk
> +++ b/package/kernel/linux/modules/virtual.mk
> @@ -169,3 +169,89 @@ define KernelPackage/xen-pcidev/description
>  endef
>  
>  $(eval $(call KernelPackage,xen-pcidev))
> +
> +#
> +# Hyper-V Drives depends on x86 or x86_64.
> +#
> +define KernelPackage/hyperv-balloon
> +  SUBMENU:=$(VIRTUAL_MENU)
> +  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
> +  TITLE:=Microsoft Hyper-V Balloon Driver
> +  KCONFIG:= \
> +CONFIG_HYPERV_BALLOON \
> +CONFIG_HYPERVISOR_GUEST=y \
> +CONFIG_PARAVIRT=n \
> +CONFIG_HYPERV=y
> +  FILES:=$(LINUX_DIR)/drivers/hv/hv_balloon.ko \
> +$(LINUX_DIR)/drivers/hv/hv_vmbus.ko
> +  AUTOLOAD:=$(call AutoLoad,06,hv_balloon) endef
> +
> +define KernelPackage/hyperv-balloon/description
> +  Microsofot Hyper-V balloon driver.
> +endef
> +
> +$(eval $(call KernelPackage,hyperv-balloon))
> +
> +define KernelPackage/hyperv-net-vsc
> +  SUBMENU:=$(VIRTUAL_MENU)
> +  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
> +  TITLE:=Microsoft Hyper-V Network Driver
> +  KCONFIG:= \
> +CONFIG_HYPERV_NET \
> +CONFIG_HYPERVISOR_GUEST=y \
> +CONFIG_PARAVIRT=n \
> +CONFIG_HYPERV=y
> +  FILES:=$(LINUX_DIR)/drivers/net/hyperv/hv_netvsc.ko \
> +$(LINUX_DIR)/drivers/hv/hv_vmbus.ko
> +  AUTOLOAD:=$(call AutoLoad,35,hv_netvsc) endef
> +
> +define KernelPackage/hyperv-net-vsc/description
> +  Microsoft Hyper-V Network Driver
> +endef
> +
> +$(eval $(call KernelPackage,hyperv-net-vsc))
> +
> +define KernelPackage/hyperv-util
> +  SUBMENU:=$(VIRTUAL_MENU)
> +  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
> +  TITLE:=Microsoft Hyper-V Utility Driver
> +  KCONFIG:= \
> +CONFIG_HYPERV_UTILS \
> +CONFIG_HYPERVISOR_GUEST=y \
> +CONFIG_PARAVIRT=n \
> +CONFIG_HYPERV=y
> +  FILES:=$(LINUX_DIR)/drivers/hv/hv_util.ko \
> +$(LINUX_DIR)/drivers/hv/hv_vmbus.ko
> +  AUTOLOAD:=$(call AutoLoad,10,hv_util) endef
> +
> +define KernelPackage/hyperv-util/description
> +  Microsoft Hyper-V Utility Driver
> +endef
> +
> +$(eval $(call KernelPackage,hyperv-util))
> +
> +#
> +# Hyper-V Storage Drive needs to be in kernel rather than module to load
> the root fs.
> +#
> +define KernelPackage/hyperv-storage
> +  SUBMENU:=$(VIRTUAL_MENU)
> +  DEPENDS:=@(TARGET_x86||TARGET_x86_64) +kmod-scsi-core
> +  TITLE:=Microsoft Hyper-V Storage Driver
> +  KCONFIG:= \
> +CONFIG_HYPERV_STORAGE=y \
> +CONFIG_HYPERVISOR_GUEST=y \
> +CONFIG_PARAVIRT=n \
> +CONFIG_HYPERV=y
> +  FILES:=$(LINUX_DIR)/drivers/scsi/hv_storvsc.ko \
> +$(LINUX_DIR)/drivers/hv/hv_vmbus.ko
> +  AUTOLOAD:=$(call AutoLoad,40,hv_storvsc) endef
> +
> +define KernelPackage/hyperv-storage/description
> +  Microsoft Hyper-V Storage Driver
> +endef
> +
> +$(eval $(call KernelPackage,hyperv-storage))
> diff --git a/target/linux/x86/config-3.18 

Re: [OpenWrt-Devel] [PATCH] linux: add support of Synopsys ARCHS38-based boards

2015-12-09 Thread Hauke Mehrtens
On 12/09/2015 03:16 PM, Alexey Brodkin wrote:
> This patch introduces support of new boards with ARC HS38 cores.
> 
> ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA.
> Because of new ISA ARC HS38 are binary incompatible with ARC 700
> cores which requires both separate toolchain and target applications
> including Linux kernel for that new cores.
> 
> As with ARC770 we're addind support for 2 boards for now:
> 
>  [1] Synopsys SDP board (AXS103)
>  This is the same base-board as in AXS101 but with
>  FPGA-based CPU-tile where ARCHs38 core is implemented.
> 
>  [2] nSIM
>  Again this is the same simulation engine but configured for
>  new instruction set and features of new CPU.
> 
> Cc: Felix Fietkau 
> Cc: Jo-Philipp Wich 
> Cc: Jonas Gorski 
> Signed-off-by: Alexey Brodkin 
> ---
>  include/target.mk  |   1 +
>  target/linux/archs38/Makefile  |  27 +++
>  target/linux/archs38/base-files.mk |   3 +
>  .../archs38/base-files/etc/board.d/02_network  |  19 ++
>  target/linux/archs38/base-files/lib/arc.sh |  50 +
>  .../base-files/lib/preinit/01_preinit_arc.sh   |   9 +
>  target/linux/archs38/config-4.3| 190 +
>  target/linux/archs38/dts/axc003_idu.dtsi   | 126 
>  target/linux/archs38/dts/axs103_idu.dts|  25 +++
>  target/linux/archs38/dts/axs10x_mb.dtsi| 224 
> +
>  target/linux/archs38/dts/nsim_hs_idu.dts   |  73 +++
>  target/linux/archs38/dts/skeleton.dtsi |  37 
>  .../linux/archs38/generic/profiles/00-default.mk   |  16 ++
>  .../linux/archs38/generic/profiles/01-minimal.mk   |  15 ++
>  target/linux/archs38/generic/profiles/02-axs103.mk |  16 ++
>  .../linux/archs38/generic/profiles/03-nsim_hs.mk   |  15 ++
>  target/linux/archs38/generic/target.mk |   8 +
>  target/linux/archs38/image/Makefile|  40 
>  ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch |  36 
>  .../0002-openwrt-arc-add-OWRTDTB-section.patch |  91 +
>  toolchain/gcc/common.mk|   1 +
>  toolchain/uClibc/common.mk |   3 +-
>  toolchain/uClibc/config/archs  |  10 +
>  23 files changed, 1034 insertions(+), 1 deletion(-)
>  create mode 100644 target/linux/archs38/Makefile
>  create mode 100644 target/linux/archs38/base-files.mk
>  create mode 100755 target/linux/archs38/base-files/etc/board.d/02_network
>  create mode 100644 target/linux/archs38/base-files/lib/arc.sh
>  create mode 100644 
> target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh
>  create mode 100644 target/linux/archs38/config-4.3
>  create mode 100644 target/linux/archs38/dts/axc003_idu.dtsi
>  create mode 100644 target/linux/archs38/dts/axs103_idu.dts
>  create mode 100644 target/linux/archs38/dts/axs10x_mb.dtsi
>  create mode 100644 target/linux/archs38/dts/nsim_hs_idu.dts
>  create mode 100644 target/linux/archs38/dts/skeleton.dtsi
>  create mode 100644 target/linux/archs38/generic/profiles/00-default.mk
>  create mode 100644 target/linux/archs38/generic/profiles/01-minimal.mk
>  create mode 100644 target/linux/archs38/generic/profiles/02-axs103.mk
>  create mode 100644 target/linux/archs38/generic/profiles/03-nsim_hs.mk
>  create mode 100644 target/linux/archs38/generic/target.mk
>  create mode 100644 target/linux/archs38/image/Makefile
>  create mode 100644 
> target/linux/archs38/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch
>  create mode 100644 
> target/linux/archs38/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.patch
>  create mode 100644 toolchain/uClibc/config/archs
> 
> diff --git a/include/target.mk b/include/target.mk
> index f129298..009738a 100644
> --- a/include/target.mk
> +++ b/include/target.mk
> @@ -264,6 +264,7 @@ ifeq ($(DUMP),1)
>ifeq ($(ARCH),arc)
>  CPU_TYPE ?= arc700
>  CPU_CFLAGS_arc700 = -marc700
> +CPU_CFLAGS_archs38 = -marchs
>endif
>DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) 
> $(CPU_CFLAGS_$(CPU_SUBTYPE)))
>  endif
> diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile
> new file mode 100644
> index 000..855954a
> --- /dev/null
> +++ b/target/linux/archs38/Makefile
> @@ -0,0 +1,27 @@
> +#
> +# Copyright (C) 2015 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +include $(TOPDIR)/rules.mk
> +
> +ARCH:=arc
> +CPU_TYPE:=archs
> +BOARD:=archs38
> +BOARDNAME:=Synopsys DesignWare ARC HS38
> +CFLAGS:=-Os -pipe -fno-caller-saves -matomic

"-Os -pipe" will be added by default in include/target.mk, if
"-fno-caller-saves -matomic" should always be used for this CPU core,
you should add it to CPU_CFLAGS_archs38 in 

Re: [OpenWrt-Devel] [PATCH] [toolchain]: Add experimental GCCGO support

2015-12-13 Thread Hauke Mehrtens
On 12/09/2015 10:39 AM, open...@daniel.thecshore.com wrote:
> From: Daniel Dickinson 
> 
> Packages can use TARGET_GOC for the gnugcc compiler.
> 
> No generic packaging defaults have been added as I'm not sure what that should
> look like or if there are even sensible defaults for the Go projects out 
> there.
> 
> Currently only patches for GCC 5 - previous versions of GCC will need similar 
> work.
> Also note that GCC 5 is required for Go 1.4; previous versions of GCC only 
> support
> Go 1.1 therefore a dependency on GCC version will be required by many 
> packages.

Supporting only gcc5 is no problem.

> 
> Signed-off-by: Daniel Dickinson 
> ---
>  rules.mk   |   4 +
>  toolchain/gcc/Config.in|   8 ++
>  toolchain/gcc/common.mk|  10 +-
>  toolchain/gcc/final/Makefile   |   2 +-
>  .../5.2.0/960-add-libm-for-extra-langs.patch   |  39 +++
>  .../5.2.0/970-fix-go-mprof-use-uninitialized.patch |  13 +++
>  .../980-fix-missing-glibc-types-with-musl.patch| 119 
> +
>  .../gcc/patches/5.2.0/990-fix-skip-gotools.patch   |  26 +
>  8 files changed, 216 insertions(+), 5 deletions(-)
>  create mode 100644 
> toolchain/gcc/patches/5.2.0/960-add-libm-for-extra-langs.patch
>  create mode 100644 
> toolchain/gcc/patches/5.2.0/970-fix-go-mprof-use-uninitialized.patch
>  create mode 100644 
> toolchain/gcc/patches/5.2.0/980-fix-missing-glibc-types-with-musl.patch
>  create mode 100644 toolchain/gcc/patches/5.2.0/990-fix-skip-gotools.patch
> 
> diff --git a/rules.mk b/rules.mk
> index 1e7549f..2bda73c 100644
> --- a/rules.mk
> +++ b/rules.mk
> @@ -187,6 +187,8 @@ else
>endif
>  endif
>  
> +TARGET_CFLAGS_GO=$(TARGET_CFLAGS) -g1
> +
>  export PATH:=$(TARGET_PATH)
>  export STAGING_DIR STAGING_DIR_HOST
>  export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh;
> @@ -214,6 +216,7 @@ endif
>  BUILD_KEY=$(TOPDIR)/key-build
>  
>  TARGET_CC:=$(TARGET_CROSS)gcc
> +TARGET_GOC:=$(TARGET_CROSS)gccgo
>  TARGET_CXX:=$(TARGET_CROSS)g++
>  KPATCH:=$(SCRIPT_DIR)/patch-kernel.sh
>  SED:=$(STAGING_DIR_HOST)/bin/sed -i -e
> @@ -253,6 +256,7 @@ TARGET_CONFIGURE_OPTS = \
>LD=$(TARGET_CROSS)ld \
>NM="$(TARGET_NM)" \
>CC="$(TARGET_CC)" \
> +  GOC="$(TARGET_GOC)" \
>GCC="$(TARGET_CC)" \
>CXX="$(TARGET_CXX)" \
>RANLIB="$(TARGET_RANLIB)" \
> diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
> index a8c39d6..e89b81a 100644
> --- a/toolchain/gcc/Config.in
> +++ b/toolchain/gcc/Config.in
> @@ -72,3 +72,11 @@ config INSTALL_GFORTRAN
>   default n
>   help
>   Build/install GNU fortran compiler ?
> +
> +config INSTALL_GOLANG
> + bool
> + prompt "Build/install golang compiler?" if TOOLCHAINOPTS
> + default n
> + help
> + Build/install GNU golang compiler ?
> +

You should add a dependency to gcc5

> diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
> index 3e4f3ee..54e8f2d 100644
> --- a/toolchain/gcc/common.mk
> +++ b/toolchain/gcc/common.mk
> @@ -101,7 +101,7 @@ HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured
>  HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.gcc_$(GCC_VARIANT)_installed
>  
>  SEP:=,
> -TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if 
> $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)"
> +TARGET_LANGUAGES:="c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if 
> $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if 
> $(CONFIG_INSTALL_GOLANG),$(SEP)go)"
>  
>  export libgcc_cv_fixed_point=no
>  ifdef CONFIG_USE_UCLIBC
> @@ -122,8 +122,9 @@ GCC_CONFIGURE:= \
>   SHELL="$(BASH)" \
>   $(if $(shell gcc --version 2>&1 | grep LLVM), \
>   CFLAGS="-O2 -fbracket-depth=512 -pipe" \
> - CXXFLAGS="-O2 -fbracket-depth=512 -pipe" \
> - ) \
> + CXXFLAGS="-O2 -fbracket-depth=512 -pipe"  \
> +) \

Why are you chaining the indenting here?

> + $(if $(CONFIG_USE_MUSL),CONFIG_USE_MUSL="-DCONFIG_USE_MUSL") \

Why is this needed?

>   $(HOST_SOURCE_DIR)/configure \
>   --with-bugurl=$(BUGURL) \
>   --with-pkgversion="$(PKGVERSION)" \
> @@ -199,7 +200,8 @@ GCC_MAKE:= \
>   $(MAKE) \
>   CFLAGS="$(HOST_CFLAGS)" \
>   CFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \
> - CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)"
> + CXXFLAGS_FOR_TARGET="$(TARGET_CFLAGS)" \
> + GOCFLAGS_FOR_TARGET="-O2 -g $(if 
> $(CONFIG_USE_MUSL),-DCONFIG_USE_MUSL)"

Can't we take the $(TARGET_CFLAGS) for GOCFLAGS_FOR_TARGET here?

>  
>  define Host/Prepare
>   mkdir -p $(GCC_BUILD_DIR)
> diff --git a/toolchain/gcc/final/Makefile b/toolchain/gcc/final/Makefile
> index 3434d89..224dbdb 100644
> --- a/toolchain/gcc/final/Makefile
> +++ b/toolchain/gcc/final/Makefile
> @@ -44,7 +44,7 @@ define Host/Compile
>  endef
>  
>  define SetupExtraArch
> -  

Re: [OpenWrt-Devel] [PATCH 2/4] lantiq: Add support for linux 4.4

2015-12-31 Thread Hauke Mehrtens


On 12/31/2015 01:10 AM, Martin Blumenstingl wrote:
> The following patches were dropped because they are already applied
> upstream:
> - 0038-MIPS-lantiq-fpi-on-ar9.patch
> - 0039-MIPS-lantiq-initialize-usb-on-boot.patch
> - 0042-USB-DWC2-big-endian-support.patch
> - 0043-gpio-stp-xway-fix-phy-mask.patch
> - 0050-MIPS-lantiq-add-clk_round_rate.patch
> 
> All other patches were simply refreshed, except the following two:
> - 0001-MIPS-lantiq-add-pcie-driver.patch
>   Changes to arch/mips/lantiq/xway/sysctrl.c (these changes disabled
>   some PMU gates for the vrx200 / VR9 SoCs) were removed since the
>   upstream kernel disables unused PMU gates automatically (since
>   95135bfa7ead1becc2879230f72583dde2b71a0c
>   "MIPS: Lantiq: Deactivate most of the devices by default").
> - 0101-mtd-split.patch
>   __mtd_add_partition() is not required anymore since r47747 removed
>   it from the generic-patches. This was possible because the upstream
>   kernel does not check for duplicates anymore (since
>   3a434f66e6dab645d74a59c95651cdbe16497a50
>   "mtd: part: Remove partition overlap checks").
> ---
> linux 4.4 was briefly tested on an arx100 and vrx200 (special thanks to
> Mathias Kresin) based SoC. Both seem to boot fine and (V)DSL, wifi and
> ethernet seem to be working.
> 
>  target/linux/lantiq/config-4.4 |  168 +
>  .../0001-MIPS-lantiq-add-pcie-driver.patch | 5521 
> 
>  .../0002-MIPS-lantiq-dtb-image-hack.patch  |   31 +
>  .../0004-MIPS-lantiq-add-atm-hack.patch|  500 ++
>  .../0007-MIPS-lantiq-add-basic-tffs-driver.patch   |  111 +
>  .../0008-MIPS-lantiq-backport-old-timer-code.patch | 1028 
>  .../0012-pinctrl-lantiq-fix-up-pinmux.patch|   78 +
>  ...0013-MTD-lantiq-xway-fix-invalid-operator.patch |   24 +
>  ...xway-the-latched-command-should-be-persis.patch |   44 +
>  .../0015-MTD-lantiq-xway-remove-endless-loop.patch |   41 +
>  ...xway-add-missing-write_buf-and-read_buf-t.patch |   55 +
>  .../0017-MTD-xway-fix-nand-locking.patch   |   89 +
>  .../0018-MTD-nand-lots-of-xrx200-fixes.patch   |  125 +
>  ...MTD-lantiq-handle-NO_XIP-on-cfi0001-flash.patch |   25 +
>  ...MTD-m25p80-allow-loading-mtd-name-from-OF.patch |   44 +
>  ...023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch |  537 ++
>  ...024-NET-lantiq-adds-PHY11G-firmware-blobs.patch |  364 ++
>  .../0025-NET-MIPS-lantiq-adds-xrx200-net.patch | 3340 
>  .../patches-4.4/0026-NET-multi-phy-support.patch   |   53 +
>  .../0028-NET-lantiq-various-etop-fixes.patch   |  907 
>  .../0030-GPIO-add-named-gpio-exports.patch |  166 +
>  ...2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch | 1034 
>  .../0032-USB-fix-roothub-for-IFXHCD.patch  |   31 +
>  .../0033-SPI-MIPS-lantiq-adds-spi-xway.patch   | 1049 
>  ...ompile-when-reset-RESET_CONTROLLER-is-not.patch |   45 +
>  ...-lantiq-wifi-and-ethernet-eeprom-handling.patch |  630 +++
>  .../0036-owrt-generic-dtb-image-hack.patch |   32 +
>  .../0040-USB-DWC2-enable-usb-power-gpio.patch  |   35 +
>  .../patches-4.4/0041-USB-DWC2-add-ltq-params.patch |   46 +
>  .../linux/lantiq/patches-4.4/0101-mtd-split.patch  |  173 +
>  .../patches-4.4/0150-lantiq-pinctrl-xway.patch |   15 +
>  .../0151-lantiq-ifxmips_pcie-use-of.patch  |   51 +
>  .../0160-owrt-lantiq-multiple-flash.patch  |  217 +
>  ...D-cfi-cmdset-0001-disable-buffered-writes.patch |   11 +
>  34 files changed, 16620 insertions(+)
>  create mode 100644 target/linux/lantiq/config-4.4
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0001-MIPS-lantiq-add-pcie-driver.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0002-MIPS-lantiq-dtb-image-hack.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0004-MIPS-lantiq-add-atm-hack.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0007-MIPS-lantiq-add-basic-tffs-driver.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0008-MIPS-lantiq-backport-old-timer-code.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0012-pinctrl-lantiq-fix-up-pinmux.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0013-MTD-lantiq-xway-fix-invalid-operator.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0014-MTD-lantiq-xway-the-latched-command-should-be-persis.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0015-MTD-lantiq-xway-remove-endless-loop.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0016-MTD-lantiq-xway-add-missing-write_buf-and-read_buf-t.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0017-MTD-xway-fix-nand-locking.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0018-MTD-nand-lots-of-xrx200-fixes.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0020-MTD-lantiq-handle-NO_XIP-on-cfi0001-flash.patch
>  create mode 100644 
> 

Re: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread Hauke Mehrtens


On 12/31/2015 11:28 AM, John Crispin wrote:
> 
> 
> On 31/12/2015 10:51, Mathias Kresin wrote:
>> Am 31.12.2015 um 08:12 schrieb John Crispin:
>>> Hi
>>>
>>> On 31/12/2015 01:10, Martin Blumenstingl wrote:
 +
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
 +#include 
 +#else
   #include 
 +#endif
>>>
>>> please just drop the old code. there is no need to be compatible to old
>>> kernels.
>>>
>>> John
>>>
>>
>> I guess we should keep the compatibility with Kernel 4.1 as long as this
>> kernel version is the default for this target and/or available for this
>> target.
> 
> i was planning to jump straight to 4.4
> 
>   John

Linux 4.1 already has include/linux/scatterlist.h, I assume that this
will also compile with linux 4.1 when you use #include 

Hauke
___
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] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread Hauke Mehrtens


On 12/31/2015 01:10 AM, Martin Blumenstingl wrote:
> Upstream linux 4.2 commit 84be456f883c4685680fba8e5154b5f72e92957e
> "remove " moves scatterlist.h to linux/ instead of asm/.
> 
> Upstream linux 4.3 commit b0d955ba4688fcba8112884931aea1f1e6f50f03
> "crypto: aead - Remove old AEAD interfaces" removed aead_request_set_assoc.
> aead_request_set_ad should be used instead.
> ---
>  package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h|  6 ++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h |  6 ++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h|  7 +++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h|  6 ++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c   |  7 +++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c  |  7 +++
>  package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c| 10 ++
>  7 files changed, 49 insertions(+)
> 
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h
> index 1d84da3..f030d62 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h
> @@ -54,7 +54,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  #include "ifxmips_deu.h"
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h
> index 62ad96d..32e055c 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h
> @@ -53,7 +53,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  #include "ifxmips_deu.h"
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h
> index 5198a4a..c376266 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h
> @@ -31,11 +31,18 @@
>  #ifndef IFXMIPS_DEU_DMA_H
>  #define IFXMIPS_DEU_DMA_H
>  
> +#include 
>  #include 
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  #include 
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h
> index d2cfd11..f801c24 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h
> @@ -54,7 +54,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  #include "ifxmips_deu.h"
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c
> index a5f5f90..e546a92 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c
> @@ -40,6 +40,7 @@
>  
>  
>  /* Project header */
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -48,7 +49,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  
>  #if defined(CONFIG_DANUBE)
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c
> index a5a6c39..be16152 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c
> @@ -40,6 +40,7 @@
>  
>  
>  /* Project header */
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -47,7 +48,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  
> diff --git a/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c 
> b/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c
> index 054cac3..36848ee 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c
> +++ b/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c
> @@ -13,6 +13,8 @@
>   *
>   */
>  
> +#include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -475,7 +477,11 @@ static int test_aead(struct crypto_aead *tfm, int enc,
>   aead_request_set_crypt(req, sg, sg,
>  template[i].ilen, iv);
>  
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
>   aead_request_set_assoc(req, asg, template[i].alen);
> +#else
> + aead_request_set_ad(req, template[i].alen);
> +#endif

I think this change is wrong. Compare it to the 

Re: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread Hauke Mehrtens


On 12/31/2015 02:51 PM, John Crispin wrote:
> 
> 
> On 31/12/2015 14:44, Hauke Mehrtens wrote:
>>
>>
>> On 12/31/2015 11:28 AM, John Crispin wrote:
>>>
>>>
>>> On 31/12/2015 10:51, Mathias Kresin wrote:
>>>> Am 31.12.2015 um 08:12 schrieb John Crispin:
>>>>> Hi
>>>>>
>>>>> On 31/12/2015 01:10, Martin Blumenstingl wrote:
>>>>>> +
>>>>>> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
>>>>>> +#include 
>>>>>> +#else
>>>>>>   #include 
>>>>>> +#endif
>>>>>
>>>>> please just drop the old code. there is no need to be compatible to old
>>>>> kernels.
>>>>>
>>>>> John
>>>>>
>>>>
>>>> I guess we should keep the compatibility with Kernel 4.1 as long as this
>>>> kernel version is the default for this target and/or available for this
>>>> target.
>>>
>>> i was planning to jump straight to 4.4
>>>
>>> John
>>
>> Linux 4.1 already has include/linux/scatterlist.h, I assume that this
>> will also compile with linux 4.1 when you use #include 
>>
>> Hauke
>>
> 
> anyone wanna try ? :) i am short on time the next 2-3 days and need to
> fight the backlog before i can start on new tasks.
> 
>   John

Kernel 4.1 still builds without the ifdef and only using the
linux/scatterlist.h include.

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


Re: [OpenWrt-Devel] [PATCH 3/6] ltq-vdsl-app: add/enable missing G.993.2 XTSE bits

2015-12-29 Thread Hauke Mehrtens


On 12/29/2015 09:56 PM, Mathias Kresin wrote:
> This patch adds the missing VDSL2 bits to the annex specific XTSE (like
> it should be according to the comments above the XTSE bits).
> 
> Since r47933 it's mandatory to remove the annex option to switch to
> VDSL2 (only) operation mode.
> 
> As shown by ticket #21436 and a few mails I received personally, even
> experienced users are not aware that they have to remove the annex
> option to get their VDSL2 line working and as shown by this patch it
> doesn't need to be that "complicated".
> 
> Signed-off-by: Mathias Kresin <open...@kresin.me>

Acked-By: Hauke Mehrtens <ha...@hauke-m.de>

Activating VDSL every time should be OK for the CPE devices with VDSL
support. I do not know what happens with ADSL only chips. this could
still cause inter interoperability problems with some broken? DSLAMs.

> ---
>  package/network/config/ltq-vdsl-app/files/dsl_control | 16 ++--
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
> b/package/network/config/ltq-vdsl-app/files/dsl_control
> index 3ead82b..9bd4eb5 100644
> --- a/package/network/config/ltq-vdsl-app/files/dsl_control
> +++ b/package/network/config/ltq-vdsl-app/files/dsl_control
> @@ -18,13 +18,14 @@ EXTRA_HELP="  status  Get DSL status information
>  # G.992.1 Annex A
>  # G.992.3 Annex A / L-US1 / L_US-2 / M
>  # G.992.5 Annex A / M
> -xtse_adsl_a="04_00_04_00_0C_01_04_00"
> +# G.993.2 Annex A/B/C
> +xtse_xdsl_a="04_00_04_00_0C_01_04_07"
>  
>  # G.992.1 Annex B
>  # G.992.3 Annex B
>  # G.992.5 Annex B
>  # G.993.2 Annex A/B/C
> -xtse_adsl_b="10_00_10_00_00_04_00_00"
> +xtse_adsl_b="10_00_10_00_00_04_00_07"
>  
>  # G.992.1 Annex B
>  # G.992.3 Annex B
> @@ -32,7 +33,7 @@ xtse_adsl_b="10_00_10_00_00_04_00_00"
>  # G.992.5 Annex B
>  # G.992.5 Annex J
>  # G.993.2 Annex A/B/C
> -xtse_adsl_j="10_00_10_40_00_04_01_00"
> +xtse_adsl_j="10_00_10_40_00_04_01_07"
>  
>  xtse_vdsl="00_00_00_00_00_00_00_07"
>  
> @@ -44,7 +45,6 @@ start_service() {
>   local annex
>   local firmware
>   local xtse
> - local xtse_adsl
>   local mode
>  
>   config_load network
> @@ -67,12 +67,8 @@ start_service() {
>   ;;
>   esac
>  
> - eval "xtse_adsl=\"\${xtse_adsl_$annex}\""
> - if [ "${xtse_adsl}" ]; then
> - xtse=$xtse_adsl
> - else
> - xtse=$xtse_vdsl
> - fi
> + eval "xtse=\"\${xtse_xdsl_$annex}\""
> + [ -z "${xtse}" ] && xtse=$xtse_vdsl
>  
>   [ -z "${firmware}" ] && firmware=/lib/firmware/vdsl.bin
>   [ -f "${firmware}" ] || {
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2015-12-25 Thread Hauke Mehrtens


On 12/25/2015 12:46 PM, Tathagata Das wrote:
> Add support for the Netgear D7800 and build appropriate sysupgrade and
> factory images.
> 
> Known issues:
> . USB ports are not working
> . DSL is not added

Do you plan to add support for the DSL part?

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


Re: [OpenWrt-Devel] [PATCH] kernel: generic 4.1 & 4.4 perf: musl compatibility

2015-12-29 Thread Hauke Mehrtens


On 12/29/2015 11:14 AM, Kevin Darbyshire-Bryant wrote:
> Enable linux perf tools to compile under musl.
> 
> Tested on MIPS Archer c7 v2 & ARM Linksys 1200ac.
> 
> With thanks to Dave Taht  who
> did the heavy lifting.
> 
> Signed-off-by: Kevin Darbyshire-Bryant 
> ---
>  package/devel/perf/Makefile|   2 +-
>  .../patches-4.1/280-perf-fixes-for-musl.patch  | 148 
> +
>  .../patches-4.4/280-perf-fixes-for-musl.patch  | 147 
>  3 files changed, 296 insertions(+), 1 deletion(-)
>  create mode 100644 
> target/linux/generic/patches-4.1/280-perf-fixes-for-musl.patch
>  create mode 100644 
> target/linux/generic/patches-4.4/280-perf-fixes-for-musl.patch
> 
> diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
> index 5e3d63f..46ddb92 100644
> --- a/package/devel/perf/Makefile
> +++ b/package/devel/perf/Makefile
> @@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk
>  define Package/perf
>SECTION:=devel
>CATEGORY:=Development
> -  DEPENDS:= @USE_GLIBC +libelf1 +libdw +libpthread +librt +binutils
> +  DEPENDS:= @USE_MUSL +libelf1 +libdw +libpthread +librt +binutils

Does it not work with GLIBC any more or why do you make it depend on
musl only now? Does this work with uclibc-ng?

I assume that this will not work on kernel 3.18 and kernel 4.3, which is
fine, as you haven't added patches for these kernel versions, but the
dependency is missing. Please add @!LINUX_3_18 @!LINUX_4_3

Will this be in kernel 4.5?

>TITLE:=Linux performance monitoring tool
>VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
>URL:=http://www.kernel.org
> diff --git a/target/linux/generic/patches-4.1/280-perf-fixes-for-musl.patch 
> b/target/linux/generic/patches-4.1/280-perf-fixes-for-musl.patch
> new file mode 100644
> index 000..0e8b6d8
> --- /dev/null
> +++ b/target/linux/generic/patches-4.1/280-perf-fixes-for-musl.patch
> @@ -0,0 +1,148 @@
> +kernel: 4.1 perf: musl compatibility
> +
> +Allow linux perf tool to compile under musl.
> +
> +Backport to 4.1 by Kevin D-B with thanks to Dave
> +Taht  for the heavy lifting.
> +
> +Signed-off-by: Kevin Darbyshire-Bryant 
> +
> +---
> + tools/lib/api/fs/debugfs.c |  4 
> + tools/lib/traceevent/event-parse.c |  4 
> + tools/perf/perf.c  | 17 -
> + tools/perf/util/cache.h|  2 +-
> + tools/perf/util/cloexec.c  |  4 
> + tools/perf/util/cloexec.h  |  4 
> + tools/perf/util/util.h |  4 
> + 7 files changed, 29 insertions(+), 10 deletions(-)
> +
> +diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib/api/fs/debugfs.c
> +index 8305b3e..5d1745c 100644
> +--- a/tools/lib/api/fs/debugfs.c
>  b/tools/lib/api/fs/debugfs.c
> +@@ -17,6 +17,10 @@
> + #define DEBUGFS_DEFAULT_PATH"/sys/kernel/debug"
> + #endif
> + 
> ++/* musl has a xpg compliant strerror_r by default */
> ++#define strerror_r(err, buf, buflen) \
> ++(strerror_r(err, buf, buflen) ? NULL : buf)
> ++
> + char debugfs_mountpoint[PATH_MAX + 1] = DEBUGFS_DEFAULT_PATH;
> + 
> + static const char * const debugfs_known_mountpoints[] = {
> +diff --git a/tools/lib/traceevent/event-parse.c 
> b/tools/lib/traceevent/event-parse.c
> +index ed5461f..f151369 100644
> +--- a/tools/lib/traceevent/event-parse.c
>  b/tools/lib/traceevent/event-parse.c
> +@@ -36,6 +36,10 @@
> + #include "event-parse.h"
> + #include "event-utils.h"
> + 
> ++/* musl has a xpg compliant strerror_r by default */
> ++#define strerror_r(err, buf, buflen) \
> ++(strerror_r(err, buf, buflen) ? NULL : buf)
> ++
> + static const char *input_buf;
> + static unsigned long long input_buf_ptr;
> + static unsigned long long input_buf_siz;
> +diff --git a/tools/perf/perf.c b/tools/perf/perf.c
> +index b857fcb..3e67fa2 100644
> +--- a/tools/perf/perf.c
>  b/tools/perf/perf.c
> +@@ -505,6 +505,21 @@ void pthread__unblock_sigwinch(void)
> + pthread_sigmask(SIG_UNBLOCK, , NULL);
> + }
> + 
> ++unsigned cache_line_size(void);
> ++
> ++unsigned cache_line_size(void) {
> ++FILE * p = 0;
> ++unsigned int i = 0;
> ++p = 
> fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r");
> ++if (p) {
> ++if(fscanf(p, "%d", ) != 1) {
> ++perror("cannot determine cache line size");
> ++}
> ++fclose(p);
> ++}
> ++return i;
> ++}
> ++
> + int main(int argc, const char **argv)
> + {
> + const char *cmd;
> +@@ -512,7 +527,7 @@ int main(int argc, const char **argv)
> + 
> + /* The page_size is placed in util object. */
> + page_size = sysconf(_SC_PAGE_SIZE);
> +-cacheline_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
> ++cacheline_size = cache_line_size();
> + 
> + cmd = perf_extract_argv0_path(argv[0]);
> + if (!cmd)
> +diff --git 

[OpenWrt-Devel] [PATCH 1/8] lantiq: ltq-ifxos: fix build warnings

2015-11-24 Thread Hauke Mehrtens
From: Hauke Mehrtens <hauke.mehrt...@lantiq.com>

This makes the build script use the same configure options as used by
Lantiq  UGW and fixes some warnings and cleans up some of the patches.

Signed-off-by: Hauke Mehrtens <hauke.mehrt...@lantiq.com>
---
 package/kernel/lantiq/ltq-ifxos/Makefile   |  6 --
 .../lantiq/ltq-ifxos/patches/001-warnings.patch| 24 ++
 .../lantiq/ltq-ifxos/patches/100-compat.patch  | 19 ++---
 3 files changed, 34 insertions(+), 15 deletions(-)
 create mode 100644 package/kernel/lantiq/ltq-ifxos/patches/001-warnings.patch

diff --git a/package/kernel/lantiq/ltq-ifxos/Makefile 
b/package/kernel/lantiq/ltq-ifxos/Makefile
index 9919a9b..70fb4da 100644
--- a/package/kernel/lantiq/ltq-ifxos/Makefile
+++ b/package/kernel/lantiq/ltq-ifxos/Makefile
@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=lib_ifxos
 PKG_VERSION:=1.5.19
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 
PKG_SOURCE_URL:=https://github.com/xdarklight/$(PKG_NAME)/archive/v$(PKG_VERSION)
@@ -31,12 +31,14 @@ define KernelPackage/ltq-ifxos
   AUTOLOAD:=$(call AutoLoad,10,drv_ifxos)
 endef
 
+MAKE_FLAGS+=-s
+
 CONFIGURE_ARGS += \
ARCH=$(LINUX_KARCH) \
--enable-linux-26 \
--enable-kernelbuild="$(LINUX_DIR)" \
--enable-kernelincl="$(LINUX_DIR)/include" \
-   --enable-add_drv_cflags="-fno-pic -mno-abicalls -mlong-calls -G 0"
+   --with-kernel-module
 
 ifdef CONFIG_TARGET_lantiq
   define Build/InstallDev
diff --git a/package/kernel/lantiq/ltq-ifxos/patches/001-warnings.patch 
b/package/kernel/lantiq/ltq-ifxos/patches/001-warnings.patch
new file mode 100644
index 000..78940649
--- /dev/null
+++ b/package/kernel/lantiq/ltq-ifxos/patches/001-warnings.patch
@@ -0,0 +1,24 @@
+--- a/src/include/linux/ifxos_linux_thread.h
 b/src/include/linux/ifxos_linux_thread.h
+@@ -206,7 +206,7 @@ typedef struct
+ /**
+LINUX User Thread - map the Thread ID.
+ */
+-typedef intIFXOS_thread_t;
++typedef pthread_tIFXOS_thread_t;
+ 
+ /**
+LINUX Kernel Process - map the Process ID.
+--- a/src/linux/ifxos_linux_socket_appl.c
 b/src/linux/ifxos_linux_socket_appl.c
+@@ -363,8 +363,8 @@ IFX_int_t IFXOS_SocketSendTo(
+IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR);
+IFXOS_RETURN_IF_ARG_LE_ZERO(bufSize_byte, IFX_ERROR);
+ 
+-   ret = (IFX_int_t)sendto((int)socFd, (const char*)pBuffer, 
+-  (int)bufSize_byte, 0, pSocAddr, sizeof(IFXOS_sockAddr_t));
++   ret = (IFX_int_t)sendto(socFd, pBuffer, 
++  bufSize_byte, 0, (struct sockaddr *)pSocAddr, 
sizeof(IFXOS_sockAddr_t));
+ 
+return ret;
+ }
diff --git a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch 
b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch
index dcd260e..80275e6 100644
--- a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch
+++ b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch
@@ -40,28 +40,21 @@
  
 /* Enable signals in Kernel >= 2.6 */
 allow_signal(SIGKILL);
-@@ -221,9 +218,7 @@ IFX_int32_t IFXOS_ThreadInit(
+@@ -221,9 +218,11 @@ IFX_int32_t IFXOS_ThreadInit(
   init_completion(>thrCompletion);
  
   /* start kernel thread via the wrapper function */
 - pThrCntrl->tid = kernel_thread( 
(IFXOS_KERNEL_THREAD_StartRoutine)IFXOS_KernelThreadStartup,
 -(void *)pThrCntrl,
 -IFXOS_DRV_THREAD_OPTIONS);
-+ pThrCntrl->tid = kthread_run(IFXOS_KernelThreadStartup, (void 
*)pThrCntrl, "ifxos");
++ pThrCntrl->tid = kthread_run(IFXOS_KernelThreadStartup, (void 
*)pThrCntrl, pThrCntrl->thrParams.pName);
++ if (IS_ERR(pThrCntrl->tid)) {
++IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR,
++   ("IFXOS ERROR - Problem creating thread: %li" IFXOS_CRLF, 
PTR_ERR(pThrCntrl->tid)));
++ }
  
   pThrCntrl->bValid = IFX_TRUE;
  
 a/src/include/ifxos_thread.h
-+++ b/src/include/ifxos_thread.h
-@@ -111,7 +111,7 @@ typedef struct IFXOS_ThreadParams_s
- /**
-Function type of the user thread/task function.
- */
--typedef IFX_int32_t (*IFXOS_ThreadFunction_t)(IFXOS_ThreadParams_t *);
-+typedef int (*IFXOS_ThreadFunction_t)(void*);
- 
- /** @} */
- 
 --- a/src/include/linux/ifxos_linux_thread.h
 +++ b/src/include/linux/ifxos_linux_thread.h
 @@ -152,7 +152,7 @@ typedef struct
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/8] lantiq: add xRX200 dsl firmware binary and update vdsl drivers

2015-11-24 Thread Hauke Mehrtens
This packages adds the redistributable dsl firmware for the xRX200 SoCs
and updates the VDSL drivers to the version shipped with Lantiq's UGW 6.1.1.
In addition it adds some diagnostic tools and fixes some build warnings.

Hauke Mehrtens (8):
  lantiq: ltq-ifxos: fix build warnings
  lantiq: add dsl-vr9-firmware-xdsl
  lantiq: ltq-vdsl-mei: add mei_cpe_drv_test application
  lantiq: ltq-vdsl-mei: register char device automatically
  lantiq: ltq-vdsl-mei: update to version 1.4.8.5
  lantiq: ltq-vdsl: update to version 4.16.6.3
  lantiq: ltq-vdsl-app: add dsl_cpe_pipe.sh
  lantiq: ltq-vdsl-app: update to version 4.16.6.3

 .../firmware/lantiq/dsl-vr9-firmware-xdsl/Makefile | 46 +++
 package/kernel/lantiq/ltq-ifxos/Makefile   |  6 +-
 .../lantiq/ltq-ifxos/patches/001-warnings.patch| 24 
 .../lantiq/ltq-ifxos/patches/100-compat.patch  | 19 ++
 package/kernel/lantiq/ltq-vdsl-mei/Makefile| 32 +--
 .../lantiq/ltq-vdsl-mei/patches/010-warnings.patch | 26 +
 .../lantiq/ltq-vdsl-mei/patches/100-compat.patch   | 67 --
 .../ltq-vdsl-mei/patches/101_no-date-time.patch|  2 +-
 package/kernel/lantiq/ltq-vdsl/Makefile| 14 ++---
 .../lantiq/ltq-vdsl/patches/100-compat.patch   | 20 ++-
 package/network/config/ltq-vdsl-app/Makefile   | 30 --
 .../config/ltq-vdsl-app/files/dsl_cpe_pipe.sh  | 18 ++
 .../config/ltq-vdsl-app/patches/010-warnings.patch | 23 
 .../config/ltq-vdsl-app/patches/100-compat.patch   |  4 +-
 .../config/ltq-vdsl-app/patches/101-musl.patch |  2 +-
 .../config/ltq-vdsl-app/patches/200-autoboot.patch | 11 
 16 files changed, 262 insertions(+), 82 deletions(-)
 create mode 100644 package/firmware/lantiq/dsl-vr9-firmware-xdsl/Makefile
 create mode 100644 package/kernel/lantiq/ltq-ifxos/patches/001-warnings.patch
 create mode 100644 
package/kernel/lantiq/ltq-vdsl-mei/patches/010-warnings.patch
 create mode 100755 package/network/config/ltq-vdsl-app/files/dsl_cpe_pipe.sh
 create mode 100644 
package/network/config/ltq-vdsl-app/patches/010-warnings.patch
 create mode 100644 
package/network/config/ltq-vdsl-app/patches/200-autoboot.patch

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


[OpenWrt-Devel] [PATCH 6/8] lantiq: ltq-vdsl: update to version 4.16.6.3

2015-11-24 Thread Hauke Mehrtens
From: Hauke Mehrtens <hauke.mehrt...@lantiq.com>

In addition to the update this also fixes some build warnings and makes it
use the same configure option as used in Lantiq UGW.

Signed-off-by: Hauke Mehrtens <hauke.mehrt...@lantiq.com>
---
 package/kernel/lantiq/ltq-vdsl/Makefile  | 14 +++---
 .../kernel/lantiq/ltq-vdsl/patches/100-compat.patch  | 20 +---
 2 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/package/kernel/lantiq/ltq-vdsl/Makefile 
b/package/kernel/lantiq/ltq-vdsl/Makefile
index 617d9bf..70fe64a 100644
--- a/package/kernel/lantiq/ltq-vdsl/Makefile
+++ b/package/kernel/lantiq/ltq-vdsl/Makefile
@@ -1,4 +1,5 @@
 # Copyright (C) 2012 OpenWrt.org
+# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,14 +8,14 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ltq-vdsl-vr9
-PKG_VERSION:=4.16.2.4
+PKG_VERSION:=4.16.6.3
 PKG_RELEASE:=1
 
-PKG_BASE_NAME:=drv_dsl_cpe_api_vrx
-PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
+PKG_BASE_NAME:=drv_dsl_cpe_api
+PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/xdarklight/$(PKG_BASE_NAME)/archive/v$(PKG_VERSION)
-PKG_MD5SUM:=0a3e35d199eb8936f3e8f61bb074223a
+PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
+PKG_MD5SUM:=5b15a866bb1939c333d30a1b7f9e7856
 
 PKG_USE_MIPS16:=0
 
@@ -56,11 +57,10 @@ CONFIGURE_ARGS += 
--enable-kernel-include="$(LINUX_DIR)/include" \
--enable-adsl-led=no \
--enable-adsl-mib=no \
--enable-dsl-ceoc=no \
-   --enable-dsl-bonding=no \
--enable-linux-26 \
--enable-kernelbuild="$(LINUX_DIR)" \
--enable-debug-prints=no \
-   KERNEL_ARCH=mips
+   ARCH=mips
 
 CONFIGURE_ARGS += --enable-model=full
 #CONFIGURE_ARGS += --enable-model=lite
diff --git a/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch 
b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
index e68a6f0..4af07da 100644
--- a/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
+++ b/package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
@@ -19,7 +19,7 @@
  #include "drv_dsl_cpe_api.h"
  #include "drv_dsl_cpe_api_ioctl.h"
  
-@@ -238,24 +239,10 @@ static DSL_long_t DSL_DRV_Ioctls(DSL_DRV
+@@ -238,14 +239,7 @@ static DSL_long_t DSL_DRV_Ioctls(DSL_DRV
 }
  
  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
@@ -34,18 +34,8 @@
 +   pINode = file_inode(pFile);
  #endif
  
--   if (pINode == DSL_NULL)
--   {
--  bIsInKernel = DSL_TRUE;
--   }
--   else
--   {
-   bIsInKernel = DSL_FALSE;
--   }
- 
-if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) ||
- (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) ||
-@@ -1102,6 +1089,9 @@ static void DSL_DRV_DebugInit(void)
+if (pINode == DSL_NULL)
+@@ -1118,6 +1112,9 @@ static void DSL_DRV_DebugInit(void)
 return;
  }
  
@@ -55,7 +45,7 @@
  /* Entry point of driver */
  int __init DSL_ModuleInit(void)
  {
-@@ -1140,6 +1130,10 @@ int __init DSL_ModuleInit(void)
+@@ -1156,6 +1153,10 @@ int __init DSL_ModuleInit(void)
  
 DSL_DRV_DevNodeInit();
  
@@ -66,7 +56,7 @@
 return 0;
  }
  
-@@ -1147,6 +1141,11 @@ void __exit DSL_ModuleCleanup(void)
+@@ -1163,6 +1164,11 @@ void __exit DSL_ModuleCleanup(void)
  {
 printk("Module will be unloaded"DSL_DRV_CRLF);
  
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/8] lantiq: ltq-vdsl-mei: register char device automatically

2015-11-24 Thread Hauke Mehrtens
From: Hauke Mehrtens <hauke.mehrt...@lantiq.com>

Signed-off-by: Hauke Mehrtens <hauke.mehrt...@lantiq.com>
---
 .../lantiq/ltq-vdsl-mei/patches/100-compat.patch   | 39 +++---
 .../ltq-vdsl-mei/patches/101_no-date-time.patch|  2 +-
 2 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch 
b/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch
index c0e69a9..0657f66 100644
--- a/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch
+++ b/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch
@@ -34,7 +34,16 @@
  /* ===
 extern function declarations
 === */
-@@ -1783,7 +1785,9 @@ static int __init MEI_module_init (void)
+@@ -196,6 +198,8 @@ static void MEI_MemVAllocTest();
+ /* Local variables (LINUX) */
+ /* === */
+ static IFX_uint8_t major_number = 0;
++static struct class *mei_class;
++static dev_t mei_devt;
+ #ifdef MODULE
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+ MODULE_PARM(major_number, "b");
+@@ -1783,7 +1787,9 @@ static int __init MEI_module_init (void)
return (result);
 }
  
@@ -44,7 +53,18 @@
  
 return 0;
  }
-@@ -1963,7 +1967,9 @@ static void MEI_module_exit (void)
+@@ -1907,6 +1913,10 @@ static void MEI_module_exit (void)
+ 
+ #else
+unregister_chrdev ( major_number , DRV_MEI_NAME );
++   device_destroy(mei_class, mei_devt);
++   mei_devt = 0;
++   class_destroy(mei_class);
++   mei_class = NULL;
+ #endif
+ 
+ #if CONFIG_PROC_FS
+@@ -1963,7 +1973,9 @@ static void MEI_module_exit (void)
  ("MEI_DRV: Chipset Basic Exit failed" MEI_DRV_CRLF));
 }
  
@@ -54,7 +74,18 @@
  
 /* touch one time this variable to avoid that the linker will remove it */
 debug_level = MEI_DRV_PRN_LEVEL_OFF;
-@@ -2120,21 +2126,32 @@ static int MEI_InitModuleBasics(void)
+@@ -2080,6 +2092,10 @@ static int MEI_InitModuleRegCharDev(cons
+ ("Using major number %d" MEI_DRV_CRLF, major_number));
+}
+ 
++   mei_class = class_create(THIS_MODULE, devName);
++   mei_devt = MKDEV(major_number, 0);
++   device_create(mei_class, NULL, mei_devt, NULL, "%s/%i", devName, 0);
++
+return 0;
+ #endif  /* CONFIG_DEVFS_FS */
+ }
+@@ -2120,21 +2136,32 @@ static int MEI_InitModuleBasics(void)
  }
  
  #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
@@ -87,7 +118,7 @@
  
 return 0;
  }
-@@ -2454,11 +2471,15 @@ IFX_int32_t MEI_IoctlInitDevice(
+@@ -2454,11 +2481,15 @@ IFX_int32_t MEI_IoctlInitDevice(
  pMeiDev->eModePoll = e_MEI_DEV_ACCESS_MODE_IRQ;
  pMeiDev->intMask   = ME_ARC2ME_INTERRUPT_UNMASK_ALL;
  
diff --git a/package/kernel/lantiq/ltq-vdsl-mei/patches/101_no-date-time.patch 
b/package/kernel/lantiq/ltq-vdsl-mei/patches/101_no-date-time.patch
index 219243f..88e39ab 100644
--- a/package/kernel/lantiq/ltq-vdsl-mei/patches/101_no-date-time.patch
+++ b/package/kernel/lantiq/ltq-vdsl-mei/patches/101_no-date-time.patch
@@ -1,6 +1,6 @@
 --- a/src/drv_mei_cpe_linux.c
 +++ b/src/drv_mei_cpe_linux.c
-@@ -1400,8 +1400,8 @@ struct proc_entry {
+@@ -1402,8 +1402,8 @@ struct proc_entry {
  static void MEI_GetVersionProc(struct seq_file *s)
  {
 seq_printf(s, "%s" MEI_DRV_CRLF, _WHATVERSION[4]);
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 7/8] lantiq: ltq-vdsl-app: add dsl_cpe_pipe.sh

2015-11-24 Thread Hauke Mehrtens
From: Hauke Mehrtens <hauke.mehrt...@lantiq.com>

Signed-off-by: Hauke Mehrtens <hauke.mehrt...@lantiq.com>
---
 package/network/config/ltq-vdsl-app/Makefile   |  4 +++-
 .../network/config/ltq-vdsl-app/files/dsl_cpe_pipe.sh  | 18 ++
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100755 package/network/config/ltq-vdsl-app/files/dsl_cpe_pipe.sh

diff --git a/package/network/config/ltq-vdsl-app/Makefile 
b/package/network/config/ltq-vdsl-app/Makefile
index 250d6f7..b069421 100644
--- a/package/network/config/ltq-vdsl-app/Makefile
+++ b/package/network/config/ltq-vdsl-app/Makefile
@@ -54,7 +54,8 @@ CONFIGURE_ARGS += \
--disable-soap-support \
--enable-dsl-bonding=no \
--enable-debug-prints=err \
-   --disable-dti
+   --disable-dti \
+   --enable-debug
 
 ifeq ($(CONFIG_IFX_CLI),y)
 CONFIGURE_ARGS += \
@@ -73,6 +74,7 @@ define Package/ltq-vdsl-app/install
$(INSTALL_BIN) ./files/vdsl_cpe_control_wrapper $(1)/sbin/
 
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dsl_cpe_control 
$(1)/sbin/vdsl_cpe_control
+   $(INSTALL_BIN) ./files/dsl_cpe_pipe.sh $(1)/sbin/
 endef
 
 $(eval $(call BuildPackage,ltq-vdsl-app))
diff --git a/package/network/config/ltq-vdsl-app/files/dsl_cpe_pipe.sh 
b/package/network/config/ltq-vdsl-app/files/dsl_cpe_pipe.sh
new file mode 100755
index 000..30393b2
--- /dev/null
+++ b/package/network/config/ltq-vdsl-app/files/dsl_cpe_pipe.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+pipe_no=0
+
+# use specified pipe no
+case "$1" in
+0|1|2)
+pipe_no=$1; shift; ;;
+esac
+
+
+#echo "Call dsl_pipe with $*"
+lock /var/lock/dsl_pipe
+echo $* > /tmp/pipe/dsl_cpe${pipe_no}_cmd
+result=`cat /tmp/pipe/dsl_cpe${pipe_no}_ack`
+lock -u /var/lock/dsl_pipe
+
+echo "$result"
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 8/8] lantiq: ltq-vdsl-app: update to version 4.16.6.3

2015-11-24 Thread Hauke Mehrtens
From: Hauke Mehrtens <hauke.mehrt...@lantiq.com>

In this upstream dsl driver app version the autoboot is deactivated activate
it again.
In addition to the update this also fixes some build warnings and makes it
use the same configure option as used in Lantiq UGW.

Signed-off-by: Hauke Mehrtens <hauke.mehrt...@lantiq.com>
---
 package/network/config/ltq-vdsl-app/Makefile   | 26 --
 .../config/ltq-vdsl-app/patches/010-warnings.patch | 23 +++
 .../config/ltq-vdsl-app/patches/100-compat.patch   |  4 ++--
 .../config/ltq-vdsl-app/patches/101-musl.patch |  2 +-
 .../config/ltq-vdsl-app/patches/200-autoboot.patch | 11 +
 5 files changed, 46 insertions(+), 20 deletions(-)
 create mode 100644 
package/network/config/ltq-vdsl-app/patches/010-warnings.patch
 create mode 100644 
package/network/config/ltq-vdsl-app/patches/200-autoboot.patch

diff --git a/package/network/config/ltq-vdsl-app/Makefile 
b/package/network/config/ltq-vdsl-app/Makefile
index b069421..51c2aff 100644
--- a/package/network/config/ltq-vdsl-app/Makefile
+++ b/package/network/config/ltq-vdsl-app/Makefile
@@ -1,4 +1,5 @@
 # Copyright (C) 2010 OpenWrt.org
+# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,12 +8,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ltq-vdsl-app
-PKG_VERSION:=4.16.2.4
+PKG_VERSION:=4.16.6.3
 PKG_RELEASE:=1
-PKG_BASE_NAME:=dsl_cpe_control_vrx
-PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/xdarklight/$(PKG_BASE_NAME)/archive/v$(PKG_VERSION)
-PKG_MD5SUM:=487925ef5327ea38c544035b388de8bb
+PKG_BASE_NAME:=dsl_cpe_control
+PKG_SOURCE:=$(PKG_BASE_NAME)_vrx-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
+PKG_MD5SUM:=8bedf330a456fe0864844e61b57da627
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION)
 PKG_LICENSE:=BSD-2-Clause
 
@@ -39,21 +40,12 @@ CONFIGURE_ARGS += \
--enable-vrx \
--enable-driver-include="-I$(STAGING_DIR)/usr/include/drv_vdsl_cpe_api" 
\
--enable-device-driver-include="-I$(STAGING_DIR)/usr/include/vdsl/" \
-   --enable-add-appl-cflags="-DMAX_CLI_PIPES=2" \
+   --enable-add-appl-cflags="-DMAX_CLI_PIPES=1"  \
--enable-ifxos \
--enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos" \
--enable-ifxos-library="-I$(STAGING_DIR)/usr/lib" \
-   --disable-dsl-ceoc \
-   --enable-dsl-pm-total \
-   --enable-dsl-pm-showtime \
-   --enable-dsl-pm-line-counters \
-   --enable-dsl-pm-line-failure-counters \
-   --enable-dsl-pm-datapath-counters \
-   --enable-dsl-pm-datapath-failure-counters \
-   --enable-deprecated \
-   --disable-soap-support \
-   --enable-dsl-bonding=no \
-   --enable-debug-prints=err \
+   --enable-dsl-ceoc=no \
+   --enable-vrx-device=vr9 \
--disable-dti \
--enable-debug
 
diff --git a/package/network/config/ltq-vdsl-app/patches/010-warnings.patch 
b/package/network/config/ltq-vdsl-app/patches/010-warnings.patch
new file mode 100644
index 000..96d8319
--- /dev/null
+++ b/package/network/config/ltq-vdsl-app/patches/010-warnings.patch
@@ -0,0 +1,23 @@
+--- a/src/dsl_cpe_os.h
 b/src/dsl_cpe_os.h
+@@ -31,15 +31,15 @@
+ #ifndef _lint
+ #ifdef LINUX
+ #include "dsl_cpe_linux.h"
+-#elif WIN32
++#elif defined(WIN32)
+ #include "dsl_cpe_win32.h"
+-#elif VXWORKS
++#elif defined(VXWORKS)
+ #include "dsl_cpe_vxworks.h"
+-#elif ECOS
++#elif defined(ECOS)
+ #include "dsl_cpe_ecos.h"
+-#elif RTEMS
++#elif defined(RTEMS)
+ #include "dsl_cpe_rtems.h"
+-#elif GENERIC_OS
++#elif defined(GENERIC_OS)
+ #include "dsl_cpe_generic_os.h"
+ #else
+ #error please define your OS for the CPE Control adaptation
diff --git a/package/network/config/ltq-vdsl-app/patches/100-compat.patch 
b/package/network/config/ltq-vdsl-app/patches/100-compat.patch
index eeedc54..1b042c5 100644
--- a/package/network/config/ltq-vdsl-app/patches/100-compat.patch
+++ b/package/network/config/ltq-vdsl-app/patches/100-compat.patch
@@ -8,10 +8,10 @@
 +  0x1E116000, 0x3f, -1),
 DSL_CPE_SIC_SET(DSL_TC_ATM, DSL_EMF_TC_CLEANED, DSL_EMF_TC_CLEANED, 
DSL_SYSTEMIF_MII, \
 DSL_TC_EFM, DSL_EMF_TC_CLEANED, DSL_EMF_TC_CLEANED, 
DSL_SYSTEMIF_MII),
-}
+DSL_CPE_MAC_CFG_SET(DSL_EFM_SPEED_100, DSL_EFM_DUPLEX_FULL, 
DSL_EFM_FLOWCTRL_ON, DSL_EFM_AUTONEG_OFF, \
 --- a/src/dsl_cpe_control.c
 +++ b/src/dsl_cpe_control.c
-@@ -6856,7 +6856,7 @@ DSL_int_t dsl_cpe_daemon (
+@@ -6871,7 +6871,7 @@ DSL_int_t dsl_cpe_daemon (
 for (nDevice = 0; nDevice < DSL_CPE_MAX_DSL_ENTITIES; nDevice++)
 {
  #if defined(INCLUDE_DSL_CPE_API_VRX)
diff --git a/package/network/config/ltq-vdsl-a

[OpenWrt-Devel] [PATCH 5/8] lantiq: ltq-vdsl-mei: update to version 1.4.8.5

2015-11-24 Thread Hauke Mehrtens
From: Hauke Mehrtens <hauke.mehrt...@lantiq.com>

In addition to the update this also fixes some build warnings and makes it
use the same configure option as used in Lantiq UGW.

Signed-off-by: Hauke Mehrtens <hauke.mehrt...@lantiq.com>
---
 package/kernel/lantiq/ltq-vdsl-mei/Makefile| 12 +++
 .../lantiq/ltq-vdsl-mei/patches/010-warnings.patch | 26 ++
 .../lantiq/ltq-vdsl-mei/patches/100-compat.patch   | 40 --
 .../ltq-vdsl-mei/patches/101_no-date-time.patch|  2 +-
 4 files changed, 53 insertions(+), 27 deletions(-)
 create mode 100644 
package/kernel/lantiq/ltq-vdsl-mei/patches/010-warnings.patch

diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile 
b/package/kernel/lantiq/ltq-vdsl-mei/Makefile
index 3a2d572..5ff1321 100644
--- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile
+++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile
@@ -1,4 +1,5 @@
 # Copyright (C) 2012 OpenWrt.org
+# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,14 +8,14 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ltq-vdsl-vr9-mei
-PKG_VERSION:=1.4.8.4
+PKG_VERSION:=1.4.8.5
 PKG_RELEASE:=1
 
 PKG_BASE_NAME:=drv_mei_cpe
 PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_BASE_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=https://github.com/xdarklight/$(PKG_BASE_NAME)/archive/v$(PKG_VERSION)
-PKG_MD5SUM:=30570722dc7f19ff2f0228838043f2a2
+PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
+PKG_MD5SUM:=78bf61dbc3421123c6716b874a930759
 PKG_FIXUP:=autoreconf
 PKG_MAINTAINER:=John Crispin <blo...@openwrt.org>
 PKG_USE_MIPS16:=0
@@ -49,9 +50,6 @@ define Package/ltq-vdsl-mei_test/description
for test and development purposes.
 endef
 
-
-#DEBUG=-DDEBUG_PRINT=1
-
 MAKE_FLAGS += \
SHELL="$(BASH)"
 
@@ -64,7 +62,7 @@ CONFIGURE_ARGS += \
--enable-error_print \
--enable-ifxos-include="-I$(STAGING_DIR)/usr/include/ifxos/" \
--enable-ifxos-library="-L$(STAGING_DIR)/usr/lib" \
-   --enable-add_drv_cflags="$(DEBUG) -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 
-DMEI_EXPORT_INTERNAL_API=1 -DMEI_SUPPORT_DSM=0 -fno-pic -mno-abicalls 
-mlong-calls -O2 -g0" \
+   --enable-add_drv_cflags="-DMEI_SUPPORT_DSM=0 
-DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 -fno-pic -mlong-calls -O2 -g0" \
--enable-linux-26 \
--enable-kernelbuild="$(LINUX_DIR)" \
--enable-drv_test_appl=yes \
diff --git a/package/kernel/lantiq/ltq-vdsl-mei/patches/010-warnings.patch 
b/package/kernel/lantiq/ltq-vdsl-mei/patches/010-warnings.patch
new file mode 100644
index 000..a3c7dfe
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-mei/patches/010-warnings.patch
@@ -0,0 +1,26 @@
+--- a/src/drv_mei_cpe_api.h
 b/src/drv_mei_cpe_api.h
+@@ -937,7 +937,7 @@ typedef struct MEI_dev_s
+ #if ( defined(MEI_DRVOS_HAVE_DRV_SELECT) && (MEI_DRVOS_HAVE_DRV_SELECT == 1) )
+/** support for select() */
+IFX_boolean_t bNfcNeedWakeUp;
+-   MEI_DRVOS_event_t selNfcWakeupList;
++   IFXOS_drvSelectQueue_t selNfcWakeupList;
+ #endif
+ 
+/** list of all open instances which can receive NFC's, EVT's ALM's */
+--- a/src/drv_mei_cpe_linux.c
 b/src/drv_mei_cpe_linux.c
+@@ -1220,9 +1220,9 @@ static unsigned int MEI_Poll (struct fil
+}
+ 
+MEI_DRVOS_SelectQueueAddTask(
+-   (MEI_DRVOS_select_OSArg_t*) filp,
+-   (MEI_DRVOS_event_t*)&(pMeiDev->selNfcWakeupList),
+-   (MEI_DRVOS_selectTable_t*)  wait);
++   filp,
++   &(pMeiDev->selNfcWakeupList),
++   wait);
+ 
+if (pDynNfc->pRecvDataCntrl[pDynNfc->rdIdxRd].bufCtrl != 
MEI_RECV_BUF_CTRL_FREE)  /* buffer in use */
+{
diff --git a/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch 
b/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch
index 0657f66..0273d19 100644
--- a/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch
+++ b/package/kernel/lantiq/ltq-vdsl-mei/patches/100-compat.patch
@@ -43,7 +43,7 @@
  #ifdef MODULE
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
  MODULE_PARM(major_number, "b");
-@@ -1783,7 +1787,9 @@ static int __init MEI_module_init (void)
+@@ -1798,7 +1802,9 @@ static int __init MEI_module_init (void)
return (result);
 }
  
@@ -53,7 +53,7 @@
  
 return 0;
  }
-@@ -1907,6 +1913,10 @@ static void MEI_module_exit (void)
+@@ -1922,6 +1928,10 @@ static void MEI_module_exit (void)
  
  #else
 unregister_chrdev ( major_number , DRV_MEI_NAME );
@@ -64,7 +64,7 @@
  #endif
  
  #if CONFIG_PROC_FS
-@@ -1963,7 +1973,9 @@ static void MEI_module_exit (void)
+@@ -1978,7 +1988,9 @@ static void MEI_module_exit (void)
  ("MEI_DRV: Chipset Basic Exit 

[OpenWrt-Devel] [PATCH 2/8] lantiq: add dsl-vr9-firmware-xdsl

2015-11-24 Thread Hauke Mehrtens
From: Hauke Mehrtens <hauke.mehrt...@lantiq.com>

This adds the DSL firmware for the VR9/XRX200 SoCs.

Signed-off-by: Hauke Mehrtens <hauke.mehrt...@lantiq.com>
---
 .../firmware/lantiq/dsl-vr9-firmware-xdsl/Makefile | 46 ++
 1 file changed, 46 insertions(+)
 create mode 100644 package/firmware/lantiq/dsl-vr9-firmware-xdsl/Makefile

diff --git a/package/firmware/lantiq/dsl-vr9-firmware-xdsl/Makefile 
b/package/firmware/lantiq/dsl-vr9-firmware-xdsl/Makefile
new file mode 100644
index 000..e03fc13
--- /dev/null
+++ b/package/firmware/lantiq/dsl-vr9-firmware-xdsl/Makefile
@@ -0,0 +1,46 @@
+# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dsl_vr9_firmware_xdsl
+PKG_VERSION:=05.07.04.03.00.06_05.07.01.08.00.01_osc
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
+PKG_MD5SUM:=4c8d9ca68dda88d3cfc0ca0fb946a63e
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dsl-vr9-firmware-xdsl
+  SECTION:=firmware
+  CATEGORY:=Firmware
+  TITLE:=VR9 CPE xDSL firmware
+  URL:=http://www.lantiq.com/
+  DEPENDS:=@TARGET_lantiq_xrx200
+endef
+
+define Package/dsl-vr9-firmware-xdsl/description
+   VRX200 CPE xDSL firmware
+endef
+
+define Build/Prepare
+   rm -rf $(PKG_BUILD_DIR)
+   mkdir -p $(PKG_BUILD_DIR)
+   $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_SOURCE)
+endef
+
+define Build/Compile
+endef
+
+define Package/dsl-vr9-firmware-xdsl/install
+   $(INSTALL_DIR) $(1)/lib/firmware/
+   $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE 
$(1)/lib/firmware/xcpe_574306_571801.LICENSE
+   $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_574306_571801.bin 
$(1)/lib/firmware/
+   ln -s xcpe_574306_571801.bin $(1)/lib/firmware/vdsl.bin
+endef
+
+$(eval $(call BuildPackage,dsl-vr9-firmware-xdsl))
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/8] lantiq: ltq-vdsl-mei: add mei_cpe_drv_test application

2015-11-24 Thread Hauke Mehrtens
From: Hauke Mehrtens <hauke.mehrt...@lantiq.com>

This application helps to debug some internal problems in the MEI driver.

Signed-off-by: Hauke Mehrtens <hauke.mehrt...@lantiq.com>
---
 package/kernel/lantiq/ltq-vdsl-mei/Makefile | 24 +++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/package/kernel/lantiq/ltq-vdsl-mei/Makefile 
b/package/kernel/lantiq/ltq-vdsl-mei/Makefile
index 0f9f48d..3a2d572 100644
--- a/package/kernel/lantiq/ltq-vdsl-mei/Makefile
+++ b/package/kernel/lantiq/ltq-vdsl-mei/Makefile
@@ -35,6 +35,21 @@ define KernelPackage/ltq-vdsl-vr9-mei/description
Lantiq MEI CPE Kernel Module Driver
 endef
 
+
+define Package/ltq-vdsl-mei_test
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=Lantiq mei driver test tool
+  URL:=http://www.lantiq.com/
+  DEPENDS:=@TARGET_lantiq_xrx200
+endef
+
+define Package/ltq-vdsl-mei_test/description
+   Userland tool to directly control the mei driver, this is only needed
+   for test and development purposes.
+endef
+
+
 #DEBUG=-DDEBUG_PRINT=1
 
 MAKE_FLAGS += \
@@ -52,7 +67,7 @@ CONFIGURE_ARGS += \
--enable-add_drv_cflags="$(DEBUG) -DMEI_DRV_ATM_PTM_INTERFACE_ENABLE=1 
-DMEI_EXPORT_INTERNAL_API=1 -DMEI_SUPPORT_DSM=0 -fno-pic -mno-abicalls 
-mlong-calls -O2 -g0" \
--enable-linux-26 \
--enable-kernelbuild="$(LINUX_DIR)" \
-   --enable-drv_test_appl=0 \
+   --enable-drv_test_appl=yes \
ARCH=$(LINUX_KARCH)
 
 define Build/InstallDev
@@ -65,3 +80,10 @@ define Build/InstallDev
 endef
 
 $(eval $(call KernelPackage,ltq-vdsl-vr9-mei))
+
+define Package/ltq-vdsl-mei_test/install
+   $(INSTALL_DIR) $(1)/bin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mei_cpe_drv_test $(1)/bin
+endef
+
+$(eval $(call BuildPackage,ltq-vdsl-mei_test))
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/8] lantiq: add dsl-vr9-firmware-xdsl

2015-11-25 Thread Hauke Mehrtens
On 11/25/2015 11:29 AM, John Crispin wrote:
> 
> 
> On 25/11/2015 10:53, Andre Heider wrote:
>> Hi,
>>
>> On Tue, Nov 24, 2015 at 9:24 PM, Hauke Mehrtens <ha...@hauke-m.de> wrote:
>>> +define Package/dsl-vr9-firmware-xdsl/install
>>> +   $(INSTALL_DIR) $(1)/lib/firmware/
>>> +   $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE 
>>> $(1)/lib/firmware/xcpe_574306_571801.LICENSE
>>> +   $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_574306_571801.bin 
>>> $(1)/lib/firmware/
>>> +   ln -s xcpe_574306_571801.bin $(1)/lib/firmware/vdsl.bin
>>> +endef
>>
>> this adds +900kb to the root fs, at least on my TD-W8970 there's a MTD
>> partition which I use for the dsl firmware.
>> That gets tmpfs mounted at boot, see /etc/init.d/dsl_fs and
>> /sbin/vdsl_fw_install.sh.
>>
>> Can we use that instead?
>>
>> Regards,
>> Andre
>>
> 
> no we will drop the dsl partition once the annex-B version of the FW is
> available.
>   John
> 
Hi,

the Annex B firmware is currently located here, but it should show up on
the OpenWrt mirror soon:
https://www.hauke-m.de/files/.lantiq/dsl_vr9_firmware_xdsl-05.07.03.03.00.06_05.07.01.0C.00.02_osc.tar.gz

We probably have to change some of the scripts, because OpenWrt was not
allowed to ship the firmware before. Currently it is in a extra package.

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


[OpenWrt-Devel] [PATCH fstools] fix gcc format security error.

2015-11-22 Thread Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 block.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block.c b/block.c
index 4c8dda9..c6d1b90 100644
--- a/block.c
+++ b/block.c
@@ -1311,7 +1311,7 @@ static int main_swapon(int argc, char **argv)
return -1;
}
while (getline(, , fp) > 0)
-   printf(lineptr);
+   printf("%s", lineptr);
if (lineptr)
free(lineptr);
fclose(fp);
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH mountd] fix gcc format security errors

2015-11-22 Thread Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 autofs.c | 2 +-
 log.c| 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/autofs.c b/autofs.c
index 5f8810e..4ad782d 100644
--- a/autofs.c
+++ b/autofs.c
@@ -194,7 +194,7 @@ static void autofs_init(void)
p = ucix_get_option(ctx, "mountd", "mountd", "path");
ucix_cleanup(ctx);
if(p)
-   snprintf(uci_path, 31, p);
+   snprintf(uci_path, 31, "%s", p);
else
snprintf(uci_path, 31, "/tmp/mounts/");
uci_path[31] = '\0';
diff --git a/log.c b/log.c
index ae7a7c9..8ef4d5a 100644
--- a/log.c
+++ b/log.c
@@ -26,7 +26,7 @@ void log_printf(char *fmt, ...)
va_end(ap);
 
if(daemonize)
-   syslog(10, p);
+   syslog(10, "%s", p);
else
-   printf(p);
+   printf("%s", p);
 }
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH ubox] fix gcc format security error

2015-11-22 Thread Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 log/syslog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/log/syslog.c b/log/syslog.c
index a596b48..e8b6774 100644
--- a/log/syslog.c
+++ b/log/syslog.c
@@ -66,7 +66,7 @@ log_add(char *buf, int size, int source)
 
/* bounce out if we don't have init'ed yet (regmatch etc will blow) */
if (!log) {
-   fprintf(stderr, buf);
+   fprintf(stderr, "%s", buf);
return;
}
 
-- 
2.6.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [LEDE-DEV] TR-069 for OpenWrt

2016-05-28 Thread Hauke Mehrtens
On 05/27/2016 01:43 AM, Delbar Jos wrote:
> Hi all,
> 
> At Technicolor we have followed with great interest the recent proposals to 
> enhance OpenWrt with an open source solution for TR-069 remote management. As 
> one of the world's largest vendors of modems and routers for carrier 
> applications, making use of OpenWrt in a significant share of our install 
> base, we want to support this initiative in a meaningful way. Concretely, we 
> are willing to open source Technicolor's in-house TR-069 solution and thereby 
> contribute to OpenWrt:
>  * a TR-069 protocol agent,
>  * a data model mapping framework that we use to bridge the world of OpenWrt, 
> UCI, UBUS ... with the world of TR-069, TR-098, TR-181 ... (and by extension 
> with the world of SNMP, MIB, NETCONF, YANG ...),
>  * a set of mappings.

That is really nice to hear. For me personally it looks like the remote
management with TR-069 and similar protocols is one of the biggest
extensions commercial vendors add to the user space of OpenWrt to make
it fit their needs.

In addition to the TR-* family does this also include support for SNMP,
MIB, NETCONF, YANG ?

> We are conscious of the fact that together with the proposals made by Felix, 
> Luka and Wojtek we are now looking at many "competing" proposals. As a next 
> step, we recommend to organize a workshop, at a practical location and time, 
> where we put everything on the table and define the most appropriate path 
> forward to the benefit of OpenWrt as a whole.

That's good to hear, would it also be possible that other interested
people can join such a workshop?

> TR-069 is a complicated remote management system and in order to make this 
> initiative a success, we must ensure that the complexity is handled in an 
> elegant way and with respect for OpenWrt's core architecture. More than on 
> the protocol itself, we believe that we should focus on the architectural 
> enhancements required to support remote management in general.
> 
> Looking forward to hearing from you.
> 
> Jos Delbar & Dirk Feytons
> Technicolor

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


Re: [OpenWrt-Devel] [LEDE-DEV] TR-069 for OpenWrt

2016-05-28 Thread Hauke Mehrtens
On 05/27/2016 12:43 PM, David Lang wrote:
> On Thu, 26 May 2016, Delbar Jos wrote:
> 
>> We are conscious of the fact that together with the proposals made by
>> Felix, Luka and Wojtek we are now looking at many "competing"
>> proposals. As a next step, we recommend to organize a workshop, at a
>> practical location and time, where we put everything on the table and
>> define the most appropriate path forward to the benefit of OpenWrt as
>> a whole.
> 
> nothing wrong with supporting many different remote management daemons.
> 
>> TR-069 is a complicated remote management system and in order to make
>> this initiative a success, we must ensure that the complexity is
>> handled in an elegant way and with respect for OpenWrt's core
>> architecture. More than on the protocol itself, we believe that we
>> should focus on the architectural enhancements required to support
>> remote management in general.
> 
> What is it that you think is needed to "support remote management in
> general"?
> 
> It's worth pointing out that many people are remotely managing OpenWRT
> devices, Ansible/Salt/Puppet/Chef/etc are all common tools for the job.
> 
> now, those are all tools aimed at managing Linux Servers, not networking
> gear, but OpenWRT is a server.
> 
> So I'd suggest starting off by creating a daemon that talks  protocol> and just stores the stuff it's sent in some simple files so
> that it can return the info when queried.
> 
> Once you have something that talks the network protocol correctly,
> modifying it to change the real files, make uci calls, etc for different
> distros is much easier (just write your daemon with the expectation that
> the input and output details are going to change, so don't get fancy
> with them).
> 
> David Lang

The TR-069 family is currently wildly used by ISPs controlling the (DSL)
CPE devices of their customers. There are probably more than 100 million
device controlled by standards from the TR-069 family out there.  When
you get a DSL router from your ISP or buy one in the retail store it is
very likely it supports the standards from the TR-069 family, as a
vendor in this area you basically need support for this to sell your
devices.

In other technologies you have different protocols to manage your
devices, like cable often uses something different and EPON and GPON
even have all their own management standards. Then there are also some
technology independent standards and so on. It makes sense to build such
a solution in a way to make it easily to expendable for new protocols.

Hauke
___
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] Add support for AVM FritzBox 7360SL

2016-06-04 Thread Hauke Mehrtens
Hi,

On 05/19/2016 02:12 PM, Sebastian Ortwein wrote:
> Add support for FritzBox 7360SL

Please send it inline with a Signed-off-by line.

> working: USB,WIFI,SWITCH,LAN
> 
> not working:DECT, Telephone
This will probably never work, but should not block OpenWrt LEDE
integration.

If this is a 1.2 SoC you are using the wrong phy firmware, please use
lantiq/vr9_phy11g_a2x.bin  for Gigabit Phys on the 1.2 SoC.

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


Re: [OpenWrt-Devel] [LEDE-DEV] TR-069, bufferbloat, and BQL

2016-05-28 Thread Hauke Mehrtens
On 05/28/2016 03:36 PM, Dave Taht wrote:
> On Sat, May 28, 2016 at 5:34 AM, Hauke Mehrtens <ha...@hauke-m.de> wrote:
>> On 05/27/2016 12:43 PM, David Lang wrote:
>>> On Thu, 26 May 2016, Delbar Jos wrote:
>>>
>>>> We are conscious of the fact that together with the proposals made by
>>>> Felix, Luka and Wojtek we are now looking at many "competing"
>>>> proposals. As a next step, we recommend to organize a workshop, at a
>>>> practical location and time, where we put everything on the table and
>>>> define the most appropriate path forward to the benefit of OpenWrt as
>>>> a whole.
>>>
>>> nothing wrong with supporting many different remote management daemons.
>>>
>>>> TR-069 is a complicated remote management system and in order to make
>>>> this initiative a success, we must ensure that the complexity is
>>>> handled in an elegant way and with respect for OpenWrt's core
>>>> architecture. More than on the protocol itself, we believe that we
>>>> should focus on the architectural enhancements required to support
>>>> remote management in general.
>>>
>>> What is it that you think is needed to "support remote management in
>>> general"?
> 
> I am curious if TR-069 has any ability to set parameters for upload
> and download speeds, so they could be leveraged by sqm-scripts to
> manage the bufferbloat that DSL modems and dslams have?
> 
> Also:
> 
> I have been hoping for nearly 4 years now that we'd see *someone*
> actually produce a BQL enabled dsl driver for their modem interface so
> advanced QoS techniques wouldn't be needed on outbound, where we could
> just enable fq-codel on top of a tightly written driver and be done
> with it. 100 million modems, all exhibiting 100s of ms of extra,
> unneeded latency, under load:
> 
> http://www.dslreports.com/speedtest/results/bufferbloat?up=1
> 
> sadly, aside from the freebox revolution v6, I'm not aware of anyone
> actually doing dsl more right yet. (?)
> 

The Lantiq / Intel DSL drivers are open source and integrated in
OpenWrt, but I haven't checked if BQL is implemented there. They are
also using a big firmware which does all the PHY related stuff.

You can get some statistics from the device like this. These information
are from the DSL PHY layer, so it does not show when your ISP would
limit your rate somewhere else in the internal network, but these
information are available on all DSL lines.

root@lede:~# /etc/init.d/dsl_control status
ATU-C Vendor ID:  Broadcom 176.15
ATU-C System Vendor ID:   Broadcom
Chipset:  Lantiq-VRX200 Unknown
Firmware Version: 5.7.3.3.0.6
API Version:  4.16.6.3
XTSE Capabilities:0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x2
Annex:B
Line Mode:G.993.2 (VDSL2)
Profile:  17a
Line State:   UP [0x801: showtime_tc_sync]
Forward Error Correction Seconds (FECS):  Near: 0 / Far: 2116802
Errored seconds (ES): Near: 0 / Far: 2938
Severely Errored Seconds (SES):   Near: 0 / Far: 50
Loss of Signal Seconds (LOSS):Near: 0 / Far: 0
Unavailable Seconds (UAS):Near: 31 / Far: 31
Header Error Code Errors (HEC):   Near: 0 / Far: 0
Non Pre-emtive CRC errors (CRC_P):Near: 0 / Far: 0
Pre-emtive CRC errors (CRCP_P):   Near: 0 / Far: 0
Power Management Mode:L0 - Synchronized
Latency / Interleave Delay:   Down: Interleave (8.0 ms) /
Up: Interleave (4.0 ms)
Data Rate:Down: 51.391 Mb/s / Up: 10.046
Mb/s
Line Attenuation (LATN):  Down: 10.6dB / Up: 10.6dB
Signal Attenuation (SATN):Down: 10.6dB / Up: 10.2dB
Noise Margin (SNR):   Down: 7.7dB / Up: 13.9dB
Aggregate Transmit Power (ACTATP):Down: -11.6dB / Up: 12.5dB
Max. Attainable Data Rate (ATTNDR):   Down: 61.928 Mb/s / Up: 23.355
Mb/s
Line Uptime Seconds:  62
Line Uptime:  1m 2s
root@lede:~#

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


Re: [OpenWrt-Devel] [PATCH] Added optional command line option for patch-image tool

2016-06-23 Thread Hauke Mehrtens
On 05/12/2016 04:37 PM, duddu.swar...@intel.com wrote:
> From: Vishnu Swaroop Duddu 
> 
> Added optional command line option for patch-image tool
> Default 16KB size is still maintained as this is an optional argument.
> if one wants to specify or increase size they can provide this option.
> sample usage: patch-dtb   [dtb max size]
> 
> Signed-off-by: Vishnu Swaroop Duddu 
> ---
>  tools/patch-image/src/patch-cmdline.c | 16 +++-
>  tools/patch-image/src/patch-dtb.c | 25 +++--
>  2 files changed, 26 insertions(+), 15 deletions(-)
> 
Hi Swaroop,

Thank you for the patch, I applied to to LEDE. I do not know if someone
will pick it up for OpenWrt. It did not apply cleanly, I had to do some
changes to it, next time please check if your patch apply before sending.

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


Re: [OpenWrt-Devel] [PATCH] brcm47xx: Mark broken; no working images

2016-01-14 Thread Hauke Mehrtens
On 01/14/2016 04:31 PM, open...@daniel.thecshore.com wrote:
> From: Daniel Dickinson <open...@daniel.thecshore.com>
> 
> To my knowledge there are no working images, nor a way to get them,
> even using maximum stripping and dropping of packages, kmods, and
> compile options due to the small size of the targets for this
> architecture.  Therefore mark this arch broken and maybe remove
> unless someone decides to fix it.
> 
> Signed-off-by: Daniel Dickinson <open...@daniel.thecshore.com>

NACK: Hauke Mehrtens

The devices with 32 MB ram are working normal, they are just old. On
devices with 16MB RAM LUCI does not really work, but that is the case
for all 16MB ram devices.

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


Re: [OpenWrt-Devel] Response to LEDE proposal/queries/mail?

2016-06-27 Thread Hauke Mehrtens


On 06/27/2016 11:39 AM, Jo-Philipp Wich wrote:
> Hi Zoltan,
> 
> we started a discussion on OpenWrt re-merge conditions over at lede-dev
> and waited for a while to solicit more feedback.
> 
> Since no other people expressed further wishes and since you repeatedly
> asked for a list of things the LEDE folks would like to see in OpenWrt
> I'm going to summarize the list the items we've assembled in
> http://lists.infradead.org/pipermail/lede-adm/2016-June/000144.html
> 
> In short our points are (in no particular order):
> 
>  - Use the LEDE code base
>  - Adopt the LEDE governance rules
>  - Rework admin access policies
>  - Transfer the OpenWrt project domain to SPI
>  - Stop providing project email addresses
>  - Move mailing lists to an external, neutral provider
>  - Merge LEDE and OpenWrt infrastructure (wiki, forum, ...)
>  - Start a process for granting push access to package feed maintainers
> 
> Plus a few other items which got mentioned or agreed upon during various
> discussions:
> 
>  - Dissolve private channels
>  - Discuss project matters on public mailing lists
> 
> 
> Note that the points above reflect mostly the opinions of Felix, John
> and me. Other LEDE members might or might not endorse them, but at least
> did not reject those demands.

I endorse this list.

In addition I would add:
 - Inform the project when talking in behave of the project with industry.

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


[OpenWrt-Devel] [PATCH 4/5] lantiq: add dsl firmware to default packages

2016-02-27 Thread Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 target/linux/lantiq/xrx200/profiles/lantiq.mk | 4 ++--
 target/linux/lantiq/xrx200/profiles/tplink.mk | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/lantiq/xrx200/profiles/lantiq.mk 
b/target/linux/lantiq/xrx200/profiles/lantiq.mk
index 0ec6be4..39c3bc6 100644
--- a/target/linux/lantiq/xrx200/profiles/lantiq.mk
+++ b/target/linux/lantiq/xrx200/profiles/lantiq.mk
@@ -1,13 +1,13 @@
 define Profile/EASY80920NOR
   NAME:=Lantiq VR9 - EASY80920NOR
-  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2
+  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 dsl-vrx200-firmware-xdsl-a 
dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,EASY80920NOR))
 
 define Profile/EASY80920NAND
   NAME:=Lantiq VR9 - EASY80920NAND
-  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2
+  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 dsl-vrx200-firmware-xdsl-a 
dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,EASY80920NAND))
diff --git a/target/linux/lantiq/xrx200/profiles/tplink.mk 
b/target/linux/lantiq/xrx200/profiles/tplink.mk
index 091935d..2ac364e 100644
--- a/target/linux/lantiq/xrx200/profiles/tplink.mk
+++ b/target/linux/lantiq/xrx200/profiles/tplink.mk
@@ -1,20 +1,20 @@
 define Profile/TDW8970
   NAME:=TP-LINK TD-W8970
-  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev
+  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev 
dsl-vrx200-firmware-xdsl-a dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,TDW8970))
 
 define Profile/TDW8980
   NAME:=TP-LINK TD-W8980
-  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev
+  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev 
dsl-vrx200-firmware-xdsl-a dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,TDW8980))
 
 define Profile/VR200v
   NAME:=TP-LINK Archer VR200v
-  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev dsl-vrx200-firmware-xdsl-a 
dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,VR200v))
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/5] lantiq: do not set default firmware file

2016-02-27 Thread Hauke Mehrtens
We are now shipping a DSL firmware, do not set it by default to some
file name.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/base-files/files/lib/functions/uci-defaults.sh | 6 ++
 target/linux/lantiq/base-files/etc/board.d/02_network  | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
b/package/base-files/files/lib/functions/uci-defaults.sh
index 512e0ed..31e4687 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -335,15 +335,13 @@ ucidef_add_adsl_modem() {
 
 ucidef_add_vdsl_modem() {
local annex="$1"
-   local firmware="$2"
-   local tone="$3"
-   local xfer_mode="$4"
+   local tone="$2"
+   local xfer_mode="$3"
 
json_select_object dsl
json_select_object modem
json_add_string type "vdsl"
json_add_string annex "$annex"
-   json_add_string firmware "$firmware"
json_add_string tone "$tone"
json_add_string xfer_mode "$xfer_mode"
json_select ..
diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network 
b/target/linux/lantiq/base-files/etc/board.d/02_network
index 8ed5259..b27b802 100755
--- a/target/linux/lantiq/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/base-files/etc/board.d/02_network
@@ -144,7 +144,7 @@ fi
 
 if grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo; then
interface_wan="ptm0"
-   ucidef_add_vdsl_modem "$annex" "/lib/firmware/vdsl.bin" "av" "ptm"
+   ucidef_add_vdsl_modem "$annex" "av" "ptm"
 else
interface_wan="nas0"
ucidef_add_adsl_modem "$annex" "/lib/firmware/adsl.bin"
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] ltq-vdsl-app: make the dsl_control application stop cleanly.

2016-02-27 Thread Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/network/config/ltq-vdsl-app/files/dsl_control | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index d7ba622..2241422 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -219,6 +219,7 @@ start_service() {
 }
 
 stop_service() {
+   dsl_cmd quit
DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \
DSL_INTERFACE_STATUS="DOWN" \
/sbin/dsl_notify.sh
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/5] dsl-vrx200-firmware-xdsl: create Lantiq vrx200 firmware patches

2016-02-27 Thread Hauke Mehrtens
Instead of having two big binaries only add one binary and then a patch
to create the other one when needed at runtime.
This is easier to handle in one Makeifle for both firmware files.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 .../lantiq/dsl-vrx200-firmware-xdsl-a/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl-b/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl/Makefile   | 128 +
 3 files changed, 128 insertions(+), 94 deletions(-)
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
 create mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile

diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
deleted file mode 100644
index e8dd659..000
--- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (C) 2015 OpenWrt.org
-# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=dsl_vr9_firmware_xdsl
-PKG_VERSION:=05.07.04.03.00.06_05.07.01.08.00.01_osc
-PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=4c8d9ca68dda88d3cfc0ca0fb946a63e
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/dsl-vrx200-firmware-xdsl-a
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  TITLE:=VRX200 / VR9 CPE xDSL Annex A firmware
-  URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-a/description
-   VRX200 / VR9 CPE VDSL and ADSL Annex A firmware
-endef
-
-define Build/Prepare
-   rm -rf $(PKG_BUILD_DIR)
-   mkdir -p $(PKG_BUILD_DIR)
-   $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_SOURCE)
-endef
-
-define Build/Compile
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-a/install
-   $(INSTALL_DIR) $(1)/lib/firmware/
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE 
$(1)/lib/firmware/xcpe_574306_571801.LICENSE
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_574306_571801.bin 
$(1)/lib/firmware/
-   ln -s xcpe_574306_571801.bin $(1)/lib/firmware/vdsl.bin
-   ln -s xcpe_574306_571801.bin $(1)/lib/firmware/adsl-a.bin
-endef
-
-$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-a))
diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
deleted file mode 100644
index c283da2..000
--- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (C) 2015 OpenWrt.org
-# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=dsl_vr9_firmware_xdsl
-PKG_VERSION:=05.07.03.03.00.06_05.07.01.0C.00.02_osc
-PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=af5581836cbe574574590c046fe45bab
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/dsl-vrx200-firmware-xdsl-b
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  TITLE:=VRX200 / VR9 CPE xDSL Annex B firmware
-  URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-b/description
-   VRX200 / VR9 CPE VDSL and ADSL Annex B firmware
-endef
-
-define Build/Prepare
-   rm -rf $(PKG_BUILD_DIR)
-   mkdir -p $(PKG_BUILD_DIR)
-   $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_SOURCE)
-endef
-
-define Build/Compile
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-b/install
-   $(INSTALL_DIR) $(1)/lib/firmware/
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE 
$(1)/lib/firmware/xcpe_573306_571C02.LICENSE
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_573306_571C02.bin 
$(1)/lib/firmware/
-   ln -s xcpe_573306_571C02.bin $(1)/lib/firmware/vdsl.bin
-   ln -s xcpe_573306_571C02.bin $(1)/lib/firmware/adsl-b.bin
-endef
-
-$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-b))
diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
new file mode 100644
index 000..ab9a3dc
--- /dev/null
+++ b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
@@ -0,0 +1,128 @@
+# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dsl_vr9_firmware_xdsl
+PKG_VERSION:=05.07.04.03.00.06_05.07.01.08.00.01_osc
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(P

[OpenWrt-Devel] [PATCH 2/5] ltq-vdsl-app: load the vrx200 firmware or patch it

2016-02-27 Thread Hauke Mehrtens
This checks for the VRX firmware provided in the OpenWrt package.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 .../network/config/ltq-vdsl-app/files/dsl_control  | 41 ++
 1 file changed, 41 insertions(+)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index fc100cf..d7ba622 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -153,6 +153,47 @@ start_service() {
;;
esac
 
+   if [ -z "${firmware}" ]; then
+   if grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo; then
+   case "${annex}" in
+   a|l|m)
+   if [ -f "/lib/firmware/lantiq-vrx200-a.bin" ]; 
then
+   
firmware="/lib/firmware/lantiq-vrx200-a.bin"
+   elif [ -f "/tmp/lantiq-vrx200-a.bin" ]; then
+   firmware="/tmp/lantiq-vrx200-a.bin"
+   elif [ -f "/lib/firmware/lantiq-vrx200-b.bin" ] 
&& [ -f "/lib/firmware/lantiq-vrx200-b-to-a.bspatch" ]; then
+   bspatch 
/lib/firmware/lantiq-vrx200-b.bin \
+   /tmp/lantiq-vrx200-a.bin \
+   
/lib/firmware/lantiq-vrx200-b-to-a.bspatch
+   firmware="/tmp/lantiq-vrx200-a.bin"
+   else
+   echo "firmware for annex a not found"
+   return -1
+   fi
+   ;;
+   b|j)
+   if [ -f "/lib/firmware/lantiq-vrx200-b.bin" ]; 
then
+   
firmware="/lib/firmware/lantiq-vrx200-b.bin"
+   elif [ -f "/tmp/lantiq-vrx200-b.bin" ]; then
+   firmware="/tmp/lantiq-vrx200-b.bin"
+   elif [ -f "/lib/firmware/lantiq-vrx200-a.bin" ] 
&& [ -f "/lib/firmware/lantiq-vrx200-a-to-b.bspatch" ]; then
+   bspatch 
/lib/firmware/lantiq-vrx200-a.bin \
+   /tmp/lantiq-vrx200-b.bin \
+   
/lib/firmware/lantiq-vrx200-a-to-b.bspatch
+   firmware="/tmp/lantiq-vrx200-b.bin"
+   else
+   echo "firmware for annex b not found"
+   return -1
+   fi
+   ;;
+   *)
+   echo "annex type not supported use a or b"
+   return -1
+   ;;
+   esac
+   fi
+   fi
+
[ -z "${firmware}" ] && firmware=/lib/firmware/vdsl.bin
[ -f "${firmware}" ] || {
echo failed to find $firmware
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/5] ltq-vdsl-app: load the vrx200 firmware or patch it

2016-02-28 Thread Hauke Mehrtens
On 02/28/2016 08:53 AM, John Crispin wrote:
> 
> 
> On 28/02/2016 08:44, Felix Fietkau wrote:
>> On 2016-02-28 08:42, Felix Fietkau wrote:
>>> On 2016-02-28 08:40, Felix Fietkau wrote:
>>>> On 2016-02-27 23:59, Hauke Mehrtens wrote:
>>>>> This checks for the VRX firmware provided in the OpenWrt package.
>>>>>
>>>>> Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
>>>> Shouldn't this add a dependency on the bspatch package?
>>>> By the way, where is that package? ;)
>>> Ah, overlooked the commit that added it. I still think there should be a
>>> dependency here though.
>> Haven't had my morning tea yet. Sorry for the noise.
>>
>> - Felix
>>
> 
> i was going to reply aswell, but then realized i ran out of milk so i
> could not have my hot chocolate and decided to wait :-)
> 
Currently the dependency to the bspatch tool is in the firmware package.
In case the user wants to use his own firmware or not the bspatched
version we do not have to include the bspatch utile. The bspatch binary
should only be called in case there is a binary patch.

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


[OpenWrt-Devel] [PATCH 3/5] ltq-vdsl-app: sync annex option between from ADSL package

2016-02-28 Thread Hauke Mehrtens
The detailed annex option were only available in the danube DSL app
including the activation of G.992.2 Annex A (ADSL Lite). This is now
also added to the vdsl app for the vrx200.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 .../network/config/ltq-vdsl-app/files/dsl_control  | 44 --
 1 file changed, 41 insertions(+), 3 deletions(-)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index 2241422..ba77a6f 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -16,11 +16,12 @@ EXTRA_HELP="status  Get DSL status information
 # ITU-T G.997.1 Amendment 2 (04/2013) - Section 2.1 - (Vectoring mode enable 
(VECTORMODE_ENABLE))
 #
 # G.992.1 Annex A
+# G.992.2 Annex A
 # G.992.3 Annex A / L-US1 / L_US-2 / M
 # G.992.5 Annex A / M
 # G.993.2 Annex A/B/C
 # G.993.5 Annex A/B/C
-xtse_xdsl_a="05_00_04_00_4C_01_04_0F"
+xtse_xdsl_a="05_01_04_00_4C_01_04_0F"
 
 # G.992.1 Annex B
 # G.992.3 Annex B
@@ -38,6 +39,43 @@ xtse_xdsl_b="10_00_10_00_00_04_00_0F"
 # G.993.5 Annex A/B/C
 xtse_xdsl_j="10_00_10_40_00_04_01_0F"
 
+# G.992.1 Annex B
+xtse_xdsl_bdmt="10_00_00_00_00_00_00_00"
+
+# G.992.3 Annex B
+xtse_xdsl_b2="00_00_10_00_00_00_00_00"
+
+# G.992.5 Annex B
+xtse_xdsl_b2p="00_00_00_00_00_04_00_00"
+
+# ANSI T1.413
+xtse_xdsl_at1="01_00_00_00_00_00_00_00"
+
+# G.992.2 Annex A
+xtse_xdsl_alite="00_01_00_00_00_00_00_00"
+
+# G.992.1 Annex A
+xtse_xdsl_admt="04_00_00_00_00_00_00_00"
+
+# G.992.3 Annex A
+xtse_xdsl_a2="00_00_04_00_00_00_00_00"
+
+# G.992.5 Annex A
+xtse_xdsl_a2p="00_00_00_00_00_01_00_00"
+
+# G.992.3 Annex L
+xtse_xdsl_l="00_00_00_00_0C_00_00_00"
+
+# G.992.3 Annex M
+# G.992.5 Annex M
+xtse_xdsl_m="00_00_00_00_40_00_04_00"
+
+# G.992.3 Annex M
+xtse_xdsl_m2="00_00_00_00_40_00_00_00"
+
+# G.992.5 Annex M
+xtse_xdsl_m2p="00_00_00_00_00_00_04_00"
+
 #
 # ITU-T G.994.1 (06/2012) - Table 2 (Mandatory carrier sets)
 #
@@ -156,7 +194,7 @@ start_service() {
if [ -z "${firmware}" ]; then
if grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo; then
case "${annex}" in
-   a|l|m)
+   a*|l*|m*)
if [ -f "/lib/firmware/lantiq-vrx200-a.bin" ]; 
then

firmware="/lib/firmware/lantiq-vrx200-a.bin"
elif [ -f "/tmp/lantiq-vrx200-a.bin" ]; then
@@ -171,7 +209,7 @@ start_service() {
return -1
fi
;;
-   b|j)
+   b*|j*)
if [ -f "/lib/firmware/lantiq-vrx200-b.bin" ]; 
then

firmware="/lib/firmware/lantiq-vrx200-b.bin"
elif [ -f "/tmp/lantiq-vrx200-b.bin" ]; then
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] ltq-vdsl-app: do not set the reserved bit 4 in the xTSE 8

2016-02-28 Thread Hauke Mehrtens
I do not know if this causes any problems now, but we should not set
it, because it is reserved. Some more recent versions of the Lantiq DSL
API driver and Control is checking if only valid bits are set.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/network/config/ltq-vdsl-app/files/dsl_control | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index 6997f28..a5c50b2 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -21,14 +21,14 @@ EXTRA_HELP="status  Get DSL status information
 # G.992.5 Annex A / M
 # G.993.2 Annex A/B/C
 # G.993.5 Annex A/B/C
-xtse_xdsl_a="05_01_04_00_4C_01_04_0F"
+xtse_xdsl_a="05_01_04_00_4C_01_04_07"
 
 # G.992.1 Annex B
 # G.992.3 Annex B
 # G.992.5 Annex B
 # G.993.2 Annex A/B/C
 # G.993.5 Annex A/B/C
-xtse_xdsl_b="10_00_10_00_00_04_00_0F"
+xtse_xdsl_b="10_00_10_00_00_04_00_07"
 
 # G.992.1 Annex B
 # G.992.3 Annex B
@@ -37,7 +37,7 @@ xtse_xdsl_b="10_00_10_00_00_04_00_0F"
 # G.992.5 Annex J
 # G.993.2 Annex A/B/C
 # G.993.5 Annex A/B/C
-xtse_xdsl_j="10_00_10_40_00_04_01_0F"
+xtse_xdsl_j="10_00_10_40_00_04_01_07"
 
 # G.992.1 Annex B
 xtse_xdsl_bdmt="10_00_00_00_00_00_00_00"
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/5] ltq-vdsl-app: make it possible to configure ADSL/VDSL independently

2016-02-28 Thread Hauke Mehrtens
There are some cases where ISPs are running ATM over VDSL or PTM over
ADSL, this is not the common case, but these cases exist. Make it
possible to configure OpenWrt for such cases by adding a new config
option line_mode.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 .../network/config/ltq-vdsl-app/files/dsl_control| 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index ba77a6f..6997f28 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -162,6 +162,8 @@ start_service() {
local tone_adsl
local tone_vdsl
local xtse
+   local xfer_mode
+   local line_mode
local mode
local lowlevel
 
@@ -170,6 +172,7 @@ start_service() {
config_get annex dsl annex
config_get firmware dsl firmware
config_get xfer_mode dsl xfer_mode
+   config_get line_mode dsl line_mode
 
eval "xtse=\"\${xtse_xdsl_$annex}\""
 
@@ -179,14 +182,27 @@ start_service() {
atm)
LOAD=ltq_atm_vr9
UNLOAD=ltq_ptm_vr9
+
+   # in most cases atm is used on top of adsl
+   [ -z "${line_mode}" ] && line_mode=adsl
+   ;;
+   *)
+   LOAD=ltq_ptm_vr9
+   UNLOAD=ltq_atm_vr9
+
+   # in most cases ptm is used on top of vdsl
+   [ -z "${line_mode}" ] && line_mode=vdsl
+   ;;
+   esac
+
+   case "${line_mode}" in
+   adsl)
mode=1
 
# mask out VDSL bits when ATM is requested
xtse="${xtse%_*}_00"
;;
*)
-   LOAD=ltq_ptm_vr9
-   UNLOAD=ltq_atm_vr9
mode=2
;;
esac
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/5] base-files: change type of adsl and vdsl to dsl only

2016-02-28 Thread Hauke Mehrtens
Instead of having two different types adsl and vdsl just create one dsl
type. This way we can use the same luci code for adsl and vdsl and the
config parameters are not so different.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/base-files/files/lib/functions/uci-defaults.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
b/package/base-files/files/lib/functions/uci-defaults.sh
index 31e4687..d403482 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -326,7 +326,7 @@ ucidef_add_adsl_modem() {
 
json_select_object dsl
json_select_object modem
-   json_add_string type "adsl"
+   json_add_string type "dsl"
json_add_string annex "$annex"
json_add_string firmware "$firmware"
json_select ..
@@ -340,7 +340,7 @@ ucidef_add_vdsl_modem() {
 
json_select_object dsl
json_select_object modem
-   json_add_string type "vdsl"
+   json_add_string type "dsl"
json_add_string annex "$annex"
json_add_string tone "$tone"
json_add_string xfer_mode "$xfer_mode"
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/5] ltq-adsl-app: sync annex option between from VDSL package

2016-02-28 Thread Hauke Mehrtens
The adsl control app missed the activation of annex M and annex L in
the Annex A part, this now activates everything the firmware supports.
In Annex L type only the wide US (Mask1) was activated, now also the
narrow US (Mask2) version gets activated.
In addition annex J was also added.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/network/config/ltq-adsl-app/files/dsl_control | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/network/config/ltq-adsl-app/files/dsl_control 
b/package/network/config/ltq-adsl-app/files/dsl_control
index 0c7221c..cf945ac 100644
--- a/package/network/config/ltq-adsl-app/files/dsl_control
+++ b/package/network/config/ltq-adsl-app/files/dsl_control
@@ -16,16 +16,17 @@ annex_b=10_00_10_00_00_04_00_00
 annex_bdmt=10_00_00_00_00_00_00_00
 annex_b2=00_00_10_00_00_00_00_00
 annex_b2p=00_00_00_00_00_04_00_00
-annex_a=04_01_04_00_00_01_00_00
+annex_a=05_01_04_00_4C_01_04_00
 annex_at1=01_00_00_00_00_00_00_00
 annex_alite=00_01_00_00_00_00_00_00
 annex_admt=04_00_00_00_00_00_00_00
 annex_a2=00_00_04_00_00_00_00_00
 annex_a2p=00_00_00_00_00_01_00_00
-annex_l=00_00_00_00_04_00_00_00
+annex_l=00_00_00_00_0C_00_00_00
 annex_m=00_00_00_00_40_00_04_00
 annex_m2=00_00_00_00_40_00_00_00
 annex_m2p=00_00_00_00_00_00_04_00
+annex_j=10_00_10_40_00_04_01_00
 
 start() {
local annex
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 07/11] ltq-adsl-app: sync annex option between from VDSL package

2016-02-28 Thread Hauke Mehrtens
The adsl control app missed the activation of annex M and annex L in
the Annex A part, this now activates everything the firmware supports.
In Annex L type only the wide US (Mask1) was activated, now also the
narrow US (Mask2) version gets activated.
In addition annex J was also added.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/network/config/ltq-adsl-app/files/dsl_control | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/network/config/ltq-adsl-app/files/dsl_control 
b/package/network/config/ltq-adsl-app/files/dsl_control
index 0c7221c..cf945ac 100644
--- a/package/network/config/ltq-adsl-app/files/dsl_control
+++ b/package/network/config/ltq-adsl-app/files/dsl_control
@@ -16,16 +16,17 @@ annex_b=10_00_10_00_00_04_00_00
 annex_bdmt=10_00_00_00_00_00_00_00
 annex_b2=00_00_10_00_00_00_00_00
 annex_b2p=00_00_00_00_00_04_00_00
-annex_a=04_01_04_00_00_01_00_00
+annex_a=05_01_04_00_4C_01_04_00
 annex_at1=01_00_00_00_00_00_00_00
 annex_alite=00_01_00_00_00_00_00_00
 annex_admt=04_00_00_00_00_00_00_00
 annex_a2=00_00_04_00_00_00_00_00
 annex_a2p=00_00_00_00_00_01_00_00
-annex_l=00_00_00_00_04_00_00_00
+annex_l=00_00_00_00_0C_00_00_00
 annex_m=00_00_00_00_40_00_04_00
 annex_m2=00_00_00_00_40_00_00_00
 annex_m2p=00_00_00_00_00_00_04_00
+annex_j=10_00_10_40_00_04_01_00
 
 start() {
local annex
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 09/11] ltq-vdsl-app: make it possible to configure ADSL/VDSL independently

2016-02-28 Thread Hauke Mehrtens
There are some cases where ISPs are running ATM over VDSL or PTM over
ADSL, this is not the common case, but these cases exist. Make it
possible to configure OpenWrt for such cases by adding a new config
option line_mode.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 .../network/config/ltq-vdsl-app/files/dsl_control| 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index ff1638a..cb52304 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -162,6 +162,8 @@ start_service() {
local tone_adsl
local tone_vdsl
local xtse
+   local xfer_mode
+   local line_mode
local mode
local lowlevel
 
@@ -170,6 +172,7 @@ start_service() {
config_get annex dsl annex
config_get firmware dsl firmware
config_get xfer_mode dsl xfer_mode
+   config_get line_mode dsl line_mode
 
eval "xtse=\"\${xtse_xdsl_$annex}\""
 
@@ -179,14 +182,27 @@ start_service() {
atm)
LOAD=ltq_atm_vr9
UNLOAD=ltq_ptm_vr9
+
+   # in most cases atm is used on top of adsl
+   [ -z "${line_mode}" ] && line_mode=adsl
+   ;;
+   *)
+   LOAD=ltq_ptm_vr9
+   UNLOAD=ltq_atm_vr9
+
+   # in most cases ptm is used on top of vdsl
+   [ -z "${line_mode}" ] && line_mode=vdsl
+   ;;
+   esac
+
+   case "${line_mode}" in
+   adsl)
mode=1
 
# mask out VDSL bits when ATM is requested
xtse="${xtse%_*}_00"
;;
*)
-   LOAD=ltq_ptm_vr9
-   UNLOAD=ltq_atm_vr9
mode=2
;;
esac
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 05/11] ltq-vdsl-app: make the dsl_control application stop cleanly

2016-02-28 Thread Hauke Mehrtens
I am not calling dsl_cmd because I want to ignore the lock, quit
should also be send when someone else is accessing it. I saw that some
other call was stuck here and all following calls were stuck in the
dsl_cmd lock.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/network/config/ltq-vdsl-app/files/dsl_control | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index d7ba622..9c8dbad 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -219,6 +219,7 @@ start_service() {
 }
 
 stop_service() {
+   echo quit > /tmp/pipe/dsl_cpe0_cmd 
DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \
DSL_INTERFACE_STATUS="DOWN" \
/sbin/dsl_notify.sh
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 02/11] ltq-vdsl-app: load the vrx200 firmware or patch it

2016-02-28 Thread Hauke Mehrtens
This checks for the VRX firmware provided in the OpenWrt package.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 .../network/config/ltq-vdsl-app/files/dsl_control  | 41 ++
 1 file changed, 41 insertions(+)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index fc100cf..d7ba622 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -153,6 +153,47 @@ start_service() {
;;
esac
 
+   if [ -z "${firmware}" ]; then
+   if grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo; then
+   case "${annex}" in
+   a|l|m)
+   if [ -f "/lib/firmware/lantiq-vrx200-a.bin" ]; 
then
+   
firmware="/lib/firmware/lantiq-vrx200-a.bin"
+   elif [ -f "/tmp/lantiq-vrx200-a.bin" ]; then
+   firmware="/tmp/lantiq-vrx200-a.bin"
+   elif [ -f "/lib/firmware/lantiq-vrx200-b.bin" ] 
&& [ -f "/lib/firmware/lantiq-vrx200-b-to-a.bspatch" ]; then
+   bspatch 
/lib/firmware/lantiq-vrx200-b.bin \
+   /tmp/lantiq-vrx200-a.bin \
+   
/lib/firmware/lantiq-vrx200-b-to-a.bspatch
+   firmware="/tmp/lantiq-vrx200-a.bin"
+   else
+   echo "firmware for annex a not found"
+   return -1
+   fi
+   ;;
+   b|j)
+   if [ -f "/lib/firmware/lantiq-vrx200-b.bin" ]; 
then
+   
firmware="/lib/firmware/lantiq-vrx200-b.bin"
+   elif [ -f "/tmp/lantiq-vrx200-b.bin" ]; then
+   firmware="/tmp/lantiq-vrx200-b.bin"
+   elif [ -f "/lib/firmware/lantiq-vrx200-a.bin" ] 
&& [ -f "/lib/firmware/lantiq-vrx200-a-to-b.bspatch" ]; then
+   bspatch 
/lib/firmware/lantiq-vrx200-a.bin \
+   /tmp/lantiq-vrx200-b.bin \
+   
/lib/firmware/lantiq-vrx200-a-to-b.bspatch
+   firmware="/tmp/lantiq-vrx200-b.bin"
+   else
+   echo "firmware for annex b not found"
+   return -1
+   fi
+   ;;
+   *)
+   echo "annex type not supported use a or b"
+   return -1
+   ;;
+   esac
+   fi
+   fi
+
[ -z "${firmware}" ] && firmware=/lib/firmware/vdsl.bin
[ -f "${firmware}" ] || {
echo failed to find $firmware
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 03/11] lantiq: do not set default firmware file

2016-02-28 Thread Hauke Mehrtens
We are now shipping a DSL firmware, do not set it by default to some
file name.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/base-files/files/lib/functions/uci-defaults.sh | 6 ++
 target/linux/lantiq/base-files/etc/board.d/02_network  | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/package/base-files/files/lib/functions/uci-defaults.sh 
b/package/base-files/files/lib/functions/uci-defaults.sh
index 512e0ed..31e4687 100755
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -335,15 +335,13 @@ ucidef_add_adsl_modem() {
 
 ucidef_add_vdsl_modem() {
local annex="$1"
-   local firmware="$2"
-   local tone="$3"
-   local xfer_mode="$4"
+   local tone="$2"
+   local xfer_mode="$3"
 
json_select_object dsl
json_select_object modem
json_add_string type "vdsl"
json_add_string annex "$annex"
-   json_add_string firmware "$firmware"
json_add_string tone "$tone"
json_add_string xfer_mode "$xfer_mode"
json_select ..
diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network 
b/target/linux/lantiq/base-files/etc/board.d/02_network
index 8ed5259..b27b802 100755
--- a/target/linux/lantiq/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/base-files/etc/board.d/02_network
@@ -144,7 +144,7 @@ fi
 
 if grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo; then
interface_wan="ptm0"
-   ucidef_add_vdsl_modem "$annex" "/lib/firmware/vdsl.bin" "av" "ptm"
+   ucidef_add_vdsl_modem "$annex" "av" "ptm"
 else
interface_wan="nas0"
ucidef_add_adsl_modem "$annex" "/lib/firmware/adsl.bin"
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 04/11] lantiq: add dsl firmware to default packages

2016-02-28 Thread Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 target/linux/lantiq/xrx200/profiles/lantiq.mk | 4 ++--
 target/linux/lantiq/xrx200/profiles/tplink.mk | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/lantiq/xrx200/profiles/lantiq.mk 
b/target/linux/lantiq/xrx200/profiles/lantiq.mk
index 0ec6be4..39c3bc6 100644
--- a/target/linux/lantiq/xrx200/profiles/lantiq.mk
+++ b/target/linux/lantiq/xrx200/profiles/lantiq.mk
@@ -1,13 +1,13 @@
 define Profile/EASY80920NOR
   NAME:=Lantiq VR9 - EASY80920NOR
-  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2
+  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 dsl-vrx200-firmware-xdsl-a 
dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,EASY80920NOR))
 
 define Profile/EASY80920NAND
   NAME:=Lantiq VR9 - EASY80920NAND
-  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2
+  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 dsl-vrx200-firmware-xdsl-a 
dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,EASY80920NAND))
diff --git a/target/linux/lantiq/xrx200/profiles/tplink.mk 
b/target/linux/lantiq/xrx200/profiles/tplink.mk
index 091935d..2ac364e 100644
--- a/target/linux/lantiq/xrx200/profiles/tplink.mk
+++ b/target/linux/lantiq/xrx200/profiles/tplink.mk
@@ -1,20 +1,20 @@
 define Profile/TDW8970
   NAME:=TP-LINK TD-W8970
-  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev
+  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev 
dsl-vrx200-firmware-xdsl-a dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,TDW8970))
 
 define Profile/TDW8980
   NAME:=TP-LINK TD-W8980
-  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev
+  PACKAGES:=kmod-ath9k wpad-mini kmod-usb-dwc2 kmod-ledtrig-usbdev 
dsl-vrx200-firmware-xdsl-a dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,TDW8980))
 
 define Profile/VR200v
   NAME:=TP-LINK Archer VR200v
-  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev dsl-vrx200-firmware-xdsl-a 
dsl-vrx200-firmware-xdsl-b-patch
 endef
 
 $(eval $(call Profile,VR200v))
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 01/11] dsl-vrx200-firmware-xdsl: create Lantiq vrx200 firmware patches

2016-02-28 Thread Hauke Mehrtens
Instead of having two big binaries only add one binary and then a patch
to create the other one when needed at runtime.
This is easier to handle in one Makeifle for both firmware files.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 .../lantiq/dsl-vrx200-firmware-xdsl-a/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl-b/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl/Makefile   | 128 +
 3 files changed, 128 insertions(+), 94 deletions(-)
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
 create mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile

diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
deleted file mode 100644
index e8dd659..000
--- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (C) 2015 OpenWrt.org
-# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=dsl_vr9_firmware_xdsl
-PKG_VERSION:=05.07.04.03.00.06_05.07.01.08.00.01_osc
-PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=4c8d9ca68dda88d3cfc0ca0fb946a63e
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/dsl-vrx200-firmware-xdsl-a
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  TITLE:=VRX200 / VR9 CPE xDSL Annex A firmware
-  URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-a/description
-   VRX200 / VR9 CPE VDSL and ADSL Annex A firmware
-endef
-
-define Build/Prepare
-   rm -rf $(PKG_BUILD_DIR)
-   mkdir -p $(PKG_BUILD_DIR)
-   $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_SOURCE)
-endef
-
-define Build/Compile
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-a/install
-   $(INSTALL_DIR) $(1)/lib/firmware/
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE 
$(1)/lib/firmware/xcpe_574306_571801.LICENSE
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_574306_571801.bin 
$(1)/lib/firmware/
-   ln -s xcpe_574306_571801.bin $(1)/lib/firmware/vdsl.bin
-   ln -s xcpe_574306_571801.bin $(1)/lib/firmware/adsl-a.bin
-endef
-
-$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-a))
diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
deleted file mode 100644
index c283da2..000
--- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (C) 2015 OpenWrt.org
-# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=dsl_vr9_firmware_xdsl
-PKG_VERSION:=05.07.03.03.00.06_05.07.01.0C.00.02_osc
-PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=af5581836cbe574574590c046fe45bab
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/dsl-vrx200-firmware-xdsl-b
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  TITLE:=VRX200 / VR9 CPE xDSL Annex B firmware
-  URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-b/description
-   VRX200 / VR9 CPE VDSL and ADSL Annex B firmware
-endef
-
-define Build/Prepare
-   rm -rf $(PKG_BUILD_DIR)
-   mkdir -p $(PKG_BUILD_DIR)
-   $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_SOURCE)
-endef
-
-define Build/Compile
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-b/install
-   $(INSTALL_DIR) $(1)/lib/firmware/
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE 
$(1)/lib/firmware/xcpe_573306_571C02.LICENSE
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_573306_571C02.bin 
$(1)/lib/firmware/
-   ln -s xcpe_573306_571C02.bin $(1)/lib/firmware/vdsl.bin
-   ln -s xcpe_573306_571C02.bin $(1)/lib/firmware/adsl-b.bin
-endef
-
-$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-b))
diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
new file mode 100644
index 000..ab9a3dc
--- /dev/null
+++ b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
@@ -0,0 +1,128 @@
+# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dsl_vr9_firmware_xdsl
+PKG_VERSION:=05.07.04.03.00.06_05.07.01.08.00.01_osc
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(P

[OpenWrt-Devel] [PATCH v2 00/11] Lantiq dsl improvements

2016-02-28 Thread Hauke Mehrtens
This is the v2 of the lantiq patches I send yesterday and today base on
trunk. This was tested on a TP-Link vr200v connected to a Deutsche
Telekom line. Some testes with a Danube based device would be nice.

Hauke Mehrtens (11):
  dsl-vrx200-firmware-xdsl: create Lantiq vrx200 firmware patches
  ltq-vdsl-app: load the vrx200 firmware or patch it
  lantiq: do not set default firmware file
  lantiq: add  dsl firmware to default packages
  ltq-vdsl-app: make the dsl_control application stop cleanly
  base-files: change type of adsl and vdsl to dsl only
  ltq-adsl-app: sync annex option between from VDSL package
  ltq-vdsl-app: sync annex option between from ADSL package
  ltq-vdsl-app: make it possible to configure ADSL/VDSL independently
  ltq-vdsl-app: do not set the reserved bit 4 in the xTSE 8
  base-files: print profile name in dsl lucistat

 package/base-files/files/bin/config_generate   |   2 +-
 .../base-files/files/lib/functions/uci-defaults.sh |   6 +-
 .../lantiq/dsl-vrx200-firmware-xdsl-a/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl-b/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl/Makefile   | 128 +
 .../network/config/ltq-adsl-app/files/dsl_control  |   5 +-
 .../network/config/ltq-vdsl-app/files/dsl_control  | 106 -
 .../linux/lantiq/base-files/etc/board.d/02_network |   2 +-
 .../lantiq/base-files/lib/functions/lantiq_dsl.sh  |   1 +
 target/linux/lantiq/xrx200/profiles/lantiq.mk  |   4 +-
 target/linux/lantiq/xrx200/profiles/tplink.mk  |   6 +-
 11 files changed, 242 insertions(+), 112 deletions(-)
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
 create mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile

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


[OpenWrt-Devel] [PATCH v2 08/11] ltq-vdsl-app: sync annex option between from ADSL package

2016-02-28 Thread Hauke Mehrtens
The detailed annex option were only available in the danube DSL app
including the activation of G.992.2 Annex A (ADSL Lite). This is now
also added to the vdsl app for the vrx200.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 .../network/config/ltq-vdsl-app/files/dsl_control  | 44 --
 1 file changed, 41 insertions(+), 3 deletions(-)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index 9c8dbad..ff1638a 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -16,11 +16,12 @@ EXTRA_HELP="status  Get DSL status information
 # ITU-T G.997.1 Amendment 2 (04/2013) - Section 2.1 - (Vectoring mode enable 
(VECTORMODE_ENABLE))
 #
 # G.992.1 Annex A
+# G.992.2 Annex A
 # G.992.3 Annex A / L-US1 / L_US-2 / M
 # G.992.5 Annex A / M
 # G.993.2 Annex A/B/C
 # G.993.5 Annex A/B/C
-xtse_xdsl_a="05_00_04_00_4C_01_04_0F"
+xtse_xdsl_a="05_01_04_00_4C_01_04_0F"
 
 # G.992.1 Annex B
 # G.992.3 Annex B
@@ -38,6 +39,43 @@ xtse_xdsl_b="10_00_10_00_00_04_00_0F"
 # G.993.5 Annex A/B/C
 xtse_xdsl_j="10_00_10_40_00_04_01_0F"
 
+# G.992.1 Annex B
+xtse_xdsl_bdmt="10_00_00_00_00_00_00_00"
+
+# G.992.3 Annex B
+xtse_xdsl_b2="00_00_10_00_00_00_00_00"
+
+# G.992.5 Annex B
+xtse_xdsl_b2p="00_00_00_00_00_04_00_00"
+
+# ANSI T1.413
+xtse_xdsl_at1="01_00_00_00_00_00_00_00"
+
+# G.992.2 Annex A
+xtse_xdsl_alite="00_01_00_00_00_00_00_00"
+
+# G.992.1 Annex A
+xtse_xdsl_admt="04_00_00_00_00_00_00_00"
+
+# G.992.3 Annex A
+xtse_xdsl_a2="00_00_04_00_00_00_00_00"
+
+# G.992.5 Annex A
+xtse_xdsl_a2p="00_00_00_00_00_01_00_00"
+
+# G.992.3 Annex L
+xtse_xdsl_l="00_00_00_00_0C_00_00_00"
+
+# G.992.3 Annex M
+# G.992.5 Annex M
+xtse_xdsl_m="00_00_00_00_40_00_04_00"
+
+# G.992.3 Annex M
+xtse_xdsl_m2="00_00_00_00_40_00_00_00"
+
+# G.992.5 Annex M
+xtse_xdsl_m2p="00_00_00_00_00_00_04_00"
+
 #
 # ITU-T G.994.1 (06/2012) - Table 2 (Mandatory carrier sets)
 #
@@ -156,7 +194,7 @@ start_service() {
if [ -z "${firmware}" ]; then
if grep -qE "system type.*: (VR9|xRX200)" /proc/cpuinfo; then
case "${annex}" in
-   a|l|m)
+   a*|l*|m*)
if [ -f "/lib/firmware/lantiq-vrx200-a.bin" ]; 
then

firmware="/lib/firmware/lantiq-vrx200-a.bin"
elif [ -f "/tmp/lantiq-vrx200-a.bin" ]; then
@@ -171,7 +209,7 @@ start_service() {
return -1
fi
;;
-   b|j)
+   b*|j*)
if [ -f "/lib/firmware/lantiq-vrx200-b.bin" ]; 
then

firmware="/lib/firmware/lantiq-vrx200-b.bin"
elif [ -f "/tmp/lantiq-vrx200-b.bin" ]; then
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 11/11] base-files: print profile name in dsl lucistat

2016-02-28 Thread Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh 
b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
index ece614b..aefefcd 100755
--- a/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
+++ b/target/linux/lantiq/base-files/lib/functions/lantiq_dsl.sh
@@ -722,6 +722,7 @@ profile() {
 
if [ "$action" = "lucistat" ]; then
echo "dsl.profile=${profile:-nil}"
+   echo "dsl.profile_s=\"${s}\""
else
echo "Profile:  $s"
fi
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 10/11] ltq-vdsl-app: do not set the reserved bit 4 in the xTSE 8

2016-02-28 Thread Hauke Mehrtens
I do not know if this causes any problems now, but we should not set
it, because it is reserved. Some more recent versions of the Lantiq DSL
API driver and Control is checking if only valid bits are set.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/network/config/ltq-vdsl-app/files/dsl_control | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
b/package/network/config/ltq-vdsl-app/files/dsl_control
index cb52304..361151a 100644
--- a/package/network/config/ltq-vdsl-app/files/dsl_control
+++ b/package/network/config/ltq-vdsl-app/files/dsl_control
@@ -21,14 +21,14 @@ EXTRA_HELP="status  Get DSL status information
 # G.992.5 Annex A / M
 # G.993.2 Annex A/B/C
 # G.993.5 Annex A/B/C
-xtse_xdsl_a="05_01_04_00_4C_01_04_0F"
+xtse_xdsl_a="05_01_04_00_4C_01_04_07"
 
 # G.992.1 Annex B
 # G.992.3 Annex B
 # G.992.5 Annex B
 # G.993.2 Annex A/B/C
 # G.993.5 Annex A/B/C
-xtse_xdsl_b="10_00_10_00_00_04_00_0F"
+xtse_xdsl_b="10_00_10_00_00_04_00_07"
 
 # G.992.1 Annex B
 # G.992.3 Annex B
@@ -37,7 +37,7 @@ xtse_xdsl_b="10_00_10_00_00_04_00_0F"
 # G.992.5 Annex J
 # G.993.2 Annex A/B/C
 # G.993.5 Annex A/B/C
-xtse_xdsl_j="10_00_10_40_00_04_01_0F"
+xtse_xdsl_j="10_00_10_40_00_04_01_07"
 
 # G.992.1 Annex B
 xtse_xdsl_bdmt="10_00_00_00_00_00_00_00"
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 06/11] base-files: change type of adsl and vdsl to dsl only

2016-02-28 Thread Hauke Mehrtens
Instead of having two different types adsl and vdsl just create one dsl
type. This way we can use the same luci code for adsl and vdsl and the
config parameters are not so different.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 package/base-files/files/bin/config_generate | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/bin/config_generate 
b/package/base-files/files/bin/config_generate
index 550de0e..4256d3c 100755
--- a/package/base-files/files/bin/config_generate
+++ b/package/base-files/files/bin/config_generate
@@ -42,7 +42,7 @@ generate_static_network() {
json_get_vars type annex firmware tone 
xfer_mode
uci -q batch <<-EOF
delete network.dsl
-   set network.dsl='$type'
+   set network.dsl='dsl'
set network.dsl.annex='$annex'
set 
network.dsl.firmware='$firmware'
set network.dsl.tone='$tone'
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 05/11] ltq-vdsl-app: make the dsl_control application stop cleanly

2016-02-29 Thread Hauke Mehrtens
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 02/29/2016 06:08 AM, Alexander Couzens wrote:
> On Sun, 28 Feb 2016 19:44:28 +0100 Hauke Mehrtens
> <ha...@hauke-m.de> wrote:
> 
>> I am not calling dsl_cmd because I want to ignore the lock, quit 
>> should also be send when someone else is accessing it. I saw that
>> some other call was stuck here and all following calls were stuck
>> in the dsl_cmd lock.
>> 
>> Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de> --- 
>> package/network/config/ltq-vdsl-app/files/dsl_control | 1 + 1
>> file changed, 1 insertion(+)
>> 
>> diff --git
>> a/package/network/config/ltq-vdsl-app/files/dsl_control 
>> b/package/network/config/ltq-vdsl-app/files/dsl_control index 
>> d7ba622..9c8dbad 100644 --- 
>> a/package/network/config/ltq-vdsl-app/files/dsl_control +++ 
>> b/package/network/config/ltq-vdsl-app/files/dsl_control @@
>> -219,6 +219,7 @@ start_service() { }
>> 
>> stop_service() {
> 
> why not adding a comment about the lock?

Will add this.

> 
>> +echo quit > /tmp/pipe/dsl_cpe0_cmd 
>> DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \ 
>> DSL_INTERFACE_STATUS="DOWN" \ /sbin/dsl_notify.sh
> 
> 
> 


-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJW1Me5AAoJEIZ0px9YPRMyCGQP/iGoEhCe+H/PDu26g1+TznC5
2in9K8WEa+tbacUgkj/gFNOF5RTxVZIZ7Y7MOFDkfETZ1oEn/+8Hm4DO7mlJz4x1
VAzMoER/wM1rlK+WEtqbaHh/av86I2Sd6CAKdhiEbXkW3o/q6O4TkWHy6VQO0MXY
8W95ITW5e05BkhdSXlE6RL8MhJWGmZlxT0RsZ2eyHBfIroaJUgpNCD0SPCNzmp/w
rTVDlg8Qbz5jHaBiHolUJK2iCRG8CbG/O8qQtxsxhp5129qn6M60zPKp2MsfcX59
ZMSW/2GSB65GP35wTZ1u13wX5VHKpi/eCb4y4ABQZwxI7ow4RK3X9SIqLcfR8O3/
bhmM5gGQ7Ukt0rZkJpBT8hye8a5dA+R290vtj8qh8YleqsULPQyif0kq0LL2qh5v
d0FTDpWhgeKiUT78Kit8IEpTg94uIpbQaWdVCmGlcw5Exd2RtRZYXf2RpBhAA9sl
GB8aDKtnNChAg0twdh7sVaNJcjOhuSfw02TZH0D17NdDbzhMqn0zvl2UQ68jWMPh
WhO1uIl/PEjXXZ8gyIDnkzAs1PhIE3tb6NmkIcA02H0zydB0LOZQSif8Nn57bCF3
64n5U378oHJ2M/RpPAh4gMUjo/K7K/i/tyXkhOBHGWchyI4UizaxvQJWi6CYCDzE
PeAfTzQVtB4c7lItIc9S
=5OsF
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Introducing new IP Virtual Server package and kernel modules

2016-02-15 Thread Hauke Mehrtens
Hi,

On 02/13/2016 03:47 PM, Mauro M. wrote:
> Hello,
> 
> I am new to this list and this is my first post.

This was a replay to the " downloads.openwrt.org NOT accessible!!!"
thread and your mail is totally unrelated to that. When you want to
start a new thread next time just send a new mail to the list and do not
replay to an older mail. If you want to answer to this mail because wen
you should use the replay button.

> I included a new package into OpenWRT, both cc15.05 and trunk, to add Load
> Balancer capability using Linux IP Virtual Server:
> 
> http://www.linuxvirtualserver.org/software/ipvs.html
> 
> I have been testing both CC and trunk build on different Netgear and
> Buffalo routers for the last three weeks. Everything works as expected and
> I did not find any stability issues being introduced.
> 
> I would like to understand if and how it would be possible to include the
> new package into the mainstream. I can offer to be a maintainer of this
> package and in future to add startup and uci configuration scripts (at the
> moment one would have to create his own startup and configuration).
> 
> Yesterday I tried to add the new files and commit the changes to existing
> files via git (trunk). I am not sure if these reached the destination as I
> have not used any authentication credentials.
> 
> Please could you guide me through the correct process?
> 
> Thank you in advance,
> Mauro

As this is a separate package you should create a pull request on
github. Here is some documentation on how to do this:
https://github.com/openwrt/packages/blob/master/CONTRIBUTING.md

OpenWrt CC is currently in maintenance only mode and we only allow
security fixes and bugfixes, but no new features. You can still send a
pull request to integrate our package into the Openwrt package feed for
trunk which will be used for the next release.

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


Re: [OpenWrt-Devel] [PATCH] mac80211: install old firmware for ath9k-htc on target as well

2016-03-15 Thread Hauke Mehrtens
On 03/15/2016 02:06 PM, Alexey Brodkin wrote:
> In commit
> http://git.openwrt.org/?p=openwrt.git;a=commit;h=3990e15258808b145226d7e95332c4708f9f9463
> I got rid of older ath9k_htc firmware in favor of newer ones.
> 
> But that was not completely correct.
> New v1.4 ath9k_htc firmwares are supported in Linux kernels >= 4.4.
> And since not all boards were moved to 4.4 yet it makes perfect
> sense to get back installation of older firmwares for compatibility
> purposes.
> 

NACK

ath9k_htc is provided by compat-wireless and not taken from normal
kernel. The compat-wireless version in trunk is based on a version more
recent than 4.4 independent of the kernel actually in use. You can
assume that the ath9k_htc driver is similar to the one used in kernel
4.5 for all OpenWrt kernels in trunk.

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


Re: [OpenWrt-Devel] Patch for Arduino Yun board WLAN RST"button support (mach-arduino-yun.c)

2016-03-08 Thread Hauke Mehrtens
On 03/07/2016 06:02 AM, Hirokazu MORIKAWA wrote:
> Hi,
> 
> This patch is a support for Arduino Yun board "WLAN RST" button.
> I don't know the reason why you omitted codes when implement from 
> march-linio.c.
> But arduino yun additional packages use "WLAN RST" button.

I do not know why I did not add them.

please follow the OpenWrt patch submission guidelines:
https://dev.openwrt.org/wiki/SubmittingPatches

1. Your patch is whitespace damaged, at beast use "git format-patch" and
then "git send-email" to send it.
2. the patch is missing a "Signed-off-by: " line
3. you should send it to the public mailing list.

Hauke

> 
> --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c
> @@ -60,6 +60,17 @@
>   },
>  };
>  
> +static struct gpio_keys_button ds_gpio_keys[] __initdata = {
> + {
> + .desc   = "configuration button",
> + .type   = EV_KEY,
> + .code   = KEY_WPS_BUTTON,
> + .debounce_interval = DS_KEYS_DEBOUNCE_INTERVAL,
> + .gpio   = DS_GPIO_CONF_BTN,
> + .active_low = 1,
> + },
> +};
> +
>  static void __init ds_common_setup(void)
>  {
>   static u8 mac[6];
> @@ -97,8 +108,18 @@
>  
>   ath79_register_leds_gpio(-1, ARRAY_SIZE(ds_leds_gpio),
>ds_leds_gpio);
> + ath79_register_gpio_keys_polled(-1, DS_KEYS_POLL_INTERVAL,
> + ARRAY_SIZE(ds_gpio_keys),
> + ds_gpio_keys);
>   ath79_register_usb();
>  
> + // use the swtich_led directly form sysfs
> + ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
> + AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
> + AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
> + AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
> + AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
> +
>   //Disable the Function for some pins to have GPIO functionality active
>   // GPIO6-7-8 and GPIO11
>   ath79_gpio_function_setup(AR933X_GPIO_FUNC_JTAG_DISABLE | 
> AR933X_GPIO_FUNC_I2S_MCK_EN, 0);
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] about .chk firmware

2016-03-08 Thread Hauke Mehrtens
On 03/08/2016 06:17 AM, feng yu wrote:
> hi,i got a netgear r8500 recently,since it is not support by openwrt
> yet,i cosse complainted some modules and want to mod the offical
> firmware to add them in it(rootfs) ,i used the source code 1.0.2.26
> 
> to packet the firmware but always got erroes, the bootlong freez at
> starting program at 0x008000,then i googled and find your artical
> 
> the head structure is the same as your mentioned and still a problem.i
> am wondering if you had done some further reseachs or you can provide me
> some cules to slove that.thx
Hi,

when you read a little bit further you see that the problem was that the
bootloader only worked with lzma using some special parameters and not all.

This file creates the image in OpenWrt:
target/linux/bcm53xx/image/Makefile

Please use the normal OpenWrt mailing lists next time.

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


Re: [OpenWrt-Devel] [PATCH 0/4] Add Raspberry Pi 3 support

2016-03-19 Thread Hauke Mehrtens
Hi Arend,

could you or someone else from Broadcom pleases add the firmware for the
BCM43430 SDIO to linux-firmware. This module is used in the Raspberry Pi
3 and it would be a lot easer for distributions to have the firmware in
linux-firmware.

Hauke

On 03/08/2016 11:13 PM, Álvaro Fernández Rojas wrote:
> I've got WiFi and Bluetooth working:
> https://github.com/openwrt-es/openwrt/commits/brcm2708-rpi3-wifi
> https://github.com/openwrt-es/openwrt/commits/brcm2708-rpi3-bt
> 
> WiFi is working after latest brcmfmac patches backported by Rafał, with
> some issues like the following:
> brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received,
> flags 0x44
> 
> BT is working but only for baud rates <= 115200. I'm still investigating
> why.
> In order to setup the bluetooth, the following bluez patches are needed:
> https://github.com/openwrt/packages/pull/2464
> 
> By the way, I won't be submitting any WiFi/BT patches until anyone from
> either the Raspberry foundation or Broadcom clarifies the license of the
> firmware files.
> https://github.com/raspberrypi/linux/issues/1325
> 
> Regards,
> Álvaro.
> 
> El 04/03/2016 a las 21:06, Álvaro Fernández Rojas escribió:
>> These patches add basic Raspberry Pi 3 support.
>>
>> Bootlog:
>> https://gist.github.com/Noltari/92f51259c9d18506192b#file-bcm2710_rpi3-log
>>
>>
>> Known issues:
>> 1) No ARMv8 64 bit support.
>>   More info:
>>   https://github.com/raspberrypi/firmware/issues/550
>> 2) UART0 is connected to BCM43430 (Bluetooth), which means that
>> console relies on UART1.
>>   UART1 clock depends on pll_freq, which changes depending on the core
>> frequency.
>>   In order to get a proper console through GPIOs 14 & 15, you should
>> force a fixed frequency instead of the default dynamic one.
>>   You can do that by either setting core_freq=250 on config.txt or
>> force_turbo=1 (this last option will run your rpi at maximum frequency
>> so be careful).
>>   The framebuffer console (HDMI) isn't affected so you can use that
>> one with an external keyboard and USB HID package.
>>   More info:
>>   https://github.com/raspberrypi/firmware/issues/553
>>   https://github.com/RPi-Distro/repo/issues/22
>> 3) No WiFi support.
>>   brcmfmac43430-sdio.bin / brcmfmac43430-sdio.txt firmware files
>> aren't available on linux-firmware for now.
>>   Downloading those files from
>> https://github.com/RPi-Distro/firmware-nonfree and trying to enable
>> BCM43430 SDIO WiFi causes the following kernel exception:
>>  
>> https://gist.github.com/Noltari/92f51259c9d18506192b#file-bcm2710_rpi3_brcmfmac-log
>>
>> 4) No Bluetooth support.
>>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/3] curl: add flags to allow gc-sections to strip out unused code

2016-04-07 Thread Hauke Mehrtens
On 04/07/2016 10:21 AM, Dirk Feytons wrote:
> Signed-off-by: Dirk Feytons 
> ---
>  package/network/utils/curl/Makefile |3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/package/network/utils/curl/Makefile 
> b/package/network/utils/curl/Makefile
> index 319c0b7..af38ed4 100644
> --- a/package/network/utils/curl/Makefile
> +++ b/package/network/utils/curl/Makefile
> @@ -99,8 +99,9 @@ define Package/libcurl/config
>source "$(SOURCE)/Config.in"
>  endef
>  
> -TARGET_CFLAGS += $(FPIC)
> +TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
>  TARGET_CPPFLAGS += $(if $(CONFIG_LIBCURL_NTLM),,-DCURL_DISABLE_NTLM)
> +TARGET_LDFLAGS += -Wl,--gc-sections
>  
>  CONFIGURE_ARGS += \
>   --disable-debug \
> 
Out of curiosity, have you checked how much memory this saves?

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


[OpenWrt-Devel] [PATCH] lantiq: use new image build process for some images

2016-04-12 Thread Hauke Mehrtens
This adds for some easy images the new build process.

This was only tested on some TP-Link devices, please test.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 target/linux/lantiq/image/Makefile | 185 +++--
 1 file changed, 95 insertions(+), 90 deletions(-)

diff --git a/target/linux/lantiq/image/Makefile 
b/target/linux/lantiq/image/Makefile
index c3cb48a..d863a91 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2010-2012 OpenWrt.org
+# Copyright (C) 2010-2016 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -10,6 +10,9 @@
 
 JFFS2_BLOCKSIZE = 64k 128k 256k
 
+KERNEL_LOADADDR = 0x80002000
+KERNEL_ENTRY = 0x80a0
+
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
@@ -269,81 +272,103 @@ endif
 endef
 
 
-ifeq ($(CONFIG_TARGET_lantiq_falcon),y)
-
-Image/BuildKernel/Profile/EASY98000NOR=$(call 
Image/BuildKernel/Template,EASY98000NOR)
-Image/Build/Profile/EASY98000NOR=$(call Image/Build/$(1),$(1),EASY98000NOR)
-
-Image/BuildKernel/Profile/EASY98000SFLASH=$(call 
Image/BuildKernel/Template,EASY98000SFLASH)
-Image/Build/Profile/EASY98000SFLASH=$(call 
Image/Build/$(1),$(1),EASY98000SFLASH)
-
-endif
-
-
-ifeq ($(CONFIG_TARGET_lantiq_ase),y)
-
-Image/BuildKernel/Profile/DGN1000B=$(call Image/BuildKernel/Template,DGN1000B)
-Image/Build/Profile/DGN1000B=$(call Image/Build/$(1),$(1),DGN1000B)
-
-endif
-
+### Kernel scripts ###
+define Build/append-dtb
+   $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb)
+   cat $@.dtb >> $@
+endef
 
-ifeq ($(CONFIG_TARGET_lantiq_xway),y)
+define Build/tplink-fw
+   mktplinkfw2 -c -B $(BOARD_ID) -s \
+   -k $@ -o $@.new
+   mv $@.new $@
+endef
 
-# Danube
-Image/BuildKernel/Profile/BTHOMEHUBV2B=$(call 
Image/BuildKernel/Template,BTHOMEHUBV2B)
-Image/Build/Profile/BTHOMEHUBV2B=$(call Image/BuildNAND/$(1),$(1),BTHOMEHUBV2B)
+define Build/mktplinkfw2
+   mktplinkfw2 -B $(BOARD_ID) -s -a 0x4 -j \
+   -k $(word 1,$^) -r $(word 2,$^) \
+   -o $@
+endef
 
-Image/BuildKernel/Profile/EASY50712=$(call 
Image/BuildKernel/Template,EASY50712)
-Image/Build/Profile/EASY50712=$(call Image/Build/$(1),$(1),EASY50712)
 
-Image/BuildKernel/Profile/ACMP252=$(call Image/BuildKernel/Template,ACMP252)
-Image/Build/Profile/ACMP252=$(call Image/Build/$(1),$(1),ACMP252)
+# Shared device definition: applies to every defined device
+define Device/Default
+  PROFILES = Default $$(DEVICE_PROFILE)
+  KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts)
+  KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs
+  KERNEL := kernel-bin | append-dtb | lzma | uImage lzma
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
+  FILESYSTEMS := squashfs
+  DEVICE_PROFILE :=
+  DEVICE_DTS :=
+endef
+DEVICE_VARS += BOARD_ID DEVICE_PROFILE DEVICE_DTS
 
-Image/BuildKernel/Profile/ARV4510PW=$(call 
Image/BuildKernel/Template,ARV4510PW)
-Image/Build/Profile/ARV4510PW=$(call Image/Build/$(1),$(1),ARV4510PW)
+define Device/lantiqTpLink
+  KERNEL := kernel-bin | append-dtb | lzma
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-fw
+  IMAGES := tplink
+  IMAGE/tplink := mktplinkfw2
+endef
 
-Image/BuildKernel/Profile/ARV4525PW=$(call 
Image/BuildKernel/Template,ARV4525PW)
-Image/Build/Profile/ARV4525PW=$(call Image/Build/$(1),$(1),ARV4525PW)
+define lantiqTpLink
+  define Device/$(1)
+$$(Device/lantiqTpLink)
+DEVICE_PROFILE := $(1)
+DEVICE_DTS := $(1)
+BOARD_ID := $(2)
+  endef
+  TARGET_DEVICES += $(1)
+endef
 
-Image/BuildKernel/Profile/ARV7525PW=$(call 
Image/BuildKernel/Template,ARV7525PW)
-Image/Build/Profile/ARV7525PW=$(call Image/Build/$(1),$(1),ARV7525PW)
+define lantiqImage
+  define Device/$(1)
+$$(Device/lantiqImage)
+DEVICE_PROFILE := $(1)
+DEVICE_DTS := $(1)
+  endef
+  TARGET_DEVICES += $(1)
+endef
 
-Image/BuildKernel/Profile/ARV4518PWR01=$(call 
Image/BuildKernel/Template,ARV4518PWR01)
-Image/Build/Profile/ARV4518PWR01=$(call Image/Build/$(1),$(1),ARV4518PWR01)
 
-Image/BuildKernel/Profile/ARV4518PWR01A=$(call 
Image/BuildKernel/Template,ARV4518PWR01A)
-Image/Build/Profile/ARV4518PWR01A=$(call Image/Build/$(1),$(1),ARV4518PWR01A)
+ifeq ($(CONFIG_TARGET_lantiq_falcon),y)
 
-Image/BuildKernel/Profile/ARV4519PW=$(call 
Image/BuildKernel/Template,ARV4519PW)
-Image/Build/Profile/ARV4519PW=$(call Image/Build/$(1),$(1),ARV4519PW)
+$(eval $(call lantiqImage,EASY98000NOR))
+$(eval $(call lantiqImage,EASY98000SFLASH))
 
-Image/BuildKernel/Profile/ARV4520PW=$(call 
Image/BuildKernel/Template,ARV4520PW)
-Image/Build/Profile/ARV4520PW=$(call Image/Build/$(1),$(1),ARV4520PW)
+endif
 
-Image/BuildKernel/Profile/ARV452CQW=$(call 
Image/BuildKernel/Template,ARV452CQW)
-Image/Build/Profile/ARV452CQW=$(call Image/Build/$(1),$(1),ARV452CQW)
 
-Image/BuildKernel/Profile/ARV7510PW22=$(call 
Image

[OpenWrt-Devel] [PATCH] lantiq: use upstream mechanism to append device tree file

2016-03-19 Thread Hauke Mehrtens
Instead of using our patch-dtb program just place the device tree
behind the kernel binary and then let the in kernel mechanism fetch it.
This also adds support for having the device tree file in the boot
loader.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 target/linux/lantiq/config-4.4 |  8 ++--
 target/linux/lantiq/image/Makefile |  4 +-
 .../0002-MIPS-lantiq-dtb-image-hack.patch  | 31 --
 .../0036-owrt-generic-dtb-image-hack.patch | 32 ---
 ...-add-support-for-device-tree-file-from-bo.patch | 48 ++
 ...-make-it-possible-to-build-in-no-device-t.patch | 37 +
 6 files changed, 91 insertions(+), 69 deletions(-)
 delete mode 100644 
target/linux/lantiq/patches-4.4/0002-MIPS-lantiq-dtb-image-hack.patch
 delete mode 100644 
target/linux/lantiq/patches-4.4/0036-owrt-generic-dtb-image-hack.patch
 create mode 100644 
target/linux/lantiq/patches-4.4/0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch
 create mode 100644 
target/linux/lantiq/patches-4.4/0121-MIPS-lantiq-make-it-possible-to-build-in-no-device-t.patch

diff --git a/target/linux/lantiq/config-4.4 b/target/linux/lantiq/config-4.4
index 5d4b7cc..cf3ec47 100644
--- a/target/linux/lantiq/config-4.4
+++ b/target/linux/lantiq/config-4.4
@@ -38,7 +38,7 @@ CONFIG_CRYPTO_WORKQUEUE=y
 CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DTC=y
-CONFIG_DT_EASY50712=y
+# CONFIG_DT_EASY50712 is not set
 CONFIG_EARLY_PRINTK=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -108,6 +108,7 @@ CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_MIPS_CPU=y
 CONFIG_IRQ_WORK=y
 CONFIG_LANTIQ=y
+CONFIG_LANTIQ_DT_NONE=y
 CONFIG_LANTIQ_ETOP=y
 # CONFIG_LANTIQ_PHY is not set
 CONFIG_LANTIQ_WDT=y
@@ -125,8 +126,8 @@ CONFIG_MIPS_CMDLINE_FROM_DTB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 # CONFIG_MIPS_MACHINE is not set
 # CONFIG_MIPS_MT_SMP is not set
-CONFIG_MIPS_NO_APPENDED_DTB=y
-# CONFIG_MIPS_RAW_APPENDED_DTB is not set
+# CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
 # CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_MODULES_USE_ELF_REL=y
@@ -187,7 +188,6 @@ CONFIG_SPI=y
 CONFIG_SPI_LANTIQ=y
 CONFIG_SPI_MASTER=y
 CONFIG_SRCU=y
-# CONFIG_SUNXI_SRAM is not set
 CONFIG_SWAP_IO_SPACE=y
 CONFIG_SWCONFIG=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
diff --git a/target/linux/lantiq/image/Makefile 
b/target/linux/lantiq/image/Makefile
index 882fba8..c3cb48a 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -32,8 +32,8 @@ endef
 define PatchKernelLzma
cp $(KDIR)/vmlinux$(2) $(KDIR)/vmlinux$(2)-$(1)
$(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $(KDIR)/$(1).dtb ../dts/$(1).dts
-   $(STAGING_DIR_HOST)/bin/patch-dtb $(KDIR)/vmlinux$(2)-$(1) 
$(KDIR)/$(1).dtb
-   $(call 
CompressLzma,$(KDIR)/vmlinux$(2)-$(1),$(KDIR)/vmlinux$(2)-$(1).lzma)
+   cat $(KDIR)/vmlinux$(2)-$(1) $(KDIR)/$(1).dtb > 
$(KDIR)/vmlinux$(2)-$(1).tmp
+   $(call 
CompressLzma,$(KDIR)/vmlinux$(2)-$(1).tmp,$(KDIR)/vmlinux$(2)-$(1).lzma)
 endef
 
 define MkBrnImage
diff --git 
a/target/linux/lantiq/patches-4.4/0002-MIPS-lantiq-dtb-image-hack.patch 
b/target/linux/lantiq/patches-4.4/0002-MIPS-lantiq-dtb-image-hack.patch
deleted file mode 100644
index 89a498d..000
--- a/target/linux/lantiq/patches-4.4/0002-MIPS-lantiq-dtb-image-hack.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 17348293f7f8103c97c8d2a6b0ef36eae06ec371 Mon Sep 17 00:00:00 2001
-From: John Crispin <blo...@openwrt.org>
-Date: Wed, 13 Mar 2013 09:36:16 +0100
-Subject: [PATCH 02/36] MIPS: lantiq: dtb image hack
-
-Signed-off-by: John Crispin <blo...@openwrt.org>

- arch/mips/lantiq/Makefile |2 --
- arch/mips/lantiq/prom.c   |4 +++-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
 a/arch/mips/lantiq/prom.c
-+++ b/arch/mips/lantiq/prom.c
-@@ -63,6 +63,8 @@ static void __init prom_init_cmdline(voi
-   }
- }
- 
-+extern struct boot_param_header __image_dtb;
-+
- void __init plat_mem_setup(void)
- {
-   ioport_resource.start = IOPORT_RESOURCE_START;
-@@ -76,7 +78,7 @@ void __init plat_mem_setup(void)
-* Load the builtin devicetree. This causes the chosen node to be
-* parsed resulting in our memory appearing
-*/
--  __dt_setup_arch(__dtb_start);
-+  __dt_setup_arch(&__image_dtb);
- }
- 
- void __init device_tree_init(void)
diff --git 
a/target/linux/lantiq/patches-4.4/0036-owrt-generic-dtb-image-hack.patch 
b/target/linux/lantiq/patches-4.4/0036-owrt-generic-dtb-image-hack.patch
deleted file mode 100644
index 7a306b3..000
--- a/target/linux/lantiq/patches-4.4/0036-owrt-generic-dtb-image-hack.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From dba8578e06aedf1e67312ebfc6162e2fadc9448d Mon Sep 17 00:00:00 2001
-From: John Crispin <blo...@openwrt.org>
-Date: Thu, 7 Aug 2014 18:32:12 +0200
-Subject: [PATCH 36/36] owrt: generic dtb image hack
-
-Signed-off-by: J

Re: [OpenWrt-Devel] [PATCH] lantiq: use upstream mechanism to append device tree file

2016-03-19 Thread Hauke Mehrtens
On 03/19/2016 06:08 PM, John Crispin wrote:
> 
> 
> On 19/03/2016 17:27, Hauke Mehrtens wrote:
>> Instead of using our patch-dtb program just place the device tree
>> behind the kernel binary and then let the in kernel mechanism fetch it.
>> This also adds support for having the device tree file in the boot
>> loader.
>>
>> Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
> 
> can you send 0120 and 0121 to ralf aswell please and add my acked-by to
> them please.
> 
>   John

Isn't mips in freeze because of the merge window?

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


[OpenWrt-Devel] [PATCH v3 00/11] Lantiq dsl improvements

2016-03-04 Thread Hauke Mehrtens
This was tested on a TP-Link vr200v connected to a Deutsche
Telekom line. Some testes with a Danube based device would be nice.

changes since v2:
* added some comments to the code

Hauke Mehrtens (11):
  dsl-vrx200-firmware-xdsl: create Lantiq vrx200 firmware patches
  ltq-vdsl-app: load the vrx200 firmware or patch it
  lantiq: do not set default firmware file
  lantiq: add  dsl firmware to default packages
  ltq-vdsl-app: make the dsl_control application stop cleanly
  base-files: change type of adsl and vdsl to dsl only
  ltq-adsl-app: sync annex option between from VDSL package
  ltq-vdsl-app: sync annex option between from ADSL package
  ltq-vdsl-app: make it possible to configure ADSL/VDSL independently
  ltq-vdsl-app: do not set the reserved bit 4 in the xTSE 8
  lantiq: print profile name in dsl lucistat

 package/base-files/files/bin/config_generate   |   2 +-
 .../base-files/files/lib/functions/uci-defaults.sh |   6 +-
 .../lantiq/dsl-vrx200-firmware-xdsl-a/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl-b/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl/Makefile   | 128 +
 .../network/config/ltq-adsl-app/files/dsl_control  |   5 +-
 package/network/config/ltq-vdsl-app/Makefile   |   2 +-
 .../network/config/ltq-vdsl-app/files/dsl_control  | 108 -
 .../linux/lantiq/base-files/etc/board.d/02_network |   2 +-
 .../lantiq/base-files/lib/functions/lantiq_dsl.sh  |   1 +
 target/linux/lantiq/xrx200/profiles/lantiq.mk  |   4 +-
 target/linux/lantiq/xrx200/profiles/tplink.mk  |   6 +-
 12 files changed, 245 insertions(+), 113 deletions(-)
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
 create mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile

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


[OpenWrt-Devel] [PATCH v3 01/11] dsl-vrx200-firmware-xdsl: create Lantiq vrx200 firmware patches

2016-03-04 Thread Hauke Mehrtens
Instead of having two big binaries only add one binary and then a patch
to create the other one when needed at runtime.
This is easier to handle in one Makeifle for both firmware files.

Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
---
 .../lantiq/dsl-vrx200-firmware-xdsl-a/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl-b/Makefile |  47 
 .../lantiq/dsl-vrx200-firmware-xdsl/Makefile   | 128 +
 3 files changed, 128 insertions(+), 94 deletions(-)
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
 delete mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
 create mode 100644 package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile

diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
deleted file mode 100644
index e8dd659..000
--- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-a/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (C) 2015 OpenWrt.org
-# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=dsl_vr9_firmware_xdsl
-PKG_VERSION:=05.07.04.03.00.06_05.07.01.08.00.01_osc
-PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=4c8d9ca68dda88d3cfc0ca0fb946a63e
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/dsl-vrx200-firmware-xdsl-a
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  TITLE:=VRX200 / VR9 CPE xDSL Annex A firmware
-  URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-a/description
-   VRX200 / VR9 CPE VDSL and ADSL Annex A firmware
-endef
-
-define Build/Prepare
-   rm -rf $(PKG_BUILD_DIR)
-   mkdir -p $(PKG_BUILD_DIR)
-   $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_SOURCE)
-endef
-
-define Build/Compile
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-a/install
-   $(INSTALL_DIR) $(1)/lib/firmware/
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE 
$(1)/lib/firmware/xcpe_574306_571801.LICENSE
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_574306_571801.bin 
$(1)/lib/firmware/
-   ln -s xcpe_574306_571801.bin $(1)/lib/firmware/vdsl.bin
-   ln -s xcpe_574306_571801.bin $(1)/lib/firmware/adsl-a.bin
-endef
-
-$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-a))
diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
deleted file mode 100644
index c283da2..000
--- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl-b/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (C) 2015 OpenWrt.org
-# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=dsl_vr9_firmware_xdsl
-PKG_VERSION:=05.07.03.03.00.06_05.07.01.0C.00.02_osc
-PKG_RELEASE:=1
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=af5581836cbe574574590c046fe45bab
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/dsl-vrx200-firmware-xdsl-b
-  SECTION:=firmware
-  CATEGORY:=Firmware
-  TITLE:=VRX200 / VR9 CPE xDSL Annex B firmware
-  URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-b/description
-   VRX200 / VR9 CPE VDSL and ADSL Annex B firmware
-endef
-
-define Build/Prepare
-   rm -rf $(PKG_BUILD_DIR)
-   mkdir -p $(PKG_BUILD_DIR)
-   $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(PKG_SOURCE)
-endef
-
-define Build/Compile
-endef
-
-define Package/dsl-vrx200-firmware-xdsl-b/install
-   $(INSTALL_DIR) $(1)/lib/firmware/
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE 
$(1)/lib/firmware/xcpe_573306_571C02.LICENSE
-   $(INSTALL_DATA) $(PKG_BUILD_DIR)/xcpe_573306_571C02.bin 
$(1)/lib/firmware/
-   ln -s xcpe_573306_571C02.bin $(1)/lib/firmware/vdsl.bin
-   ln -s xcpe_573306_571C02.bin $(1)/lib/firmware/adsl-b.bin
-endef
-
-$(eval $(call BuildPackage,dsl-vrx200-firmware-xdsl-b))
diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile 
b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
new file mode 100644
index 000..ab9a3dc
--- /dev/null
+++ b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
@@ -0,0 +1,128 @@
+# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015 Lantiq Beteiligungs GmbH & Co KG.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dsl_vr9_firmware_xdsl
+PKG_VERSION:=05.07.04.03.00.06_05.07.01.08.00.01_osc
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(P

<    1   2   3   4   5   6   7   8   9   10   >