[LEDE-DEV] [PATCH v2 8/8] apm821xx: add support for the Netgear Centria N900 WNDR4700/WNDR4720

2016-07-13 Thread Christian Lamparter
From: Christian Lamparter 

This patch adds support for Netgear Centria N900 WNDR4700/WNDR4720

hardware highlights:

CPU:AMCC PowerPC APM82181 Rev. E at 1000 MHz (PLB=166, OPB=83, EBC=83 MHz)
Security support, Boot ROM Location NAND wo/ECC 2k page (8 bits)
32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory
Board:  AMCC APM82181 Evaluation Board, PCIE0/SATA1, 1*USB OTG
DRAM:   256 MB (ECC not enabled, 500 Mb/s, 32-bit, CL3)
NAND:   128 MiB (SLC, erase size: 128 KiB, page size: 2048, OOB size: 64)
ETH:Atheros AR8327N Gigabit Switch (4 x LAN, 1 x WAN)
USB:2 x 3.0 (Renesas uPD720202K8-711-BAA-A)
SATA:   1 x SATA-II 3.5" Hard Drive Bay for HDDs (DesignWare SATA).
WLAN1:  Atheros AR9380 5GHz 802.11an 3:3x3
WLAN2:  Atheros AR9581 2.4GHz 802.11bgn 3:3x3
SDCARD: GL827L SD/MMC/MS Flash Card Reader (on internal dwc2 USB 2.0 host)
I2C:GMT G781 (i2c-0 @ 0x4d - lm90 compatible temperature sensor)
TC654(i2c-0 @ 0x1b - Dual PWM fan Speed controller)

WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!

INFO: Since this device only has a NAND chip. I opted for going with
root.squashfs in a UBI volume. There's no squashfs/jffs2 image.

This target produces three images.
  a. netgear factory image
 This image can be used to flash the Netgear WNDR4700 via the
 firmware recovery mechanism and the web admin site.

 The bootloader can be instructed to do a firmware recovery via the
 # fw_recovery
 command. It will start a tftp server and listen on 192.168.1.1
 (the ipaddr variable in u-boot) for incoming, binary tftp clients.
 The firmware recovery mechanism is also started if any of the flash
 content which contains the kernel, device-tree definitions or the
 (fake)rootfs fails to verify or load.

  b. sysupgrade.tar image for sysupgrade
 An sysupgrade will replace the entire current LEDE installation
 with a newer version. This does include the kernel and the ubi rootfs
 partition. The configuration can be carried over automatically as well
 if desired.

 simply copy the sysupgrade.tar to a the WNDR4700 running LEDE and run:

 root@lede:~# sysupgrade sysupgrade.tar

 and let it reboot.

 Note: The devicetree flash area is NOT updated. Until the devicetree
   definition is stable, this can lead to all sorts of hardware
   detection problems! So make sure, if you experience issues: try
   the fw_recovery. If you are unsure whenever this affects you:
   test if you can reproduce your issue with the initramfs method.
   As it will always have up-to-date device-tree definitions.

  c. initramfs image for TFTP (for development and testing)
 To use the initramfs method, follow the following steps:
   1) Move the "lede-apm821xx-netgear-WNDR4700-initramfs-kernel.bin"
  file to to the root directory of your TFTP server.

   2) rename it to wndr4700.bin

   3) On the WNDR4700 - Hit Enter during u-boot and insert:
  # tftp 40 wndr4700.bin; run addtty; bootm 40 -

 This will boot the LEDE image.

 Note: The default tftp server is 192.168.1.7, if you want to change it:
 # setenv serverip 192.168.8.7;

 Note2: The default address for the WNDR4700 is 192.168.1.1:
 # setenv ipaddr 192.168.8.8;

 Note: Connect you tftp server on the last LAN port (not the WAN)

Signed-off-by: Christian Lamparter 
---
 package/firmware/uPD72020x-firmware/Makefile   |  45 ++
 target/linux/apm821xx/Makefile |   2 +-
 .../linux/apm821xx/base-files/etc/board.d/01_leds  |   8 +
 .../apm821xx/base-files/etc/board.d/02_network |   6 +
 target/linux/apm821xx/base-files/etc/diag.sh   |   4 +
 .../etc/hotplug.d/firmware/10-ath9k-eeprom |  89 +++
 target/linux/apm821xx/base-files/lib/apm821xx.sh   |   4 +
 .../apm821xx/base-files/lib/upgrade/platform.sh|   9 +
 target/linux/apm821xx/config-4.4   |   2 +
 target/linux/apm821xx/dts/wndr4700.dts | 762 +
 .../files/arch/powerpc/platforms/44x/wndr4700.c|  96 +++
 target/linux/apm821xx/image/Makefile   |  85 ++-
 target/linux/apm821xx/netgear/config-default   |  45 ++
 target/linux/apm821xx/netgear/target.mk|   8 +
 .../202-add-netgear-wndr4700-support.patch |  32 +
 .../patches-4.4/301-fix-memory-map-wndr4700.patch  |  14 +
 .../702-powerpc_ibm_phy_add_dt_parser.patch| 335 +
 .../800-usb-dwc2-add-wndr4700-otg.patch|  48 ++
 .../801-usb-pci-quirks-add-renesas-fw-loader.patch | 420 
 .../802-usb-xhci-force-msi-renesas-xhci.patch  |  57 ++
 20 files changed, 2069 insertions(+), 2 deletions(-)
 create mode 100644 package/firmware/uPD72020x-firmware/Makefile
 create mode 100644 
target/linux/apm821xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
 create mode 100644 

[LEDE-DEV] [PATCH v2 2/8] apm821xx: add support for the Cisco Meraki MR24

2016-07-13 Thread Christian Lamparter
From: Chris Blake 

This patch adds support for the Cisco Meraki MR24 Access point
to the apm821xx target.

Board:  MR24 - Meraki MR24 Cloud Managed Access Point
CPU:APM82181 SoC 800 MHz (PLB=200 OPB=100 EBC=100)
Flash size: 32MiB
RAM Size:   128MiB
Wireless:   Atheros AR9380 5.0GHz + Atheros AR9380 2.4GHz
Ethernet ports: 1x Gigabit Atheros AR8035

WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!

For flashing instructions, visit:


Signed-off-by: Chris Blake 
---
 target/linux/apm821xx/Makefile |   1 +
 .../linux/apm821xx/base-files/etc/board.d/01_leds  |   8 +
 .../apm821xx/base-files/etc/board.d/02_network |   3 +
 target/linux/apm821xx/base-files/etc/diag.sh   |   4 +
 target/linux/apm821xx/base-files/lib/apm821xx.sh   |   4 +
 .../lib/preinit/05_set_iface_mac_apm821xx  |  14 +
 .../apm821xx/base-files/lib/upgrade/merakinand.sh  |  65 
 .../apm821xx/base-files/lib/upgrade/platform.sh|   9 +
 target/linux/apm821xx/cisco/config-default |  15 +
 target/linux/apm821xx/cisco/target.mk  |  11 +
 target/linux/apm821xx/config-4.4   |   1 +
 target/linux/apm821xx/dts/MR24.dts | 433 +
 target/linux/apm821xx/image/Makefile   |  81 +++-
 .../002-powerpc_ibm_phy_add_ar8035.patch   |  62 +++
 .../200-add-meraki-mr24-ikarem-support.patch   |  31 ++
 tools/firmware-utils/src/mkmerakifw.c  |  10 +
 16 files changed, 742 insertions(+), 10 deletions(-)
 create mode 100644 
target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx
 create mode 100755 target/linux/apm821xx/base-files/lib/upgrade/merakinand.sh
 create mode 100644 target/linux/apm821xx/cisco/config-default
 create mode 100644 target/linux/apm821xx/cisco/target.mk
 create mode 100644 target/linux/apm821xx/dts/MR24.dts
 create mode 100644 
target/linux/apm821xx/patches-4.4/002-powerpc_ibm_phy_add_ar8035.patch
 create mode 100644 
target/linux/apm821xx/patches-4.4/200-add-meraki-mr24-ikarem-support.patch

diff --git a/target/linux/apm821xx/Makefile b/target/linux/apm821xx/Makefile
index ba3b179..809f2f1 100644
--- a/target/linux/apm821xx/Makefile
+++ b/target/linux/apm821xx/Makefile
@@ -11,6 +11,7 @@ CPU_TYPE:=464fp
 FEATURES:=fpu dt gpio
 MAINTAINER:=Chris Blake , \
Christian Lamparter 
+SUBTARGETS:=cisco
 
 KERNEL_PATCHVER:=4.4
 
diff --git a/target/linux/apm821xx/base-files/etc/board.d/01_leds 
b/target/linux/apm821xx/base-files/etc/board.d/01_leds
index eab8b59..d5f4cc9 100755
--- a/target/linux/apm821xx/base-files/etc/board.d/01_leds
+++ b/target/linux/apm821xx/base-files/etc/board.d/01_leds
@@ -8,6 +8,14 @@ board_config_update
 board=$(apm821xx_board_name)
 
 case "$board" in
+mr24)
+   ucidef_set_led_netdev "wan" "WAN" "mr24:green:wan" "eth0"
+   ucidef_set_led_wlan "wlan1" "WLAN1" "mr24:green:wifi1" "phy0assoc"
+   ucidef_set_led_wlan "wlan2" "WLAN2" "mr24:green:wifi2" "phy0assoc"
+   ucidef_set_led_wlan "wlan3" "WLAN3" "mr24:green:wifi3" "phy0assoc"
+   ucidef_set_led_wlan "wlan4" "WLAN4" "mr24:green:wifi4" "phy0tpt"
+   ;;
+
 *)
;;
 esac
diff --git a/target/linux/apm821xx/base-files/etc/board.d/02_network 
b/target/linux/apm821xx/base-files/etc/board.d/02_network
index 7dbabec..4d53b2f 100755
--- a/target/linux/apm821xx/base-files/etc/board.d/02_network
+++ b/target/linux/apm821xx/base-files/etc/board.d/02_network
@@ -9,6 +9,9 @@ board_config_update
 board=$(apm821xx_board_name)
 
 case "$board" in
+mr24)
+   ucidef_set_interface_lan "eth0"
+   ;;
 *)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
diff --git a/target/linux/apm821xx/base-files/etc/diag.sh 
b/target/linux/apm821xx/base-files/etc/diag.sh
index 4d67638..58301f8 100755
--- a/target/linux/apm821xx/base-files/etc/diag.sh
+++ b/target/linux/apm821xx/base-files/etc/diag.sh
@@ -5,6 +5,10 @@
 
 get_status_led() {
case $(apm821xx_board_name) in
+   mr24)
+   status_led="mr24:green:power"
+   ;;
+
*)
;;
esac
diff --git a/target/linux/apm821xx/base-files/lib/apm821xx.sh 
b/target/linux/apm821xx/base-files/lib/apm821xx.sh
index 8f15ced..82f85c5 100755
--- a/target/linux/apm821xx/base-files/lib/apm821xx.sh
+++ b/target/linux/apm821xx/base-files/lib/apm821xx.sh
@@ -10,6 +10,10 @@ apm821xx_board_detect() {
model=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /model/ {print $2}' /proc/cpuinfo)
 
case "$model" in
+   *"Meraki MR24 Access Point")
+   name="mr24"
+   ;;
+
*)
name="unknown"
;;
diff --git 
a/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx 

[LEDE-DEV] [PATCH v2 1/8] apm821xx: add support for the apm821xx device target

2016-07-13 Thread Christian Lamparter
From: Chris Blake 

