[OpenWrt-Devel] [PATCH 2/4] ipq806x: fix SPI read errors

2015-02-10 Thread Mathieu Olivari
SPI read errors are reported even with the board sitting idle.
Fixes have been posted to linux-spi mailing list but not merged yet, so
we'll just pull the patches and apply them locally:

*001-spi-qup-Add-DMA-capabilities.patch is pulled from:
 http://marc.info/?l=linux-spim=140381685115859w=2

*002-v3-spi-qup-Fix-incorrect-block-transfers.patch is pulled from:
 http://marc.info/?l=linux-spim=141211211011539w=2

Signed-off-by: Mathieu Olivari math...@codeaurora.org
---
 .../patches/001-spi-qup-Add-DMA-capabilities.patch | 522 +
 ...-v3-spi-qup-Fix-incorrect-block-transfers.patch | 376 +++
 2 files changed, 898 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches/001-spi-qup-Add-DMA-capabilities.patch
 create mode 100644 
target/linux/ipq806x/patches/002-v3-spi-qup-Fix-incorrect-block-transfers.patch

diff --git 
a/target/linux/ipq806x/patches/001-spi-qup-Add-DMA-capabilities.patch 
b/target/linux/ipq806x/patches/001-spi-qup-Add-DMA-capabilities.patch
new file mode 100644
index 000..62badd5
--- /dev/null
+++ b/target/linux/ipq806x/patches/001-spi-qup-Add-DMA-capabilities.patch
@@ -0,0 +1,522 @@
+Content-Type: text/plain; charset=utf-8
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: spi: qup: Add DMA capabilities
+From: Andy Gross agr...@codeaurora.org
+X-Patchwork-Id: 4432401
+Message-Id: 1403816781-31008-1-git-send-email-agr...@codeaurora.org
+To: Mark Brown broo...@kernel.org
+Cc: linux-...@vger.kernel.org, Sagar Dharia sdha...@codeaurora.org,
+   Daniel Sneddon dsned...@codeaurora.org,
+   Bjorn Andersson bjorn.anders...@sonymobile.com,
+   Ivan T. Ivanov iiva...@mm-sol.com,
+   linux-ker...@vger.kernel.org, linux-arm-ker...@lists.infradead.org,
+   linux-arm-...@vger.kernel.org, Andy Gross agr...@codeaurora.org
+Date: Thu, 26 Jun 2014 16:06:21 -0500
+
+This patch adds DMA capabilities to the spi-qup driver.  If DMA channels are
+present, the QUP will use DMA instead of block mode for transfers to/from SPI
+peripherals for transactions larger than the length of a block.
+
+Signed-off-by: Andy Gross agr...@codeaurora.org
+
+---
+.../devicetree/bindings/spi/qcom,spi-qup.txt   |   10 +
+ drivers/spi/spi-qup.c  |  361 ++--
+ 2 files changed, 350 insertions(+), 21 deletions(-)
+
+--- a/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
 b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
+@@ -27,6 +27,11 @@ Optional properties:
+ - spi-max-frequency: Specifies maximum SPI clock frequency,
+  Units - Hz. Definition as per
+  Documentation/devicetree/bindings/spi/spi-bus.txt
++- dmas : Two DMA channel specifiers following the convention 
outlined
++ in bindings/dma/dma.txt
++- dma-names: Names for the dma channels, if present. There must be at
++ least one channel named tx for transmit and named rx 
for
++ receive.
+ - num-cs: total number of chipselects
+ - cs-gpios:   should specify GPIOs used for chipselects.
+   The gpios will be referred to as reg = index in the SPI child
+@@ -51,6 +56,10 @@ Example:
+   clocks = gcc GCC_BLSP2_QUP2_SPI_APPS_CLK, gcc 
GCC_BLSP2_AHB_CLK;
+   clock-names = core, iface;
+ 
++  dmas = blsp2_bam 2,
++  blsp2_bam 3;
++  dma-names = rx, tx;
++
+   pinctrl-names = default;
+   pinctrl-0 = spi8_default;
+ 
+--- a/drivers/spi/spi-qup.c
 b/drivers/spi/spi-qup.c
