[OpenWrt-Devel] Flashing Openwrt to Mikrotik Board RB433AH

2016-04-25 Thread Matogoro Jabera
Dear Colleagues,

I have a new board with Mikrotik OS loaded in it and I want to load OpenWRT
for my Wireless Project. In fact, I want to use it for my TV White Space
Project in Tanzania due to its cost-benefit as compared to available TVWS
Radio Devices available in the market.

I am following this step-by-step guidelines (
http://vip.gatech.edu/wiki/images/d/d8/Flashing_Routerboards_with_OpenWRT.pdf)
with some modifications such as the link is pointing to git clone "git://
nbd.name/openwrt.git" which seems NOT accessible in my network. Insteady, I
directed to "git://git.openwrt.org/12.09/openwrt.git"

I am able to make the OpenWRT available temporary to the board and failing
to make it availabel permanently to the board.

I am therefore writing to be directed to the alternative working
step-by-step guideline to be able to accomplish this task. I am using
Ubuntu 14.04 OS.


Regards,
-- 
MATOGORO Jabhera
Assistant Lecturer & Coordinator - Microsoft Innovation Center, Tanzania
College of Informatics and Virtual Education
The University of Dodoma (www.udom.ac.tz)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] upstream opkg

2016-04-25 Thread Luiz Angelo Daros de Luca
Thanks Jo,

Do you have any idea how it would be possible to reduce upstream opkg
size? Create
a libarchive-mini?

Maybe we can simply revert libarchive adoption (specially if we turn it
into a ./configure option). I guess it is limited to libopkg/pkg_extract.c
file.
Maybe it is better to keep an openwrt customized pkg_extract.c than to
maintain an full opkg fork (with known issues).

deb and rpm are already possible busybox applet. Maybe opkg could also
become one (and share some code with tar/gzip).

Regards,
-- 

Luiz Angelo Daros de Luca
luizl...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 02/05] [tools] findutils glibc >= 2.23 compat

2016-04-25 Thread Weedy
On 25 Apr 2016 1:33 pm, "Jo-Philipp Wich"  wrote:
>
> Hi,
>
> this should be handled already, configure uses AC_HEADER_MAJOR and
> mountlist.c does:
>
> #ifdef MAJOR_IN_SYSMACROS
> #include 
> #define HAVE_MAJOR
> ...
>
> did you patched findutils proactively or was there an actual build issue?

I patched everything in response to failures. If it's already in there then
I dunno why it's not getting enabled.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [RFC] ramips: fix bad patch awake rt305x USB controller

2016-04-25 Thread Сергей Василюгин


25.04.2016, 19:11, "John Crispin" :
> Hi,
>
> i dont see why this is needed.the patch in the tree does not look broken
> and seems to compile fine.
>
> John
>
Because fixed in changeset #49221

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


Re: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread Andrew Yong
"alternatively call uboot-env directly without the fw_* abstraction layer"

Pardon the obtuse question but how would I go about doing this? It
sounds like the cleanest way to do things.

I'd like to avoid calling uci-default earlier than it needs to be, and
potentially messing up other things in the init process.

If there really isn't an OpenWrt-approved way to do this, I may just
advocate replacing SamKnows' u-boot entirely (writing to the same
partition every boot seems bad for flash memory anyway).

On Tue, Apr 26, 2016 at 12:32 AM, John Crispin  wrote:
>
>
> On 25/04/2016 18:01, Andrew Yong wrote:
>> diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount 
>> b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
>> new file mode 100644
>> index 000..570fe16
>> --- /dev/null
>> +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
>> @@ -0,0 +1,22 @@
>> +#!/bin/sh
>> +
>> +# SamKnows Whitebox 8 increments a bootcount variable every  boot and 
>> attempts
>> +# to boot a recovery partition when bootcount > 3. We need to ensure this is
>> +# reset to 0 every boot
>> +
>> +do_bootcount_reset() {
>> + . /lib/ramips.sh
>> +
>> + local board=$(ramips_board_name)
>> +
>> + case "$board" in
>> + sk-wb8)
>> + echo "Board is SamKnows Whitebox 8, resetting bootcount 
>> environment variable..."
>> + fw_setenv bootcount 0
>> + ;;
>> + esac
>> +
>> + return 0
>> +}
>> +
>> +boot_hook_add preinit_main do_bootcount_reset
>
>
> does this actually work ? thinking about it, you might need to have
> uci-default run for it to work properly or alternatively call uboot-env
> directly without the fw_* abstraction layer
>
> John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] add usb gadget ehci debug driver

2016-04-25 Thread Alexander Couzens
This gadget driver allow you to debug other devices via EHCI Debug Port
capability.

Signed-off-by: Alexander Couzens 
---
 package/kernel/linux/modules/usb.mk | 17 +
 1 file changed, 17 insertions(+)

diff --git a/package/kernel/linux/modules/usb.mk 
b/package/kernel/linux/modules/usb.mk
index 8c5a2ab..7857d44 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -234,6 +234,23 @@ endef
 
 $(eval $(call KernelPackage,usb-lib-composite))
 
+define KernelPackage/usb-ehci-debug-gadget
+  TITLE:=USB EHCI debug port Gadget support
+  KCONFIG:=\
+CONFIG_USB_G_DBGP \
+   CONFIG_USB_G_DBGP_SERIAL=y \
+   CONFIG_USB_G_DBGP_PRINTK=n
+  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite +kmod-usb-serial-gadget
+  FILES:=$(LINUX_DIR)/drivers/usb/gadget/legacy/g_dbgp.ko
+  AUTOLOAD:=$(call AutoLoad,52,g_dbgp)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-ehci-debug-gadget/description
+  Kernel support for USB EHCI debug port Gadget.
+endef
+
+$(eval $(call KernelPackage,usb-ehci-debug-gadget))
 
 define KernelPackage/usb-eth-gadget
   TITLE:=USB Ethernet Gadget support
-- 
2.8.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] [RFC] omap: switch to 4.4

2016-04-25 Thread Alexander Couzens
Signed-off-by: Alexander Couzens 
---
 target/linux/omap/Makefile   |   2 +-
 target/linux/omap/config-4.4 | 525 ++-
 2 files changed, 171 insertions(+), 356 deletions(-)

diff --git a/target/linux/omap/Makefile b/target/linux/omap/Makefile
index 20f7517..d7054e9 100644
--- a/target/linux/omap/Makefile
+++ b/target/linux/omap/Makefile
@@ -13,7 +13,7 @@ FEATURES:=usb usbgadget ext4 targz fpu audio display nand 
ubifs
 CPU_TYPE:=cortex-a9
 CPU_SUBTYPE:=vfpv3
 
-KERNEL_PATCHVER:=3.18
+KERNEL_PATCHVER:=4.4
 
 MAINTAINER:=Imre Kaloz 
 
diff --git a/target/linux/omap/config-4.4 b/target/linux/omap/config-4.4
index fddf1b2..5d4f6f5 100644
--- a/target/linux/omap/config-4.4
+++ b/target/linux/omap/config-4.4
@@ -6,13 +6,15 @@ CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
 CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
 CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
 CONFIG_ARCH_HAS_SG_CHAIN=y
+CONFIG_ARCH_HAS_TICK_BROADCAST=y
 CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 CONFIG_ARCH_MULTIPLATFORM=y
 # CONFIG_ARCH_MULTI_CPU_AUTO is not set
-CONFIG_ARCH_MULTI_V7=y
 CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y
 CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OMAP=y
 CONFIG_ARCH_OMAP2PLUS=y
@@ -30,49 +32,30 @@ CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
 CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
-# CONFIG_ARCH_WM8750 is not set
 CONFIG_ARM=y
-CONFIG_ARM_APPENDED_DTB=y
-CONFIG_ARM_ATAG_DTB_COMPAT=y
-# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
-CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
-# CONFIG_ARM_CPU_SUSPEND is not set
-CONFIG_ARM_ERRATA_411920=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_ERRATA_720789=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_ARM_ERRATA_775420=y
+CONFIG_ARM_GIC=y
 CONFIG_ARM_HAS_SG_CHAIN=y
 CONFIG_ARM_HEAVY_MB=y
-CONFIG_ARM_L1_CACHE_SHIFT=5
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
 # CONFIG_ARM_LPAE is not set
-# CONFIG_ARM_OMAP2PLUS_CPUFREQ is not set
+CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
-CONFIG_ARM_THUMBEE=y
-CONFIG_ASSOCIATIVE_ARRAY=y
+# CONFIG_ARM_THUMBEE is not set
+CONFIG_ARM_VIRT_EXT=y
 CONFIG_AT803X_PHY=y
-CONFIG_ATA=y
-# CONFIG_ATH_CARDS is not set
-CONFIG_AUDIT=y
-# CONFIG_AUDITSYSCALL is not set
-CONFIG_AUDIT_GENERIC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_GENERIC is not set
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
-# CONFIG_BACKLIGHT_PM8941_WLED is not set
-# CONFIG_BACKLIGHT_PWM is not set
+CONFIG_BACKLIGHT_PWM=y
 # CONFIG_BACKLIGHT_TPS65217 is not set
 CONFIG_BCH=y
-CONFIG_BINFMT_MISC=y
-CONFIG_BLK_CGROUP=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_SD=y
-CONFIG_BMP085=y
-CONFIG_BMP085_I2C=y
 CONFIG_BOUNCE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BUILD_BIN2C=y
 CONFIG_CACHE_L2X0=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLKSRC_MMIO=y
@@ -81,130 +64,115 @@ CONFIG_CLKSRC_PROBE=y
 CONFIG_CLKSRC_TI_32K=y
 # CONFIG_CLK_TWL6040 is not set
 CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMA=y
-CONFIG_CMA_ALIGNMENT=8
-CONFIG_CMA_AREAS=7
-# CONFIG_CMA_DEBUG is not set
-# CONFIG_CMA_DEBUGFS is not set
-CONFIG_CMA_SIZE_MBYTES=16
-# CONFIG_CMA_SIZE_SEL_MAX is not set
-CONFIG_CMA_SIZE_SEL_MBYTES=y
-# CONFIG_CMA_SIZE_SEL_MIN is not set
-# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
-CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200"
+CONFIG_CMDLINE="console=ttyO0,115200n8"
 CONFIG_COMMON_CLK=y
-# CONFIG_COMMON_CLK_PALMAS is not set
-CONFIG_CONFIGFS_FS=y
-CONFIG_CONNECTOR=y
-CONFIG_CPUFREQ_DT=y
-CONFIG_CPUSETS=y
-CONFIG_CPU_32v6=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+# CONFIG_CPUFREQ_DT is not set
 CONFIG_CPU_32v6K=y
-CONFIG_CPU_ABRT_EV6=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
 # CONFIG_CPU_BPREDICT_DISABLE is not set
-CONFIG_CPU_CACHE_V6=y
+CONFIG_CPU_CACHE_V7=y
 CONFIG_CPU_CACHE_VIPT=y
 CONFIG_CPU_COPY_V6=y
 CONFIG_CPU_CP15=y
 CONFIG_CPU_CP15_MMU=y
 CONFIG_CPU_FREQ=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
 CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
 # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
 CONFIG_CPU_FREQ_GOV_COMMON=y
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
 CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
 CONFIG_CPU_FREQ_STAT=y
-CONFIG_CPU_FREQ_STAT_DETAILS=y
 CONFIG_CPU_HAS_ASID=y
 # CONFIG_CPU_ICACHE_DISABLE is not set
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
 CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CPU_PABRT_V6=y
+CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
-CONFIG_CPU_THERMAL=y
-CONFIG_CPU_TLB_V6=y

[OpenWrt-Devel] [PATCH 3/4] kernel/spi: add kernel package for spi-omap-24xx

2016-04-25 Thread Alexander Couzens
spi-omap-24xx can be found in TI based SoC like the beaglebone black

Signed-off-by: Alexander Couzens 
---
 package/kernel/linux/modules/spi.mk | 17 +
 1 file changed, 17 insertions(+)

diff --git a/package/kernel/linux/modules/spi.mk 
b/package/kernel/linux/modules/spi.mk
index 1c2a789..1d70138 100644
--- a/package/kernel/linux/modules/spi.mk
+++ b/package/kernel/linux/modules/spi.mk
@@ -89,3 +89,20 @@ define KernelPackage/spi-dev/description
 endef
 
 $(eval $(call KernelPackage,spi-dev))
+
+define KernelPackage/spi-omap-24xx
+  SUBMENU:=$(SPI_MENU)
+  TITLE:=SPI omap 24xx
+  KCONFIG:=CONFIG_SPI_OMAP24XX \
+  CONFIG_SPI=y \
+  CONFIG_SPI_MASTER=y
+  FILES:=$(LINUX_DIR)/drivers/spi/spi-omap2-mcspi.ko
+  AUTOLOAD:=$(call AutoProbe,spi-omap2-mcspi)
+endef
+
+define KernelPackage/spi-dev/description
+ This package contains the user mode SPI device driver
+endef
+
+$(eval $(call KernelPackage,spi-omap-24xx))
+
-- 
2.8.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] omap: add sdcard creation script

2016-04-25 Thread Alexander Couzens
Signed-off-by: Alexander Couzens 
---
 target/linux/omap/image/Config.in  |  5 
 target/linux/omap/image/Makefile   | 34 +-
 target/linux/omap/image/gen_omap_sdcard_img.sh | 33 +
 target/linux/omap/image/uEnv.txt   |  6 +
 tools/Makefile |  2 +-
 5 files changed, 78 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/omap/image/Config.in
 create mode 100755 target/linux/omap/image/gen_omap_sdcard_img.sh
 create mode 100644 target/linux/omap/image/uEnv.txt