This adds a new target for PowerPC APM82181 and APM82161
(464-based) boards, as well as adds support for the booke-wdt
watchdog package.

Signed-off-by: Chris Blake 
---
 include/target.mk  |   1 +
 package/kernel/linux/modules/other.mk  |   2 +-
 target/linux/apm821xx/Makefile |  28 ++
 .../linux/apm821xx/base-files/etc/board.d/01_leds  |  17 +
 .../apm821xx/base-files/etc/board.d/02_network |  19 +
 target/linux/apm821xx/base-files/etc/diag.sh   |  33 ++
 target/linux/apm821xx/base-files/etc/inittab   |   4 +
 target/linux/apm821xx/base-files/lib/apm821xx.sh   |  36 ++
 .../lib/preinit/03_preinit_do_apm821xx.sh  |   9 +
 .../lib/preinit/05_set_preinit_iface_apm821xx  |   9 +
 .../apm821xx/base-files/lib/upgrade/platform.sh|  58 +++
 target/linux/apm821xx/config-4.4   | 327 +
 target/linux/apm821xx/image/Makefile   |  22 +
 ...to4xx-integrate-ppc4xx-rng-into-crypto4xx.patch | 507 +
 .../300-fix-atheros-nics-on-apm82181.patch |  51 +++
 .../701-powerpc_ibm_apm82181_phyclk_fix.patch  |  56 +++
 16 files changed, 1178 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/apm821xx/Makefile
 create mode 100755 target/linux/apm821xx/base-files/etc/board.d/01_leds
 create mode 100755 target/linux/apm821xx/base-files/etc/board.d/02_network
 create mode 100755 target/linux/apm821xx/base-files/etc/diag.sh
 create mode 100644 target/linux/apm821xx/base-files/etc/inittab
 create mode 100755 target/linux/apm821xx/base-files/lib/apm821xx.sh
 create mode 100644 
target/linux/apm821xx/base-files/lib/preinit/03_preinit_do_apm821xx.sh
 create mode 100644 
target/linux/apm821xx/base-files/lib/preinit/05_set_preinit_iface_apm821xx
 create mode 100755 target/linux/apm821xx/base-files/lib/upgrade/platform.sh
 create mode 100644 target/linux/apm821xx/config-4.4
 create mode 100644 target/linux/apm821xx/image/Makefile
 create mode 100644 
target/linux/apm821xx/patches-4.4/001-crypto4xx-integrate-ppc4xx-rng-into-crypto4xx.patch
 create mode 100644 
target/linux/apm821xx/patches-4.4/300-fix-atheros-nics-on-apm82181.patch
 create mode 100644 
target/linux/apm821xx/patches-4.4/701-powerpc_ibm_apm82181_phyclk_fix.patch

diff --git a/include/target.mk b/include/target.mk
index b5153ff..7fb298a 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -208,6 +208,7 @@ ifeq ($(DUMP),1)
 CPU_CFLAGS_8540:=-mcpu=8540
 CPU_CFLAGS_405:=-mcpu=405
 CPU_CFLAGS_440:=-mcpu=440
+CPU_CFLAGS_464fp:=-mcpu=464fp
   endif
   ifeq ($(ARCH),sparc)
 CPU_TYPE = sparc
diff --git a/package/kernel/linux/modules/other.mk 
b/package/kernel/linux/modules/other.mk
index a1fce48..ee1ee06 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -517,7 +517,7 @@ $(eval $(call KernelPackage,wdt-orion))
 define KernelPackage/booke-wdt
   SUBMENU:=$(OTHER_MENU)
   TITLE:=PowerPC Book-E Watchdog Timer
-  DEPENDS:=@(TARGET_mpc85xx||TARGET_ppc40x||TARGET_ppc44x)
+  DEPENDS:=@(TARGET_apm821xx||TARGET_mpc85xx||TARGET_ppc40x||TARGET_ppc44x)
   KCONFIG:=CONFIG_BOOKE_WDT
   FILES:=$(LINUX_DIR)/drivers/$(WATCHDOG_DIR)/booke_wdt.ko
   AUTOLOAD:=$(call AutoLoad,50,booke_wdt,1)
diff --git a/target/linux/apm821xx/Makefile b/target/linux/apm821xx/Makefile
new file mode 100644
index 000..ba3b179
--- /dev/null
+++ b/target/linux/apm821xx/Makefile
@@ -0,0 +1,28 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+ARCH:=powerpc
+BOARD:=apm821xx
+BOARDNAME:=AppliedMicro APM821xx
+CPU_TYPE:=464fp
+FEATURES:=fpu dt gpio
+MAINTAINER:=Chris Blake , \
+   Christian Lamparter 
+
+KERNEL_PATCHVER:=4.4
+
+include $(INCLUDE_DIR)/target.mk
+
+KERNELNAME:=uImage
+
+DEFAULT_PACKAGES += \
+   kmod-leds-gpio kmod-booke-wdt kmod-i2c-core kmod-gpio-button-hotplug
+
+define Target/Description
+   Build images for AppliedMicro APM821xx based boards.
+endef
+
+$(eval $(call BuildTarget))
diff --git a/target/linux/apm821xx/base-files/etc/board.d/01_leds 
b/target/linux/apm821xx/base-files/etc/board.d/01_leds
new file mode 100755
index 000..eab8b59
--- /dev/null
+++ b/target/linux/apm821xx/base-files/etc/board.d/01_leds
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+. /lib/functions/uci-defaults.sh
+. /lib/apm821xx.sh
+
+board_config_update
+
+board=$(apm821xx_board_name)
+
+case "$board" in
+*)
+   ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/apm821xx/base-files/etc/board.d/02_network 
b/target/linux/apm821xx/base-files/etc/board.d/02_network
new file mode 100755
index 000..7dbabec
--- /dev/null
+++ b/target/linux/apm821xx/base-files/etc/board.d/02_network
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+. /lib/functions/system.sh
+. 

[LEDE-DEV] [PATCH v2 3/8] apm821xx: dw_dmac: backport fixes and cleanups from 4.7

2016-07-13 Thread Christian Lamparter
This patch fixes the dw_dmac dma engine which is used
by the SATA controllers in the MyBook Live Series and WNDR4700.

The code was backported from the upstream kernel.
It can be dropped completely on 4.7+.

Signed-off-by: Christian Lamparter 
---
 ...dd-transfer-termination-synchronization-s.patch |  143 ++
 ...ore-Introduce-new-universal-API-to-reques.patch |  345 +
 ...dd-transfer-termination-synchronization-s.patch |  293 
 .../patches-4.4/015-dmaengine-dw-fixed.patch   | 1522 
 4 files changed, 2303 insertions(+)
 create mode 100644 
target/linux/apm821xx/patches-4.4/010-dmaengine-Add-transfer-termination-synchronization-s.patch
 create mode 100644 
target/linux/apm821xx/patches-4.4/011-dmaengine-core-Introduce-new-universal-API-to-reques.patch
 create mode 100644 
target/linux/apm821xx/patches-4.4/012-dmaengine-Add-transfer-termination-synchronization-s.patch
 create mode 100644 
target/linux/apm821xx/patches-4.4/015-dmaengine-dw-fixed.patch

diff --git 
a/target/linux/apm821xx/patches-4.4/010-dmaengine-Add-transfer-termination-synchronization-s.patch
 
b/target/linux/apm821xx/patches-4.4/010-dmaengine-Add-transfer-termination-synchronization-s.patch
new file mode 100644
index 000..924f797
--- /dev/null
+++ 
b/target/linux/apm821xx/patches-4.4/010-dmaengine-Add-transfer-termination-synchronization-s.patch
@@ -0,0 +1,143 @@
+From 7bd903c5ca47fde5ad52370a47776491813c772e Mon Sep 17 00:00:00 2001
+From: Peter Ujfalusi 
+Date: Mon, 14 Dec 2015 22:47:39 +0200
+Subject: [PATCH 1/3] dmaengine: core: Move and merge the code paths using
+ private_candidate
+
+Channel matching with private_candidate() is used in two paths, the error
+checking is slightly different in them and they are duplicating code also.
+Move the code under find_candidate() to provide consistent execution and
+going to allow us to reuse this mode of channel lookup later.
+
+Signed-off-by: Peter Ujfalusi 
+Reviewed-by: Andy Shevchenko 
+Reviewed-by: Arnd Bergmann 
+Signed-off-by: Vinod Koul 
+---
+ drivers/dma/dmaengine.c | 81 +
+ 1 file changed, 42 insertions(+), 39 deletions(-)
+
+diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
+index f2cbff9..81a36fc 100644
+--- a/drivers/dma/dmaengine.c
 b/drivers/dma/dmaengine.c