+@@ -22,6 +22,8 @@
+ #include linux/platform_device.h
+ #include linux/pm_runtime.h
+ #include linux/spi/spi.h
++#include linux/dmaengine.h
++#include linux/dma-mapping.h
+ 
+ #define QUP_CONFIG0x
+ #define QUP_STATE 0x0004
+@@ -116,6 +118,8 @@
+ 
+ #define SPI_NUM_CHIPSELECTS   4
+ 
++#define SPI_MAX_XFER  (SZ_64K - 64)
++
+ /* high speed mode is when bus rate is greater then 26MHz */
+ #define SPI_HS_MIN_RATE   2600
+ #define SPI_MAX_RATE  5000
+@@ -143,6 +147,17 @@ struct spi_qup {
+   int tx_bytes;
+   int rx_bytes;
+   int qup_v1;
++
++  int use_dma;
++
++  struct dma_chan *rx_chan;
++  struct dma_slave_config rx_conf;
++  struct dma_chan *tx_chan;
++  struct dma_slave_config tx_conf;
++  dma_addr_t  rx_dma;
++  dma_addr_t  tx_dma;
++  void*dummy;
++  atomic_tdma_outstanding;
+ };
+ 
+ 
+@@ -266,6 +281,221 @@ static void spi_qup_fifo_write(struct sp
+   }
+ }
+ 
++static void qup_dma_callback(void *data)
++{
++  struct spi_qup *controller = data;
++
++  if (atomic_dec_and_test(controller-dma_outstanding))
++  

[OpenWrt-Devel] [PATCH 4/4] ipq806x: enable NOR flash support in the kernel config

2015-02-10 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari math...@codeaurora.org
---
 target/linux/ipq806x/config-3.18 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index d45862b..22d8092 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -221,6 +221,8 @@ CONFIG_MSM_IOMMU=y
 CONFIG_MSM_MMCC_8960=y
 CONFIG_MSM_MMCC_8974=y
 CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_SUPPORT=y
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-10 Thread Daniel Gimpelevich
John Crispin j...@phrozen.org writes:
 
 
 On 10/02/2015 19:35, Joerg Hollmann wrote:
  Hello Daniel,
  
  could it be, that the definition of the kernel partition in the dts
  file of your device ist too small?
 
 i think the problem is that spi-gpio is either not loaded or loaded
 too late. i wont have time to look at it till friday though.
 
  I have seen similar error messages on the builds for the VG3503J.
 
 there is a kernel part defined in the dts ? the mtdsplit should handle
 it for your. i'll look at that aswell, only tested a initramfs on the
 VG3503J

Booting an initramfs of 3.18 succeeds but still does not detect the
SPI flash. It also uses a wrong macaddr, no doubt due to the following
wrong logic in 0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch

--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -161,7 +161,7 @@ struct ltq_etop_priv {
int tx_irq;
int rx_irq;
 
-   const void *mac;
+   void *mac;
int mii_mode;
 
spinlock_t lock;
@@ -840,7 +840,11 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
 
-   memcpy(mac, priv-pldata-mac, sizeof(struct sockaddr));
+   if (priv-mac)
+   memcpy(mac, priv-mac, sizeof(struct sockaddr));
+   else
+   memcpy(mac, ltq_get_eth_mac(), sizeof(struct sockaddr))
+
if (!is_valid_ether_addr(mac.sa_data)) {
pr_warn(etop: invalid MAC, using random\n);
eth_random_addr(mac.sa_data);

This stuffs the macaddr into the wrong field of the sockaddr and reads
beyond the end of the macaddr. The corresponding patch to 3.14 was right
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] ipq806x: add JFFS2 mark at the end of the squashfs

2015-02-10 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari math...@codeaurora.org
---
 target/linux/ipq806x/image/Makefile | 4 
 1 file changed, 4 insertions(+)

diff --git a/target/linux/ipq806x/image/Makefile 
b/target/linux/ipq806x/image/Makefile
index 977e674..77d191f 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -24,6 +24,10 @@ define Image/BuildKernel
$(call Image/BuildKernel/FIT,qcom-ipq8064-ap148)
 endef
 
+define Image/Build/squashfs
+   $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+endef
+
 define Image/Build
$(call Image/Build/$(1),$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-root.img bs=2k 
conv=sync
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-10 Thread Daniel Gimpelevich
Is there a patchset I could try?

On Mon, 2015-02-09 at 12:44 -0800, Daniel Gimpelevich wrote:
 On Mon, 2015-02-09 at 21:27 +0100, John Crispin wrote:
  bootlog please
  
  On 09/02/2015 21:25, Daniel Gimpelevich wrote:
   On Mon, 2015-02-09 at 19:18 +0100, John Crispin wrote:
   try r44366 or newer please
   
   SPI flash is not detected, bricking the device.
   
 
 [0.00] Linux version 3.18.6 (danielg4@chimera) (gcc version 4.8.3 
 (OpenWrt/Linaro GCC 4.8-2014.04 r43982) ) #3 Mon Feb 9 115
 [0.00] SoC: AR9 rev 1.2
 [0.00] bootconsole [early0] enabled
 [0.00] CPU0 revision is: 0001954c (MIPS 34Kc)
 [0.00] MIPS: machine is DGN3500 - Netgear DGN3500
 [0.00] Determined physical RAM map:
 [0.00]  memory: 0400 @  (usable)
 [0.00] User-defined physical RAM map:
 [0.00]  memory: 0400 @  (usable)
 [0.00] Initrd not found or empty - disabling initrd
 [0.00] Zone ranges:
 [0.00]   Normal   [mem 0x-0x03ff]
 [0.00] Movable zone start for each node
 [0.00] Early memory node ranges
 [0.00]   node   0: [mem 0x-0x03ff]
 [0.00] Initmem setup node 0 [mem 0x-0x03ff]
 [0.00] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
 [0.00] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 
 bytes
 [0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
 pages: 16256
 [0.00] Kernel command line: root=/dev/mtdblock0 
 ip=192.168.1.1:192.168.1.15eth0:on console=ttyS1,115200 ethaddr=30:46:90
 [0.00] PID hash table entries: 256 (order: -2, 1024 bytes)
 [0.00] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
 [0.00] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
 [0.00] Writing ErrCtl register=5880
 [0.00] Readback ErrCtl register=5880
 [0.00] Memory: 60404K/65536K available (3312K kernel code, 147K 
 rwdata, 664K rodata, 144K init, 194K bss, 5132K reserved)
 [0.00] NR_IRQS:256
 [0.00] CPU Clock: 333MHz
 [0.00] Calibrating delay loop... 221.18 BogoMIPS (lpj=442368)
 [0.036000] pid_max: default: 32768 minimum: 301
 [0.04] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
 [0.044000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 
 bytes)
 [0.052000] pinctrl core: initialized pinctrl subsystem
 [0.056000] NET: Registered protocol family 16
 [0.064000] pinctrl-xway 1e100b10.pinmux: Init done
 [0.068000] dma-xway 1e104100.dma: Init done - hw rev: 6, ports: 5, 
 channels: 20
 [0.076000] PCI host bridge /fpi@1000/pci@E105400 ranges:
 [0.08]  MEM 0x1800..0x19ff
 [0.084000]   IO 0x1ae0..0x1aff
 [0.088000] ath9k,eeprom ath9k_eep: failed to load eeprom address
 [0.10] usbcore: registered new interface driver usbfs
 [0.104000] usbcore: registered new interface driver hub
 [0.108000] usbcore: registered new device driver usb
 [0.112000] PCI host bridge to bus :00
 [0.116000] pci_bus :00: root bus resource [mem 0x1800-0x19ff]
 [0.12] pci_bus :00: root bus resource [io  0x]
 [0.124000] pci_bus :00: No busn resource found for root bus, will use 
 [bus 00-ff]
 [0.128000] pci :00:0e.0: BAR 0: assigned [mem 0x1800-0x1800]
 [0.132000] Switched to clocksource MIPS
 [0.136000] NET: Registered protocol family 2
 [0.144000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
 [0.148000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
 [0.156000] TCP: Hash tables configured (established 1024 bind 1024)
 [0.164000] TCP: reno registered
 [0.164000] UDP hash table entries: 256 (order: 0, 4096 bytes)
 [0.172000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
 [0.18] NET: Registered protocol family 1
 [0.184000] gptu: totally 6 16-bit timers/counters
 [0.188000] gptu: misc_register on minor 63
 [0.192000] gptu: succeeded to request irq 126
 [0.196000] gptu: succeeded to request irq 127
 [0.20] gptu: succeeded to request irq 128
 [0.204000] gptu: succeeded to request irq 129
 [0.212000] gptu: succeeded to request irq 130
 [0.216000] gptu: succeeded to request irq 131
 [0.22] futex hash table entries: 256 (order: -1, 3072 bytes)
 [0.228000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
 [0.236000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) 
 (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
 [0.248000] msgmni has been set to 117
 [0.252000] io scheduler noop registered
 [0.256000] io scheduler deadline registered (default)
 [0.26] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, 
 base_baud = 0) is a lantiq,asc
 [0.268000] console [ttyLTQ0] 

Re: [OpenWrt-Devel] More bad RPATH

2015-02-10 Thread Jo-Philipp Wich
Hi Etienne,

so we should keep rpaths below /usr/lib/ or /lib/ and remove everything
else including exactly /usr/lib and /lib (with or without trailing /) ?

~ Jow



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] raspberry pi v3.19

2015-02-10 Thread Álvaro Fernández Rojas
The pins you said are the right ones. However, if anything fails before the 
kernel is booted you won't get any output. You could try booting a 3.14 image 
and check if you are properly connected to the uart.

It may be some wrong configuration related to the recently added DT support, 
which expects a DTB and since no DTB is passed from the bootloader, the kernel 
crashes before any output.

 El 10/2/2015, a las 6:29, John Crispin blo...@openwrt.org escribió:
 
 ok, so uart, how do you connect it ?
 
 On 10/02/2015 02:02, Álvaro Fernández Rojas wrote:
 I tried adding support for 3.18 and I have issues booting the raspberry. 
 There must be something wrong with the new mmc driver, because it detects 
 the SD card insertions/extractiones, but doesn't read the partitions:
 http://pastebin.com/GWFYrXnT
 
 My patches:
 http://files.noltari.es/openwrt/bcm2708/brcm2708_3-18.tgz
 
 Regards,
 Álvaro.
 
 El 09/02/2015 a las 18:12, Florian Fainelli escribió:
 On Feb 9, 2015 4:25 AM, John Crispin blo...@openwrt.org 
 mailto:blo...@openwrt.org wrote:
 
 Hi,
 
 i synced our rpi port with the upstream tree on github. it boots and i
 can see the coloured palette test pic on the hdmi, however ethernet
 fails to come up. i attached a uart just to find out that my rpi is
 either broken or i am connecting it wrong.
 
 has anyone managed to get uart working ? to my understanding i need to
 connect pin6 to gnd and use 8 and 10 for the 2 data lines. should i see
 output from the bootloader prior to board detecting/loading the sd card
 
 You will not get any UART output prior to the kernel boot, the GPU boot 
 code does not output anything (at least not in the builds we use).
 
 Could you share the boot log to see if there is anything obvious?
 
 
John
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org mailto:openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
 
 
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] hostapd: add switch_chan and set_vendor_elements ubus methods

2015-02-10 Thread Zefir Kurtisi
Signed-off-by: Zefir Kurtisi zefir.kurt...@neratec.com
---
 src/ap/ubus.c | 82 +++
 1 file changed, 82 insertions(+)

diff --git a/src/ap/ubus.c b/src/ap/ubus.c
index 1030d58..a8853a0 100644
--- a/src/ap/ubus.c
+++ b/src/ap/ubus.c
@@ -17,6 +17,12 @@
 
 static struct blob_buf b;
 
+static inline struct hostapd_data *get_hapd_from_object(struct ubus_object 
*obj)
+{
+   return container_of(obj, struct hostapd_data, ubus.obj);
+}
+
+
 struct ubus_banned_client {
struct avl_node avl;
u8 addr[ETH_ALEN];
@@ -234,12 +240,88 @@ hostapd_bss_wps_cancel(struct ubus_context *ctx, struct 
ubus_object *obj,
return 0;
 }
 
+enum {
+   CSA_FREQ,
+   CSA_BCN_COUNT,
+   __CSA_MAX
+};
+
+static const struct blobmsg_policy csa_policy[__CSA_MAX] = {
+   /*
+* for now, frequency and beacon count are enough, add more
+* parameters on demand
+*/
+   [CSA_FREQ] = { freq, BLOBMSG_TYPE_INT32 },
+   [CSA_BCN_COUNT] = { bcn_count, BLOBMSG_TYPE_INT32 },
+};
+
+static int
+hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
+   struct ubus_request_data *req, const char *method,
+   struct blob_attr *msg)
+{
+   struct blob_attr *tb[__CSA_MAX];
+   struct hostapd_data *hapd = get_hapd_from_object(obj);
+   struct csa_settings css;
+
+   blobmsg_parse(csa_policy, __CSA_MAX, tb, blob_data(msg), blob_len(msg));
+
+   if (!tb[CSA_FREQ])
+   return UBUS_STATUS_INVALID_ARGUMENT;
+
+   memset(css, 0, sizeof(css));
+   css.freq_params.freq = blobmsg_get_u32(tb[CSA_FREQ]);
+   if (tb[CSA_BCN_COUNT])
+   css.cs_count = blobmsg_get_u32(tb[CSA_BCN_COUNT]);
+
+   if (hostapd_switch_channel(hapd, css) != 0)
+   return UBUS_STATUS_NOT_SUPPORTED;
+   return UBUS_STATUS_OK;
+}
+
+enum {
+   VENDOR_ELEMENTS,
+   __VENDOR_ELEMENTS_MAX
+};
+
+static const struct blobmsg_policy ve_policy[__VENDOR_ELEMENTS_MAX] = {
+   /* vendor elements are provided as hex-string */
+   [VENDOR_ELEMENTS] = { vendor_elements, BLOBMSG_TYPE_STRING },
+};
+
+static int
+hostapd_vendor_elements(struct ubus_context *ctx, struct ubus_object *obj,
+   struct ubus_request_data *req, const char *method,
+   struct blob_attr *msg)
+{
+   struct blob_attr *tb[__VENDOR_ELEMENTS_MAX];
+   struct hostapd_data *hapd = get_hapd_from_object(obj);
+
+   blobmsg_parse(ve_policy, __VENDOR_ELEMENTS_MAX, tb,
+ blob_data(msg), blob_len(msg));
+
+   if (!tb[VENDOR_ELEMENTS])
+   return UBUS_STATUS_INVALID_ARGUMENT;
+
+   const char *vendor_elements = blobmsg_data(tb[VENDOR_ELEMENTS]);
+   if (hostapd_set_iface(hapd-iconf, hapd-conf, vendor_elements,
+ vendor_elements) != 0)
+   return UBUS_STATUS_NOT_SUPPORTED;
+
+   /* update beacons if vendor elements were set successfully */
+   if (ieee802_11_update_beacons(hapd-iface) != 0)
+   return UBUS_STATUS_NOT_SUPPORTED;
+   return UBUS_STATUS_OK;
+}
+
 static const struct ubus_method bss_methods[] = {
UBUS_METHOD_NOARG(get_clients, hostapd_bss_get_clients),
UBUS_METHOD(del_client, hostapd_bss_del_client, del_policy),
UBUS_METHOD_NOARG(list_bans, hostapd_bss_list_bans),
UBUS_METHOD_NOARG(wps_start, hostapd_bss_wps_start),
UBUS_METHOD_NOARG(wps_cancel, hostapd_bss_wps_cancel),
+   UBUS_METHOD(switch_chan, hostapd_switch_chan, csa_policy),
+   UBUS_METHOD(set_vendor_elements, hostapd_vendor_elements, ve_policy),
 };
 
 static struct ubus_object_type bss_object_type =
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] raspberry pi v3.19

2015-02-10 Thread Álvaro Fernández Rojas
I could finally boot 3.18 by loading the rootfs from USB:
http://pastebin.com/b4dX0X7B

Everything seems to be working fine, still no clue about the SD issues...
http://pastebin.com/G61ALvLX

El 10/02/2015 a las 11:09, Álvaro Fernández Rojas escribió:
 The pins you said are the right ones. However, if anything fails before the 
 kernel is booted you won't get any output. You could try booting a 3.14 image 
 and check if you are properly connected to the uart.
 
 It may be some wrong configuration related to the recently added DT support, 
 which expects a DTB and since no DTB is passed from the bootloader, the 
 kernel crashes before any output.
 
 El 10/2/2015, a las 6:29, John Crispin blo...@openwrt.org escribió:

 ok, so uart, how do you connect it ?

 On 10/02/2015 02:02, Álvaro Fernández Rojas wrote:
 I tried adding support for 3.18 and I have issues booting the raspberry. 
 There must be something wrong with the new mmc driver, because it detects 
 the SD card insertions/extractiones, but doesn't read the partitions:
 http://pastebin.com/GWFYrXnT

 My patches:
 http://files.noltari.es/openwrt/bcm2708/brcm2708_3-18.tgz

 Regards,
 Álvaro.

 El 09/02/2015 a las 18:12, Florian Fainelli escribió:
 On Feb 9, 2015 4:25 AM, John Crispin blo...@openwrt.org 
 mailto:blo...@openwrt.org wrote:

 Hi,

 i synced our rpi port with the upstream tree on github. it boots and i
 can see the coloured palette test pic on the hdmi, however ethernet
 fails to come up. i attached a uart just to find out that my rpi is
 either broken or i am connecting it wrong.

 has anyone managed to get uart working ? to my understanding i need to
 connect pin6 to gnd and use 8 and 10 for the 2 data lines. should i see
 output from the bootloader prior to board detecting/loading the sd card

 You will not get any UART output prior to the kernel boot, the GPU boot 
 code does not output anything (at least not in the builds we use).

 Could you share the boot log to see if there is anything obvious?


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



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

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


[OpenWrt-Devel] [PATCH 0/5] Enhancement for kexec of MIPS kernel

2015-02-10 Thread Yousong Zhou
This series mainly tries to

 - Allow users to select lzma support of kexec-tools.
 - Allow lzma and gzip support of kexec-tools coexist in one build.
 - Fix the invalid memory segment error when trying to use kexec to load a
   kernel within QEMU Malta machine.
 - Make the kernel use the specified --command-line parameter from kexec to
   boot the crashkernel.

The first 2 patches though not strictly related to what the subject line means,
are included here because they were produced when testing the other patches
against v3.19 kernel.

Previously this series was tested on real devices including HiWiFi HC6361,
WDR4300.  However, this version was only tested on QEMU Malta machine with
against each kernel patched in this series, including 3.19.  I expect them
should still work on real devices though.

Behaviour changes compared with previous RFC version.

 - Kernel command line argument kexec  supplied by userspace kexec tool is
   now preserved as a mark for kexec-assisted reboot.  Though it will be again
   ignored by kernel boot code of Malta machine.
 - Debug output from decompressing routines of kexec-tools are now printed with
   dbgprintf().
 - Patch 100-reduce_size.patch is now dropped mainly because the size reduction
   is considered marginal.

Yousong Zhou (5):
  generic: add a few missing symbols for generic config-3.19.
  malta: add config file for kernel 3.19.
  generic: improve kexec support of MIPS.
  kexec-tools: show up only when KERNEL_KEXEC is enabled.
  kexec-tools: bump version from v2.0.4 to v2.0.9.

 package/boot/kexec-tools/Config.in |5 +
 package/boot/kexec-tools/Makefile  |   12 +-
 .../patches/0001-Fix-zlib-lzma-decompression.patch |  171 +++
 ...c-apply-necessary-quotes-to-result-of-mac.patch |   52 
 ...mpiler-warning-on-printing-64-bit-integer.patch |   35 +++
 .../patches/0004-mips-remove-unused-variable.patch |   30 ++
 .../kexec-tools/patches/0004-mips_regdefs.patch|  103 ---
 ...ix-warning-about-implicit-type-conversion.patch |   30 ++
 .../boot/kexec-tools/patches/100-reduce_size.patch |   36 ---
 target/linux/generic/config-3.19   |2 +
 ...Mark-kernel-code-and-kernel-data-segments.patch |   37 +++
 ...Accept-command-line-parameters-from-users.patch |  305 +++
 ...Mark-kernel-code-and-kernel-data-segments.patch |   39 +++
 ...Accept-command-line-parameters-from-users.patch |  304 +++
 ...Mark-kernel-code-and-kernel-data-segments.patch |   39 +++
 ...Accept-command-line-parameters-from-users.patch |  308 
 ...Mark-kernel-code-and-kernel-data-segments.patch |   39 +++
 ...Accept-command-line-parameters-from-users.patch |  308 
 target/linux/malta/config-3.19 |  256 
 19 files changed, 1966 insertions(+), 145 deletions(-)
 create mode 100644 
package/boot/kexec-tools/patches/0001-Fix-zlib-lzma-decompression.patch
 create mode 100644 
package/boot/kexec-tools/patches/0002-configure.ac-apply-necessary-quotes-to-result-of-mac.patch
 create mode 100644 
package/boot/kexec-tools/patches/0003-mips-fix-compiler-warning-on-printing-64-bit-integer.patch
 create mode 100644 
package/boot/kexec-tools/patches/0004-mips-remove-unused-variable.patch
 delete mode 100644 package/boot/kexec-tools/patches/0004-mips_regdefs.patch
 create mode 100644 
package/boot/kexec-tools/patches/0005-mips-fix-warning-about-implicit-type-conversion.patch
 delete mode 100644 package/boot/kexec-tools/patches/100-reduce_size.patch
 create mode 100644 
target/linux/generic/patches-3.10/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 create mode 100644 
target/linux/generic/patches-3.10/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 create mode 100644 
target/linux/generic/patches-3.14/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 create mode 100644 
target/linux/generic/patches-3.14/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 create mode 100644 
target/linux/generic/patches-3.18/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 create mode 100644 
target/linux/generic/patches-3.18/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 create mode 100644 
target/linux/generic/patches-3.19/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 create mode 100644 
target/linux/generic/patches-3.19/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 create mode 100644 target/linux/malta/config-3.19

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


[OpenWrt-Devel] [PATCH] relayd: add host route on local ip arp request

2015-02-10 Thread Alejandro Enrique
This patch fixes relayd not adding a host on an ARP request for the local
IP address.
When relayd is launched using the -L option, it was not adding the
necessary host routes when it receives an ARP request for the local
IP address.

This issue makes a host not able to connect to the device running
relayd until there is ARP traffic involving a third host.

Signed-off-by: Alejandro Enrique alejandro.enri...@fon.com
---
 .../001-add_host_on_local_arp_request.patch|   22 
 1 file changed, 22 insertions(+)
 create mode 100644 
package/network/services/relayd/patches/001-add_host_on_local_arp_request.patch

diff --git 
a/package/network/services/relayd/patches/001-add_host_on_local_arp_request.patch
 
b/package/network/services/relayd/patches/001-add_host_on_local_arp_request.patch
new file mode 100644
index 000..aa7dfc7
--- /dev/null
+++ 
b/package/network/services/relayd/patches/001-add_host_on_local_arp_request.patch
@@ -0,0 +1,22 @@
+--- a/main.c
 b/main.c
+@@ -386,15 +386,15 @@ static void recv_arp_request(struct rela
+   if (!memcmp(pkt-arp.arp_spa, \x00\x00\x00\x00, 4))
+   return;
+ 
++  host = find_host_by_ipaddr(NULL, pkt-arp.arp_spa);
++  if (!host || host-rif != rif)
++  relayd_refresh_host(rif, pkt-eth.ether_shost, 
pkt-arp.arp_spa);
++
+   if (local_route_table  !memcmp(pkt-arp.arp_tpa, local_addr, 
sizeof(local_addr))) {
+   send_arp_reply(rif, local_addr, pkt-arp.arp_sha, 
pkt-arp.arp_spa);
+   return;
+   }
+ 
+-  host = find_host_by_ipaddr(NULL, pkt-arp.arp_spa);
+-  if (!host || host-rif != rif)
+-  relayd_refresh_host(rif, pkt-eth.ether_shost, 
pkt-arp.arp_spa);
+-
+   host = find_host_by_ipaddr(NULL, pkt-arp.arp_tpa);
+ 
+   /*
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] relayd: improve host detection on interface change

2015-02-10 Thread Alejandro Enrique
This patch improve host detection and refresh when it moves from and
interface to another by pinging for it on all managed interfaces.

Previous to this patch host expiration was done by pinging for it on
the last interface it was known to be. If it does not reply after a
number of retries it will be expired and its entries
deleted. Nevertheless, if the host has moved to another managed
interface it will not be detected until there is some ARP packet sent
by the host.

This detection can be improved by pinging for the host on all managed
interfaces instead of just the one where it is supposed to be
connected, as it will reply to the ARP ping on the new interface it is
connected to and a host refresh will be triggered.

Signed-off-by: Alejandro Enrique alejandro.enri...@fon.com
---
 .../patches/003-arping_on_all_interfaces.patch |   21 
 1 file changed, 21 insertions(+)
 create mode 100644 
package/network/services/relayd/patches/003-arping_on_all_interfaces.patch

diff --git 
a/package/network/services/relayd/patches/003-arping_on_all_interfaces.patch 
b/package/network/services/relayd/patches/003-arping_on_all_interfaces.patch
new file mode 100644
index 000..9321585
--- /dev/null
+++ b/package/network/services/relayd/patches/003-arping_on_all_interfaces.patch
@@ -0,0 +1,21 @@
+--- a/main.c
 b/main.c
+@@ -252,6 +252,7 @@ static void send_arp_reply(struct relayd
+ static void host_entry_timeout(struct uloop_timeout *timeout)
+ {
+   struct relayd_host *host = container_of(timeout, struct relayd_host, 
timeout);
++  struct relayd_interface *rif;
+ 
+   /*
+* When a host is behind a managed interface, we must not expire its 
host
+@@ -261,7 +262,9 @@ static void host_entry_timeout(struct ul
+* giving up on it.
+*/
+   if (host-rif-managed  host-cleanup_pending  host_ping_tries) {
+-  send_arp_request(host-rif, host-ipaddr);
++  list_for_each_entry(rif, interfaces, list) {
++  send_arp_request(rif, host-ipaddr);
++  }
+   host-cleanup_pending++;
+   uloop_timeout_set(host-timeout, 1000);
+   return;
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] relayd: fix missing -p command line argument

2015-02-10 Thread Alejandro Enrique
Option -p was not being accepted as it was missing in getopt parameter
list

Signed-off-by: Alejandro Enrique alejandro.enri...@fon.com
---
 .../services/relayd/patches/002-fix_expiry_retries.patch|   11 +++
 1 file changed, 11 insertions(+)
 create mode 100644 
package/network/services/relayd/patches/002-fix_expiry_retries.patch

diff --git 
a/package/network/services/relayd/patches/002-fix_expiry_retries.patch 
b/package/network/services/relayd/patches/002-fix_expiry_retries.patch
new file mode 100644
index 000..1f2a0ad
--- /dev/null
+++ b/package/network/services/relayd/patches/002-fix_expiry_retries.patch
@@ -0,0 +1,11 @@
+--- a/main.c
 b/main.c
+@@ -719,7 +719,7 @@ int main(int argc, char **argv)
+   local_route_table = 0;
+   uloop_init();
+ 
+-  while ((ch = getopt(argc, argv, I:i:t:BDdT:G:R:L:)) != -1) {
++  while ((ch = getopt(argc, argv, I:i:t:p:BDdT:G:R:L:)) != -1) {
+   switch(ch) {
+   case 'I':
+   managed = true;
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ar71xx:Add QCA953X version2 SoC support

2015-02-10 Thread John Crispin
Hi,

late reply, see below

On 01/02/2015 13:48, Chuanhong Guo wrote:
 From: 郭传鈜 gch981...@gmail.com
 
 This patch adds support for QCA953Xv2 SoC.
 I got this patch from QSDK here: 
 https://www.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/tree/target/linux/ar71xx/patches-3.3/627-QCA-MIPS-ath79-add-QCA9531-version2-support.patch?h=release/banana_10.4_c1
 This patch is tested on QCA9533-BL3A and everything seems to be OK.
 Signed-off-by: 郭传鈜 gch981...@gmail.com
 ---
  ...6-MIPS-ath79-add-QCA953X-version2-support.patch | 41 
 ++
  1 file changed, 41 insertions(+)
  create mode 100644 
 target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-QCA953X-version2-support.patch
 
 diff --git 
 a/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-QCA953X-version2-support.patch
  
 b/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-QCA953X-version2-support.patch

[...]


 +--- a/arch/mips/ath79/setup.c
  b/arch/mips/ath79/setup.c
 +@@ -152,10 +152,13 @@
 + rev = id  AR934X_REV_ID_REVISION_MASK;
 + break;
 + 
 +-case REV_ID_MAJOR_QCA9533:
 ++case REV_ID_MAJOR_QCA9533_V1:
 ++case REV_ID_MAJOR_QCA9533_V2:
 + ath79_soc = ATH79_SOC_QCA9533;
 + chip = 9533;
 + rev = id  QCA953X_REV_ID_REVISION_MASK;
 ++if (major == REV_ID_MAJOR_QCA9533_V2)
 ++rev = 2;

i wanted to confirm this first and it turns out it is almost correct
there is one case missing. after confirming with mathieu (thanks!) the
following ids should be used

0x140 – v1.0
0x141 – v1.1
0x160 – v2.0

i will rework your patch in the morning and add both of the new ids.

John



 + break;
 + 
 + case REV_ID_MAJOR_QCA9556:
 +--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
  b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
 +@@ -709,7 +709,8 @@
 + #define REV_ID_MAJOR_AR9341 0x0120
 + #define REV_ID_MAJOR_AR9342 0x1120
 + #define REV_ID_MAJOR_AR9344 0x2120
 +-#define REV_ID_MAJOR_QCA95330x0140
 ++#define REV_ID_MAJOR_QCA9533_V1 0x0140
 ++#define REV_ID_MAJOR_QCA9533_V2 0x0160
 + #define REV_ID_MAJOR_QCA95560x0130
 + #define REV_ID_MAJOR_QCA95580x1130
 + #define REV_ID_MAJOR_TP9343 0x0150
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-10 Thread John Crispin


On 10/02/2015 19:35, Joerg Hollmann wrote:
 Hello Daniel,
 
 could it be, that the definition of the kernel partition in the dts
 file of your device ist too small?

i think the problem is that spi-gpio is either not loaded or loaded
too late. i wont have time to look at it till friday though.

 I have seen similar error messages on the builds for the VG3503J.

there is a kernel part defined in the dts ? the mtdsplit should handle
it for your. i'll look at that aswell, only tested a initramfs on the
VG3503J

John

 
 Regards, Joerg
 
 On 02/10/2015 10:40 AM, Daniel Gimpelevich wrote:
 Is there a patchset I could try?
 
 On Mon, 2015-02-09 at 12:44 -0800, Daniel Gimpelevich wrote:
 On Mon, 2015-02-09 at 21:27 +0100, John Crispin wrote:
 bootlog please
 
 On 09/02/2015 21:25, Daniel Gimpelevich wrote:
 On Mon, 2015-02-09 at 19:18 +0100, John Crispin wrote:
 try r44366 or newer please
 SPI flash is not detected, bricking the device.
 
 [0.00] Linux version 3.18.6 (danielg4@chimera) (gcc
 version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43982) ) #3 Mon
 Feb 9 115 [0.00] SoC: AR9 rev 1.2 [0.00]
 bootconsole [early0] enabled [0.00] CPU0 revision is:
 0001954c (MIPS 34Kc) [0.00] MIPS: machine is DGN3500 -
 Netgear DGN3500 [0.00] Determined physical RAM map: [
 0.00]  memory: 0400 @  (usable) [0.00]
 User-defined physical RAM map: [0.00]  memory: 0400
 @  (usable) [0.00] Initrd not found or empty -
 disabling initrd [0.00] Zone ranges: [0.00]
 Normal   [mem 0x-0x03ff] [0.00] Movable
 zone start for each node [0.00] Early memory node
 ranges [0.00]   node   0: [mem 0x-0x03ff] [
 0.00] Initmem setup node 0 [mem 0x-0x03ff] [
 0.00] Primary instruction cache 32kB, VIPT, 4-way,
 linesize 32 bytes. [0.00] Primary data cache 16kB,
 4-way, VIPT, no aliases, linesize 32 bytes [0.00] Built
 1 zonelists in Zone order, mobility grouping on.  Total pages:
 16256 [0.00] Kernel command line: root=/dev/mtdblock0 
 ip=192.168.1.1:192.168.1.15eth0:on console=ttyS1,115200 
 ethaddr=30:46:90 [0.00] PID hash table entries: 256
 (order: -2, 1024 bytes) [0.00] Dentry cache hash table
 entries: 8192 (order: 3, 32768 bytes) [0.00]
 Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) [
 0.00] Writing ErrCtl register=5880 [0.00]
 Readback ErrCtl register=5880 [0.00] Memory:
 60404K/65536K available (3312K kernel code, 147K rwdata, 664K
 rodata, 144K init, 194K bss, 5132K reserved) [0.00]
 NR_IRQS:256 [0.00] CPU Clock: 333MHz [0.00]
 Calibrating delay loop... 221.18 BogoMIPS (lpj=442368) [
 0.036000] pid_max: default: 32768 minimum: 301 [0.04]
 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [
 0.044000] Mountpoint-cache hash table entries: 1024 (order: 0, 
 4096 bytes) [0.052000] pinctrl core: initialized pinctrl
 subsystem [0.056000] NET: Registered protocol family 16 [
 0.064000] pinctrl-xway 1e100b10.pinmux: Init done [
 0.068000] dma-xway 1e104100.dma: Init done - hw rev: 6, ports: 
 5, channels: 20 [0.076000] PCI host bridge
 /fpi@1000/pci@E105400 ranges: [0.08]  MEM
 0x1800..0x19ff [0.084000]   IO
 0x1ae0..0x1aff [0.088000]
 ath9k,eeprom ath9k_eep: failed to load eeprom address [
 0.10] usbcore: registered new interface driver usbfs [
 0.104000] usbcore: registered new interface driver hub [
 0.108000] usbcore: registered new device driver usb [
 0.112000] PCI host bridge to bus :00 [0.116000] pci_bus
 :00: root bus resource [mem 0x1800-0x19ff] [
 0.12] pci_bus :00: root bus resource [io  0x] [
 0.124000] pci_bus :00: No busn resource found for root
 bus, will use [bus 00-ff] [0.128000] pci :00:0e.0: BAR
 0: assigned [mem 0x1800-0x1800] [0.132000] Switched
 to clocksource MIPS [0.136000] NET: Registered protocol
 family 2 [0.144000] TCP established hash table entries:
 1024 (order: 0, 4096 bytes) [0.148000] TCP bind hash table
 entries: 1024 (order: 0, 4096 bytes) [0.156000] TCP: Hash
 tables configured (established 1024 bind 1024) [0.164000]
 TCP: reno registered [0.164000] UDP hash table entries: 256
 (order: 0, 4096 bytes) [0.172000] UDP-Lite hash table
 entries: 256 (order: 0, 4096 bytes) [0.18] NET:
 Registered protocol family 1 [0.184000] gptu: totally 6
 16-bit timers/counters [0.188000] gptu: misc_register on
 minor 63 [0.192000] gptu: succeeded to request irq 126 [
 0.196000] gptu: succeeded to request irq 127 [0.20]
 gptu: succeeded to request irq 128 [0.204000] gptu:
 succeeded to request irq 129 [0.212000] gptu: succeeded to
 request irq 130 [0.216000] gptu: succeeded to request irq
 131 [

Re: [OpenWrt-Devel] raspberry pi v3.19

2015-02-10 Thread John Crispin


On 10/02/2015 20:16, Álvaro Fernández Rojas wrote:
 It's based on https://github.com/raspberrypi/linux/tree/rpi-3.18.y-rebase

oh goddie, i wonder what i did wrong when trying the same ones.

 
 BTW, I'm also trying to get the Raspberry Pi 2 working before sending the 
 patches.
 

amazon wont ship mine till the 13th, so i wont be able to play with it
till start of next week. patches welcome, as always ;)



 El 10/02/2015 a las 20:02, John Crispin escribió:


 On 10/02/2015 19:53, Álvaro Fernández Rojas wrote:
 Okay, it's working now:
 http://files.noltari.es/openwrt/bcm2708/bcm2708_3-18_log.txt

 Patches:
 http://files.noltari.es/openwrt/bcm2708/brcm2708_3-18.tgz


 :-) one less todo off my list. just merged it locally and started a test
 build. which patches is this series based on ? i tried to make the ~150
 patches from the rpi repo on github work in the hope that they would
 also make the rpi2 work with openwrt.

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

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


Re: [OpenWrt-Devel] raspberry pi v3.19

2015-02-10 Thread John Crispin


On 10/02/2015 19:53, Álvaro Fernández Rojas wrote:
 Okay, it's working now:
 http://files.noltari.es/openwrt/bcm2708/bcm2708_3-18_log.txt
 
 Patches:
 http://files.noltari.es/openwrt/bcm2708/brcm2708_3-18.tgz
 

:-) one less todo off my list. just merged it locally and started a test
build. which patches is this series based on ? i tried to make the ~150
patches from the rpi repo on github work in the hope that they would
also make the rpi2 work with openwrt.

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


Re: [OpenWrt-Devel] raspberry pi v3.19

2015-02-10 Thread Álvaro Fernández Rojas
Okay, it's working now:
http://files.noltari.es/openwrt/bcm2708/bcm2708_3-18_log.txt

Patches:
http://files.noltari.es/openwrt/bcm2708/brcm2708_3-18.tgz

El 10/02/2015 a las 13:10, Álvaro Fernández Rojas escribió:
 I could finally boot 3.18 by loading the rootfs from USB:
 http://pastebin.com/b4dX0X7B
 
 Everything seems to be working fine, still no clue about the SD issues...
 http://pastebin.com/G61ALvLX
 
 El 10/02/2015 a las 11:09, Álvaro Fernández Rojas escribió:
 The pins you said are the right ones. However, if anything fails before the 
 kernel is booted you won't get any output. You could try booting a 3.14 
 image and check if you are properly connected to the uart.

 It may be some wrong configuration related to the recently added DT support, 
 which expects a DTB and since no DTB is passed from the bootloader, the 
 kernel crashes before any output.

 El 10/2/2015, a las 6:29, John Crispin blo...@openwrt.org escribió:

 ok, so uart, how do you connect it ?

 On 10/02/2015 02:02, Álvaro Fernández Rojas wrote:
 I tried adding support for 3.18 and I have issues booting the raspberry. 
 There must be something wrong with the new mmc driver, because it detects 
 the SD card insertions/extractiones, but doesn't read the partitions:
 http://pastebin.com/GWFYrXnT

 My patches:
 http://files.noltari.es/openwrt/bcm2708/brcm2708_3-18.tgz

 Regards,
 Álvaro.

 El 09/02/2015 a las 18:12, Florian Fainelli escribió:
 On Feb 9, 2015 4:25 AM, John Crispin blo...@openwrt.org 
 mailto:blo...@openwrt.org wrote:

 Hi,

 i synced our rpi port with the upstream tree on github. it boots and i
 can see the coloured palette test pic on the hdmi, however ethernet
 fails to come up. i attached a uart just to find out that my rpi is
 either broken or i am connecting it wrong.

 has anyone managed to get uart working ? to my understanding i need to
 connect pin6 to gnd and use 8 and 10 for the 2 data lines. should i see
 output from the bootloader prior to board detecting/loading the sd card

 You will not get any UART output prior to the kernel boot, the GPU boot 
 code does not output anything (at least not in the builds we use).

 Could you share the boot log to see if there is anything obvious?


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



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

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


Re: [OpenWrt-Devel] Support for DFS 5470 - 5725MHz DFS channels in US?

2015-02-10 Thread Ben West
Thank you for researching the issue upstream!  This message look like the
relevant patch for reverting the exclusion of those bands for US:

http://lists.infradead.org/pipermail/wireless-regdb/2015-January/000728.html

On Tue, Feb 10, 2015 at 1:03 AM, Dirk Neukirchen dirkneukirc...@web.de
wrote:

 On 10.02.2015 05:32, Ben West wrote:
  I found on a UBNT Nanostation running BB r43824 that apparently only a
  subset of the DFS 5.8GHz channels are enabled.
 
 
  This matches the channel definitions in the reg DB file:
 
 https://dev.openwrt.org/browser/trunk/package/kernel/mac80211/files/regdb.txt
 
  What is the reason for keeping channels 5470 - 5725 disabled, when that
  range is enabled, for example, for country DE?  People are operating UBNT
  products with stock firmware on these bands in the US.
 

 Different countries different regulatory rules.

 Upstream commit that removes 5470-5725 is:
 31dc1c5eca29d039ac8f26340defe44bd7e497c1

 This seems to be reverted by upstream
 with wireless-regdb (master-2015-01-30) [1]
 Updating the regdb should fix this.

 (I find no QCA feedback why this was introduced on the ML) [2]

 [1] http://marc.info/?l=linux-wirelessm=142263098201163
 [2]
 http://lists.infradead.org/pipermail/wireless-regdb/2015-January/000717.html
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel




-- 
Ben West
http://gowasabi.net
b...@gowasabi.net
314-246-9434
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] raspberry pi v3.19

2015-02-10 Thread Álvaro Fernández Rojas
It's based on https://github.com/raspberrypi/linux/tree/rpi-3.18.y-rebase

BTW, I'm also trying to get the Raspberry Pi 2 working before sending the 
patches.

El 10/02/2015 a las 20:02, John Crispin escribió:
 
 
 On 10/02/2015 19:53, Álvaro Fernández Rojas wrote:
 Okay, it's working now:
 http://files.noltari.es/openwrt/bcm2708/bcm2708_3-18_log.txt

 Patches:
 http://files.noltari.es/openwrt/bcm2708/brcm2708_3-18.tgz

 
 :-) one less todo off my list. just merged it locally and started a test
 build. which patches is this series based on ? i tried to make the ~150
 patches from the rpi repo on github work in the hope that they would
 also make the rpi2 work with openwrt.
 
 thanks,
   John
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v1 0/7] Add custom TRX header option

2015-02-10 Thread Rafał Miłecki
On 9 February 2015 at 21:52, Florian Fainelli flor...@openwrt.org wrote:
 On 09/02/15 08:29, Will Sheppard wrote:
 Patchset to essentially add custom TRX header to all firmware produced.

 This is most useful for the Belkin routers from my experience. I'm not
 how other trx based firmwares modify the header for their own purposes.

 This is applied across the board so that the kernel, trx tools and mtd
 tools are all compiled with the specified header.

 I have modified the kernel specifically for the brcm47xx based boards to
 ensure the mtd parser looks for the correct magic. NOTE: This function will,
 for other boards, fail.

 I don't think this is desirable at all to have, for many reasons:

A quick comment: I agree.

This patchset looks hacky to me with all these magics set in config file.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/3] sunxi: add support for Linux 3.19

2015-02-10 Thread Rafał Miłecki
On 10 February 2015 at 15:09, Daniel Golle dan...@makrotopia.org wrote:
 simple-framebuffer now works on the A20.

I'm really not sure about other developers opinion (will be happy to
hear it), but I guess you could try to generate a patch using git and
git format-patch -C