diff --git a/target/linux/omap/image/Config.in 
b/target/linux/omap/image/Config.in
new file mode 100644
index 000..08b88eb
--- /dev/null
+++ b/target/linux/omap/image/Config.in
@@ -0,0 +1,5 @@
+config OMAP_SD_BOOT_PARTSIZE
+   int "Boot (SD Card) filesystem partition size (in MB)"
+   depends on TARGET_omap
+   default 20
+
diff --git a/target/linux/omap/image/Makefile b/target/linux/omap/image/Makefile
index 3fa2848..10b07a7 100644
--- a/target/linux/omap/image/Makefile
+++ b/target/linux/omap/image/Makefile
@@ -6,12 +6,43 @@
 #
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
+include $(INCLUDE_DIR)/host.mk
+
+FAT32_BLOCK_SIZE=1024
+FAT32_BLOCKS=$(shell echo 
$$(($(CONFIG_OMAP_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE
 
 UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U
 UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048
 
+# $1 - name of bootloader directory under BIN_DIR
+# $2 - output filename part
+define Image/Build/SDCard
+   rm -f $(KDIR)/boot-$(2).img
+   mkdosfs $(KDIR)/boot-$(2).img -C $(FAT32_BLOCKS)
+   mcopy -i $(KDIR)/boot-$(2).img $(BIN_DIR)/uboot-omap-$(1)/MLO ::MLO
+   mcopy -i $(KDIR)/boot-$(2).img $(BIN_DIR)/uboot-omap-$(1)/u-boot.img 
::u-boot.img
+   mcopy -i $(KDIR)/boot-$(2).img -s $(BIN_DIR)/dtbs/ ::dtbs
+   mcopy -i $(KDIR)/boot-$(2).img $(KDIR)/zImage ::zImage
+   mcopy -i $(KDIR)/boot-$(2).img $(KDIR)/uImage ::uImage
+   mcopy -i $(KDIR)/boot-$(2).img ./uEnv.txt ::uEnv.txt
+   chmod 755 ./gen_omap_sdcard_img.sh
+   ./gen_omap_sdcard_img.sh \
+   $(BIN_DIR)/$(IMG_PREFIX)-$(2)-sdcard-vfat-$(1).img \
+   $(KDIR)/boot-$(2).img \
+   $(KDIR)/root.ext4 \
+   $(CONFIG_OMAP_SD_BOOT_PARTSIZE) \
+   $(CONFIG_TARGET_ROOTFS_PARTSIZE)
+endef
+
 define Image/BuildKernel
+   mkimage -A arm -O linux -T kernel -C none \
+   -a 0x40008000 -e 0x40008000 \
+   -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
+   -d $(KDIR)/zImage $(KDIR)/uImage
+
$(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
+   $(CP) $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
+
  ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
$(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
  endif
@@ -26,7 +57,7 @@ define Image/BuildKernel
$(CP) $(DTS_DIR)/omap3*.dtb $(TARGET_DIR)/boot/
$(CP) $(DTS_DIR)/omap4*.dtb $(TARGET_DIR)/boot/
  endif
-   -mkdir $(BIN_DIR)/dtbs
+   -mkdir -p $(BIN_DIR)/dtbs
-$(CP) $(DTS_DIR)/am335x*.dtb $(BIN_DIR)/dtbs/
-$(CP) $(DTS_DIR)/omap3*.dtb $(BIN_DIR)/dtbs/
-$(CP) $(DTS_DIR)/omap4*.dtb $(BIN_DIR)/dtbs/
@@ -34,6 +65,7 @@ endef
 
 define Image/Build
$(call Image/Build/$(1),$(1))
+   $(call Image/Build/SDCard,am335x_evm,beagleboneblack)
 endef
 
 define Image/Build/jffs2-64k
diff --git a/target/linux/omap/image/gen_omap_sdcard_img.sh 
b/target/linux/omap/image/gen_omap_sdcard_img.sh
new file mode 100755
index 000..c2f2aad
--- /dev/null
+++ b/target/linux/omap/image/gen_omap_sdcard_img.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+set -x
+[ $# -eq 5 ] || {
+echo "SYNTAX: $0 
"
+exit 1
+}
+
+OUTPUT="$1"
+BOOTFS="$2"
+ROOTFS="$3"
+BOOTFSSIZE="$4"
+ROOTFSSIZE="$5"
+
+head=4
+sect=63
+
+set `ptgen -o $OUTPUT -h $head -s $sect -l 1024 -t c -p ${BOOTFSSIZE}M -t 83 
-p ${ROOTFSSIZE}M`
+
+BOOTOFFSET="$(($1 / 512))"
+BOOTSIZE="$(($2 / 512))"
+ROOTFSOFFSET="$(($3 / 512))"
+ROOTFSSIZE="$(($4 / 512))"
+
+dd bs=512 if="$BOOTFS" of="$OUTPUT" seek="$BOOTOFFSET" conv=notrunc
+dd bs=512 if="$ROOTFS" of="$OUTPUT" seek="$ROOTFSOFFSET" conv=notrunc
diff --git a/target/linux/omap/image/uEnv.txt b/target/linux/omap/image/uEnv.txt
new file mode 100644
index 000..9776ab5
--- /dev/null
+++ b/target/linux/omap/image/uEnv.txt
@@ -0,0 +1,6 @@
+bootdir=/
+fdtdir=/dtbs
+uenvcmd=setenv bootpart ${mmcdev}:1 ; run loadfdt; run loadimage; run mmcargs; 
 bootz ${loadaddr} - ${fdtaddr}
+mmcargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 rootdelay=10
+
+loadfdt=load mmc ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
diff --git a/tools/Makefile b/tools/Makefile
index 187655e..85a7124 100644
--- 

[OpenWrt-Devel] [PATCH 0/4] omap 4.4, ehci, sdcard

2016-04-25 Thread Alexander Couzens
I'm using the beaglebone black as development tool for coreboot.
The bbb can receive debug output via ehci debug and flash
spi chips via spi-omap-24xx.
I'm not quite sure about the config-4.4 config. I copied over the omap 
config-4.1
and did make kernel_oldconfig. Is there a better way to create the config for a 
kernel?

Everthing was tested with kernel 4.4 on a bbb. The sdcard image can
be used as stand-alone image or flashed to the eMMC. If the image was
flashed to the eMMC, don't use a sdcard, because the kernel tries
to boot the external sdcard. Aka floppy inserted bug ;).

Alexander Couzens (4):
  omap: add sdcard creation script
  [RFC] omap: switch to 4.4
  kernel/spi: add kernel package for spi-omap-24xx
  add usb gadget ehci debug driver

 package/kernel/linux/modules/spi.mk|  17 +
 package/kernel/linux/modules/usb.mk|  17 +
 target/linux/omap/Makefile |   2 +-
 target/linux/omap/config-4.4   | 525 -
 target/linux/omap/image/Config.in  |   5 +
 target/linux/omap/image/Makefile   |  34 +-
 target/linux/omap/image/gen_omap_sdcard_img.sh |  33 ++
 target/linux/omap/image/uEnv.txt   |   6 +
 tools/Makefile |   2 +-
 9 files changed, 283 insertions(+), 358 deletions(-)
 create mode 100644 target/linux/omap/image/Config.in
 create mode 100755 target/linux/omap/image/gen_omap_sdcard_img.sh
 create mode 100644 target/linux/omap/image/uEnv.txt

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


[OpenWrt-Devel] [PATCH] [CC] lantiq: Fix ath9k LED for TDW8970.

2016-04-25 Thread Vittorio Gambaletta (VittGam)
Backport of r47911, r47912, r47969 to CC.

All other required patches have already been backported in r48822.

Signed-off-by: Vittorio Gambaletta 
---

diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds 
b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
index 6956d61..5643f7f 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
@@ -30,6 +30,9 @@ BTHOMEHUBV3A)
ucidef_set_led_wlan "wifi" "wifi" "soc:blue:wireless" "phy0tpt"
ucidef_set_led_netdev "internet" "internet" "soc:blue:broadband" 
"pppoa-wan"
;;
+TDW8970)
+   ucidef_set_led_wlan "wifi" "wifi" "ath9k-phy0" "phy0tpt"
+   ;;
 VGV7510KW22)
ucidef_set_led_default "power" "power" "power" "1"
ucidef_set_led_default "power2" "power2" "power2" "0"
diff --git a/target/linux/lantiq/dts/TDW8970.dts 
b/target/linux/lantiq/dts/TDW8970.dts
index d8dcb5d..cb4d88b 100644
--- a/target/linux/lantiq/dts/TDW8970.dts
+++ b/target/linux/lantiq/dts/TDW8970.dts
@@ -202,6 +202,8 @@
ath,mac-offset = <0xf100>;
ath,mac-increment;
ath,led-pin = <0>;
+   ath,disable-5ghz;
+   ath,led-active-high;
};
 
gpio-keys-polled {
diff --git 
a/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
 
b/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index 04c2071..9198fe5 100644
--- 
a/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
+++ 
b/target/linux/lantiq/patches-3.18/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
@@ -51,13 +51,14 @@ Signed-off-by: John Crispin 
  obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o
 --- /dev/null
 +++ b/arch/mips/lantiq/xway/ath_eep.c
-@@ -0,0 +1,282 @@
+@@ -0,0 +1,298 @@
 +/*
 + *  Copyright (C) 2011 Luca Olivetti 
 + *  Copyright (C) 2011 John Crispin 
 + *  Copyright (C) 2011 Andrej Vlašić 
 + *  Copyright (C) 2013 Álvaro Fernández Rojas 
 + *  Copyright (C) 2013 Daniel Gimpelevich 

++ *  Copyright (C) 2015 Vittorio Gambaletta 
 + *
 + *  This program is free software; you can redistribute it and/or modify it
 + *  under the terms of the GNU General Public License version 2 as published
@@ -192,6 +193,21 @@ Signed-off-by: John Crispin 
 +  dev_info(>dev, "using led pin %d.\n", led_pin);
 +  }
 +
++  if (of_property_read_bool(np, "ath,led-active-high")) {
++  ath9k_pdata.led_active_high = true;
++  dev_info(>dev, "inverted LED polarity\n");
++  }
++
++  if (of_property_read_bool(np, "ath,disable-2ghz")) {
++  ath9k_pdata.disable_2ghz = true;
++  dev_info(>dev, "disabled 2.4 GHz band\n");
++  }
++
++  if (of_property_read_bool(np, "ath,disable-5ghz")) {
++  ath9k_pdata.disable_5ghz = true;
++  dev_info(>dev, "disabled 5 GHz band\n");
++  }
++
 +  dev_info(>dev, "loaded ath9k eeprom\n");
 +
 +  return 0;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [CC] lantiq: Fix LED handling.

2016-04-25 Thread Vittorio Gambaletta (VittGam)
Backport of r47914 to CC.

Without this patch the TDW8970 is left without any status LED at all,
even during preinit and failsafe.

Signed-off-by: Vittorio Gambaletta 
---

diff --git a/target/linux/lantiq/base-files/etc/diag.sh 
b/target/linux/lantiq/base-files/etc/diag.sh
index 26f0a3c..57a7055 100644
--- a/target/linux/lantiq/base-files/etc/diag.sh
+++ b/target/linux/lantiq/base-files/etc/diag.sh
@@ -3,40 +3,48 @@
 
 . /lib/functions/leds.sh
 
-status_led="power"
+status_led=power
+[ ! -d /sys/class/leds/power/ ] && [ ! -d /sys/class/leds/power1/ ] && [ ! -d 
/sys/class/leds/power2/ ] && [ -d /sys/class/leds/wps/ ] && status_led=wps
 
 set_state() {
-   [ -d /sys/class/leds/power2/ ] && {
-
-   case "$1" in
-   preinit)
-   led_set_attr "power2" "trigger" "heartbeat"
-   status_led_on
-   ;;
-   failsafe)
-   led_off "power2"
-   status_led_set_timer 100 100
-   ;;
-   done)
-   led_off "power2"
-   ;;
-   esac
-   return
-   }
-
case "$1" in
preinit)
-   status_led_set_heartbeat
+   if [ -d /sys/class/leds/power2/ ]; then
+   status_led_on
+   status_led=power2
+   status_led_blink_preinit
+   status_led=power
+   else
+   status_led_blink_preinit
+   fi
;;
failsafe)
-   [ -d /sys/class/leds/power1 ] && {
+   if [ -d /sys/class/leds/power2/ ]; then
+   led_off power2
+   status_led_blink_failsafe
+   elif [ -d /sys/class/leds/power1/ ]; then
status_led_off
-   led_timer "power1" 100 100
-   } || status_led_set_timer 100 100
+   status_led=power1
+   status_led_blink_failsafe
+   status_led=power
+   else
+   status_led_blink_failsafe
+   fi
+   ;;
+   preinit_regular)
+   if [ -d /sys/class/leds/power2/ ]; then
+   status_led_on
+   status_led=power2
+   status_led_blink_preinit_regular
+   status_led=power
+   else
+   status_led_blink_preinit_regular
+   fi
;;
done)
status_led_on
-   led_off "power1"
+   led_off power1
+   led_off power2
;;
esac
 }
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v3] ar71xx: Add support for the OMYlink OMY-G1

2016-04-25 Thread L. D. Pinney
https://wiki.openwrt.org/toh/omylink/omy-g1

http://www.omylink.com/

Signed-off-by: L. D. Pinney 

---

v2 corrects the Device name in Subject
v3 removes changes to mktplinkfw.c

 target/linux/ar71xx/base-files/etc/board.d/01_leds|   6 
 target/linux/ar71xx/base-files/etc/board.d/02_network |   1 +
 target/linux/ar71xx/base-files/etc/diag.sh|   3 ++
 target/linux/ar71xx/base-files/lib/ar71xx.sh  |   6 
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh|   1 +
 target/linux/ar71xx/config-4.1|   1 +
 target/linux/ar71xx/config-4.4|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt |  10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile|   1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-omy-g1.c   | 123 
++
 target/linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/profiles/omy.mk   |  10 ++
 target/linux/ar71xx/image/Makefile|   9 -
 13 files changed, 172 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index b2469bf..39b21ca 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -399,6 +399,12 @@ om5p-ac)
ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1"
;;
 
+omy-g1)
+   ucidef_set_led_wlan "wlan" "WLAN" "omy:green:wlan" "phy0tpt"
+   ucidef_set_led_netdev "wan" "WAN" "omy:green:wan" "eth0"
+   ucidef_set_led_netdev "lan" "LAN" "omy:green:lan" "eth1"
+   ;;
+
 omy-x1)
ucidef_set_led_default "power" "POWER" "omy:green:power" "1"
ucidef_set_led_default "wan" "WAN" "omy:green:wan" "eth0"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 8fdfa07..7724a08 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -220,6 +220,7 @@ tl-wr941nd)
;;
 
 dir-615-i1 |\
+omy-g1 |\
 r6100 |\
 smart-300 |\
 tl-mr3420-v2 |\
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 1f9bd3f..77fa398 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -218,6 +218,9 @@ get_status_led() {
om5p-acv2)
status_led="om5pac:blue:power"
;;
+   omy-g1)
+   status_led="omy:green:wlan"
+   ;;
omy-x1)
status_led="omy:green:power"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 3d4541e..588affd 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -123,6 +123,9 @@ tplink_board_detect() {
"007260"*)
model="TellStick ZNet Lite"
;;
+   "066601"*)
+   model="OMYlink OMY-G1"
+   ;;
"066602"*)
model="OMYlink OMY-X1"
;;
@@ -655,6 +658,9 @@ ar71xx_board_detect() {
*"OMY-X1")
name="omy-x1"
;;
+   *"OMY-G1")
+   name="omy-g1"
+   ;;
*"Onion Omega")
name="onion-omega"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d44ece5..5334600 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -340,6 +340,7 @@ platform_check_image() {
gl-inet | \
mc-mac1200r | \
minibox-v1 |\
+   omy-g1 |\
omy-x1 |\
onion-omega | \
oolite | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index fa98643..40cf453 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -111,6 +111,7 @@ CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
 CONFIG_ATH79_MACH_OM5P_AC=y
 CONFIG_ATH79_MACH_OM5P_ACv2=y
+CONFIG_ATH79_MACH_OMY_G1=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index c925ab1..9c0eac4 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -114,6 +114,7 @@ CONFIG_ATH79_MACH_OM2P=y
 CONFIG_ATH79_MACH_OM5P=y
 CONFIG_ATH79_MACH_OM5P_AC=y
 CONFIG_ATH79_MACH_OM5P_ACv2=y
+CONFIG_ATH79_MACH_OMY_G1=y
 CONFIG_ATH79_MACH_OMY_X1=y
 CONFIG_ATH79_MACH_ONION_OMEGA=y
 CONFIG_ATH79_MACH_PB42=y
diff --git 

Re: [OpenWrt-Devel] How to initialize multiple phy radios

2016-04-25 Thread David Hutchison
Scanning appears to work ( iw dev wlan1 scan ) ,

As soon as I try to use hostapd to run as an AP I get:

[20475.14] ath10k_pci :00:00.0: firmware crashed! (uuid
b826d45e-e51f-4beb-a489-6b7a4d5c6f76)
[20475.15] ath10k_pci :00:00.0: qca988x hw2.0 (0x4100016d,
0x004000ff sub :) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1
wmi-op 5 htt-op 2 cal file max-sta 1p
[20475.17] ath10k_pci :00:00.0: debug 1 debugfs 1 tracing 0
dfs 0 testmode 1
[20475.18] ath10k_pci :00:00.0: firmware register dump:
[20475.18] ath10k_pci :00:00.0: [00]: 0x4100016D 0x
0x004146C8 0x004146C8
[20475.19] ath10k_pci :00:00.0: [04]: 0x004146C8 0x00060530
0x001F 0x00955A00
[20475.20] ath10k_pci :00:00.0: [08]: 0x0040AE04 0x0040
0x0007 0x
[20475.21] ath10k_pci :00:00.0: [12]: 0x0002 0x
0x00958360 0x0095836B
[20475.21] ath10k_pci :00:00.0: [16]: 0x809ACDE0 0x0040AD94
0x0040AE04 0x0040
[20475.22] ath10k_pci :00:00.0: [20]: 0x 0x
0x 0x0040E830
[20475.23] ath10k_pci :00:00.0: [24]: 0x809AC4E2 0x0040ADC4
0x0001 0x0040AE04
[20475.24] ath10k_pci :00:00.0: [28]: 0x004133E0 0x0001
0x0040AE08 0x
[20475.25] ath10k_pci :00:00.0: [32]: 0x0007 0x
0x 0x004133C8
[20475.26] ath10k_pci :00:00.0: [36]: 0x809B9C49 0x0040ADE4
0x00411568 0x0041158C
[20475.26] ath10k_pci :00:00.0: [40]: 0x0001 0x
0x00955A00 0x0040E840
[20475.27] ath10k_pci :00:00.0: [44]: 0x809B944C 0x0040AE04
0x0001 0x
[20475.28] ath10k_pci :00:00.0: [48]: 0x0040AE04 0x0001
0x004133C8 0x004117AC
[20475.29] ath10k_pci :00:00.0: [52]: 0x809B9263 0x0040AEA4
0x0041ECF8 0x00411BC8
[20475.30] ath10k_pci :00:00.0: [56]: 0x004133C8 0x0040AE34
0x00411F08 0x00411F08
[20475.41] ieee80211 phy1: Hardware restart was requested

-- Davey

On Mon, Apr 25, 2016 at 1:01 PM, Christian Lamparter
 wrote:
> Hello,
>
> On Monday, April 25, 2016 10:53:41 AM David Hutchison wrote:
>> So with some modifications to pci.c, hw.h and core.c I was able to get
>> the radio initialized! :)
>
> Hey, that's nice! Can you make and post a patch for that?
> I'm sure if it's just a matter of adding the new pci and chip
> ids to the tables. You could just go ahead and post it, so it
> will be picked up.
>
>> pci.c: added QCA9887_DEVICE_ID, modified ath10k_pci_id_table and
>> ath10k_pci_supp_chips
>> core.c: Duplicated QCA988X entry in ath10k_hw_params_list and passed
>> 0x4100016d as the ID ( left everything else the same )
>> hw.h: added definitions for QCA9887
>>
>> I found 
>> "https://github.com/kvalo/ath10k-firmware/blob/master/QCA9887/firmware-5.bin_10.2.3.31.7-1;
>> on your github and replaced
>> /lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin on my board.
>> hotplug.d then loaded QCA9887 firmware on next boot.
>>
>> Of course my approach was very much a hack. If there is anything I can
>> contribute to creating a patch for ath10k, please let me know. I would
>> love to help!
>>
>> dmesg
>> [   18.92] ath10k_pci :00:00.0: pci irq legacy interrupts 0
>> irq_mode 0 reset_mode 0
>> [   19.03] rev_id  QCA9887
>> [   19.03] dev_id 0050 QCA9887
>> [   20.46] ath10k_pci :00:00.0: qca988x hw2.0 (0x4100016d,
>> 0x004000ff sub :) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1
>> wmi-op 5 htt-op 2 cal file max-sta 1p
>> [   20.48] ath10k_pci :00:00.0: debug 1 debugfs 1 tracing 0
>> dfs 0 testmode 1
>>
> ...
>
> Does the device work? Can you scan for networks, connect to networks
> and create networks? That would be good to know.
>
> Regards,
> Christian
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed.

2016-04-25 Thread Vittorio G (VittGam)

On 25/04/2016 23:10:22 CEST, Martin Blumenstingl wrote:

maybe you could document this in the wiki: [0]
Most people check the wiki when they are looking for configuration
hints like this


Done: https://wiki.openwrt.org/toh/tp-link/td-w8970#leds

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


Re: [OpenWrt-Devel] [PATCH 5/5] lantiq: use new image build process for brnImages

2016-04-25 Thread Hauke Mehrtens
On 04/24/2016 05:53 PM, Mathias Kresin wrote:
> LZMA compress the kernel without dictionary, otherwise brnboot fails to
> uncompress the kernel.
> 
> The filesystem parameter of mkbrncmdline was dropped since the used
> filesystem isn't exported in the kernel build step and at least in my
> tests everything works without the parameter. If the parameter is
> required for some reason, the static keyword "squashfs" can be used.
> 
> Signed-off-by: Mathias Kresin 
> ---
>  target/linux/lantiq/image/Makefile | 42 
> +-
>  1 file changed, 28 insertions(+), 14 deletions(-)
> 
All these patches are looking good. Thanks for fixing my errors and
extending it. I hope we will soon build every board with the new system
and can build them all in parallel.

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


Re: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A

2016-04-25 Thread Martin Blumenstingl
On Mon, Apr 25, 2016 at 5:38 PM, Ben Mulvihill  wrote:
>> @Ben: one probably has to enable caldata swapping in the .dts.
>
> I saw your comment on openwrt.ebilan.co.uk that the "ath,eep-swap;"
> flag should be added to the dts in order to use unmodified calibration
> data, but actually this does not appear to be the case. I have just
> installed a board using unmodified calibration data and unmodified dts
> (apart from read-only flag) and it works fine. I then tried adding
> "ath,eep-swap;" just to see what would happen and it no longer worked.
probably because the values are swapped twice then, the first time
using the "wrong" 32bit swap method which results in the same problem
that existed before those ath9k patches.
great to hear that it's working for you :-)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed.

2016-04-25 Thread Martin Blumenstingl
On Mon, Apr 25, 2016 at 8:51 PM, Vittorio G (VittGam)
 wrote:
> For the record, if anyone wants the old behaviour they just need to put
> this in /etc/config/system:
>
> config led 'led_system'
> option name 'System'
> option sysfs 'tdw89x0:green:wps'
> option default '1'
>
> And the LED will default to on after a successful boot.
maybe you could document this in the wiki: [0]
Most people check the wiki when they are looking for configuration
hints like this


Martin

[0] https://wiki.openwrt.org/toh/tp-link/td-w8970
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Buildbot not building all images for Lantiq XRX200

2016-04-25 Thread Vittorio G (VittGam)

Hello,

I've seen that Lantiq XRX200 trunk images are only being built for the VG3503J.

Is this intended, or a mistake?

Thank you.

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


Re: [OpenWrt-Devel] [PATCH v2] dnsmasq: run as dedicated UID/GID

2016-04-25 Thread Karl Palsson

Would it be worthwhile keeping these userids in a wiki registry
page maybe? This is a current extract from the packages feed and
the base packages.

22:sshd
22:sshd
51:pulse
52:tor
53:zabbix
54:prosody
56:dmapd
57:bind
59:dovecot
72:ocserv
87:icecast
88:pianod
89:upmpdcli
99:_fdm
105:avahi
121:lldp
123:ntp
200:mosquitto
224:transmission
323:chrony
400:gnunet
400:gnunetdns
5232:radicale
5353:knot
5432:postgres
8118:privoxy
65533:rpc



Daniel Golle  wrote:
> Running dnsmasq in a dedicated user/group allows matching its
> outgoing traffic more easily using iptables' owner match. Add
> UID/GID to the package metadata and append the user/group
> parameters to the init script.
> 
> Signed-off-by: Daniel Golle 
> ---
>  package/network/services/dnsmasq/Makefile   | 3 ++-
>  package/network/services/dnsmasq/files/dnsmasq.init | 4 +++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/package/network/services/dnsmasq/Makefile
> b/package/network/services/dnsmasq/Makefile index
> a5c3740..a5b96a3 100644
> --- a/package/network/services/dnsmasq/Makefile
> +++ b/package/network/services/dnsmasq/Makefile
> @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=dnsmasq
>  PKG_VERSION:=2.75
> -PKG_RELEASE:=6
> +PKG_RELEASE:=7
>  
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
>  PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
> @@ -34,6 +34,7 @@ define Package/dnsmasq/Default
>CATEGORY:=Base system
>TITLE:=DNS and DHCP server
>URL:=http://www.thekelleys.org.uk/dnsmasq/
> +  USERID:=dnsmasq=453:dnsmasq=453
>  endef
>  
>  define Package/dnsmasq
> diff --git
> a/package/network/services/dnsmasq/files/dnsmasq.init
> b/package/network/services/dnsmasq/files/dnsmasq.init index
> 61ded6a..83fcbb0 100644
> --- a/package/network/services/dnsmasq/files/dnsmasq.init
> +++ b/package/network/services/dnsmasq/files/dnsmasq.init
> @@ -218,6 +218,8 @@ dnsmasq() {
>   mkdir -p /tmp/hosts /tmp/dnsmasq.d
>   xappend "--addn-hosts=/tmp/hosts"
>   xappend "--conf-dir=/tmp/dnsmasq.d"
> + xappend "--user=dnsmasq"
> + xappend "--group=dnsmasq"
>  
>   echo >> $CONFIGFILE
>  
> @@ -589,7 +591,7 @@ start_service() {
>  
>   if [ ! -f "$TIMESTAMPFILE" ]; then
>   touch "$TIMESTAMPFILE"
> - chown nobody.nogroup "$TIMESTAMPFILE"
> + chown dnsmasq.dnsmasq "$TIMESTAMPFILE"
>   fi
>  
>   echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
> -- 
> 2.8.0
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

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] [RFC] ar71xx: add TP-Link TL-WR810N support

2016-04-25 Thread John Crispin
Hi

On 10/04/2016 14:00, Jens Steinhauser wrote:
> This patch adds support for the TP-Link TL-WR810N.
> https://wiki.openwrt.org/toh/tp-link/tl-wr810n
> 
> The device has a slide switch to select its mode of operation when using
> the stock firmware. After looking at how it's implemented for similar
> devices, I also used 'struct gpio_keys_button { .type = EV_SW, .code = 
> BTN_... }'
> to support the switch, but both 'switch_b0' and 'switch_b1' are missing
> when using 'evtest' and 'thd', only the 'reset' button shows up in the
> output of the programs.
> 
> Changing '.code' to some SW_ value, for example SW_LID and SW_TABLET_MODE,
> makes them usable with both 'evtest' and 'thd'. Am I missing something,
> or is EV_SW + BTN_... an invalid combination?

i use EV_SW and KEY_RFKILL on various boards and it works well. look at
package/base-files/files/etc/rc.button/rfkill to see how to handle the
events in userland

John

> 
> Apart from this, OpenWrt is running fine on the device.
> 
> Signed-off-by: Jens Steinhauser 
> ---
>  .../linux/ar71xx/base-files/etc/board.d/02_network |   1 +
>  target/linux/ar71xx/base-files/etc/diag.sh |   1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |   3 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
>  target/linux/ar71xx/config-4.1 |   1 +
>  target/linux/ar71xx/config-4.4 |   1 +
>  .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  10 ++
>  target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
>  .../ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c  | 135 
> +
>  .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
>  target/linux/ar71xx/generic/profiles/tp-link.mk|  11 ++
>  target/linux/ar71xx/image/Makefile |   8 ++
>  12 files changed, 174 insertions(+)
>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr810n.c
> 
> diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
> b/target/linux/ar71xx/base-files/etc/board.d/02_network
> index 8fdfa07..8754e62 100755
> --- a/target/linux/ar71xx/base-files/etc/board.d/02_network
> +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
> @@ -396,6 +396,7 @@ pb44 |\
>  routerstation|\
>  tl-wr710n |\
>  tl-wr720n-v3|\
> +tl-wr810n |\
>  wpe72)
>   ucidef_set_interfaces_lan_wan "eth1" "eth0"
>   ;;
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index 1f9bd3f..bd6f3f8 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -332,6 +332,7 @@ get_status_led() {
>   tl-wr703n | \
>   tl-wr710n | \
>   tl-wr720n-v3 | \
> + tl-wr810n | \
>   tl-wr941nd-v6)
>   status_led="tp-link:blue:system"
>   ;;
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 3d4541e..522f541 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -922,6 +922,9 @@ ar71xx_board_detect() {
>   *"TL-WR720N"*)
>   name="tl-wr720n-v3"
>   ;;
> + *"TL-WR810N")
> + name="tl-wr810n"
> + ;;
>   *"TL-MR10U")
>   name="tl-mr10u"
>   ;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index d44ece5..e4fb8b8 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -377,6 +377,7 @@ platform_check_image() {
>   tl-wr720n-v3 | \
>   tl-wr741nd | \
>   tl-wr741nd-v4 | \
> + tl-wr810n | \
>   tl-wr841n-v1 | \
>   tl-wa830re-v2 | \
>   tl-wr841n-v7 | \
> diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
> index fa98643..1baee7e 100644
> --- a/target/linux/ar71xx/config-4.1
> +++ b/target/linux/ar71xx/config-4.1
> @@ -157,6 +157,7 @@ CONFIG_ATH79_MACH_TL_WR703N=y
>  CONFIG_ATH79_MACH_TL_WR720N_V3=y
>  CONFIG_ATH79_MACH_TL_WR741ND=y
>  CONFIG_ATH79_MACH_TL_WR741ND_V4=y
> +CONFIG_ATH79_MACH_TL_WR810N=y
>  CONFIG_ATH79_MACH_TL_WR841N_V1=y
>  CONFIG_ATH79_MACH_TL_WR841N_V8=y
>  CONFIG_ATH79_MACH_TL_WR841N_V9=y
> diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
> index ec04c28..9c0db09 100644
> --- a/target/linux/ar71xx/config-4.4
> +++ b/target/linux/ar71xx/config-4.4
> @@ -159,6 +159,7 @@ CONFIG_ATH79_MACH_TL_WR703N=y
>  CONFIG_ATH79_MACH_TL_WR720N_V3=y
>  CONFIG_ATH79_MACH_TL_WR741ND=y
>  CONFIG_ATH79_MACH_TL_WR741ND_V4=y
> +CONFIG_ATH79_MACH_TL_WR810N=y
>  CONFIG_ATH79_MACH_TL_WR841N_V1=y
>  CONFIG_ATH79_MACH_TL_WR841N_V8=y
>  CONFIG_ATH79_MACH_TL_WR841N_V9=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
> 

Re: [OpenWrt-Devel] How to initialize multiple phy radios

2016-04-25 Thread Christian Lamparter
Hello,

On Monday, April 25, 2016 10:53:41 AM David Hutchison wrote:
> So with some modifications to pci.c, hw.h and core.c I was able to get
> the radio initialized! :)

Hey, that's nice! Can you make and post a patch for that? 
I'm sure if it's just a matter of adding the new pci and chip
ids to the tables. You could just go ahead and post it, so it
will be picked up.

> pci.c: added QCA9887_DEVICE_ID, modified ath10k_pci_id_table and
> ath10k_pci_supp_chips
> core.c: Duplicated QCA988X entry in ath10k_hw_params_list and passed
> 0x4100016d as the ID ( left everything else the same )
> hw.h: added definitions for QCA9887
> 
> I found 
> "https://github.com/kvalo/ath10k-firmware/blob/master/QCA9887/firmware-5.bin_10.2.3.31.7-1;
> on your github and replaced
> /lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin on my board.
> hotplug.d then loaded QCA9887 firmware on next boot.
> 
> Of course my approach was very much a hack. If there is anything I can
> contribute to creating a patch for ath10k, please let me know. I would
> love to help!
> 
> dmesg
> [   18.92] ath10k_pci :00:00.0: pci irq legacy interrupts 0
> irq_mode 0 reset_mode 0
> [   19.03] rev_id  QCA9887
> [   19.03] dev_id 0050 QCA9887
> [   20.46] ath10k_pci :00:00.0: qca988x hw2.0 (0x4100016d,
> 0x004000ff sub :) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1
> wmi-op 5 htt-op 2 cal file max-sta 1p
> [   20.48] ath10k_pci :00:00.0: debug 1 debugfs 1 tracing 0
> dfs 0 testmode 1
> 
...

Does the device work? Can you scan for networks, connect to networks
and create networks? That would be good to know.

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


Re: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed.

2016-04-25 Thread Vittorio G (VittGam)

On 25/04/2016 15:14:31 CEST, John Crispin wrote:

i understand the problem, but the WPS led is for WPS and should be left
free for the WPS feature eventually. so nack on this one i am afraid.


Ok, thank you anyway.

For the record, if anyone wants the old behaviour they just need to put
this in /etc/config/system:

config led 'led_system'
option name 'System'
option sysfs 'tdw89x0:green:wps'
option default '1'

And the LED will default to on after a successful boot.

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


[OpenWrt-Devel] [PATCH v2] dnsmasq: run as dedicated UID/GID

2016-04-25 Thread Daniel Golle
Running dnsmasq in a dedicated user/group allows matching its outgoing
traffic more easily using iptables' owner match.
Add UID/GID to the package metadata and append the user/group
parameters to the init script.

Signed-off-by: Daniel Golle 
---
 package/network/services/dnsmasq/Makefile   | 3 ++-
 package/network/services/dnsmasq/files/dnsmasq.init | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/network/services/dnsmasq/Makefile 
b/package/network/services/dnsmasq/Makefile
index a5c3740..a5b96a3 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
 PKG_VERSION:=2.75
-PKG_RELEASE:=6
+PKG_RELEASE:=7
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
@@ -34,6 +34,7 @@ define Package/dnsmasq/Default
   CATEGORY:=Base system
   TITLE:=DNS and DHCP server
   URL:=http://www.thekelleys.org.uk/dnsmasq/
+  USERID:=dnsmasq=453:dnsmasq=453
 endef
 
 define Package/dnsmasq
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
b/package/network/services/dnsmasq/files/dnsmasq.init
index 61ded6a..83fcbb0 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -218,6 +218,8 @@ dnsmasq() {
mkdir -p /tmp/hosts /tmp/dnsmasq.d
xappend "--addn-hosts=/tmp/hosts"
xappend "--conf-dir=/tmp/dnsmasq.d"
+   xappend "--user=dnsmasq"
+   xappend "--group=dnsmasq"
 
echo >> $CONFIGFILE
 
@@ -589,7 +591,7 @@ start_service() {
 
if [ ! -f "$TIMESTAMPFILE" ]; then
touch "$TIMESTAMPFILE"
-   chown nobody.nogroup "$TIMESTAMPFILE"
+   chown dnsmasq.dnsmasq "$TIMESTAMPFILE"
fi
 
echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
-- 
2.8.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH/RFC] dnsmasq: run as dedicated UID/GID

2016-04-25 Thread Daniel Golle
Hi John!

On Mon, Apr 25, 2016 at 06:28:47PM +0200, John Crispin wrote:
> 
> 
> On 22/04/2016 06:26, Daniel Golle wrote:
> > Running dnsmasq in a dedicated user/group allows matching its outgoing
> > traffic more easily using iptables' owner match.
> > Add UID/GID to the package metadata and append the user/group
> > parameters to the init script.
> > 
> > Signed-off-by: Daniel Golle 
> > ---
> >  package/network/services/dnsmasq/Makefile   | 1 +
> >  package/network/services/dnsmasq/files/dnsmasq.init | 4 +++-
> >  2 files changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/package/network/services/dnsmasq/Makefile 
> > b/package/network/services/dnsmasq/Makefile
> > index a5c3740..9a0f165 100644
> > --- a/package/network/services/dnsmasq/Makefile
> > +++ b/package/network/services/dnsmasq/Makefile
> > @@ -34,6 +34,7 @@ define Package/dnsmasq/Default
> >CATEGORY:=Base system
> >TITLE:=DNS and DHCP server
> >URL:=http://www.thekelleys.org.uk/dnsmasq/
> > +  USERID:=dnsmasq=65453:dnsmasq=65453
> 
> please us an id between 0-999. ideally check what debian uses.

This is what debian does (in dnsmasq package postinst):
---
# create a user to run as (code stolen from dovecot-common)
if [ "$1" = "configure" ]; then
  if [ -z "`id -u dnsmasq 2> /dev/null`" ]; then
adduser --system  --home /var/lib/misc --gecos "dnsmasq" \
--no-create-home --disabled-password \
--quiet dnsmasq || true
  fi

  # Make the directory where we keep the pid file - this
  # has to be owned by "dnsmasq" do that the file can be unlinked.
  if [ ! -d /var/run/dnsmasq ]; then
mkdir /var/run/dnsmasq
chown dnsmasq:nogroup /var/run/dnsmasq
  fi
---

This is what wikipedia suggests:
https://en.wikipedia.org/wiki/User_identifier#Reserved_ranges

What we do in OpenWrt seems to be more similar to the FreeBSD'ish way
mentioned on that wikipedia page. However, FreeBSD doesn't have a UID
asigned for dnsmasq (but does for bind and unbound), see
http://svnweb.freebsd.org/ports/head/UIDs

Considering what you wrote and looking at the above, I guess choosing
a value between 100 and 499 would be the wisest thing to do, right?

So I'll pick 453, that's within that range and isn't allocated for
anything else in OpenWrt nor FreeBSD's UID register.

I reckon that UID allocation rules should be documented and enforced
for existing packages, a quick grep revealed that most packages use
an UID < 100 which should only be used in post-install scripts and such
according to LSB (which I wouldn't give much about).
Also, there are many packages in the feed installing UIDs > 999 which
is probably the convention you saw violated by using 65453 for dnsmasq,
I probably had a look at the portmap package build.

The only package in core seems to be
network/services/lldpd/Makefile:  USERID:=lldp=121:lldp=129
which is inside the range LSB suggests...

Other packages adding UIDs:

admin/zabbix/Makefile:  USERID:=zabbix=53:zabbix=53
libs/avahi/Makefile:  USERID:=avahi=105:avahi=105
libs/postgresql/Makefile:  USERID:=postgres=5432:postgres=5432
mail/dovecot/Makefile:  USERID:=dovecot=59:dovecot=59
mail/fdm/Makefile:  USERID:=_fdm=99:_fdm=99
multimedia/icecast/Makefile:  USERID:=icecast=87:icecast=87
net/transmission/Makefile:  USERID:=transmission=224:transmission=224
net/prosody/Makefile:  USERID:=prosody=54:prosody=54
net/knot/Makefile:  USERID:=knot=5353:knot=5353
net/openssh/Makefile:   USERID:=sshd=22:sshd=22
net/openssh/Makefile:   USERID:=sshd=22:sshd=22
net/mosquitto/Makefile:  USERID:=mosquitto=200:mosquitto=200
net/portmap/Makefile:  USERID:=rpc=65533:rpc=65533
net/privoxy/Makefile:  USERID:=privoxy=8118:privoxy=8118
net/ocserv/Makefile:  USERID:=ocserv=72:ocserv=72
net/ntpd/Makefile:  USERID:=ntp=123:ntp=123
net/dmapd/Makefile:  USERID:=dmapd=56:dmapd=56
net/bind/Makefile:USERID:=bind=57:bind=57
net/gnunet/Makefile:  USERID:=gnunet=400:gnunet=400
net/radicale/Makefile:  USERID:=radicale=5232:radicale=5232
net/tor/Makefile:  USERID:=tor=52:tor=52
net/chrony/Makefile:  USERID:=chrony=323:chrony=323
sound/pulseaudio/Makefile:  USERID:=pulse=51:pulse=51
sound/upmpdcli/Makefile:  USERID:=upmpdcli=89:upmpdcli=89
sound/pianod/Makefile:  USERID:=pianod=88:pianod=88


Cheers


Daniel

 
>   John
> 
> >  endef
> >  
> >  define Package/dnsmasq
> > diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
> > b/package/network/services/dnsmasq/files/dnsmasq.init
> > index 61ded6a..83fcbb0 100644
> > --- a/package/network/services/dnsmasq/files/dnsmasq.init
> > +++ b/package/network/services/dnsmasq/files/dnsmasq.init
> > @@ -218,6 +218,8 @@ dnsmasq() {
> > mkdir -p /tmp/hosts /tmp/dnsmasq.d
> > xappend "--addn-hosts=/tmp/hosts"
> > xappend "--conf-dir=/tmp/dnsmasq.d"
> > +   xappend "--user=dnsmasq"
> > +   xappend "--group=dnsmasq"
> >  
> > echo >> $CONFIGFILE
> >  
> > @@ -589,7 +591,7 @@ start_service() {
> >  
> > if [ ! -f "$TIMESTAMPFILE" ]; then
> 

Re: [OpenWrt-Devel] [PATCH 02/05] [tools] findutils glibc >= 2.23 compat

2016-04-25 Thread Jo-Philipp Wich
Hi,

this should be handled already, configure uses AC_HEADER_MAJOR and
mountlist.c does:

#ifdef MAJOR_IN_SYSMACROS
#include 
#define HAVE_MAJOR
...

did you patched findutils proactively or was there an actual build issue?

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


[OpenWrt-Devel] [PATCH 05/05] [tools] squashfs4 glibc >= 2.23 compat

2016-04-25 Thread Weedy
With the update to glibc 2.23, sys/types.h doesn't inherit
sys/sysmacros.h anymore. We need to include it manually.

Signed-off-by: Weedy 

--- /dev/null   2016-04-18 05:53:30.273258717 -0400
+++ tools/squashfs4/patches/125-glibc-2.23-sysmacros.patch  2016-04-24
16:22:30.271759670 -0400
@@ -0,0 +1,20 @@
+--- a/squashfs-tools/mksquashfs.c  2016-04-24 16:10:19.230996009 -0400
 b/squashfs-tools/mksquashfs.c  2016-04-24 16:10:54.671356457 -0400
+@@ -33,6 +33,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+--- a/squashfs-tools/unsquashfs.c  2016-04-24 16:14:24.310155265 -0400
 b/squashfs-tools/unsquashfs.c  2016-04-24 16:14:46.560381562 -0400
+@@ -30,6 +30,7 @@
+ #include "xattr.h"
+
+ #include 
++#include 
+
+ struct cache *fragment_cache, *data_cache;
+ struct queue *to_reader, *to_deflate, *to_writer, *from_writer;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 04/05] [tools] squashfs glibc >= 2.23 compat

2016-04-25 Thread Weedy
With the update to glibc 2.23, sys/types.h doesn't inherit
sys/sysmacros.h anymore. We need to include it manually.

Signed-off-by: Weedy 

--- /dev/null   2016-04-18 05:53:30.273258717 -0400
+++ tools/squashfs/patches/125-glibc-2.23-sysmacros.patch   2016-04-24
16:16:39.524863687 -0400
@@ -0,0 +1,20 @@
+--- a/squashfs-tools/mksquashfs.c  2016-04-24 16:10:19.230996009 -0400
 b/squashfs-tools/mksquashfs.c  2016-04-24 16:10:54.671356457 -0400
+@@ -30,6 +30,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
+--- a/squashfs-tools/unsquashfs.c  2016-04-24 16:14:24.310155265 -0400
 b/squashfs-tools/unsquashfs.c  2016-04-24 16:14:46.560381562 -0400
+@@ -25,6 +25,7 @@
+ #define FALSE 0
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 01/05] [tools] e2fsprogs glibc >= 2.23 compat

2016-04-25 Thread Weedy
With the update to glibc 2.23, sys/types.h doesn't inherit
sys/sysmacros.h anymore. We need to include it manually.

Signed-off-by: Weedy 


--- /dev/null   2016-04-18 05:53:30.273258717 -0400
+++ tools/e2fsprogs/patches/125-glibc-2.23-sysmacros.patch  2016-04-24
14:58:32.704376584 -0400
@@ -0,0 +1,20 @@
+--- a/lib/blkid/devname.c.bak  2016-04-24 14:55:25.665819444 -0400
 b/lib/blkid/devname.c  2016-04-24 14:55:45.589354153 -0400
+@@ -25,6 +25,7 @@
+ #include 
+ #if HAVE_SYS_TYPES_H
+ #include 
++#include 
+ #endif
+ #include 
+ #if HAVE_SYS_STAT_H
+--- a/lib/ext2fs/ext2fs.h.bak  2016-04-24 14:56:14.822982962 -0400
 b/lib/ext2fs/ext2fs.h  2016-04-24 14:56:31.613152667 -0400
+@@ -49,6 +49,7 @@
+
+ #ifdef HAVE_SYS_TYPES_H
+ #include 
++#include 
+ #endif
+
+ #include 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to initialize multiple phy radios

2016-04-25 Thread David Hutchison
Hello,

So with some modifications to pci.c, hw.h and core.c I was able to get
the radio initialized! :)

pci.c: added QCA9887_DEVICE_ID, modified ath10k_pci_id_table and
ath10k_pci_supp_chips
core.c: Duplicated QCA988X entry in ath10k_hw_params_list and passed
0x4100016d as the ID ( left everything else the same )
hw.h: added definitions for QCA9887

I found 
"https://github.com/kvalo/ath10k-firmware/blob/master/QCA9887/firmware-5.bin_10.2.3.31.7-1;
on your github and replaced
/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin on my board.
hotplug.d then loaded QCA9887 firmware on next boot.

Of course my approach was very much a hack. If there is anything I can
contribute to creating a patch for ath10k, please let me know. I would
love to help!

dmesg
[   18.92] ath10k_pci :00:00.0: pci irq legacy interrupts 0
irq_mode 0 reset_mode 0
[   19.03] rev_id  QCA9887
[   19.03] dev_id 0050 QCA9887
[   20.46] ath10k_pci :00:00.0: qca988x hw2.0 (0x4100016d,
0x004000ff sub :) fw 10.2.3.31.7-1 fwapi 5 bdapi 1 htt-ver 2.1
wmi-op 5 htt-op 2 cal file max-sta 1p
[   20.48] ath10k_pci :00:00.0: debug 1 debugfs 1 tracing 0
dfs 0 testmode 1


iw phy phy1 info
Wiphy phy1
max # scan SSIDs: 16
max scan IEs length: 199 bytes
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports AP-side u-APSD.
Available Antennas: TX 0x1 RX 0x1
Configured Antennas: TX 0x1 RX 0x1
Supported interface modes:
 * managed
 * AP
 * AP/VLAN
 * monitor
 * mesh point
Band 2:
Capabilities: 0x19e3
RX LDPC
HT20/HT40
Static SM Power Save
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 1-stream
Max AMSDU length: 7935 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-7
VHT Capabilities (0x338001b2):
Max MPDU length: 11454
Supported Channel Width: neither 160 nor 80+80
RX LDPC
short GI (80 MHz)
TX STBC
RX antenna pattern consistency
TX antenna pattern consistency
VHT RX MCS set:
1 streams: MCS 0-9
2 streams: not supported
3 streams: not supported
4 streams: not supported
5 streams: not supported
6 streams: not supported
7 streams: not supported
8 streams: not supported
VHT RX highest supported: 0 Mbps
VHT TX MCS set:
1 streams: MCS 0-9
2 streams: not supported
3 streams: not supported
4 streams: not supported
5 streams: not supported
6 streams: not supported
7 streams: not supported
8 streams: not supported
VHT TX highest supported: 0 Mbps
Frequencies:
* 5180 MHz [36] (23.0 dBm)
* 5200 MHz [40] (23.0 dBm)
* 5220 MHz [44] (23.0 dBm)
* 5240 MHz [48] (23.0 dBm)
* 5260 MHz [52] (23.0 dBm) (no IR, radar detection)
  DFS state: usable (for 39 sec)
  DFS CAC time: 6 ms
* 5280 MHz [56] (23.0 dBm) (no IR, radar detection)
  DFS state: usable (for 39 sec)
  DFS CAC time: 6 ms
* 5300 MHz [60] (23.0 dBm) (no IR, radar detection)
  DFS state: usable (for 39 sec)
  DFS CAC time: 6 ms
* 5320 MHz [64] (23.0 dBm) (no IR, radar detection)
  DFS state: usable (for 39 sec)
  DFS CAC time: 6 ms
* 5500 MHz [100] (23.0 dBm) (no IR, radar detection)
  DFS state: usable (for 39 sec)
  DFS CAC time: 6 ms
* 5520 MHz [104] (23.0 dBm) (no IR, radar detection)
  DFS state: usable (for 39 sec)
  DFS CAC time: 6 ms
* 5540 MHz [108] (23.0 dBm) (no IR, radar detection)
 

Re: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat

2016-04-25 Thread Jo-Philipp Wich
Hi,

no, I only cared about make-ext4fs as I maintain this fork.

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


Re: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat

2016-04-25 Thread Weedy
On 25 Apr 2016 09:09, "Jo-Philipp Wich"  wrote:
>
> Hi!
>
> Thanks for the patch, I fixed the include issue directly in Git, so this
> patch can be dropped and make-ext4fs should be updated in tools/ to a
> newer version instead.
>
> ~ Jo

Have you fixed all the packages that need this?

Make-ext4fs, e2fsprogs, mtd-utils, findutils, and both the squashfs
packages.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH/RFC] dnsmasq: run as dedicated UID/GID

2016-04-25 Thread Daniel Dickinson
> 
> please us an id between 0-999. ideally check what debian uses.
> 

For most system services, with a very small number exceptions, debian
auto-assigns id < 500(?), and which service gets id depends on order of
package installation (which can be hassle with when trying to do network
filesystems).

Regards,

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


Re: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread John Crispin


On 25/04/2016 18:01, Andrew Yong wrote:
> diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount 
> b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
> new file mode 100644
> index 000..570fe16
> --- /dev/null
> +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
> @@ -0,0 +1,22 @@
> +#!/bin/sh
> +
> +# SamKnows Whitebox 8 increments a bootcount variable every  boot and 
> attempts
> +# to boot a recovery partition when bootcount > 3. We need to ensure this is
> +# reset to 0 every boot
> +
> +do_bootcount_reset() {
> + . /lib/ramips.sh
> +
> + local board=$(ramips_board_name)
> +
> + case "$board" in
> + sk-wb8)
> + echo "Board is SamKnows Whitebox 8, resetting bootcount 
> environment variable..."
> + fw_setenv bootcount 0
> + ;;
> + esac
> +
> + return 0
> +}
> +
> +boot_hook_add preinit_main do_bootcount_reset


does this actually work ? thinking about it, you might need to have
uci-default run for it to work properly or alternatively call uboot-env
directly without the fw_* abstraction layer

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


Re: [OpenWrt-Devel] [PATCH/RFC] dnsmasq: run as dedicated UID/GID

2016-04-25 Thread John Crispin


On 22/04/2016 06:26, Daniel Golle wrote:
> Running dnsmasq in a dedicated user/group allows matching its outgoing
> traffic more easily using iptables' owner match.
> Add UID/GID to the package metadata and append the user/group
> parameters to the init script.
> 
> Signed-off-by: Daniel Golle 
> ---
>  package/network/services/dnsmasq/Makefile   | 1 +
>  package/network/services/dnsmasq/files/dnsmasq.init | 4 +++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/package/network/services/dnsmasq/Makefile 
> b/package/network/services/dnsmasq/Makefile
> index a5c3740..9a0f165 100644
> --- a/package/network/services/dnsmasq/Makefile
> +++ b/package/network/services/dnsmasq/Makefile
> @@ -34,6 +34,7 @@ define Package/dnsmasq/Default
>CATEGORY:=Base system
>TITLE:=DNS and DHCP server
>URL:=http://www.thekelleys.org.uk/dnsmasq/
> +  USERID:=dnsmasq=65453:dnsmasq=65453

please us an id between 0-999. ideally check what debian uses.

John

>  endef
>  
>  define Package/dnsmasq
> diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
> b/package/network/services/dnsmasq/files/dnsmasq.init
> index 61ded6a..83fcbb0 100644
> --- a/package/network/services/dnsmasq/files/dnsmasq.init
> +++ b/package/network/services/dnsmasq/files/dnsmasq.init
> @@ -218,6 +218,8 @@ dnsmasq() {
>   mkdir -p /tmp/hosts /tmp/dnsmasq.d
>   xappend "--addn-hosts=/tmp/hosts"
>   xappend "--conf-dir=/tmp/dnsmasq.d"
> + xappend "--user=dnsmasq"
> + xappend "--group=dnsmasq"
>  
>   echo >> $CONFIGFILE
>  
> @@ -589,7 +591,7 @@ start_service() {
>  
>   if [ ! -f "$TIMESTAMPFILE" ]; then
>   touch "$TIMESTAMPFILE"
> - chown nobody.nogroup "$TIMESTAMPFILE"
> + chown dnsmasq.dnsmasq "$TIMESTAMPFILE"
>   fi
>  
>   echo "# auto-generated config file from /etc/config/dhcp" > $CONFIGFILE
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] lantiq: install uboot-envtools by default on BTHOMEHUBV3A

2016-04-25 Thread Ben Mulvihill
The only way to access the u-boot console on the BTHOMEHUBV3A
is by soldering a serial console onto some really tiny pads.

To enable installation without soldering it would be helpful
to be able to modify the uboot environment from within 
the ramdisk image used as part of the installation process.

Signed-off-by: Ben Mulvihill 
---
diff -uprN a/target/linux/lantiq/xway/profiles/bt.mk 
b/target/linux/lantiq/xway/profiles/bt.mk
--- a/target/linux/lantiq/xway/profiles/bt.mk   2016-04-25 12:05:49.0 
+0200
+++ b/target/linux/lantiq/xway/profiles/bt.mk   2016-04-25 12:08:53.0 
+0200
@@ -24,7 +24,7 @@ define Profile/BTHOMEHUBV3A
kmod-ltq-deu-ar9 \
ltq-adsl-app ppp-mod-pppoa \
kmod-ath9k wpad-mini \
-   swconfig
+   swconfig uboot-envtools
 endef
 
 BTHOMEHUBV3A_UBIFS_OPTS:="-m 512 -e 15872 -c 1959"
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread Andrew Yong
Hopefully third time's the charm:

PATCHv1:
This patch adds support for the SamKnows version 8.0 Whitebox, built
around the MT7621 platform. 2.4GHz appears to be working, albeit
poorly; 5GHz not working yet.

PATCHv2:
Fixed LED name in DTS.

PATCHv3:
 DTS: Syntax error fixed, LEDs and buttons mapped correctly now
- diag.sh updated to blink WPS LED on boot
- 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
matches SamKnows firmware
- 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware

PATCHv4:
- I didn't commit some fixes in PATCHv3, that's fixed now

PATCHv5:
- Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter
to prevent soft brick by booting into nonexistent backup partition
- Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS,
needs further investigation, effective txpower is still 0)
- Experimenting on wifi but that'll be a future patch, board boots fine now.

Signed-off-by: Andrew Yong 

diff --git a/package/boot/uboot-envtools/files/ramips 
b/package/boot/uboot-envtools/files/ramips
index a759bcc..9ad5974 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -24,7 +24,8 @@ linkits7688d | \
 wsr-600 | \
 wsr-1166 | \
 br6425 | \
-miwifi-nano)
+miwifi-nano | \
+sk-wb8)
    ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1"
    ;;
 esac
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index e3b8500..df30085 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -241,6 +241,9 @@ rt-n14u)
    set_wifi_led "$board:blue:air"
    set_usb_led "$board:blue:usb"
    ;;
+sk-wb8)
+   set_usb_led "$board:green:usb"
+   ;;
 tiny-ac)
    set_wifi_led "$board:orange:wifi"
    set_usb_led "$board:green:usb"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index 3c958ae..3e876d2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -77,6 +77,7 @@ ramips_setup_interfaces()
    pbr-m1|\
    psg1208|\
    sap-g3200u3|\
+   sk-wb8|\
    wf-2881|\
    whr-300hp2|\
    whr-600d|\
@@ -310,6 +311,9 @@ ramips_setup_macs()
    lan_mac=$(macaddr_setbit_la "$lan_mac")
    wan_mac=$(mtd_get_mac_binary factory 32772)
    ;;
+   sk-wb8)
+   wan_mac=$(mtd_get_mac_binary factory 57350)
+   ;;
    tew-691gr)
    lan_mac=$(cat /sys/class/net/eth0/address)
    wan_mac=$(macaddr_add "$lan_mac" 3)
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index bd0ff05..534cc1c 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -76,6 +76,7 @@ get_status_led() {
    ;;
    awapn2403|\
    dir-645|\
+   sk-wb8|\
    wrh-300cr)
    status_led="$board:green:wps"
    ;;
diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount 
b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
new file mode 100644
index 000..570fe16
--- /dev/null
+++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# SamKnows Whitebox 8 increments a bootcount variable every  boot and attempts
+# to boot a recovery partition when bootcount > 3. We need to ensure this is
+# reset to 0 every boot
+
+do_bootcount_reset() {
+   . /lib/ramips.sh
+
+   local board=$(ramips_board_name)
+
+   case "$board" in
+   sk-wb8)
+   echo "Board is SamKnows Whitebox 8, resetting bootcount 
environment variable..."
+   fw_setenv bootcount 0
+   ;;
+   esac
+
+   return 0
+}
+
+boot_hook_add preinit_main do_bootcount_reset
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 550ec55..5c1715d 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -367,6 +367,9 @@ ramips_board_detect() {
    *"RUT5XX")
    name="rut5xx"
    ;;
+   *"SamKnows Whitebox 8")
+   name="sk-wb8"
+   ;;
    *"SAP-G3200U3")
    name="sap-g3200u3"
    ;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 73ba6e6..fcc1b79 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -109,6 +109,7 @@ platform_check_image() {
    rt-n56u|\
    rut5xx|\
    sap-g3200u3|\
+   sk-wb8|\
    sl-r7205|\
    

[OpenWrt-Devel] [PATCH v2] lantiq: use dwc2 by default on all ar9 boards

2016-04-25 Thread Ben Mulvihill
The dwc2 USB driver now works on Lantiq ar9, but the
default is still ltq-hcd-ar9. This patch switches to
dwc2 by default.

v2: all ar9 boards (v1 was just for BTHOMEHUBV3A and WBMR)

Signed-off-by: Ben Mulvihill 
---
diff -uprN a/target/linux/lantiq/xway/profiles/avm.mk 
b/target/linux/lantiq/xway/profiles/avm.mk
--- a/target/linux/lantiq/xway/profiles/avm.mk  2016-04-25 11:53:27.0 
+0200
+++ b/target/linux/lantiq/xway/profiles/avm.mk  2016-04-25 17:47:37.0 
+0200
@@ -4,7 +4,7 @@ define Profile/FRITZ7320
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
ltq-adsl-app ppp-mod-pppoa \
-   kmod-ltq-deu-ar9 kmod-ltq-hcd-ar9
+   kmod-ltq-deu-ar9 kmod-usb-dwc2
 endef
 
 $(eval $(call Profile,FRITZ7320))
diff -uprN a/target/linux/lantiq/xway/profiles/aztech.mk 
b/target/linux/lantiq/xway/profiles/aztech.mk
--- a/target/linux/lantiq/xway/profiles/aztech.mk   2016-04-25 
11:53:27.0 +0200
+++ b/target/linux/lantiq/xway/profiles/aztech.mk   2016-04-25 
17:47:55.0 +0200
@@ -1,7 +1,7 @@
 define Profile/GR7000
   NAME:=Aztech GR7000
   PACKAGES:= \
-   kmod-ltq-deu-ar9 kmod-ltq-hcd-ar9 \
+   kmod-ltq-deu-ar9 kmod-usb-dwc2 \
swconfig
 endef
 $(eval $(call Profile,GR7000))
diff -uprN a/target/linux/lantiq/xway/profiles/bt.mk 
b/target/linux/lantiq/xway/profiles/bt.mk
--- a/target/linux/lantiq/xway/profiles/bt.mk   2016-04-25 17:44:19.0 
+0200
+++ b/target/linux/lantiq/xway/profiles/bt.mk   2016-04-25 17:46:23.0 
+0200
@@ -18,7 +18,7 @@ $(eval $(call Profile,BTHOMEHUBV2B))
 
 define Profile/BTHOMEHUBV3A
   NAME:=BT Home Hub 3A
-  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
kmod-ltq-deu-ar9 \
diff -uprN a/target/linux/lantiq/xway/profiles/buffalo.mk 
b/target/linux/lantiq/xway/profiles/buffalo.mk
--- a/target/linux/lantiq/xway/profiles/buffalo.mk  2016-04-25 
17:44:06.0 +0200
+++ b/target/linux/lantiq/xway/profiles/buffalo.mk  2016-04-25 
17:46:23.0 +0200
@@ -1,6 +1,6 @@
 define Profile/WBMRA
   NAME:=Buffalo WBMR-HP-G300H (A) - WBMR
-  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
ltq-adsl-app ppp-mod-pppoa \
@@ -12,7 +12,7 @@ $(eval $(call Profile,WBMRA))
 
 define Profile/WBMRB
   NAME:=Buffalo WBMR-HP-G300H (B) - WBMR
-  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
ltq-adsl-app ppp-mod-pppoa \
diff -uprN a/target/linux/lantiq/xway/profiles/netgear.mk 
b/target/linux/lantiq/xway/profiles/netgear.mk
--- a/target/linux/lantiq/xway/profiles/netgear.mk  2016-04-25 
11:53:27.0 +0200
+++ b/target/linux/lantiq/xway/profiles/netgear.mk  2016-04-25 
17:48:34.0 +0200
@@ -1,6 +1,6 @@
 define Profile/DGN3500
   NAME:=Netgear DGN3500
-  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
kmod-ath9k wpad-mini \
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
@@ -12,7 +12,7 @@ $(eval $(call Profile,DGN3500))
 
 define Profile/DGN3500B
   NAME:=Netgear DGN3500B
-  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
kmod-ath9k wpad-mini \
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
diff -uprN a/target/linux/lantiq/xway/profiles/zte.mk 
b/target/linux/lantiq/xway/profiles/zte.mk
--- a/target/linux/lantiq/xway/profiles/zte.mk  2016-04-25 11:53:27.0 
+0200
+++ b/target/linux/lantiq/xway/profiles/zte.mk  2016-04-25 17:48:53.0 
+0200
@@ -4,7 +4,7 @@ define Profile/H201L
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
ltq-adsl-app ppp-mod-pppoe \
-   kmod-ltq-deu-ar9 kmod-ltq-hcd-ar9 \
+   kmod-ltq-deu-ar9 kmod-usb-dwc2 \
kmod-ltq-tapi kmod-ltq-vmmc \
swconfig
 endef
diff -uprN a/target/linux/lantiq/xway/profiles/zyxel.mk 
b/target/linux/lantiq/xway/profiles/zyxel.mk
--- a/target/linux/lantiq/xway/profiles/zyxel.mk2016-04-25 
11:53:27.0 +0200
+++ b/target/linux/lantiq/xway/profiles/zyxel.mk2016-04-25 
17:49:09.0 +0200
@@ -4,7 +4,7 @@ define Profile/P2601HNFX
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
ltq-adsl-app ppp-mod-pppoe \
-   kmod-ltq-deu-ar9 kmod-ltq-hcd-ar9 \
+   kmod-ltq-deu-ar9 kmod-usb-dwc2 \
swconfig
 endef
 $(eval $(call 

Re: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread Andrew Yong
Working on my email client choice.

Anyway, preinit seems to be before fw_setenv gets its bearings:
Board is SamKnows Whitebox 8, resetting bootcount environment variable...
Cannot parse config file: No such file or directory
Error: environment not initialized

Router still soft bricks after 3 reboots because the counter doesn't get reset.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread John Crispin
i'm afraid they are both badly formatted



On 25/04/2016 16:51, Andrew Yong wrote:
> PATCHv1:
> This patch adds support for the SamKnows version 8.0 Whitebox, built
> around the MT7621 platform. 2.4GHz appears to be working, albeit
> poorly; 5GHz not working yet.
> 
> PATCHv2:
> Fixed LED name in DTS.
> 
> PATCHv3:
>  DTS: Syntax error fixed, LEDs and buttons mapped correctly now
> - diag.sh updated to blink WPS LED on boot
> - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
> matches SamKnows firmware
> - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
> 
> PATCHv4:
> - I didn't commit some fixes in PATCHv3, that's fixed now
> 
> PATCHv5:
> - Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter
> to prevent soft brick by booting into nonexistent backup partition
> - Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS,
> needs further investigation, effective txpower is still 0)
> - Experimenting on wifi but that'll be a future patch, board boots fine now.
> 
> Signed-off-by: Andrew Yong 
> 
> diff --git a/package/boot/uboot-envtools/files/ramips
> b/package/boot/uboot-envtools/files/ramips
> index a759bcc..9ad5974 100644
> --- a/package/boot/uboot-envtools/files/ramips
> +++ b/package/boot/uboot-envtools/files/ramips
> @@ -24,7 +24,8 @@ linkits7688d | \
>  wsr-600 | \
>  wsr-1166 | \
>  br6425 | \
> -miwifi-nano)
> +miwifi-nano | \
> +sk-wb8)
> ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1"
> ;;
>  esac
> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> index e3b8500..df30085 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -241,6 +241,9 @@ rt-n14u)
> set_wifi_led "$board:blue:air"
> set_usb_led "$board:blue:usb"
> ;;
> +sk-wb8)
> +   set_usb_led "$board:green:usb"
> +   ;;
>  tiny-ac)
> set_wifi_led "$board:orange:wifi"
> set_usb_led "$board:green:usb"
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index 3c958ae..3e876d2 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -77,6 +77,7 @@ ramips_setup_interfaces()
> pbr-m1|\
> psg1208|\
> sap-g3200u3|\
> +   sk-wb8|\
> wf-2881|\
> whr-300hp2|\
> whr-600d|\
> @@ -310,6 +311,9 @@ ramips_setup_macs()
> lan_mac=$(macaddr_setbit_la "$lan_mac")
> wan_mac=$(mtd_get_mac_binary factory 32772)
> ;;
> +   sk-wb8)
> +   wan_mac=$(mtd_get_mac_binary factory 57350)
> +   ;;
> tew-691gr)
> lan_mac=$(cat /sys/class/net/eth0/address)
> wan_mac=$(macaddr_add "$lan_mac" 3)
> diff --git a/target/linux/ramips/base-files/etc/diag.sh
> b/target/linux/ramips/base-files/etc/diag.sh
> index bd0ff05..534cc1c 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -76,6 +76,7 @@ get_status_led() {
> ;;
> awapn2403|\
> dir-645|\
> +   sk-wb8|\
> wrh-300cr)
> status_led="$board:green:wps"
> ;;
> diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
> b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
> new file mode 100644
> index 000..570fe16
> --- /dev/null
> +++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
> @@ -0,0 +1,22 @@
> +#!/bin/sh
> +
> +# SamKnows Whitebox 8 increments a bootcount variable every  boot and 
> attempts
> +# to boot a recovery partition when bootcount > 3. We need to ensure this is
> +# reset to 0 every boot
> +
> +do_bootcount_reset() {
> +   . /lib/ramips.sh
> +
> +   local board=$(ramips_board_name)
> +
> +   case "$board" in
> +   sk-wb8)
> +   echo "Board is SamKnows Whitebox 8, resetting
> bootcount environment variable..."
> +   fw_setenv bootcount 0
> +   ;;
> +   esac
> +
> +   return 0
> +}
> +
> +boot_hook_add preinit_main do_bootcount_reset
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 550ec55..5c1715d 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -367,6 +367,9 @@ ramips_board_detect() {
> *"RUT5XX")
> name="rut5xx"
> ;;
> +   *"SamKnows Whitebox 8")
> +   name="sk-wb8"
> +   ;;
> *"SAP-G3200U3")
> name="sap-g3200u3"
> ;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> 

Re: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A

2016-04-25 Thread John Crispin


On 25/04/2016 17:38, Ben Mulvihill wrote:
> On Mon, 2016-04-25 at 16:29 +0200, Martin Blumenstingl wrote:
>> On Mon, Apr 25, 2016 at 3:00 PM, John Crispin  wrote:
>>> is this not a bit risky ? normally we try to keep them read-only so that
>>> users cannot accidentally kill them. is the calib data normally not
>>> located in the art partition or why do you need to copy it after flashing ?
> 
> @John: As supplied from the manufacturer, the caldata is in a file
> in a jffs partition, which we overwrite anyway during installation.
> The art partition is specifically for openwrt. Up till now we have
> been copying the calibration data into it manually from the uboot 
> command line. The trouble is that the only way to access the uboot
> command line involves some very fiddly soldering on minuscule pads.
> I am working on a way to install openwrt without a serial console,
> but to do it the user will need to be able to write to the art
> partition from openwrt.
> 

fine, i'll merge it in that case

John

>> I think the caldata partition is made writable because of some bug in
>> ath9k which required HH3A users to manually modify the ath9k caldata.
>> This is not necessary anymore since my patch (+ Felix' fix on top of
>> it) is now upstream: [0]
> 
> @Martin. No, as you say, thanks to you and Felix, manual modification
> of the calibration data is no longer necessary. Brilliant! See above
> for explanation of why I am suggesting this change.
> 
>>
>> @Ben: one probably has to enable caldata swapping in the .dts.
> 
> I saw your comment on openwrt.ebilan.co.uk that the "ath,eep-swap;"
> flag should be added to the dts in order to use unmodified calibration 
> data, but actually this does not appear to be the case. I have just
> installed a board using unmodified calibration data and unmodified dts
> (apart from read-only flag) and it works fine. I then tried adding 
> "ath,eep-swap;" just to see what would happen and it no longer worked.
> 
> I haven't investigated why "ath,eep-swap;" is no longer needed. Maybe
> the result of Felix's latest changes? In any case so much the better!
> 
>> Then we have to figure out what to do with existing HH3A installations.
>>
> 
> We'll have to do that anyway.
> 
>> Martin
>>
>> [0] 
>> https://github.com/torvalds/linux/commit/6fa658fd5ab26a769ca7df7bfdd53c212a0ba852
> 
> Thanks,
> 
> Ben
> 
> 
> 
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A

2016-04-25 Thread Ben Mulvihill
On Mon, 2016-04-25 at 16:29 +0200, Martin Blumenstingl wrote:
> On Mon, Apr 25, 2016 at 3:00 PM, John Crispin  wrote:
> > is this not a bit risky ? normally we try to keep them read-only so that
> > users cannot accidentally kill them. is the calib data normally not
> > located in the art partition or why do you need to copy it after flashing ?

@John: As supplied from the manufacturer, the caldata is in a file
in a jffs partition, which we overwrite anyway during installation.
The art partition is specifically for openwrt. Up till now we have
been copying the calibration data into it manually from the uboot 
command line. The trouble is that the only way to access the uboot
command line involves some very fiddly soldering on minuscule pads.
I am working on a way to install openwrt without a serial console,
but to do it the user will need to be able to write to the art
partition from openwrt.

> I think the caldata partition is made writable because of some bug in
> ath9k which required HH3A users to manually modify the ath9k caldata.
> This is not necessary anymore since my patch (+ Felix' fix on top of
> it) is now upstream: [0]

@Martin. No, as you say, thanks to you and Felix, manual modification
of the calibration data is no longer necessary. Brilliant! See above
for explanation of why I am suggesting this change.

> 
> @Ben: one probably has to enable caldata swapping in the .dts.

I saw your comment on openwrt.ebilan.co.uk that the "ath,eep-swap;"
flag should be added to the dts in order to use unmodified calibration 
data, but actually this does not appear to be the case. I have just
installed a board using unmodified calibration data and unmodified dts
(apart from read-only flag) and it works fine. I then tried adding 
"ath,eep-swap;" just to see what would happen and it no longer worked.

I haven't investigated why "ath,eep-swap;" is no longer needed. Maybe
the result of Felix's latest changes? In any case so much the better!

> Then we have to figure out what to do with existing HH3A installations.
> 

We'll have to do that anyway.

> Martin
> 
> [0] 
> https://github.com/torvalds/linux/commit/6fa658fd5ab26a769ca7df7bfdd53c212a0ba852

Thanks,

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


Re: [OpenWrt-Devel] [luci] [PATCH] luci-mod-admin-full: Add option to set anonymous_identity field

2016-04-25 Thread John Crispin
please send this as a PR against the luci tree on github

John

On 07/04/2016 18:22, Kevin O'Connor wrote:
> Add support for setting the "anonymous_identity" field on EAP type
> networks.
> 
> Signed-off-by: Kevin O'Connor 
> ---
> 
> I sent a similar request to the openwrt mailing list that adds support
> to the hostapd.sh script.
> 
> ---
>  .../luasrc/model/cbi/admin_network/wifi.lua| 18 
> ++
>  1 file changed, 18 insertions(+)
> 
> diff --git 
> a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua 
> b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
> index 945512e..09763e8 100644
> --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
> +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua
> @@ -967,6 +967,24 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype 
> == "prism2" then
>   identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa2"})
>   identity:depends({mode="sta-wds", eap_type="tls", encryption="wpa"})
>  
> + anonymous_identity = s:taboption("encryption", Value, 
> "anonymous_identity", translate("Anonymous Identity"))
> + anonymous_identity:depends({mode="sta", eap_type="fast", 
> encryption="wpa2"})
> + anonymous_identity:depends({mode="sta", eap_type="fast", 
> encryption="wpa"})
> + anonymous_identity:depends({mode="sta", eap_type="peap", 
> encryption="wpa2"})
> + anonymous_identity:depends({mode="sta", eap_type="peap", 
> encryption="wpa"})
> + anonymous_identity:depends({mode="sta", eap_type="ttls", 
> encryption="wpa2"})
> + anonymous_identity:depends({mode="sta", eap_type="ttls", 
> encryption="wpa"})
> + anonymous_identity:depends({mode="sta-wds", eap_type="fast", 
> encryption="wpa2"})
> + anonymous_identity:depends({mode="sta-wds", eap_type="fast", 
> encryption="wpa"})
> + anonymous_identity:depends({mode="sta-wds", eap_type="peap", 
> encryption="wpa2"})
> + anonymous_identity:depends({mode="sta-wds", eap_type="peap", 
> encryption="wpa"})
> + anonymous_identity:depends({mode="sta-wds", eap_type="ttls", 
> encryption="wpa2"})
> + anonymous_identity:depends({mode="sta-wds", eap_type="ttls", 
> encryption="wpa"})
> + anonymous_identity:depends({mode="sta", eap_type="tls", 
> encryption="wpa2"})
> + anonymous_identity:depends({mode="sta", eap_type="tls", 
> encryption="wpa"})
> + anonymous_identity:depends({mode="sta-wds", eap_type="tls", 
> encryption="wpa2"})
> + anonymous_identity:depends({mode="sta-wds", eap_type="tls", 
> encryption="wpa"})
> +
>   password = s:taboption("encryption", Value, "password", 
> translate("Password"))
>   password:depends({mode="sta", eap_type="fast", encryption="wpa2"})
>   password:depends({mode="sta", eap_type="fast", encryption="wpa"})
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] How to initialize multiple phy radios

2016-04-25 Thread Valo, Kalle
Christian Lamparter  writes:

> On Sunday, April 24, 2016 01:16:11 AM David Hutchison wrote:
>> I spoke too soon:
>> https://pci-ids.ucw.cz/read/PC/168c/0050
>> 
>> It is the QCA9887, so it's definitely on the PCIe bus and is being
>> seen.
>
> Does ath10k support the QCA9887? I see no entry for this pci-id (168c:0050)
> in ath10k's pci table [0] and there's no definition of it in the hardware
> header either [1]. The chip-id is also not present. I CC'ed ath10k, since
> this seems to be a new chip that might be easy to add.

Currently ath10k does not support QCA9887.

-- 
Kalle Valo
___
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 tools/kernel2minor package for Mikrotik NOR flash devices.

2016-04-25 Thread John Crispin
Hi,

comments inline

On 18/04/2016 12:05, ad...@yapic.net wrote:
> From: Sergey Sergeev 
> 
> kernel2minor tool is used for packing openwrt kernel into modified yaffs2 
> file system image.
> This is necessary to boot via Routerboot on new Mikrotik NOR flash devices.
> ---
>  config/Config-images.in|  7 +++
>  target/linux/ar71xx/image/Makefile |  3 +++
>  target/linux/ar71xx/mikrotik/target.mk |  2 +-
>  tools/Makefile |  1 +
>  tools/kernel2minor/Makefile| 35 
> ++
>  5 files changed, 47 insertions(+), 1 deletion(-)
>  create mode 100644 tools/kernel2minor/Makefile
> 
> diff --git a/config/Config-images.in b/config/Config-images.in
> index a60dd50..339a5fd 100644
> --- a/config/Config-images.in
> +++ b/config/Config-images.in
> @@ -6,6 +6,13 @@
>  
>  menu "Target Images"
>  
> + config TARGET_KERNEL_MINOR_YAFFS2
> + bool "kernel.minor-yaffs2"
> + default n
> + depends on TARGET_ar71xx_mikrotik
> + help
> +   Build a Mikrotik Nor Yaffs2 kernel filesystem for RouterBoot
> +

can you change this to be like

config TARGET_ROOTFS_YAFFS2
bool "yaffs2"
default y if USES_YAFFS2
help
  Build a YAFFS2 root filesystem.

then patch scripts/metadata.pl to handle USES_YAFFS2
and finally patch target/linux/ar71xx/mikrotik/target.mk and add yaffs2
to the FEATURES list

John



>   menuconfig TARGET_ROOTFS_INITRAMFS
>   bool "ramdisk"
>   default y if USES_INITRAMFS
> diff --git a/target/linux/ar71xx/image/Makefile 
> b/target/linux/ar71xx/image/Makefile
> index e4e2fcf..64bec18 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -1658,6 +1658,9 @@ define Image/BuildKernel
>   $(call MkuImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(UIMAGE)-gzip.bin)
>   $(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin)
>   cp $(KDIR)/loader-generic.elf $(VMLINUX)-lzma.elf
> +ifeq ($(CONFIG_TARGET_KERNEL_MINOR_YAFFS2),y)
> + $(STAGING_DIR_HOST)/bin/kernel2minor -k 
> $(KDIR)/loader-generic.elf -r $(VMLINUX)-lzma.minor-yaffs2 -e
> +endif
>   -mkdir -p $(KDIR_TMP)
>   $(call Image/Build/Profile/$(IMAGE_PROFILE),buildkernel)
>  endef
> diff --git a/target/linux/ar71xx/mikrotik/target.mk 
> b/target/linux/ar71xx/mikrotik/target.mk
> index b2fb0df..250252e 100644
> --- a/target/linux/ar71xx/mikrotik/target.mk
> +++ b/target/linux/ar71xx/mikrotik/target.mk
> @@ -1,4 +1,4 @@
> -BOARDNAME:=Mikrotik devices with NAND flash
> +BOARDNAME:=Mikrotik devices with NAND/NOR flash
>  FEATURES += targz ramdisk
>  
>  define Target/Description
> diff --git a/tools/Makefile b/tools/Makefile
> index 187655e..2ea66c40 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -38,6 +38,7 @@ tools-$(CONFIG_TARGET_x86) += qemu
>  tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
>  tools-$(CONFIG_TARGET_brcm2708)$(CONFIG_TARGET_sunxi)$(CONFIG_TARGET_mxs) += 
> mtools dosfstools
>  tools-$(CONFIG_TARGET_ar71xx) += lzma-old squashfs
> +tools-$(CONFIG_TARGET_ar71xx_mikrotik) += kernel2minor
>  tools-y += lzma squashfs4
>  tools-$(BUILD_B43_TOOLS) += b43-tools
>  tools-$(BUILD_PPL_CLOOG) += ppl cloog
> diff --git a/tools/kernel2minor/Makefile b/tools/kernel2minor/Makefile
> new file mode 100644
> index 000..abf4d90
> --- /dev/null
> +++ b/tools/kernel2minor/Makefile
> @@ -0,0 +1,35 @@
> +#
> +# Copyright (C) 2016 ad...@yapic.net
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +include $(TOPDIR)/rules.mk
> +
> +PKG_NAME:=kernel2minor
> +PKG_VERSION:=0.01
> +PKG_RELEASE:=1
> +
> +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
> +PKG_SOURCE_URL:=https://github.com/adron-s/kernel2minor.git
> +PKG_SOURCE_PROTO:=git
> +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
> +PKG_SOURCE_VERSION:=8d59a129acb5663e130a002e47ba2e05d7e29c57
> +
> +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
> +
> +include $(INCLUDE_DIR)/host-build.mk
> +
> +define Host/Compile
> + $(MAKE) -C $(HOST_BUILD_DIR)
> +endef
> +
> +define Host/Install
> + $(INSTALL_BIN) $(HOST_BUILD_DIR)/kernel2minor $(STAGING_DIR_HOST)/bin/
> +endef
> +
> +define Host/Clean
> + rm -f $(STAGING_DIR_HOST)/bin/kernel2minor
> +endef
> +
> +$(eval $(call HostBuild))
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread Andrew Yong
Re-sending, newline issues (oops)

diff --git a/package/boot/uboot-envtools/files/ramips
b/package/boot/uboot-envtools/files/ramips
index a759bcc..9ad5974 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -24,7 +24,8 @@ linkits7688d | \
 wsr-600 | \
 wsr-1166 | \
 br6425 | \
-miwifi-nano)
+miwifi-nano | \
+sk-wb8)
  ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1"
  ;;
 esac
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
b/target/linux/ramips/base-files/etc/board.d/01_leds
index e3b8500..df30085 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -241,6 +241,9 @@ rt-n14u)
  set_wifi_led "$board:blue:air"
  set_usb_led "$board:blue:usb"
  ;;
+sk-wb8)
+ set_usb_led "$board:green:usb"
+ ;;
 tiny-ac)
  set_wifi_led "$board:orange:wifi"
  set_usb_led "$board:green:usb"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
b/target/linux/ramips/base-files/etc/board.d/02_network
index 3c958ae..3e876d2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -77,6 +77,7 @@ ramips_setup_interfaces()
  pbr-m1|\
  psg1208|\
  sap-g3200u3|\
+ sk-wb8|\
  wf-2881|\
  whr-300hp2|\
  whr-600d|\
@@ -310,6 +311,9 @@ ramips_setup_macs()
  lan_mac=$(macaddr_setbit_la "$lan_mac")
  wan_mac=$(mtd_get_mac_binary factory 32772)
  ;;
+ sk-wb8)
+ wan_mac=$(mtd_get_mac_binary factory 57350)
+ ;;
  tew-691gr)
  lan_mac=$(cat /sys/class/net/eth0/address)
  wan_mac=$(macaddr_add "$lan_mac" 3)
diff --git a/target/linux/ramips/base-files/etc/diag.sh
b/target/linux/ramips/base-files/etc/diag.sh
index bd0ff05..534cc1c 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -76,6 +76,7 @@ get_status_led() {
  ;;
  awapn2403|\
  dir-645|\
+ sk-wb8|\
  wrh-300cr)
  status_led="$board:green:wps"
  ;;
diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
new file mode 100644
index 000..570fe16
--- /dev/null
+++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# SamKnows Whitebox 8 increments a bootcount variable every  boot and attempts
+# to boot a recovery partition when bootcount > 3. We need to ensure this is
+# reset to 0 every boot
+
+do_bootcount_reset() {
+ . /lib/ramips.sh
+
+ local board=$(ramips_board_name)
+
+ case "$board" in
+ sk-wb8)
+ echo "Board is SamKnows Whitebox 8, resetting bootcount environment
variable..."
+ fw_setenv bootcount 0
+ ;;
+ esac
+
+ return 0
+}
+
+boot_hook_add preinit_main do_bootcount_reset
diff --git a/target/linux/ramips/base-files/lib/ramips.sh
b/target/linux/ramips/base-files/lib/ramips.sh
index 550ec55..5c1715d 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -367,6 +367,9 @@ ramips_board_detect() {
  *"RUT5XX")
  name="rut5xx"
  ;;
+ *"SamKnows Whitebox 8")
+ name="sk-wb8"
+ ;;
  *"SAP-G3200U3")
  name="sap-g3200u3"
  ;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 73ba6e6..fcc1b79 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -109,6 +109,7 @@ platform_check_image() {
  rt-n56u|\
  rut5xx|\
  sap-g3200u3|\
+ sk-wb8|\
  sl-r7205|\
  tew-691gr|\
  tew-692gr|\
diff --git a/target/linux/ramips/dts/SK-WB8.dts
b/target/linux/ramips/dts/SK-WB8.dts
new file mode 100644
index 000..356a2b9
--- /dev/null
+++ b/target/linux/ramips/dts/SK-WB8.dts
@@ -0,0 +1,121 @@
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+/ {
+ compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+ model = "SamKnows Whitebox 8";
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x400>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,57600";
+ };
+
+ palmbus@1E00 {
+ spi@b00 {
+ status = "okay";
+
+ m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mx25l6405d";
+ reg = <0 0>;
+ linux,modalias = "m25p80";
+ spi-max-frequency = <1000>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x3>;
+ read-only;
+ };
+
+ partition@3 {
+ label = "u-boot-env";
+ reg = <0x3 0x1>;
+ };
+
+ factory: partition@4 {
+ label = "factory";
+ reg = <0x4 0x1>;
+ read-only;
+ };
+
+ partition@5 {
+ label = "firmware";
+ reg = <0x5 0x7b>;
+ };
+
+ };
+ };
+ };
+
+ pcie@1e14 {
+ status = "okay";
+
+ pcie0 {
+ mt76@0,0 {
+ reg = <0x 0 0 0 0>;
+ device_type = "pci";
+ mediatek,mtd-eeprom = < 0x>;
+ mediatek,5ghz = <0>;
+ };
+ };
+
+ pcie1 {
+ mt76@1,0 {
+ reg = <0x 0 0 0 0>;
+ device_type = "pci";
+ mediatek,mtd-eeprom = < 0x8000>;
+ mediatek,2ghz = <0>;
+ };
+ };
+ };
+
+ ethernet@1e10 {
+ mtd-mac-address = < 

[OpenWrt-Devel] [PATCHv5] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread Andrew Yong
PATCHv1:
This patch adds support for the SamKnows version 8.0 Whitebox, built
around the MT7621 platform. 2.4GHz appears to be working, albeit
poorly; 5GHz not working yet.

PATCHv2:
Fixed LED name in DTS.

PATCHv3:
 DTS: Syntax error fixed, LEDs and buttons mapped correctly now
- diag.sh updated to blink WPS LED on boot
- 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
matches SamKnows firmware
- 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware

PATCHv4:
- I didn't commit some fixes in PATCHv3, that's fixed now

PATCHv5:
- Added preinit hook to reset SamKnows Whitebox 8 u-boot boot counter
to prevent soft brick by booting into nonexistent backup partition
- Broke 2.4GHz WiFi but 5GHz sorta works (swapped pcie0/1 in DTS,
needs further investigation, effective txpower is still 0)
- Experimenting on wifi but that'll be a future patch, board boots fine now.

Signed-off-by: Andrew Yong 

diff --git a/package/boot/uboot-envtools/files/ramips
b/package/boot/uboot-envtools/files/ramips
index a759bcc..9ad5974 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -24,7 +24,8 @@ linkits7688d | \
 wsr-600 | \
 wsr-1166 | \
 br6425 | \
-miwifi-nano)
+miwifi-nano | \
+sk-wb8)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1"
;;
 esac
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
b/target/linux/ramips/base-files/etc/board.d/01_leds
index e3b8500..df30085 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -241,6 +241,9 @@ rt-n14u)
set_wifi_led "$board:blue:air"
set_usb_led "$board:blue:usb"
;;
+sk-wb8)
+   set_usb_led "$board:green:usb"
+   ;;
 tiny-ac)
set_wifi_led "$board:orange:wifi"
set_usb_led "$board:green:usb"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
b/target/linux/ramips/base-files/etc/board.d/02_network
index 3c958ae..3e876d2 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -77,6 +77,7 @@ ramips_setup_interfaces()
pbr-m1|\
psg1208|\
sap-g3200u3|\
+   sk-wb8|\
wf-2881|\
whr-300hp2|\
whr-600d|\
@@ -310,6 +311,9 @@ ramips_setup_macs()
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(mtd_get_mac_binary factory 32772)
;;
+   sk-wb8)
+   wan_mac=$(mtd_get_mac_binary factory 57350)
+   ;;
tew-691gr)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 3)
diff --git a/target/linux/ramips/base-files/etc/diag.sh
b/target/linux/ramips/base-files/etc/diag.sh
index bd0ff05..534cc1c 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -76,6 +76,7 @@ get_status_led() {
;;
awapn2403|\
dir-645|\
+   sk-wb8|\
wrh-300cr)
status_led="$board:green:wps"
;;
diff --git a/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
new file mode 100644
index 000..570fe16
--- /dev/null
+++ b/target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# SamKnows Whitebox 8 increments a bootcount variable every  boot and attempts
+# to boot a recovery partition when bootcount > 3. We need to ensure this is
+# reset to 0 every boot
+
+do_bootcount_reset() {
+   . /lib/ramips.sh
+
+   local board=$(ramips_board_name)
+
+   case "$board" in
+   sk-wb8)
+   echo "Board is SamKnows Whitebox 8, resetting
bootcount environment variable..."
+   fw_setenv bootcount 0
+   ;;
+   esac
+
+   return 0
+}
+
+boot_hook_add preinit_main do_bootcount_reset
diff --git a/target/linux/ramips/base-files/lib/ramips.sh
b/target/linux/ramips/base-files/lib/ramips.sh
index 550ec55..5c1715d 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -367,6 +367,9 @@ ramips_board_detect() {
*"RUT5XX")
name="rut5xx"
;;
+   *"SamKnows Whitebox 8")
+   name="sk-wb8"
+   ;;
*"SAP-G3200U3")
name="sap-g3200u3"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 73ba6e6..fcc1b79 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -109,6 +109,7 @@ platform_check_image() {
rt-n56u|\
rut5xx|\
sap-g3200u3|\
+   sk-wb8|\
sl-r7205|\
tew-691gr|\
tew-692gr|\
diff --git 

Re: [OpenWrt-Devel] [RFC] ramips: fix bad patch awake rt305x USB controller

2016-04-25 Thread Martin Blumenstingl
On Mon, Apr 25, 2016 at 3:11 PM, John Crispin  wrote:
> i dont see why this is needed.the patch in the tree does not look broken
> and seems to compile fine.
It seems that Hauke already pushed a similar fix:
https://dev.openwrt.org/changeset/49221/
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A

2016-04-25 Thread Martin Blumenstingl
On Mon, Apr 25, 2016 at 3:00 PM, John Crispin  wrote:
> is this not a bit risky ? normally we try to keep them read-only so that
> users cannot accidentally kill them. is the calib data normally not
> located in the art partition or why do you need to copy it after flashing ?
I think the caldata partition is made writable because of some bug in
ath9k which required HH3A users to manually modify the ath9k caldata.
This is not necessary anymore since my patch (+ Felix' fix on top of
it) is now upstream: [0]

@Ben: one probably has to enable caldata swapping in the .dts.
Then we have to figure out what to do with existing HH3A installations.


Martin

[0] 
https://github.com/torvalds/linux/commit/6fa658fd5ab26a769ca7df7bfdd53c212a0ba852
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread John Crispin


On 25/04/2016 15:32, Andrew Yong wrote:
> Stupid question - what calls these files? I assume I have to call my
> new function from somewhere.
> 
> I'm working on it.

preinit gets called automagically during preinit/boot

> 
> On Mon, Apr 25, 2016 at 9:22 PM, John Crispin  wrote:
>>
>>
>> On 25/04/2016 15:18, Andrew Yong wrote:
>>> I have just found out that I need to perform this additional step on
>>> this SamKnows Whitebox 8 every boot:
>>>
>>> /usr/sbin/fw_setenv bootcount 0
>>>
>>> Where would be an appropriate place to put this? I could add (yet
>>> another) init script in ./target/linux/ramips/base-files/etc/init.d
>>> with START=99 (this is how SamKnows does it) and add a check
>>> against $(ramips_board_name).
>>
>> look at
>> target/linux/ramips/base-files/lib/preinit/04_handle_checksumming and
>> add a target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
>> using a similar pattern please
>>
>> John
>>
>>
>>>
>>> Without this, SamKnows' custom u-boot will attempt to boot from a backup
>>> partition after bootcount exceeds 3 (3 "failed" boots).
>>>
>>> For an end-user without TTL serial access, it would be a soft brick.
>>>
>>> I'm cleaning up the rest of the patches, fixed some minor gpio
>>> mis-definitions and testing out some wifi fixes before I do a v5.
>>>
>>
>>
>>
>>> On 25 Apr 2016 20:58, "John Crispin" >> > wrote:
>>>
>>> Hi,
>>>
>>> few comments inline. apart from those 2 nitpicks the patch looks good.
>>>
>>> John
>>>
>>> On 25/04/2016 03:05, Andrew Yong wrote:
>>> > This patch adds support for the SamKnows version 8.0 Whitebox, built
>>> > around the MT7621 platform. 2.4GHz appears to be working, albeit
>>> > poorly; 5GHz not working yet.
>>> >
>>> >  Fixed in v4:
>>> > - I didn't commit some fixes in PATCHv3, that's fixed now
>>> > - DTS: Syntax error fixed, LEDs and buttons mapped correctly now
>>> > - diag.sh updated to blink WPS LED on boot
>>> > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
>>> > matches SamKnows firmware
>>> > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
>>> >
>>> > Initial support for SamKnows SK-WB8
>>> >
>>> > Signed-off-by: Andrew Yong >
>>> >
>>> > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
>>> > b/target/linux/ramips/base-files/etc/board.d/01_leds
>>> > index e3b8500..df30085 100755
>>> > --- a/target/linux/ramips/base-files/etc/board.d/01_leds
>>> > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
>>> > @@ -241,6 +241,9 @@ rt-n14u)
>>> > set_wifi_led "$board:blue:air"
>>> > set_usb_led "$board:blue:usb"
>>> > ;;
>>> > +sk-wb8)
>>> > +   set_usb_led "$board:green:usb"
>>> > +   ;;
>>> >  tiny-ac)
>>> > set_wifi_led "$board:orange:wifi"
>>> > set_usb_led "$board:green:usb"
>>> > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
>>> > b/target/linux/ramips/base-files/etc/board.d/02_network
>>> > index 3c958ae..3e876d2 100755
>>> > --- a/target/linux/ramips/base-files/etc/board.d/02_network
>>> > +++ b/target/linux/ramips/base-files/etc/board.d/02_network
>>> > @@ -77,6 +77,7 @@ ramips_setup_interfaces()
>>> > pbr-m1|\
>>> > psg1208|\
>>> > sap-g3200u3|\
>>> > +   sk-wb8|\
>>> > wf-2881|\
>>> > whr-300hp2|\
>>> > whr-600d|\
>>> > @@ -310,6 +311,9 @@ ramips_setup_macs()
>>> > lan_mac=$(macaddr_setbit_la "$lan_mac")
>>> > wan_mac=$(mtd_get_mac_binary factory 32772)
>>> > ;;
>>> > +   sk-wb8)
>>> > +   wan_mac=$(mtd_get_mac_binary factory 57350)
>>> > +   ;;
>>> > tew-691gr)
>>> > lan_mac=$(cat /sys/class/net/eth0/address)
>>> > wan_mac=$(macaddr_add "$lan_mac" 3)
>>> > diff --git a/target/linux/ramips/base-files/etc/diag.sh
>>> > b/target/linux/ramips/base-files/etc/diag.sh
>>> > index bd0ff05..a941fca 100644
>>> > --- a/target/linux/ramips/base-files/etc/diag.sh
>>> > +++ b/target/linux/ramips/base-files/etc/diag.sh
>>> > @@ -76,7 +76,8 @@ get_status_led() {
>>> > ;;
>>> > awapn2403|\
>>> > dir-645|\
>>> > -   wrh-300cr)
>>> > +   wrh-300cr|\
>>> > +   sk-wb8)
>>>
>>> alphabetic ordering please
>>>
>>> > status_led="$board:green:wps"
>>> > ;;
>>> > cf-wr800n|\
>>> > diff --git a/target/linux/ramips/base-files/lib/ramips.sh
>>> > b/target/linux/ramips/base-files/lib/ramips.sh
>>> > index 550ec55..4f1bd41 100755
>>> > --- 

Re: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread Andrew Yong
Stupid question - what calls these files? I assume I have to call my
new function from somewhere.

I'm working on it.

On Mon, Apr 25, 2016 at 9:22 PM, John Crispin  wrote:
>
>
> On 25/04/2016 15:18, Andrew Yong wrote:
>> I have just found out that I need to perform this additional step on
>> this SamKnows Whitebox 8 every boot:
>>
>> /usr/sbin/fw_setenv bootcount 0
>>
>> Where would be an appropriate place to put this? I could add (yet
>> another) init script in ./target/linux/ramips/base-files/etc/init.d
>> with START=99 (this is how SamKnows does it) and add a check
>> against $(ramips_board_name).
>
> look at
> target/linux/ramips/base-files/lib/preinit/04_handle_checksumming and
> add a target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
> using a similar pattern please
>
> John
>
>
>>
>> Without this, SamKnows' custom u-boot will attempt to boot from a backup
>> partition after bootcount exceeds 3 (3 "failed" boots).
>>
>> For an end-user without TTL serial access, it would be a soft brick.
>>
>> I'm cleaning up the rest of the patches, fixed some minor gpio
>> mis-definitions and testing out some wifi fixes before I do a v5.
>>
>
>
>
>> On 25 Apr 2016 20:58, "John Crispin" > > wrote:
>>
>> Hi,
>>
>> few comments inline. apart from those 2 nitpicks the patch looks good.
>>
>> John
>>
>> On 25/04/2016 03:05, Andrew Yong wrote:
>> > This patch adds support for the SamKnows version 8.0 Whitebox, built
>> > around the MT7621 platform. 2.4GHz appears to be working, albeit
>> > poorly; 5GHz not working yet.
>> >
>> >  Fixed in v4:
>> > - I didn't commit some fixes in PATCHv3, that's fixed now
>> > - DTS: Syntax error fixed, LEDs and buttons mapped correctly now
>> > - diag.sh updated to blink WPS LED on boot
>> > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
>> > matches SamKnows firmware
>> > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
>> >
>> > Initial support for SamKnows SK-WB8
>> >
>> > Signed-off-by: Andrew Yong >
>> >
>> > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
>> > b/target/linux/ramips/base-files/etc/board.d/01_leds
>> > index e3b8500..df30085 100755
>> > --- a/target/linux/ramips/base-files/etc/board.d/01_leds
>> > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
>> > @@ -241,6 +241,9 @@ rt-n14u)
>> > set_wifi_led "$board:blue:air"
>> > set_usb_led "$board:blue:usb"
>> > ;;
>> > +sk-wb8)
>> > +   set_usb_led "$board:green:usb"
>> > +   ;;
>> >  tiny-ac)
>> > set_wifi_led "$board:orange:wifi"
>> > set_usb_led "$board:green:usb"
>> > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
>> > b/target/linux/ramips/base-files/etc/board.d/02_network
>> > index 3c958ae..3e876d2 100755
>> > --- a/target/linux/ramips/base-files/etc/board.d/02_network
>> > +++ b/target/linux/ramips/base-files/etc/board.d/02_network
>> > @@ -77,6 +77,7 @@ ramips_setup_interfaces()
>> > pbr-m1|\
>> > psg1208|\
>> > sap-g3200u3|\
>> > +   sk-wb8|\
>> > wf-2881|\
>> > whr-300hp2|\
>> > whr-600d|\
>> > @@ -310,6 +311,9 @@ ramips_setup_macs()
>> > lan_mac=$(macaddr_setbit_la "$lan_mac")
>> > wan_mac=$(mtd_get_mac_binary factory 32772)
>> > ;;
>> > +   sk-wb8)
>> > +   wan_mac=$(mtd_get_mac_binary factory 57350)
>> > +   ;;
>> > tew-691gr)
>> > lan_mac=$(cat /sys/class/net/eth0/address)
>> > wan_mac=$(macaddr_add "$lan_mac" 3)
>> > diff --git a/target/linux/ramips/base-files/etc/diag.sh
>> > b/target/linux/ramips/base-files/etc/diag.sh
>> > index bd0ff05..a941fca 100644
>> > --- a/target/linux/ramips/base-files/etc/diag.sh
>> > +++ b/target/linux/ramips/base-files/etc/diag.sh
>> > @@ -76,7 +76,8 @@ get_status_led() {
>> > ;;
>> > awapn2403|\
>> > dir-645|\
>> > -   wrh-300cr)
>> > +   wrh-300cr|\
>> > +   sk-wb8)
>>
>> alphabetic ordering please
>>
>> > status_led="$board:green:wps"
>> > ;;
>> > cf-wr800n|\
>> > diff --git a/target/linux/ramips/base-files/lib/ramips.sh
>> > b/target/linux/ramips/base-files/lib/ramips.sh
>> > index 550ec55..4f1bd41 100755
>> > --- a/target/linux/ramips/base-files/lib/ramips.sh
>> > +++ b/target/linux/ramips/base-files/lib/ramips.sh
>> > @@ -370,6 +370,9 @@ ramips_board_detect() {
>> > *"SAP-G3200U3")
>> > name="sap-g3200u3"
>> >   

Re: [OpenWrt-Devel] [PATCH] Hostapd: Add support for multiple RADIUS servers

2016-04-25 Thread John Crispin


On 21/04/2016 08:39, amine.ahd wrote:
> Hostapd allows more than one RADIUS server to be added in case the main 
> server goes down.
> This allows netifd to load a list of RADIUS servers from the wireless confid 
> file and add them to hostapd.
> The format of the list in the config file is as follow:
> list auth_servers ...
> list auth_ports ...
> list auth_secrets ...
> 

keeping 3 lists in sync is not a good solution. please use a single list
and a notation such as secret@host:port

John

> Signed-off-by: Amine Hamed 
> ---
>  .../network/services/hostapd/files/netifd.sh   | 28 
> ++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/package/network/services/hostapd/files/netifd.sh 
> b/package/network/services/hostapd/files/netifd.sh
> index 417cc42..ed772ff 100644
> --- a/package/network/services/hostapd/files/netifd.sh
> +++ b/package/network/services/hostapd/files/netifd.sh
> @@ -125,6 +125,10 @@ hostapd_common_add_bss_config() {
>   config_add_string auth_secret
>   config_add_int 'auth_port:port' 'port:port'
>  
> + config_add_array auth_servers
> + config_add_array auth_secrets
> + config_add_array auth_ports
> + 
>   config_add_string acct_server
>   config_add_string acct_secret
>   config_add_int acct_port
> @@ -269,10 +273,34 @@ hostapd_set_bss_options() {
>  
>   set_default vlan_naming 1
>  
> + # leave the default option for legacy compatibility
>   append bss_conf "auth_server_addr=$auth_server" "$N"
>   append bss_conf "auth_server_port=$auth_port" "$N"
>   append bss_conf 
> "auth_server_shared_secret=$auth_secret" "$N"
>  
> + # List of fallback RADIUS servers
> + json_select "auth_servers"
> + local Index="1"
> + while json_get_type Var $Index && [ "$Var" = string ]; 
> do
> + json_get_var Var "$((Index))"
> + append bss_conf "auth_server_addr=$Var" "$N"
> + json_select ".."
> + 
> + json_select "auth_ports"
> + json_get_var Var "$((Index))"
> + set_default Var 1812
> + append bss_conf "auth_server_port=$Var" "$N"
> + json_select ".."
> + 
> + json_select "auth_secrets"
> + json_get_var Var "$((Index++))"
> + append bss_conf 
> "auth_server_shared_secret=$Var" "$N"
> + json_select ".."
> + 
> + json_select "auth_servers"
> + done
> + json_select ".."
> + 
>   [ -n "$acct_server" ] && {
>   append bss_conf "acct_server_addr=$acct_server" 
> "$N"
>   append bss_conf "acct_server_port=$acct_port" 
> "$N"
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] lantiq: use dwc2 by default on BTHOMEHUBV3A and WBMR

2016-04-25 Thread John Crispin
yes please resend a new patch with all boards getting switched

John

On 25/04/2016 12:26, Ben Mulvihill wrote:
> The dwc2 USB driver now works on Lantiq ar9, but the
> default is still ltq-hcd-ar9. This patch switches to
> dwc2 by default, on the two boards I can test, namely
> BTHOMEHUBV3A and WBMR. John, if you are happy with the
> principle of switching would you prefer me to send a patch
> covering all the ar9 boards? I presume that if one works
> then the others should too.
> 
> Thanks,
> 
> Ben
> 
> Signed-off-by: Ben Mulvihill 
> ---
> diff -uprN a/target/linux/lantiq/xway/profiles/bt.mk 
> b/target/linux/lantiq/xway/profiles/bt.mk
> --- a/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 11:53:27.0 
> +0200
> +++ b/target/linux/lantiq/xway/profiles/bt.mk 2016-04-25 11:56:42.0 
> +0200
> @@ -18,7 +18,7 @@ $(eval $(call Profile,BTHOMEHUBV2B))
>  
>  define Profile/BTHOMEHUBV3A
>NAME:=BT Home Hub 3A
> -  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
> +  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
>   kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
>   kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
>   kmod-ltq-deu-ar9 \
> diff -uprN a/target/linux/lantiq/xway/profiles/buffalo.mk 
> b/target/linux/lantiq/xway/profiles/buffalo.mk
> --- a/target/linux/lantiq/xway/profiles/buffalo.mk2016-04-25 
> 11:53:27.0 +0200
> +++ b/target/linux/lantiq/xway/profiles/buffalo.mk2016-04-25 
> 11:57:25.0 +0200
> @@ -1,6 +1,6 @@
>  define Profile/WBMRA
>NAME:=Buffalo WBMR-HP-G300H (A) - WBMR
> -  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
> +  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
>   kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
>   kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
>   ltq-adsl-app ppp-mod-pppoa \
> @@ -12,7 +12,7 @@ $(eval $(call Profile,WBMRA))
>  
>  define Profile/WBMRB
>NAME:=Buffalo WBMR-HP-G300H (B) - WBMR
> -  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
> +  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
>   kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
>   kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
>   ltq-adsl-app ppp-mod-pppoa \
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread John Crispin


On 25/04/2016 15:18, Andrew Yong wrote:
> I have just found out that I need to perform this additional step on
> this SamKnows Whitebox 8 every boot:
> 
> /usr/sbin/fw_setenv bootcount 0
> 
> Where would be an appropriate place to put this? I could add (yet
> another) init script in ./target/linux/ramips/base-files/etc/init.d
> with START=99 (this is how SamKnows does it) and add a check
> against $(ramips_board_name).

look at
target/linux/ramips/base-files/lib/preinit/04_handle_checksumming and
add a target/linux/ramips/base-files/lib/preinit/04_handle_bootcount
using a similar pattern please

John


> 
> Without this, SamKnows' custom u-boot will attempt to boot from a backup
> partition after bootcount exceeds 3 (3 "failed" boots).
> 
> For an end-user without TTL serial access, it would be a soft brick.
> 
> I'm cleaning up the rest of the patches, fixed some minor gpio
> mis-definitions and testing out some wifi fixes before I do a v5.
> 



> On 25 Apr 2016 20:58, "John Crispin"  > wrote:
> 
> Hi,
> 
> few comments inline. apart from those 2 nitpicks the patch looks good.
> 
> John
> 
> On 25/04/2016 03:05, Andrew Yong wrote:
> > This patch adds support for the SamKnows version 8.0 Whitebox, built
> > around the MT7621 platform. 2.4GHz appears to be working, albeit
> > poorly; 5GHz not working yet.
> >
> >  Fixed in v4:
> > - I didn't commit some fixes in PATCHv3, that's fixed now
> > - DTS: Syntax error fixed, LEDs and buttons mapped correctly now
> > - diag.sh updated to blink WPS LED on boot
> > - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
> > matches SamKnows firmware
> > - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
> >
> > Initial support for SamKnows SK-WB8
> >
> > Signed-off-by: Andrew Yong >
> >
> > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
> > b/target/linux/ramips/base-files/etc/board.d/01_leds
> > index e3b8500..df30085 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> > @@ -241,6 +241,9 @@ rt-n14u)
> > set_wifi_led "$board:blue:air"
> > set_usb_led "$board:blue:usb"
> > ;;
> > +sk-wb8)
> > +   set_usb_led "$board:green:usb"
> > +   ;;
> >  tiny-ac)
> > set_wifi_led "$board:orange:wifi"
> > set_usb_led "$board:green:usb"
> > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> > b/target/linux/ramips/base-files/etc/board.d/02_network
> > index 3c958ae..3e876d2 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/02_network
> > +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> > @@ -77,6 +77,7 @@ ramips_setup_interfaces()
> > pbr-m1|\
> > psg1208|\
> > sap-g3200u3|\
> > +   sk-wb8|\
> > wf-2881|\
> > whr-300hp2|\
> > whr-600d|\
> > @@ -310,6 +311,9 @@ ramips_setup_macs()
> > lan_mac=$(macaddr_setbit_la "$lan_mac")
> > wan_mac=$(mtd_get_mac_binary factory 32772)
> > ;;
> > +   sk-wb8)
> > +   wan_mac=$(mtd_get_mac_binary factory 57350)
> > +   ;;
> > tew-691gr)
> > lan_mac=$(cat /sys/class/net/eth0/address)
> > wan_mac=$(macaddr_add "$lan_mac" 3)
> > diff --git a/target/linux/ramips/base-files/etc/diag.sh
> > b/target/linux/ramips/base-files/etc/diag.sh
> > index bd0ff05..a941fca 100644
> > --- a/target/linux/ramips/base-files/etc/diag.sh
> > +++ b/target/linux/ramips/base-files/etc/diag.sh
> > @@ -76,7 +76,8 @@ get_status_led() {
> > ;;
> > awapn2403|\
> > dir-645|\
> > -   wrh-300cr)
> > +   wrh-300cr|\
> > +   sk-wb8)
> 
> alphabetic ordering please
> 
> > status_led="$board:green:wps"
> > ;;
> > cf-wr800n|\
> > diff --git a/target/linux/ramips/base-files/lib/ramips.sh
> > b/target/linux/ramips/base-files/lib/ramips.sh
> > index 550ec55..4f1bd41 100755
> > --- a/target/linux/ramips/base-files/lib/ramips.sh
> > +++ b/target/linux/ramips/base-files/lib/ramips.sh
> > @@ -370,6 +370,9 @@ ramips_board_detect() {
> > *"SAP-G3200U3")
> > name="sap-g3200u3"
> > ;;
> > +   *"SamKnows Whitebox 8")
> > +   name="sk-wb8"
> > +   ;;
> 
> alphabetic ordering please
> 
> > *"SL-R7205"*)
> > name="sl-r7205"
> > ;;
> > diff --git 

Re: [OpenWrt-Devel] [PATCHv4] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread Andrew Yong
I have just found out that I need to perform this additional step on this
SamKnows Whitebox 8 every boot:

/usr/sbin/fw_setenv bootcount 0

Where would be an appropriate place to put this? I could add (yet another)
init script in ./target/linux/ramips/base-files/etc/init.d with START=99
(this is how SamKnows does it) and add a check against $(ramips_board_name).
Without this, SamKnows' custom u-boot will attempt to boot from a backup
partition after bootcount exceeds 3 (3 "failed" boots).

For an end-user without TTL serial access, it would be a soft brick.

I'm cleaning up the rest of the patches, fixed some minor gpio
mis-definitions and testing out some wifi fixes before I do a v5.
On 25 Apr 2016 20:58, "John Crispin"  wrote:

Hi,

few comments inline. apart from those 2 nitpicks the patch looks good.

John

On 25/04/2016 03:05, Andrew Yong wrote:
> This patch adds support for the SamKnows version 8.0 Whitebox, built
> around the MT7621 platform. 2.4GHz appears to be working, albeit
> poorly; 5GHz not working yet.
>
>  Fixed in v4:
> - I didn't commit some fixes in PATCHv3, that's fixed now
> - DTS: Syntax error fixed, LEDs and buttons mapped correctly now
> - diag.sh updated to blink WPS LED on boot
> - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
> matches SamKnows firmware
> - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
>
> Initial support for SamKnows SK-WB8
>
> Signed-off-by: Andrew Yong 
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> index e3b8500..df30085 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -241,6 +241,9 @@ rt-n14u)
> set_wifi_led "$board:blue:air"
> set_usb_led "$board:blue:usb"
> ;;
> +sk-wb8)
> +   set_usb_led "$board:green:usb"
> +   ;;
>  tiny-ac)
> set_wifi_led "$board:orange:wifi"
> set_usb_led "$board:green:usb"
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index 3c958ae..3e876d2 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -77,6 +77,7 @@ ramips_setup_interfaces()
> pbr-m1|\
> psg1208|\
> sap-g3200u3|\
> +   sk-wb8|\
> wf-2881|\
> whr-300hp2|\
> whr-600d|\
> @@ -310,6 +311,9 @@ ramips_setup_macs()
> lan_mac=$(macaddr_setbit_la "$lan_mac")
> wan_mac=$(mtd_get_mac_binary factory 32772)
> ;;
> +   sk-wb8)
> +   wan_mac=$(mtd_get_mac_binary factory 57350)
> +   ;;
> tew-691gr)
> lan_mac=$(cat /sys/class/net/eth0/address)
> wan_mac=$(macaddr_add "$lan_mac" 3)
> diff --git a/target/linux/ramips/base-files/etc/diag.sh
> b/target/linux/ramips/base-files/etc/diag.sh
> index bd0ff05..a941fca 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -76,7 +76,8 @@ get_status_led() {
> ;;
> awapn2403|\
> dir-645|\
> -   wrh-300cr)
> +   wrh-300cr|\
> +   sk-wb8)

alphabetic ordering please

> status_led="$board:green:wps"
> ;;
> cf-wr800n|\
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 550ec55..4f1bd41 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -370,6 +370,9 @@ ramips_board_detect() {
> *"SAP-G3200U3")
> name="sap-g3200u3"
> ;;
> +   *"SamKnows Whitebox 8")
> +   name="sk-wb8"
> +   ;;

alphabetic ordering please

> *"SL-R7205"*)
> name="sl-r7205"
> ;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index 73ba6e6..fcc1b79 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -109,6 +109,7 @@ platform_check_image() {
> rt-n56u|\
> rut5xx|\
> sap-g3200u3|\
> +   sk-wb8|\
> sl-r7205|\
> tew-691gr|\
> tew-692gr|\
> diff --git a/target/linux/ramips/dts/SK-WB8.dts
> b/target/linux/ramips/dts/SK-WB8.dts
> new file mode 100644
> index 000..3292194
> --- /dev/null
> +++ b/target/linux/ramips/dts/SK-WB8.dts
> @@ -0,0 +1,122 @@
> +/dts-v1/;
> +
> +#include "mt7621.dtsi"
> +
> +/ {
> +   compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
> +   model = "SamKnows SK-WB8";
> +
> +   memory@0 {
> +   device_type = "memory";
> +   

Re: [OpenWrt-Devel] [PATCH] [scripts] avoid hard-coded path in sha-bang

2016-04-25 Thread John Crispin
please avoid using slang words and add "scripts:" as a subject prefix



On 22/04/2016 11:06, Iblis Lin wrote:
> Signed-off-by: Iblis Lin 
> ---
>  scripts/brcmImage.pl  | 2 +-
>  scripts/deptest.sh| 2 +-
>  scripts/feeds | 2 +-
>  scripts/mkits.sh  | 2 +-
>  scripts/pad_image | 2 +-
>  scripts/redboot-script.pl | 2 +-
>  scripts/remote-gdb| 2 +-
>  7 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/scripts/brcmImage.pl b/scripts/brcmImage.pl
> index 9a3acb4..60a59f2 100755
> --- a/scripts/brcmImage.pl
> +++ b/scripts/brcmImage.pl
> @@ -1,4 +1,4 @@
> -#!/usr/bin/perl
> +#!/usr/bin/env perl
>  #
>  #Copyright (C) 2009  Henk Vergonet 
>  #
> diff --git a/scripts/deptest.sh b/scripts/deptest.sh
> index 047a0ce..03da9f5 100755
> --- a/scripts/deptest.sh
> +++ b/scripts/deptest.sh
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/usr/bin/env bash
>  #
>  # Automated OpenWrt package dependency checker
>  #
> diff --git a/scripts/feeds b/scripts/feeds
> index 79b5284..2b88eb8 100755
> --- a/scripts/feeds
> +++ b/scripts/feeds
> @@ -1,4 +1,4 @@
> -#!/usr/bin/perl
> +#!/usr/bin/env perl
>  use Getopt::Std;
>  use FindBin;
>  use Cwd;
> diff --git a/scripts/mkits.sh b/scripts/mkits.sh
> index 6b5100e..8857996 100755
> --- a/scripts/mkits.sh
> +++ b/scripts/mkits.sh
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/usr/bin/env bash
>  #
>  # Licensed under the terms of the GNU GPL License version 2 or later.
>  #
> diff --git a/scripts/pad_image b/scripts/pad_image
> index 14f1499..b1941a2 100755
> --- a/scripts/pad_image
> +++ b/scripts/pad_image
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/usr/bin/env bash
>  
>  function usage {
>echo "Usage: prepare_image image_type kernel_image rootfs_image 
> header_size"
> diff --git a/scripts/redboot-script.pl b/scripts/redboot-script.pl
> index 123ebe3..e2d1264 100755
> --- a/scripts/redboot-script.pl
> +++ b/scripts/redboot-script.pl
> @@ -1,4 +1,4 @@
> -#!/usr/bin/perl
> +#!/usr/bin/env perl
>  #
>  # Script for generating redboot configs, based on brcmImage.pl
>  #
> diff --git a/scripts/remote-gdb b/scripts/remote-gdb
> index cd59033..5230663 100755
> --- a/scripts/remote-gdb
> +++ b/scripts/remote-gdb
> @@ -1,4 +1,4 @@
> -#!/usr/bin/perl
> +#!/usr/bin/env perl
>  
>  use strict;
>  use warnings;
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] lantiq: Fix status LED on TDW89X0 after boot is completed.

2016-04-25 Thread John Crispin


On 22/04/2016 09:13, Vittorio G (VittGam) wrote:
> On 22/04/2016 08:34:41 CEST, Mathias Kresin wrote:
>> Am 21.04.2016 um 23:43 schrieb Vittorio Gambaletta (VittGam):
>>> After recent patches, the status LED on this router would stay
>>> switched off after boot is completed. A switched off status LED
>>> often indicates a boot failure (eg. kernel panic), so fix this and
>>> get back to the previous behaviour.
>>
>> NAK
>>
>> This change was intentional. Personally, I don't like the idea of
>> using the WPS led as permanent (running) status led. I've never tried
>> it, but I may be possible to use WPS with hostapd and show the status
>> of the WPS action using the WPS led. I like to prevent such a double
>> use of leds.
> 
> Well, personally I think that the WPS LED on this router should be used
> as a "permanent" system status LED, since the power LED is hardwired to
> the power supply, and there is no other status LED to be used. Since the
> WPS LED is unused by default on OpenWrt, I think it's better to use it
> as full system status LED, to avoid "dying" visually on first boot when
> no DSL or Wi-Fi is configured. This is the same behaviour we have on the
> TP-LINK MR3020 for example: the System LED in OpenWrt (which stays on
> after boot) corresponds to the WPS LED as it was used in the original
> firmware.
> 
> Also, if things haven't changed, you need to write custom scripts to use
> the WPS LED to indicate WPS status. And if you do customize your OpenWrt
> install with such scripts, and you want the LED to default to off
> instead of on when WPS is not being used, you can just add a section for
> the WPS LED in /etc/config/system with "option trigger 'none'" and
> "option default '0'" to have it switch off after boot is finished.
> 
>> The basic idea was to let the WPS led blink as long as the device
>> boots and switch it off at the time the boot has finished. Which means
>> an unsuccessful boot is indicated by a still blinking WPS led.
> 
> Nope. If there is a kernel panic, all the GPIO LEDs will stop blinking
> and get switched off. At least when it happened to me it was like this,
> but it was some years ago so I might not remember well (or maybe things
> have changed and the kernel does not stop hardware-assisted LED blinking
> on panic

i understand the problem, but the WPS led is for WPS and should be left
free for the WPS feature eventually. so nack on this one i am afraid.

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


Re: [OpenWrt-Devel] [RFC] ramips: fix bad patch awake rt305x USB controller

2016-04-25 Thread John Crispin
Hi,

i dont see why this is needed.the patch in the tree does not look broken
and seems to compile fine.

John

On 23/04/2016 05:55, Сергей Василюгин wrote:
> Sorry, fix bad patch (ticket #22248)
> 
> Signed-Off-By: Serge Vasilugin 
> 
> diff --git 
> a/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch 
> b/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch
> index 9608f6f..2ba462d 100644
> --- a/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch
> +++ b/target/linux/ramips/patches-4.4/0069-awake-rt305x-dwc2-controller.patch
> @@ -1,15 +1,15 @@
>  --- a/drivers/usb/dwc2/platform.c
>  +++ b/drivers/usb/dwc2/platform.c
>  @@ -375,6 +375,12 @@ static int dwc2_driver_probe(struct plat
> - dev_dbg(>dev, "mapped PA %08lx to VA %p\n",
> - (unsigned long)res->start, hsotg->regs);
> + dev_dbg(>dev, "mapped PA %08lx to VA %p\n",
> + (unsigned long)res->start, hsotg->regs);
>   
> -+ /* Enable USB port before any regs access */
> -+ if(dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) {
> -+ dwc2_writel(0x00, hsotg->regs + PCGCTL);
> -+ /* TODO: mdelay(25) here? vendor driver don't use it */
> -+ }
> ++/* Enable USB port before any regs access */
> ++if(dwc2_readl(hsotg->regs + PCGCTL) & 0x0f) {
> ++dwc2_writel(0x00, hsotg->regs + PCGCTL);
> ++/* TODO: mdelay(25) here? vendor driver don't use it */
> ++}
>  +
> - hsotg->dr_mode = usb_get_dr_mode(>dev);
> - if (IS_ENABLED(CONFIG_USB_DWC2_HOST) &&
> - hsotg->dr_mode != USB_DR_MODE_HOST) {
> + hsotg->dr_mode = usb_get_dr_mode(>dev);
> + if (IS_ENABLED(CONFIG_USB_DWC2_HOST) &&
> + hsotg->dr_mode != USB_DR_MODE_HOST) {
> 
> ---
> serge
> ___
> 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 01/??] [tools] make-ext4fs glibc >= 2.23 compat

2016-04-25 Thread Jo-Philipp Wich
Hi!

Thanks for the patch, I fixed the include issue directly in Git, so this
patch can be dropped and make-ext4fs should be updated in tools/ to a
newer version instead.

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


Re: [OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat

2016-04-25 Thread John Crispin


On 25/04/2016 11:41, Weedy wrote:
> With the update to glibc 2.23, sys/types.h doesn't inherit
> sys/sysmacros.h anymore. We need to include it manually.
> 
> 
> --- /dev/null 2016-04-18 05:53:30.273258717 -0400
> +++ tools/make-ext4fs/patches/125-glibc-2.23-sysmacros.patch  2016-04-24
> 14:50:33.932873523 -0400
> @@ -0,0 +1,10 @@
> +--- a/ext4_utils.h   2016-04-24 14:47:50.207888150 -0400
>  b/ext4_utils.h   2016-04-24 14:48:11.761438966 -0400
> +@@ -30,6 +30,7 @@
> + #include 
> +
> + #include 
> ++#include 
> + #include 
> + #include 
> + #include 
> 
> 
> This is a test for my mail client.
> Please tell me if I need to change anything.
> I have patched the rest of the host packages this update broke.
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 

patchwork failed to pick this up i am afraid...
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] lantiq: remove read-only flag on two partitions on BTHOMEHUBV3A

2016-04-25 Thread John Crispin


On 24/04/2016 21:29, Ben Mulvihill wrote:
> Remove read-only flag on two partitions on BTHOMEHUBV3A:
>   uboot-config - otherwise fw_setenv command cannot be used.
>   ath9k-cal- so that ath9k calibration data can be copied
>  to the partition on a newly installed board.
>  
> Signed-off-by: Ben Mulvihill 
> ---
> --- a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts2016-04-24 
> 17:30:44.117072962 +0200
> +++ b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts2016-04-24 
> 17:30:08.483732762 +0200
> @@ -61,12 +61,10 @@
>   partition@64000 {
>   label = "uboot-config";
>   reg = <0x64000 0x004000>;
> - read-only;
>   };
>   ath9k_cal: partition@68000 {
>   label = "art-copy";
>   reg = <0x68000 0x004000>;
> - read-only;
>   };

is this not a bit risky ? normally we try to keep them read-only so that
users cannot accidentally kill them. is the calib data normally not
located in the art partition or why do you need to copy it after flashing ?



>   partition@6c000 {
>   label = "kernel";
> ___
> 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] [PATCHv4] ramips: add support for SamKnows SK-WB8

2016-04-25 Thread John Crispin
Hi,

few comments inline. apart from those 2 nitpicks the patch looks good.

John

On 25/04/2016 03:05, Andrew Yong wrote:
> This patch adds support for the SamKnows version 8.0 Whitebox, built
> around the MT7621 platform. 2.4GHz appears to be working, albeit
> poorly; 5GHz not working yet.
> 
>  Fixed in v4:
> - I didn't commit some fixes in PATCHv3, that's fixed now
> - DTS: Syntax error fixed, LEDs and buttons mapped correctly now
> - diag.sh updated to blink WPS LED on boot
> - 2.4GHz wifi is working but txpower is stuck at 0, DTS ROM offset
> matches SamKnows firmware
> - 5GHz wifi not working, DTS pcie1,0 matches SamKnows firmware
> 
> Initial support for SamKnows SK-WB8
> 
> Signed-off-by: Andrew Yong 
> 
> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> index e3b8500..df30085 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -241,6 +241,9 @@ rt-n14u)
> set_wifi_led "$board:blue:air"
> set_usb_led "$board:blue:usb"
> ;;
> +sk-wb8)
> +   set_usb_led "$board:green:usb"
> +   ;;
>  tiny-ac)
> set_wifi_led "$board:orange:wifi"
> set_usb_led "$board:green:usb"
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index 3c958ae..3e876d2 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -77,6 +77,7 @@ ramips_setup_interfaces()
> pbr-m1|\
> psg1208|\
> sap-g3200u3|\
> +   sk-wb8|\
> wf-2881|\
> whr-300hp2|\
> whr-600d|\
> @@ -310,6 +311,9 @@ ramips_setup_macs()
> lan_mac=$(macaddr_setbit_la "$lan_mac")
> wan_mac=$(mtd_get_mac_binary factory 32772)
> ;;
> +   sk-wb8)
> +   wan_mac=$(mtd_get_mac_binary factory 57350)
> +   ;;
> tew-691gr)
> lan_mac=$(cat /sys/class/net/eth0/address)
> wan_mac=$(macaddr_add "$lan_mac" 3)
> diff --git a/target/linux/ramips/base-files/etc/diag.sh
> b/target/linux/ramips/base-files/etc/diag.sh
> index bd0ff05..a941fca 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -76,7 +76,8 @@ get_status_led() {
> ;;
> awapn2403|\
> dir-645|\
> -   wrh-300cr)
> +   wrh-300cr|\
> +   sk-wb8)

