Re: [OpenWrt-Devel] [PATCH v2 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-25 Thread Felix Fietkau
On 2014-11-24 22:42, Maxime Ripard wrote:
 Rely on the Kconfig defconfig mechanism to fill all the missing options,
 instead of needing to set them all in the kernel configurations like what was
 previously done.
 
 This will allow to trim down a lot the configuration files, avoid carrying
 unused configuration options and preserve the developpers mental health.
 
 Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com
 ---
  include/kernel-defaults.mk | 40 
  1 file changed, 32 insertions(+), 8 deletions(-)
 
 diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
 index 8abd32d7141d..9fd96a234e37 100644
 --- a/include/kernel-defaults.mk
 +++ b/include/kernel-defaults.mk
 @@ -100,16 +100,40 @@ define Kernel/SetNoInitramfs
   echo 'CONFIG_INITRAMFS_SOURCE='  $(LINUX_DIR)/.config
  endef
  
 +ifeq ($(ARCH),armeb)
 +  LINUX_ARCH := arm
 +else ifeq ($(ARCH),mipsel)
 +  LINUX_ARCH := mips
 +else ifeq ($(ARCH),mips64)
 +  LINUX_ARCH := mips
 +else ifeq ($(ARCH),um)
 +  LINUX_ARCH := x86
 +else ifeq ($(ARCH),i386)
 +  LINUX_ARCH := x86
 +else ifeq ($(ARCH),x86_64)
 +  LINUX_ARCH := x86
 +else
 +  LINUX_ARCH := $(ARCH)
 +endif
That looks a lot like LINUX_KARCH from include/kernel.mk

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


Re: [OpenWrt-Devel] [PATCH v2 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-25 Thread John Szakmeister
On Mon, Nov 24, 2014 at 4:42 PM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 Rely on the Kconfig defconfig mechanism to fill all the missing options,
 instead of needing to set them all in the kernel configurations like what was
 previously done.

 This will allow to trim down a lot the configuration files, avoid carrying
 unused configuration options and preserve the developpers mental health.

s/developpers/developers/

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


[OpenWrt-Devel] [PATCH 1/5] [RESEND] kernel: unset CONFIG_ARM_CCN

2014-11-25 Thread Daniel Golle
oldconfig kept asking for that config symbol...

Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 target/linux/generic/config-3.18 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index cfee63e..d795b73 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -221,6 +221,7 @@ CONFIG_ARCH_FLATMEM_ENABLE=y
 # CONFIG_ARM_ARCH_TIMER is not set
 # CONFIG_ARM_AT91_ETHER is not set
 # CONFIG_ARM_CCI is not set
+# CONFIG_ARM_CCN is not set
 CONFIG_ARM_CPU_TOPOLOGY=y
 CONFIG_ARM_DMA_MEM_BUFFERABLE=y
 # CONFIG_ARM_ERRATA_326103 is not set
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/5] PLXTECH/Oxford NAS 782x SoC family support

2014-11-25 Thread Daniel Golle
One year after starting to work on the oxnas target, I think that things
are in a shape which would allow merging the target with OpenWrt.
Now that things are imho rather clean and stable, I'd prefer having the
target merged and no longer maintaining a seperate fork.
Thus I squashed stuff up into this series of patches, the history of the
development process can be found on
http://gitorious.org/openwrt-oxnas/openwrt-oxnas

Daniel Golle (5):
  kernel: unset CONFIG_ARM_CCN
  target.mk: add default packages for NAS device-type
  add new target 'oxnas'
  add uboot-oxnas
  uboot-envtools: add support for oxnas target

 include/target.mk  |2 +
 package/boot/uboot-envtools/Makefile   |4 +
 package/boot/uboot-envtools/files/oxnas|   29 +
 package/boot/uboot-oxnas/Makefile  |   97 +
 .../files/arch/arm/cpu/arm1136/nas782x/Makefile|   13 +
 .../files/arch/arm/cpu/arm1136/nas782x/clock.c |   97 +
 .../files/arch/arm/cpu/arm1136/nas782x/pinmux.c|   43 +
 .../files/arch/arm/cpu/arm1136/nas782x/reset.c |   91 +
 .../files/arch/arm/cpu/arm1136/nas782x/timer.c |  129 ++
 .../arch/arm/include/asm/arch-nas782x/clock.h  |   84 +
 .../files/arch/arm/include/asm/arch-nas782x/cpu.h  |   26 +
 .../arch/arm/include/asm/arch-nas782x/hardware.h   |   30 +
 .../arch/arm/include/asm/arch-nas782x/pinmux.h |   46 +
 .../files/arch/arm/include/asm/arch-nas782x/spl.h  |6 +
 .../arch/arm/include/asm/arch-nas782x/sysctl.h |  125 ++
 .../arch/arm/include/asm/arch-nas782x/timer.h  |   23 +
 .../boot/uboot-oxnas/files/board/ox820/Makefile|   15 +
 package/boot/uboot-oxnas/files/board/ox820/ddr.c   |  477 +
 package/boot/uboot-oxnas/files/board/ox820/ddr.h   |  148 ++
 .../uboot-oxnas/files/board/ox820/lowlevel_init.S  |   20 +
 package/boot/uboot-oxnas/files/board/ox820/ox820.c |  373 
 .../boot/uboot-oxnas/files/board/ox820/spl_start.S |   21 +
 .../uboot-oxnas/files/board/ox820/u-boot-spl.lds   |  101 ++
 package/boot/uboot-oxnas/files/common/env_ext4.c   |  116 ++
 .../boot/uboot-oxnas/files/common/spl/spl_block.c  |  236 +++
 .../uboot-oxnas/files/drivers/block/plxsata_ide.c  | 1170 
 .../files/drivers/usb/host/ehci-oxnas.c|  105 ++
 .../boot/uboot-oxnas/files/include/configs/ox820.h |  381 
 package/boot/uboot-oxnas/files/tools/mkox820crc.c  |  123 ++
 .../boot/uboot-oxnas/patches/150-spl-block.patch   |   54 +
 .../uboot-oxnas/patches/300-oxnas-target.patch |   99 +
 .../patches/800-fix-bootm-assertion.patch  |   13 +
 package/kernel/linux/modules/usb.mk|   17 +
 target/linux/generic/config-3.18   |1 +
 target/linux/oxnas/Makefile|   28 +
 target/linux/oxnas/base-files.mk   |3 +
 target/linux/oxnas/base-files/etc/board.d/01_leds  |   25 +
 .../linux/oxnas/base-files/etc/board.d/02_network  |   12 +
 target/linux/oxnas/base-files/etc/diag.sh  |   35 +
 target/linux/oxnas/base-files/lib/oxnas.sh |   48 +
 .../base-files/lib/preinit/03_preinit_do_oxnas.sh  |9 +
 .../linux/oxnas/base-files/lib/upgrade/platform.sh |   35 +
 target/linux/oxnas/config-3.18 |  366 
 .../oxnas/files/arch/arm/boot/dts/ox820-kd20.dts   |  136 ++
 .../files/arch/arm/boot/dts/ox820-pogoplug-pro.dts |   86 +
 .../files/arch/arm/boot/dts/ox820-pogoplug-v3.dts  |   83 +
 .../oxnas/files/arch/arm/boot/dts/ox820-stg212.dts |   91 +
 .../linux/oxnas/files/arch/arm/boot/dts/ox820.dtsi |  342 
 .../oxnas/files/arch/arm/configs/ox820_defconfig   |  104 ++
 .../linux/oxnas/files/arch/arm/mach-oxnas/Kconfig  |   24 +
 .../linux/oxnas/files/arch/arm/mach-oxnas/Makefile |8 +
 .../oxnas/files/arch/arm/mach-oxnas/Makefile.boot  |2 +
 target/linux/oxnas/files/arch/arm/mach-oxnas/fiq.S |   87 +
 .../oxnas/files/arch/arm/mach-oxnas/headsmp.S  |   27 +
 .../oxnas/files/arch/arm/mach-oxnas/hotplug.c  |  112 ++
 .../arch/arm/mach-oxnas/include/mach/hardware.h|  233 +++
 .../files/arch/arm/mach-oxnas/include/mach/iomap.h |   33 +
 .../files/arch/arm/mach-oxnas/include/mach/irqs.h  |7 +
 .../files/arch/arm/mach-oxnas/include/mach/smp.h   |   34 +
 .../files/arch/arm/mach-oxnas/include/mach/timex.h |6 +
 .../arch/arm/mach-oxnas/include/mach/uncompress.h  |   32 +
 .../files/arch/arm/mach-oxnas/include/mach/utils.h |   34 +
 .../oxnas/files/arch/arm/mach-oxnas/mach-ox820.c   |  284 +++
 .../oxnas/files/arch/arm/mach-oxnas/platsmp.c  |  315 
 target/linux/oxnas/files/drivers/ata/sata_oxnas.c  | 1889 
 target/linux/oxnas/files/drivers/clk/clk-oxnas.c   |  262 +++
 .../files/drivers/clocksource/oxnas_rps_timer.c|   96 +
 target/linux/oxnas/files/drivers/irqchip/irq-rps.c |  146 ++
 .../oxnas/files/drivers/mtd/nand/oxnas_nand.c  |  102 ++
 .../oxnas/files/drivers/pci/host/pcie-oxnas.c  |  676 +++
 

[OpenWrt-Devel] [PATCH 2/5] target.mk: add default packages for NAS device-type

2014-11-25 Thread Daniel Golle
Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 include/target.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/target.mk b/include/target.mk
index 17413f9..db501e0 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -13,6 +13,8 @@ DEVICE_TYPE?=router
 
 # Default packages - the really basic set
 DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd 
fstools
+# For nas targets
+DEFAULT_PACKAGES.nas:=block-mount fdisk lvm2 lsblk mdadm
 # For router targets
 DEFAULT_PACKAGES.router:=dnsmasq iptables ip6tables ppp ppp-mod-pppoe 
kmod-nf-nathelper firewall odhcpd odhcp6c
 DEFAULT_PACKAGES.bootloader:=
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] uboot-envtools: add support for oxnas target

2014-11-25 Thread Daniel Golle
Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 package/boot/uboot-envtools/Makefile|  4 
 package/boot/uboot-envtools/files/oxnas | 29 +
 2 files changed, 33 insertions(+)
 create mode 100644 package/boot/uboot-envtools/files/oxnas

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index fa49c13..1db290e 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -94,6 +94,10 @@ ifneq ($(CONFIG_TARGET_mxs),)
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/mxs $(1)/etc/uci-defaults/30_uboot-envtools
 endif