That would allow ppl/developers to review changes you had to made.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] chance to gather info from a high density deployment

2015-02-10 Thread David Lang
I run the wireless network at the SCaLE conference which is taking place next 
week. I will be deploying ~50 WNDR3700v2 and WNDR3800 APs running OpenWRT to 
support ~3k users in the hotel (details available in the presentation/paper I 
gave at LISA '12 
https://www.usenix.org/conference/lisa12/technical-sessions/presentation/lang_david_wireless 
)


Since such high density environments are fairly rare and hard to get access to, 
I want to give the OpenWRT project a chance to gather information during the 
show. I will be building the image for this year in the next couple of days, so 
I can even patch in additional logging of data if needed. I will be building the 
firmware images in the next few days.


I gather syslogs and normal mrtg stats. I also gather the counts of associations 
to each ESSID each minute (I use social engineering to steer people to 5GHz by 
calling that network 'scale' and the 2.4GHz network 'scale-slow')


It was suggested that I see if I can gather 
/sys/kernel/debug/ieee80211/phy*/netdev:*/stations/*/rc_stats and xmit stats 
frequently (every 10s or so).


What else can/should I gather?

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


Re: [OpenWrt-Devel] [PATCH 1/3] kernel: 3.19 was released

2015-02-10 Thread Rafał Miłecki
 kernel: 3.19 was released

So what?

Commit message is supposed to describe the change, not what has happened.

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


Re: [OpenWrt-Devel] [PATCH 2/3] kernel: fix patches for 3.19

2015-02-10 Thread Rafał Miłecki
On 10 February 2015 at 15:06, Daniel Golle dan...@makrotopia.org wrote:
 130, 771 and 772 were merged upstream.
 304 had to be refreshed to apply on the new sources.

Nack.

This should be part of the previous patch. With current split of your
patches this one (2/3) fixes a kind of regression your just introduced
in 1/3.

Please merge these two patches into a single one.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/3] sunxi: add support for Linux 3.19

2015-02-10 Thread John Crispin


On 10/02/2015 22:42, Rafał Miłecki wrote:
 On 10 February 2015 at 15:09, Daniel Golle dan...@makrotopia.org
 wrote:
 simple-framebuffer now works on the A20.
 
 I'm really not sure about other developers opinion (will be happy
 to hear it), but I guess you could try to generate a patch using
 git and git format-patch -C
 
 That would allow ppl/developers to review changes you had to made.


zoltan maintains the sunxi target. he might already have done work on
this and might have some updates or whatever that he plans to
incorporate. bumping a kernel maintained actively always has the risk
of duplicating work and / or doing superfluous work



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


Re: [OpenWrt-Devel] lantiq v3.18

2015-02-10 Thread Sylwester Petela
Got problem with pci on P-2812HNU-F1, it was simply not initialized (missing 
whole pci part in bootlog), I've added target/linux/lantiq/xrx200/config-3.18 
from config-3.14(changed only UBI_GLUEBI to UBI_BLOCK), and pci went back, not 
sure how build config is generated but that solved my problem. VDSL Annex A is 
working atm, if anything regarding stability will happen I'll post an update.

Best Regards / Pozdrawiam
Sylwester Petela / ScApi

W dniu 2015-02-10 o 19:39, John Crispin pisze:

 On 10/02/2015 19:35, Joerg Hollmann wrote:
 Hello Daniel,

 could it be, that the definition of the kernel partition in the dts
 file of your device ist too small?
 i think the problem is that spi-gpio is either not loaded or loaded
 too late. i wont have time to look at it till friday though.

 I have seen similar error messages on the builds for the VG3503J.
 there is a kernel part defined in the dts ? the mtdsplit should handle
 it for your. i'll look at that aswell, only tested a initramfs on the
 VG3503J

   John

 Regards, Joerg

 On 02/10/2015 10:40 AM, Daniel Gimpelevich wrote:
 Is there a patchset I could try?

 On Mon, 2015-02-09 at 12:44 -0800, Daniel Gimpelevich wrote:
 On Mon, 2015-02-09 at 21:27 +0100, John Crispin wrote:
 bootlog please

 On 09/02/2015 21:25, Daniel Gimpelevich wrote:
 On Mon, 2015-02-09 at 19:18 +0100, John Crispin wrote:
 try r44366 or newer please
 SPI flash is not detected, bricking the device.

 [0.00] Linux version 3.18.6 (danielg4@chimera) (gcc
 version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43982) ) #3 Mon
 Feb 9 115 [0.00] SoC: AR9 rev 1.2 [0.00]
 bootconsole [early0] enabled [0.00] CPU0 revision is:
 0001954c (MIPS 34Kc) [0.00] MIPS: machine is DGN3500 -
 Netgear DGN3500 [0.00] Determined physical RAM map: [
 0.00]  memory: 0400 @  (usable) [0.00]
 User-defined physical RAM map: [0.00]  memory: 0400
 @  (usable) [0.00] Initrd not found or empty -
 disabling initrd [0.00] Zone ranges: [0.00]
 Normal   [mem 0x-0x03ff] [0.00] Movable
 zone start for each node [0.00] Early memory node
 ranges [0.00]   node   0: [mem 0x-0x03ff] [
 0.00] Initmem setup node 0 [mem 0x-0x03ff] [
 0.00] Primary instruction cache 32kB, VIPT, 4-way,
 linesize 32 bytes. [0.00] Primary data cache 16kB,
 4-way, VIPT, no aliases, linesize 32 bytes [0.00] Built
 1 zonelists in Zone order, mobility grouping on.  Total pages:
 16256 [0.00] Kernel command line: root=/dev/mtdblock0 
 ip=192.168.1.1:192.168.1.15eth0:on console=ttyS1,115200 
 ethaddr=30:46:90 [0.00] PID hash table entries: 256
 (order: -2, 1024 bytes) [0.00] Dentry cache hash table
 entries: 8192 (order: 3, 32768 bytes) [0.00]
 Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) [
 0.00] Writing ErrCtl register=5880 [0.00]
 Readback ErrCtl register=5880 [0.00] Memory:
 60404K/65536K available (3312K kernel code, 147K rwdata, 664K
 rodata, 144K init, 194K bss, 5132K reserved) [0.00]
 NR_IRQS:256 [0.00] CPU Clock: 333MHz [0.00]
 Calibrating delay loop... 221.18 BogoMIPS (lpj=442368) [
 0.036000] pid_max: default: 32768 minimum: 301 [0.04]
 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [
 0.044000] Mountpoint-cache hash table entries: 1024 (order: 0, 
 4096 bytes) [0.052000] pinctrl core: initialized pinctrl
 subsystem [0.056000] NET: Registered protocol family 16 [
 0.064000] pinctrl-xway 1e100b10.pinmux: Init done [
 0.068000] dma-xway 1e104100.dma: Init done - hw rev: 6, ports: 
 5, channels: 20 [0.076000] PCI host bridge
 /fpi@1000/pci@E105400 ranges: [0.08]  MEM
 0x1800..0x19ff [0.084000]   IO
 0x1ae0..0x1aff [0.088000]
 ath9k,eeprom ath9k_eep: failed to load eeprom address [
 0.10] usbcore: registered new interface driver usbfs [
 0.104000] usbcore: registered new interface driver hub [
 0.108000] usbcore: registered new device driver usb [
 0.112000] PCI host bridge to bus :00 [0.116000] pci_bus
 :00: root bus resource [mem 0x1800-0x19ff] [
 0.12] pci_bus :00: root bus resource [io  0x] [
 0.124000] pci_bus :00: No busn resource found for root
 bus, will use [bus 00-ff] [0.128000] pci :00:0e.0: BAR
 0: assigned [mem 0x1800-0x1800] [0.132000] Switched
 to clocksource MIPS [0.136000] NET: Registered protocol
 family 2 [0.144000] TCP established hash table entries:
 1024 (order: 0, 4096 bytes) [0.148000] TCP bind hash table
 entries: 1024 (order: 0, 4096 bytes) [0.156000] TCP: Hash
 tables configured (established 1024 bind 1024) [0.164000]
 TCP: reno registered [0.164000] UDP hash table entries: 256
 (order: 0, 4096 bytes) [0.172000] UDP-Lite hash table
 entries: 

Re: [OpenWrt-Devel] lantiq v3.18

2015-02-10 Thread John Crispin


On 10/02/2015 21:40, Sylwester Petela wrote:
 Got problem with pci on P-2812HNU-F1, it was simply not initialized (missing 
 whole pci part in bootlog), I've added target/linux/lantiq/xrx200/config-3.18 
 from config-3.14(changed only UBI_GLUEBI to UBI_BLOCK), and pci went back, 
 not sure how build config is generated but that solved my problem. VDSL Annex 
 A is working atm, if anything regarding stability will happen I'll post an 
 update.
 
 Best Regards / Pozdrawiam
 Sylwester Petela / ScApi

ok i only tested the pcie on the 8970, will diff the 2 config tomorrow
to figure out what the problem is

has anyone got a line that uses ptm ? i had to make an api update to the
ptm driver to get it to compile



 
 W dniu 2015-02-10 o 19:39, John Crispin pisze:

 On 10/02/2015 19:35, Joerg Hollmann wrote:
 Hello Daniel,

 could it be, that the definition of the kernel partition in the dts
 file of your device ist too small?
 i think the problem is that spi-gpio is either not loaded or loaded
 too late. i wont have time to look at it till friday though.

 I have seen similar error messages on the builds for the VG3503J.
 there is a kernel part defined in the dts ? the mtdsplit should handle
 it for your. i'll look at that aswell, only tested a initramfs on the
 VG3503J

  John

 Regards, Joerg

 On 02/10/2015 10:40 AM, Daniel Gimpelevich wrote:
 Is there a patchset I could try?

 On Mon, 2015-02-09 at 12:44 -0800, Daniel Gimpelevich wrote:
 On Mon, 2015-02-09 at 21:27 +0100, John Crispin wrote:
 bootlog please

 On 09/02/2015 21:25, Daniel Gimpelevich wrote:
 On Mon, 2015-02-09 at 19:18 +0100, John Crispin wrote:
 try r44366 or newer please
 SPI flash is not detected, bricking the device.

 [0.00] Linux version 3.18.6 (danielg4@chimera) (gcc
 version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r43982) ) #3 Mon
 Feb 9 115 [0.00] SoC: AR9 rev 1.2 [0.00]
 bootconsole [early0] enabled [0.00] CPU0 revision is:
 0001954c (MIPS 34Kc) [0.00] MIPS: machine is DGN3500 -
 Netgear DGN3500 [0.00] Determined physical RAM map: [
 0.00]  memory: 0400 @  (usable) [0.00]
 User-defined physical RAM map: [0.00]  memory: 0400
 @  (usable) [0.00] Initrd not found or empty -
 disabling initrd [0.00] Zone ranges: [0.00]
 Normal   [mem 0x-0x03ff] [0.00] Movable
 zone start for each node [0.00] Early memory node
 ranges [0.00]   node   0: [mem 0x-0x03ff] [
 0.00] Initmem setup node 0 [mem 0x-0x03ff] [
 0.00] Primary instruction cache 32kB, VIPT, 4-way,
 linesize 32 bytes. [0.00] Primary data cache 16kB,
 4-way, VIPT, no aliases, linesize 32 bytes [0.00] Built
 1 zonelists in Zone order, mobility grouping on.  Total pages:
 16256 [0.00] Kernel command line: root=/dev/mtdblock0 
 ip=192.168.1.1:192.168.1.15eth0:on console=ttyS1,115200 
 ethaddr=30:46:90 [0.00] PID hash table entries: 256
 (order: -2, 1024 bytes) [0.00] Dentry cache hash table
 entries: 8192 (order: 3, 32768 bytes) [0.00]
 Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) [
 0.00] Writing ErrCtl register=5880 [0.00]
 Readback ErrCtl register=5880 [0.00] Memory:
 60404K/65536K available (3312K kernel code, 147K rwdata, 664K
 rodata, 144K init, 194K bss, 5132K reserved) [0.00]
 NR_IRQS:256 [0.00] CPU Clock: 333MHz [0.00]
 Calibrating delay loop... 221.18 BogoMIPS (lpj=442368) [
 0.036000] pid_max: default: 32768 minimum: 301 [0.04]
 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [
 0.044000] Mountpoint-cache hash table entries: 1024 (order: 0, 
 4096 bytes) [0.052000] pinctrl core: initialized pinctrl
 subsystem [0.056000] NET: Registered protocol family 16 [
 0.064000] pinctrl-xway 1e100b10.pinmux: Init done [
 0.068000] dma-xway 1e104100.dma: Init done - hw rev: 6, ports: 
 5, channels: 20 [0.076000] PCI host bridge
 /fpi@1000/pci@E105400 ranges: [0.08]  MEM
 0x1800..0x19ff [0.084000]   IO
 0x1ae0..0x1aff [0.088000]
 ath9k,eeprom ath9k_eep: failed to load eeprom address [
 0.10] usbcore: registered new interface driver usbfs [
 0.104000] usbcore: registered new interface driver hub [
 0.108000] usbcore: registered new device driver usb [
 0.112000] PCI host bridge to bus :00 [0.116000] pci_bus
 :00: root bus resource [mem 0x1800-0x19ff] [
 0.12] pci_bus :00: root bus resource [io  0x] [
 0.124000] pci_bus :00: No busn resource found for root
 bus, will use [bus 00-ff] [0.128000] pci :00:0e.0: BAR
 0: assigned [mem 0x1800-0x1800] [0.132000] Switched
 to clocksource MIPS [0.136000] NET: Registered protocol
 family 2 [0.144000] TCP established hash table entries:
 1024 (order: 0, 4096 bytes) [0.148000] TCP 

Re: [OpenWrt-Devel] [PATCH 1/4] ipq806x: update target to v3.18

2015-02-10 Thread John Crispin
[...]

On 11/02/2015 03:38, Mathieu Olivari wrote:
 .../0179-spi-qup-Add-DMA-capabilities.patch|  490 -- 
 ...ARM-dts-Add-ADM-DMA-nodes-and-SPI-linkage.patch |   83 - 
 ...1-mtd-nand-qcom-Align-clk-and-reset-names.patch |   41 - 
 ...m-Kconfig-Make-drivers-mutually-exclusive.patch |   47 - 180
 files changed, 370 insertions(+), 44215 deletions(-)

;-) if it could always be like this ...
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/3] kernel: 3.19 was released

2015-02-10 Thread Luka Perkov
Hi Daniel,

On Tue, Feb 10, 2015 at 03:04:16PM +0100, Daniel Golle wrote:
 Signed-off-by: Daniel Golle dan...@makrotopia.org
 ---
  include/kernel-version.mk | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

I already started working on this on my own... I've added your SoB in
the commit message. The bump has been pushed in r44381. Thanks!

Luka

PS. I did not merge 3/3. I'll leave that to platform maintainer.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/3] sunxi: add support for Linux 3.19

2015-02-10 Thread Daniel Golle
On Tue, Feb 10, 2015 at 10:46:53PM +0100, John Crispin wrote:
 zoltan maintains the sunxi target. he might already have done work on
 this and might have some updates or whatever that he plans to
 incorporate. bumping a kernel maintained actively always has the risk
 of duplicating work and / or doing superfluous work

Well, yes, that's why I put Zoltan on CC for that patch (you can't
see that as the list server apparently removes CC's if the receiver
is among the list subscribers).

And sure, he might already have it ready himself or do things as he
likes to, e.g. more testing on all boards before pushing the commit.
I did this bump to 3.19 this morning because I was impatient to see if
framebuffer works as it was promissed for 3.19 on sun7i. And it does.
I was happy to see that and felt that it may make sense to publish my
results.

Note that my motivation when porting the patches was my own curiosity
and it was fun doing it -- no matter, if any picks them up or not.
Just in case Zoltan starts working on 3.19 tomorrow, he'll already have
a reference point to start with.
If he already got it ready and just wants to do more testing before
pushing the commit -- fine, this might have been a waste of time when
looking at it from an economic point of view. Just that my motiviation
was self-education rather than just using my time as efficient as I can.

Is there anything wrong with that?
Or did anyone feel offended by that?


Cheers


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


[OpenWrt-Devel] [PATCH v2 1/2] kernel: add version info for 3.19 release

2015-02-10 Thread Daniel Golle
Also fix-up patches for 3.19

130, 771 and 772 were merged upstream.
304 had to be adapted to apply on the new sources.

Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 include/kernel-version.mk  |  3 +-
 .../patches-3.19/130-mips_cpu_irq_disable.patch| 20 --
 .../patches-3.19/304-mips_disable_fpu.patch|  8 ++--
 ...771-bgmac-register-napi-before-the-device.patch | 43 --
 ...ate-irqs-only-if-there-is-nothing-to-poll.patch | 29 ---
 5 files changed, 6 insertions(+), 97 deletions(-)
 delete mode 100644 
target/linux/generic/patches-3.19/130-mips_cpu_irq_disable.patch
 delete mode 100644 
target/linux/generic/patches-3.19/771-bgmac-register-napi-before-the-device.patch
 delete mode 100644 
target/linux/generic/patches-3.19/772-bgmac-activate-irqs-only-if-there-is-nothing-to-poll.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index cc07d3d..53172db 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,13 +7,14 @@ LINUX_VERSION-3.10 = .58
 LINUX_VERSION-3.13 = .7
 LINUX_VERSION-3.14 = .32
 LINUX_VERSION-3.18 = .6
-LINUX_VERSION-3.19 = -rc5
+LINUX_VERSION-3.19 =
 
 LINUX_KERNEL_MD5SUM-3.8.13  = 2af19d06cd47ec459519159cdd10542d
 LINUX_KERNEL_MD5SUM-3.10.58 = 3ff3478b6351143cef22d4b81cf48b01
 LINUX_KERNEL_MD5SUM-3.13.7  = 370adced5e5c1cb1d0d621c2dae2723f
 LINUX_KERNEL_MD5SUM-3.14.32 = 3178fb8f6f1eafcffdd730fec68754f8
 LINUX_KERNEL_MD5SUM-3.18.6  = 997c8492ebfdc9bb9e6ed8d4945539dd
+LINUX_KERNEL_MD5SUM-3.19= d3fc8316d4d4d04b65cbc2d70799e763
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/generic/patches-3.19/130-mips_cpu_irq_disable.patch 
b/target/linux/generic/patches-3.19/130-mips_cpu_irq_disable.patch
deleted file mode 100644
index 659a8d3..000
--- a/target/linux/generic/patches-3.19/130-mips_cpu_irq_disable.patch
+++ /dev/null
@@ -1,20 +0,0 @@
 a/arch/mips/kernel/irq_cpu.c
-+++ b/arch/mips/kernel/irq_cpu.c
-@@ -57,6 +57,8 @@ static struct irq_chip mips_cpu_irq_cont
-   .irq_mask_ack   = mask_mips_irq,
-   .irq_unmask = unmask_mips_irq,
-   .irq_eoi= unmask_mips_irq,
-+  .irq_disable= mask_mips_irq,
-+  .irq_enable = unmask_mips_irq,
- };
- 
- /*
-@@ -93,6 +95,8 @@ static struct irq_chip mips_mt_cpu_irq_c
-   .irq_mask_ack   = mips_mt_cpu_irq_ack,
-   .irq_unmask = unmask_mips_irq,
-   .irq_eoi= unmask_mips_irq,
-+  .irq_disable= mask_mips_irq,
-+  .irq_enable = unmask_mips_irq,
- };
- 
- asmlinkage void __weak plat_irq_dispatch(void)
diff --git a/target/linux/generic/patches-3.19/304-mips_disable_fpu.patch 
b/target/linux/generic/patches-3.19/304-mips_disable_fpu.patch
index 1ea48a3..2a6bbc4 100644
--- a/target/linux/generic/patches-3.19/304-mips_disable_fpu.patch
+++ b/target/linux/generic/patches-3.19/304-mips_disable_fpu.patch
@@ -60,10 +60,10 @@ v2: incorporated changes suggested by Jonas Gorski
  core-y += arch/mips/
 --- a/arch/mips/include/asm/fpu.h
 +++ b/arch/mips/include/asm/fpu.h
-@@ -201,8 +201,10 @@ static inline int init_fpu(void)
-   write_c0_config5(config5);
-   enable_fpu_hazard();
-   }
+@@ -210,8 +210,10 @@ static inline int init_fpu(void)
+   /* Restore FRE */
+   write_c0_config5(config5);
+   enable_fpu_hazard();
 -  } else
 +  } else if (IS_ENABLED(CONFIG_MIPS_FPU_EMULATOR))
