Re: [LEDE-DEV] LEDE & IPv6

2016-07-08 Thread Baptiste Jonglez
On Thu, Jul 07, 2016 at 08:01:10PM -0700, Craig Miller wrote:
> Dear Devs,
> 
> Congratulations on the fork of OpenWRT. I look forward to the new LEDE
> releases.
> 
> I am writing here because I am not a committer, but would like to
> communicate with the Devs. I am a professional software tester, with
> extensive IPv6 experience. I have been working with IPv6 and OpenWRT
> specifically for the past year, and have found a few things lacking.
> 
> I see in the TODO list, review IPv6 changes. I too would like to see what
> you have on the horizon for IPv6. I _can_ tell you that systemd is _not_
> ready for IPv6, and have raised a few issues with the systemd team.
> 
> Here are some of the investigations I have done with OpenWRT, systemd and
> IPv6.
> http://ipv6-net.blogspot.ca/2016/02/nat-tiness-and-v6brouter.html
> http://ipv6-net.blogspot.ca/2016/03/v6brouter-part-2-v6bridge-firewall.html

Instead of this horrible hack, please have a look at the excellent work
done by the Homenet people from the IETF, in particular HNCP and hnetd.
Some random links:

  https://www.irif.univ-paris-diderot.fr/~jch/software/homenet/howto.html
  https://wiki.openwrt.org/doc/howto/hncp
  https://github.com/sbyx/hnetd/
  https://tools.ietf.org/html/rfc7368.html

> http://ipv6-net.blogspot.ca/2016/04/systemd-oh-you-wanted-to-run-ipv6.html
> 
> Although I am not a c-coder, I have been writing software for the past 30
> years. And would be happy to contribute, especially in the area of IPv6.
> 
> thanks,
> 
> Craig...


signature.asc
Description: PGP signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] Mountd: Add sysupgrade functionality.

2016-07-08 Thread Olivier Hardouin
Hi Philipp,

> Yes, good point. But then we should rewrite/redesign the whole update
> process
> including the sysupgrade binary in my opinion. For example writing a
> small library and a daemon
> which does the updates for us. A daemon which executes a sysupgrade tool
> doesn't
> make more sense for me as the mountd solution.

I'm not sure why a complete re-design of the sysupgrade would be
needed in this particular case.
At the end you only want to trigger the upgrade when a stick is
inserted, and hotplug can do that.
If the following (untested and unfinished) script is stored in
/etc/hotplug.d/mount/99-autoupgrade, it would perform the upgrade.
#/bin/sh
if [ "${ACTION}" == "add" ]; then
if [[ "$(uci get -q autoupgrade.usbdisk.enabled)" == "1" ]]; then
filename="$(uci get -q
mountd.mountd.path)${NAME}/$(uci get -q autoupgrade.usbdisk.filename)"
[[ ! -f "$filename" ]] && exit
uci get -q autoupgrade.usbdisk.delay >/dev/null &&
delay="-d $(uci get -q autoupgrade.usbdisk.delay)"
[[ "$(uci get -q autoupgrade.usbdisk.save_config)" ==
"1" ]] && backup="-c" || backup="-n"
[[ "$(uci get -q autoupgrade.usbdisk.preserve_part)" =
"1" ]] && preserve_partition="-p"
logger -t hotplug " Starting upgrade with
/sbin/sysupgrade $delay $backup $preserve_partition $filename"
/sbin/sysupgrade $delay $backup $preserve_partition $filename
# TODO find a good way to not execute this at every boot ...
fi
fi
The uci config is the same as what you described in your patch (just
replace mountd by autoupgrade).
This is a proof of concept. You may argue about doing the upgrade from
within a hotplug script. I indeed would be cleaner to have a separate
daemon, especially if they are several sources for the upgrade (and
not only the usb).

Olivier

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] LEDE & IPv6