+ifneq ($(CONFIG_TARGET_oxnas),)
+   $(INSTALL_DIR) $(1)/etc/uci-defaults
+   $(INSTALL_BIN) ./files/oxnas $(1)/etc/uci-defaults/30_uboot-envtools
+endif
 ifneq ($(CONFIG_TARGET_ramips),)
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
diff --git a/package/boot/uboot-envtools/files/oxnas 
b/package/boot/uboot-envtools/files/oxnas
new file mode 100644
index 000..b456fb3
--- /dev/null
+++ b/package/boot/uboot-envtools/files/oxnas
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+
+[ -e /etc/config/ubootenv ]  exit 0
+
+touch /etc/config/ubootenv
+
+. /lib/oxnas.sh
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(oxnas_board_name)
+
+case $board in
+stg212)
+   ubootenv_add_uci_config /dev/ubi0_0 0x0 0x4000 0x1F000 1
+   ubootenv_add_uci_config /dev/ubi0_1 0x0 0x4000 0x1F000 1
+   ;;
+kd20)
+   ubootenv_add_uci_config /dev/mtd0 0x22 0x02000 0x2 1
+   ;;
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0
-- 
2.1.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/5] add uboot-oxnas

2014-11-25 Thread Daniel Golle
This adds support for the oxnas target in U-Boot 2014.04
History can be found at https://github.com/kref/u-boot-oxnas up to 2013.10
changes from 2013.10 to 2014.04 can be followed at
https://gitorious.org/openwrt-oxnas

Signed-off-by: Daniel Golle dan...@makrotopia.org
---
 package/boot/uboot-oxnas/Makefile  |   97 ++
 .../files/arch/arm/cpu/arm1136/nas782x/Makefile|   13 +
 .../files/arch/arm/cpu/arm1136/nas782x/clock.c |   97 ++
 .../files/arch/arm/cpu/arm1136/nas782x/pinmux.c|   43 +
 .../files/arch/arm/cpu/arm1136/nas782x/reset.c |   91 ++
 .../files/arch/arm/cpu/arm1136/nas782x/timer.c |  129 +++
 .../arch/arm/include/asm/arch-nas782x/clock.h  |   84 ++
 .../files/arch/arm/include/asm/arch-nas782x/cpu.h  |   26 +
 .../arch/arm/include/asm/arch-nas782x/hardware.h   |   30 +
 .../arch/arm/include/asm/arch-nas782x/pinmux.h |   46 +
 .../files/arch/arm/include/asm/arch-nas782x/spl.h  |6 +
 .../arch/arm/include/asm/arch-nas782x/sysctl.h |  125 +++
 .../arch/arm/include/asm/arch-nas782x/timer.h  |   23 +
 .../boot/uboot-oxnas/files/board/ox820/Makefile|   15 +
 package/boot/uboot-oxnas/files/board/ox820/ddr.c   |  477 
 package/boot/uboot-oxnas/files/board/ox820/ddr.h   |  148 +++
 .../uboot-oxnas/files/board/ox820/lowlevel_init.S  |   20 +
 package/boot/uboot-oxnas/files/board/ox820/ox820.c |  373 +++
 .../boot/uboot-oxnas/files/board/ox820/spl_start.S |   21 +
 .../uboot-oxnas/files/board/ox820/u-boot-spl.lds   |  101 ++
 package/boot/uboot-oxnas/files/common/env_ext4.c   |  116 ++
 .../boot/uboot-oxnas/files/common/spl/spl_block.c  |  236 
 .../uboot-oxnas/files/drivers/block/plxsata_ide.c  | 1170 
 .../files/drivers/usb/host/ehci-oxnas.c|  105 ++
 .../boot/uboot-oxnas/files/include/configs/ox820.h |  381 +++
 package/boot/uboot-oxnas/files/tools/mkox820crc.c  |  123 ++
 .../boot/uboot-oxnas/patches/150-spl-block.patch   |   54 +
 .../uboot-oxnas/patches/300-oxnas-target.patch |   99 ++
 .../patches/800-fix-bootm-assertion.patch  |   13 +
 29 files changed, 4262 insertions(+)
 create mode 100644 package/boot/uboot-oxnas/Makefile
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/Makefile
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/clock.c
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/pinmux.c
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/reset.c
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/cpu/arm1136/nas782x/timer.c
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/clock.h
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/cpu.h
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/hardware.h
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/pinmux.h
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/spl.h
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/sysctl.h
 create mode 100644 
package/boot/uboot-oxnas/files/arch/arm/include/asm/arch-nas782x/timer.h
 create mode 100644 package/boot/uboot-oxnas/files/board/ox820/Makefile
 create mode 100755 package/boot/uboot-oxnas/files/board/ox820/ddr.c
 create mode 100644 package/boot/uboot-oxnas/files/board/ox820/ddr.h
 create mode 100644 package/boot/uboot-oxnas/files/board/ox820/lowlevel_init.S
 create mode 100644 package/boot/uboot-oxnas/files/board/ox820/ox820.c
 create mode 100644 package/boot/uboot-oxnas/files/board/ox820/spl_start.S
 create mode 100644 package/boot/uboot-oxnas/files/board/ox820/u-boot-spl.lds
 create mode 100644 package/boot/uboot-oxnas/files/common/env_ext4.c
 create mode 100644 package/boot/uboot-oxnas/files/common/spl/spl_block.c
 create mode 100644 package/boot/uboot-oxnas/files/drivers/block/plxsata_ide.c
 create mode 100644 package/boot/uboot-oxnas/files/drivers/usb/host/ehci-oxnas.c
 create mode 100644 package/boot/uboot-oxnas/files/include/configs/ox820.h
 create mode 100644 package/boot/uboot-oxnas/files/tools/mkox820crc.c
 create mode 100644 package/boot/uboot-oxnas/patches/150-spl-block.patch
 create mode 100644 package/boot/uboot-oxnas/patches/300-oxnas-target.patch
 create mode 100644 
package/boot/uboot-oxnas/patches/800-fix-bootm-assertion.patch

diff --git a/package/boot/uboot-oxnas/Makefile 
b/package/boot/uboot-oxnas/Makefile
new file mode 100644
index 000..42f3cf9
--- /dev/null
+++ b/package/boot/uboot-oxnas/Makefile
@@ -0,0 +1,97 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=u-boot
+PKG_VERSION:=2014.04
+PKG_RELEASE:=1
+

Re: [OpenWrt-Devel] [PATCH 0/4] Add multi-line option value support to UCI config file parser.

2014-11-25 Thread Felix Fietkau
On 2014-11-06 21:21, Yousong Zhou wrote:
 I am not quite familiar with the early history of how UCI file was parsed, but
 thought that UCI config files were parsed in a quite clever way all by shell
 scripts which made it possible to have multi-line value for options.  AFAIK, 
 at
 least package openvpn [1] depends on this feature.
 
 This series tries to fix an issue with current C implementation of parser for
 UCI config file.  The current code uses pointers into line buffer
 `ctx-pctx-buf` which may need to grow in size when a backslash was found at
 the end of line.  The grow is implemented by function uci_realloc() which may
 return an address different from the original.  Then the parser will be in a
 state where ctx-pctx-buf changed, but various char **str and char **target
 are not updated along.
 
 The realloc() can be triggered by something like below (in function
 parse_double_quote()).
 
   config sockd 'instance0'
   option internal_network 'vpn'
   option external_network 'wan'
   option extra_config a \
b \
c \
   
 
 A few test cases, including importing/exporting config, getting/setting option
 values were also included trying to verify the patch.
 
 I do not expect this to be accepted in the neare future because at later stage
 of preparing this series I saw that LF and NL characters are explicitly deemed
 illegal for option value in uci_validate_text().  But if you are interested in
 this feature, you can give it a try.
 
 I found multi-line option value useful in cases where I want parts of the
 program's configuration values to be connected with OpenWrt system state, e.g.
 stop/start services when the status of the dependent network go down/up, while
 still keep the related bits all in one place, not just many remedy scripts
 scattered here and there.
 
 [1] see `append_params()` in 
 package/network/services/openvpn/files/openvpn.init
Applied to uci git. I will commit the update to trunk soon.

Thanks,

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


Re: [OpenWrt-Devel] [PATCH 0/5] PLXTECH/Oxford NAS 782x SoC family support

2014-11-25 Thread John Crispin
aloha

On 25/11/2014 11:44, Daniel Golle wrote:
 One year after starting to work on the oxnas target, I think that
 things are in a shape which would allow merging the target with
 OpenWrt. Now that things are imho rather clean and stable, I'd
 prefer having the target merged and no longer maintaining a
 seperate fork. Thus I squashed stuff up into this series of
 patches, the history of the development process can be found on 
 http://gitorious.org/openwrt-oxnas/openwrt-oxnas
 


nice to see the code reach the point where we can merge it.

are you planning on upstreaming this ? 12k insertions are a lot to
carry around with us.

i have just merged this stuff in my local queue and will start a test
build in a sec.