+@@ -542,6 +542,42 @@ static struct dma_chan *private_candidate(const 
dma_cap_mask_t *mask,
+   return NULL;
+ }
+ 
++static struct dma_chan *find_candidate(struct dma_device *device,
++ const dma_cap_mask_t *mask,
++ dma_filter_fn fn, void *fn_param)
++{
++  struct dma_chan *chan = private_candidate(mask, device, fn, fn_param);
++  int err;
++
++  if (chan) {
++  /* Found a suitable channel, try to grab, prep, and return it.
++   * We first set DMA_PRIVATE to disable balance_ref_count as this
++   * channel will not be published in the general-purpose
++   * allocator
++   */
++  dma_cap_set(DMA_PRIVATE, device->cap_mask);
++  device->privatecnt++;
++  err = dma_chan_get(chan);
++
++  if (err) {
++  if (err == -ENODEV) {
++  pr_debug("%s: %s module removed\n", __func__,
++   dma_chan_name(chan));
++  list_del_rcu(>global_node);
++  } else
++  pr_debug("%s: failed to get %s: (%d)\n",
++   __func__, dma_chan_name(chan), err);
++
++  if (--device->privatecnt == 0)
++  dma_cap_clear(DMA_PRIVATE, device->cap_mask);
++
++  chan = ERR_PTR(err);
++  }
++  }
++
++  return chan ? chan : ERR_PTR(-EPROBE_DEFER);
++}
++
+ /**
+  * dma_get_slave_channel - try to get specific channel exclusively
+  * @chan: target channel
+@@ -580,7 +616,6 @@ struct dma_chan *dma_get_any_slave_channel(struct 
dma_device *device)
+ {
+   dma_cap_mask_t mask;
+   struct dma_chan *chan;
+-  int err;
+ 
+   dma_cap_zero(mask);
+   dma_cap_set(DMA_SLAVE, mask);
+@@ -588,23 +623,11 @@ struct dma_chan *dma_get_any_slave_channel(struct 
dma_device *device)
+   /* lock against __dma_request_channel */
+   mutex_lock(_list_mutex);
+ 
+-  chan = private_candidate(, device, NULL, NULL);
+-  if (chan) {
+-  dma_cap_set(DMA_PRIVATE, device->cap_mask);
+-  device->privatecnt++;
+-  err = dma_chan_get(chan);
+-  if (err) {
+-  pr_debug("%s: failed to get %s: (%d)\n",
+-  __func__, dma_chan_name(chan), err);
+-  chan = NULL;

[LEDE-DEV] [PATCH v2 4/8] apm821xx: sata_dwc_460ex: backport fixes and cleanups from 4.7

2016-07-13 Thread Christian Lamparter
This patch fixes the sata_dwc_460ex SATA driver which is used
by the SATA controllers in the MyBook Live Series and WNDR4700.

The code was backported from the upstream kernel.
It can be dropped completely on 4.7+.

Signed-off-by: Christian Lamparter 
---
 .../linux/apm821xx/patches-4.4/020-sata-dwc.patch  | 1088 
 1 file changed, 1088 insertions(+)
 create mode 100644 target/linux/apm821xx/patches-4.4/020-sata-dwc.patch

diff --git a/target/linux/apm821xx/patches-4.4/020-sata-dwc.patch 
b/target/linux/apm821xx/patches-4.4/020-sata-dwc.patch
new file mode 100644
index 000..772c0dc
--- /dev/null
+++ b/target/linux/apm821xx/patches-4.4/020-sata-dwc.patch
@@ -0,0 +1,1088 @@
+From: Andy Shevchenko 
+Date: Sat, 21 May 2016 22:46:32 +0200
+Subject:  [PATCH v2 00/23] ata: sata_dwc_460ex: make it working again
+
+The last approach in the commit 8b3444852a2b ("sata_dwc_460ex: move to generic
+DMA driver") to switch to generic DMA engine API wasn't tested on bare metal.
+Besides that we expecting new board support coming with the same SATA IP but
+with different DMA.
+
+This series is targetting the following things:
+- a few bug fixes to the original driver
+- a part to fix the DMA engine usage and in particularly dw_dmac driver
+- move driver to use generic PHY and "dmas" property which leads to update in 
DTS
+
+The driver has been tested myself on Sam460ex and WD MyBookLive (apollo3g)
+boards. In any case I ask Christian, Måns, and Julian to independently test and
+provide Tested-by tag or an error report.
+
+Series depends on previously published but not yet fully applied series [1].
+
+The patches are also available via public branch [2].
+
+[1] http://www.spinics.net/lists/dmaengine/msg09250.html
+[2] https://bitbucket.org/andy-shev/linux/branch/topic%2Fdw%2Fsata
+
+Since v1:
+- simplify patch 8 (David Laight)
+- add Tested-by and Acked-by tags
+
+Andy Shevchenko (11):
+  ata: sata_dwc_460ex: set dma_boundary to 0x1fff
+  ata: sata_dwc_460ex: burst size must be in items not bytes
+  ata: sata_dwc_460ex: DMA is always a flow controller
+  ata: sata_dwc_460ex: select only core part of DMA driver
+  ata: sata_dwc_460ex: don't call ata_sff_qc_issue() on DMA commands
+  ata: sata_dwc_460ex: correct HOSTDEV{P}_FROM_*() macros
+  ata: sata_dwc_460ex: supply physical address of FIFO to DMA
+  ata: sata_dwc_460ex: switch to new dmaengine_terminate_* API
+  ata: sata_dwc_460ex: use devm_ioremap
+  ata: sata_dwc_460ex: make debug messages neat
+  powerpc/4xx: Device tree update for the 460ex DWC SATA
+
+Christian Lamparter (1):
+  ata: sata_dwc_460ex: fix crash on offline links without an attached
+drive
+
+Mans Rullgard (11):
+  ata: sata_dwc_460ex: remove incorrect locking
+  ata: sata_dwc_460ex: skip dma setup for non-dma commands
+  ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
+  ata: sata_dwc_460ex: add phy support
+  ata: sata_dwc_460ex: get rid of global data
+  ata: sata_dwc_460ex: remove empty libata callback
+  ata: sata_dwc_460ex: get rid of some pointless casts
+  ata: sata_dwc_460ex: get rid of incorrect cast
+  ata: sata_dwc_460ex: add __iomem to register base pointer
+  ata: sata_dwc_460ex: use readl/writel_relaxed()
+  ata: sata_dwc_460ex: tidy up sata_dwc_clear_dmacr()
+
+ arch/powerpc/boot/dts/canyonlands.dts |  15 +-
+ drivers/ata/Kconfig   |  12 +-
+ drivers/ata/sata_dwc_460ex.c  | 552 +-
+ 3 files changed, 305 insertions(+), 274 deletions(-)
+
+---
+ drivers/ata/sata_dwc_460ex.c | 552 ++-
+ 1 file changed, 283 insertions(+), 269 deletions(-)
+
+diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
+index 9020349..00c2af1 100644
+--- a/drivers/ata/sata_dwc_460ex.c
 b/drivers/ata/sata_dwc_460ex.c
+@@ -30,10 +30,12 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ 
+@@ -42,10 +44,6 @@
+ #include 
+ #include 
+ 
+-/* Supported DMA engine drivers */
+-#include 
+-#include 
+-
+ /* These two are defined in "libata.h" */
+ #undefDRV_NAME
+ #undefDRV_VERSION
+@@ -53,19 +51,14 @@
+ #define DRV_NAME"sata-dwc"
+ #define DRV_VERSION "1.3"
+ 
+-#ifndef out_le32
+-#define out_le32(a, v)__raw_writel(__cpu_to_le32(v), (void __iomem 
*)(a))
+-#endif
+-
+-#ifndef in_le32
+-#define in_le32(a)__le32_to_cpu(__raw_readl((void __iomem *)(a)))
+-#endif
++#define sata_dwc_writel(a, v) writel_relaxed(v, a)
++#define sata_dwc_readl(a) readl_relaxed(a)
+ 
+ #ifndef NO_IRQ
+ #define NO_IRQ0
+ #endif
+ 
+-#define AHB_DMA_BRST_DFLT 64  /* 16 data items burst length*/
++#define AHB_DMA_BRST_DFLT 64  /* 16 data items burst length */
+ 
+ enum {
+   SATA_DWC_MAX_PORTS = 1,
+@@ -102,7 +95,7 @@ struct sata_dwc_regs {
+   u32 versionr;   /* 

[LEDE-DEV] [PATCH v2 5/8] apm821xx: add support for the Western Digital MyBook Live Series

2016-07-13 Thread Christian Lamparter
From: Christian Lamparter 

Hardware Highlights:

This patch adds support for Western Digital MyBook Live Series:
CPU: AMCC PowerPC  UNKNOWN (PVR=12c41c83) at 800 MHz (PLB=200, OPB=100, EBC=100 
MHz)
 32 kB I-Cache 32 kB D-Cache, 256 kB L2-Cache, 32 kB OnChip Memory
Board: Apollo-3G - APM82181 Board, 1*SATA
DRAM:  256 MB (2x NT5TU64M16GG-AC)
FLASH: 512 kB (SST 39VF040)
Ethernet: 1xRGMII - 1 Gbit - Broadcom PHY BCM54610

WARNING: The serial port needs a TTL/RS-232 v3.3 level converter!

The MyBook Live Duo additionally features a 1x USB 2.0 host port
and can support a second hard-drive.

This target produces two images for a target.
 1. ext4 image
The extracted/raw image can be directly installed on
the internal HDD via "dd if=img.ext4 of=/dev/sdX".

This can either be done in place with the stock MyBook Live
firmware via ssh. Or by removing the HDD and writing the image
with a different PC.

The the compressed images are useful for sysupgrade.

 2. recovery.tar image for TFTP and Serial.

extract the recovery.tar to a TFTP server directory.

On the MyBook Live (Duo) serial port - Hit Enter during u-boot and insert:
# setenv serverip 192.168.1.254; setenv ipaddr 192.168.1.1; run net_self

Where 192.168.1.254 is your TFTP server.

Signed-off-by: Christian Lamparter 
---
 target/linux/apm821xx/Makefile |   2 +-
 .../linux/apm821xx/base-files/etc/board.d/01_leds  |   3 +
 .../apm821xx/base-files/etc/board.d/02_network |   1 +
 target/linux/apm821xx/base-files/etc/diag.sh   |   4 +
 target/linux/apm821xx/base-files/lib/apm821xx.sh   |   4 +
 .../apm821xx/base-files/lib/preinit/79_move_config |  13 +
 .../apm821xx/base-files/lib/upgrade/platform.sh|  13 +
 .../apm821xx/base-files/lib/upgrade/wdbook.sh  |  36 ++
 target/linux/apm821xx/config-4.4   |   1 +
 target/linux/apm821xx/dts/apollo3g-duo.dts |  18 +
 target/linux/apm821xx/dts/apollo3g.dts |  34 ++
 target/linux/apm821xx/dts/apollo3g.dtsi| 489 +
 target/linux/apm821xx/image/Makefile   |  83 +++-
 target/linux/apm821xx/image/mbl_boot.scr   |   6 +
 target/linux/apm821xx/image/mbl_gen_hdd_img.sh |  27 ++
 .../linux/apm821xx/image/mbl_gen_recovery_tar.sh   |  92 
 target/linux/apm821xx/mbl/config-default   |  44 ++
 target/linux/apm821xx/mbl/target.mk|  11 +
 .../patches-4.4/030-usb-dwc2-endian-fix.patch  |  95 
 .../201-add-amcc-apollo3g-support.patch|  30 ++
 20 files changed, 1004 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/apm821xx/base-files/lib/preinit/79_move_config
 create mode 100644 target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh
 create mode 100644 target/linux/apm821xx/dts/apollo3g-duo.dts
 create mode 100644 target/linux/apm821xx/dts/apollo3g.dts
 create mode 100644 target/linux/apm821xx/dts/apollo3g.dtsi
 create mode 100644 target/linux/apm821xx/image/mbl_boot.scr
 create mode 100755 target/linux/apm821xx/image/mbl_gen_hdd_img.sh
 create mode 100644 target/linux/apm821xx/image/mbl_gen_recovery_tar.sh
 create mode 100644 target/linux/apm821xx/mbl/config-default
 create mode 100644 target/linux/apm821xx/mbl/target.mk
 create mode 100644 
target/linux/apm821xx/patches-4.4/030-usb-dwc2-endian-fix.patch
 create mode 100644 
target/linux/apm821xx/patches-4.4/201-add-amcc-apollo3g-support.patch

diff --git a/target/linux/apm821xx/Makefile b/target/linux/apm821xx/Makefile
index 809f2f1..a8ec93f 100644
--- a/target/linux/apm821xx/Makefile
+++ b/target/linux/apm821xx/Makefile
@@ -11,7 +11,7 @@ CPU_TYPE:=464fp
 FEATURES:=fpu dt gpio
 MAINTAINER:=Chris Blake , \
Christian Lamparter 
-SUBTARGETS:=cisco
+SUBTARGETS:=cisco mbl
 
 KERNEL_PATCHVER:=4.4
 
diff --git a/target/linux/apm821xx/base-files/etc/board.d/01_leds 
b/target/linux/apm821xx/base-files/etc/board.d/01_leds
index d5f4cc9..bcc7a9f 100755
--- a/target/linux/apm821xx/base-files/etc/board.d/01_leds
+++ b/target/linux/apm821xx/base-files/etc/board.d/01_leds
@@ -16,6 +16,9 @@ mr24)
ucidef_set_led_wlan "wlan4" "WLAN4" "mr24:green:wifi4" "phy0tpt"
;;
 
+mbl)
+   ;;
+
 *)
;;
 esac
diff --git a/target/linux/apm821xx/base-files/etc/board.d/02_network 
b/target/linux/apm821xx/base-files/etc/board.d/02_network
index 4d53b2f..9525d8c 100755
--- a/target/linux/apm821xx/base-files/etc/board.d/02_network
+++ b/target/linux/apm821xx/base-files/etc/board.d/02_network
@@ -9,6 +9,7 @@ board_config_update
 board=$(apm821xx_board_name)
 
 case "$board" in
+mbl | \
 mr24)
ucidef_set_interface_lan "eth0"
;;
diff --git a/target/linux/apm821xx/base-files/etc/diag.sh 
b/target/linux/apm821xx/base-files/etc/diag.sh
index 58301f8..bea66eb 100755
--- a/target/linux/apm821xx/base-files/etc/diag.sh
+++ 

[LEDE-DEV] [PATCH v2 7/8] apm821xx: lm90 add thermal sensor interface support for device tree

2016-07-13 Thread Christian Lamparter
>From 912-hwmon-lm90-expose-to-thermal-fw-via-DT.patch:
"This patch adds to lm90 temperature sensor the possibility
to expose itself as thermal zone device, registered on the
thermal framework.

The thermal zone is built only if a device tree node
describing a thermal zone for this sensor is present
inside the lm90 DT node. Otherwise, the driver behavior
will be the same."

Signed-off-by: Christian Lamparter 
---
 ...0-split-set-and-show-temp-as-common-codes.patch | 302 +
 ...12-hwmon-lm90-expose-to-thermal-fw-via-DT.patch | 151 +++
 2 files changed, 453 insertions(+)
 create mode 100644 
target/linux/apm821xx/patches-4.4/911-hwmon-lm90-split-set-and-show-temp-as-common-codes.patch
 create mode 100644 
target/linux/apm821xx/patches-4.4/912-hwmon-lm90-expose-to-thermal-fw-via-DT.patch

diff --git 
a/target/linux/apm821xx/patches-4.4/911-hwmon-lm90-split-set-and-show-temp-as-common-codes.patch
 
b/target/linux/apm821xx/patches-4.4/911-hwmon-lm90-split-set-and-show-temp-as-common-codes.patch
new file mode 100644
index 000..a2e38c5
--- /dev/null
+++ 
b/target/linux/apm821xx/patches-4.4/911-hwmon-lm90-split-set-and-show-temp-as-common-codes.patch
@@ -0,0 +1,302 @@
+From: Wei Ni 
+Subject: hwmon: lm90: split set and show temp as common codes
+
+Split set and show temp codes as common functions, so we can use
+it directly when implement linux thermal framework.
+And handle error return value for the lm90_select_remote_channel
+and write_tempx, then set_temp8 and set_temp11 could return it
+to user-space.
+
+Discussed in:
+http://www.spinics.net/lists/linux-tegra/msg14020.html .
+Applied with Jean.
+
+BUG=chrome-os-partner:30834
+TEST=None
+
+Signed-off-by: Wei Ni 
+Signed-off-by: Jean Delvare 
+Reviewed-on: https://chromium-review.googlesource.com/175114
+Tested-by: Wei Ni 
+Commit-Queue: Dylan Reid 
+Reviewed-by: Dylan Reid 
+(cherry picked from commit 614a96decdc7a3784128c9f21c5471367e2c627d)
+Change-Id: Idbe3948812c6737cba94810cd147c29cc527c3cf
+Reviewed-on: https://chromium-review.googlesource.com/212413
+Reviewed-by: Olof Johansson 
+Commit-Queue: Olof Johansson 
+---
+diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
+index c9ff08d..fb9e224 100644
+--- a/drivers/hwmon/lm90.c
 b/drivers/hwmon/lm90.c
+@@ -473,20 +473,29 @@
+  * various registers have different meanings as a result of selecting a
+  * non-default remote channel.
+  */
+-static inline void lm90_select_remote_channel(struct i2c_client *client,
+-struct lm90_data *data,
+-int channel)
++static inline int lm90_select_remote_channel(struct i2c_client *client,
++   struct lm90_data *data,
++   int channel)
+ {
+   u8 config;
++  int err;
+ 
+   if (data->kind == max6696) {
+   lm90_read_reg(client, LM90_REG_R_CONFIG1, );
+   config &= ~0x08;
+   if (channel)
+   config |= 0x08;
+-  i2c_smbus_write_byte_data(client, LM90_REG_W_CONFIG1,
+-config);
++  err = i2c_smbus_write_byte_data(client, LM90_REG_W_CONFIG1,
++  config);
++  if (err < 0) {
++  dev_err(>dev,
++  "Failed to select remote channel %d, err %d\n",
++  channel, err);
++  return err;
++  }
+   }
++
++  return 0;
+ }
+ 
+ /*
+@@ -759,29 +768,34 @@
+  * Sysfs stuff
+  */
+ 
+-static ssize_t show_temp8(struct device *dev, struct device_attribute 
*devattr,
+-char *buf)
++static int read_temp8(struct device *dev, int index)
+ {
+-  struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+   struct lm90_data *data = lm90_update_device(dev);
+   int temp;
+ 
+   if (data->kind == adt7461 || data->kind == tmp451)
+-  temp = temp_from_u8_adt7461(data, data->temp8[attr->index]);
++  temp = temp_from_u8_adt7461(data, data->temp8[index]);
+   else if (data->kind == max6646)
+-  temp = temp_from_u8(data->temp8[attr->index]);
++  temp = temp_from_u8(data->temp8[index]);
+   else
+-  temp = temp_from_s8(data->temp8[attr->index]);
++  temp = temp_from_s8(data->temp8[index]);
+ 
+   /* +16 degrees offset for temp2 for the LM99 */
+-  if (data->kind == lm99 && attr->index == 3)
++  if (data->kind == lm99 && index == 3)
+   temp += 16000;
+ 
+-  return sprintf(buf, "%d\n", temp);
++  return temp;
+ }
+ 
+-static ssize_t set_temp8(struct device *dev, struct 

Re: [LEDE-DEV] [PATCH 2/3] musl: update musl to version 1.1.15

2016-07-13 Thread Hauke Mehrtens
On 07/13/2016 03:44 PM, Hauke Mehrtens wrote:
> The removed patch is already integrated in upstream musl.
> 
> Signed-off-by: Hauke Mehrtens 
> ---
>  toolchain/musl/Config.version  |2 +-
>  toolchain/musl/common.mk   |2 +-
>  .../patches/001-update-to-git-2016-03-06.patch | 3736 
> 
>  .../musl/patches/200-add_libssp_nonshared.patch|4 +-
>  toolchain/musl/patches/300-relative.patch  |2 +-
>  5 files changed, 5 insertions(+), 3741 deletions(-)
>  delete mode 100644 toolchain/musl/patches/001-update-to-git-2016-03-06.patch
> 

the musl update causes problems with the shell in busybox. When I tab
completion for example it does not update complete the line which I am
typing:

root@lede:/# unam   -a
root@lede:/# uname -a
Linux lede 4.4.15 #2 Wed Jul 13 16:05:05 UTC 2016 mips GNU/Linux
root@lede:/#

Hauke

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


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

2016-07-13 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 
---
v4:  Various fixes suggested by nbd.

 package/firmware/ath10k-firmware/Makefile |  2 +-
 package/kernel/ath10k-ct/Makefile | 80 +++
 2 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100644 package/kernel/ath10k-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/ath10k-ct/Makefile 
b/package/kernel/ath10k-ct/Makefile
new file mode 100644
index 000..adda03c
--- /dev/null
+++ b/package/kernel/ath10k-ct/Makefile
@@ -0,0 +1,80 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ath10k-ct
+PKG_VERSION:=2016-07-09
+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/ath10k-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
+# No AHB support enabled yet.  Could conditionally enable it later.
+#CT_MAKEDEFS += 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
+endif
+
+ifdef CONFIG_PACKAGE_ATH_DEBUG
+  NOSTDINC_FLAGS += -DCONFIG_ATH10K_DEBUG
+endif
+
+define Build/Configure
+   cp $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)
+endef
+
+ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
+  CT_MAKEDEFS += V=1
+endif
+
+define Build/Compile
+   +$(MAKE) $(CT_MAKEDEFS) $(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,ath10k-ct))
-- 
2.4.3


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


[LEDE-DEV] [PATCH][ubox] kmodloader: fix lsmod depends output

2016-07-13 Thread Hauke Mehrtens
Without this patch only the first dependency is shown, with this patch
all module dependencies are show.

Signed-off-by: Hauke Mehrtens 
---
 kmodloader.c | 19 +++
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/kmodloader.c b/kmodloader.c
index ad1f1c0..e32e6af 100644
--- a/kmodloader.c
+++ b/kmodloader.c
@@ -658,15 +658,26 @@ static int main_rmmod(int argc, char **argv)
 static int main_lsmod(int argc, char **argv)
 {
struct module *m;
+   char *dep;
 
if (scan_loaded_modules())
return -1;
 
avl_for_each_element(, m, avl)
-   if (m->state == LOADED)
-   printf("%-20s%8d%3d %s\n",
-   m->name, m->size, m->usage,
-   (*m->depends == '-') ? ("") : (m->depends));
+   if (m->state == LOADED) {
+   printf("%-20s%8d%3d ",
+   m->name, m->size, m->usage);
+   if (m->depends && strcmp(m->depends, "-") && 
strcmp(m->depends, "")) {
+   dep = m->depends;
+   while (*dep) {
+   printf("%s", dep);
+   dep = dep + strlen(dep) + 1;
+   if (*dep)
+   printf(",");
+   }
+   }
+   printf("\n");
+   }
 
free_modules();
 
-- 
2.8.1


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


[LEDE-DEV] [RFC 6/8] uclibc++: fix gcc 6 build

2016-07-13 Thread Syrone Wong
C++14 added sized deallocation, while uclibc++ deleted all files
(extracted from libsupc++.a via "ar x") named "del_op*.o"
in abi/libsupc, so I wrote two wrapper files and let them call
free(ptr) and ignored the size parameter.

GCC upstream URL: 
https://github.com/gcc-mirror/gcc/commit/d1856d2c87b844afb0e31f7aa9502745b3446189

Signed-off-by: Syrone Wong 
---

According to https://gcc.gnu.org/gcc-6/changes.html,
default C++ mode changed to -std=gnu++14 instead of -std=gnu++98, I added the 
previous
mode to presist compiler behaviour.

I think the program in OpenWrt/LEDE codebase linked to libuClibc++ will not use 
C++14 features.
This is the best workaround I can come up with.

 package/libs/uclibc++/Makefile  |  4 +++
 package/libs/uclibc++/files/040-fix-gcc-6.patch | 34 +
 2 files changed, 38 insertions(+)
 create mode 100644 package/libs/uclibc++/files/040-fix-gcc-6.patch

diff --git a/package/libs/uclibc++/Makefile b/package/libs/uclibc++/Makefile
index 4c7c767..cf083a5 100644
--- a/package/libs/uclibc++/Makefile
+++ b/package/libs/uclibc++/Makefile
@@ -71,6 +71,10 @@ define Build/Prepare
$(PKG_UNPACK)
$(SED) 's/\r//' $(PKG_BUILD_DIR)/include/unwind-cxx.h
$(Build/Patch)
+   $(if $(CONFIG_GCC_VERSION_6),\
+   ( cp ./files/040-fix-gcc-6.patch $(PKG_BUILD_DIR)/;\
+   cd $(PKG_BUILD_DIR);\
+   patch -p1 < ./040-fix-gcc-6.patch;))
 endef
 
 define Build/Configure
diff --git a/package/libs/uclibc++/files/040-fix-gcc-6.patch 
b/package/libs/uclibc++/files/040-fix-gcc-6.patch
new file mode 100644
index 000..3023f38
--- /dev/null
+++ b/package/libs/uclibc++/files/040-fix-gcc-6.patch
@@ -0,0 +1,34 @@
+--- a/bin/Makefile
 b/bin/Makefile
+@@ -43,7 +43,7 @@ endif
+   echo 'fi' >> $@
+   echo '' >> $@
+ ifeq ($(DODEBUG),y)
+-  echo 'echo $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) 
$$WRAPPER_INCLUDEDIR $$WRAPPER_OPTIONS' >> $@
++  echo 'echo $(CXX) -std=gnu++98 $(GEN_CFLAGS) $(GEN_CXXFLAGS) 
$(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$WRAPPER_OPTIONS' >> $@
+ endif
+-  echo 'exec $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) 
$$WRAPPER_INCLUDEDIR $$WRAPPER_OPTIONS' >> $@
++  echo 'exec $(CXX) -std=gnu++98 $(GEN_CFLAGS) $(GEN_CXXFLAGS) 
$(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$WRAPPER_OPTIONS' >> $@
+   chmod 755 $@
+--- /dev/null
 b/src/del_ops.cpp
+@@ -0,0 +1,8 @@
++#include 
++#include 
++#include 
++
++_UCXXEXPORT void operator delete(void* ptr, size_t size) throw(){
++  free(ptr);
++}
++
+--- /dev/null
 b/src/del_opvs.cpp
+@@ -0,0 +1,8 @@
++#include 
++#include 
++#include 
++
++_UCXXEXPORT void operator delete[](void * ptr, size_t size) throw(){
++  free(ptr);
++}
++
-- 
2.9.0


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


[LEDE-DEV] [RFC 3/8] toolchain/musl: update to 1.1.15

2016-07-13 Thread Syrone Wong
Signed-off-by: Syrone Wong 
---
 toolchain/musl/Config.version  |2 +-
 toolchain/musl/common.mk   |2 +-
 .../patches/001-update-to-git-2016-03-06.patch | 3736 
 3 files changed, 2 insertions(+), 3738 deletions(-)
 delete mode 100644 toolchain/musl/patches/001-update-to-git-2016-03-06.patch

diff --git a/toolchain/musl/Config.version b/toolchain/musl/Config.version
index caaf7f1..537f3d8 100644
--- a/toolchain/musl/Config.version
+++ b/toolchain/musl/Config.version
@@ -3,6 +3,6 @@ if USE_MUSL
 config MUSL_VERSION
string
depends on USE_MUSL
-   default "1.1.14"
+   default "1.1.15"
 
 endif
diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index 0f45aa3..de00ea0 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -11,7 +11,7 @@ PKG_NAME:=musl
 PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
 PKG_RELEASE=1
 
-PKG_MD5SUM:=d529ce4a2f7f79d8c3fd4b8329417b57
+PKG_MD5SUM:=9590a9d47ee64f220b3c12f7afb864ca
 
 PKG_SOURCE_URL:=http://www.musl-libc.org/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/toolchain/musl/patches/001-update-to-git-2016-03-06.patch 
b/toolchain/musl/patches/001-update-to-git-2016-03-06.patch
deleted file mode 100644
index d74d816..000
--- a/toolchain/musl/patches/001-update-to-git-2016-03-06.patch
+++ /dev/null
@@ -1,3736 +0,0 @@
-commit 636a4799dd5bf11a1fcd209906c088ed948b821c
-Author: Rich Felker 
-Date:   Sun Mar 6 17:11:29 2016 -0500
-
-make configure check for unsupported (SPE) powerpc hard-float models
-
-the SPE ABI may be compatible with soft-float, but actually making it
-work requires some additional work, so for now it's best to make sure
-broken builds don't happen.
-
-commit 5a92dd95c77cee81755f1a441ae0b71e3ae2bcdb
-Author: Felix Fietkau 
-Date:   Mon Jan 25 13:20:52 2016 +0100
-
-add powerpc soft-float support
-
-Some PowerPC CPUs (e.g. Freescale MPC85xx) have a completely different
-instruction set for floating point operations (SPE).
-Executing regular PowerPC floating point instructions results in
-"Illegal instruction" errors.
-
-Make it possible to run these devices in soft-float mode.
-
-commit 9543656cc32fda48fc463f332ee20e91eed2b768
-Author: Alexander Monakov 
-Date:   Sun Mar 6 20:22:38 2016 +0300
-
-env: avoid leaving dangling pointers in __env_map
-
-This is the minimal fix for __putenv leaving a pointer to freed heap
-storage in __env_map array, which could later on lead to errors such
-as double-free.
-
-commit 589aefa5b061647e8b9ad9bca3aaa8dc6222460a
-Author: Rich Felker 
-Date:   Sun Mar 6 17:48:58 2016 +
-
-update documentation files for mips64 port
-
-commit 83933573aff71a5d178ab71912f177d2d844e63e
-Author: Rich Felker 
-Date:   Sun Mar 6 17:41:56 2016 +
-
-add mips64 port
-
-patch by Mahesh Bodapati and Jaydeep Patil of Imagination
-Technologies.
-
-commit 71392a91c333d47b6b3c8f99c897e3b5a7eb6d58
-Author: Rich Felker 
-Date:   Sun Mar 6 17:25:52 2016 +
-
-generalize mips-specific reloc code not to hard-code sym/type encoding
-
-this change is made in preparation for adding the mips64 port, which
-needs a 64-bit (and mips64-specific) form of the R_INFO macro, but
-it's a better abstraction anyway.
-
-based on part of the mips64 port patch by Mahesh Bodapati and Jaydeep
-Patil of Imagination Technologies.
-
-commit b023c03b574acdfd73418314a5dcaa83e5cea5a0
-Author: Szabolcs Nagy 
-Date:   Fri Mar 4 21:23:33 2016 +
-
-math: fix expf(-NAN) and exp2f(-NAN) to return -NAN instead of 0
-
-expf(-NAN) was treated as expf(-large) which unconditionally
-returns +0, so special case +-NAN.
-reported by Petr Hosek.
-
-commit db66ef1f7db7c5b672591a97a97bc789c9efe2f3
-Author: Nathan Zadoks 
-Date:   Wed Mar 2 17:26:27 2016 +0100
-
-add sched_getcpu vDSO support
-
-This brings the call to an actually usable speed.
-Quick unscientific benchmark: 14ns : 102ns :: vDSO : syscall
-
-commit 98d335735d64ee34a34cb9c08ea2cb51a076d2a1
-Author: Nathan Zadoks 
-Date:   Wed Mar 2 17:26:26 2016 +0100
-
-add sched_getcpu
-
-This is a GNU extension, but a fairly minor one, for a system call that
-otherwise has no libc wrapper.
-
-commit 29b13575376509bb21539711f30c1deaf0823033
-Author: Szabolcs Nagy 
-Date:   Mon Feb 29 16:36:25 2016 +
-
-fix ^* at the start of a complete BRE
-
-This is a workaround to treat * as literal * at the start of a BRE.
-
-Ideally ^ would be treated as an anchor at the start of any BRE
-subexpression and similarly $ would be an anchor at the end of any
-subexpression.  This is not required 

[LEDE-DEV] [RFC 7/8] config: add gcc 6 info to build rule

2016-07-13 Thread Syrone Wong
Signed-off-by: Syrone Wong 
---
 config/Config-build.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/Config-build.in b/config/Config-build.in
index 23cf83b..7a70862 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -236,7 +236,7 @@ menu "Global build settings"
config PKG_CC_STACKPROTECTOR_STRONG
bool "Strong"
select SSP_SUPPORT if !USE_MUSL
-   depends on GCC_VERSION_5
+   depends on (GCC_VERSION_5 || GCC_VERSION_6)
depends on KERNEL_CC_STACKPROTECTOR_STRONG
endchoice
 
@@ -251,7 +251,7 @@ menu "Global build settings"
config KERNEL_CC_STACKPROTECTOR_REGULAR
bool "Regular"
config KERNEL_CC_STACKPROTECTOR_STRONG
-   depends on GCC_VERSION_5
+   depends on (GCC_VERSION_5 || GCC_VERSION_6)
bool "Strong"
endchoice
 
-- 
2.9.0


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


[LEDE-DEV] [RFC 5/8] toolchain/gcc: add 6.1.0

2016-07-13 Thread Syrone Wong
-fno-plt and musl-libc patches already get upstream, then dropped
in GCC 6. Other patches are almost identical compared to GCC 5.3.

Compile and run tested on ar71xx/Qihoo C301 and
mvebu/Linksys WRT1900ac v1

Signed-off-by: Syrone Wong 
---
 toolchain/gcc/Config.in|   6 +
 toolchain/gcc/Config.version   |   7 +-
 toolchain/gcc/common.mk|   4 +
 .../6.1.0/001-revert_register_mode_search.patch|  65 ++
 .../gcc/patches/6.1.0/002-case_insensitive.patch   |  14 ++
 .../gcc/patches/6.1.0/010-documentation.patch  |  23 +++
 toolchain/gcc/patches/6.1.0/100-uclibc-conf.patch  |  33 +++
 toolchain/gcc/patches/6.1.0/230-musl_libssp.patch  |  13 ++
 .../patches/6.1.0/800-arm_v5te_no_ldrd_strd.patch  |  11 +
 .../patches/6.1.0/810-arm-softfloat-libgcc.patch   |  25 +++
 toolchain/gcc/patches/6.1.0/820-libgcc_pic.patch   |  36 
 .../gcc/patches/6.1.0/830-arm_unbreak_armv4t.patch |  13 ++
 .../6.1.0/840-armv4_pass_fix-v4bx_to_ld.patch  |  19 ++
 .../gcc/patches/6.1.0/850-use_shared_libgcc.patch  |  47 +
 .../gcc/patches/6.1.0/851-libgcc_no_compat.patch   |  12 ++
 .../gcc/patches/6.1.0/870-ppc_no_crtsavres.patch   |  11 +
 .../gcc/patches/6.1.0/880-no_java_section.patch|  11 +
 .../gcc/patches/6.1.0/900-bad-mips16-crt.patch |   9 +
 toolchain/gcc/patches/6.1.0/910-mbsd_multi.patch   | 222 +
 .../patches/6.1.0/920-specs_nonfatal_getenv.patch  |  70 +++
 .../patches/6.1.0/930-fix-mips-noexecstack.patch   | 111 +++
 .../patches/6.1.0/940-no-clobber-stamp-bits.patch  |  11 +
 .../6.1.0/950-cpp_file_path_translation.patch  | 182 +
 23 files changed, 954 insertions(+), 1 deletion(-)
 create mode 100644 
toolchain/gcc/patches/6.1.0/001-revert_register_mode_search.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/002-case_insensitive.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/010-documentation.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/100-uclibc-conf.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/230-musl_libssp.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/800-arm_v5te_no_ldrd_strd.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/810-arm-softfloat-libgcc.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/820-libgcc_pic.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/830-arm_unbreak_armv4t.patch
 create mode 100644 
toolchain/gcc/patches/6.1.0/840-armv4_pass_fix-v4bx_to_ld.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/850-use_shared_libgcc.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/851-libgcc_no_compat.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/870-ppc_no_crtsavres.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/880-no_java_section.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/900-bad-mips16-crt.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/910-mbsd_multi.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/920-specs_nonfatal_getenv.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/930-fix-mips-noexecstack.patch
 create mode 100644 toolchain/gcc/patches/6.1.0/940-no-clobber-stamp-bits.patch
 create mode 100644 
toolchain/gcc/patches/6.1.0/950-cpp_file_path_translation.patch

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index def296f..13cbe7a8 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -4,6 +4,7 @@ choice
prompt "GCC compiler Version" if TOOLCHAINOPTS
default GCC_USE_VERSION_4_8_ARC if arc
default GCC_USE_VERSION_5
+   default GCC_USE_VERSION_6
help
  Select the version of gcc you wish to use.
 
@@ -17,6 +18,11 @@ choice
bool "gcc 5.x"
depends on !arc
 
+   config GCC_USE_VERSION_6
+   select GCC_VERSION_6
+   bool "gcc 6.x"
+   depends on !arc
+
 endchoice
 
 config GCC_USE_GRAPHITE
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index f9e8c47..6a95862 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -6,7 +6,8 @@ config GCC_VERSION
string
default "4.8-linaro"if GCC_VERSION_4_8_LINARO
default "arc-2016.03"   if GCC_VERSION_4_8_ARC
-   default "5.3.0"
+   default "5.3.0" if GCC_VERSION_5
+   default "6.1.0" if GCC_VERSION_6
 
 config GCC_VERSION_4_8
bool
@@ -15,3 +16,7 @@ config GCC_VERSION_4_8
 config GCC_VERSION_5
default y if (!TOOLCHAINOPTS && !arc)
bool
+
+config GCC_VERSION_6
+   default y if (!TOOLCHAINOPTS && !arc)
+   bool
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index 9bc8491..b65f80d 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -32,6 +32,10 @@ ifeq ($(PKG_VERSION),5.3.0)
   PKG_MD5SUM:=c9616fd448f980259c31de613e575719
 endif
 
+ifeq ($(PKG_VERSION),6.1.0)
+  

[LEDE-DEV] [RFC 4/8] toolchain/gdb: add 7.11.1

2016-07-13 Thread Syrone Wong
Signed-off-by: Syrone Wong 
---
 toolchain/gdb/Makefile |  4 +--
 .../gdb/patches/7.11.1/100-no_extern_inline.patch  | 32 ++
 .../gdb/patches/7.11.1/110-no_testsuite.patch  | 21 ++
 .../7.11.1/120-fix-compile-flag-mismatch.patch | 11 
 4 files changed, 66 insertions(+), 2 deletions(-)
 create mode 100644 toolchain/gdb/patches/7.11.1/100-no_extern_inline.patch
 create mode 100644 toolchain/gdb/patches/7.11.1/110-no_testsuite.patch
 create mode 100644 
toolchain/gdb/patches/7.11.1/120-fix-compile-flag-mismatch.patch

diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile
index 97d88d6..b4f4911 100644
--- a/toolchain/gdb/Makefile
+++ b/toolchain/gdb/Makefile
@@ -16,11 +16,11 @@ 
PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils
 PKG_MD5SUM:=775caaf6385c16f20b6f53c0a2b95f79
 GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
 else
-PKG_VERSION:=7.11
+PKG_VERSION:=7.11.1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gdb
-PKG_MD5SUM:=b5c784685e1cde65ba135feea86b6d75
+PKG_MD5SUM:=5aa71522e488e358243917967db87476
 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
 endif
 
diff --git a/toolchain/gdb/patches/7.11.1/100-no_extern_inline.patch 
b/toolchain/gdb/patches/7.11.1/100-no_extern_inline.patch
new file mode 100644
index 000..8c18c6e
--- /dev/null
+++ b/toolchain/gdb/patches/7.11.1/100-no_extern_inline.patch
@@ -0,0 +1,32 @@
+--- a/sim/common/sim-arange.c
 b/sim/common/sim-arange.c
+@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
+   build_search_tree (ar);
+ }
+ 
+-#endif /* DEFINE_NON_INLINE_P */
+-
+-#if DEFINE_INLINE_P
+-
+-SIM_ARANGE_INLINE int
++int
+ sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
+ {
+   ADDR_RANGE_TREE *t = ar->range_tree;
+@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad
+   return 0;
+ }
+ 
+-#endif /* DEFINE_INLINE_P */
++#endif /* DEFINE_NON_INLINE_P */
+--- a/sim/common/sim-arange.h
 b/sim/common/sim-arange.h
+@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_
+ 
+ /* Return non-zero if ADDR is in range AR, traversing the entire tree.
+If no range is specified, that is defined to mean "everything".  */
+-SIM_ARANGE_INLINE int
++extern int
+ sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
+ #define ADDR_RANGE_HIT_P(ar, addr) \
+   ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))
diff --git a/toolchain/gdb/patches/7.11.1/110-no_testsuite.patch 
b/toolchain/gdb/patches/7.11.1/110-no_testsuite.patch
new file mode 100644
index 000..3a9c1e7
--- /dev/null
+++ b/toolchain/gdb/patches/7.11.1/110-no_testsuite.patch
@@ -0,0 +1,21 @@
+--- a/gdb/configure
 b/gdb/configure
+@@ -873,8 +873,7 @@ MAKEINFOFLAGS
+ YACC
+ YFLAGS
+ XMKMF'
+-ac_subdirs_all='testsuite
+-gdbtk
++ac_subdirs_all='gdbtk
+ multi-ice
+ gdbserver'
+ 
+@@ -5660,7 +5660,7 @@ $as_echo "$with_auto_load_safe_path" >&6
+ 
+ 
+ 
+-subdirs="$subdirs testsuite"
++subdirs="$subdirs"
+ 
+ 
+ # Check whether to support alternative target configurations
diff --git a/toolchain/gdb/patches/7.11.1/120-fix-compile-flag-mismatch.patch 
b/toolchain/gdb/patches/7.11.1/120-fix-compile-flag-mismatch.patch
new file mode 100644
index 000..d7c8df4
--- /dev/null
+++ b/toolchain/gdb/patches/7.11.1/120-fix-compile-flag-mismatch.patch
@@ -0,0 +1,11 @@
+--- a/gdb/gdbserver/configure
 b/gdb/gdbserver/configure
+@@ -2520,7 +2520,7 @@ $as_echo "$as_me: error: \`$ac_var' was
+   ac_cache_corrupted=: ;;
+ ,);;
+ *)
+-  if test "x$ac_old_val" != "x$ac_new_val"; then
++  if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then
+   # differences in whitespace do not lead to failure.
+   ac_old_val_w=`echo x $ac_old_val`
+   ac_new_val_w=`echo x $ac_new_val`
-- 
2.9.0


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