2016-07-08 Thread Baptiste Jonglez
On Fri, Jul 08, 2016 at 10:11:16AM +0200, Baptiste Jonglez wrote:
> On Thu, Jul 07, 2016 at 08:01:10PM -0700, Craig Miller wrote:
> > Dear Devs,
> > 
> > Congratulations on the fork of OpenWRT. I look forward to the new LEDE
> > releases.
> > 
> > I am writing here because I am not a committer, but would like to
> > communicate with the Devs. I am a professional software tester, with
> > extensive IPv6 experience. I have been working with IPv6 and OpenWRT
> > specifically for the past year, and have found a few things lacking.
> > 
> > I see in the TODO list, review IPv6 changes. I too would like to see what
> > you have on the horizon for IPv6. I _can_ tell you that systemd is _not_
> > ready for IPv6, and have raised a few issues with the systemd team.
> > 
> > Here are some of the investigations I have done with OpenWRT, systemd and
> > IPv6.
> > http://ipv6-net.blogspot.ca/2016/02/nat-tiness-and-v6brouter.html
> > http://ipv6-net.blogspot.ca/2016/03/v6brouter-part-2-v6bridge-firewall.html
> 
> Instead of this horrible hack, please have a look at the excellent work
> done by the Homenet people from the IETF, in particular HNCP and hnetd.
> Some random links:
> 
>   https://www.irif.univ-paris-diderot.fr/~jch/software/homenet/howto.html
>   https://wiki.openwrt.org/doc/howto/hncp
>   https://github.com/sbyx/hnetd/
>   https://tools.ietf.org/html/rfc7368.html

Just to be certain that my message was not misinterpreted: this is not
intended as a personal attack or a devaluation of your work on IPv6.
I just think that having separate layer-2 domains for IPv4 and IPv6 is a
terrible idea and is prone to subtle bugs.

> > http://ipv6-net.blogspot.ca/2016/04/systemd-oh-you-wanted-to-run-ipv6.html
> > 
> > Although I am not a c-coder, I have been writing software for the past 30
> > years. And would be happy to contribute, especially in the area of IPv6.
> > 
> > thanks,
> > 
> > Craig...



> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



signature.asc
Description: PGP signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 2/2 v2] kernel: Add upstream fix for module loading

2016-07-08 Thread Alexey Brodkin
Instead of disabling unwinding entirely this upstream patch
just disables generation of async unwind tables.

Once the patch in question lands in stable 4.4 tree this change
essentially must be removed (otherwise patch application will fail).

Signed-off-by: Alexey Brodkin 
---

Changes v1 -> v2:
 * Since this is a true backport from upstream kernel move patch to 0xx-...

 ...ensure-that-.debug_frame-is-generated-vs..patch | 46 ++
 1 file changed, 46 insertions(+)
 create mode 100644 
target/linux/generic/patches-4.4/095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch

diff --git 
a/target/linux/generic/patches-4.4/095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch
 
b/target/linux/generic/patches-4.4/095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch
new file mode 100644
index 000..a1e287c
--- /dev/null
+++ 
b/target/linux/generic/patches-4.4/095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch
@@ -0,0 +1,46 @@
+From 23cd0de28cc7978130b770dd59b18ac143253351 Mon Sep 17 00:00:00 2001
+From: Vineet Gupta 
+Date: Tue, 28 Jun 2016 09:42:25 +0530
+Subject: [PATCH] ARC: unwind: ensure that .debug_frame is generated (vs.
+ .eh_frame)
+
+With recent binutils update to support dwarf CFI pseudo-ops in gas, we
+now get .eh_frame vs. .debug_frame. Although the call frame info is
+exactly the same in both, the CIE differs, which the current kernel
+unwinder can't cope with.
+
+This broke both the kernel unwinder as well as loadable modules (latter
+because of a new unhandled relo R_ARC_32_PCREL from .rela.eh_frame in
+the module loader)
+
+The ideal solution would be to switch unwinder to .eh_frame.
+For now however we can make do by just ensureing .debug_frame is
+generated by removing -fasynchronous-unwind-tables
+
+ .eh_framegenerated with -gdwarf-2 -fasynchronous-unwind-tables
+ .debug_frame generated with -gdwarf-2
+
+Fixes STAR 9001058196
+
+Cc: sta...@vger.kernel.org
+Signed-off-by: Vineet Gupta 
+---
+ arch/arc/Makefile | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/arch/arc/Makefile b/arch/arc/Makefile
+index aeb1902..209d845 100644
+--- a/arch/arc/Makefile
 b/arch/arc/Makefile