John


 Daniel Golle (5): kernel: unset CONFIG_ARM_CCN target.mk: add
 default packages for NAS device-type add new target 'oxnas' add
 uboot-oxnas uboot-envtools: add support for oxnas target
 
 include/target.mk  |2 + 
 package/boot/uboot-envtools/Makefile   |4 + 
 package/boot/uboot-envtools/files/oxnas|   29 + 
 package/boot/uboot-oxnas/Makefile  |   97 + 
 .../files/arch/arm/cpu/arm1136/nas782x/Makefile|   13 + 
 .../files/arch/arm/cpu/arm1136/nas782x/clock.c |   97 + 
 .../files/arch/arm/cpu/arm1136/nas782x/pinmux.c|   43 + 
 .../files/arch/arm/cpu/arm1136/nas782x/reset.c |   91 + 
 .../files/arch/arm/cpu/arm1136/nas782x/timer.c |  129 ++ 
 .../arch/arm/include/asm/arch-nas782x/clock.h  |   84 + 
 .../files/arch/arm/include/asm/arch-nas782x/cpu.h  |   26 + 
 .../arch/arm/include/asm/arch-nas782x/hardware.h   |   30 + 
 .../arch/arm/include/asm/arch-nas782x/pinmux.h |   46 + 
 .../files/arch/arm/include/asm/arch-nas782x/spl.h  |6 + 
 .../arch/arm/include/asm/arch-nas782x/sysctl.h |  125 ++ 
 .../arch/arm/include/asm/arch-nas782x/timer.h  |   23 + 
 .../boot/uboot-oxnas/files/board/ox820/Makefile|   15 + 
 package/boot/uboot-oxnas/files/board/ox820/ddr.c   |  477 + 
 package/boot/uboot-oxnas/files/board/ox820/ddr.h   |  148 ++ 
 .../uboot-oxnas/files/board/ox820/lowlevel_init.S  |   20 + 
 package/boot/uboot-oxnas/files/board/ox820/ox820.c |  373  
 .../boot/uboot-oxnas/files/board/ox820/spl_start.S |   21 + 
 .../uboot-oxnas/files/board/ox820/u-boot-spl.lds   |  101 ++ 
 package/boot/uboot-oxnas/files/common/env_ext4.c   |  116 ++ 
 .../boot/uboot-oxnas/files/common/spl/spl_block.c  |  236 +++ 
 .../uboot-oxnas/files/drivers/block/plxsata_ide.c  | 1170
  .../files/drivers/usb/host/ehci-oxnas.c|
 105 ++ .../boot/uboot-oxnas/files/include/configs/ox820.h |  381
  package/boot/uboot-oxnas/files/tools/mkox820crc.c  |  123 ++ 
 .../boot/uboot-oxnas/patches/150-spl-block.patch   |   54 + 
 .../uboot-oxnas/patches/300-oxnas-target.patch |   99 + 
 .../patches/800-fix-bootm-assertion.patch  |   13 + 
 package/kernel/linux/modules/usb.mk|   17 + 
 target/linux/generic/config-3.18   |1 + 
 target/linux/oxnas/Makefile|   28 + 
 target/linux/oxnas/base-files.mk   |3 + 
 target/linux/oxnas/base-files/etc/board.d/01_leds  |   25 + 
 .../linux/oxnas/base-files/etc/board.d/02_network  |   12 + 
 target/linux/oxnas/base-files/etc/diag.sh  |   35 + 
 target/linux/oxnas/base-files/lib/oxnas.sh |   48 + 
 .../base-files/lib/preinit/03_preinit_do_oxnas.sh  |9 + 
 .../linux/oxnas/base-files/lib/upgrade/platform.sh |   35 + 
 target/linux/oxnas/config-3.18 |  366  
 .../oxnas/files/arch/arm/boot/dts/ox820-kd20.dts   |  136 ++ 
 .../files/arch/arm/boot/dts/ox820-pogoplug-pro.dts |   86 + 
 .../files/arch/arm/boot/dts/ox820-pogoplug-v3.dts  |   83 + 
 .../oxnas/files/arch/arm/boot/dts/ox820-stg212.dts |   91 + 
 .../linux/oxnas/files/arch/arm/boot/dts/ox820.dtsi |  342  
 .../oxnas/files/arch/arm/configs/ox820_defconfig   |  104 ++ 
 .../linux/oxnas/files/arch/arm/mach-oxnas/Kconfig  |   24 + 
 .../linux/oxnas/files/arch/arm/mach-oxnas/Makefile |8 + 
 .../oxnas/files/arch/arm/mach-oxnas/Makefile.boot  |2 + 
 target/linux/oxnas/files/arch/arm/mach-oxnas/fiq.S |   87 + 
 .../oxnas/files/arch/arm/mach-oxnas/headsmp.S  |   27 + 
 .../oxnas/files/arch/arm/mach-oxnas/hotplug.c  |  112 ++ 
 .../arch/arm/mach-oxnas/include/mach/hardware.h|  233 +++ 
 .../files/arch/arm/mach-oxnas/include/mach/iomap.h |   33 + 
 .../files/arch/arm/mach-oxnas/include/mach/irqs.h  |7 + 
 .../files/arch/arm/mach-oxnas/include/mach/smp.h   |   34 + 
 .../files/arch/arm/mach-oxnas/include/mach/timex.h |6 + 
 .../arch/arm/mach-oxnas/include/mach/uncompress.h  |   32 + 
 .../files/arch/arm/mach-oxnas/include/mach/utils.h |   34 + 
 .../oxnas/files/arch/arm/mach-oxnas/mach-ox820.c   |  284 +++ 
 .../oxnas/files/arch/arm/mach-oxnas/platsmp.c  |  315  
 target/linux/oxnas/files/drivers/ata/sata_oxnas.c  | 1889
 

Re: [OpenWrt-Devel] [PATCH 0/5] PLXTECH/Oxford NAS 782x SoC family support

2014-11-25 Thread Daniel Golle
On Tue, Nov 25, 2014 at 12:07:13PM +0100, John Crispin wrote:
 nice to see the code reach the point where we can merge it.
 
 are you planning on upstreaming this ? 12k insertions are a lot to
 carry around with us.

Definitely. Yet there are things which I want to do before approaching
kernel development and U-Boot lists, such as improving documentation and
understanding some apparently SMP related hacks in the drivers.
By now I got rid of about 85% of checkpatch.pl warnings, what's left is
stuff like calls to wmb() without a comment -- I'll have to understand
things in detail before writing that kinda comment, obviously.

I also still didn't hack-up support for the 2nd S-ATA port, but got hold
of a GPL release tarball which does contain the full vendor SDK:
http://data.shuttle.eu/~upload/omninas/KD20_20121127.zip


 i have just merged this stuff in my local queue and will start a test
 build in a sec.

Nice, thanks you!


Cheers


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


[OpenWrt-Devel] any known issues with wireless luci interface on trunk?

2014-11-25 Thread Robert P. J. Day

  what little info I have until I can check it out myself: colleague just
stopped by my desk, claims that on the new tp-link archer c7 v2 router he
just bought, when building from trunk, changing wireless settings from the
GUI screwed things up, but doing the same thing from the command line
with uci worked just fine.

  i'm going over later to see the symptoms and will post them in more
detail, but can anyone else describe seeing anything similar?

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


Re: [OpenWrt-Devel] Need help understanding Ralink's dts config file and how it works

2014-11-25 Thread Sławomir Demeszko

On  23.11.2014 17:05, Md Mahbubur Rasheed wrote:

Hi, I am also currently working on board with this chip, and answers to your question will 
be helpful for me too. I can share my knowledge, but don't treat this as an axiom, I am 
begginer in this subject too and I could be wrong.



1. Why a single SoC has so many  built in ethernet controllers/

 drivers (MT7530, RT2880, MT7620)? If a doesn't have any external
 ethernet controller, then which one should we use?
I think that MT7530 is a name of internal or external switch and driver for it. RT2880 is 
an older SoC created by Ralink which was taken few years ago by Mediatek and few things 
are compatible with MT7620A, so drivers stay the same. And MT7620 is actual name of SoC. 
In .dts files we define among others things which device are comatible to already 
supported devices, that way if there isn't more specific driver for certain device, less 
specific or general can be used.



But configurations, such as-  ethernet@1010 , pinctrl etc remain

 as foggy as it was 12 hours ago.
As I know ethernet@1010 is only a name. Real address of register of device is passed 
by reg field. But also included in name for convience.



2. How (and where) is the WAN  port (i.e. phy4) mapped to gigabit bus

 rgmii? Is it possible to map WAN port as a gigabit port? Or it always
 remains 100Mbps port?
Electrical WAN or LAN (opposed to virtual defined in /etc/config/network) depends on 
connection on board and usually all mechanical ports are connected to 100Mbps ports of 
internal switch (by internal EPHY component). MT7620A has 5 that ports and 2x 1Gbps, but 
these two are RGMII ports and need additional chip (a PHY) to be possible for connection 
of external devices.



3. In the following code, when  should we use gmac and when ephy?

 gsw@1011 { ralink,port4 = gmac; };
I guess that ephy means that specified SoC port is connected to some external EPHY 
chip by RGMII or other interface and gmac not.



4. what does the following code  do? pinctrl { state_default: pinctrl0

 { gpio { ralink,group = i2c, uartf; ralink,function = gpio; };
 }; };
I am also don't know. Some info can be found at kernel 
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt and parent directory.



Finally, the MT7620A  programming guide describes the registers, but

 it doesn't explain the configurations or provides examples. I tried
 to use dts files for other routers to understand, but it was not much
 fruitful either. Is there any resource explaining the structure and
 programming model?
I think that almost everything about SoC itself is defined already in mt7620a.dtsi and 
implemented in drivers, so we not need to worry about all these internal stuff. But SoC 
can be connected on board with different configurations, using different protocols, 
different external chips and that depends on specific board. We do not always have access 
to documentation how board is contructed and I think other developers use method of trial 
and error, or by tracking paths on board, or by analyzing original firmware. Quite 
detailed documentation is in kernel sources at Documentation/devicetree. Here is a link: 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree

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


Re: [OpenWrt-Devel] [RFC 0/2]

2014-11-25 Thread John Crispin
Hi,

thanks for the info, looking forward to the V2 of the series
tplink-safeloader sound like a good choice

John


On 25/11/2014 14:12, Matthias Schiffer wrote:
 On 11/24/2014 08:49 PM, John Crispin wrote:


 On 21/11/2014 09:41, Matthias Schiffer wrote:
 Hi, this adds support for the new TP-LINK outdoor series
 CPE210/220/510/520 (Pharos). I'm sending this as a RFC as there
 is a still a number of open questions:

 eth0 configuration == Looking at the log output of
 the stock firmware, it seems like the to ethernet ports both have
 their own MAC.

 After booting OpenWrt, both ethernet ports are connected to the
 internal switch, which is connected to the CPUs GMAC1; I haven't
 been able to get a link on GMAC0 at all, so the current code of
 these patches only initializes GMAC1. I don't know if using both
 GMACs would be preferable, but it seems a bit strange like this, so
 maybe someone with some more insight into the Atheros SoCs could
 look at it or give me some hints?

 if you connect tot he switch with 2 macs then you can do the lan/wan
 segmenting via vlan'ing inside the swith without the need for a trunk
 port and the matching vlan1/2 inside the network config. it would be
 preferable to have both working. its not a reason to not merge though
 Okay.
 





 LED configuration = The CPEs have 6 controllable
 LEDs: LAN0, LAN1 and four WLAN signal indicators. Currently my
 patches configure all signal indicators using rssileds, but no 
 status or WLAN activity LEDs are left like this.


 Image generation  The new TP-LINK bootloader
 (TP-LINK Safeloader) expects the kernel image in ELF format. I've
 tried building the ELF LZMA loader via Image/BuildLoader, but as
 soon as I added a kernel command line there, the image wouldn't
 boot at all. As a workaround, I'm using PatchKernelLzma and then
 build the LZMA loader using the patched kernel as LOADER_DATA.

 Also, there's no initramfs support so far. (I've never used
 initramfs with OpenWrt, but it seems like all other image types
 support it?)


 initramfs is a ram boot image. the kernel has a rootfs inside and most
 bootloader will allow you to boot hese without the need to actually
 flash the image.
 As the Safeloader doesn't allow booting from RAM, is there any reason to
 have the initramfs images?
 




 Apart from these issues, everything seems to work fine. I've only
 tested this on the CPE510 so far, but I don't see why it shouldn't
 work the same on the CPE210 (the stock firmware, PharOS, also
 uses just one image for both devices). The CPE220 and CPE520
 variants aren't available yet, but as far as I can tell from the
 information in the manual book, the only difference is the antenna
 (lower angle, higher gain), so I've included them as supported
 devices as well.



 looks good, i saw 2-3 mini details int he firmware tool which i will
 fix up while merging.
 I just noticed that there is actually another v3 image format from
 TP-Link, with 0x0300 magic, used on Archer C2. I think it would make
 sense to reserve the name mktplinkfw3 for a firmware tool for that
 format, so I'll send an updated series which renames the tool for the
 Safeloader to something like tplink-safeloader?
 

 one question, why the mach file and the leds named cpe501 and not say
 cpe201 ? (just curious)
 Two reasons:
 
 1. The test device I got is a CPE510
 2. The string CPE510 appears in the vendor string of the stock image
 used for both CPE210 and CPE510
 

  John




 Matthias Schiffer (2): firmware-utils: add new tool mktplinkfw3 for
 the new TP-LINK Pharos devices (CPE210/220/510/520) ar71xx: add
 support for TP-LINK CPE210/220/510/520

 target/linux/ar71xx/base-files/etc/diag.sh |   3 + 
 .../ar71xx/base-files/etc/uci-defaults/01_leds |  10 + 
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 + 
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  40 +- 
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  32 ++ 
 target/linux/ar71xx/config-3.10|   1 + 
 .../ar71xx/files/arch/mips/ath79/mach-cpe510.c | 107 + 
 target/linux/ar71xx/generic/profiles/tp-link.mk|  11 + 
 target/linux/ar71xx/image/Makefile |  27 ++ 
 .../610-MIPS-ath79-openwrt-machines.patch  |  23 +- 
 tools/firmware-utils/Makefile  |   1 + 
 tools/firmware-utils/src/mktplinkfw3.c | 469
 + 12 files changed, 724 insertions(+), 7
 deletions(-) create mode 100644
 target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c create mode
 100644 tools/firmware-utils/src/mktplinkfw3.c

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