[LEDE-DEV] [RFC 1/8] tools/isl: bump to 0.17.1

2016-07-13 Thread Syrone Wong
Signed-off-by: Syrone Wong 
---
 tools/isl/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/isl/Makefile b/tools/isl/Makefile
index 8fe2da1..24c0626 100644
--- a/tools/isl/Makefile
+++ b/tools/isl/Makefile
@@ -7,11 +7,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=isl
-PKG_VERSION:=0.14.1
+PKG_VERSION:=0.17.1
 
 PKG_SOURCE_URL:=http://isl.gforge.inria.fr
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_MD5SUM:=94fcd11e0b1c79250ae341affb1845ea
+PKG_MD5SUM:=20b83900e234f982a566a3a6b3503bf1
 
 HOST_BUILD_PARALLEL:=1
 
-- 
2.9.0


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


[LEDE-DEV] [RFC 2/8] toolchain/binutils: add 2.26.1

2016-07-13 Thread Syrone Wong
Signed-off-by: Syrone Wong 
---
 toolchain/binutils/Config.in   |  6 
 toolchain/binutils/Config.version  |  5 +++
 toolchain/binutils/Makefile|  4 +++
 .../patches/2.26.1/300-001_ld_makefile_patch.patch | 22 +
 .../2.26.1/300-012_check_ldrunpath_length.patch| 20 
 .../2.26.1/400-mips_no_dynamic_linking_sym.patch   | 18 +++
 ...Change-default-emulation-for-mips64-linux.patch | 37 ++
 7 files changed, 112 insertions(+)
 create mode 100644 