+@@ -48,8 +48,6 @@ endif
+ 
+ endif
+ 
+-cflags-$(CONFIG_ARC_DW2_UNWIND)   += -fasynchronous-unwind-tables
+-
+ # By default gcc 4.8 generates dwarf4 which kernel unwinder can't grok
+ ifeq ($(atleast_gcc48),y)
+ cflags-$(CONFIG_ARC_DW2_UNWIND)   += -gdwarf-2
+-- 
+2.5.5
+
-- 
2.5.5


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 0/2 v2] kernel: arc: Better fix for modules loading

2016-07-08 Thread Alexey Brodkin
Current fix in Lede/OpenWRT was done when upstream kernel had no
similar fix. Now when upstream fix is available let's take it.

Changes v1 -> v2:
 * Renamed backported patch to 0xx-

Alexey Brodkin (2):
  Revert "linux: arc: disable kernel unwinding to fix modules loading"
  kernel: Add upstream fix for module loading

 target/linux/arc770/config-4.4 |  3 +-
 target/linux/archs38/config-4.4|  4 +-
 ...ensure-that-.debug_frame-is-generated-vs..patch | 46 ++
 3 files changed, 51 insertions(+), 2 deletions(-)
 create mode 100644 
target/linux/generic/patches-4.4/095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch

-- 
2.5.5


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/2 v2] Revert "linux: arc: disable kernel unwinding to fix modules loading"

2016-07-08 Thread Alexey Brodkin
This reverts commit acd41539d630688e9891003c9b51cace3e113316.

There's a fix in upstream that will at some point land in 4.4 stable as
well so we'll get rid of this hack and with the next commit will apply
upstream fix.

Signed-off-by: Alexey Brodkin 
---

No changes v1 -> v2.

 target/linux/arc770/config-4.4  | 3 ++-
 target/linux/archs38/config-4.4 | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/linux/arc770/config-4.4 b/target/linux/arc770/config-4.4
index d6905d7..87fd7e3 100644
--- a/target/linux/arc770/config-4.4
+++ b/target/linux/arc770/config-4.4
@@ -18,7 +18,7 @@ CONFIG_ARC_CURR_IN_REG=y
 CONFIG_ARC_DBG=y
 # CONFIG_ARC_DBG_TLB_MISS_COUNT is not set
 # CONFIG_ARC_DBG_TLB_PARANOIA is not set
-# CONFIG_ARC_DW2_UNWIND is not set
+CONFIG_ARC_DW2_UNWIND=y
 CONFIG_ARC_EMUL_UNALIGNED=y
 # CONFIG_ARC_FPU_SAVE_RESTORE is not set
 CONFIG_ARC_HAS_DCACHE=y
@@ -78,6 +78,7 @@ CONFIG_HAVE_FUTEX_CMPXCHG=y
 CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_HAVE_MEMBLOCK=y
+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
 CONFIG_HAVE_NET_DSA=y
 CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
diff --git a/target/linux/archs38/config-4.4 b/target/linux/archs38/config-4.4
index c7dc264..9ea33c6 100644
--- a/target/linux/archs38/config-4.4
+++ b/target/linux/archs38/config-4.4
@@ -15,7 +15,7 @@ CONFIG_ARC_CURR_IN_REG=y
 CONFIG_ARC_DBG=y
 # CONFIG_ARC_DBG_TLB_MISS_COUNT is not set
 # CONFIG_ARC_DBG_TLB_PARANOIA is not set
-# CONFIG_ARC_DW2_UNWIND is not set
+CONFIG_ARC_DW2_UNWIND=y
 CONFIG_ARC_HAS_COH_CACHES=y
 CONFIG_ARC_HAS_DCACHE=y
 # CONFIG_ARC_HAS_DCCM is not set
@@ -85,6 +85,7 @@ CONFIG_HAVE_FUTEX_CMPXCHG=y
 CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_LATENCYTOP_SUPPORT=y
 CONFIG_HAVE_MEMBLOCK=y
+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
 CONFIG_HAVE_NET_DSA=y
 CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
@@ -174,6 +175,7 @@ CONFIG_SRCU=y
 CONFIG_STACKTRACE=y
 CONFIG_STMMAC_ETH=y
 CONFIG_STMMAC_PLATFORM=y
+# CONFIG_SUNXI_SRAM is not set
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_UNINLINE_SPIN_UNLOCK=y
 CONFIG_USB_SUPPORT=y
-- 
2.5.5


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] fstools testing help