alphabetic ordering please

> status_led="$board:green:wps"
> ;;
> cf-wr800n|\
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 550ec55..4f1bd41 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -370,6 +370,9 @@ ramips_board_detect() {
> *"SAP-G3200U3")
> name="sap-g3200u3"
> ;;
> +   *"SamKnows Whitebox 8")
> +   name="sk-wb8"
> +   ;;

alphabetic ordering please

> *"SL-R7205"*)
> name="sl-r7205"
> ;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index 73ba6e6..fcc1b79 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -109,6 +109,7 @@ platform_check_image() {
> rt-n56u|\
> rut5xx|\
> sap-g3200u3|\
> +   sk-wb8|\
> sl-r7205|\
> tew-691gr|\
> tew-692gr|\
> diff --git a/target/linux/ramips/dts/SK-WB8.dts
> b/target/linux/ramips/dts/SK-WB8.dts
> new file mode 100644
> index 000..3292194
> --- /dev/null
> +++ b/target/linux/ramips/dts/SK-WB8.dts
> @@ -0,0 +1,122 @@
> +/dts-v1/;
> +
> +#include "mt7621.dtsi"
> +
> +/ {
> +   compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
> +   model = "SamKnows SK-WB8";
> +
> +   memory@0 {
> +   device_type = "memory";
> +   reg = <0x0 0x400>;
> +   };
> +
> +   chosen {
> +   bootargs = "console=ttyS0,57600";
> +   };
> +
> +   palmbus@1E00 {
> +   spi@b00 {
> +   status = "okay";
> +
> +   m25p80@0 {
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +   compatible = "mx25l6405d";
> +   reg = <0 0>;
> +   linux,modalias = "m25p80";
> +   spi-max-frequency = <1000>;
> +
> +   partition@0 {
> +   label = "u-boot";
> +  

[OpenWrt-Devel] [PATCH] lantiq: use dwc2 by default on BTHOMEHUBV3A and WBMR

2016-04-25 Thread Ben Mulvihill
The dwc2 USB driver now works on Lantiq ar9, but the
default is still ltq-hcd-ar9. This patch switches to
dwc2 by default, on the two boards I can test, namely
BTHOMEHUBV3A and WBMR. John, if you are happy with the
principle of switching would you prefer me to send a patch
covering all the ar9 boards? I presume that if one works
then the others should too.

Thanks,

Ben

Signed-off-by: Ben Mulvihill 
---
diff -uprN a/target/linux/lantiq/xway/profiles/bt.mk 
b/target/linux/lantiq/xway/profiles/bt.mk
--- a/target/linux/lantiq/xway/profiles/bt.mk   2016-04-25 11:53:27.0 
+0200
+++ b/target/linux/lantiq/xway/profiles/bt.mk   2016-04-25 11:56:42.0 
+0200
@@ -18,7 +18,7 @@ $(eval $(call Profile,BTHOMEHUBV2B))
 
 define Profile/BTHOMEHUBV3A
   NAME:=BT Home Hub 3A
-  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
kmod-ltq-deu-ar9 \
diff -uprN a/target/linux/lantiq/xway/profiles/buffalo.mk 
b/target/linux/lantiq/xway/profiles/buffalo.mk
--- a/target/linux/lantiq/xway/profiles/buffalo.mk  2016-04-25 
11:53:27.0 +0200
+++ b/target/linux/lantiq/xway/profiles/buffalo.mk  2016-04-25 
11:57:25.0 +0200
@@ -1,6 +1,6 @@
 define Profile/WBMRA
   NAME:=Buffalo WBMR-HP-G300H (A) - WBMR
-  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
ltq-adsl-app ppp-mod-pppoa \
@@ -12,7 +12,7 @@ $(eval $(call Profile,WBMRA))
 
 define Profile/WBMRB
   NAME:=Buffalo WBMR-HP-G300H (B) - WBMR
-  PACKAGES:=kmod-ltq-hcd-ar9 kmod-ledtrig-usbdev \
+  PACKAGES:=kmod-usb-dwc2 kmod-ledtrig-usbdev \
kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
ltq-adsl-app ppp-mod-pppoa \
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 01/??] [tools] make-ext4fs glibc >= 2.23 compat

2016-04-25 Thread Weedy
With the update to glibc 2.23, sys/types.h doesn't inherit
sys/sysmacros.h anymore. We need to include it manually.


--- /dev/null   2016-04-18 05:53:30.273258717 -0400
+++ tools/make-ext4fs/patches/125-glibc-2.23-sysmacros.patch2016-04-24
14:50:33.932873523 -0400
@@ -0,0 +1,10 @@
+--- a/ext4_utils.h 2016-04-24 14:47:50.207888150 -0400
 b/ext4_utils.h 2016-04-24 14:48:11.761438966 -0400
+@@ -30,6 +30,7 @@
+ #include 
+
+ #include 
++#include 
+ #include 
+ #include 
+ #include 


This is a test for my mail client.
Please tell me if I need to change anything.
I have patched the rest of the host packages this update broke.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4] package/utils/usbutils: Update USB IDs list and drop gzip compression

2016-04-25 Thread Daniel Engberg
Change mirror to Github (Gentoo repo) and drop the gzip compression.
Worst case there's about 4kbyte increase in size but most images ends up
beign somewhere between 4-100kbyte smaller due to the lzma compression.

Tested on ar71xx

v2 Now contains the correct patch, sorry!
v3 Turns out that the update-usbids.sh.in isn't executed at all...
v4 Drop zlib dependency, pointed out by Hauke Mehrtens

Signed-off-by: Daniel Engberg 

---

diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile
index 9b5470a..dc57155 100644
--- a/package/utils/usbutils/Makefile
+++ b/package/utils/usbutils/Makefile
@@ -9,15 +9,15 @@ include $(TOPDIR)/rules.mk

 PKG_NAME:=usbutils
 PKG_VERSION:=007
-PKG_RELEASE:=2
+PKG_RELEASE:=3

 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
 PKG_MD5SUM:=a6bd63d5c44cebb717a960eae22a3ca9

-USB_IDS_VERSION:=2015-12-17
-USB_IDS_MD5SUM:=8c091fdcdbc4e8e60a518d0148b0dad3
-USB_IDS_FILE:=usb.ids.$(USB_IDS_VERSION).gz
+USB_IDS_VERSION:=2016-03-03
+USB_IDS_MD5SUM:=273596b6ee101b1df454827cfa87dff8
+USB_IDS_FILE:=usb.ids

 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
@@ -29,29 +29,31 @@ include $(INCLUDE_DIR)/package.mk
 define Package/usbutils
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=+libusb-1.0 +zlib +librt +libpthread
+  DEPENDS:=+libusb-1.0 +librt +libpthread
   TITLE:=USB devices listing utilities
   URL:=http://www.linux-usb.org/
 endef

 define Download/usb_ids
   FILE:=$(USB_IDS_FILE)
-  URL:=http://projects.pyret.net/dump/openwrt/distfiles
+  
URL:=https://raw.githubusercontent.com/gentoo/hwids/d9e840aa3d5cedf5637d59ef0dc555c380a0e822
   MD5SUM:=$(USB_IDS_MD5SUM)
 endef
 $(eval $(call Download,usb_ids))

 define Build/Prepare
$(Build/Prepare/Default)
-   echo '#!/bin/sh' > $(PKG_BUILD_DIR)/update-usbids.sh.in
-   echo 'cp $(DL_DIR)/$(USB_IDS_FILE) usb.ids.gz' >> 
$(PKG_BUILD_DIR)/update-usbids.sh.in
+   $(CP) $(DL_DIR)/$(USB_IDS_FILE) $(PKG_BUILD_DIR)
 endef

+CONFIGURE_ARGS += \
+   --disable-zlib
+
 define Package/usbutils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsusb $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/share
-   $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids.gz $(1)/usr/share/
+   $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/usb.ids $(1)/usr/share/
 endef

 $(eval $(call BuildPackage,usbutils))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)"

2016-04-25 Thread John Crispin


On 25/04/2016 08:54, Bastian Bittorf wrote:
> * John Crispin  [25.04.2016 07:39]:
>>> The changed image name breaks compatibility for derived projects and
>>> that's something which should only happen if there is a really good
>>> reason (e.g. security fix).
>>
>> how does it beak compatibility ?
> 
> I think they auto-download a preconfigured filename,
> which will ofcource not succeed. We circumvented this in our
> network-autoupdater in a way, that we download e.g. "$MODELNAME.bin"
> where $MODELNAME is from '/tmp/sysinfo/model' e.g. 'TP-Link TL-WDR4900 v1'
> and on the downloadserver we can "adjust" the symlinks...
> 
> I'am against reverting the commit. Lets keep it, because it makes sense.
> 
> Maybe i can give a short talk at Battlemesh v9 about proper autoupdates,
> because we have ~10 years experience in this (including 500 dead devices
> 8-)))
> 
> bye, bastian
> 


before i merged the patch i did actually look at the compat issue and
concluded that only docs will be out of date, which is not really
anything new. all issues mentioned are home made ones. specially the one
bastian mentions here. basically fixing your download script and
deploying it in this way will break forward compat as can be seen here.

we now face the decision of reverting and unbreaking out of tree issues
that can be fixed easily or avoided in future or not revert it and keep
the fix that makes the filenames more consistent. adding the "n" is
after all correct ad the antenna is not "not" detachable on the relevant
models.

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


Re: [OpenWrt-Devel] [PATCH][CC] Revert "ar71xx: change some TP-link modelnames (WR841, WA701, WA730)"

2016-04-25 Thread Bastian Bittorf
* John Crispin  [25.04.2016 07:39]:
> > The changed image name breaks compatibility for derived projects and
> > that's something which should only happen if there is a really good
> > reason (e.g. security fix).
> 
> how does it beak compatibility ?

I think they auto-download a preconfigured filename,
which will ofcource not succeed. We circumvented this in our
network-autoupdater in a way, that we download e.g. "$MODELNAME.bin"
where $MODELNAME is from '/tmp/sysinfo/model' e.g. 'TP-Link TL-WDR4900 v1'
and on the downloadserver we can "adjust" the symlinks...

I'am against reverting the commit. Lets keep it, because it makes sense.

Maybe i can give a short talk at Battlemesh v9 about proper autoupdates,
because we have ~10 years experience in this (including 500 dead devices
8-)))

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