[OpenWrt-Devel] Oopses on ZyXEL NBG6716 (atheros)

2014-11-25 Thread Andre Valentin
Hi!

Since 3.10.58 I notice reboots of the system. I logged the oopses, but cannot 
see a source. Please take a look if you have an idea what the heck this causes:
---
[   57.66] icmp6_send: no reply to icmp error
[   57.66] icmp6_send: no reply to icmp error
[   57.66] CPU 0 Unable to handle kernel paging request at virtual address 
0260, epc == 8ef687e0, ra == 8e302664
[   57.68] Oops[#1]:
[   57.68] CPU: 0 PID: 5009 Comm: jsonfilter Not tainted 3.14.18 #3
[   57.68] task: 8c04 ti: 8dd92000 task.ti: 8dd92000
[   57.68] $ 0   :  0001  8dec60e0
[   57.68] $ 4   : 8dee9e40 000a  0001
[   57.68] $ 8   : 20030068 fd000f88 b4672046 27b36626
[   57.68] $12   : 0002 0002a300  
[   57.68] $16   : 8dee9e40 0001 8dee9e40 
[   57.68] $20   : 0001 0004 0001 0003
[   57.68] $24   :  8ef77590
[   57.68] $28   : 8dd92000 8dd93b58 ff62 8e302664
[   57.68] Hi: 0001
[   57.68] Lo: 
[   57.68] epc   : 8ef687e0 0x8ef687e0
[   57.68] Not tainted
[   57.68] ra: 8e302664 0x8e302664
[   57.68] Status: 1100fc03 KERNEL EXL IE
[   57.68] Cause : 0088
[   57.68] BadVA : 0260
[   57.68] PrId  : 00019750 (MIPS 74Kc)
[   57.68] Modules linked in: gpio_button_hotplug qcserial option 
iptable_nat ip6table_nat cdc_mbim ath9k usb_wwan sierra_net sierra rndis_host 
qmi_wwan pppoe pl2303 nf_nat_pptp nf_nat_ipv6
nf_nat_ipv4 nf_nat_amanda nf_conntrack_pptp nf_conntrack_ipv6 nf_conntrack_ipv4 
nf_conntrack_amanda l2tp_ppp huawei_cdc_ncm ftdi_sio cdc_subset cdc_ncm 
cdc_ether cdc_eem ath9k_common xt_time xt_tcpudp
xt_tcpmss xt_string xt_statistic xt_state xt_socket xt_recent xt_quota 
xt_policy xt_pkttype xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit 
xt_length xt_iprange xt_id xt_hl xt_helper xt_hashlimit
xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes 
xt_comment xt_addrtype xt_TPROXY xt_TCPMSS xt_REDIRECT xt_NETMAP xt_LOG xt_HL 
xt_DSCP xt_CT xt_CLASSIFY usbserial usbnet usblp
ts_kmp ts_fsm ts_bm pppox ppp_synctty ppp_mppe ppp_async nfnetlink_log 
nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_proto_gre nf_nat_irc 
nf_nat_h323 nf_nat_ftp nf_defrag_ipv6 nf_defrag_ipv4
nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_proto_gre 
nf_conntrack_netlink nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp 
nf_conntrack_broadcast iptable_raw iptable_mangle
iptable_filter ipt_ah ipt_ULOG ipt_REJECT ipt_MASQUERADE ipt_ECN ip_tables 
gspca_sonixj gspca_sonixb gspca_main crc_ccitt cdc_wdm cdc_acm ath9k_hw 
arptable_filter arpt_mangle arp_tables fuse sch_teql
sch_tbf sch_sfq sch_red sch_prio sch_netem sch_htb sch_gred sch_dsmark 
sch_codel em_text em_nbyte em_meta em_cmp cls_basic act_police act_ipt 
act_connmark act_skbedit act_mirred em_u32 cls_u32
cls_tcindex cls_flow cls_route cls_fw sch_hfsc sch_ingress v4l2_common videodev 
evdev ath mac80211 cfg80211 compat siit ledtrig_usbdev xt_LED ledtrig_morse 
ledtrig_heartbeat ledtrig_gpio xt_set
ip_set_list_set ip_set_hash_netport ip_set_hash_netiface ip_set_hash_net 
ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ip 
ip_set_bitmap_port ip_set_bitmap_ipmac
ip_set_bitmap_ip ip_set nfnetlink ip6t_NPT ip6t_MASQUERADE nf_nat nf_conntrack 
ip6t_REJECT ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables 
pppoatm ppp_generic slhc msdos ip6_gre
ip_gre gre ifb dummy l2tp_ip l2tp_eth ip_vti sit l2tp_netlink l2tp_core ipcomp6 
xfrm6_tunnel xfrm6_mode_tunnel xfrm6_mode_transport xfrm6_mode_beet esp6 ah6 
ipcomp xfrm4_tunnel xfrm4_mode_tunnel
xfrm4_mode_transport xfrm4_mode_beet esp4 ah4 ipip ip6_tunnel tunnel6 tunnel4 
ip_tunnel veth tun af_key xfrm_user xfrm_ipcomp xfrm_algo vfat fat udf 
crc_itu_t ntfs isofs br2684 atm fscache ipv6
chainiv eseqiv crypto_wq algif_skcipher algif_hash af_alg sha256_generic 
sha1_generic krng rng md5 hmac ecb des_generic cbc authenc aead arc4 
crypto_blkcipher usb_storage input_polldev ohci_platform
ohci_hcd ledtrig_transient ehci_pci ehci_platform ehci_hcd sd_mod scsi_mod ext4 
jbd2 mbcache button_hotplug input_core usbcore nls_base usb_common mii 
crypto_hash [last unloaded: ath10k_core]
[   57.68] Process jsonfilter (pid: 5009, threadinfo=8dd92000, 
task=8c04, tls=77663440)
[   57.68] Stack : 8efbf6b0 c10abda0 0028 8dcf5000   
 8dcf5000
  ff62  0004 0a00be48 c10a8000 8dee9e40 3a01 
c10c8588
  c10c8000 8dee9e40 80375a64 8dee9e40  0001 0004 
8dee9e40
  0001 8e302664 8dd93c48 80375a64 8dee9e40  8ee858dc 
0004
  0001 8dd93c48 80375a64 801f372c 8ef29e80 0004 80375a5c 
8dcf5000
  ...
[   57.68] Call Trace:[8e302664] 0x8e302664
[   57.68] [8ee858dc] 0x8ee858dc
[   

Re: [OpenWrt-Devel] Oopses on ZyXEL NBG6716 (atheros)

2014-11-25 Thread John Crispin
build an image with KALLSYMS please and send a new log



On 25/11/2014 15:43, Andre Valentin wrote:
 Hi!
 
 Since 3.10.58 I notice reboots of the system. I logged the oopses,
 but cannot see a source. Please take a look if you have an idea
 what the heck this causes: 
 --- [
 57.66] icmp6_send: no reply to icmp error [   57.66]
 icmp6_send: no reply to icmp error [   57.66] CPU 0 Unable to
 handle kernel paging request at virtual address 0260, epc ==
 8ef687e0, ra == 8e302664 [   57.68] Oops[#1]: [   57.68]
 CPU: 0 PID: 5009 Comm: jsonfilter Not tainted 3.14.18 #3 [
 57.68] task: 8c04 ti: 8dd92000 task.ti: 8dd92000 [
 57.68] $ 0   :  0001  8dec60e0 [
 57.68] $ 4   : 8dee9e40 000a  0001 [
 57.68] $ 8   : 20030068 fd000f88 b4672046 27b36626 [
 57.68] $12   : 0002 0002a300   [
 57.68] $16   : 8dee9e40 0001 8dee9e40  [
 57.68] $20   : 0001 0004 0001 0003 [
 57.68] $24   :  8ef77590 [   57.68] $28   :
 8dd92000 8dd93b58 ff62 8e302664 [   57.68] Hi:
 0001 [   57.68] Lo:  [   57.68] epc   :
 8ef687e0 0x8ef687e0 [   57.68] Not tainted [   57.68]
 ra: 8e302664 0x8e302664 [   57.68] Status: 1100fc03 KERNEL
 EXL IE [   57.68] Cause : 0088 [   57.68] BadVA :
 0260 [   57.68] PrId  : 00019750 (MIPS 74Kc) [   57.68]
 Modules linked in: gpio_button_hotplug qcserial option iptable_nat
 ip6table_nat cdc_mbim ath9k usb_wwan sierra_net sierra rndis_host
 qmi_wwan pppoe pl2303 nf_nat_pptp nf_nat_ipv6 nf_nat_ipv4
 nf_nat_amanda nf_conntrack_pptp nf_conntrack_ipv6 nf_conntrack_ipv4
 nf_conntrack_amanda l2tp_ppp huawei_cdc_ncm ftdi_sio cdc_subset
 cdc_ncm cdc_ether cdc_eem ath9k_common xt_time xt_tcpudp xt_tcpmss
 xt_string xt_statistic xt_state xt_socket xt_recent xt_quota
 xt_policy xt_pkttype xt_owner xt_nat xt_multiport xt_mark xt_mac
 xt_limit xt_length xt_iprange xt_id xt_hl xt_helper xt_hashlimit 
 xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit
 xt_connbytes xt_comment xt_addrtype xt_TPROXY xt_TCPMSS xt_REDIRECT
 xt_NETMAP xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY usbserial usbnet
 usblp ts_kmp ts_fsm ts_bm pppox ppp_synctty ppp_mppe ppp_async
 nfnetlink_log nf_nat_tftp nf_nat_snmp_basic nf_nat_sip
 nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_defrag_ipv6
 nf_defrag_ipv4 nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip
 nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_irc
 nf_conntrack_h323 nf_conntrack_ftp nf_conntrack_broadcast
 iptable_raw iptable_mangle iptable_filter ipt_ah ipt_ULOG
 ipt_REJECT ipt_MASQUERADE ipt_ECN ip_tables gspca_sonixj
 gspca_sonixb gspca_main crc_ccitt cdc_wdm cdc_acm ath9k_hw
 arptable_filter arpt_mangle arp_tables fuse sch_teql sch_tbf
 sch_sfq sch_red sch_prio sch_netem sch_htb sch_gred sch_dsmark
 sch_codel em_text em_nbyte em_meta em_cmp cls_basic act_police
 act_ipt act_connmark act_skbedit act_mirred em_u32 cls_u32 
 cls_tcindex cls_flow cls_route cls_fw sch_hfsc sch_ingress
 v4l2_common videodev evdev ath mac80211 cfg80211 compat siit
 ledtrig_usbdev xt_LED ledtrig_morse ledtrig_heartbeat ledtrig_gpio
 xt_set ip_set_list_set ip_set_hash_netport ip_set_hash_netiface
 ip_set_hash_net ip_set_hash_ipportnet ip_set_hash_ipportip
 ip_set_hash_ipport ip_set_hash_ip ip_set_bitmap_port
 ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_NPT
 ip6t_MASQUERADE nf_nat nf_conntrack ip6t_REJECT ip6table_raw
 ip6table_mangle ip6table_filter ip6_tables x_tables pppoatm
 ppp_generic slhc msdos ip6_gre ip_gre gre ifb dummy l2tp_ip
 l2tp_eth ip_vti sit l2tp_netlink l2tp_core ipcomp6 xfrm6_tunnel
 xfrm6_mode_tunnel xfrm6_mode_transport xfrm6_mode_beet esp6 ah6
 ipcomp xfrm4_tunnel xfrm4_mode_tunnel xfrm4_mode_transport
 xfrm4_mode_beet esp4 ah4 ipip ip6_tunnel tunnel6 tunnel4 ip_tunnel
 veth tun af_key xfrm_user xfrm_ipcomp xfrm_algo vfat fat udf
 crc_itu_t ntfs isofs br2684 atm fscache ipv6 chainiv eseqiv
 crypto_wq algif_skcipher algif_hash af_alg sha256_generic
 sha1_generic krng rng md5 hmac ecb des_generic cbc authenc aead
 arc4 crypto_blkcipher usb_storage input_polldev ohci_platform 
 ohci_hcd ledtrig_transient ehci_pci ehci_platform ehci_hcd sd_mod
 scsi_mod ext4 jbd2 mbcache button_hotplug input_core usbcore
 nls_base usb_common mii crypto_hash [last unloaded: ath10k_core] [
 57.68] Process jsonfilter (pid: 5009, threadinfo=8dd92000,
 task=8c04, tls=77663440) [   57.68] Stack : 8efbf6b0
 c10abda0 0028 8dcf5000    8dcf5000 
 ff62  0004 0a00be48 c10a8000 8dee9e40 3a01
 c10c8588 c10c8000 8dee9e40 80375a64 8dee9e40  0001
 0004 8dee9e40 0001 8e302664 8dd93c48 80375a64 8dee9e40
  8ee858dc 0004 0001 8dd93c48 80375a64 801f372c
 8ef29e80 0004 80375a5c 8dcf5000 ... [   57.68] Call

[OpenWrt-Devel] [PATCH] [utils] gammu: new package in tree

2014-11-25 Thread Виталий Процко

This add new package gammu v 1.33.0 to the build tree.

Gammu is the name of the project as well as name of command line
utility, which you can use to control your cell phone. It is written in C.

Signed-off-by: Vitaly Protsko vi...@sft.ru
---
 Makefile |   66 
+++

 patches/001-iconv-disabling-option.patch |   51 +++
 patches/002-no-fstack-protector.patch|   11 +
 patches/003-cmake-cross-toolchain.patch  |   43 
 4 files changed, 171 insertions(+)

diff -Naurp a/package/utils/gammu/Makefile b/package/utils/gammu/Makefile
--- a/package/utils/gammu/Makefile  1970-01-01 03:00:00.0 +0300
+++ b/package/utils/gammu/Makefile  2014-11-19 17:20:57.0 +0300
@@ -0,0 +1,66 @@
+#
+# Copyright (C) 2006-2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gammu
+PKG_VERSION:=1.33.0
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://dl.cihar.com/gammu/releases/
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_MD5SUM:=66b95afbde3085168c4a20266e8cb5c0
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/gammu
+   SECTION:=utils
+   CATEGORY:=Utilities
+   TITLE:=Command line utility which you can use to control your cellphone
+   URL:=http://dl.cihar.com/gammu/releases/
+	DEPENDS:=@BUILD_NLS +libpthread +libcurl +glib2 $(ICONV_DEPENDS) 
$(INTL_DEPENDS)

+   DEPENDS+=+PACKAGE_python:python +PACKAGE_bluez-libs:bluez-libs
+   DEPENDS+=+PACKAGE_libmysqlclient:libmysqlclient 
+PACKAGE_unixodbc:unixodbc
+   MAINTAINER:=Vitaly Protsko vi...@sft.ru
+endef
+
+CONFIGURE_ARGS:= \
+   --prefix=/usr \
+   --cross-root=$(STAGING_DIR) $(TOOLCHAIN_DIR) \
+   --enable-shared
+
+define Build/Compile
+   $(MAKE) -C $(PKG_BUILD_DIR) \
+   $(TARGET_CONFIGURE_OPTS) \
+   LDSHARED=$(TARGET_CROSS)ld -shared \
+   CFLAGS=$(TARGET_CFLAGS) $(FPIC)
+endef
+
+define Build/Install
+   $(MAKE) -C $(PKG_BUILD_DIR) \
+   DESTDIR=$(PKG_INSTALL_DIR) \
+   install
+endef
+
+define Build/InstallDev
+   mkdir -p $(1)/usr/include
+   $(CP) -r $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/
+   mkdir -p $(1)/usr/lib
+   $(CP)$(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib/
+endef
+
+define Package/gammu/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin
+	$(INSTALL_BIN) 
$(PKG_INSTALL_DIR)/usr/bin/gammu-{config,smsd,smsd-inject,smsd-monitor} 
$(1)/usr/bin

+   $(INSTALL_DIR) $(1)/usr/lib
+   $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} 
$(1)/usr/lib
+endef
+
+$(eval $(call BuildPackage,gammu))
diff -Naurp 
a/package/utils/gammu/patches/001-iconv-disabling-option.patch 
b/package/utils/gammu/patches/001-iconv-disabling-option.patch
--- a/package/utils/gammu/patches/001-iconv-disabling-option.patch 
1970-01-01 03:00:00.0 +0300
+++ b/package/utils/gammu/patches/001-iconv-disabling-option.patch 
2014-11-13 19:20:30.0 +0300

@@ -0,0 +1,51 @@
+--- a/cmake/FindIconv.cmake
 b/cmake/FindIconv.cmake
+@@ -34,9 +34,9 @@ string(REGEX REPLACE (.*)/include/? \
+
+ FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS 
${ICONV_INCLUDE_BASE_DIR}/lib PATHS /opt/local/lib)

+
+-IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
++IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
+SET(ICONV_FOUND TRUE)
+-ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
++ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
+
+ set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
+--- a/configure
 b/configure
+@@ -31,6 +31,7 @@ Usage: ./configure [options]
+ --enable-backup enable backup support
+ --enable-win32  enable mingw crosscomilation
+ --enable-protection enable compile time protections
++--disable-iconv disable iconv support
+ --with-python=path path to Python interpreter
+ --without-gnapplet  disable installation of gnapplet
+ --without-completion disable installation of bash completion script
+@@ -57,6 +58,7 @@ CMAKE_PROTECTION=
+ CMAKE_PYTHON=
+ CMAKE_GNAP=
+ CMAKE_COMPLETE=
++CMAKE_ICONV=
+
+ # process command line
+ while [ $# -gt 0 ] ; do
+@@ -94,6 +96,12 @@ while [ $# -gt 0 ] ; do
+ --disable-protection)
+ CMAKE_PROTECTION=-DENABLE_PROTECTION=OFF
+ ;;
++--enable-iconv)
++CMAKE_ICONV=-DDISABLE_ICONV=OFF
++;;
++--disable-iconv)
++CMAKE_ICONV=-DDISABLE_ICONV=ON
++;;
+ --enable-debug)
+ CMAKE_DEBUG=-DCMAKE_BUILD_TYPE=Debug
+ ;;
+@@ -142,4 +150,4 @@ fi
+ cd $BUILD_DIR
+
+ # invoke cmake to do 