2016-07-08 Thread Josua Mayer
Hi John,

Am 08.07.2016 um 07:47 schrieb John Crispin:
> 
> On 07/07/2016 21:36, Josua Mayer wrote:
>> Hi John,
>>
>> Could you please point me at where you merged my 2 patches? I want to
>> ensure I am testing the same code that was causing segfaults.
>>
>> br
>> Josua Mayer
>>
> 
> I already dropped them.
: >_<
> 
>   John
> 

Well short story: given following setup:
mmclko0p1: fat32 (zImage, dtb)
mmcblk0p2: ext4 (rootfs)
bootargs root=/dev/mmcblk0p2 ro
no segfaults when running mount_root
no memleaks reported by valgrind

Any ideas what might be going wrong?

>> Am 05.07.2016 um 14:33 schrieb Álvaro Fernández Rojas:
>>> Hi Josua
>>>
>>> Not mounted rw.
>>> Unfortunately I didn't have time to check it thoroughly and I didn't see 
>>> any remarkable messages.
>>>
>>> – Álvaro.
>>>
>>> El 5/7/16 a las 14:31, Josua Mayer escribió:
 Hi Álvaro,

 Am 05.07.2016 um 14:17 schrieb Álvaro Fernández Rojas:
> It fails when trying to boot a Raspberry Pi, and then it segfaults when 
> calling mount_root without any parameters.\
 How do you see it fail when it boots? Messages? / not mounted rw?
>
> – Álvaro
>
> El 5/7/16 a las 14:14, Josua Mayer escribió:
>> Hi John,
>>
>> Am 05.07.2016 um 09:44 schrieb John Crispin:
>>> On 30/06/2016 09:23, Álvaro Fernández Rojas wrote:
 I will try to test it on RPi tonight.

 Regards,
 Álvaro.

 El 30/6/16 a las 9:21, John Crispin escribió:
> Hi,
>
> i have just merged to fstools patches into my staging tree that 
> address
> a double mount issue and add back ext4 support. the ext4 patch
> previously broke rPi and other ext4 targets, but i thini with josua's
> patch applied it should work. i have done some basic testing already 
> my
> end but would like further etst coverage to make sure there are no
> hidden regressions
>
> things that should be tested are
>
> * does ext4 mount work on eMMC
> * does rootfs mount work on rPi
> * does extroot still work with flat mounts
> * does extroot still work with flat overlay mounts
>
> i have only tested the last one so far.
>
>   John
>
>>> Hi Josua,
>>>
>>> after applying your patches, users of flat ext4 are seeing segfaults
>>> when calling mount_root
>> when manually calling mount_root? With which parameters?
>> I will certainly look into it though.
>>> John

>>
>> ___
>> Lede-dev mailing list
>> Lede-dev@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
>>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [RFC 1/2] ar71xx: image: fix making loader kernel for seama

2016-07-08 Thread Yousong Zhou
Signed-off-by: Yousong Zhou 
---
 target/linux/ar71xx/image/generic.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/image/generic.mk 
b/target/linux/ar71xx/image/generic.mk
index b8e70a4..561aefd 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -461,6 +461,7 @@ define Build/seama-sysupgrade
-i $(word 1,$^) \
-m "dev=/dev/mtdblock/1" -m "type=firmware"
( dd if=$(word 1,$^).seama bs=64k conv=sync; dd if=$(word 2,$^) ) >$@
+   rm -f $(word 1,$^).seama
 endef
 
 define Build/seama-initramfs
@@ -472,7 +473,8 @@ endef
 
 define Device/seama
   CONSOLE := ttyS0,115200
-  KERNEL := kernel-bin | loader-kernel-cmdline | lzma
+  LOADER_TYPE := bin
+  KERNEL := kernel-bin | lzma | loader-kernel-cmdline | lzma
   KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama-initramfs
   KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
   IMAGES := sysupgrade.bin factory.bin
-- 
2.6.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [RFC 2/2] ar71xx: image: fix typo in MTDPARTS def for qihoo-c301

2016-07-08 Thread Yousong Zhou
Reported-by: Syrone Wong 
Signed-off-by: Yousong Zhou 
---
 target/linux/ar71xx/image/generic.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/image/generic.mk 