toolchain/binutils/patches/2.26.1/300-001_ld_makefile_patch.patch
 create mode 100644 
toolchain/binutils/patches/2.26.1/300-012_check_ldrunpath_length.patch
 create mode 100644 
toolchain/binutils/patches/2.26.1/400-mips_no_dynamic_linking_sym.patch
 create mode 100644 
toolchain/binutils/patches/2.26.1/500-Change-default-emulation-for-mips64-linux.patch

diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in
index 2960c94..16c8005 100644
--- a/toolchain/binutils/Config.in
+++ b/toolchain/binutils/Config.in
@@ -3,6 +3,7 @@
 choice
prompt "Binutils Version" if TOOLCHAINOPTS
default BINUTILS_USE_VERSION_2_25_1 if !arc
+   default BINUTILS_USE_VERSION_2_26_1 if !arc
default BINUTILS_USE_VERSION_2_26_ARC if arc
help
  Select the version of binutils you wish to use.
@@ -17,6 +18,11 @@ choice
bool "Binutils 2.25.1"
select BINUTILS_VERSION_2_25_1
 
+   config BINUTILS_USE_VERSION_2_26_1
+   depends on !arc
+   bool "Binutils 2.26.1"
+   select BINUTILS_VERSION_2_26_1
+
config BINUTILS_USE_VERSION_2_26_ARC
depends on arc
bool "ARC binutils 2.26"
diff --git a/toolchain/binutils/Config.version 
b/toolchain/binutils/Config.version
index fc7a1f3..2951c0b 100644
--- a/toolchain/binutils/Config.version
+++ b/toolchain/binutils/Config.version
@@ -5,6 +5,10 @@ config BINUTILS_VERSION_2_25_1
default y if (!TOOLCHAINOPTS && !arc)
bool
 