[OpenWrt-Devel] [PATCH] netifd: Fix source routing

2014-11-25 Thread Kristian Evensen
According to the OpenWRT Network documentation for route, the 'source' option
is The preferred source address when sending to destinations covered by the
target. However, netifd currently stores this value in RTA_SRC on
NEWROUTE/DELROUTE.

RTA_SRC is not used by kernel when handling NEWROUTE nor DELROUTE. Store the
source address in RTA_PREFSRC, so that option works as specified in
documentation.

Signed-off-by: Kristian Evensen kristian.even...@gmail.com
---
 system-linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system-linux.c b/system-linux.c
index 83827d5..428302f 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -1429,7 +1429,7 @@ static int system_rt(struct device *dev, struct 
device_route *route, int cmd)
nla_put(msg, RTA_DST, alen, route-addr);
 
if (route-sourcemask)
-   nla_put(msg, RTA_SRC, alen, route-source);
+   nla_put(msg, RTA_PREFSRC, alen, route-source);
 
if (route-metric  0)
nla_put_u32(msg, RTA_PRIORITY, route-metric);
-- 
2.1.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] netifd: Fix source routing

2014-11-25 Thread Steven Barth
NAK, this would break source-dest-routing for IPv6 (documentation seems 
to be wrong here).

Maybe we should use RTA_PREFSRC for IPv4 and RTA_SRC for IPv6?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] netifd: Fix source routing

2014-11-25 Thread Kristian Evensen
On Tue, Nov 25, 2014 at 8:47 PM, Steven Barth cy...@openwrt.org wrote:
 Maybe we should use RTA_PREFSRC for IPv4 and RTA_SRC for IPv6?

Sounds good to me. I am not to familiar with configuring IPv6, so I
was not aware that RTA_SRC is used differently there.

If no-one else jumps in before me, I will submit an updated patch tomorow.

-Kristian
___
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] firmware-utils: add new tool tplink-safeloader for the new TP-LINK Pharos devices (CPE210/220/510/520)

2014-11-25 Thread Matthias Schiffer
The new TP-LINK Pharos series uses a new bootloader, the TP-LINK Safeloader.
It uses an advanced firmware image format, containing an image partition table
and a flash partition table (and image partitions are mapped to the
corresponding flash partitions). The exact image format is documented in the
source code.

Furthermore, the bootloader expects the kernel image as an ELF executable.

Signed-off-by: Matthias Schiffer mschif...@universe-factory.net
---
 tools/firmware-utils/Makefile|   1 +
 tools/firmware-utils/src/tplink-safeloader.c | 538 +++
 2 files changed, 539 insertions(+)
 create mode 100644 tools/firmware-utils/src/tplink-safeloader.c

diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 65b7c15..988c625 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -41,6 +41,7 @@ define Host/Compile
$(call cc,mkplanexfw sha1)
$(call cc,mktplinkfw md5)
$(call cc,mktplinkfw2 md5)
+   $(call cc,tplink-safeloader md5, -Wall)
$(call cc,pc1crypt)
$(call cc,osbridge-crc)
$(call cc,wrt400n cyg_crc32)
diff --git a/tools/firmware-utils/src/tplink-safeloader.c 
b/tools/firmware-utils/src/tplink-safeloader.c
new file mode 100644
index 000..23d703f
--- /dev/null
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -0,0 +1,538 @@
+/*
+  Copyright (c) 2014, Matthias Schiffer mschif...@universe-factory.net
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright 
notice,
+   this list of conditions and the following disclaimer in the 
documentation
+   and/or other materials provided with the distribution.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
+  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
ARE
+  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+/*
+   tplink-safeloader
+
+   Image generation tool for the TP-LINK SafeLoader as seen on
+   TP-LINK Pharos devices (CPE210/220/510/520)
+*/
+
+
+#include assert.h
+#include errno.h
+#include error.h
+#include stdbool.h
+#include stdio.h
+#include stdint.h
+#include stdlib.h
+#include string.h
+#include time.h
+#include unistd.h
+
+#include arpa/inet.h
+
+#include sys/types.h
+#include sys/stat.h
+
+#include md5.h
+
+
+#define ALIGN(x,a) ({ typeof(a) __a = (a); (((x) + __a - 1)  ~(__a - 1)); })
+
+
+/** An image partition table entry */
+struct image_partition_entry {
+   const char *name;
+   size_t size;
+   uint8_t *data;
+};
+
+/** A flash partition table entry */
+struct flash_partition_entry {
+   const char *name;
+   uint32_t base;
+   uint32_t size;
+};
+
+
+/** The content of the soft-version structure */
+struct __attribute__((__packed__)) soft_version {
+   uint32_t magic;
+   uint32_t zero;
+   uint8_t pad1;
+   uint8_t version_major;
+   uint8_t version_minor;
+   uint8_t version_patch;
+   uint8_t year_hi;
+   uint8_t year_lo;
+   uint8_t month;
+   uint8_t day;
+   uint32_t rev;
+   uint8_t pad2;
+};
+
+
+static const uint8_t jffs2_eof_mark[4] = {0xde, 0xad, 0xc0, 0xde};
+
+
+/**
+   Salt for the MD5 hash
+
+   Fortunately, TP-LINK seems to use the same salt for most devices which use
+   the new image format.
+*/
+static const uint8_t md5_salt[16] = {
+   0x7a, 0x2b, 0x15, 0xed,
+   0x9b, 0x98, 0x59, 0x6d,
+   0xe5, 0x04, 0xab, 0x44,
+   0xac, 0x2a, 0x9f, 0x4e,
+};
+
+
+/** Vendor information for CPE210/220/510/520 */
+static const unsigned char cpe510_vendor[] = 
\x00\x00\x00\x1fCPE510(TP-LINK|UN|N300-5):1.0\r\n;
+
+
+/**
+The flash partition table for CPE210/220/510/520;
+it is the same as the one used by the stock images.
+*/
+static const struct flash_partition_entry cpe510_partitions[] = {
+   {fs-uboot, 0x0, 0x2},
+   {partition-table, 0x2, 0x02000},
+   {default-mac, 0x3, 0x00020},
+   {product-info, 0x31100, 0x00100},
+   {signature, 0x32000, 0x00400},
+   {os-image, 0x4, 0x17},
+  

[OpenWrt-Devel] [PATCH v2 0/2] TP-LINK CPE210/220/510/520

2014-11-25 Thread Matthias Schiffer
Here is version 2 of my CPE210/220/510/520 patchset.

Changes since the RFC:

* The firmware build tool has been renamed to tplink-safeloader

  As TP-LINK has started using a new image format with a 0x03 in the first byte
  on some of its devices (e.g. Archer C2), let's keep the name mktplinkfw3 for
  a tool for that format. The format for the SafeLoader is completely different,
  so let the name of the tool reflect that.

* Various fixes in the firmware tool

  There were multiple mistakes in the firmware generator which would prevent
  generated images to be flashed via the Web UI of the stock firmware. With the
  fixed generator, images can be flashed both via TFTP and the Web UI.

* LAN and WAN have been switched

  While the choice of WAN and LAN roles is arbitrary as the ports are labeled as
  LAN0 and LAN1, I've changed LAN to LAN0 (the PoE port) and WAN to LAN1 to
  match the mappings used on Ubiquiti NanoStations.


Matthias Schiffer (2):
  firmware-utils: add new tool tplink-safeloader for the new TP-LINK
Pharos devices (CPE210/220/510/520)
  ar71xx: add support for TP-LINK CPE210/220/510/520

 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |  10 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  40 +-
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  32 ++
 target/linux/ar71xx/config-3.14|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-cpe510.c | 107 
 target/linux/ar71xx/generic/profiles/tp-link.mk|  11 +
 target/linux/ar71xx/image/Makefile |  29 ++
 .../610-MIPS-ath79-openwrt-machines.patch  |  23 +-
 tools/firmware-utils/Makefile  |   1 +
 tools/firmware-utils/src/tplink-safeloader.c   | 538 +
 12 files changed, 795 insertions(+), 7 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
 create mode 100644 tools/firmware-utils/src/tplink-safeloader.c

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


[OpenWrt-Devel] [PATCH v2 2/2] ar71xx: add support for TP-LINK CPE210/220/510/520

2014-11-25 Thread Matthias Schiffer
This adds support for the TP-LINK CPE210/220/510/520 (Pharos series). These
devices are very similar to the Ubiquiti NanoStations, but with better specs:
faster CPU, more RAM, 2x2 MIMO.

Signed-off-by: Matthias Schiffer mschif...@universe-factory.net
---
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds |  10 ++
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  40 +++-
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  32 ++
 target/linux/ar71xx/config-3.14|   1 +
 .../ar71xx/files/arch/mips/ath79/mach-cpe510.c | 107 +
 target/linux/ar71xx/generic/profiles/tp-link.mk|  11 +++
 target/linux/ar71xx/image/Makefile |  29 ++
 .../610-MIPS-ath79-openwrt-machines.patch  |  23 +++--
 10 files changed, 256 insertions(+), 7 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 39a54cb..35c2959 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -43,6 +43,9 @@ get_status_led() {
cap4200ag)
status_led=senao:green:pwr
;;
+   cpe510)
+   status_led=tp-link:green:link4
+   ;;
db120)
status_led=db120:green:status
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds 
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 2678e55..c5a1f7e 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -62,6 +62,16 @@ carambola2)
ucidef_set_led_wlan wlan WLAN carambola2:green:wlan phy0tpt
;;
 
+cpe510)
+   ucidef_set_led_switch lan0 LAN0 tp-link:green:lan0 switch0 
0x20
+   ucidef_set_led_switch lan1 LAN1 tp-link:green:lan1 switch0 
0x10
+   ucidef_set_rssimon wlan0 4 1
+   ucidef_set_led_rssi rssilow RSSILOW tp-link:green:link1 wlan0 
1 100 0 13
+   ucidef_set_led_rssi rssimediumlow RSSIMEDIUMLOW 
tp-link:green:link2 wlan0 26 100 -25 13
+   ucidef_set_led_rssi rssimediumhigh RSSIMEDIUMHIGH 
tp-link:green:link3 wlan0 51 100 -50 13
+   ucidef_set_led_rssi rssihigh RSSIHIGH tp-link:green:link4 wlan0 
76 100 -75 13
+   ;;
+
 db120)
ucidef_set_led_usbdev usb USB db120:green:usb 1-1
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 1b0bea0..22f2dbe 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -63,6 +63,13 @@ tl-wdr4900-v2)
ucidef_add_switch_vlan switch0 2 1 6
;;
 
+cpe510)
+   ucidef_set_interfaces_lan_wan eth0.1 eth0.2
+   ucidef_add_switch switch0 1 1
+   ucidef_add_switch_vlan switch0 1 0t 5
+   ucidef_add_switch_vlan switch0 2 0t 4
+   ;;
+
 db120 |\
 rb-2011l | \
 rb-2011uas |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 30163fb..fadff54 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -229,6 +229,39 @@ tplink_board_detect() {
AR71XX_MODEL=$model $hwver
 }
 