b/target/linux/ar71xx/image/generic.mk
index 561aefd..c258930 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -510,7 +510,7 @@ $(Device/seama)
   DEVICE_PACKAGES :=  kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev kmod-ath10k
   BOARDNAME = QIHOO-C301
   IMAGE_SIZE = 15744k
-  MTDPARTS = 
mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(devdata),64k(devconf),15744k(firmware),64k(warm_start),64k(action_image_config),64k(radiocfg)ro;spi0.1:15360k(upgrade2),1024k(privatedata)
+  MTDPARTS = 
spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(devdata),64k(devconf),15744k(firmware),64k(warm_start),64k(action_image_config),64k(radiocfg)ro;spi0.1:15360k(upgrade2),1024k(privatedata)
   SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
 endef
 
-- 
2.6.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] Target Profile removed from image name?

2016-07-08 Thread Donald Chisholm
Hi all,

I have several hundred nodes running Openwrt CC with batman-adv and
thought I would start testing LEDE.  However, after the build I
noticed you have removed the target profile (i.e. tl-841v11) from the
image file name.  For me this is a huge headache.  I also noticed you
have uncoupled the build option for different hardware versions of
device models.  This is an inconvenience but not a huge problem.

I build and distribute firmware updates for multiple device models.
With Openwrt I build for several different models (and versions) and
use a script that distributes the new firmware based on the firmware
file name matches against a table of appropriate nodes.   Of course
this is not possible if the firmware file names are all the same.  As
it is now, I need to build and rename for each device model and
version.

Can you clarify why this information was removed from the image file
name?  Is it reasonable to put it back or include it in the directory
structure so consecutive builds do not clobber previous images in the
bin directory?

Thanks for reading,
Donald

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH v2] Support Candela-Tech ath10k out-of-tree driver.

2016-07-08 Thread greearb
From: Ben Greear 

This lets one use the CT ath10k driver instead of the built-in
ath10k driver from the upstream kernel (or backports).

This should be a drop-in replacement, as well as enabling
better CT firmware support.