+config BINUTILS_VERSION_2_26_1
+   default y if (!TOOLCHAINOPTS && !arc)
+   bool
+
 config BINUTILS_VERSION_2_26_ARC
default y if (!TOOLCHAINOPTS && arc)
bool
@@ -13,5 +17,6 @@ config BINUTILS_VERSION
string
default "2.24-linaro"  if BINUTILS_VERSION_2_24_LINARO
default "2.25.1"   if BINUTILS_VERSION_2_25_1
+   default "2.26.1"   if BINUTILS_VERSION_2_26_1
default "arc-2016.03"  if BINUTILS_VERSION_2_26_ARC
 
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 03fc76a..a30a167 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -17,6 +17,10 @@ ifeq ($(PKG_VERSION),2.25.1)
   PKG_MD5SUM:=ac493a78de4fee895961d025b7905be4
 endif
 
+ifeq ($(PKG_VERSION),2.26.1)
+  PKG_MD5SUM:=d2b24e5b5301b7ff0207414c34c3e0fb
+endif
+
 ifeq ($(findstring linaro, $(CONFIG_BINUTILS_VERSION)),linaro)
   
PKG_SOURCE_URL:=https://releases.linaro.org/14.09/components/toolchain/binutils-linaro/
   PKG_REV:=2.24.0-2014.09
diff --git a/toolchain/binutils/patches/2.26.1/300-001_ld_makefile_patch.patch 
b/toolchain/binutils/patches/2.26.1/300-001_ld_makefile_patch.patch
new file mode 100644
index 000..c51fc00
--- /dev/null
+++ b/toolchain/binutils/patches/2.26.1/300-001_ld_makefile_patch.patch
@@ -0,0 +1,22 @@
+--- a/ld/Makefile.am
 b/ld/Makefile.am
+@@ -54,7 +54,7 @@ endif
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ 
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- a/ld/Makefile.in
 b/ld/Makefile.in
+@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git 
a/toolchain/binutils/patches/2.26.1/300-012_check_ldrunpath_length.patch 
b/toolchain/binutils/patches/2.26.1/300-012_check_ldrunpath_length.patch
new file mode 100644
index 000..2e24b38
--- /dev/null
+++ b/toolchain/binutils/patches/2.26.1/300-012_check_ldrunpath_length.patch
@@ -0,0 +1,20 @@
+--- a/ld/emultempl/elf32.em
 b/ld/emultempl/elf32.em
+@@ -1198,6 +1198,8 @@ fragment 

[LEDE-DEV] [PATCH 1/3] gcc: update gcc to version 5.4.0

2016-07-13 Thread Hauke Mehrtens
The removed patches are already integrated in upstream gcc.