+tplink_pharos_get_model_string() {
+   local part
+   part=$(find_mtd_part 'product-info')
+   [ -z $part ]  return 1
+
+   # The returned string will end with \r\n, but we don't remove it here
+   # to simplify matching against it in the sysupgrade image check
+   dd if=$part bs=1 skip=4360 2/dev/null | head -n 1
+}
+
+tplink_pharos_board_detect() {
+   local model_string=$(tplink_pharos_get_model_string | tr -d '\r')
+   local oIFS=$IFS; IFS=:; set -- $model_string; IFS=$oIFS
+   local model
+
+   case $1 in
+   'CPE210(TP-LINK|UN|N300-2)')
+   model='TP-Link CPE210'
+   ;;
+   'CPE220(TP-LINK|UN|N300-2)')
+   model='TP-Link CPE220'
+   ;;
+   'CPE510(TP-LINK|UN|N300-5)')
+   model='TP-Link CPE510'
+   ;;
+   'CPE520(TP-LINK|UN|N300-5)')
+   model='TP-Link CPE520'
+   ;;
+   esac
+
+   [ -n $model ]  AR71XX_MODEL=$model v$2
+}
+
 ar71xx_board_detect() {
local machine
local name
@@ -302,6 +335,10 @@ ar71xx_board_detect() {
*CAP4200AG)
name=cap4200ag
;;
+   *CPE210/220/510/520)
+   name=cpe510
+   tplink_pharos_board_detect
+   ;;
*DB120 reference board)
name=db120
;;
@@ -772,7 +809,8 @@ ar71xx_board_detect() {
;;
esac
 
- 

[OpenWrt-Devel] Mips Creator CI20 OpenWRT support.

2014-11-25 Thread José Vázquez
Few weeks ago i've received a Mips CI20 and began to port it to
openwrt using kernel 3.18-rc4.
For now only few peripherals work fine but is more than i initially expected.
https://github.com/Pteridium/OpenWRT-experimental/blob/ci20-alpha/README.md
Still there are a lot of peripherals to be included, but for initial
tests is enough for me.

The cpu performance is a bit disappointing if is taken in mind that
runs at 1'2GHz and the ethernet tests with iperf showed 80Mb/s with
one thread and 65 with 100.
Compiling without generic patches 132-mips_inline_dma_ops,
259-regmap_dynamic, 305-mips_module_reloc,
306-mips_mem_functions_performance and 309-mips_fuse_workaround I were
able to enable msc1 and test brcmfmac, but no success: the driver
recognizes the bcm4330 but it is unable to configure it correctly.

Now i'm working to add the remaining drivers that work with kernel
3.16. What i previously made was simple rebases from the code wrote by
Zubair Lutfullah and Paul Burton with a couple of changes in pinctrl
and dma drivers.

Any comment will be very appreciated.

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


Re: [OpenWrt-Devel] [PATCH v2 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-25 Thread Maxime Ripard
On Tue, Nov 25, 2014 at 11:21:22AM +0100, Felix Fietkau wrote:
 On 2014-11-24 22:42, Maxime Ripard wrote:
  Rely on the Kconfig defconfig mechanism to fill all the missing options,
  instead of needing to set them all in the kernel configurations like what 
  was
  previously done.
  
  This will allow to trim down a lot the configuration files, avoid carrying
  unused configuration options and preserve the developpers mental health.
  
  Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com
  ---
   include/kernel-defaults.mk | 40 
   1 file changed, 32 insertions(+), 8 deletions(-)
  
  diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
  index 8abd32d7141d..9fd96a234e37 100644
  --- a/include/kernel-defaults.mk
  +++ b/include/kernel-defaults.mk
  @@ -100,16 +100,40 @@ define Kernel/SetNoInitramfs
  echo 'CONFIG_INITRAMFS_SOURCE='  $(LINUX_DIR)/.config
   endef
   
  +ifeq ($(ARCH),armeb)
  +  LINUX_ARCH := arm
  +else ifeq ($(ARCH),mipsel)
  +  LINUX_ARCH := mips
  +else ifeq ($(ARCH),mips64)
  +  LINUX_ARCH := mips
  +else ifeq ($(ARCH),um)
  +  LINUX_ARCH := x86
  +else ifeq ($(ARCH),i386)
  +  LINUX_ARCH := x86
  +else ifeq ($(ARCH),x86_64)
  +  LINUX_ARCH := x86
  +else
  +  LINUX_ARCH := $(ARCH)
  +endif
 That looks a lot like LINUX_KARCH from include/kernel.mk

Ah, right.

Thanks for pointing this out, I'll send a v3.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


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


Re: [OpenWrt-Devel] I'd like to donate a Netgear N150 WNR1000 v3

2014-11-25 Thread SGT. Garcia
On Nov 12  13:59 -0700, Alex Henrie wrote:
 2014-11-11 23:51 GMT-07:00 Rafał Miłecki zaj...@gmail.com:
  On 11 November 2014 23:26, Alex Henrie alexhenri...@gmail.com wrote:
  Is no one interested? Come on, I'm offering free hardware to play with ;-)
 
  I already have about 10-20 Broadcom based boars in my drawer ;) Not
  that excited with another one.
 
  However I'd be happy to help adding support for WNR1000 v3. Could you
  attach serial console to it and test some patched OpenWrt builds?
 
 It sounds like a fun project, but SGT. Garcia darwinsker...@gmail.com
 volunteered to work on it, and I have already mailed the device to
 him. I'm sure SGT. Garcia will contact you for help once he receives
 the device. Thanks for your work on OpenWrt!
 
 -Alex

Alex, it's here; in fact it might have been in the mailbox for 1 or 2 days.
many thanks.
Rafał, i'll post the nvram content tomorrow (12-18 hours from now).

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


Re: [OpenWrt-Devel] Mips Creator CI20 OpenWRT support.

2014-11-25 Thread John Crispin


On 25/11/2014 21:44, José Vázquez wrote:
 Few weeks ago i've received a Mips CI20 and began to port it to
 openwrt using kernel 3.18-rc4.
 For now only few peripherals work fine but is more than i initially 
 expected.
 https://github.com/Pteridium/OpenWRT-experimental/blob/ci20-alpha/README.md
 Still there are a lot of peripherals to be included, but for initial
 tests is enough for me.
 
 The cpu performance is a bit disappointing if is taken in mind that
 runs at 1'2GHz and the ethernet tests with iperf showed 80Mb/s with
 one thread and 65 with 100.
 Compiling without generic patches 132-mips_inline_dma_ops,
 259-regmap_dynamic, 305-mips_module_reloc,
 306-mips_mem_functions_performance and 309-mips_fuse_workaround I were
 able to enable msc1 and test brcmfmac, but no success: the driver
 recognizes the bcm4330 but it is unable to configure it correctly.
 
 Now i'm working to add the remaining drivers that work with kernel
 3.16. What i previously made was simple rebases from the code wrote by
 Zubair Lutfullah and Paul Burton with a couple of changes in pinctrl
 and dma drivers.
 
 Any comment will be very appreciated.
 

why do you invest a huge amount of time into a piece of PR hardware ?
the creator board only serves the purpose to generate a PR hype. i dont
think it was ever intended to be used for anything real life.





 José
 ___
 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] protobuf broken in BB

2014-11-25 Thread John Crispin
Hi,

so which patch do i use now ?

John

On 19/11/2014 13:24, Guillaume Déflache wrote:
 Hi all
 
 Sorry obconseil and John for the delay, my work priorities got
 shifted to other things... @John: good idea to ping me personally!
 ;)
 
 
 Am 06.11.2014 10:23, schrieb obconseil:
 Le 05/11/2014 22:43, Guillaume Déflache a écrit :
 
 
 Fine, but that's not the problem as I said before (see the very
 1st quoted text in this message): *installing protoc at the
 right location* (that is .../build_dir/host/bin/protoc IIRC) is
 the problem.
 
 
 I checked that with our pre-BB snapshot it was installed where
 expected and that with the BB release it is not. You can try
 executing `make install` from the host build directory to
 convince yourself that that does what is required from the
 OpenWrt Makefile but currently missing in BB's. That's what I
 did and then the problem was gone.
 
 So you have to try using protoc to generate some source code
 files in order to really stumble on the problem. Apart from
 that everything works fine indeed.
 
 Oh. I admit I overlooked this in your previous message. Thanks.
 
 What about the attached patch ?
 
 I had no time to test it unfortunately but I made one myself (see
 below) in parallel to get something working for us internally.
 
 
 By the way, maybe somebody else could enlighten me on this but in
 BB, it seems that the host tools directory is
 .../staging_dir/host/bin rather than .../build_dir/host/bin .
 
 I have no .../build_dir/host/bin directory on my build tree.
 
 You are right, .../staging_dir/host/bin is correct: AFAICU only
 staging_dir/ sports global filesystem hierarchies for all packages
 with bin/, include/, lib/, ... (one for the host, two per compiled
 target for the toolchain and the device itself).
 
 
 The patch do install protoc in .../staging_dir/host/bin , along
 with all other programs like bison,...
 
 I think this is the correct thing to do, and that's also what I do
 in my patch.
 
 
 Since the snapshot we used previously PKG_USE_MIPS16:=0
 also got added, does that mean we should also use that on
 all packages that compile Protocol Buffer generated code
 and/or link with the PB library?
 
 After a second though I think this line was to avoid an assembler
 error on some plateform. I still need to test the current
 compiler/assembler on a MIPS16 platform, but for now you can
 safely leave this line out for your platform. [...]
 I would have no objections to 2.6.1 if it also works for us too
 (I can test that at the same time).
 
 Yes, please test  report : I would much better push upstream a
 patch with the newest version of protobuf.
 
 For us 2.6.0 and 2.5.0 definitely do not work (I think I also
 tested with 2.6.1, not sure anymore).
 
 When I made the patch I stumbled upon
 https://www.mail-archive.com/protobuf@googlegroups.com/msg10536.html
  (Re: [protobuf] Re: Issue 670 in protobuf: Not Able to compile
 protobuf for mips platform) which looks exactly like the problem I
 had. Alas I did not notify either of OpenWrt or protobuf of the
 others' problem then.
 
 I guess there was some kind of regression from 2.4.1, probably
 someone should point the upstream protobuf developers to this
 thread.
 
 
 What works for us is the patch below: - as I said only 2.4.1
 worked - removing the src/google/protobuf/stubs/platform_macros.h
 patch chunk also did help *IIRC* - PKG_USE_MIPS16:=0 or 1 made no
 difference *IIRC*
 
 
 ##\brief protobuf 2.4.1 without MIPS16 ## ## For the full rationale
 see
 https://lists.openwrt.org/pipermail/openwrt-devel/2014-November/029107.html.

 
##
 ## This is a Git patch against GitHub OpenWrt's 'packages' feed
 v14.07. # diff --git a/libs/protobuf/Makefile
 b/libs/protobuf/Makefile index 1553a7e..1411a82 100644 ---
 a/libs/protobuf/Makefile +++ b/libs/protobuf/Makefile @@ -8,12
 +8,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=protobuf -PKG_VERSION:=2.5.0 +PKG_VERSION:=2.4.1 
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
 PKG_SOURCE_URL:=http://protobuf.googlecode.com/files 
 -PKG_MD5SUM:=a72001a9067a4c2c4e0e836d0f92ece4 
 +PKG_MD5SUM:=ed436802019c9e1f40cc750eaf78f318
 
 PKG_BUILD_DEPENDS:=protobuf/host PKG_USE_MIPS16:=0 @@ -38,14 +38,7
 @@ define Package/protobuf/description of its internal RPC
 protocols and file formats. endef
 
 -define Host/Compile -   $(MAKE) -C $(HOST_BUILD_DIR) -endef - 
 -define Host/Install -endef - -CONFIGURE_ARGS +=
 --with-protoc=$(HOST_BUILD_DIR)/src/protoc +CONFIGURE_ARGS +=
 --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
 
 define Build/InstallDev $(INSTALL_DIR) \ diff --git
 a/libs/protobuf/patches/001-mipseb-compile.patch
 b/libs/protobuf/patches/001-mipseb-compile.patch deleted file mode
 100644 index 6eb0590..000 ---
 a/libs/protobuf/patches/001-mipseb-compile.patch +++ /dev/null @@
 -1,11 +0,0 @@  a/src/google/protobuf/stubs/platform_macros.h 
 -+++ b/src/google/protobuf/stubs/platform_macros.h -@@ -49,7 +49,7
 @@ - #elif defined(__ARMEL__) - 

Re: [OpenWrt-Devel] [PATCH 3/5] add new target 'oxnas'

2014-11-25 Thread John Crispin
Hi,

seems to all be functional. one last question ...

On 25/11/2014 11:45, Daniel Golle wrote:
 diff --git a/target/linux/oxnas/Makefile b/target/linux/oxnas/Makefile
 new file mode 100644
 index 000..67d45bc
 --- /dev/null
 +++ b/target/linux/oxnas/Makefile
 @@ -0,0 +1,28 @@
 +#
 +# Copyright (C) 2013 OpenWrt.org
 +#
 +# This is free software, licensed under the GNU General Public License v2.
 +# See /LICENSE for more information.
 +#
 +include $(TOPDIR)/rules.mk
 +
 +ARCH:=arm
 +BOARD:=oxnas
 +BOARDNAME:=PLXTECH NAS782X

you use oxnas everywhere apart from the string that the user sees in
menuconfig. i had to look twice to find the right target option in
menuconfig as i was looking for Oxna dna not plxtech


John



 +DEVICE_TYPE:=nas
 +FEATURES:=gpio nand pcie usb usbgadget ramdisk rtc squashfs
 +CPU_TYPE:=mpcore
 +
 +MAINTAINER:=Daniel Golle dan...@makrotopia.org
 +
 +KERNEL_PATCHVER:=3.18
 +
 +include $(INCLUDE_DIR)/target.mk
 +
 +DEFAULT_PACKAGES += \
 + kmod-button-hotplug kmod-input-gpio-keys-polled kmod-leds-gpio  
 \
 + kmod-i2c-gpio uboot-envtools uboot-oxnas-ox820
 +
 +KERNELNAME:=zImage dtbs
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] protobuf broken in BB