fpu_emulator_init_fpu();
diff --git 
a/target/linux/generic/patches-3.19/771-bgmac-register-napi-before-the-device.patch
 
b/target/linux/generic/patches-3.19/771-bgmac-register-napi-before-the-device.patch
deleted file mode 100644
index 56248c6..000
--- 
a/target/linux/generic/patches-3.19/771-bgmac-register-napi-before-the-device.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From d5b4e70e8c205a67e2e246908b259367ab9ccecf Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens ha...@hauke-m.de
-Date: Mon, 8 Dec 2014 08:27:23 +0100
-Subject: [PATCH 2/4] bgmac: register napi before the device
-
-napi should get registered before the netdev and not after.
-
-Signed-off-by: Hauke Mehrtens ha...@hauke-m.de

- drivers/net/ethernet/broadcom/bgmac.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
 a/drivers/net/ethernet/broadcom/bgmac.c
-+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1515,6 +1515,8 @@ static int bgmac_probe(struct bcma_devic
-   if (core-bus-sprom.boardflags_lo  BGMAC_BFL_ENETADM)
-   bgmac_warn(bgmac, Support for ADMtek ethernet switch not 
implemented\n);
- 
-+  netif_napi_add(net_dev, bgmac-napi, bgmac_poll, BGMAC_WEIGHT);
-+
-   err = bgmac_mii_register(bgmac);
-   if (err) {
-   bgmac_err(bgmac, Cannot register MDIO\n);
-@@ -1529,8 +1531,6 @@ static int bgmac_probe(struct bcma_devic
- 
-   netif_carrier_off(net_dev);
- 
--  

[OpenWrt-Devel] [PATCH 4/5] kexec-tools: show up only when KERNEL_KEXEC is enabled.

2015-02-10 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 package/boot/kexec-tools/Makefile |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/boot/kexec-tools/Makefile 
b/package/boot/kexec-tools/Makefile
index 8c1c255..e884661 100644
--- a/package/boot/kexec-tools/Makefile
+++ b/package/boot/kexec-tools/Makefile
@@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/kexec-tools
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=@armeb||@arm||@i386||@powerpc64||@mipsel||@mips +KEXEC_ZLIB:zlib
+  DEPENDS:=@KERNEL_KEXEC @armeb||@arm||@i386||@powerpc64||@mipsel||@mips 
+KEXEC_ZLIB:zlib
   TITLE:=Kernel boots kernel
   URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/
   MAINTAINER:=Florian Fainelli flor...@openwrt.org
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/5] generic: add a few missing symbols for generic config-3.19.

2015-02-10 Thread Yousong Zhou
Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 target/linux/generic/config-3.19 |2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/generic/config-3.19 b/target/linux/generic/config-3.19
index 0f3fe4a..a5586db 100644
--- a/target/linux/generic/config-3.19
+++ b/target/linux/generic/config-3.19
@@ -274,6 +274,7 @@ CONFIG_ATA_BMDMA=y
 CONFIG_ATA_SFF=y
 # CONFIG_ATA_VERBOSE_ERROR is not set
 # CONFIG_ATH10K is not set
+# CONFIG_ATH25 is not set
 # CONFIG_ATH5K is not set
 # CONFIG_ATH6KL is not set
 # CONFIG_ATH6K_LEGACY is not set
@@ -355,6 +356,7 @@ CONFIG_BASE_SMALL=0
 # CONFIG_BAYCOM_SER_FDX is not set
 # CONFIG_BAYCOM_SER_HDX is not set
 # CONFIG_BCACHE is not set
+# CONFIG_BCM3384 is not set
 # CONFIG_BCM47XX is not set
 # CONFIG_BCM63XX is not set
 # CONFIG_BCM63XX_PHY is not set
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/5] malta: add config file for kernel 3.19.

2015-02-10 Thread Yousong Zhou
This is based on config-3.18 with the following changes.

 - CONFIG_GENERIC_NET_UTILS is removed as it is already set in generic
   kernel config.
 - CONFIG_CPU_MICROMIPS is explicitly unset as required in kernel 3.19.

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 target/linux/malta/config-3.19 |  256 
 1 file changed, 256 insertions(+)
 create mode 100644 target/linux/malta/config-3.19

diff --git a/target/linux/malta/config-3.19 b/target/linux/malta/config-3.19
new file mode 100644
index 000..bd12d69
--- /dev/null
+++ b/target/linux/malta/config-3.19
@@ -0,0 +1,256 @@
+CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
+CONFIG_ARCH_DISCARD_MEMBLOCK=y
+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+# CONFIG_AX88796_93CX6 is not set
+CONFIG_BLK_DEV_BSG=y
+CONFIG_BLK_DEV_BSGLIB=y
+# CONFIG_BLK_DEV_DM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BOARD_SCACHE=y
+CONFIG_BOOT_ELF32=y
+CONFIG_BOUNCE=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_CEVT_GIC is not set
+CONFIG_CEVT_R4K=y
+CONFIG_CLKBLD_I8253=y
+CONFIG_CLKEVT_I8253=y
+CONFIG_CLKSRC_I8253=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_PREFETCH=y
+# CONFIG_CPU_HAS_SMARTMIPS is not set
+CONFIG_CPU_HAS_SYNC=y
+# CONFIG_CPU_MICROMIPS is not set
+# CONFIG_CPU_MIPS32_3_5_FEATURES is not set
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_MIPSR2_IRQ_EI=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+# CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS is not set
+# CONFIG_CPU_NEVADA is not set
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_R4K_FPU=y
+# CONFIG_CPU_RM7000 is not set
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CSRC_GIC=y
+CONFIG_CSRC_R4K=y
+# CONFIG_DEBUG_FS is not set
+CONFIG_DEVKMEM=y
+CONFIG_DMA_MAYBE_COHERENT=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DNOTIFY=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FIRMWARE_IN_KERNEL=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_IO=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GPIO_DEVRES=y
+# CONFIG_HAMRADIO is not set
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAVE_ARCH_JUMP_LABEL=y
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
+CONFIG_HAVE_CC_STACKPROTECTOR=y
+CONFIG_HAVE_CONTEXT_TRACKING=y
+CONFIG_HAVE_C_RECORDMCOUNT=y
+CONFIG_HAVE_DEBUG_KMEMLEAK=y
+CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+CONFIG_HAVE_DMA_ATTRS=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_HAVE_GENERIC_HARDIRQS=y
+CONFIG_HAVE_IDE=y
+CONFIG_HAVE_KERNEL_BZIP2=y
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZ4=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+CONFIG_HAVE_KERNEL_XZ=y
+CONFIG_HAVE_KVM=y
+CONFIG_HAVE_MEMBLOCK=y
+CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
+CONFIG_HAVE_NET_DSA=y
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_PCSPKR_PLATFORM=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HW_HAS_PCI=y
+CONFIG_I8253=y
+CONFIG_I8253_LOCK=y
+CONFIG_I8259=y
+CONFIG_IMAGE_CMDLINE_HACK=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+CONFIG_INPUT=y
+# CONFIG_INPUT_MISC is not set
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_IPC_NS=y
+# CONFIG_IP_MROUTE is not set
+CONFIG_IRQ_CPU=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_GIC=y
+CONFIG_IRQ_WORK=y
+CONFIG_ISA_DMA_API=y
+CONFIG_JFFS2_FS_POSIX_ACL=y
+CONFIG_JFFS2_FS_SECURITY=y
+# CONFIG_JFFS2_SUMMARY is not set
+CONFIG_KALLSYMS=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_XZ is not set
+# CONFIG_LEDS_TRIGGER_TIMER is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_LOG_BUF_SHIFT=15
+CONFIG_MD=y
+CONFIG_MDIO_BOARDINFO=y
+CONFIG_MIPS=y
+CONFIG_MIPS_BONITO64=y
+# CONFIG_MIPS_CMP is not set
+# CONFIG_MIPS_CPS is not set
+CONFIG_MIPS_CPU_SCACHE=y
+CONFIG_MIPS_EXTERNAL_TIMER=y
+# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
+CONFIG_MIPS_L1_CACHE_SHIFT=6
+CONFIG_MIPS_L1_CACHE_SHIFT_6=y
+# CONFIG_MIPS_MACHINE is not set
+CONFIG_MIPS_MALTA=y
+CONFIG_MIPS_MSC=y
+CONFIG_MIPS_MT=y
+# CONFIG_MIPS_MT_DISABLED is not set
+CONFIG_MIPS_MT_FPAFF=y
+CONFIG_MIPS_MT_SMP=y
+# 

[OpenWrt-Devel] [PATCH 5/5] kexec-tools: bump version from v2.0.4 to v2.0.9.

2015-02-10 Thread Yousong Zhou
 - kexec-tools is now distributed with tarballs of .tar.gz and .tar.xz
   format; .tar.bz2 are not provided anymore.
 - Add CONFIG_KEXEC_LZMA for selecting lzma support.

Patches are updated along to:

 - Remove the now unnecessary patch 0004-mips_regdefs.patch.
 - Drop 100-reduce_size.patch because the size reduction is marginal.
 - Allow zlib and lzma support coexist together.  This patch has been
   merged into upstream project.
 - Fix kexec-tools' configure.ac.
 - Fix a few compilation warnings.

Size comparison of stripped binaries of kexec malta target with both
zlib and lzma support enabled.

 - Before: 41447
 - After:  42583

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 package/boot/kexec-tools/Config.in |5 +
 package/boot/kexec-tools/Makefile  |   12 +-
 .../patches/0001-Fix-zlib-lzma-decompression.patch |  171 
 ...c-apply-necessary-quotes-to-result-of-mac.patch |   52 ++
 ...mpiler-warning-on-printing-64-bit-integer.patch |   35 
 .../patches/0004-mips-remove-unused-variable.patch |   30 
 .../kexec-tools/patches/0004-mips_regdefs.patch|  103 
 ...ix-warning-about-implicit-type-conversion.patch |   30 
 .../boot/kexec-tools/patches/100-reduce_size.patch |   36 -
 9 files changed, 329 insertions(+), 145 deletions(-)
 create mode 100644 
package/boot/kexec-tools/patches/0001-Fix-zlib-lzma-decompression.patch
 create mode 100644 
package/boot/kexec-tools/patches/0002-configure.ac-apply-necessary-quotes-to-result-of-mac.patch
 create mode 100644 
package/boot/kexec-tools/patches/0003-mips-fix-compiler-warning-on-printing-64-bit-integer.patch
 create mode 100644 
package/boot/kexec-tools/patches/0004-mips-remove-unused-variable.patch
 delete mode 100644 package/boot/kexec-tools/patches/0004-mips_regdefs.patch
 create mode 100644 
package/boot/kexec-tools/patches/0005-mips-fix-warning-about-implicit-type-conversion.patch
 delete mode 100644 package/boot/kexec-tools/patches/100-reduce_size.patch

diff --git a/package/boot/kexec-tools/Config.in 
b/package/boot/kexec-tools/Config.in
index 2642171..6c7558f 100644
--- a/package/boot/kexec-tools/Config.in
+++ b/package/boot/kexec-tools/Config.in
@@ -23,4 +23,9 @@ config KEXEC_ZLIB
prompt zlib support
default y
 
+config KEXEC_LZMA
+   bool
+   prompt lzma support
+   default n
+
 endmenu
diff --git a/package/boot/kexec-tools/Makefile 
b/package/boot/kexec-tools/Makefile
index e884661..e5d4b4b 100644
--- a/package/boot/kexec-tools/Makefile
+++ b/package/boot/kexec-tools/Makefile
@@ -8,23 +8,23 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kexec-tools
-PKG_VERSION:=2.0.4
+PKG_VERSION:=2.0.9
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kexec
-PKG_MD5SUM:=05992bc8c0673fc55be7b6d27e48a8db
+PKG_MD5SUM:=6681319934e22e74c532bd392ccb1bbb
 
 PKG_FIXUP:=autoreconf
 
-PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB
+PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/kexec-tools
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=@KERNEL_KEXEC @armeb||@arm||@i386||@powerpc64||@mipsel||@mips 
+KEXEC_ZLIB:zlib
+  DEPENDS:=@KERNEL_KEXEC @armeb||@arm||@i386||@powerpc64||@mipsel||@mips 
+KEXEC_ZLIB:zlib +KEXEC_LZMA:liblzma
   TITLE:=Kernel boots kernel
   URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/
   MAINTAINER:=Florian Fainelli flor...@openwrt.org
@@ -55,7 +55,7 @@ CONFIGURE_ARGS = \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
$(if $(CONFIG_KEXEC_ZLIB),--with,--without)-zlib \
-   --without-lzma
+   $(if $(CONFIG_KEXEC_LZMA),--with,--without)-lzma
 
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
 TARGET_LDFLAGS += -Wl,--gc-sections
diff --git 
a/package/boot/kexec-tools/patches/0001-Fix-zlib-lzma-decompression.patch 
b/package/boot/kexec-tools/patches/0001-Fix-zlib-lzma-decompression.patch
new file mode 100644
index 000..06c11ec
--- /dev/null
+++ b/package/boot/kexec-tools/patches/0001-Fix-zlib-lzma-decompression.patch
@@ -0,0 +1,171 @@
+From d606837b56d46eb7f815b5d85f07fcc3f1555d00 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou yszhou4t...@gmail.com
+Date: Sun, 1 Feb 2015 00:10:07 +0800
+Subject: [PATCH 1/5] Fix zlib/lzma decompression.
+
+Let {zlib,lzma}_decompress_file() return NULL if anything wrong happened
+to allow the other method to have a chance to run.
+
+Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
+Signed-off-by: Simon Horman ho...@verge.net.au
+---
+ kexec/lzma.c |   33 ++---
+ kexec/zlib.c |   57 +++--
+ 2 files changed, 57 insertions(+), 33 deletions(-)
+
+diff --git a/kexec/lzma.c b/kexec/lzma.c
+index 939aeb3..5bfccb7 100644
+--- a/kexec/lzma.c
 b/kexec/lzma.c
+@@ -162,13 

[OpenWrt-Devel] [PATCH 3/5] generic: improve kexec support of MIPS.

2015-02-10 Thread Yousong Zhou
 - Allow --command-line parameters of kexec-tools be parsed and used by
   the kernel.
 - For malta machine, mark kernel code and kernel data segments as
   System RAM instead of reserved in /proc/iomem, otherwise
   kexec-tools will complain that program segments in ELF kernel file
   are invalid.

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 ...Mark-kernel-code-and-kernel-data-segments.patch |   37 +++
 ...Accept-command-line-parameters-from-users.patch |  305 +++
 ...Mark-kernel-code-and-kernel-data-segments.patch |   39 +++
 ...Accept-command-line-parameters-from-users.patch |  304 +++
 ...Mark-kernel-code-and-kernel-data-segments.patch |   39 +++
 ...Accept-command-line-parameters-from-users.patch |  308 
 ...Mark-kernel-code-and-kernel-data-segments.patch |   39 +++
 ...Accept-command-line-parameters-from-users.patch |  308 
 8 files changed, 1379 insertions(+)
 create mode 100644 
target/linux/generic/patches-3.10/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 create mode 100644 
target/linux/generic/patches-3.10/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 create mode 100644 
target/linux/generic/patches-3.14/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 create mode 100644 
target/linux/generic/patches-3.14/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 create mode 100644 
target/linux/generic/patches-3.18/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 create mode 100644 
target/linux/generic/patches-3.18/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 create mode 100644 
target/linux/generic/patches-3.19/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 create mode 100644 
target/linux/generic/patches-3.19/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch

diff --git 
a/target/linux/generic/patches-3.10/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
 
b/target/linux/generic/patches-3.10/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
new file mode 100644
index 000..fc495e5
--- /dev/null
+++ 
b/target/linux/generic/patches-3.10/330-MIPS-Malta-Mark-kernel-code-and-kernel-data-segments.patch
@@ -0,0 +1,37 @@
+From a3861953341b710702d4ed5e5566a7aecf709fab Mon Sep 17 00:00:00 2001
+From: Yousong Zhou yszhou4t...@gmail.com
+Date: Sat, 31 Jan 2015 15:13:12 +0800
+Subject: [PATCH 330/331] MIPS: Malta: Mark kernel code and kernel data
+ segments as BOOT_MEM_RAM.
+
+Kexec-tools requires those segments listed as System RAM in /proc/iomem.
+
+Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
+---
+ arch/mips/mti-malta/malta-memory.c |9 ++---
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/arch/mips/mti-malta/malta-memory.c 
b/arch/mips/mti-malta/malta-memory.c
+index 1f73d63..214b581 100644
+--- a/arch/mips/mti-malta/malta-memory.c
 b/arch/mips/mti-malta/malta-memory.c
+@@ -81,14 +81,9 @@ fw_memblock_t * __init fw_getmdesc(void)
+   mdesc[2].base = 0x000f;
+   mdesc[2].size = 0x0001;
+ 
+-  mdesc[3].type = fw_dontuse;
++  mdesc[3].type = fw_free;
+   mdesc[3].base = 0x0010;
+-  mdesc[3].size = CPHYSADDR(PFN_ALIGN((unsigned long)_end)) -
+-  mdesc[3].base;
+-
+-  mdesc[4].type = fw_free;
+-  mdesc[4].base = CPHYSADDR(PFN_ALIGN(_end));
+-  mdesc[4].size = memsize - mdesc[4].base;
++  mdesc[3].size = memsize - CPHYSADDR(mdesc[3].base);
+ 
+   return mdesc[0];
+ }
+-- 
+1.7.10.4
+
diff --git 
a/target/linux/generic/patches-3.10/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
 