Signed-off-by: Hauke Mehrtens 
---
 toolchain/gcc/Config.version   |   2 +-
 toolchain/gcc/common.mk|   4 +-
 .../5.3.0/030-fix-arm-codegen-PR-65932.patch   |  21 
 .../gcc/patches/5.3.0/050-gcc-6-compile.patch  | 117 -
 .../001-revert_register_mode_search.patch  |   0
 .../{5.3.0 => 5.4.0}/002-case_insensitive.patch|   0
 .../{5.3.0 => 5.4.0}/010-documentation.patch   |   0
 .../{5.3.0 => 5.4.0}/020-no-plt-backport.patch |   0
 .../040-fix-mips-ICE-PR-68400.patch|   0
 .../patches/{5.3.0 => 5.4.0}/100-uclibc-conf.patch |   0
 .../patches/{5.3.0 => 5.4.0}/200-musl_config.patch |  14 +--
 .../patches/{5.3.0 => 5.4.0}/201-musl_arm.patch|   0
 .../patches/{5.3.0 => 5.4.0}/202-musl_mips.patch   |   0
 .../{5.3.0 => 5.4.0}/203-musl_powerpc.patch|   0
 .../gcc/patches/{5.3.0 => 5.4.0}/204-musl_sh.patch |   0
 .../patches/{5.3.0 => 5.4.0}/205-musl_x86.patch|   0
 .../{5.3.0 => 5.4.0}/206-musl_aarch64.patch|   0
 .../{5.3.0 => 5.4.0}/207-musl_fixincludes.patch|   0
 .../{5.3.0 => 5.4.0}/209-musl_libstdc++.patch  |   0
 .../patches/{5.3.0 => 5.4.0}/230-musl_libssp.patch |   0
 .../{5.3.0 => 5.4.0}/240-musl-libitm-fixes.patch   |   0
 .../patches/{5.3.0 => 5.4.0}/250-add-musl.patch|   0
 .../{5.3.0 => 5.4.0}/260-musl-add-unwind-fix.patch |   0
 .../270-musl-add-powerpc-softfloat-fix.patch   |   0
 .../800-arm_v5te_no_ldrd_strd.patch|   0
 .../810-arm-softfloat-libgcc.patch |   0
 .../patches/{5.3.0 => 5.4.0}/820-libgcc_pic.patch  |   0
 .../{5.3.0 => 5.4.0}/830-arm_unbreak_armv4t.patch  |   0
 .../840-armv4_pass_fix-v4bx_to_ld.patch|   0
 .../{5.3.0 => 5.4.0}/850-use_shared_libgcc.patch   |   0
 .../{5.3.0 => 5.4.0}/851-libgcc_no_compat.patch|   0
 .../{5.3.0 => 5.4.0}/870-ppc_no_crtsavres.patch|   2 +-
 .../{5.3.0 => 5.4.0}/880-no_java_section.patch |   0
 .../{5.3.0 => 5.4.0}/900-bad-mips16-crt.patch  |   0
 .../patches/{5.3.0 => 5.4.0}/910-mbsd_multi.patch  |   4 +-
 .../920-specs_nonfatal_getenv.patch|   0
 .../930-fix-mips-noexecstack.patch |   0
 .../940-no-clobber-stamp-bits.patch|   2 +-
 .../950-cpp_file_path_translation.patch|   2 +-
 39 files changed, 15 insertions(+), 153 deletions(-)
 delete mode 100644 
toolchain/gcc/patches/5.3.0/030-fix-arm-codegen-PR-65932.patch
 delete mode 100644 toolchain/gcc/patches/5.3.0/050-gcc-6-compile.patch
 rename toolchain/gcc/patches/{5.3.0 => 
5.4.0}/001-revert_register_mode_search.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/002-case_insensitive.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/010-documentation.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/020-no-plt-backport.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/040-fix-mips-ICE-PR-68400.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/100-uclibc-conf.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/200-musl_config.patch (96%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/201-musl_arm.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/202-musl_mips.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/203-musl_powerpc.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/204-musl_sh.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/205-musl_x86.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/206-musl_aarch64.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/207-musl_fixincludes.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/209-musl_libstdc++.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/230-musl_libssp.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/240-musl-libitm-fixes.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/250-add-musl.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/260-musl-add-unwind-fix.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 
5.4.0}/270-musl-add-powerpc-softfloat-fix.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/800-arm_v5te_no_ldrd_strd.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/810-arm-softfloat-libgcc.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/820-libgcc_pic.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/830-arm_unbreak_armv4t.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 
5.4.0}/840-armv4_pass_fix-v4bx_to_ld.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/850-use_shared_libgcc.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/851-libgcc_no_compat.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/870-ppc_no_crtsavres.patch (84%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/880-no_java_section.patch (100%)
 rename 

[LEDE-DEV] [PATCH 2/3] musl: update musl to version 1.1.15

2016-07-13 Thread Hauke Mehrtens
The removed patch is already integrated in upstream musl.

Signed-off-by: Hauke Mehrtens 
---
 toolchain/musl/Config.version  |2 +-
 toolchain/musl/common.mk   |2 +-
 .../patches/001-update-to-git-2016-03-06.patch | 3736 
 .../musl/patches/200-add_libssp_nonshared.patch|4 +-
 toolchain/musl/patches/300-relative.patch  |2 +-
 5 files changed, 5 insertions(+), 3741 deletions(-)
 delete mode 100644 toolchain/musl/patches/001-update-to-git-2016-03-06.patch

diff --git a/toolchain/musl/Config.version b/toolchain/musl/Config.version
index caaf7f1..537f3d8 100644
--- a/toolchain/musl/Config.version
+++ b/toolchain/musl/Config.version
@@ -3,6 +3,6 @@ if USE_MUSL
 config MUSL_VERSION
string
depends on USE_MUSL
-   default "1.1.14"
+   default "1.1.15"
 
 endif
diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index 0f45aa3..de00ea0 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -11,7 +11,7 @@ PKG_NAME:=musl
 PKG_VERSION:=$(call qstrip,$(CONFIG_MUSL_VERSION))
 PKG_RELEASE=1
 
-PKG_MD5SUM:=d529ce4a2f7f79d8c3fd4b8329417b57
+PKG_MD5SUM:=9590a9d47ee64f220b3c12f7afb864ca
 
 PKG_SOURCE_URL:=http://www.musl-libc.org/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/toolchain/musl/patches/001-update-to-git-2016-03-06.patch 
b/toolchain/musl/patches/001-update-to-git-2016-03-06.patch
deleted file mode 100644
index d74d816..000
--- a/toolchain/musl/patches/001-update-to-git-2016-03-06.patch
+++ /dev/null
@@ -1,3736 +0,0 @@
-commit 636a4799dd5bf11a1fcd209906c088ed948b821c
-Author: Rich Felker 
-Date:   Sun Mar 6 17:11:29 2016 -0500
-
-make configure check for unsupported (SPE) powerpc hard-float models
-
-the SPE ABI may be compatible with soft-float, but actually making it
-work requires some additional work, so for now it's best to make sure
-broken builds don't happen.
-
-commit 5a92dd95c77cee81755f1a441ae0b71e3ae2bcdb
-Author: Felix Fietkau 
-Date:   Mon Jan 25 13:20:52 2016 +0100
-
-add powerpc soft-float support
-
-Some PowerPC CPUs (e.g. Freescale MPC85xx) have a completely different
-instruction set for floating point operations (SPE).
-Executing regular PowerPC floating point instructions results in
-"Illegal instruction" errors.
-
-Make it possible to run these devices in soft-float mode.
-
-commit 9543656cc32fda48fc463f332ee20e91eed2b768
-Author: Alexander Monakov 
-Date:   Sun Mar 6 20:22:38 2016 +0300
-
-env: avoid leaving dangling pointers in __env_map
-
-This is the minimal fix for __putenv leaving a pointer to freed heap
-storage in __env_map array, which could later on lead to errors such
-as double-free.
-
-commit 589aefa5b061647e8b9ad9bca3aaa8dc6222460a
-Author: Rich Felker 
-Date:   Sun Mar 6 17:48:58 2016 +
-
-update documentation files for mips64 port
-
-commit 83933573aff71a5d178ab71912f177d2d844e63e
-Author: Rich Felker 
-Date:   Sun Mar 6 17:41:56 2016 +
-
-add mips64 port
-
-patch by Mahesh Bodapati and Jaydeep Patil of Imagination
-Technologies.
-
-commit 71392a91c333d47b6b3c8f99c897e3b5a7eb6d58
-Author: Rich Felker 
-Date:   Sun Mar 6 17:25:52 2016 +
-
-generalize mips-specific reloc code not to hard-code sym/type encoding
-
-this change is made in preparation for adding the mips64 port, which
-needs a 64-bit (and mips64-specific) form of the R_INFO macro, but
-it's a better abstraction anyway.
-
-based on part of the mips64 port patch by Mahesh Bodapati and Jaydeep
-Patil of Imagination Technologies.
-
-commit b023c03b574acdfd73418314a5dcaa83e5cea5a0
-Author: Szabolcs Nagy 
-Date:   Fri Mar 4 21:23:33 2016 +
-
-math: fix expf(-NAN) and exp2f(-NAN) to return -NAN instead of 0
-
-expf(-NAN) was treated as expf(-large) which unconditionally
-returns +0, so special case +-NAN.
-reported by Petr Hosek.
-
-commit db66ef1f7db7c5b672591a97a97bc789c9efe2f3
-Author: Nathan Zadoks 
-Date:   Wed Mar 2 17:26:27 2016 +0100
-
-add sched_getcpu vDSO support
-
-This brings the call to an actually usable speed.
-Quick unscientific benchmark: 14ns : 102ns :: vDSO : syscall
-
-commit 98d335735d64ee34a34cb9c08ea2cb51a076d2a1
-Author: Nathan Zadoks 
-Date:   Wed Mar 2 17:26:26 2016 +0100
-
-add sched_getcpu
-
-This is a GNU extension, but a fairly minor one, for a system call that
-otherwise has no libc wrapper.
-
-commit 29b13575376509bb21539711f30c1deaf0823033
-Author: Szabolcs Nagy 
-Date:   Mon Feb 29 16:36:25 2016 +
-
-fix ^* at the start of a complete BRE
-
-This is a workaround to treat * as literal * at the start of a BRE.
-
- 

[LEDE-DEV] [PATCH 3/3] musl: remove sh3 workaround

2016-07-13 Thread Hauke Mehrtens
The GCC bug 67260 is fixed upstream now, remove this workaround.

Signed-off-by: Hauke Mehrtens 
---
 toolchain/musl/common.mk | 6 --
 1 file changed, 6 deletions(-)

diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index de00ea0..aa17899 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -23,12 +23,6 @@ 
HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION)
 include $(INCLUDE_DIR)/toolchain-build.mk
 include $(INCLUDE_DIR)/hardening.mk
 
-# Please see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67260
-ifeq ($(CONFIG_sh3),y)
-TARGET_CFLAGS+= \
-   -fno-optimize-sibling-calls
-endif
-
 MUSL_CONFIGURE:= \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
-- 
2.8.1


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


[LEDE-DEV] [PATCH 0/3] toolchain: update gcc and musl

2016-07-13 Thread Hauke Mehrtens
This was tested on a lantiq, brcm47xx and bcm53xx device.

Hauke Mehrtens (3):
  gcc: update gcc to version 5.4.0
  musl: update musl to version 1.1.15
  musl: remove sh3 workaround

 toolchain/gcc/Config.version   |2 +-
 toolchain/gcc/common.mk|4 +-
 .../5.3.0/030-fix-arm-codegen-PR-65932.patch   |   21 -
 .../gcc/patches/5.3.0/050-gcc-6-compile.patch  |  117 -
 .../001-revert_register_mode_search.patch  |0
 .../{5.3.0 => 5.4.0}/002-case_insensitive.patch|0
 .../{5.3.0 => 5.4.0}/010-documentation.patch   |0
 .../{5.3.0 => 5.4.0}/020-no-plt-backport.patch |0
 .../040-fix-mips-ICE-PR-68400.patch|0
 .../patches/{5.3.0 => 5.4.0}/100-uclibc-conf.patch |0
 .../patches/{5.3.0 => 5.4.0}/200-musl_config.patch |   14 +-
 .../patches/{5.3.0 => 5.4.0}/201-musl_arm.patch|0
 .../patches/{5.3.0 => 5.4.0}/202-musl_mips.patch   |0
 .../{5.3.0 => 5.4.0}/203-musl_powerpc.patch|0
 .../gcc/patches/{5.3.0 => 5.4.0}/204-musl_sh.patch |0
 .../patches/{5.3.0 => 5.4.0}/205-musl_x86.patch|0
 .../{5.3.0 => 5.4.0}/206-musl_aarch64.patch|0
 .../{5.3.0 => 5.4.0}/207-musl_fixincludes.patch|0
 .../{5.3.0 => 5.4.0}/209-musl_libstdc++.patch  |0
 .../patches/{5.3.0 => 5.4.0}/230-musl_libssp.patch |0
 .../{5.3.0 => 5.4.0}/240-musl-libitm-fixes.patch   |0
 .../patches/{5.3.0 => 5.4.0}/250-add-musl.patch|0
 .../{5.3.0 => 5.4.0}/260-musl-add-unwind-fix.patch |0
 .../270-musl-add-powerpc-softfloat-fix.patch   |0
 .../800-arm_v5te_no_ldrd_strd.patch|0
 .../810-arm-softfloat-libgcc.patch |0
 .../patches/{5.3.0 => 5.4.0}/820-libgcc_pic.patch  |0
 .../{5.3.0 => 5.4.0}/830-arm_unbreak_armv4t.patch  |0
 .../840-armv4_pass_fix-v4bx_to_ld.patch|0
 .../{5.3.0 => 5.4.0}/850-use_shared_libgcc.patch   |0
 .../{5.3.0 => 5.4.0}/851-libgcc_no_compat.patch|0
 .../{5.3.0 => 5.4.0}/870-ppc_no_crtsavres.patch|2 +-
 .../{5.3.0 => 5.4.0}/880-no_java_section.patch |0
 .../{5.3.0 => 5.4.0}/900-bad-mips16-crt.patch  |0
 .../patches/{5.3.0 => 5.4.0}/910-mbsd_multi.patch  |4 +-
 .../920-specs_nonfatal_getenv.patch|0
 .../930-fix-mips-noexecstack.patch |0
 .../940-no-clobber-stamp-bits.patch|2 +-
 .../950-cpp_file_path_translation.patch|2 +-
 toolchain/musl/Config.version  |2 +-
 toolchain/musl/common.mk   |8 +-
 .../patches/001-update-to-git-2016-03-06.patch | 3736 
 .../musl/patches/200-add_libssp_nonshared.patch|4 +-
 toolchain/musl/patches/300-relative.patch  |2 +-
 44 files changed, 20 insertions(+), 3900 deletions(-)
 delete mode 100644 
toolchain/gcc/patches/5.3.0/030-fix-arm-codegen-PR-65932.patch
 delete mode 100644 toolchain/gcc/patches/5.3.0/050-gcc-6-compile.patch
 rename toolchain/gcc/patches/{5.3.0 => 
5.4.0}/001-revert_register_mode_search.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/002-case_insensitive.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/010-documentation.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/020-no-plt-backport.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/040-fix-mips-ICE-PR-68400.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/100-uclibc-conf.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/200-musl_config.patch (96%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/201-musl_arm.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/202-musl_mips.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/203-musl_powerpc.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/204-musl_sh.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/205-musl_x86.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/206-musl_aarch64.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/207-musl_fixincludes.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/209-musl_libstdc++.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/230-musl_libssp.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/240-musl-libitm-fixes.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/250-add-musl.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/260-musl-add-unwind-fix.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 
5.4.0}/270-musl-add-powerpc-softfloat-fix.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/800-arm_v5te_no_ldrd_strd.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/810-arm-softfloat-libgcc.patch 
(100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/820-libgcc_pic.patch (100%)
 rename toolchain/gcc/patches/{5.3.0 => 5.4.0}/830-arm_unbreak_armv4t.patch 
(100%)
 rename 

Re: [LEDE-DEV] getver.sh regression

2016-07-13 Thread Jonas Gorski
On 13 July 2016 at 11:52, Álvaro Fernández Rojas  wrote:
> That one is working fine after a small fix:
> https://gist.github.com/Noltari/0c395c57b94598bdf96e6a292c7b5888
> (You're missing one "|").

That's what I get for manually fixing up an older WIP patch ;p.

I added another commit on top, dropping the unused BRANCH and getting
the upstream of the master branch unconditionally (not of the current
branch), assuming for now that master is the "canonical" upstream.
Does it still work for you?

https://git.lede-project.org/?p=lede/jogo/staging.git;a=commit;h=d9da34fb73047b2a660701df03857d4902c82c2e


Jonas

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


Re: [LEDE-DEV] getver.sh regression

2016-07-13 Thread Álvaro Fernández Rojas
That one is working fine after a small fix:
https://gist.github.com/Noltari/0c395c57b94598bdf96e6a292c7b5888
(You're missing one "|").

El 13/7/16 a las 11:45, Jonas Gorski escribió:
> On 13 July 2016 at 11:16, Álvaro Fernández Rojas  wrote:
>> Appart from that, if there's no remote named origin it will also spam some 
>> errors about having no reference to origin/master.
>> My current setup includes lede, staging and github remotes, so there's no 
>> origin remote at all.
> 
> Can you give 
> https://git.lede-project.org/?p=lede/jogo/staging.git;a=commit;h=c73f3c4553cbc8320e3cca0f80a897421b1d62a4
> a try as well?
> 
> Jonas
> 

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


Re: [LEDE-DEV] getver.sh regression

2016-07-13 Thread Jonas Gorski
On 13 July 2016 at 11:13, John Crispin  wrote:
>
>
> On 13/07/2016 11:11, Jonas Gorski wrote:
>> Hi John,
>>
>> On 13 July 2016 at 09:39, John Crispin  wrote:
>>> Hi Jonas,
>>> Hi Felix,
>>>
>>> your recent changes to getver.sh are causing a regression when not
>>> building inside trunk but inside a staging tree
>>>
>>> blogic@debian:/lede/staging$ ./scripts/getver.sh
>>> warning: refname 'origin/master' is ambiguous.
>>> r411+546
>>> blogic@debian:/lede/staging$ git branch
>>> * master
>>>   origin/master
>>
>> I don't think you should have a branch called "origin/master" - this
>> is what confuses git. Generally having branches that start with remote
>> names sound like they could cause issues later on.
>>
>>
>> Regards
>> Jonas
>>
>
>
> i have 2 remotes, the master and my staging tree. this is a typical
> setup i guess ?

Having more than one remote is fine, it's just that if there is a
remote called , having *local* branches called
/ sounds like a recipe for desaster.

Anyway, I pushed a potential fix in my staging tree, does
https://git.lede-project.org/?p=lede/jogo/staging.git;a=commit;h=c73f3c4553cbc8320e3cca0f80a897421b1d62a4
work for you?


Jonas

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


Re: [LEDE-DEV] getver.sh regression

2016-07-13 Thread John Crispin


On 13/07/2016 11:11, Jonas Gorski wrote:
> Hi John,
> 
> On 13 July 2016 at 09:39, John Crispin  wrote:
>> Hi Jonas,
>> Hi Felix,
>>
>> your recent changes to getver.sh are causing a regression when not
>> building inside trunk but inside a staging tree
>>
>> blogic@debian:/lede/staging$ ./scripts/getver.sh
>> warning: refname 'origin/master' is ambiguous.
>> r411+546
>> blogic@debian:/lede/staging$ git branch
>> * master
>>   origin/master
> 
> I don't think you should have a branch called "origin/master" - this
> is what confuses git. Generally having branches that start with remote
> names sound like they could cause issues later on.
> 
> 
> Regards
> Jonas
> 


i have 2 remotes, the master and my staging tree. this is a typical
setup i guess ?

John

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


Re: [LEDE-DEV] getver.sh regression

2016-07-13 Thread Jonas Gorski
Hi John,

On 13 July 2016 at 09:39, John Crispin  wrote:
> Hi Jonas,
> Hi Felix,
>
> your recent changes to getver.sh are causing a regression when not
> building inside trunk but inside a staging tree
>
> blogic@debian:/lede/staging$ ./scripts/getver.sh
> warning: refname 'origin/master' is ambiguous.
> r411+546
> blogic@debian:/lede/staging$ git branch
> * master
>   origin/master

I don't think you should have a branch called "origin/master" - this
is what confuses git. Generally having branches that start with remote
names sound like they could cause issues later on.


Regards
Jonas

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


Re: [LEDE-DEV] trying to cover costs on my bit of the build cluster

2016-07-13 Thread Dave Taht
The total cost of running a lede "compute engine standard N1 16" from
Jun 1-Jun 30 was $560.77. The openwrt (N4) one cost 220.

I could try to look at the builds per $ over that month so as to
provide a better comparison to other cloud services.

total donations from the https://www.gofundme.com/2awkswc link: $365
(one time only)

I personally commit $250/mo.

So presently I plan to discontinue the openwrt builder aug 1, and
request that the lede box be scaled back by then, if no other funding
sources arrive.

An issue I have with "scaling down" this box is that it will merely
"run longer", as the utilization since jun 15th has not been full.
Running a massive box for short bursts makes more sense...

...


Compute Engine Network Internet Egress

from EMEA to Americas

Compute Engine Network Internet Egress

from EMEA to EMEA

Compute Engine Standard Intel N1 16

VCPU running in EMEA

Compute Engine Storage PD Capacity Jun 1 - Jun 30 lede-builder
1999.985 Gibibyte-
months

Compute Engine Sustained Usage

Jun 1 - Jun 30 lede-builder 89.989 Mebibytes 0.01

Jun 1 - Jun 30 lede-builder 310.369 Gibibytes 37.24

Jun 1 - Jun 30 lede-builder 720 Hours 633.60

80.00

Jun 1 - Jun 30 lede-builder -190.08


On Thu, Jun 23, 2016 at 7:25 PM, Dave Taht  wrote:
> I just put up a gofundme link to cover the costs of the 16 cpu google
> cloud buildbot machine I donated to lede last month, here:
>
> https://www.gofundme.com/2awkswc
>
> It's looking like $ 500-600 a month (in addition to the 250/mo I
> already put into the openwrt builder).
>
> 800/mo is WAY more than I can sustain personally past august 1, so I
> will be forced to make hard choices then, without some way to cover
> these expanded costs.
>
> From what I can see the new build cluster for lede is *wildly* successful,
>
> ( http://phase2.builds.lede-project.org/tgrid )
>
> It is very easy and possibly desirable to continue using bits of the
> google compute cloud to continue, or expand this - or there may be
> better alternatives... but, regardless, I'll have to shut down or cut
> back something by aug 1st without some help here.
>
> --
> Dave Täht
> Let's go make home routers and wifi faster! With better software!
> http://blog.cerowrt.org



-- 
Dave Täht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org

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