2014-11-25 Thread obconseil

Le 26/11/2014 08:10, John Crispin a écrit :

Hi,

so which patch do i use now ?

John


* I think guillaume was right in pointing the fact that the protoc 
compiler wasn't installed.
* While we are at it, and since they are some bugfixes between 2.5 and 
2.6.1 version, I can produce

a patch set to do that .

I'll do that this morning.

Obinou




On 19/11/2014 13:24, Guillaume Déflache wrote:

Hi all

Sorry obconseil and John for the delay, my work priorities got
shifted to other things... @John: good idea to ping me personally!
;)


Am 06.11.2014 10:23, schrieb obconseil:

Le 05/11/2014 22:43, Guillaume Déflache a écrit :



Fine, but that's not the problem as I said before (see the very
1st quoted text in this message): *installing protoc at the
right location* (that is .../build_dir/host/bin/protoc IIRC) is
the problem.




I checked that with our pre-BB snapshot it was installed where
expected and that with the BB release it is not. You can try
executing `make install` from the host build directory to
convince yourself that that does what is required from the
OpenWrt Makefile but currently missing in BB's. That's what I
did and then the problem was gone.

So you have to try using protoc to generate some source code
files in order to really stumble on the problem. Apart from
that everything works fine indeed.


Oh. I admit I overlooked this in your previous message. Thanks.

What about the attached patch ?


I had no time to test it unfortunately but I made one myself (see
below) in parallel to get something working for us internally.



By the way, maybe somebody else could enlighten me on this but in
BB, it seems that the host tools directory is
.../staging_dir/host/bin rather than .../build_dir/host/bin .

I have no .../build_dir/host/bin directory on my build tree.


You are right, .../staging_dir/host/bin is correct: AFAICU only
staging_dir/ sports global filesystem hierarchies for all packages
with bin/, include/, lib/, ... (one for the host, two per compiled
target for the toolchain and the device itself).



The patch do install protoc in .../staging_dir/host/bin , along
with all other programs like bison,...


I think this is the correct thing to do, and that's also what I do
in my patch.



Since the snapshot we used previously PKG_USE_MIPS16:=0
also got added, does that mean we should also use that on
all packages that compile Protocol Buffer generated code
and/or link with the PB library?


After a second though I think this line was to avoid an assembler
error on some plateform. I still need to test the current
compiler/assembler on a MIPS16 platform, but for now you can
safely leave this line out for your platform. [...]

I would have no objections to 2.6.1 if it also works for us too
(I can test that at the same time).


Yes, please test  report : I would much better push upstream a
patch with the newest version of protobuf.


For us 2.6.0 and 2.5.0 definitely do not work (I think I also
tested with 2.6.1, not sure anymore).

When I made the patch I stumbled upon
https://www.mail-archive.com/protobuf@googlegroups.com/msg10536.html
  (Re: [protobuf] Re: Issue 670 in protobuf: Not Able to compile
protobuf for mips platform) which looks exactly like the problem I
had. Alas I did not notify either of OpenWrt or protobuf of the
others' problem then.

I guess there was some kind of regression from 2.4.1, probably
someone should point the upstream protobuf developers to this
thread.


What works for us is the patch below: - as I said only 2.4.1
worked - removing the src/google/protobuf/stubs/platform_macros.h
patch chunk also did help *IIRC* - PKG_USE_MIPS16:=0 or 1 made no
difference *IIRC*


##\brief protobuf 2.4.1 without MIPS16 ## ## For the full rationale
see
https://lists.openwrt.org/pipermail/openwrt-devel/2014-November/029107.html.



##

## This is a Git patch against GitHub OpenWrt's 'packages' feed
v14.07. # diff --git a/libs/protobuf/Makefile
b/libs/protobuf/Makefile index 1553a7e..1411a82 100644 ---
a/libs/protobuf/Makefile +++ b/libs/protobuf/Makefile @@ -8,12
+8,12 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=protobuf -PKG_VERSION:=2.5.0 +PKG_VERSION:=2.4.1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://protobuf.googlecode.com/files
-PKG_MD5SUM:=a72001a9067a4c2c4e0e836d0f92ece4
+PKG_MD5SUM:=ed436802019c9e1f40cc750eaf78f318

PKG_BUILD_DEPENDS:=protobuf/host PKG_USE_MIPS16:=0 @@ -38,14 +38,7
@@ define Package/protobuf/description of its internal RPC
protocols and file formats. endef

-define Host/Compile -   $(MAKE) -C $(HOST_BUILD_DIR) -endef -
-define Host/Install -endef - -CONFIGURE_ARGS +=
--with-protoc=$(HOST_BUILD_DIR)/src/protoc +CONFIGURE_ARGS +=
--with-protoc=$(STAGING_DIR_HOST)/bin/protoc

define Build/InstallDev $(INSTALL_DIR) \ diff --git
a/libs/protobuf/patches/001-mipseb-compile.patch
b/libs/protobuf/patches/001-mipseb-compile.patch deleted file mode
100644 index 6eb0590..000 ---

Re: [OpenWrt-Devel] [PATCH] [utils] gammu: new package in tree

2014-11-25 Thread John Crispin
Hi,

please send a pull request via github to have this included inside the
packages feed

John

On 25/11/2014 17:27, Виталий Процко wrote:
 This add new package gammu v 1.33.0 to the build tree.
 
 Gammu is the name of the project as well as name of command line 
 utility, which you can use to control your cell phone. It is
 written in C.
 
 Signed-off-by: Vitaly Protsko vi...@sft.ru --- Makefile
 |   66 +++ 
 patches/001-iconv-disabling-option.patch |   51
 +++ patches/002-no-fstack-protector.patch|
 11 + patches/003-cmake-cross-toolchain.patch  |   43
  4 files changed, 171 insertions(+)
 
 diff -Naurp a/package/utils/gammu/Makefile
 b/package/utils/gammu/Makefile --- a/package/utils/gammu/Makefile
 1970-01-01 03:00:00.0 +0300 +++
 b/package/utils/gammu/Makefile2014-11-19 17:20:57.0
 +0300 @@ -0,0 +1,66 @@ +# +# Copyright (C) 2006-2009 OpenWrt.org 
 +# +# This is free software, licensed under the GNU General Public
 License v2. +# See /LICENSE for more information. +# + +include
 $(TOPDIR)/rules.mk + +PKG_NAME:=gammu +PKG_VERSION:=1.33.0 
 +PKG_RELEASE:=1 + 
 +PKG_SOURCE_URL:=http://dl.cihar.com/gammu/releases/ 
 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz 
 +PKG_MD5SUM:=66b95afbde3085168c4a20266e8cb5c0 
 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include
 $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define
 Package/gammu +SECTION:=utils +CATEGORY:=Utilities +
 TITLE:=Command line utility which you can use to control your 
 cellphone +URL:=http://dl.cihar.com/gammu/releases/ +
 DEPENDS:=@BUILD_NLS +libpthread +libcurl +glib2 $(ICONV_DEPENDS) 
 $(INTL_DEPENDS) +DEPENDS+=+PACKAGE_python:python
 +PACKAGE_bluez-libs:bluez-libs +
 DEPENDS+=+PACKAGE_libmysqlclient:libmysqlclient 
 +PACKAGE_unixodbc:unixodbc +MAINTAINER:=Vitaly Protsko
 vi...@sft.ru +endef + +CONFIGURE_ARGS:= \ +--prefix=/usr \ +
 --cross-root=$(STAGING_DIR) $(TOOLCHAIN_DIR) \ +
 --enable-shared + +define Build/Compile +$(MAKE) -C
 $(PKG_BUILD_DIR) \ +$(TARGET_CONFIGURE_OPTS) \ +
 LDSHARED=$(TARGET_CROSS)ld -shared \ +
 CFLAGS=$(TARGET_CFLAGS) $(FPIC) +endef + +define Build/Install +
 $(MAKE) -C $(PKG_BUILD_DIR) \ +DESTDIR=$(PKG_INSTALL_DIR)
 \ +install +endef + +define Build/InstallDev +mkdir -p
 $(1)/usr/include +$(CP) -r $(PKG_INSTALL_DIR)/usr/include/gammu
 $(1)/usr/include/ +mkdir -p $(1)/usr/lib +$(CP)
 $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib/ +endef 
 + +define Package/gammu/install +$(INSTALL_DIR) $(1)/usr/bin +
 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin +
 $(INSTALL_BIN) 
 $(PKG_INSTALL_DIR)/usr/bin/gammu-{config,smsd,smsd-inject,smsd-monitor}

 
$(1)/usr/bin
 +$(INSTALL_DIR) $(1)/usr/lib +$(INSTALL_BIN)
 $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib +endef 
 + +$(eval $(call BuildPackage,gammu)) diff -Naurp 
 a/package/utils/gammu/patches/001-iconv-disabling-option.patch 
 b/package/utils/gammu/patches/001-iconv-disabling-option.patch ---
 a/package/utils/gammu/patches/001-iconv-disabling-option.patch 
 1970-01-01 03:00:00.0 +0300 +++
 b/package/utils/gammu/patches/001-iconv-disabling-option.patch 
 2014-11-13 19:20:30.0 +0300 @@ -0,0 +1,51 @@ +---
 a/cmake/FindIconv.cmake  b/cmake/FindIconv.cmake +@@ -34,9
 +34,9 @@ string(REGEX REPLACE (.*)/include/? \ + +
 FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS 
 ${ICONV_INCLUDE_BASE_DIR}/lib PATHS /opt/local/lib) + 
 +-IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) ++IF(NOT DISABLE_ICONV
 AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) +SET(ICONV_FOUND
 TRUE) +-ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) ++ENDIF(NOT
 DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) + +
 set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) +
 set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) +--- a/configure 
  b/configure +@@ -31,6 +31,7 @@ Usage: ./configure [options] +
 --enable-backup enable backup support + --enable-win32
 enable mingw crosscomilation + --enable-protection enable compile
 time protections ++--disable-iconv disable iconv support +
 --with-python=path path to Python interpreter +
 --without-gnapplet  disable installation of gnapplet +
 --without-completion disable installation of bash completion
 script +@@ -57,6 +58,7 @@ CMAKE_PROTECTION= + CMAKE_PYTHON= +
 CMAKE_GNAP= + CMAKE_COMPLETE= ++CMAKE_ICONV= + + # process command
 line + while [ $# -gt 0 ] ; do +@@ -94,6 +96,12 @@ while [ $#
 -gt 0 ] ; do + --disable-protection) +
 CMAKE_PROTECTION=-DENABLE_PROTECTION=OFF + ;; ++
 --enable-iconv) ++CMAKE_ICONV=-DDISABLE_ICONV=OFF ++
 ;; ++--disable-iconv) ++
 CMAKE_ICONV=-DDISABLE_ICONV=ON ++;; +
 --enable-debug) +
 CMAKE_DEBUG=-DCMAKE_BUILD_TYPE=Debug + ;; +@@ -142,4
 +150,4 @@ fi + cd $BUILD_DIR + + # invoke cmake to do