b/target/linux/generic/patches-3.10/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
new file mode 100644
index 000..2cb19f0
--- /dev/null
+++ 
b/target/linux/generic/patches-3.10/331-MIPS-kexec-Accept-command-line-parameters-from-users.patch
@@ -0,0 +1,305 @@
+From 40c0230fd03515a04121caf44595f00eb49a1727 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou yszhou4t...@gmail.com
+Date: Sat, 31 Jan 2015 22:26:03 +0800
+Subject: [PATCH 331/331] MIPS: kexec: Accept command line parameters from
+ userspace.
+
+Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
+---
+ arch/mips/kernel/machine_kexec.c   |  154 +++-
+ arch/mips/kernel/machine_kexec.h   |   20 +
+ arch/mips/kernel/relocate_kernel.S |   21 +++--
+ 3 files changed, 168 insertions(+), 27 deletions(-)
+ create mode 100644 arch/mips/kernel/machine_kexec.h
+
+diff --git a/arch/mips/kernel/machine_kexec.c 
b/arch/mips/kernel/machine_kexec.c
+index 992e184..5c8441b 100644
+--- a/arch/mips/kernel/machine_kexec.c
 b/arch/mips/kernel/machine_kexec.c
+@@ -10,45 +10,146 @@
+ #include linux/mm.h
+ #include linux/delay.h
+ 
++#include asm/bootinfo.h
+ #include asm/cacheflush.h
+ #include asm/page.h
+-
+-extern const unsigned char relocate_new_kernel[];
+-extern const size_t 

Re: [OpenWrt-Devel] More bad RPATH

2015-02-10 Thread Etienne Champetier
Hi jow,

2015-02-10 11:20 GMT+01:00 Jo-Philipp Wich j...@openwrt.org:

 Hi Etienne,

 so we should keep rpaths below /usr/lib/ or /lib/ and remove everything
 else including exactly /usr/lib and /lib (with or without trailing /) ?

 ~ Jow


I think so yes, i'm in favor of white list approach here.
we may also allow $ORIGIN/* (no package seems to use it but why not)

According to my extract (rpath.txt)(all ar71xx packages minus ~20),
we are not breaking any package for now.
(or maybe just kamailo, which use ///usr/lib/kamailio/)

see also
https://wiki.debian.org/RpathIssue#Debian.27s_Stance

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