Signed-off-by: Ben Greear 
---
v2:  Compile just ath10k driver, and against backports ath/*.h files.
 Import 3 patches from LEDE to make ath10k behave better for LEDE
 Use proper method to enable debugfs, etc.

 package/firmware/ath10k-firmware/Makefile |  2 +-
 package/kernel/ath-ct/Makefile| 71 +++
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 package/kernel/ath-ct/Makefile

diff --git a/package/firmware/ath10k-firmware/Makefile 
b/package/firmware/ath10k-firmware/Makefile
index 81a5a65..170a6c9 100644
--- a/package/firmware/ath10k-firmware/Makefile
+++ b/package/firmware/ath10k-firmware/Makefile
@@ -28,7 +28,7 @@ define Package/ath10k-firmware-default
   CATEGORY:=Kernel modules
   SUBMENU:=$(WMENU)
   URL:=$(PKG_SOURCE_URL)
-  DEPENDS:=kmod-ath10k
+  DEPENDS:=
 endef
 
 define Package/ath10k-firmware-qca988x
diff --git a/package/kernel/ath-ct/Makefile b/package/kernel/ath-ct/Makefile
new file mode 100644
index 000..736182a
--- /dev/null
+++ b/package/kernel/ath-ct/Makefile
@@ -0,0 +1,71 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ath-ct
+PKG_VERSION:=2016-06-21
+PKG_RELEASE=1
+
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=
+
+PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=0241aa1d2797ef564bf36fa67888e62289d71e8f
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+
+PKG_MAINTAINER:=Ben Greear 
+PKG_BUILD_PARALLEL:=1
+
+STAMP_CONFIGURED_DEPENDS := 
$(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
+
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/ath-ct
+  SUBMENU:=Wireless Drivers
+  TITLE:=ath10k-ct driver optimized for CT ath10k firmware
+  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT @PCI_SUPPORT
+  FILES:=\
+   $(PKG_BUILD_DIR)/ath10k/ath10k_pci.ko \
+   $(PKG_BUILD_DIR)/ath10k/ath10k_core.ko
+  AUTOLOAD:=$(call AutoLoad,50,mac80211 ath ath10k_core ath10k_pci)
+endef
+
+NOSTDINC_FLAGS = \
+   -I$(PKG_BUILD_DIR) \
+   -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
+   -I$(STAGING_DIR)/usr/include/mac80211-backport \
+   -I$(STAGING_DIR)/usr/include/mac80211/uapi \
+   -I$(STAGING_DIR)/usr/include/mac80211 \
+   -include backport/autoconf.h \
+   -include backport/backport.h
+
+ifdef CONFIG_PACKAGE_MAC80211_MESH
+  NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
+endif
+
+CT_MAKEDEFS += CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m CONFIG_ATH10K_AHB=y
+NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
+NOSTDINC_FLAGS += -DSTANDALONE_CT
+
+ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
+  CT_MAKEDEFS += CONFIG_ATH10K_DEBUGFS=y CONFIG_MAC80211_DEBUGFS=y
+  NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS
+  NOSTDINC_FLAGS += -DCONFIG_ATH10K_DEBUGFS -DCONFIG_ATH10K_DEBUG
+endif
+
+define Build/Configure
+   cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+   +$(CT_MAKEDEFS) \
+ $(MAKE) V=s $(PKG_JOBS) -C "$(LINUX_DIR)" \
+   ARCH="$(LINUX_KARCH)" \
+   CROSS_COMPILE="$(TARGET_CROSS)" \
+   SUBDIRS="$(PKG_BUILD_DIR)/ath10k" \
+   NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
+   modules
+endef
+
+$(eval $(call KernelPackage,ath-ct))
-- 
2.4.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH v3] Support Candela-Tech ath10k out-of-tree driver.

2016-07-08 Thread greearb
From: Ben Greear 

This lets one use the CT ath10k driver instead of the built-in
ath10k driver from the upstream kernel (or backports).

This should be a drop-in replacement, as well as enabling
better CT firmware support.

Signed-off-by: Ben Greear 
---
v3:
  Remove 'V=s' from compile option, would cause undue spam.

v2:  Compile just ath10k driver, and against backports ath/*.h files.
 Import 3 patches from LEDE to make ath10k behave better for LEDE
 Use proper method to enable debugfs, etc.

 package/firmware/ath10k-firmware/Makefile |  2 +-
 package/kernel/ath-ct/Makefile| 71 +++
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 package/kernel/ath-ct/Makefile

diff --git a/package/firmware/ath10k-firmware/Makefile 
b/package/firmware/ath10k-firmware/Makefile
index 81a5a65..170a6c9 100644
--- a/package/firmware/ath10k-firmware/Makefile
+++ b/package/firmware/ath10k-firmware/Makefile
@@ -28,7 +28,7 @@ define Package/ath10k-firmware-default
   CATEGORY:=Kernel modules
   SUBMENU:=$(WMENU)
   URL:=$(PKG_SOURCE_URL)
-  DEPENDS:=kmod-ath10k
+  DEPENDS:=
 endef
 
 define Package/ath10k-firmware-qca988x
diff --git a/package/kernel/ath-ct/Makefile b/package/kernel/ath-ct/Makefile
new file mode 100644
index 000..fc65495
--- /dev/null
+++ b/package/kernel/ath-ct/Makefile
@@ -0,0 +1,71 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ath-ct
+PKG_VERSION:=2016-06-21
+PKG_RELEASE=1
+
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=
+
+PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=0241aa1d2797ef564bf36fa67888e62289d71e8f
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+
+PKG_MAINTAINER:=Ben Greear 
+PKG_BUILD_PARALLEL:=1
+
+STAMP_CONFIGURED_DEPENDS := 
$(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
+
+include $(INCLUDE_DIR)/kernel.mk
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/ath-ct
+  SUBMENU:=Wireless Drivers
+  TITLE:=ath10k-ct driver optimized for CT ath10k firmware
+  DEPENDS:=+kmod-mac80211 +kmod-ath +@DRIVER_11N_SUPPORT @PCI_SUPPORT
+  FILES:=\
+   $(PKG_BUILD_DIR)/ath10k/ath10k_pci.ko \
+   $(PKG_BUILD_DIR)/ath10k/ath10k_core.ko
+  AUTOLOAD:=$(call AutoLoad,50,mac80211 ath ath10k_core ath10k_pci)
+endef
+
+NOSTDINC_FLAGS = \
+   -I$(PKG_BUILD_DIR) \
+   -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
+   -I$(STAGING_DIR)/usr/include/mac80211-backport \
+   -I$(STAGING_DIR)/usr/include/mac80211/uapi \
+   -I$(STAGING_DIR)/usr/include/mac80211 \
+   -include backport/autoconf.h \
+   -include backport/backport.h
+
+ifdef CONFIG_PACKAGE_MAC80211_MESH
+  NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
+endif
+
+CT_MAKEDEFS += CONFIG_ATH10K=m CONFIG_ATH10K_PCI=m CONFIG_ATH10K_AHB=y
+NOSTDINC_FLAGS += -DCONFIG_ATH10K_AHB
+NOSTDINC_FLAGS += -DSTANDALONE_CT
+
+ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
+  CT_MAKEDEFS += CONFIG_ATH10K_DEBUGFS=y CONFIG_MAC80211_DEBUGFS=y
+  NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS
+  NOSTDINC_FLAGS += -DCONFIG_ATH10K_DEBUGFS -DCONFIG_ATH10K_DEBUG
+endif
+
+define Build/Configure
+   cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
+endef
+
+define Build/Compile
+   +$(CT_MAKEDEFS) \
+ $(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
+   ARCH="$(LINUX_KARCH)" \
+   CROSS_COMPILE="$(TARGET_CROSS)" \
+   SUBDIRS="$(PKG_BUILD_DIR)/ath10k" \
+   NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
+   modules
+endef
+
+$(eval $(call KernelPackage,ath-ct))
-- 
2.4.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [RFC v2 2/2] ar71xx: image: fix typo in MTDPARTS def for qihoo-c301

2016-07-08 Thread Yousong Zhou
Reported-by: Syrone Wong 
Signed-off-by: Yousong Zhou 
---
 target/linux/ar71xx/image/generic.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/image/generic.mk 
b/target/linux/ar71xx/image/generic.mk
index a341a78..7978ce3 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -510,7 +510,7 @@ $(Device/seama)
   DEVICE_PACKAGES :=  kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev kmod-ath10k
   BOARDNAME = QIHOO-C301
   IMAGE_SIZE = 15744k
-  MTDPARTS = 
mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(devdata),64k(devconf),15744k(firmware),64k(warm_start),64k(action_image_config),64k(radiocfg)ro;spi0.1:15360k(upgrade2),1024k(privatedata)
+  MTDPARTS = 
spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(devdata),64k(devconf),15744k(firmware),64k(warm_start),64k(action_image_config),64k(radiocfg)ro;spi0.1:15360k(upgrade2),1024k(privatedata)
   SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
 endef
 
-- 
2.6.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [RFC v2 1/2] ar71xx: image: fix making loader kernel for seama

2016-07-08 Thread Yousong Zhou
Signed-off-by: Yousong Zhou 
---
v2 <- v1

- Changed "DEVICE_VARS :=" to "DEVICE_VARS +="

 target/linux/ar71xx/image/generic.mk | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/image/generic.mk 
b/target/linux/ar71xx/image/generic.mk
index b8e70a4..a341a78 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -461,6 +461,7 @@ define Build/seama-sysupgrade
-i $(word 1,$^) \
-m "dev=/dev/mtdblock/1" -m "type=firmware"
( dd if=$(word 1,$^).seama bs=64k conv=sync; dd if=$(word 2,$^) ) >$@
+   rm -f $(word 1,$^).seama
 endef
 
 define Build/seama-initramfs
@@ -472,14 +473,15 @@ endef
 
 define Device/seama
   CONSOLE := ttyS0,115200
-  KERNEL := kernel-bin | loader-kernel-cmdline | lzma
+  LOADER_TYPE := bin
+  KERNEL := kernel-bin | lzma | loader-kernel-cmdline | lzma
   KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama-initramfs
   KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
   IMAGES := sysupgrade.bin factory.bin
   IMAGE/sysupgrade.bin := seama-sysupgrade (SEAMA_SIGNATURE) | check-size 
(IMAGE_SIZE)
   IMAGE/factory.bin := seama-factory (SEAMA_SIGNATURE) | check-size 
(IMAGE_SIZE)
   SEAMA_SIGNATURE :=
-  DEVICE_VARS := SEAMA_SIGNATURE
+  DEVICE_VARS += SEAMA_SIGNATURE
 endef
 
 define Device/mynet-n600
-- 
2.6.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev