[OpenWrt-Devel] [PATCH] ramips: HiLink HLK-RM04 image name typo (RM02 -> RM04)

2016-01-18 Thread John Clark
The image name for the HiLink HLK-RM04 module has a typo and should read
"RM04" rather than "RM02"

Signed-off-by: John Clark 
---
 target/linux/ramips/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/Makefile
b/target/linux/ramips/image/Makefile
index 2427ac6..55b9cf4 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -592,7 +592,7 @@ define BuildFirmware/HLKRM04/initramfs
 $(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
 mkhilinkfw -e -i$(call imgname,$(1),$(2))-uImage.bin -o $(call
imgname,$(1),$(2))-factory.bin;
 endef
-Image/Build/Profile/HLKRM04=$(call
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM02)
+Image/Build/Profile/HLKRM04=$(call
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM04)

 Image/Build/Profile/HT-TM02=$(call
BuildFirmware/Default8M/$(1),$(1),ht-tm02,HT-TM02)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ramips: HiLink HLK-RM04 image name typo (RM02 -> RM04)

2016-01-18 Thread John Clark

Trying again, I see gmail mangled the previous message...

The image name for the HiLink HLK-RM04 module has a typo and should read 
"RM04" rather than "RM02"


Signed-off-by: John Clark 
---
 target/linux/ramips/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile

index 2427ac6..55b9cf4 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -592,7 +592,7 @@ define BuildFirmware/HLKRM04/initramfs
 $(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
 mkhilinkfw -e -i$(call imgname,$(1),$(2))-uImage.bin -o $(call 
imgname,$(1),$(2))-factory.bin;

 endef
-Image/Build/Profile/HLKRM04=$(call 
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM02)
+Image/Build/Profile/HLKRM04=$(call 
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM04)


 Image/Build/Profile/HT-TM02=$(call 
BuildFirmware/Default8M/$(1),$(1),ht-tm02,HT-TM02)


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


Re: [OpenWrt-Devel] [PATCH 1/1] package/libs/libiconv: function names

2016-01-18 Thread Jo-Philipp Wich
Applied in r48301 - thanks!

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


Re: [OpenWrt-Devel] [PATCH][package] Allow UCI dhcp classifier to accept a list of MAC

2016-01-18 Thread Jo-Philipp Wich
Hi.

The change is fine with me but shouldn't we keep checking whether
there's at least one mac given?

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


Re: [OpenWrt-Devel] [PATCH] brcm63xx: Let the CFE partition in HG556a to be writeable

2016-01-18 Thread Jonas Gorski
Hi,

On Wed, Dec 2, 2015 at 9:37 PM, dani  wrote:
> In the HG556a router the partition mtd0, where CFE lives, is read only.
> This patch allows this partition to be writeable.
>
> The BCM6358 SoC has two cores, but they are not identical. The second core has
> half icache.
> core0: icache=32kB
> core1: icache=16kB
>
> As default the HG556a uses the second core as the main one (configured by 
> CFE).
> Since currently there isn't SMP support for using both cores, we want to use 
> the
> one with the best performance.
>
> For using the core0 as the main one, we need to write some bytes at the offset
> 0x014 of mtd0 (CFE). Therefore we need the mtd0 partition to be writeable.
>
> After setting the core0 as the main one, the performance can increase up to
> +20% (tested). The performance gain isn't marginal.
>
> For setting the core0 as the main one in an easy way I wrote a very simple 
> utility:
> https://wiki.openwrt.org/_media/media/huawei/tp0set.tar.gz
> It can switch from core0 to core1 or vice versa in OpenWrt writing proper 
> bytes
> into bcm6358 CFE (fully tested in the HG556a, no bricks).

To be honest, I'm not very comfortable with making the CFE partition
writable, and rather add code to lzma-loader that switches back to
thread 0, then add lzma-loader for the affected devices.


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


Re: [OpenWrt-Devel] [PATCH] brcm63xx: fix gpio ephy-reset

2016-01-18 Thread Jonas Gorski
Hi,

On 12 December 2015 at 14:10, dani  wrote:
> Currently ephy-reset, which uses a GPIO for enabling external ethernet phys, 
> is broken.
> This patch fix the problem.
>
> This problem causes in boards with external phys with a reset pin connected 
> to gpio, are
> initialized without lan interfaces.
>
> The line
> ephy_reset.table[0].chip_label = gpio_chip_labels[hw_gpio / 32];
> always returns bcm63xx-gpio.1. As a result of this, reset pins connected to 
> gpios <32
> will return messages "gpio X out of range", and ethernet fails to initialize.
>
> The array *gpio_chip_labels[] should be initialized with different names for 
> each element,
> otherwise sprintf will copy the label of the gpio chip for both elements at 
> the same time.
> And the name of both elements of the array will be the same.
>
> Using a different name on the second array element solves the problem.
> Signed-off-by: Daniel Gonzalez 

I added a slightly different approach in r48303, can you verify it
works for you?


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


Re: [OpenWrt-Devel] [PATCH] brcm63xx: add support for Huawei HG622

2016-01-18 Thread Jonas Gorski
Hi,

On 16 December 2015 at 23:05, Álvaro Fernández Rojas  wrote:
> Signed-off-by: Álvaro Fernández Rojas 

in the future I will reject patches with an empty commit message.

Applied in r48305.


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


Re: [OpenWrt-Devel] [PATCH] brcm63xx: add support for ZyXEL P870HNU-51b

2016-01-18 Thread Jonas Gorski
Hi,

On 20 December 2015 at 04:52, Mohammed Berdai  wrote:
> This router is a ZyXEL VDSL2 router and its board has :
> chip ID: BCM6368B2, MIPS: 400MHz,
> Total Flash size: 16384K with 128 sectors
> Total Memory: 67108864 bytes (64MB)
> Board Id (0-15): 96368MVWG
>
> with a usb port, and wifi Broadcom bcm43222.
> This router requires the image to have: --signature "ZyXEL_4004" -pad
> 8 --image-offset 0x2
>
> this patch is for Trunk (compiled and tested against  trunk@47953
> 3c298f89-4303-0410-b956-a3cf2f4a3e73 )
>
>

You are missing a Signed-off-by, also your patch does not apply:

Applying patch #559307 using 'git am'
Description: [OpenWrt-Devel] brcm63xx: add support for ZyXEL P870HNU-51b
Applying: brcm63xx: add support for ZyXEL P870HNU-51b
fatal: corrupt patch at line 167

it looks like your email program broke the patch by wrapping lines,
replacing all tabs with spaces and removing trailing spaces. Please
fix and resend. I highly suggest using git send-email for sending
patches.

Also ..

> diff --git a/target/linux/brcm63xx/base-files/etc/board.d/02_network
> b/target/linux/brcm63xx/base-files/etc/board.d/02_network
> index c01aba8..061871c 100755
> --- a/target/linux/brcm63xx/base-files/etc/board.d/02_network
> +++ b/target/linux/brcm63xx/base-files/etc/board.d/02_network
> @@ -88,6 +88,7 @@ fast2504n |\
>  fast2704v2 |\
>  hg655b |\
>  p870hw-51a_v2 |\
> +p870hnu-51b |\

Please use alphabetical ordering where appropriate.

(snipped rest)


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


Re: [OpenWrt-Devel] [PATCH 1/2] b53: add internal API for accessing PHY regs

2016-01-18 Thread Jonas Gorski
Hi,

On 6 January 2016 at 20:02, Rafał Miłecki  wrote:
> Signed-off-by: Rafał Miłecki 

Please don't leave the commit log empty. E.g. state why you need to
add this new function.
> ---
>  .../generic/files/drivers/net/phy/b53/b53_mdio.c | 20 
> 
>  .../generic/files/drivers/net/phy/b53/b53_priv.h | 14 ++
>  .../generic/files/drivers/net/phy/b53/b53_srab.c | 15 +++
>  3 files changed, 49 insertions(+)
>
> diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c 
> b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
> index 3c25f0e..185c95f 100644
> --- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
> +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
> @@ -238,6 +238,24 @@ static int b53_mdio_write64(struct b53_device *dev, u8 
> page, u8 reg,
> return b53_mdio_op(dev, page, reg, REG_MII_ADDR_WRITE);
>  }
>
> +static int b53_mdio_phy_read16(struct b53_device *dev, int addr, u8 reg,
> +  u16 *value)
> +{
> +   struct mii_bus *bus = dev->priv;
> +
> +   *value = mdiobus_read(bus, addr, reg);
> +
> +   return 0;
> +}
> +
> +static int b53_mdio_phy_write16(struct b53_device *dev, int addr, u8 reg,
> +   u16 value)
> +{
> +   struct mii_bus *bus = dev->priv;
> +
> +   return mdiobus_write(bus, addr, reg, value);
> +}
> +
>  static struct b53_io_ops b53_mdio_ops = {
> .read8 = b53_mdio_read8,
> .read16 = b53_mdio_read16,
> @@ -249,6 +267,8 @@ static struct b53_io_ops b53_mdio_ops = {
> .write32 = b53_mdio_write32,
> .write48 = b53_mdio_write48,
> .write64 = b53_mdio_write64,
> +   .phy_read16 = b53_mdio_phy_read16,
> +   .phy_write16 = b53_mdio_phy_write16,
>  };
>
>  static int b53_phy_probe(struct phy_device *phydev)
> diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h 
> b/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h
> index 0c4c394..7891238 100644
> --- a/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h
> +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_priv.h
> @@ -36,6 +36,8 @@ struct b53_io_ops {
> int (*write32)(struct b53_device *dev, u8 page, u8 reg, u32 value);
> int (*write48)(struct b53_device *dev, u8 page, u8 reg, u64 value);
> int (*write64)(struct b53_device *dev, u8 page, u8 reg, u64 value);
> +   int (*phy_read16)(struct b53_device *dev, int addr, u8 reg, u16 
> *value);
> +   int (*phy_write16)(struct b53_device *dev, int addr, u8 reg, u16 
> value);
>  };
>
>  enum {
> @@ -299,6 +301,18 @@ static inline int b53_write64(struct b53_device *dev, u8 
> page, u8 reg,
> return ret;
>  }
>
> +static inline int b53_phy_read16(struct b53_device *dev, int addr, u8 reg,
> +u16 *value)
> +{
> +   return dev->ops->phy_read16(dev, addr, reg, value);

Since you only add the functions to phy and srab and you don't check
for NULL, this will OOPS for spi and mmap.

> +}
> +
> +static inline int b53_phy_write16(struct b53_device *dev, int addr, u8 reg,
> + u16 value)
> +{
> +   return dev->ops->phy_write16(dev, addr, reg, value);
> +}
> +
>  #ifdef CONFIG_BCM47XX
>
>  #include 
> diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c 
> b/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c
> index 012daa3..438c6f8 100644
> --- a/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c
> +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_srab.c
> @@ -21,6 +21,7 @@
>  #include 
>  #include 
>
> +#include "b53_regs.h"
>  #include "b53_priv.h"
>
>  /* command and status register of the SRAB */
> @@ -321,6 +322,18 @@ err:
> return ret;
>  }
>
> +static int b53_srab_phy_read16(struct b53_device *dev, int addr, u8 reg,
> +  u16 *value)
> +{
> +   return b53_read16(dev, B53_PORT_MII_PAGE(addr), reg, value);
> +}
> +
> +static int b53_srab_phy_write16(struct b53_device *dev, int addr, u8 reg,
> +   u16 value)
> +{
> +   return b53_write16(dev, B53_PORT_MII_PAGE(addr), reg, value);

Since these will be the default implementations for everything but
mdio, how about rather doing someting like

static inline int b53_phy_read16(...)
{
   if (dev->ops->phy_read16)
  return dev->ops->phy_read16(...);

   return b53_read16(dev, B53_PORT_MII_PAGE(addr), reg, value);
}

That way you don't need to add a version for every connector.

> +}
> +
>  static struct b53_io_ops b53_srab_ops = {
> .read8 = b53_srab_read8,
> .read16 = b53_srab_read16,
> @@ -332,6 +345,8 @@ static struct b53_io_ops b53_srab_ops = {
> .write32 = b53_srab_write32,
> .write48 = b53_srab_write48,
> .write64 = b53_srab_write64,
> +   .phy_read16 = b53_srab_phy_read16,
> +   .phy_write16 = b53_srab_phy_write1

Re: [OpenWrt-Devel] [PATCH 2/2] b53: support setting port link state

2016-01-18 Thread Jonas Gorski
Hi,

On 6 January 2016 at 20:02, Rafał Miłecki  wrote:
> Signed-off-by: Rafał Miłecki 
> ---
>  .../generic/files/drivers/net/phy/b53/b53_common.c | 40 
> ++
>  1 file changed, 40 insertions(+)
>
> diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c 
> b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
> index 859d8d1..42a1679 100644
> --- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
> +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
> @@ -25,6 +25,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include "b53_regs.h"
>  #include "b53_priv.h"
> @@ -794,6 +795,42 @@ static int b53_port_get_link(struct switch_dev *dev, int 
> port,
>
>  }
>
> +static int b53_port_set_link(struct switch_dev *dev, int port,
> +struct switch_port_link *link)
> +{
> +   struct b53_device *priv = sw_to_b53(dev);
> +
> +   if (!priv->ops->phy_write16)
> +   return -ENOTSUPP;

Oh, you do the check here, that was unexpected.

You should also disallow reconfiguration of non-(e)phy ports like the cpu port.

> +
> +   if (link->aneg) {
> +   b53_phy_write16(priv, port, MII_BMCR, 0x);
> +   b53_phy_write16(priv, port, MII_BMCR, BMCR_ANENABLE | 
> BMCR_ANRESTART);
> +   } else {
> +   u16 bmcr = 0;
> +
> +   if (link->duplex)
> +   bmcr |= BMCR_FULLDPLX;
> +
> +   switch (link->speed) {
> +   case SWITCH_PORT_SPEED_10:
> +   break;
> +   case SWITCH_PORT_SPEED_100:
> +   bmcr |= BMCR_SPEED100;
> +   break;
> +   case SWITCH_PORT_SPEED_1000:
> +   bmcr |= BMCR_SPEED1000;

b53 supports switches with fast ethernet only ports, so you need to
make sure that you don't try to set gige speed on them.

> +   break;
> +   default:
> +   return -ENOTSUPP;
> +   }
> +
> +   b53_phy_write16(priv, port, MII_BMCR, bmcr);
> +   }
> +
> +   return 0;

This function does nothing broadcom/b53 specific. I would think that
exposing the phys over the mdio bus is rather common for switches, so
I wonder if it wouldn't make more sense to have generic write/read mii
page function pointers for swconfig and move this function to the
swconfig common code.


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


[OpenWrt-Devel] [RFC v2] [zynq] Add new target zynq

2016-01-18 Thread Jason Wu
Add support for Xilinx ZC702 Dev board

Zynq target is using 4.4 kernel and mainline 2016.1 u-boot.

I symbolic linked /init with /sbin/init, I am sure this is
acceptable from OpenWrt (although this can be workaround with
rdinit="/sbin/init" in bootargs but requires DTS modification).

Patch is tested with Xilinx ZC702 Dev board with SD boot mode.

known issue:
 - no QSPI driver in 4.4 kernel: no QSPI flash support
 - USB is not working in 4.4 kernel

Signed-off-by: Jason Wu 
---
v2: - use 4.4 kernel
- use 2016.1 U-Boot
- add fit.itb generation (default boot image format in 2016.1 U-Boot)
- use static ip of 192.168.1.1
- fix typo

diff --git a/package/boot/uboot-zynq/Makefile b/package/boot/uboot-zynq/Makefile
new file mode 100644
index 000..165cd87
--- /dev/null
+++ b/package/boot/uboot-zynq/Makefile
@@ -0,0 +1,122 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=u-boot
+PKG_VERSION:=2016.01
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:= \
+   http://mirror2.openwrt.org/sources \
+   ftp://ftp.denx.de/pub/u-boot
+
+PKG_MD5SUM:=7d4f65fd43d4d706f5c5650e020d899d
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_LICENSE:=GPL-2.0 GPL-2.0+
+PKG_LICENSE_FILES:=Licenses/README
+
+include $(INCLUDE_DIR)/package.mk
+
+define uboot/Default
+   TITLE:=
+   CONFIG:=
+   IMAGE:=
+endef
+
+define uboot/zc702
+   TITLE:=U-Boot $(PKG_VERSION) for Xilinx ZC702 Dev Board
+endef
+
+define uboot/zc706
+   TITLE:=U-Boot $(PKG_VERSION) for Xilinx ZC706 Dev Board
+endef
+
+UBOOTS := \
+   zc702 \
+
+define Package/uboot/template
+define Package/uboot-zynq-$(1)
+   SECTION:=boot
+   CATEGORY:=Boot Loaders
+   DEPENDS:=@TARGET_zynq
+   TITLE:=$(2)
+   URL:=http://www.denx.de/wiki/U-Boot
+   VARIANT:=$(1)
+   MAINTAINER:=Jason Wu 
+endef
+endef
+
+define BuildUBootPackage
+   $(eval $(uboot/Default))
+   $(eval $(uboot/$(1)))
+   $(call Package/uboot/template,$(1),$(TITLE))
+endef
+
+ifdef BUILD_VARIANT
+$(eval $(call uboot/$(BUILD_VARIANT)))
+UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
+UBOOT_IMAGE:=$(if 
$(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
+endif
+
+define Build/Configure
+   +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
+   $(BOARD)_$(UBOOT_CONFIG)_config
+endef
+
+define Build/Compile
+   +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
+   CROSS_COMPILE=$(TARGET_CROSS)
+endef
+
+define Package/uboot/install/default
+   $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
+
+   $(CP) $(PKG_BUILD_DIR)/u-boot \
+   $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.elf
+
+   $(CP) $(PKG_BUILD_DIR)/u-boot-dtb.bin \
+   $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-dtb.bin
+
+   $(CP) $(PKG_BUILD_DIR)/u-boot.dtb \
+   $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot.dtb
+
+   $(CP) $(PKG_BUILD_DIR)/u-boot-dtb.img \
+   $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-dtb.img
+
+   $(CP) $(PKG_BUILD_DIR)/spl/boot.bin \
+   $(BIN_DIR)/uboot-$(BOARD)-$(1)/boot.bin
+
+   $(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl \
+   $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl
+
+   $(CP) $(PKG_BUILD_DIR)/spl/u-boot-spl-dtb.bin \
+   $(BIN_DIR)/uboot-$(BOARD)-$(1)/u-boot-spl-dtb.bin
+
+   $(CP) uEnv.txt \
+   $(BIN_DIR)/uboot-$(BOARD)-$(1)/uEnv.txt
+   mkimage -C none -A arm -T script \
+   -d $(BIN_DIR)/uboot-$(BOARD)-$(1)/uEnv.txt \
+   $(BIN_DIR)/uboot-$(BOARD)-$(1)/boot.scr
+
+endef
+
+define Package/uboot/install/template
+define Package/uboot-zynq-$(1)/install
+   $(call Package/uboot/install/default,$(2))
+endef
+endef
+
+$(foreach u,$(UBOOTS), \
+   $(eval $(call Package/uboot/install/template,$(u),$(u))) \
+)
+
+$(foreach u,$(UBOOTS), \
+   $(eval $(call BuildUBootPackage,$(u))) \
+   $(eval $(call BuildPackage,uboot-zynq-$(u))) \
+)
diff --git a/package/boot/uboot-zynq/uEnv.txt b/package/boot/uboot-zynq/uEnv.txt
new file mode 100644
index 000..f83b6a3
--- /dev/null
+++ b/package/boot/uboot-zynq/uEnv.txt
@@ -0,0 +1,11 @@
+setenv initrd_high 0x2000
+setenv fdt_high 0x2000
+setenv dtb_addr 0x200
+setenv kernel_addr 0x208
+setenv rootfs_addr 0x400
+setenv loadkernel fatload mmc 0 \$kernel_addr openwrt-zynq-uImage
+setenv loaddtb fatload mmc 0 \$dtb_addr openwrt-zynq-system.dtb
+setenv loadrootfs fatload mmc 0 \$rootfs_addr openwrt-zynq-uramdisk.image.gz
+setenv bootargs console=ttyPS0,115200 earlyprintk rdinit=/sbin/init
+setenv uenvcmd run loadkernel \&\& run loaddtb \&\& run loadrootfs \&\& bootm 
\$kernel_addr \$rootfs_addr \$dtb_addr
+run uenvcmd
diff --git a/target/linux/zynq/Makefile b/target/linux/zynq/Makefile
new file mode 100644

Re: [OpenWrt-Devel] [RFC v2] [zynq] Add new target zynq

2016-01-18 Thread Felix Fietkau
On 2016-01-18 14:36, Jason Wu wrote:
> Add support for Xilinx ZC702 Dev board
> 
> Zynq target is using 4.4 kernel and mainline 2016.1 u-boot.
> 
> I symbolic linked /init with /sbin/init, I am sure this is
> acceptable from OpenWrt (although this can be workaround with
> rdinit="/sbin/init" in bootargs but requires DTS modification).
I think a DTS modification is cleaner than such a workaround.

> diff --git a/target/linux/zynq/base-files/etc/config/network 
> b/target/linux/zynq/base-files/etc/config/network
> new file mode 100644
> index 000..4731bd9
> --- /dev/null
> +++ b/target/linux/zynq/base-files/etc/config/network
> @@ -0,0 +1,17 @@
> +# Copyright (C) 2006 OpenWrt.org
> +
> +config interface loopback
> + option ifname   lo
> + option protostatic
> + option ipaddr   127.0.0.1
> + option netmask  255.0.0.0
> +
> +config interface lan
> + option ifname   eth0
> + option protostatic
> + option ipaddr   192.168.1.1
> + option netmask  255.255.255.0
> + option ip6assign 60
> +
> +config globals globals
> + option ula_prefix auto
Since you're using board.d, you can drop this file. Please add the
base-files.mk chunk instead that deletes the default
/etc/config/network.

> diff --git a/target/linux/zynq/base-files/lib/zynq.sh 
> b/target/linux/zynq/base-files/lib/zynq.sh
> new file mode 100644
> index 000..d430829
> --- /dev/null
> +++ b/target/linux/zynq/base-files/lib/zynq.sh
> @@ -0,0 +1,41 @@
> +#!/bin/sh
> +#
> +# Copyright (C) 2015 OpenWrt.org
> +#
> +
> +ZYNQ_BOARD_NAME=
> +ZYNQ_MODEL=
> +
> +zynq_board_detect() {
> + local machine
> + local name
> +
> + machine=$(cat /proc/device-tree/model)
> +
> + case "$machine" in
> + "Zynq ZC702 Development BoardBOARD")
> + name="zc702"
> + ;;
> + *)
> + name="generic"
> + ;;
> + esac
> +
> + [ -n "$ZYNQ_BOARD_NAME" ] || ZYNQ_BOARD_NAME="$name"
> + [ -n "$ZYNQ_MODEL" ] || ZYNQ_MODEL="$machine"
> +
> + [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
> +
> + echo "$ZYNQ_BOARD_NAME" > /tmp/sysinfo/board_name
> + echo "$ZYNQ_MODEL" > /tmp/sysinfo/model
> +}
> +
> +zynq_board_name() {
> + local name
> +
> + [ -f /tmp/sysinfo/board_name ] || zynq_board_detect
> + [ ! -f /tmp/sysinfo/board_name ] || name=$(cat /tmp/sysinfo/board_name)
> + [ -n "$name" ] || name="unknown"
> +
> + echo "$name"
> +}
If you adjust your other scripts to be able to deal with names like
"xlnx,zynq-zc702", you can drop this script and let the default sysinfo
script take care of things.

> diff --git a/target/linux/zynq/config-4.4 b/target/linux/zynq/config-4.4
> new file mode 100644
> index 000..97e2710
> --- /dev/null
> +++ b/target/linux/zynq/config-4.4
> @@ -0,0 +1,823 @@
> +CONFIG_ADVISE_SYSCALLS=y
> +CONFIG_ALIGNMENT_TRAP=y
> +# CONFIG_AMBA_PL08X is not set
> +# CONFIG_APM_EMULATION is not set
> +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
> +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
> +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=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_V6_V7=y
> +CONFIG_ARCH_MULTI_V7=y
> +CONFIG_ARCH_NR_GPIO=1024
> +CONFIG_ARCH_REQUIRE_GPIOLIB=y
> +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
> +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
> +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
> +CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
> +CONFIG_ARCH_SUPPORTS_UPROBES=y
> +CONFIG_ARCH_SUSPEND_POSSIBLE=y
> +CONFIG_ARCH_USE_BUILTIN_BSWAP=y
> +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
> +CONFIG_ARCH_VEXPRESS=y
> +CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
> +# CONFIG_ARCH_VEXPRESS_SPC is not set
> +CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
> +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
> +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
> +CONFIG_ARCH_ZYNQ=y
> +CONFIG_ARM=y
> +CONFIG_ARM_AMBA=y
> +CONFIG_ARM_CCI=y
> +CONFIG_ARM_CCI400_COMMON=y
> +CONFIG_ARM_CCI400_PMU=y
> +CONFIG_ARM_CCI_PMU=y
> +# CONFIG_ARM_CHARLCD is not set
> +CONFIG_ARM_CPU_SUSPEND=y
> +CONFIG_ARM_ERRATA_643719=y
> +CONFIG_ARM_ERRATA_720789=y
> +CONFIG_ARM_ERRATA_754322=y
> +CONFIG_ARM_ERRATA_754327=y
> +CONFIG_ARM_ERRATA_764369=y
> +CONFIG_ARM_ERRATA_775420=y
> +CONFIG_ARM_GIC=y
> +CONFIG_ARM_GLOBAL_TIMER=y
> +CONFIG_ARM_HAS_SG_CHAIN=y
> +CONFIG_ARM_HEAVY_MB=y
> +CONFIG_ARM_L1_CACHE_SHIFT=6
> +CONFIG_ARM_L1_CACHE_SHIFT_6=y
> +# CONFIG_ARM_LPAE is not set
> +CONFIG_ARM_PATCH_PHYS_VIRT=y
> +# CONFIG_ARM_PL172_MPMC is not set
> +CONFIG_ARM_PMU=y
> +# CONFIG_ARM_SMMU is not set
> +# CONFIG_ARM_SP805_WATCHDOG is not set
> +CONFIG_ARM_THUMB=y
> +# CONFIG_ARM_THUMBEE is not set
> +CONFIG_ARM_TIMER_SP804=y
> +CONFIG_ARM_UNWIND=y
> +CONFIG_ARM_VIRT_EXT=y
> +CONFIG_ARM_ZYNQ_CPUIDLE=y
> +CONFIG_ATAGS=y
> +CONFIG_AUTO_ZRELADDR=y
> +# CONFI

[OpenWrt-Devel] Dissociate STA based on SNR

2016-01-18 Thread Nishant Sharma

Hi,

I was wondering if there is a way to dissociate STAs who say go below a 
minimum threshold SNR or signal level of say -65dBm in a multi-AP scenario?


As we do not run our OpenWRT APs with a WLAN controller, which can 
automatically change channels or increase/decrease the txpower, would it 
be a good idea to kick a STA off if it has low signal, so that it can be 
forced to associate with another AP.


Reason being, I have observed that there are a variety of STA cards 
which have their own algorithms built-in to consider the signal good 
enough or poor enough to try and find another AP with same SSID, which 
is beyond our control. Thus, STA hangs on to a poor SNR of say 17 but 
wouldn't switch to a better AP available affecting the user experience. 
As soon as I restart wifi on the AP, it goes to associate with another 
AP with better SNR.


I do not have a lot of experience with WiFi, but yes, I do have 
installed around 25 OpenWRT ath9k based APs in offices and warehouses 
and this is what I have observed and am writing in to seek ideas and 
suggestions from more experienced people.


Thanks in advance.

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


Re: [OpenWrt-Devel] Dissociate STA based on SNR

2016-01-18 Thread Bastian Bittorf
* Nishant Sharma  [18.01.2016 15:40]:
> I was wondering if there is a way to dissociate STAs who say go below
> a minimum threshold SNR or signal level of say -65dBm in a multi-AP
> scenario?

we also faced this, while doing roaming.
i workaround is to have something like:

#!/bin/sh

iw event | while read -r LINE; do
  case "$LINE" in
*': del station '*|*': new station '*)
  # wlan0-1: del station 00:21:6a:32:7c:1c
  # wlan0: new station dc:9f:db:02:b8:ee
  ...your own logic here...
;;
  esac
done

what we do e.g. is if a station connects for the
first time and signal is below -70, we just kick.

#!/bin/sh

dev='wlan0-1'
mac=...
ubus call hostapd.$dev del_client '{ "addr" : "$mac", "reason" : "assoc 
toomany", "ban_time" : 1 }'


if the same mac connects during a specific time again,
we dont kick 8-) - really, it's just a workaround.

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


[OpenWrt-Devel] [PATCH v2] kernel: Add kernel module for Freescale SNVS RTC on chip module

2016-01-18 Thread Petr Štetiar
Signed-off-by: Petr Štetiar 
---

Changes in v2:
 * added dependency on imx6 target (Felix)

 package/kernel/linux/modules/other.mk |   16 
 1 file changed, 16 insertions(+)

diff --git a/package/kernel/linux/modules/other.mk 
b/package/kernel/linux/modules/other.mk
index 62fdc3c..4431afb 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -656,6 +656,22 @@ endef
 
 $(eval $(call KernelPackage,rtc-pt7c4338))
 
+define KernelPackage/rtc-snvs
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Freescale SNVS RTC support
+  DEPENDS:=@TARGET_imx6 @RTC_SUPPORT
+  KCONFIG:=CONFIG_RTC_DRV_SNVS \
+   CONFIG_RTC_CLASS=y
+  FILES:=$(LINUX_DIR)/drivers/rtc/rtc-snvs.ko
+  AUTOLOAD:=$(call AutoProbe,rtc-snvs)
+endef
+
+define KernelPackage/rtc-snvs/description
+ Kernel module for Freescale SNVS RTC on chip module
+endef
+
+$(eval $(call KernelPackage,rtc-snvs))
+
 
 define KernelPackage/mtdtests
   SUBMENU:=$(OTHER_MENU)
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] arc770/axs101: fix console output

2016-01-18 Thread Alexey Brodkin
While bumping kernel version kernel command line was
unintentionally modified in attempt to make it closer
to upstream version.

In case of AXS that has not only serial port but HDMI/USB
both capable of being debug console we have 2 entries in
kernel's command line:
--->8-
console=tty0 console=ttyS3,115200n8
--->8-

But as it turned out OpenWRT uses procd as init instead of
Busybox. And in its turn procd gets the first "console"
entry from kernel command line (/proc/cmdline) and uses it
if default inittab is used:
--->8-
...
::askconsole:/bin/ash --login
--->8-

So what we got is non-functional serial console.
That change removes "console=tty0" which brings serial
console back to life.

Signed-off-by: Alexey Brodkin 
Cc: Felix Fietkau 
Cc: Jo-Philipp Wich 
Cc: Jonas Gorski 
---
 target/linux/arc770/dts/axs101.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/arc770/dts/axs101.dts 
b/target/linux/arc770/dts/axs101.dts
index 769e81a..8718eb4 100644
--- a/target/linux/arc770/dts/axs101.dts
+++ b/target/linux/arc770/dts/axs101.dts
@@ -17,6 +17,6 @@
compatible = "snps,axs101", "snps,arc-sdp";
 
chosen {
-   bootargs = "earlycon=uart8250,mmio32,0xe0022000,115200n8 
console=tty0 console=ttyS3,115200n8 consoleblank=0";
+   bootargs = "earlycon=uart8250,mmio32,0xe0022000,115200n8 
console=ttyS3,115200n8";
};
 };
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] arc: clean-up and move CFLAGS to include/target.mk

2016-01-18 Thread Alexey Brodkin
Most of currently mentioned CFLAGS in arc770/Makefile
are not really required because:
 [1] "-Os -pipe" are set by default in include/target.mk
 [2] "-fno-caller-saves" gets enabled via menuconfig
 as an extra compiler flag for developers

So the only one that makes sense is "-matomic" and
that one is really essential. Without it many software
packges won't build complainin on unresolved atomic ops.

Signed-off-by: Alexey Brodkin 
Cc: Felix Fietkau 
Cc: Jo-Philipp Wich 
Cc: Jonas Gorski 
---
 include/target.mk| 1 +
 target/linux/arc770/Makefile | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/target.mk b/include/target.mk
index f129298..d8c0212 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -263,6 +263,7 @@ ifeq ($(DUMP),1)
   endif
   ifeq ($(ARCH),arc)
 CPU_TYPE ?= arc700
+CPU_CFLAGS += -matomic
 CPU_CFLAGS_arc700 = -marc700
   endif
   DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) 
$(CPU_CFLAGS_$(CPU_SUBTYPE)))
diff --git a/target/linux/arc770/Makefile b/target/linux/arc770/Makefile
index 52c5e00..f917338 100644
--- a/target/linux/arc770/Makefile
+++ b/target/linux/arc770/Makefile
@@ -9,7 +9,6 @@ include $(TOPDIR)/rules.mk
 ARCH:=arc
 BOARD:=arc770
 BOARDNAME:=Synopsys DesignWare ARC 770D
-CFLAGS:=-Os -pipe -fno-caller-saves -matomic
 MAINTAINER:=Alexey Brodkin 
 SUBTARGETS:=generic
 
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/2 v2] linux: add support of ARC HS38-based boards

2016-01-18 Thread Alexey Brodkin
This patch introduces support of new boards with ARC HS38 cores.

ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA.
Because of new ISA ARC HS38 are binary incompatible with ARC 700
cores which requires both separate toolchain and target applications
including Linux kernel for that new cores.

As with ARC770 we're addind support for 2 boards for now:

 [1] Synopsys SDP board (AXS103)
 This is the same base-board as in AXS101 but with
 FPGA-based CPU-tile where ARCHs38 core is implemented.

 [2] nSIM
 Again this is the same simulation engine but configured for
 new instruction set and features of new CPU.

Alexey Brodkin (2):
  toolchain: add support of ARCv2 architecture
  linux: add support of Synopsys ARCHS38-based boards

 include/target.mk  |   1 +
 target/linux/archs38/Makefile  |  26 +++
 target/linux/archs38/base-files.mk |   3 +
 .../archs38/base-files/etc/board.d/02_network  |  19 ++
 target/linux/archs38/base-files/lib/arc.sh |  50 +
 .../base-files/lib/preinit/01_preinit_arc.sh   |   9 +
 target/linux/archs38/config-4.4| 183 +
 target/linux/archs38/dts/axc003_idu.dtsi   | 126 
 target/linux/archs38/dts/axs103_idu.dts|  25 +++
 target/linux/archs38/dts/axs10x_mb.dtsi| 225 +
 target/linux/archs38/dts/nsim_hs_idu.dts   |  73 +++
 target/linux/archs38/dts/skeleton.dtsi |  37 
 .../linux/archs38/generic/profiles/00-default.mk   |  16 ++
 .../linux/archs38/generic/profiles/01-minimal.mk   |  15 ++
 target/linux/archs38/generic/profiles/02-axs103.mk |  16 ++
 .../linux/archs38/generic/profiles/03-nsim_hs.mk   |  15 ++
 target/linux/archs38/generic/target.mk |   8 +
 target/linux/archs38/image/Makefile|  41 
 toolchain/gcc/common.mk|   1 +
 toolchain/uClibc/common.mk |   3 +-
 toolchain/uClibc/config/archs  |  10 +
 21 files changed, 901 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/archs38/Makefile
 create mode 100644 target/linux/archs38/base-files.mk
 create mode 100755 target/linux/archs38/base-files/etc/board.d/02_network
 create mode 100644 target/linux/archs38/base-files/lib/arc.sh
 create mode 100644 
target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh
 create mode 100644 target/linux/archs38/config-4.4
 create mode 100644 target/linux/archs38/dts/axc003_idu.dtsi
 create mode 100644 target/linux/archs38/dts/axs103_idu.dts
 create mode 100644 target/linux/archs38/dts/axs10x_mb.dtsi
 create mode 100644 target/linux/archs38/dts/nsim_hs_idu.dts
 create mode 100644 target/linux/archs38/dts/skeleton.dtsi
 create mode 100644 target/linux/archs38/generic/profiles/00-default.mk
 create mode 100644 target/linux/archs38/generic/profiles/01-minimal.mk
 create mode 100644 target/linux/archs38/generic/profiles/02-axs103.mk
 create mode 100644 target/linux/archs38/generic/profiles/03-nsim_hs.mk
 create mode 100644 target/linux/archs38/generic/target.mk
 create mode 100644 target/linux/archs38/image/Makefile
 create mode 100644 toolchain/uClibc/config/archs

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


[OpenWrt-Devel] [PATCH 1/2 v2] toolchain: add support of ARCv2 architecture

2016-01-18 Thread Alexey Brodkin
This change adds support of ARC ISAv2 processors in
OpenWRT toolchain.

In general gcc for ARC may compile code for both ISA versions
simultaneously but libgcc will be built only for default
architecture that's why it's necessary to specify --with-cpu
on gcc configuration.

As for uClibc we need to use different configurations for
different ARC ISAs.

Signed-off-by: Alexey Brodkin 
Cc: Felix Fietkau 
Cc: Jo-Philipp Wich 
Cc: Jonas Gorski 
---

Changes v1 -> v2:
 * Toolchain changes were moved to a separate patch

 toolchain/gcc/common.mk   |  1 +
 toolchain/uClibc/common.mk|  3 ++-
 toolchain/uClibc/config/archs | 10 ++
 3 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 toolchain/uClibc/config/archs

diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index 648cd2d..458215f 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -133,6 +133,7 @@ GCC_CONFIGURE:= \
$(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
$(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \
--with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \
+   $(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \
--with-gmp=$(TOPDIR)/staging_dir/host \
--with-mpfr=$(TOPDIR)/staging_dir/host \
--with-mpc=$(TOPDIR)/staging_dir/host \
diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk
index ad6ff02..2828156 100644
--- a/toolchain/uClibc/common.mk
+++ b/toolchain/uClibc/common.mk
@@ -41,8 +41,9 @@ GEN_CONFIG=$(SCRIPT_DIR)/kconfig.pl -n \
$(if $(CONFIG_UCLIBC_ENABLE_DEBUG),$(if $(wildcard 
$(CONFIG_DIR)/debug),'+' $(CONFIG_DIR)/debug)) \
$(CONFIG_DIR)/$(ARCH)$(strip \
$(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD), \
+   $(if $(filter archs,$(subst ",,$(CONFIG_CPU_TYPE))),hs, 
\
$(if $(CONFIG_MIPS64_ABI),.$(subst 
",,$(CONFIG_MIPS64_ABI)), \
-   $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard 
$(CONFIG_DIR)/$(ARCH).e500),.e500)
+   $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard 
$(CONFIG_DIR)/$(ARCH).e500),.e500))
 
 CPU_CFLAGS = \
-funsigned-char -fno-builtin -fno-asm \
diff --git a/toolchain/uClibc/config/archs b/toolchain/uClibc/config/archs
new file mode 100644
index 000..961628e
--- /dev/null
+++ b/toolchain/uClibc/config/archs
@@ -0,0 +1,10 @@
+ARCH_ANY_ENDIAN=y
+ARCH_LITTLE_ENDIAN=y
+ARCH_WANTS_LITTLE_ENDIAN=y
+TARGET_ARCH="arc"
+TARGET_arc=y
+# CONFIG_ARC_CPU_700 is not set
+CONFIG_ARC_CPU_HS=y
+CONFIG_ARC_PAGE_SIZE_8K=y
+# CONFIG_ARC_PAGE_SIZE_16K is not set
+# CONFIG_ARC_PAGE_SIZE_4K is not set
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2 v2] linux: add support of Synopsys ARCHS38-based boards

2016-01-18 Thread Alexey Brodkin
This patch introduces support of new boards with ARC HS38 cores.

ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA.
As with ARC770 we're addind support for 2 boards for now:

 [1] Synopsys SDP board (AXS103)
 This is the same base-board as in AXS101 but with
 FPGA-based CPU-tile where ARCHs38 core is implemented.

 [2] nSIM
 Again this is the same simulation engine but configured for
 new instruction set and features of new CPU.

Signed-off-by: Alexey Brodkin 
Cc: Felix Fietkau 
Cc: Jo-Philipp Wich 
Cc: Jonas Gorski 
---

Changes v1 -> v2:
 * Toolchain changes were moved to a separate patch
 * Kernel patches were moved to target/linux/generic

 include/target.mk  |   1 +
 target/linux/archs38/Makefile  |  26 +++
 target/linux/archs38/base-files.mk |   3 +
 .../archs38/base-files/etc/board.d/02_network  |  19 ++
 target/linux/archs38/base-files/lib/arc.sh |  50 +
 .../base-files/lib/preinit/01_preinit_arc.sh   |   9 +
 target/linux/archs38/config-4.4| 183 +
 target/linux/archs38/dts/axc003_idu.dtsi   | 126 
 target/linux/archs38/dts/axs103_idu.dts|  25 +++
 target/linux/archs38/dts/axs10x_mb.dtsi| 225 +
 target/linux/archs38/dts/nsim_hs_idu.dts   |  73 +++
 target/linux/archs38/dts/skeleton.dtsi |  37 
 .../linux/archs38/generic/profiles/00-default.mk   |  16 ++
 .../linux/archs38/generic/profiles/01-minimal.mk   |  15 ++
 target/linux/archs38/generic/profiles/02-axs103.mk |  16 ++
 .../linux/archs38/generic/profiles/03-nsim_hs.mk   |  15 ++
 target/linux/archs38/generic/target.mk |   8 +
 target/linux/archs38/image/Makefile|  41 
 18 files changed, 888 insertions(+)
 create mode 100644 target/linux/archs38/Makefile
 create mode 100644 target/linux/archs38/base-files.mk
 create mode 100755 target/linux/archs38/base-files/etc/board.d/02_network
 create mode 100644 target/linux/archs38/base-files/lib/arc.sh
 create mode 100644 
target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh
 create mode 100644 target/linux/archs38/config-4.4
 create mode 100644 target/linux/archs38/dts/axc003_idu.dtsi
 create mode 100644 target/linux/archs38/dts/axs103_idu.dts
 create mode 100644 target/linux/archs38/dts/axs10x_mb.dtsi
 create mode 100644 target/linux/archs38/dts/nsim_hs_idu.dts
 create mode 100644 target/linux/archs38/dts/skeleton.dtsi
 create mode 100644 target/linux/archs38/generic/profiles/00-default.mk
 create mode 100644 target/linux/archs38/generic/profiles/01-minimal.mk
 create mode 100644 target/linux/archs38/generic/profiles/02-axs103.mk
 create mode 100644 target/linux/archs38/generic/profiles/03-nsim_hs.mk
 create mode 100644 target/linux/archs38/generic/target.mk
 create mode 100644 target/linux/archs38/image/Makefile

diff --git a/include/target.mk b/include/target.mk
index d8c0212..f712244 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -265,6 +265,7 @@ ifeq ($(DUMP),1)
 CPU_TYPE ?= arc700
 CPU_CFLAGS += -matomic
 CPU_CFLAGS_arc700 = -marc700
+CPU_CFLAGS_archs = -marchs
   endif
   DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) 
$(CPU_CFLAGS_$(CPU_SUBTYPE)))
 endif
diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile
new file mode 100644
index 000..166d3d5
--- /dev/null
+++ b/target/linux/archs38/Makefile
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+ARCH:=arc
+CPU_TYPE:=archs
+BOARD:=archs38
+BOARDNAME:=Synopsys DesignWare ARC HS38
+MAINTAINER:=Alexey Brodkin 
+SUBTARGETS:=generic
+
+KERNEL_PATCHVER:=4.4
+
+DEVICE_TYPE:=developerboard
+
+include $(INCLUDE_DIR)/target.mk
+
+define Target/Description
+   Synopsys DesignWare boards
+endef
+
+$(eval $(call BuildTarget))
diff --git a/target/linux/archs38/base-files.mk 
b/target/linux/archs38/base-files.mk
new file mode 100644
index 000..fdd2c71
--- /dev/null
+++ b/target/linux/archs38/base-files.mk
@@ -0,0 +1,3 @@
+define Package/base-files/install-target
+   rm -f $(1)/etc/config/network
+endef
diff --git a/target/linux/archs38/base-files/etc/board.d/02_network 
b/target/linux/archs38/base-files/etc/board.d/02_network
new file mode 100755
index 000..da86ee0
--- /dev/null
+++ b/target/linux/archs38/base-files/etc/board.d/02_network
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+
+. /lib/arc.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$( arc_board_name )" in
+"arc-sdp"*)
+   ucidef_set_interface_lan "eth0" "dhcp"
+   ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/archs38/base-files/lib/arc.sh 
b/target/linux/archs38/base-files/lib/arc.sh
new file mode 100644
index

[OpenWrt-Devel] [PATCH] HiLink HLK-RM04 image name typo (RM02 -> RM04)

2016-01-18 Thread John Clark
I apologize for the first two messages (/patch/569488/ and /patch/569490/) 
where the patch had unwanted line breaks -- sending this one using git 
send-email.

The image name for the HiLink HLK-RM04 module has a typo and should read "RM04" 
rather than "RM02"

Signed-off-by: John Clark 
---
 target/linux/ramips/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index 2427ac6..55b9cf4 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -592,7 +592,7 @@ define BuildFirmware/HLKRM04/initramfs
$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
mkhilinkfw -e -i$(call imgname,$(1),$(2))-uImage.bin -o $(call 
imgname,$(1),$(2))-factory.bin;
 endef
-Image/Build/Profile/HLKRM04=$(call 
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM02)
+Image/Build/Profile/HLKRM04=$(call 
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM04)
 
 Image/Build/Profile/HT-TM02=$(call 
BuildFirmware/Default8M/$(1),$(1),ht-tm02,HT-TM02)
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH][package] Allow UCI dhcp classifier to accept a list of MAC

2016-01-18 Thread nworbnhoj
dnsmasq offers to group DHCP options and their values by a network-id
and to send options only to hosts which have been tagged with that
network-id.

uci acceps the mac classifier, but only for a single MAC
config mac 'opnvpn'
option mac  '00:FF:*:*:*:*'
option networkid   'opnvpn'
list   dhcp_option '3'

this patch allows a list of macs to be assigned to a network-id
config mac 'opnvpn'
list   mac  '00:00:00:00:00:AA'
list   mac  '00:00:00:00:00:BB'
list   mac  '00:00:00:00:00:CC'
option networkid   'opnvpn'
list   dhcp_option '3'

Signed-off-by: John A Brown 
---
 package/network/services/dnsmasq/files/dnsmasq.init | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
b/package/network/services/dnsmasq/files/dnsmasq.init
index efc9627..c265e01 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -363,7 +363,9 @@ dhcp_mac_add() {
config_get mac "$cfg" mac
[ -n "$mac" ] || return 0
 
-   xappend "--dhcp-mac=$networkid,$mac"
+   for o in $mac; do
+   xappend "--dhcp-mac=$networkid,$mac"
+   done
 
dhcp_option_add "$cfg" "$networkid"
 }
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] kernel/modules: add missing symbol for crypto-rng

2016-01-18 Thread Stijn Tintel
Since CRYPTO_DRBG_MENU was added in r48277, CRYPTO_DRBG_HMAC is missing.
It does not appear in kernel_menuconfig and defaults to yes, so enable
it in crypto-rng as well and add dependencies to HMAC and SHA256.

Signed-off-by: Stijn Tintel 
---
 package/kernel/linux/modules/crypto.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index d84c802..7c71053 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -100,10 +100,11 @@ $(eval $(call KernelPackage,crypto-wq))
 
 define KernelPackage/crypto-rng
   TITLE:=CryptoAPI random number generation
-  DEPENDS:=+kmod-crypto-hash
+  DEPENDS:=+kmod-crypto-hash +kmod-crypto-hmac +kmod-crypto-sha256
   KCONFIG:= \
-   CONFIG_CRYPTO_DRBG_MENU \
CONFIG_CRYPTO_DRBG \
+   CONFIG_CRYPTO_DRBG_HMAC=y \
+   CONFIG_CRYPTO_DRBG_MENU \
CONFIG_CRYPTO_JITTERENTROPY \
CONFIG_CRYPTO_RNG2
   FILES:= \
-- 
2.4.10
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] kernel: add missing symbols for 4.1

2016-01-18 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 target/linux/generic/config-4.1 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/generic/config-4.1 b/target/linux/generic/config-4.1
index 222f8c1..d91bedb 100644
--- a/target/linux/generic/config-4.1
+++ b/target/linux/generic/config-4.1
@@ -760,6 +760,8 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 # CONFIG_CRYPTO_DEV_QCE is not set
 # CONFIG_CRYPTO_DEV_SAHARA is not set
 # CONFIG_CRYPTO_DEV_TALITOS is not set
+# CONFIG_CRYPTO_DRBG_CTR is not set
+# CONFIG_CRYPTO_DRBG_HASH is not set
 # CONFIG_CRYPTO_DRBG_MENU is not set
 # CONFIG_CRYPTO_ECB is not set
 # CONFIG_CRYPTO_FCRYPT is not set
-- 
2.4.10
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] brcm63xx: fix gpio ephy-reset

2016-01-18 Thread dani
Thanks Jonas. Tested and working OK. It would be nice if the patch is also
backported to Chaos Calmer revision.

Regards.

2016-01-18 14:16 GMT+01:00 Jonas Gorski :

> Hi,
>
> On 12 December 2015 at 14:10, dani  wrote:
> > Currently ephy-reset, which uses a GPIO for enabling external ethernet
> phys, is broken.
> > This patch fix the problem.
> >
> > This problem causes in boards with external phys with a reset pin
> connected to gpio, are
> > initialized without lan interfaces.
> >
> > The line
> > ephy_reset.table[0].chip_label = gpio_chip_labels[hw_gpio / 32];
> > always returns bcm63xx-gpio.1. As a result of this, reset pins connected
> to gpios <32
> > will return messages "gpio X out of range", and ethernet fails to
> initialize.
> >
> > The array *gpio_chip_labels[] should be initialized with different names
> for each element,
> > otherwise sprintf will copy the label of the gpio chip for both elements
> at the same time.
> > And the name of both elements of the array will be the same.
> >
> > Using a different name on the second array element solves the problem.
> > Signed-off-by: Daniel Gonzalez 
>
> I added a slightly different approach in r48303, can you verify it
> works for you?
>
>
> Jonas
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] oxnas: fix the incorrect board names

2016-01-18 Thread Daniel Golle
Signed-off-by: Shonn Lu 
Acked-by: Daniel Golle 
---
 target/linux/oxnas/base-files/etc/board.d/01_leds | 2 +-
 target/linux/oxnas/base-files/etc/diag.sh | 4 ++--
 target/linux/oxnas/base-files/lib/oxnas.sh| 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/oxnas/base-files/etc/board.d/01_leds 
b/target/linux/oxnas/base-files/etc/board.d/01_leds
index 52da945..f29ccff 100755
--- a/target/linux/oxnas/base-files/etc/board.d/01_leds
+++ b/target/linux/oxnas/base-files/etc/board.d/01_leds
@@ -14,7 +14,7 @@ case $board in
kd20)
ucidef_set_led_default "power" "power" "kd20:blue:status" "1"
;;
-   pogoplugpro | pogoplugv3)
+   pogoplug-pro | pogoplug-v3)
ucidef_set_led_default "power" "power" "pogoplug:blue:internal" 
"1"
;;
 
diff --git a/target/linux/oxnas/base-files/etc/diag.sh 
b/target/linux/oxnas/base-files/etc/diag.sh
index 5370696..8f484ae 100644
--- a/target/linux/oxnas/base-files/etc/diag.sh
+++ b/target/linux/oxnas/base-files/etc/diag.sh
@@ -6,13 +6,13 @@
 
 get_status_led() {
case $(oxnas_board_name) in
-   stg212)
+   stg-212)
status_led="zyxel:blue:status"
;;
kd20)
status_led="kd20:blue:status"
;;
-   pogoplugpro | pogoplugv3)
+   pogoplug-pro | pogoplug-v3)
status_led="pogoplug:blue:internal"
;;
esac
diff --git a/target/linux/oxnas/base-files/lib/oxnas.sh 
b/target/linux/oxnas/base-files/lib/oxnas.sh
index 1a04d55..2a07928 100755
--- a/target/linux/oxnas/base-files/lib/oxnas.sh
+++ b/target/linux/oxnas/base-files/lib/oxnas.sh
@@ -14,16 +14,16 @@ oxnas_board_detect() {
 
case "$machine" in
*"MitraStar Technology Corp. STG-212"*)
-   name="stg212"
+   name="stg-212"
;;
*"Shuttle KD20"*)
name="kd20"
;;
*"Pogoplug Pro"*)
-   name="pogoplugpro"
+   name="pogoplug-pro"
;;
*"Pogoplug V3"*)
-   name="pogoplugv3"
+   name="pogoplug-v3"
;;
esac
 
-- 
2.7.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] oxnas: fix the incorrect board names

2016-01-18 Thread Shonn Lu
Signed-off-by: Shonn Lu 
---
 target/linux/oxnas/base-files/etc/board.d/01_leds | 2 +-
 target/linux/oxnas/base-files/etc/diag.sh | 4 ++--
 target/linux/oxnas/base-files/lib/oxnas.sh| 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/oxnas/base-files/etc/board.d/01_leds 
b/target/linux/oxnas/base-files/etc/board.d/01_leds
index 52da945..f29ccff 100755
--- a/target/linux/oxnas/base-files/etc/board.d/01_leds
+++ b/target/linux/oxnas/base-files/etc/board.d/01_leds
@@ -14,7 +14,7 @@ case $board in
kd20)
ucidef_set_led_default "power" "power" "kd20:blue:status" "1"
;;
-   pogoplugpro | pogoplugv3)
+   pogoplug-pro | pogoplug-v3)
ucidef_set_led_default "power" "power" "pogoplug:blue:internal" 
"1"
;;
 
diff --git a/target/linux/oxnas/base-files/etc/diag.sh 
b/target/linux/oxnas/base-files/etc/diag.sh
index 5370696..8f484ae 100644
--- a/target/linux/oxnas/base-files/etc/diag.sh
+++ b/target/linux/oxnas/base-files/etc/diag.sh
@@ -6,13 +6,13 @@
 
 get_status_led() {
case $(oxnas_board_name) in
-   stg212)
+   stg-212)
status_led="zyxel:blue:status"
;;
kd20)
status_led="kd20:blue:status"
;;
-   pogoplugpro | pogoplugv3)
+   pogoplug-pro | pogoplug-v3)
status_led="pogoplug:blue:internal"
;;
esac
diff --git a/target/linux/oxnas/base-files/lib/oxnas.sh 
b/target/linux/oxnas/base-files/lib/oxnas.sh
index 1a04d55..2a07928 100755
--- a/target/linux/oxnas/base-files/lib/oxnas.sh
+++ b/target/linux/oxnas/base-files/lib/oxnas.sh
@@ -14,16 +14,16 @@ oxnas_board_detect() {
 
case "$machine" in
*"MitraStar Technology Corp. STG-212"*)
-   name="stg212"
+   name="stg-212"
;;
*"Shuttle KD20"*)
name="kd20"
;;
*"Pogoplug Pro"*)
-   name="pogoplugpro"
+   name="pogoplug-pro"
;;
*"Pogoplug V3"*)
-   name="pogoplugv3"
+   name="pogoplug-v3"
;;
esac
 
-- 
2.7.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] oxnas: prepare platform and drivers for Linux 4.4

2016-01-18 Thread Daniel Golle
Signed-off-by: Daniel Golle 
---
 target/linux/oxnas/files/arch/arm/mach-oxnas/mach-ox820.c | 5 +
 target/linux/oxnas/files/drivers/irqchip/irq-rps.c| 4 
 2 files changed, 9 insertions(+)

diff --git a/target/linux/oxnas/files/arch/arm/mach-oxnas/mach-ox820.c 
b/target/linux/oxnas/files/arch/arm/mach-oxnas/mach-ox820.c
index 718bad7..2a8ada8 100644
--- a/target/linux/oxnas/files/arch/arm/mach-oxnas/mach-ox820.c
+++ b/target/linux/oxnas/files/arch/arm/mach-oxnas/mach-ox820.c
@@ -8,6 +8,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -73,7 +74,11 @@ static void __init ox820_dt_init(void)
 static void __init ox820_timer_init(void)
 {
of_clk_init(NULL);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)
clocksource_of_init();
+#else
+   clocksource_probe();
+#endif
 }
 
 void ox820_init_early(void)
diff --git a/target/linux/oxnas/files/drivers/irqchip/irq-rps.c 
b/target/linux/oxnas/files/drivers/irqchip/irq-rps.c
index 48b5d68..2c4f688 100644
--- a/target/linux/oxnas/files/drivers/irqchip/irq-rps.c
+++ b/target/linux/oxnas/files/drivers/irqchip/irq-rps.c
@@ -62,7 +62,11 @@ static int rps_irq_domain_xlate(struct irq_domain *d,
unsigned long *out_hwirq,
unsigned int *out_type)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)
if (d->of_node != controller)
+#else
+   if (irq_domain_get_of_node(d) != controller)
+#endif
return -EINVAL;
if (intsize < 1)
return -EINVAL;
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] oxnas: add patches and config for Linux 4.4

2016-01-18 Thread Daniel Golle
Signed-off-by: Daniel Golle 
---
 target/linux/oxnas/config-4.4  | 383 +
 .../010-arm_introduce-dma-fiq-irq-broadcast.patch  |  68 
 .../250-add-plxtech-vendor-prefix.patch|  10 +
 .../patches-4.4/300-introduce-oxnas-platform.patch |  71 
 .../oxnas/patches-4.4/310-oxnas-clocksource.patch  |  25 ++
 .../oxnas/patches-4.4/320-oxnas-irqchip.patch  |  34 ++
 .../oxnas/patches-4.4/330-oxnas-pinctrl.patch  |  28 ++
 .../linux/oxnas/patches-4.4/340-oxnas-pcie.patch   |  22 ++
 .../linux/oxnas/patches-4.4/350-oxnas-reset.patch  |  20 ++
 .../linux/oxnas/patches-4.4/400-oxnas-nand.patch   |  25 ++
 .../linux/oxnas/patches-4.4/500-oxnas-sata.patch   |  26 ++
 .../linux/oxnas/patches-4.4/700-oxnas-dwmac.patch  |  29 ++
 .../linux/oxnas/patches-4.4/800-oxnas-ehci.patch   |  26 ++
 .../linux/oxnas/patches-4.4/900-more-boards.patch  |  14 +
 .../linux/oxnas/patches-4.4/999-libata-hacks.patch |  57 +++
 15 files changed, 838 insertions(+)
 create mode 100644 target/linux/oxnas/config-4.4
 create mode 100644 
target/linux/oxnas/patches-4.4/010-arm_introduce-dma-fiq-irq-broadcast.patch
 create mode 100644 
target/linux/oxnas/patches-4.4/250-add-plxtech-vendor-prefix.patch
 create mode 100644 
target/linux/oxnas/patches-4.4/300-introduce-oxnas-platform.patch
 create mode 100644 target/linux/oxnas/patches-4.4/310-oxnas-clocksource.patch
 create mode 100644 target/linux/oxnas/patches-4.4/320-oxnas-irqchip.patch
 create mode 100644 target/linux/oxnas/patches-4.4/330-oxnas-pinctrl.patch
 create mode 100644 target/linux/oxnas/patches-4.4/340-oxnas-pcie.patch
 create mode 100644 target/linux/oxnas/patches-4.4/350-oxnas-reset.patch
 create mode 100644 target/linux/oxnas/patches-4.4/400-oxnas-nand.patch
 create mode 100644 target/linux/oxnas/patches-4.4/500-oxnas-sata.patch
 create mode 100644 target/linux/oxnas/patches-4.4/700-oxnas-dwmac.patch
 create mode 100644 target/linux/oxnas/patches-4.4/800-oxnas-ehci.patch
 create mode 100644 target/linux/oxnas/patches-4.4/900-more-boards.patch
 create mode 100644 target/linux/oxnas/patches-4.4/999-libata-hacks.patch

diff --git a/target/linux/oxnas/config-4.4 b/target/linux/oxnas/config-4.4
new file mode 100644
index 000..07ce8b2
--- /dev/null
+++ b/target/linux/oxnas/config-4.4
@@ -0,0 +1,383 @@
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
+CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
+CONFIG_ARCH_HAS_RESET_CONTROLLER=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_NR_GPIO=0
+CONFIG_ARCH_OXNAS=y
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
+CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_USE_BUILTIN_BSWAP=y
+CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
+CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+CONFIG_ARCH_WANT_LIBATA_LEDS=y
+CONFIG_ARM=y
+CONFIG_ARM_CPUIDLE=y
+# CONFIG_ARM_CPU_SUSPEND is not set
+CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8
+CONFIG_ARM_DMA_USE_IOMMU=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_L1_CACHE_SHIFT=5
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_SMMU=y
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ATA_LEDS=y
+CONFIG_AUTO_ZRELADDR=y
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_SD=y
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1
+# CONFIG_CACHE_L2X0 is not set
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLKSRC_OF=y
+CONFIG_CLKSRC_PROBE=y
+CONFIG_CLKSRC_RPS_TIMER=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="console=ttyS0,115200n8 earlyprintk=serial"
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACTION=y
+CONFIG_CONSOLE_POLL=y
+CONFIG_COREDUMP=y
+CONFIG_CPU_32v6=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_ABRT_EV6=y
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_CPU_CACHE_V6=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=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_PM=y
+CONFIG_CPU_RMAP=y
+# CONFIG_CPU_SW_DOMAIN_PAN is not set
+CONFIG_CPU_TLB_V6=y
+CONFIG_CPU_V6K=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_WORKQUEUE=y
+CONFIG_CRYPTO_XZ=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_ICEDCC=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_INCLUDE="debug/icedcc.S"
+# CONFIG_DEBUG_UART_8250 is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=16
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DIRECT_IO=y
+CONFIG_DMADEVICES=y
+CONFIG_D

[OpenWrt-Devel] [PATCH 4/4] oxnas: switch to Linux 4.4

2016-01-18 Thread Daniel Golle
Signed-off-by: Daniel Golle 
---
 target/linux/oxnas/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/oxnas/Makefile b/target/linux/oxnas/Makefile
index 2d244db..f4a01f1 100644
--- a/target/linux/oxnas/Makefile
+++ b/target/linux/oxnas/Makefile
@@ -15,7 +15,7 @@ CPU_TYPE:=mpcore
 
 MAINTAINER:=Daniel Golle 
 
-KERNEL_PATCHVER:=4.1
+KERNEL_PATCHVER:=4.4
 
 include $(INCLUDE_DIR)/target.mk
 
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH for netifd] wireless: rename 'wpa_pairwise' variable to 'wpa_cipher'

2016-01-18 Thread Daniel Golle
We shall enforce the cipher for both, pairwise and group, thus change
the name of the variable to a more generic phrasing, 'cipher' instead
of 'pairwise'.

Signed-off-by: Daniel Golle 
---
 scripts/netifd-wireless.sh | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/scripts/netifd-wireless.sh b/scripts/netifd-wireless.sh
index d5f3867..a0f91ed 100644
--- a/scripts/netifd-wireless.sh
+++ b/scripts/netifd-wireless.sh
@@ -195,15 +195,15 @@ wireless_vif_parse_encryption() {
auth_mode_open=1
auth_mode_shared=0
auth_type=none
-   wpa_pairwise=CCMP
+   wpa_cipher=CCMP
case "$encryption" in
-   *tkip+aes|*tkip+ccmp|*aes+tkip|*ccmp+tkip) wpa_pairwise="CCMP 
TKIP";;
-   *aes|*ccmp) wpa_pairwise="CCMP";;
-   *tkip) wpa_pairwise="TKIP";;
+   *tkip+aes|*tkip+ccmp|*aes+tkip|*ccmp+tkip) wpa_cipher="CCMP 
TKIP";;
+   *aes|*ccmp) wpa_cipher="CCMP";;
+   *tkip) wpa_cipher="TKIP";;
esac
 
# 802.11n requires CCMP for WPA
-   [ "$enable_ht:$wpa_pairwise" = "1:TKIP" ] && wpa_pairwise="CCMP TKIP"
+   [ "$enable_ht:$wpa_cipher" = "1:TKIP" ] && wpa_cipher="CCMP TKIP"
 
# Examples:
# psk-mixed/tkip=> WPA1+2 PSK, TKIP
@@ -222,7 +222,7 @@ wireless_vif_parse_encryption() {
;;
*)
wpa=0
-   wpa_pairwise=
+   wpa_cipher=
;;
esac
 
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] HiLink HLK-RM04 image name typo (RM02 -> RM04)

2016-01-18 Thread Felix Fietkau
On 2016-01-18 20:00, John Clark wrote:
> I apologize for the first two messages (/patch/569488/ and /patch/569490/) 
> where the patch had unwanted line breaks -- sending this one using git 
> send-email.
> 
> The image name for the HiLink HLK-RM04 module has a typo and should read 
> "RM04" rather than "RM02"
> 
> Signed-off-by: John Clark 
Now it's missing the "ramips: " part in the subject.
Also, please only put a proper patch description in the main message
text. You can add comments below it by putting them below a line with
"---" so they don't end up in the commit message.

Thanks,

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


[OpenWrt-Devel] [PATCH] ramips: HiLink HLK-RM04 image name typo (RM02 -> RM04)

2016-01-18 Thread John Clark
The image name for the HiLink HLK-RM04 module has a typo and should read "RM04" 
rather than "RM02"

Signed-off-by: John Clark 
---
 target/linux/ramips/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index 2427ac6..55b9cf4 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -592,7 +592,7 @@ define BuildFirmware/HLKRM04/initramfs
$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3),$(4))
mkhilinkfw -e -i$(call imgname,$(1),$(2))-uImage.bin -o $(call 
imgname,$(1),$(2))-factory.bin;
 endef
-Image/Build/Profile/HLKRM04=$(call 
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM02)
+Image/Build/Profile/HLKRM04=$(call 
BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM04)
 
 Image/Build/Profile/HT-TM02=$(call 
BuildFirmware/Default8M/$(1),$(1),ht-tm02,HT-TM02)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] uhttpd: add option for mbedtls

2016-01-18 Thread Daniel Golle
Signed-off-by: Daniel Golle 
---
 package/network/services/uhttpd/Makefile | 4 
 1 file changed, 4 insertions(+)

diff --git a/package/network/services/uhttpd/Makefile 
b/package/network/services/uhttpd/Makefile
index 2b05abf..da5572b 100644
--- a/package/network/services/uhttpd/Makefile
+++ b/package/network/services/uhttpd/Makefile
@@ -54,6 +54,7 @@ define Package/uhttpd-mod-tls
   TITLE+= (TLS plugin)
   DEPENDS:=uhttpd \
+PACKAGE_uhttpd-mod-tls_polarssl:libustream-polarssl \
+   +PACKAGE_uhttpd-mod-tls_mbedtls:libustream-mbedtls \
+PACKAGE_uhttpd-mod-tls_cyassl:libustream-cyassl \
+PACKAGE_uhttpd-mod-tls_openssl:libustream-openssl
 endef
@@ -68,6 +69,9 @@ define Package/uhttpd-mod-tls/config
 prompt "TLS Provider"
 default PACKAGE_uhttpd-mod-tls_polarssl
 
+config PACKAGE_uhttpd-mod-tls_mbedtls
+  bool "mbedTLS"
+
 config PACKAGE_uhttpd-mod-tls_polarssl
   bool "PolarSSL"
 
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] hostap/wpa_supplicant: enable EAP-FAST in -full builds

2016-01-18 Thread Daniel Golle
Signed-off-by: Daniel Golle 
---
 package/network/services/hostapd/files/hostapd-full.config| 3 +++
 package/network/services/hostapd/files/wpa_supplicant-full.config | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/package/network/services/hostapd/files/hostapd-full.config 
b/package/network/services/hostapd/files/hostapd-full.config
index f1b2655..681e9df 100644
--- a/package/network/services/hostapd/files/hostapd-full.config
+++ b/package/network/services/hostapd/files/hostapd-full.config
@@ -53,6 +53,9 @@ CONFIG_PEERKEY=y
 # Integrated EAP server
 CONFIG_EAP=y
 
+# EAP-FAST for the integrated EAP server
+CONFIG_EAP_FAST=y
+
 # EAP-MD5 for the integrated EAP server
 CONFIG_EAP_MD5=y
 
diff --git a/package/network/services/hostapd/files/wpa_supplicant-full.config 
b/package/network/services/hostapd/files/wpa_supplicant-full.config
index 26e3c80..53c0762 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-full.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-full.config
@@ -121,6 +121,9 @@ CONFIG_DRIVER_WIRED=y
 # included)
 CONFIG_IEEE8021X_EAPOL=y
 
+# EAP-FAST
+CONFIG_EAP_FAST=y
+
 # EAP-MD5
 CONFIG_EAP_MD5=y
 
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] wpa_supplicant: add support for EAP-TLS phase2

2016-01-18 Thread Daniel Golle
Introduce config options client_cert2, priv_key2 and priv_key2_pwd
used for EAP-TLS phase2 authentication in WPA-EAP client mode.

Signed-off-by: Daniel Golle 
---
 package/network/services/hostapd/files/netifd.sh | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index cedf5d5..ad96b8b 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -634,8 +634,19 @@ wpa_supplicant_add_network() {
append network_data 
"private_key_passwd=\"$priv_key_pwd\"" "$N$T"
;;
fast|peap|ttls)
-   json_get_vars auth password
+   json_get_vars auth password ca_cert2 
client_cert2 priv_key2 priv_key2_pwd
set_default auth MSCHAPV2
+
+   if [ "$auth" = "EAP-TLS" ]; then
+   [ -n "$ca_cert2" ] &&
+   append network_data 
"ca_cert2=\"$ca_cert2\"" "$N$T"
+   append network_data 
"client_cert2=\"$client_cert2\"" "$N$T"
+   append network_data 
"private_key2=\"$priv_key2\"" "$N$T"
+   append network_data 
"private_key2_passwd=\"$priv_key2_pwd\"" "$N$T"
+   else
+   append network_data 
"password=\"$password\"" "$N$T"
+   fi
+
phase2proto="auth="
case "$auth" in
"auth"*)
@@ -648,7 +659,6 @@ wpa_supplicant_add_network() {
;;
esac
append network_data 
"phase2=\"$phase2proto$auth\"" "$N$T"
-   append network_data 
"password=\"$password\"" "$N$T"
;;
esac
append network_data "eap=$(echo $eap_type | tr 'a-z' 
'A-Z')" "$N$T"
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] wpa_supplicant: enforce cipher in client mode and cosmetics

2016-01-18 Thread Daniel Golle
Set both group and pairwise cipher for wpa_supplicant if cipher
is set.
Depends on netifd patch http://patchwork.ozlabs.org/patch/569702/
for cosmetic reasons and changes the use of no longer set
$wpa_pairwise into $wpa_cipher also for AP mode.

Signed-off-by: Daniel Golle 
---
 package/network/services/hostapd/files/netifd.sh | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/netifd.sh 
b/package/network/services/hostapd/files/netifd.sh
index ad96b8b..b7e3721 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -318,7 +318,7 @@ hostapd_set_bss_options() {
local auth_algs=$((($auth_mode_shared << 1) | $auth_mode_open))
append bss_conf "auth_algs=${auth_algs:-1}" "$N"
append bss_conf "wpa=$wpa" "$N"
-   [ -n "$wpa_pairwise" ] && append bss_conf "wpa_pairwise=$wpa_pairwise" 
"$N"
+   [ -n "$wpa_cipher" ] && append bss_conf "wpa_pairwise=$wpa_cipher" "$N"
 
set_default wps_pushbutton 0
set_default wps_label 0
@@ -675,6 +675,11 @@ wpa_supplicant_add_network() {
;;
esac
 
+   if [ -n "$wpa_cipher" ]; then
+   append network_data "pairwise=$wpa_cipher" "$N$T"
+   append network_data "group=$wpa_cipher" "$N$T"
+   fi
+
case "$ieee80211w" in
[012])
[ "$wpa" -ge 2 ] && append network_data 
"ieee80211w=$ieee80211w" "$N$T"
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] John, no permission to change patches even own

2016-01-18 Thread Daniel Dickinson

Hi John,

Contrary to what you believed it is not possible for the ordinary users 
(of which I am one at the moment) to modify their own patches, so I 
can't discard, archive, or otherwise do anything to patches even my own.


Regards,

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


[OpenWrt-Devel] [PATCH 00/13] Allow to build subset of profiles for target

2016-01-18 Thread openwrt
This patch series enables the selection and building of a subset
of profiles to build for a target, rather than the previous
limitation of only being able to build a single target (although
some platforms had profiles that built all other profiles for
the target, but that still ends up as an all-or-one proposition).

The first patch provides the infrastracture in the build system
to handle multiple profiles as well as the metadata infrastracture
which later patches use to provide profiles that select all other
profiles, or which allow a 'single profile' override that allows
selecting the same profiles as were previously available (either
an individual profiles, or a profile that builds all other profiles).

In the metadata the 'all profiles' profile and 'minimal' profiles
are not hardcoded but are managed via options in the metadata.

For the actual profiles definitions, I have made the profile name
All (display text 'All Profiles') the one that selects all other
profiles, and generally allowed a Default profile, but with a
make flag to skip building it (so that default can select a default
set of packages, without being a profile that actually builds
anything).

For some targets I have added the 'All' profile only do the default
of selecting all profiles but not had it skip trying to build all
other profiles (and for the targets which did not already have
a build all profile, don't allow selecting the 'All' profile as
the 'single profile' option since I didn't want to get into adding
the build all profile as part of this patch series).

[PATCH 01/13] build metadata: Allow to build a subset of profiles in
[PATCH 02/13] ar71xx: Allow to select a subset of profiles for
[PATCH 03/13] at91: Translate the build all profiles profile to new
[PATCH 04/13] mvebu: Translate the build all profiles profile to new
[PATCH 05/13] ramips: Translate the build all profiles profile to new
[PATCH 06/13] mpc85xx: Translate the build all profiles profile to
[PATCH 07/13] arc770: Translate the build all profiles profile to new
[PATCH 08/13] brcm63xx: Translate the build all profiles profile to
[PATCH 09/13] sunxi: Add an 'All Profiles' profile
[PATCH 10/13] kirkwood: Add an 'All Profiles' profile
[PATCH 11/13] adm5120: Translate existing all profiles profiles to
[PATCH 12/13] lantiq: Add an 'All Profiles' profile
[PATCH 13/13] brcm47xx: Add an 'All Profiles' profile
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 03/13] at91: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/at91/image/Makefile|  2 +-
 target/linux/at91/legacy/profiles/00-default.mk |  1 +
 target/linux/at91/legacy/profiles/01-all.mk | 16 
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/at91/legacy/profiles/01-all.mk

diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile
index 648b7f5..0cea83a 100644
--- a/target/linux/at91/image/Makefile
+++ b/target/linux/at91/image/Makefile
@@ -66,7 +66,7 @@ Image/Build/Kernel/ETHERNUT5=$(call 
MkuImageDtb,ethernut5,ethernut5)
 Image/Build/Kernel/Q5XR5=$(call MkOftree,q5xr5,at91-q5xr5)
 
 
-define Image/Build/Kernel/Default
+define Image/Build/Kernel/All
$(call Image/Build/Kernel/AT91SAM9263EK)
$(call Image/Build/Kernel/AT91SAM9G15EK)
$(call Image/Build/Kernel/AT91SAM9G20EK)
diff --git a/target/linux/at91/legacy/profiles/00-default.mk 
b/target/linux/at91/legacy/profiles/00-default.mk
index 3ff040d..9a1192f 100644
--- a/target/linux/at91/legacy/profiles/00-default.mk
+++ b/target/linux/at91/legacy/profiles/00-default.mk
@@ -7,6 +7,7 @@
 
 define Profile/Default
NAME:=Default Profile
+   PROFILE_SKIP_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/at91/legacy/profiles/01-all.mk 
b/target/linux/at91/legacy/profiles/01-all.mk
new file mode 100644
index 000..1c4c5d7
--- /dev/null
+++ b/target/linux/at91/legacy/profiles/01-all.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 02/13] ar71xx: Allow to select a subset of profiles for building

2016-01-18 Thread openwrt
From: Daniel Dickinson 

ar71xx is has one of the largest sets of images and it is
therefore very useful to be able select a subset > 1 of
target profiles for a build.  This patch adds the menuconfig
and ar71xx image makefile parts needed to enable this
functionality.

Signed-off-by: Daniel Dickinson 
---
 package/boot/uboot-ar71xx/Makefile  |  2 +-
 target/linux/ar71xx/generic/profiles/00-all.mk  | 15 +++
 target/linux/ar71xx/generic/profiles/00-default.mk  | 17 -
 target/linux/ar71xx/generic/profiles/000-default.mk | 18 ++
 target/linux/ar71xx/image/Makefile  |  7 ---
 target/linux/ar71xx/nand/profiles/00-all.mk | 15 +++
 target/linux/ar71xx/nand/profiles/000-default.mk| 16 
 7 files changed, 69 insertions(+), 21 deletions(-)
 create mode 100644 target/linux/ar71xx/generic/profiles/00-all.mk
 delete mode 100644 target/linux/ar71xx/generic/profiles/00-default.mk
 create mode 100644 target/linux/ar71xx/generic/profiles/000-default.mk
 create mode 100644 target/linux/ar71xx/nand/profiles/00-all.mk
 create mode 100644 target/linux/ar71xx/nand/profiles/000-default.mk

diff --git a/package/boot/uboot-ar71xx/Makefile 
b/package/boot/uboot-ar71xx/Makefile
index 7c4bb6c..e92faa0 100644
--- a/package/boot/uboot-ar71xx/Makefile
+++ b/package/boot/uboot-ar71xx/Makefile
@@ -44,7 +44,7 @@ define Package/uboot-ar71xx-$(1)
   TITLE:=$(2)
   DEPENDS:=@TARGET_ar71xx_generic
   URL:=http://www.denx.de/wiki/U-Boot
-  DEFAULT:=y if (TARGET_ar71xx_generic_NBG_460N_550N_550NH || 
TARGET_ar71xx_generic_Default || CONFIG_TARGET_ar71xx_generic_Minimal)
+  DEFAULT:=y if (TARGET_ar71xx_generic_NBG_460N_550N_550NH || 
TARGET_ar71xx_generic_All || CONFIG_TARGET_ar71xx_generic_Minimal)
   VARIANT:=$(1)
 endef
 endef
diff --git a/target/linux/ar71xx/generic/profiles/00-all.mk 
b/target/linux/ar71xx/generic/profiles/00-all.mk
new file mode 100644
index 000..09dfa79
--- /dev/null
+++ b/target/linux/ar71xx/generic/profiles/00-all.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   All selects building images for all profiles
+endef
+$(eval $(call Profile,All))
diff --git a/target/linux/ar71xx/generic/profiles/00-default.mk 
b/target/linux/ar71xx/generic/profiles/00-default.mk
deleted file mode 100644
index 36c4aa6..000
--- a/target/linux/ar71xx/generic/profiles/00-default.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Default
-   NAME:=Default Profile (all drivers)
-   PACKAGES:= \
-   kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
-endef
-
-define Profile/Default/Description
-   Default package set compatible with most boards.
-endef
-$(eval $(call Profile,Default))
diff --git a/target/linux/ar71xx/generic/profiles/000-default.mk 
b/target/linux/ar71xx/generic/profiles/000-default.mk
new file mode 100644
index 000..a38f82d
--- /dev/null
+++ b/target/linux/ar71xx/generic/profiles/000-default.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+   NAME:=Default Profile
+   PACKAGES:= \
+   kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
+   PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 22fe1fe..a94d893 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -10,7 +10,7 @@ JFFS2_BLOCKSIZE = 64k 128k 256k
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-IMAGE_PROFILE:=$(if $(PROFILE),$(PROFILE),Default)
+IMAGE_PROFILE:=$$(if $$(1),$$(1),All)
 
 KERNEL_LOADADDR = 0x8006
 
@@ -143,7 +143,7 @@ DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE
 define Device/Default
   BOARDNAME :=
   DEVICE_PROFILE = $$(BOARDNAME)
-  PROFILES = Default Minimal $$(DEVICE_PROFILE)
+  PROFILES = All Minimal $$(DEVICE_PROFILE)
   MTDPARTS :=
   IMAGES := sysupgrade.bin
   BLOCKSIZE := 64k
@@ -1386,6 +1386,7 @@ endef
 define MkuImageOKLI
$(call MkuImage,lzma,-M 
0x4f4b4c49,$(KDIR)/vmlinux.bin.lzma,$(KDIR_TMP)/vmlinux-$(1).okli)
 endef
+
 endif
 
 # $(1): name of the 1st file.
@@ -2529,7 +2530,7 @@ $(eval $(call MultiProfile,WNDR4300,WNDR3700V4 
WNDR4300V1))
 endif # ifeq ($(SUBTARGET),nand)
 
 
-$(eval $(call MultiProfile,Default,$(SINGLE_PROFILES)))
+$(eval $(call MultiPro

[OpenWrt-Devel] [PATCH 09/13] sunxi: Add an 'All Profiles' profile

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Sunxi has enough images to make it useful to get all profiles
and multi-profile select working properly, so this patch adds
an 'All Profiles' profile, however it is only used to allow
KConfig to select all profiles and is not used standalone to
build all targets, due to the differences in devices that would
result in every image having a number of packages selected
by other profiles but not applicable the current image.

Signed-off-by: Daniel Dickinson 
---
 target/linux/sunxi/image/Makefile |  8 +---
 target/linux/sunxi/profiles/00-default.mk | 17 +
 target/linux/sunxi/profiles/01-all.mk | 18 ++
 target/linux/sunxi/profiles/01-default.mk | 17 -
 4 files changed, 40 insertions(+), 20 deletions(-)
 create mode 100644 target/linux/sunxi/profiles/00-default.mk
 create mode 100644 target/linux/sunxi/profiles/01-all.mk
 delete mode 100644 target/linux/sunxi/profiles/01-default.mk

diff --git a/target/linux/sunxi/image/Makefile 
b/target/linux/sunxi/image/Makefile
index 6758ba1..a17e1a2 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -106,13 +106,15 @@ endef
 define Image/Build/Profile/Linksprite_pcDuino3
$(call Image/Build/SDCard,$(1),sun7i-a20-pcduino3,$(2))
 endef
-endef
 
-define Image/Build
+define Image/Build/Default
$(call Image/Build/$(1),$(1),$(2))
$(call Image/Build/Profile/$(2),$(1),$(2))
-
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k 
conv=sync
 endef
 
+define Image/Build
+   $(if $(filter-out All,$(2))$(call Image/Build/Default,$(1),$(2)))
+endef
+
 $(eval $(call BuildImage))
diff --git a/target/linux/sunxi/profiles/00-default.mk 
b/target/linux/sunxi/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/sunxi/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/sunxi/profiles/01-all.mk 
b/target/linux/sunxi/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/sunxi/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/sunxi/profiles/01-default.mk 
b/target/linux/sunxi/profiles/01-default.mk
deleted file mode 100644
index 7d83440..000
--- a/target/linux/sunxi/profiles/01-default.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Default
-  NAME:=Default package set
-  PACKAGES += uboot-sunxi-A13-OLinuXino
-endef
-
-define Profile/Default/Description
-   Default package set compatible with most boards.
-endef
-$(eval $(call Profile,Default))
-
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 01/13] build metadata: Allow to build a subset of profiles in a single build

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Certain platforms have large numbers of possible images, and it can be
desirable to build neither all images nor only a single image,
therefore this patch makes selecting target profiles a menu instead of a
single choice, which allows the user to build a specific subset of all
possible images for a target.

This patch contains only the build machinery changes to support
selecting multiple images and the .config generator, but does
not include profile changes that are needed to make selecting
multiple profiles possible in menuconfig.

This is done to isolate the changes as much as possible, although
obviously this patch touches a greaty many files due to changing
the image generation logic (which is necessary in order to
eliminate the single-valued PROFILE variable, which gets in the
way of allowing multiple images to be built at once.

Signed-off-by: Daniel Dickinson 
---
 include/image.mk | 60 +++---
 include/target.mk|  7 ++-
 scripts/metadata.pl  | 83 ++--
 scripts/metadata.pm  |  5 +++
 target/imagebuilder/files/Makefile   |  5 ++-
 target/linux/adm5120/image/Makefile  |  4 +-
 target/linux/ar71xx/image/Makefile   | 13 +++---
 target/linux/at91/image/Makefile |  2 +-
 target/linux/au1000/image/Makefile   |  2 +-
 target/linux/brcm47xx/image/Makefile |  2 +-
 target/linux/cns3xxx/image/Makefile  |  2 +-
 target/linux/gemini/image/Makefile   |  4 +-
 target/linux/ipq806x/image/Makefile  |  2 +-
 target/linux/ixp4xx/image/Makefile   |  2 +-
 target/linux/kirkwood/image/Makefile | 62 +--
 target/linux/lantiq/image/Makefile   | 43 +--
 target/linux/malta/image/Makefile|  2 +-
 target/linux/mcs814x/image/Makefile  |  4 +-
 target/linux/mediatek/image/Makefile |  2 +-
 target/linux/mpc85xx/image/Makefile  |  6 +--
 target/linux/mvebu/image/Makefile| 10 ++---
 target/linux/mxs/image/Makefile  |  4 +-
 target/linux/netlogic/image/Makefile |  2 +-
 target/linux/octeon/image/Makefile   |  2 +-
 target/linux/omap/image/Makefile |  2 +-
 target/linux/omap24xx/image/Makefile |  2 +-
 target/linux/oxnas/image/Makefile| 22 +-
 target/linux/ppc40x/image/Makefile   |  4 +-
 target/linux/ppc44x/image/Makefile   |  2 +-
 target/linux/ramips/image/Makefile   |  8 ++--
 target/linux/rb532/image/Makefile|  2 +-
 target/linux/realview/image/Makefile |  6 +--
 target/linux/sunxi/image/Makefile| 51 +++---
 target/linux/x86/image/Makefile  | 14 +++---
 34 files changed, 271 insertions(+), 172 deletions(-)

diff --git a/include/image.mk b/include/image.mk
index 4eee4ad..bb46bb9 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -90,8 +90,6 @@ define add_jffs2_mark
echo -ne '\xde\xad\xc0\xde' >> $(1)
 endef
 
-PROFILE_SANITIZED := $(call sanitize,$(PROFILE))
-
 define split_args
 $(foreach data, \
$(subst |,$(space),\
@@ -114,8 +112,9 @@ define prepare_generic_squashfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(1) 4 8 16 64 128 256
 endef
 
+# $(1) profile
 define Image/BuildKernel/Initramfs
-   $(call Image/Build/Initramfs)
+   $(call Image/Build/Initramfs,$(1))
 endef
 
 define Image/BuildKernel/MkuImage
@@ -192,7 +191,7 @@ ifneq ($(CONFIG_NAND_SUPPORT),)
 # $(1) board name
 # $(2) ubinize-image options (e.g. --uboot-env and/or --kernel kernelimage)
 # $(3) rootfstype (e.g. squashfs or ubifs)
-# $(4) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS)))
+# $(4) options to pass-through to ubinize (i.e. $(_UBI_OPTS)))
define Image/Build/UbinizeImage
sh $(TOPDIR)/scripts/ubinize-image.sh $(2) \
"$(KDIR)/root.$(3)" \
@@ -203,12 +202,13 @@ ifneq ($(CONFIG_NAND_SUPPORT),)
 endif
 
 ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
+# $(1) profile
 define Image/mkfs/ubifs/generate
$(CP) ./ubinize$(1).cfg $(KDIR)
( cd $(KDIR); \
$(STAGING_DIR_HOST)/bin/ubinize \
-   $(if $($(PROFILE)_UBI_OPTS), \
-   $(shell echo $($(PROFILE)_UBI_OPTS)), \
+   $(if $($(1)_UBI_OPTS), \
+   $(shell echo $($(1)_UBI_OPTS)), \
$(shell echo $(UBI_OPTS)) \
) \
-o $(KDIR)/root$(1).ubi \
@@ -216,12 +216,13 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
)
 endef
 
+# $(1) profile
 define Image/mkfs/ubifs
 
-ifneq ($($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS),)
+ifneq ($($(1)_UBIFS_OPTS)$(UBIFS_OPTS),)
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
-   $(if $($(PROFILE)_UBIFS_OPTS), \
-   $(shell echo $($(PROFILE)_UBIFS_OPTS)), \
+   $(if $($(1)_UBIFS_OPTS), \
+   $(shell echo $($(1)_UBIFS_OPTS)), \
$(shell echo $(UBIFS_OPTS)) \
) \
  

[OpenWrt-Devel] [PATCH 11/13] adm5120: Translate existing all profiles profiles to new mult-select structure

2016-01-18 Thread openwrt
From: Daniel Dickinson 

For adm5120 the Generic profile was used to build images for all profiles; 
change
this to the All profile and integrate with multiple (but not all) profile build
mechanism.

Signed-off-by: Daniel Dickinson 
---
 target/linux/adm5120/image/Makefile|  12 +-
 target/linux/adm5120/image/rb1xx.mk|   8 +-
 target/linux/adm5120/image/router_be.mk|  17 ++-
 target/linux/adm5120/image/router_le.mk| 137 -
 target/linux/adm5120/rb1xx/profiles/000-default.mk |  19 +++
 target/linux/adm5120/rb1xx/profiles/005-all.mk |  17 +++
 .../adm5120/router_be/profiles/000-default.mk  |  19 +++
 target/linux/adm5120/router_be/profiles/005-all.mk |  17 +++
 .../adm5120/router_le/profiles/000-default.mk  |  19 +++
 target/linux/adm5120/router_le/profiles/005-all.mk |  17 +++
 .../adm5120/router_le/profiles/010-Generic.mk  |  10 --
 11 files changed, 277 insertions(+), 15 deletions(-)
 create mode 100644 target/linux/adm5120/rb1xx/profiles/000-default.mk
 create mode 100644 target/linux/adm5120/rb1xx/profiles/005-all.mk
 create mode 100644 target/linux/adm5120/router_be/profiles/000-default.mk
 create mode 100644 target/linux/adm5120/router_be/profiles/005-all.mk
 create mode 100644 target/linux/adm5120/router_le/profiles/000-default.mk
 create mode 100644 target/linux/adm5120/router_le/profiles/005-all.mk

diff --git a/target/linux/adm5120/image/Makefile 
b/target/linux/adm5120/image/Makefile
index c0864b7..9adbb96 100644
--- a/target/linux/adm5120/image/Makefile
+++ b/target/linux/adm5120/image/Makefile
@@ -22,10 +22,18 @@ fs_4k:=4k
 fs_64k:=64k
 fs_128k:=128k
 
+define Device/Default
+  PROFILES = All $$(DEVICE_PROFILE)
+endef
+
 define Build/Clean
$(LOADER_MAKE) clean
 endef
 
+define Device/Build/image
+
+endef
+
 define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 
-lp2 -pb2 > $(KDIR)/vmlinux.lzma
rm -f $(JFFS2BLOCK)
@@ -93,11 +101,11 @@ endef
 include $(SUBTARGET).mk
 
 define Image/Build
-   $(call Image/Build/Profile/$(2),$(1))
+   $(call Image/Build/Profile/$(2),$(1),$(2))
 endef
 
 define Image/Build/Initramfs
-   $(call Image/Build/Profile/$(2),Initramfs)
+   $(call Image/Build/Profile/$(1),Initramfs,$(1))
 endef
 
 define Image/BuildKernel
diff --git a/target/linux/adm5120/image/rb1xx.mk 
b/target/linux/adm5120/image/rb1xx.mk
index 3552958..1354a67 100644
--- a/target/linux/adm5120/image/rb1xx.mk
+++ b/target/linux/adm5120/image/rb1xx.mk
@@ -5,7 +5,6 @@
 # See /LICENSE for more information.
 #
 
-
 define Image/cmdline/yaffs2
root=/dev/mtdblock3 rootfstype=yaffs2
 endef
@@ -16,9 +15,16 @@ define Image/BuildKernel/RouterBoard
'$(strip $(call Image/cmdline/yaffs2))'
 endef
 
+Image/BuildKernel/All=$(call Image/BuildKernel/RouterBoard)
+
 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
   define Image/BuildKernel
$(call Image/BuildKernel/RouterBoard)
   endef
 endif
 
+define Device/RouterBoard
+  DEVICE_PROFILE := RouterBoard
+endef
+
+TARGET_DEVICES = RouterBoard
diff --git a/target/linux/adm5120/image/router_be.mk 
b/target/linux/adm5120/image/router_be.mk
index 5a16672..61dd3e1 100644
--- a/target/linux/adm5120/image/router_be.mk
+++ b/target/linux/adm5120/image/router_be.mk
@@ -14,6 +14,7 @@ define Image/Build/ZyXEL
-o $(call imgname,$(1),$(2))-webui.bin
 endef
 
+
 define Image/Build/Template/ZyXEL
$(call Image/Build/ZyXEL,$(1),$(2))
 endef
@@ -33,15 +34,29 @@ endef
 #
 # Profiles
 #
+define Device/P334WT
+  DEVICE_PROFILE := P33WT
+  IMAGES := squashfs trx
+endef
+
+TARGET_DEVICES += P334WT
+
 define Image/Build/Profile/P334WT
$(call Image/Build/Template/ZyXEL/$(1),p-334wt)
 endef
 
+define Device/P335WT
+  DEVICE_PROFILE := P35WT
+  IMAGES := squashfs trx
+endef
+
+TARGET_DEVICES += P335WT
+
 define Image/Build/Profile/P335WT
$(call Image/Build/Template/ZyXEL/$(1),p-335wt)
 endef
 
-define Image/Build/Profile/Generic
+define Image/Build/Profile/All
$(call Image/Build/Profile/P334WT,$(1))
$(call Image/Build/Profile/P335WT,$(1))
 endef
diff --git a/target/linux/adm5120/image/router_le.mk 
b/target/linux/adm5120/image/router_le.mk
index 1e3d7f7..9e2b646 100644
--- a/target/linux/adm5120/image/router_le.mk
+++ b/target/linux/adm5120/image/router_le.mk
@@ -242,22 +242,48 @@ endef
 #
 # Profiles
 #
+
+define Device/CAS630
+  DEVICE_PROFILE := CAS630
+  IMAGES := trx xmodem.bin
+endef
+
 define Image/Build/Profile/CAS630
$(call Image/Build/Template/Cellvision/$(1),cas-630,cas-630)
 endef
 
+define Device/CAS630W
+  DEVICE_PROFILE := CAS630W
+  IMAGES := trx xmodem.bin
+endef
+
 define Image/Build/Profile/CAS630W
$(call Image/Build/Template/Cellvision/$(1),cas-630w,cas-630)
 endef
 
+define Device/CAS670
+  DEVICE_PROFILE := CAS670
+  IMAGES := trx xmodem.bin
+endef
+
 define Image/Build/Profile/CAS670
$(call Image/Build/Te

[OpenWrt-Devel] [PATCH 13/13] brcm47xx: Add an 'All Profiles' profile

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Brcm47xx has enough images to make it useful to get all profiles
and multi-profile select working properly, so this patch adds
an 'All Profiles' profile, however it is only used to allow
KConfig to select all profiles and is not used standalone to
build all targets, due to the differences in devices that would
result in every image having a number of packages selected
by other profiles but not applicable the current image.

Signed-off-by: Daniel Dickinson 
---
 target/linux/brcm47xx/generic/profiles/00-default.mk | 17 +
 target/linux/brcm47xx/generic/profiles/01-all.mk | 18 ++
 target/linux/brcm47xx/image/Makefile |  6 +-
 target/linux/brcm47xx/legacy/profiles/00-default.mk  | 17 +
 target/linux/brcm47xx/legacy/profiles/01-all.mk  | 18 ++
 target/linux/brcm47xx/mips74k/profiles/00-default.mk | 17 +
 target/linux/brcm47xx/mips74k/profiles/01-all.mk | 18 ++
 7 files changed, 110 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/brcm47xx/generic/profiles/00-default.mk
 create mode 100644 target/linux/brcm47xx/generic/profiles/01-all.mk
 create mode 100644 target/linux/brcm47xx/legacy/profiles/00-default.mk
 create mode 100644 target/linux/brcm47xx/legacy/profiles/01-all.mk
 create mode 100644 target/linux/brcm47xx/mips74k/profiles/00-default.mk
 create mode 100644 target/linux/brcm47xx/mips74k/profiles/01-all.mk

diff --git a/target/linux/brcm47xx/generic/profiles/00-default.mk 
b/target/linux/brcm47xx/generic/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/brcm47xx/generic/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/brcm47xx/generic/profiles/01-all.mk 
b/target/linux/brcm47xx/generic/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/brcm47xx/generic/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/brcm47xx/image/Makefile 
b/target/linux/brcm47xx/image/Makefile
index 782beef..19e27e9 100644
--- a/target/linux/brcm47xx/image/Makefile
+++ b/target/linux/brcm47xx/image/Makefile
@@ -355,7 +355,7 @@ define Image/Build/Initramfs
 endef
 
 # $(1): filesystem type.
-define Image/Build
+define Image/Build/Default
$(STAGING_DIR_HOST)/bin/trx \
-m 33554432 \
-o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
@@ -381,4 +381,8 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
 endif
 endef
 
+define Image/Build
+   $(if $(filter-out All,$(2)),$(call Image/Build/Default,$(1),$(2)))
+endef
+
 $(eval $(call BuildImage))
diff --git a/target/linux/brcm47xx/legacy/profiles/00-default.mk 
b/target/linux/brcm47xx/legacy/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/brcm47xx/legacy/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/brcm47xx/legacy/profiles/01-all.mk 
b/target/linux/brcm47xx/legacy/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/brcm47xx/legacy/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/brcm47xx/mips74k/profiles/00-default.mk 
b/target/linux/brcm47xx/mips74k/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/brcm47xx/mips74k/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See

[OpenWrt-Devel] [PATCH 10/13] kirkwood: Add an 'All Profiles' profile

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Kirkwood has enough images to make it useful to get all profiles
and multi-profile select working properly, so this patch adds
an 'All Profiles' profile.

Signed-off-by: Daniel Dickinson 
---
 target/linux/kirkwood/image/Makefile  | 27 +--
 target/linux/kirkwood/profiles/000-default.mk | 19 +++
 target/linux/kirkwood/profiles/010-all.mk | 17 +
 3 files changed, 61 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/kirkwood/profiles/000-default.mk
 create mode 100644 target/linux/kirkwood/profiles/010-all.mk

diff --git a/target/linux/kirkwood/image/Makefile 
b/target/linux/kirkwood/image/Makefile
index 7a762f4..a9db144 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -15,37 +15,47 @@ KERNEL_LOADADDR:=0x8000
 TARGET_DEVICES = linksys-audi linksys-viper
 
 define Device/Default
+  PROFILES := All $$(DEVICE_PROFILE)
   KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
   KERNEL := kernel-bin | append-dtb | uImage none
   KERNEL_NAME := zImage
 endef
 
 define Device/linksys-audi
+  # Generic AUDI
   DEVICE_DTS := kirkwood-linksys-audi
   PAGESIZE := 512
   SUBPAGESIZE := 256
   BLOCKSIZE := 16KiB
   KERNEL_SIZE := 2624k
   FILESYSTEMS := squashfs
-  PROFILES := Generic AUDI
+  DEVICE_PROFILE := linksys-audi
   IMAGES := factory.bin sysupgrade.tar
   IMAGE/factory.bin := append-kernel (KERNEL_SIZE) | append-ubi
   IMAGE/sysupgrade.tar := sysupgrade-nand
 endef
 
 define Device/linksys-viper
+  # Generic VIPER
   DEVICE_DTS := kirkwood-linksys-viper
   PAGESIZE := 2048
   SUBPAGESIZE := 512
   BLOCKSIZE := 128KiB
   KERNEL_SIZE := 2688k
   FILESYSTEMS := squashfs
-  PROFILES := Generic VIPER
+  DEVICE_PROFILE := linksys-viper
   IMAGES := factory.bin sysupgrade.tar
   IMAGE/factory.bin := append-kernel (KERNEL_SIZE) | append-ubi
   IMAGE/sysupgrade.tar := sysupgrade-nand
 endef
 
+define DefineDevice
+  define Device/$(1)
+DEVICE_PROFILE := $(1)
+  endef
+  TARGET_DEVICES += $(1)
+endef
+
 define Build/append-dtb
cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@
 endef
@@ -143,42 +153,55 @@ define Image/Build/ubi
  endif
 endef
 
+$(eval $(call DefineDevice,Generic))
 Image/BuildKernel/Template/Generic=$(call Image/BuildKernel/Template,,$(1))
 Image/InstallKernel/Template/Generic=$(call Image/InstallKernel/Template)
 
+$(eval $(call DefineDevice,DOCKSTAR))
 Image/BuildKernel/Template/DOCKSTAR=$(call 
Image/BuildKernel/Template,dockstar,$(1))
 Image/InstallKernel/Template/DOCKSTAR=$(call 
Image/InstallKernel/Template,dockstar)
 
+$(eval $(call DefineDevice,GOFLEXHOME))
 Image/BuildKernel/Template/GOFLEXHOME=$(call 
Image/BuildKernel/Template,goflexhome,$(1))
 Image/InstallKernel/Template/GOFLEXHOME=$(call 
Image/InstallKernel/Template,goflexhome)
 
+$(eval $(call DefineDevice,GOFLEXNET))
 Image/BuildKernel/Template/GOFLEXNET=$(call 
Image/BuildKernel/Template,goflexnet,$(1))
 Image/InstallKernel/Template/GOFLEXNET=$(call 
Image/InstallKernel/Template,goflexnet)
 
+$(eval $(call DefineDevice,IB62X0))
 Image/BuildKernel/Template/IB62X0=$(call 
Image/BuildKernel/Template,ib62x0,$(1))
 Image/InstallKernel/Template/IB62X0=$(call Image/InstallKernel/Template,ib62x0)
 
+$(eval $(call DefineDevice,ICONNECT))
 Image/BuildKernel/Template/ICONNECT=$(call 
Image/BuildKernel/Template,iconnect,$(1))
 Image/InstallKernel/Template/ICONNECT=$(call 
Image/InstallKernel/Template,iconnect)
 
+$(eval $(call DefineDevice,IOMEGA_IX2_200))
 Image/BuildKernel/Template/IOMEGA_IX2_200=$(call 
Image/BuildKernel/Template,iomega_ix2_200,$(1))
 Image/InstallKernel/Template/IOMEGA_IX2_200=$(call 
Image/InstallKernel/Template,iomega_ix2_200)
 
+$(eval $(call DefineDevice,NSA310S))
 Image/BuildKernel/Template/NSA310S=$(call 
Image/BuildKernel/Template,nsa310s,$(1))
 Image/InstallKernel/Template/NSA310S=$(call 
Image/InstallKernel/Template,nsa310s)
 
+$(eval $(call DefineDevice,POGOE02))
 Image/BuildKernel/Template/POGOE02=$(call 
Image/BuildKernel/Template,pogo_e02,$(1))
 Image/InstallKernel/Template/POGOE02=$(call 
Image/InstallKernel/Template,pogo_e02)
 
+$(eval $(call DefineDevice,SHEEVAPLUG))
 Image/BuildKernel/Template/SHEEVAPLUG=$(call 
Image/BuildKernel/Template,sheevaplug,$(1))
 Image/InstallKernel/Template/SHEEVAPLUG=$(call 
Image/InstallKernel/Template,sheevaplug)
 
+$(eval $(call DefineDevice,SHEEVAPLUGSATA))
 Image/BuildKernel/Template/SHEEVAPLUGSATA=$(call 
Image/BuildKernel/Template,sheevaplug-esata,$(1))
 Image/InstallKernel/Template/SHEEVAPLUGSATA=$(call 
Image/InstallKernel/Template,sheevaplug-esata)
 
+$(eval $(call DefineDevice,GuruplugServerPlus))
 Image/BuildKernel/Template/GuruplugServerPlus=$(call 
Image/BuildKernel/Template,guruplug-server-plus,$(1))
 Image/InstallKernel/Template/GuruplugServerPlus=$(call 
Image/InstallKernel/Template,guruplug-server-plus)
 
+$(eval $(call DefineDevice,Topkick1281P2))
 Image/BuildKernel/Template/Topkick1281P2

[OpenWrt-Devel] [PATCH 12/13] lantiq: Add an 'All Profiles' profile

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Lantiq has enough images to make it useful to get all profiles
and multi-profile select working properly, so this patch adds
an 'All Profiles' profile, however it is only used to allow
KConfig to select all profiles and is not used standalone to
build all targets, due to the differences in devices that would
result in every image having a number of packages selected
by other profiles but not applicable the current image.

Signed-off-by: Daniel Dickinson 
---
 target/linux/lantiq/image/Makefile|  8 
 target/linux/lantiq/xrx200/profiles/00-default.mk | 17 +
 target/linux/lantiq/xrx200/profiles/01-all.mk | 18 ++
 target/linux/lantiq/xway/profiles/00-default.mk   | 17 +
 target/linux/lantiq/xway/profiles/01-all.mk   | 18 ++
 5 files changed, 74 insertions(+), 4 deletions(-)
 create mode 100644 target/linux/lantiq/xrx200/profiles/00-default.mk
 create mode 100644 target/linux/lantiq/xrx200/profiles/01-all.mk
 create mode 100644 target/linux/lantiq/xway/profiles/00-default.mk
 create mode 100644 target/linux/lantiq/xway/profiles/01-all.mk

diff --git a/target/linux/lantiq/image/Makefile 
b/target/linux/lantiq/image/Makefile
index dc4eafc..9dd885f 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -426,21 +426,21 @@ Image/BuildKernel/Profile/VGV7519BRN=$(call 
Image/BuildKernel/Template,VGV7519BR
 Image/Build/Profile/VGV7519BRN=$(call 
Image/Build/$(1),$(1),VGV7519BRN,5D8000,0x12345678,0x2083b8ed,$(1))
 
 define Image/Prepare
-   $(call Image/Prepare/Profile,$(2),,$(2))
+   $(if $(filter-out All,$(2)),$(call Image/Prepare/Profile,$(2),,$(2)))
 endef
 
 endif
 
 define Image/BuildKernel
-   $(call Image/BuildKernel/Profile/$(2),,$(2))
+   $(if $(filter-out All,$(2)),$(call 
Image/BuildKernel/Profile/$(2),,$(2)))
 endef
 
 define Image/InstallKernel
-   $(call Image/InstallKernel/Template/$(2))
+   $(if $(filter-out All,$(2)),$(call Image/InstallKernel/Template/$(2)))
 endef
 
 define Image/Build
-   $(call Image/Build/Profile/$(2),$(1),$(2))
+   $(if $(filter-out All,$(2)),$(call Image/Build/Profile/$(2),$(1),$(2)))
 endef
 
 $(eval $(call BuildImage))
diff --git a/target/linux/lantiq/xrx200/profiles/00-default.mk 
b/target/linux/lantiq/xrx200/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/lantiq/xrx200/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/lantiq/xrx200/profiles/01-all.mk 
b/target/linux/lantiq/xrx200/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/lantiq/xrx200/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/lantiq/xway/profiles/00-default.mk 
b/target/linux/lantiq/xway/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/lantiq/xway/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/lantiq/xway/profiles/01-all.mk 
b/target/linux/lantiq/xway/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/lantiq/xway/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 06/13] mpc85xx: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/mpc85xx/image/Makefile |  2 +-
 target/linux/mpc85xx/profiles/00-default.mk |  1 +
 target/linux/mpc85xx/profiles/01-all.mk | 15 +++
 3 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/mpc85xx/profiles/01-all.mk

diff --git a/target/linux/mpc85xx/image/Makefile 
b/target/linux/mpc85xx/image/Makefile
index ac4541d..0b0ab73 100644
--- a/target/linux/mpc85xx/image/Makefile
+++ b/target/linux/mpc85xx/image/Makefile
@@ -52,7 +52,7 @@ define Image/Build/Profile/TLWDR4900
$(call 
Image/Build/TPLINK,$(1),tl-wdr4900-v1,cuImage.tl-wdr4900-v1,0x4901,1,16Mppc)
 endef
 
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/TLWDR4900,$(1))
 endef
 
diff --git a/target/linux/mpc85xx/profiles/00-default.mk 
b/target/linux/mpc85xx/profiles/00-default.mk
index a0b2558..94bfb14 100644
--- a/target/linux/mpc85xx/profiles/00-default.mk
+++ b/target/linux/mpc85xx/profiles/00-default.mk
@@ -8,6 +8,7 @@
 define Profile/Default
NAME:=Default Profile (all drivers)
PACKAGES:=kmod-usb-core kmod-usb2 kmod-usb2-fsl
+   PROFILE_SKIP_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/mpc85xx/profiles/01-all.mk 
b/target/linux/mpc85xx/profiles/01-all.mk
new file mode 100644
index 000..024b610
--- /dev/null
+++ b/target/linux/mpc85xx/profiles/01-all.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   Builds images for all profiles
+endef
+$(eval $(call Profile,All))
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 08/13] brcm63xx: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/brcm63xx/image/Makefile |   2 +-
 target/linux/brcm63xx/profiles/00-default.mk |   1 +
 target/linux/brcm63xx/profiles/01-all.mk |  14 +++
 target/linux/brcm63xx/profiles/01-generic.mk | 123 ---
 target/linux/brcm63xx/profiles/02-generic.mk | 123 +++
 5 files changed, 139 insertions(+), 124 deletions(-)
 create mode 100644 target/linux/brcm63xx/profiles/01-all.mk
 delete mode 100644 target/linux/brcm63xx/profiles/01-generic.mk
 create mode 100644 target/linux/brcm63xx/profiles/02-generic.mk

diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index 81a9dc7..3175b5d 100644
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -167,7 +167,7 @@ endef
 
 # Shared device definition: applies to every defined device
 define Device/Default
-  PROFILES = Default $$(DEVICE_PROFILE)
+  PROFILES = All $$(DEVICE_PROFILE)
   KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts)
   KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX).elf
   DEVICE_PROFILE :=
diff --git a/target/linux/brcm63xx/profiles/00-default.mk 
b/target/linux/brcm63xx/profiles/00-default.mk
index a25be92..f7cd1ac 100644
--- a/target/linux/brcm63xx/profiles/00-default.mk
+++ b/target/linux/brcm63xx/profiles/00-default.mk
@@ -8,6 +8,7 @@
 define Profile/Default
   NAME:=Default Profile
   PACKAGES:=kmod-b43 wpad-mini
+  PROFILE_SKIP_DEFAULT:=1
 endef
 define Profile/Default/description
   Package set compatible with most boards.
diff --git a/target/linux/brcm63xx/profiles/01-all.mk 
b/target/linux/brcm63xx/profiles/01-all.mk
new file mode 100644
index 000..12966b5
--- /dev/null
+++ b/target/linux/brcm63xx/profiles/01-all.mk
@@ -0,0 +1,14 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+endef
+define Profile/All/description
+   Builds images for all profiles
+endef
+$(eval $(call Profile,All))
diff --git a/target/linux/brcm63xx/profiles/01-generic.mk 
b/target/linux/brcm63xx/profiles/01-generic.mk
deleted file mode 100644
index 2a9eb15..000
--- a/target/linux/brcm63xx/profiles/01-generic.mk
+++ /dev/null
@@ -1,123 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/963281TAN
-  NAME:=Generic 963281TAN
-  PACKAGES:=
-endef
-define Profile/963281TAN/Description
-  Package set optimized for 963281TAN.
-endef
-$(eval $(call Profile,963281TAN))
-
-define Profile/96328avng
-  NAME:=Generic 96328avng
-  PACKAGES:=
-endef
-define Profile/96328avng/Description
-  Package set optimized for 96328avng.
-endef
-$(eval $(call Profile,96328avng))
-
-define Profile/96338GW
-  NAME:=Generic 96338GW
-  PACKAGES:=
-endef
-define Profile/96338GW/Description
-  Package set optimized for 96338GW.
-endef
-$(eval $(call Profile,96338GW))
-
-define Profile/96338W
-  NAME:=Generic 96338W
-  PACKAGES:=
-endef
-define Profile/96338W/Description
-  Package set optimized for 96338W.
-endef
-$(eval $(call Profile,96338W))
-
-define Profile/96345GW2
-  NAME:=Generic 96345GW2
-  PACKAGES:=
-endef
-define Profile/96345GW2/Description
-  Package set optimized for 96345GW2.
-endef
-$(eval $(call Profile,96345GW2))
-
-define Profile/96348GW
-  NAME:=Generic 96348GW
-  PACKAGES:=
-endef
-define Profile/96348GW/Description
-  Package set optimized for 96348GW.
-endef
-$(eval $(call Profile,96348GW))
-
-define Profile/96348GW_10
-  NAME:=Generic 96348GW-10
-  PACKAGES:=
-endef
-define Profile/96348GW_10/Description
-  Package set optimized for 96348GW-10.
-endef
-$(eval $(call Profile,96348GW_10))
-
-define Profile/96348GW_11
-  NAME:=Generic 96348GW-11
-  PACKAGES:=
-endef
-define Profile/96348GW_11/Description
-  Package set optimized for 96348GW-11.
-endef
-$(eval $(call Profile,96348GW_11))
-
-define Profile/96348R
-  NAME:=Generic 96348R
-  PACKAGES:=
-endef
-define Profile/96348R/Description
-  Package set optimized for 96348R.
-endef
-$(eval $(call Profile,96348R))
-
-define Profile/96358VW
-  NAME:=Generic 96358VW
-  PACKAGES:=
-endef
-define Profile/96358VW/Description
-  Package set optimized for 96358VW.
-endef
-$(eval $(call Profile,96358VW))
-
-define Profile/96358VW2
-  NAME:=Generic 96358VW2
-  PACKAGES:=
-endef
-define Profile/96358VW2/Description
-  Package set optimized for 96358VW2.
-endef
-$(eval $(call Profile,96358VW2))
-
-define Profile/96368MVNgr
-  NAME:=Generic 96368MVNgr
-  PACKAGES:=
-endef
-define Profile/96368MVNgr/Description
-  Package set optimized for 96368MVNgr.
-endef
-$(eval $(call Profile,96368MVN

[OpenWrt-Devel] [PATCH 04/13] mvebu: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/mvebu/image/Makefile  |  4 ++--
 target/linux/mvebu/profiles/000-Default.mk |  1 +
 target/linux/mvebu/profiles/010-all.mk | 16 
 3 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/mvebu/profiles/010-all.mk

diff --git a/target/linux/mvebu/image/Makefile 
b/target/linux/mvebu/image/Makefile
index fd51052..67abaff 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -200,8 +200,8 @@ define Image/Build/Profile/385-DB-AP/squashfs
 endef
 
 
-# The Default profile should build everything
-$(eval $(call MultiProfile,Default,$(PROFILES_LIST)))
+# The All profile should build everything
+$(eval $(call MultiProfile,All,$(PROFILES_LIST)))
 
 define Image/BuildKernel
$(call Image/BuildKernel/Profile/$(2),$(1),$(2))
diff --git a/target/linux/mvebu/profiles/000-Default.mk 
b/target/linux/mvebu/profiles/000-Default.mk
index 5660836..530fcd9 100644
--- a/target/linux/mvebu/profiles/000-Default.mk
+++ b/target/linux/mvebu/profiles/000-Default.mk
@@ -17,6 +17,7 @@ define Profile/Default
kmod-hwmon-pwmfan kmod-leds-tlc59116 \
kmod-ledtrig-usbdev kmod-mwlwifi wpad-mini \
kmod-ata-mvebu-ahci
+   PROFILE_SKIP_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/mvebu/profiles/010-all.mk 
b/target/linux/mvebu/profiles/010-all.mk
new file mode 100644
index 000..474191d
--- /dev/null
+++ b/target/linux/mvebu/profiles/010-all.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   Builds images for all profiles
+endef
+
+$(eval $(call Profile,All))
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 05/13] ramips: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/ramips/image/Makefile | 12 ++--
 target/linux/ramips/mt7620/profiles/00-default.mk  |  1 +
 target/linux/ramips/mt7620/profiles/01-all.mk  | 15 +++
 target/linux/ramips/mt7621/profiles/00-default.mk  |  1 +
 target/linux/ramips/mt7621/profiles/01-all.mk  | 15 +++
 target/linux/ramips/mt7628/profiles/00-default.mk  |  1 +
 target/linux/ramips/mt7628/profiles/01-all.mk  | 15 +++
 target/linux/ramips/mt7688/profiles/00-default.mk  |  1 +
 target/linux/ramips/mt7688/profiles/01-all.mk  | 15 +++
 target/linux/ramips/mt7688/profiles/01-mediatek.mk | 18 --
 target/linux/ramips/mt7688/profiles/02-mediatek.mk | 18 ++
 target/linux/ramips/rt288x/profiles/00-default.mk  |  1 +
 target/linux/ramips/rt288x/profiles/01-all.mk  | 15 +++
 target/linux/ramips/rt305x/profiles/00-default.mk  |  1 +
 target/linux/ramips/rt305x/profiles/01-all.mk  | 15 +++
 target/linux/ramips/rt3883/profiles/00-default.mk  |  1 +
 target/linux/ramips/rt3883/profiles/01-all.mk  | 16 
 17 files changed, 137 insertions(+), 24 deletions(-)
 create mode 100644 target/linux/ramips/mt7620/profiles/01-all.mk
 create mode 100644 target/linux/ramips/mt7621/profiles/01-all.mk
 create mode 100644 target/linux/ramips/mt7628/profiles/01-all.mk
 create mode 100644 target/linux/ramips/mt7688/profiles/01-all.mk
 delete mode 100644 target/linux/ramips/mt7688/profiles/01-mediatek.mk
 create mode 100644 target/linux/ramips/mt7688/profiles/02-mediatek.mk
 create mode 100644 target/linux/ramips/rt288x/profiles/01-all.mk
 create mode 100644 target/linux/ramips/rt305x/profiles/01-all.mk
 create mode 100644 target/linux/ramips/rt3883/profiles/01-all.mk

diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index b58ca7e..ee6f325 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -448,7 +448,7 @@ Image/Build/Profile/WLITX4AG300N=$(call 
BuildFirmware/Default4M/$(1),$(1),wli-tx
 Image/Build/Profile/WZRAGL300NH=$(call 
BuildFirmware/Default4M/$(1),$(1),wzr-agl300nh,WZR-AGL300NH)
 
 ifeq ($(SUBTARGET),rt288x)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/AR670W,$(1))
$(call Image/Build/Profile/AR725W,$(1))
$(call Image/Build/Profile/F5D8235V1,$(1))
@@ -749,7 +749,7 @@ Image/Build/Profile/X8=$(call 
BuildFirmware/Poray8M/$(1),$(1),x8,X8)
 Image/Build/Profile/XDXRN502J=$(call 
BuildFirmware/Default4M/$(1),$(1),xdxrn502j,XDXRN502J)
 
 ifeq ($(SUBTARGET),rt305x)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/3G6200N,$(1))
$(call Image/Build/Profile/3G6200NL,$(1))
$(call Image/Build/Profile/3G150B,$(1))
@@ -897,7 +897,7 @@ rootfs_size_BR6475ND:=5832704
 Image/Build/Profile/BR6475ND=$(call 
BuildFirmware/EdimaxCombined/$(1),$(1),br-6475nd,BR-6475ND,$(kernel_size_BR6475ND),$(rootfs_size_BR6475ND),CSYS,RN54,0x7,0x0110)
 
 ifeq ($(SUBTARGET),rt3883)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/CYSWR1100,$(1))
$(call Image/Build/Profile/DIR645,$(1))
$(call Image/Build/Profile/HPM,$(1))
@@ -956,7 +956,7 @@ Image/Build/Profile/TINY-AC=$(call 
BuildFirmware/Default8M/$(1),$(1),tiny-ac,TIN
 
 
 ifeq ($(SUBTARGET),mt7620)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/E1700,$(1))
$(call Image/Build/Profile/MT7620a,$(1))
$(call Image/Build/Profile/MT7620a_MT7610e,$(1))
@@ -1091,7 +1091,7 @@ Image/Build/Profile/MT7628=$(call 
BuildFirmware/Default4M/$(1),$(1),mt7628,MT762
 Image/Build/Profile/WRTNODE2P=$(call 
BuildFirmware/Default16M/$(1),$(1),wrtnode2p,WRTNODE2P)
 
 ifeq ($(SUBTARGET),mt7628)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/MT7628,$(1))
$(call Image/Build/Profile/WRTNODE2P,$(1))
 endef
@@ -1106,7 +1106,7 @@ Image/Build/Profile/LinkIt7688=$(call 
BuildFirmware/Default32M/$(1),$(1),LinkIt7
 Image/Build/Profile/WRTNODE2R=$(call 
BuildFirmware/Default16M/$(1),$(1),wrtnode2r,WRTNODE2R)
 
 ifeq ($(SUBTARGET),mt7688)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/LinkIt7688,$(1))
$(call Image/Build/Profile/WRTNODE2R,$(1))
 endef
diff --git a/target/linux/ramips/mt7620/profiles/00-default.mk 
b/target/linux/ramips/mt7620/profiles/00-default.mk
index 6c7d721..b86d541 100644
--- a/target/linux/ramips/mt7620/profiles/00-default.mk
+++ b/target/linux/ramips/mt7620/profiles/00-default.mk
@@ -1

[OpenWrt-Devel] [PATCH 07/13] arc770: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/arc770/generic/profiles/00-default.mk |  1 +
 target/linux/arc770/generic/profiles/01-all.mk | 15 +++
 target/linux/arc770/generic/profiles/01-minimal.mk | 15 ---
 target/linux/arc770/generic/profiles/02-axs101.mk  | 16 
 target/linux/arc770/generic/profiles/02-minimal.mk | 15 +++
 target/linux/arc770/generic/profiles/04-axs101.mk  | 16 
 target/linux/arc770/image/Makefile |  2 +-
 7 files changed, 48 insertions(+), 32 deletions(-)
 create mode 100644 target/linux/arc770/generic/profiles/01-all.mk
 delete mode 100644 target/linux/arc770/generic/profiles/01-minimal.mk
 delete mode 100644 target/linux/arc770/generic/profiles/02-axs101.mk
 create mode 100644 target/linux/arc770/generic/profiles/02-minimal.mk
 create mode 100644 target/linux/arc770/generic/profiles/04-axs101.mk

diff --git a/target/linux/arc770/generic/profiles/00-default.mk 
b/target/linux/arc770/generic/profiles/00-default.mk
index b12ceb1..5f565c6 100644
--- a/target/linux/arc770/generic/profiles/00-default.mk
+++ b/target/linux/arc770/generic/profiles/00-default.mk
@@ -8,6 +8,7 @@
 define Profile/Default
NAME:=Default Profile (all drivers)
PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci
+   PROFILE_SKIP_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/arc770/generic/profiles/01-all.mk 
b/target/linux/arc770/generic/profiles/01-all.mk
new file mode 100644
index 000..02daed8
--- /dev/null
+++ b/target/linux/arc770/generic/profiles/01-all.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+$(eval $(call Profile,All))
diff --git a/target/linux/arc770/generic/profiles/01-minimal.mk 
b/target/linux/arc770/generic/profiles/01-minimal.mk
deleted file mode 100644
index c8968da..000
--- a/target/linux/arc770/generic/profiles/01-minimal.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Minimal
-   NAME:=Minimal Profile (no drivers)
-endef
-
-define Profile/Minimal/Description
-   Minimal package set compatible with most boards.
-endef
-$(eval $(call Profile,Minimal))
diff --git a/target/linux/arc770/generic/profiles/02-axs101.mk 
b/target/linux/arc770/generic/profiles/02-axs101.mk
deleted file mode 100644
index 60cf0fc..000
--- a/target/linux/arc770/generic/profiles/02-axs101.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/axs101
-   NAME:=Synopsys DesignWare AXS101
-   PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci
-endef
-
-define Profile/axs101/Description
-   Package set compatible with hardware using Synopsys DesignWare AXS101 
boards.
-endef
-$(eval $(call Profile,axs101))
diff --git a/target/linux/arc770/generic/profiles/02-minimal.mk 
b/target/linux/arc770/generic/profiles/02-minimal.mk
new file mode 100644
index 000..c8968da
--- /dev/null
+++ b/target/linux/arc770/generic/profiles/02-minimal.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Minimal
+   NAME:=Minimal Profile (no drivers)
+endef
+
+define Profile/Minimal/Description
+   Minimal package set compatible with most boards.
+endef
+$(eval $(call Profile,Minimal))
diff --git a/target/linux/arc770/generic/profiles/04-axs101.mk 
b/target/linux/arc770/generic/profiles/04-axs101.mk
new file mode 100644
index 000..60cf0fc
--- /dev/null
+++ b/target/linux/arc770/generic/profiles/04-axs101.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/axs101
+   NAME:=Synopsys DesignWare AXS101
+   PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci
+endef
+
+define Profile/axs101/Description
+   Package set compatible with hardware using Synopsys DesignWare AXS101 
boards.
+endef
+$(eval $(call Profile,axs101))
diff --git a/target/linux/arc770/image/Makefile 
b/target/linux/arc770/image/Makefile
index 6b9c5e4..0bbf36d 100644
--- a/target/linux/arc770/image/Make

[OpenWrt-Devel] [PATCH 2/3] kernel/modules: add kmod-crypto-hw-ccp

2016-01-18 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 package/kernel/linux/modules/crypto.mk | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index 7c71053..99fb5a0 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -177,6 +177,24 @@ endef
 $(eval $(call KernelPackage,crypto-hw-padlock))
 
 
+define KernelPackage/crypto-hw-ccp
+  TITLE:=AMD Cryptographic Coprocessor
+  DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash +kmod-crypto-manager 
+kmod-random-core
+  KCONFIG:= \
+   CONFIG_CRYPTO_HW=y \
+   CONFIG_CRYPTO_DEV_CCP=y \
+   CONFIG_CRYPTO_DEV_CCP_CRYPTO \
+   CONFIG_CRYPTO_DEV_CCP_DD
+  FILES:= \
+   $(LINUX_DIR)/drivers/crypto/ccp/ccp.ko \
+   $(LINUX_DIR)/drivers/crypto/ccp/ccp-crypto.ko
+  AUTOLOAD:=$(call AutoLoad,09,ccp ccp-crypto)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-hw-ccp))
+
+
 define KernelPackage/crypto-hw-geode
   TITLE:=AMD Geode hardware crypto module
   DEPENDS:=+kmod-crypto-manager
-- 
2.4.10
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] kernel: add missing symbol for 4.4

2016-01-18 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 target/linux/generic/config-4.4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4
index 6ad3008..a8b4074 100644
--- a/target/linux/generic/config-4.4
+++ b/target/linux/generic/config-4.4
@@ -748,6 +748,7 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 # CONFIG_CRYPTO_DEV_IMGTEC_HASH is not set
 # CONFIG_CRYPTO_DEV_MV_CESA is not set
 # CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
+# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set
 # CONFIG_CRYPTO_DEV_QCE is not set
 # CONFIG_CRYPTO_DEV_SAHARA is not set
 # CONFIG_CRYPTO_DEV_TALITOS is not set
-- 
2.4.10
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] kernel: add patch to fix the ccp-crypto module

2016-01-18 Thread Stijn Tintel
Signed-off-by: Stijn Tintel 
---
 ...-add-hash-state-import-and-export-support.patch | 114 +
 1 file changed, 114 insertions(+)
 create mode 100644 
target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch

diff --git 
a/target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch
 
b/target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch
new file mode 100644
index 000..986ac5d
--- /dev/null
+++ 
b/target/linux/generic/patches-4.4/150-crypto-ccp-add-hash-state-import-and-export-support.patch
@@ -0,0 +1,114 @@
+From: Tom Lendacky 
+Subject: [PATCH v1] crypto: ccp - Add hash state import and export support
+Date: Tue, 12 Jan 2016 11:17:38 -0600
+Message-ID: <20160112171738.23496.44254.st...@tlendack-t1.amdoffice.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 7bit
+Cc: Herbert Xu , ,
+   "David Miller" 
+To: 
+
+Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
+added a check to prevent ahash algorithms from successfully registering
+if the import and export functions were not implemented. This prevents
+an oops in the hash_accept function of algif_hash. This commit causes
+the ccp-crypto module SHA support and AES CMAC support from successfully
+registering and causing the ccp-crypto module load to fail because the
+ahash import and export functions are not implemented.
+
+Update the CCP Crypto API support to provide import and export support
+for ahash algorithms.
+
+Cc:  # 3.14.x-
+Signed-off-by: Tom Lendacky 
+---
+ drivers/crypto/ccp/ccp-crypto-aes-cmac.c |   23 +++
+ drivers/crypto/ccp/ccp-crypto-sha.c  |   23 +++
+ 2 files changed, 46 insertions(+)
+
+--- a/drivers/crypto/ccp/ccp-crypto-aes-cmac.c
 b/drivers/crypto/ccp/ccp-crypto-aes-cmac.c
+@@ -220,6 +220,26 @@ static int ccp_aes_cmac_digest(struct ah
+   return ccp_aes_cmac_finup(req);
+ }
+ 
++static int ccp_aes_cmac_export(struct ahash_request *req, void *out)
++{
++  struct ccp_aes_cmac_req_ctx *rctx = ahash_request_ctx(req);
++  struct ccp_aes_cmac_req_ctx *state = out;
++
++  *state = *rctx;
++
++  return 0;
++}
++
++static int ccp_aes_cmac_import(struct ahash_request *req, const void *in)
++{
++  struct ccp_aes_cmac_req_ctx *rctx = ahash_request_ctx(req);
++  const struct ccp_aes_cmac_req_ctx *state = in;
++
++  *rctx = *state;
++
++  return 0;
++}
++
+ static int ccp_aes_cmac_setkey(struct crypto_ahash *tfm, const u8 *key,
+  unsigned int key_len)
+ {
+@@ -352,10 +372,13 @@ int ccp_register_aes_cmac_algs(struct li
+   alg->final = ccp_aes_cmac_final;
+   alg->finup = ccp_aes_cmac_finup;
+   alg->digest = ccp_aes_cmac_digest;
++  alg->export = ccp_aes_cmac_export;
++  alg->import = ccp_aes_cmac_import;
+   alg->setkey = ccp_aes_cmac_setkey;
+ 
+   halg = &alg->halg;
+   halg->digestsize = AES_BLOCK_SIZE;
++  halg->statesize = sizeof(struct ccp_aes_cmac_req_ctx);
+ 
+   base = &halg->base;
+   snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "cmac(aes)");
+--- a/drivers/crypto/ccp/ccp-crypto-sha.c
 b/drivers/crypto/ccp/ccp-crypto-sha.c
+@@ -207,6 +207,26 @@ static int ccp_sha_digest(struct ahash_r
+   return ccp_sha_finup(req);
+ }
+ 
++static int ccp_sha_export(struct ahash_request *req, void *out)
++{
++  struct ccp_sha_req_ctx *rctx = ahash_request_ctx(req);
++  struct ccp_sha_req_ctx *state = out;
++
++  *state = *rctx;
++
++  return 0;
++}
++
++static int ccp_sha_import(struct ahash_request *req, const void *in)
++{
++  struct ccp_sha_req_ctx *rctx = ahash_request_ctx(req);
++  const struct ccp_sha_req_ctx *state = in;
++
++  *rctx = *state;
++
++  return 0;
++}
++
+ static int ccp_sha_setkey(struct crypto_ahash *tfm, const u8 *key,
+ unsigned int key_len)
+ {
+@@ -403,9 +423,12 @@ static int ccp_register_sha_alg(struct l
+   alg->final = ccp_sha_final;
+   alg->finup = ccp_sha_finup;
+   alg->digest = ccp_sha_digest;
++  alg->export = ccp_sha_export;
++  alg->import = ccp_sha_import;
+ 
+   halg = &alg->halg;
+   halg->digestsize = def->digest_size;
++  halg->statesize = sizeof(struct ccp_sha_req_ctx);
+ 
+   base = &halg->base;
+   snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "%s", def->name);
-- 
2.4.10
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Dissociate STA based on SNR

2016-01-18 Thread Nishant Sharma

Hi Bastian,

On Monday 18 January 2016 08:16 PM, Bastian Bittorf wrote:
ubus call hostapd.$dev del_client '{ "addr" : "$mac", "reason" : 
"assoc toomany", "ban_time" : 1 }'

Thanks for the pointers. It works for me.

What exactly is ban_time unit? I presume it's millisecond.

Where can I find more documentation about ubus call to different 
processes? The page https://wiki.openwrt.org/doc/techref/ubus doesn't 
mention the call that you have used :)


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


Re: [OpenWrt-Devel] Dissociate STA based on SNR

2016-01-18 Thread Weedy
On Mon, Jan 18, 2016 at 9:39 AM, Nishant Sharma  wrote:
> Hi,
>
> I was wondering if there is a way to dissociate STAs who say go below a
> minimum threshold SNR or signal level of say -65dBm in a multi-AP scenario?
>
option disassoc_low_ack1
Adjust this code to trigger higher?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 04/13] mvebu: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/mvebu/image/Makefile  |  4 ++--
 target/linux/mvebu/profiles/000-Default.mk |  1 +
 target/linux/mvebu/profiles/010-all.mk | 16 
 3 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/mvebu/profiles/010-all.mk

diff --git a/target/linux/mvebu/image/Makefile 
b/target/linux/mvebu/image/Makefile
index fd51052..67abaff 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -200,8 +200,8 @@ define Image/Build/Profile/385-DB-AP/squashfs
 endef
 
 
-# The Default profile should build everything
-$(eval $(call MultiProfile,Default,$(PROFILES_LIST)))
+# The All profile should build everything
+$(eval $(call MultiProfile,All,$(PROFILES_LIST)))
 
 define Image/BuildKernel
$(call Image/BuildKernel/Profile/$(2),$(1),$(2))
diff --git a/target/linux/mvebu/profiles/000-Default.mk 
b/target/linux/mvebu/profiles/000-Default.mk
index 5660836..530fcd9 100644
--- a/target/linux/mvebu/profiles/000-Default.mk
+++ b/target/linux/mvebu/profiles/000-Default.mk
@@ -17,6 +17,7 @@ define Profile/Default
kmod-hwmon-pwmfan kmod-leds-tlc59116 \
kmod-ledtrig-usbdev kmod-mwlwifi wpad-mini \
kmod-ata-mvebu-ahci
+   PROFILE_SKIP_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/mvebu/profiles/010-all.mk 
b/target/linux/mvebu/profiles/010-all.mk
new file mode 100644
index 000..474191d
--- /dev/null
+++ b/target/linux/mvebu/profiles/010-all.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   Builds images for all profiles
+endef
+
+$(eval $(call Profile,All))
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 02/13] ar71xx: Allow to select a subset of profiles for building

2016-01-18 Thread openwrt
From: Daniel Dickinson 

ar71xx is has one of the largest sets of images and it is
therefore very useful to be able select a subset > 1 of
target profiles for a build.  This patch adds the menuconfig
and ar71xx image makefile parts needed to enable this
functionality.

Signed-off-by: Daniel Dickinson 
---
 package/boot/uboot-ar71xx/Makefile  |  2 +-
 target/linux/ar71xx/generic/profiles/00-all.mk  | 15 +++
 target/linux/ar71xx/generic/profiles/00-default.mk  | 17 -
 target/linux/ar71xx/generic/profiles/000-default.mk | 18 ++
 target/linux/ar71xx/image/Makefile  |  7 ---
 target/linux/ar71xx/nand/profiles/00-all.mk | 15 +++
 target/linux/ar71xx/nand/profiles/000-default.mk| 16 
 7 files changed, 69 insertions(+), 21 deletions(-)
 create mode 100644 target/linux/ar71xx/generic/profiles/00-all.mk
 delete mode 100644 target/linux/ar71xx/generic/profiles/00-default.mk
 create mode 100644 target/linux/ar71xx/generic/profiles/000-default.mk
 create mode 100644 target/linux/ar71xx/nand/profiles/00-all.mk
 create mode 100644 target/linux/ar71xx/nand/profiles/000-default.mk

diff --git a/package/boot/uboot-ar71xx/Makefile 
b/package/boot/uboot-ar71xx/Makefile
index 7c4bb6c..e92faa0 100644
--- a/package/boot/uboot-ar71xx/Makefile
+++ b/package/boot/uboot-ar71xx/Makefile
@@ -44,7 +44,7 @@ define Package/uboot-ar71xx-$(1)
   TITLE:=$(2)
   DEPENDS:=@TARGET_ar71xx_generic
   URL:=http://www.denx.de/wiki/U-Boot
-  DEFAULT:=y if (TARGET_ar71xx_generic_NBG_460N_550N_550NH || 
TARGET_ar71xx_generic_Default || CONFIG_TARGET_ar71xx_generic_Minimal)
+  DEFAULT:=y if (TARGET_ar71xx_generic_NBG_460N_550N_550NH || 
TARGET_ar71xx_generic_All || CONFIG_TARGET_ar71xx_generic_Minimal)
   VARIANT:=$(1)
 endef
 endef
diff --git a/target/linux/ar71xx/generic/profiles/00-all.mk 
b/target/linux/ar71xx/generic/profiles/00-all.mk
new file mode 100644
index 000..09dfa79
--- /dev/null
+++ b/target/linux/ar71xx/generic/profiles/00-all.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   All selects building images for all profiles
+endef
+$(eval $(call Profile,All))
diff --git a/target/linux/ar71xx/generic/profiles/00-default.mk 
b/target/linux/ar71xx/generic/profiles/00-default.mk
deleted file mode 100644
index 36c4aa6..000
--- a/target/linux/ar71xx/generic/profiles/00-default.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Default
-   NAME:=Default Profile (all drivers)
-   PACKAGES:= \
-   kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
-endef
-
-define Profile/Default/Description
-   Default package set compatible with most boards.
-endef
-$(eval $(call Profile,Default))
diff --git a/target/linux/ar71xx/generic/profiles/000-default.mk 
b/target/linux/ar71xx/generic/profiles/000-default.mk
new file mode 100644
index 000..a38f82d
--- /dev/null
+++ b/target/linux/ar71xx/generic/profiles/000-default.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+   NAME:=Default Profile
+   PACKAGES:= \
+   kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
+   PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
diff --git a/target/linux/ar71xx/image/Makefile 
b/target/linux/ar71xx/image/Makefile
index 22fe1fe..a94d893 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -10,7 +10,7 @@ JFFS2_BLOCKSIZE = 64k 128k 256k
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-IMAGE_PROFILE:=$(if $(PROFILE),$(PROFILE),Default)
+IMAGE_PROFILE:=$$(if $$(1),$$(1),All)
 
 KERNEL_LOADADDR = 0x8006
 
@@ -143,7 +143,7 @@ DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE
 define Device/Default
   BOARDNAME :=
   DEVICE_PROFILE = $$(BOARDNAME)
-  PROFILES = Default Minimal $$(DEVICE_PROFILE)
+  PROFILES = All Minimal $$(DEVICE_PROFILE)
   MTDPARTS :=
   IMAGES := sysupgrade.bin
   BLOCKSIZE := 64k
@@ -1386,6 +1386,7 @@ endef
 define MkuImageOKLI
$(call MkuImage,lzma,-M 
0x4f4b4c49,$(KDIR)/vmlinux.bin.lzma,$(KDIR_TMP)/vmlinux-$(1).okli)
 endef
+
 endif
 
 # $(1): name of the 1st file.
@@ -2529,7 +2530,7 @@ $(eval $(call MultiProfile,WNDR4300,WNDR3700V4 
WNDR4300V1))
 endif # ifeq ($(SUBTARGET),nand)
 
 
-$(eval $(call MultiProfile,Default,$(SINGLE_PROFILES)))
+$(eval $(call MultiPro

[OpenWrt-Devel] Fixed [PATCH 0/13] Allow to build a subset of profiles for target

2016-01-18 Thread openwrt
Hi all,

I noticed an error in handling of ubifs that didn't result in compile failures 
but
likely would have broken images (I've only been able to test ar71xx images, and
compile tested some other platforms).  The issue was that the profile was
missing from ubifs creation which means it wasn't profile-specific.  This has 
been
fixed.

Otherwise all previous notes about the patch series still apply.

[PATCH 01/13] build metadata: Allow to build a subset of profiles in
[PATCH 02/13] ar71xx: Allow to select a subset of profiles for
[PATCH 03/13] at91: Translate the build all profiles profile to new
[PATCH 04/13] mvebu: Translate the build all profiles profile to new
[PATCH 05/13] ramips: Translate the build all profiles profile to new
[PATCH 06/13] mpc85xx: Translate the build all profiles profile to
[PATCH 07/13] arc770: Translate the build all profiles profile to new
[PATCH 08/13] brcm63xx: Translate the build all profiles profile to
[PATCH 09/13] sunxi: Add an 'All Profiles' profile
[PATCH 10/13] kirkwood: Add an 'All Profiles' profile
[PATCH 11/13] adm5120: Translate existing all profiles profiles to
[PATCH 12/13] lantiq: Add an 'All Profiles' profile
[PATCH 13/13] brcm47xx: Add an 'All Profiles' profile
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 01/13] build metadata: Allow to build a subset of profiles in a single build

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Certain platforms have large numbers of possible images, and it can be
desirable to build neither all images nor only a single image,
therefore this patch makes selecting target profiles a menu instead of a
single choice, which allows the user to build a specific subset of all
possible images for a target.

This patch contains only the build machinery changes to support
selecting multiple images and the .config generator, but does
not include profile changes that are needed to make selecting
multiple profiles possible in menuconfig.

This is done to isolate the changes as much as possible, although
obviously this patch touches a greaty many files due to changing
the image generation logic (which is necessary in order to
eliminate the single-valued PROFILE variable, which gets in the
way of allowing multiple images to be built at once.

Signed-off-by: Daniel Dickinson 
---
 include/image.mk | 76 ++---
 include/target.mk|  7 ++-
 scripts/metadata.pl  | 83 ++--
 scripts/metadata.pm  |  5 +++
 target/imagebuilder/files/Makefile   |  5 ++-
 target/linux/adm5120/image/Makefile  |  4 +-
 target/linux/ar71xx/image/Makefile   | 13 +++---
 target/linux/at91/image/Makefile |  2 +-
 target/linux/au1000/image/Makefile   |  2 +-
 target/linux/bcm53xx/image/Makefile  |  1 +
 target/linux/brcm47xx/image/Makefile |  2 +-
 target/linux/cns3xxx/image/Makefile  |  2 +-
 target/linux/gemini/image/Makefile   |  4 +-
 target/linux/imx6/image/Makefile |  1 +
 target/linux/ipq806x/image/Makefile  |  2 +-
 target/linux/ixp4xx/image/Makefile   |  2 +-
 target/linux/kirkwood/image/Makefile | 62 +--
 target/linux/lantiq/image/Makefile   | 43 +--
 target/linux/malta/image/Makefile|  2 +-
 target/linux/mcs814x/image/Makefile  |  4 +-
 target/linux/mediatek/image/Makefile |  2 +-
 target/linux/mpc85xx/image/Makefile  |  6 +--
 target/linux/mvebu/image/Makefile| 10 ++---
 target/linux/mxs/image/Makefile  |  4 +-
 target/linux/netlogic/image/Makefile |  2 +-
 target/linux/octeon/image/Makefile   |  2 +-
 target/linux/omap/image/Makefile |  2 +-
 target/linux/omap24xx/image/Makefile |  2 +-
 target/linux/oxnas/image/Makefile| 22 +-
 target/linux/ppc40x/image/Makefile   |  4 +-
 target/linux/ppc44x/image/Makefile   |  2 +-
 target/linux/ramips/image/Makefile   |  8 ++--
 target/linux/rb532/image/Makefile|  2 +-
 target/linux/realview/image/Makefile |  6 +--
 target/linux/sunxi/image/Makefile| 51 +++---
 target/linux/x86/image/Makefile  | 14 +++---
 36 files changed, 287 insertions(+), 174 deletions(-)

diff --git a/include/image.mk b/include/image.mk
index 4eee4ad..ff0a622 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -90,8 +90,6 @@ define add_jffs2_mark
echo -ne '\xde\xad\xc0\xde' >> $(1)
 endef
 
-PROFILE_SANITIZED := $(call sanitize,$(PROFILE))
-
 define split_args
 $(foreach data, \
$(subst |,$(space),\
@@ -114,8 +112,9 @@ define prepare_generic_squashfs
$(STAGING_DIR_HOST)/bin/padjffs2 $(1) 4 8 16 64 128 256
 endef
 
+# $(1) profile
 define Image/BuildKernel/Initramfs
-   $(call Image/Build/Initramfs)
+   $(call Image/Build/Initramfs,$(1))
 endef
 
 define Image/BuildKernel/MkuImage
@@ -192,7 +191,7 @@ ifneq ($(CONFIG_NAND_SUPPORT),)
 # $(1) board name
 # $(2) ubinize-image options (e.g. --uboot-env and/or --kernel kernelimage)
 # $(3) rootfstype (e.g. squashfs or ubifs)
-# $(4) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS)))
+# $(4) options to pass-through to ubinize (i.e. $(_UBI_OPTS)))
define Image/Build/UbinizeImage
sh $(TOPDIR)/scripts/ubinize-image.sh $(2) \
"$(KDIR)/root.$(3)" \
@@ -203,12 +202,14 @@ ifneq ($(CONFIG_NAND_SUPPORT),)
 endif
 
 ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
+# $(1) profile
 define Image/mkfs/ubifs/generate
$(CP) ./ubinize$(1).cfg $(KDIR)
+   $(SED) 's/root.ubifs/root-$(1).ubifs' $(KDIR)/ubinize$(1).cfg
( cd $(KDIR); \
$(STAGING_DIR_HOST)/bin/ubinize \
-   $(if $($(PROFILE)_UBI_OPTS), \
-   $(shell echo $($(PROFILE)_UBI_OPTS)), \
+   $(if $($(1)_UBI_OPTS), \
+   $(shell echo $($(1)_UBI_OPTS)), \
$(shell echo $(UBI_OPTS)) \
) \
-o $(KDIR)/root$(1).ubi \
@@ -217,11 +218,17 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),)
 endef
 
 define Image/mkfs/ubifs
+# Move to Image/Build/ubifs to avoid profile in mkfs
+   touch $(KDIR)/root.ubifs
+endef
 
-ifneq ($($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS),)
+# $(1) profile
+define Image/Build/ubifs/Profile
+ifneq ($($(1)_UBIFS_OPTS)$(UBIFS_OPTS),)
+   rm -f $(KDIR)/root.ubifs
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
-   

[OpenWrt-Devel] [PATCH 07/13] arc770: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/arc770/generic/profiles/00-default.mk |  1 +
 target/linux/arc770/generic/profiles/01-all.mk | 15 +++
 target/linux/arc770/generic/profiles/01-minimal.mk | 15 ---
 target/linux/arc770/generic/profiles/02-axs101.mk  | 16 
 target/linux/arc770/generic/profiles/02-minimal.mk | 15 +++
 target/linux/arc770/generic/profiles/04-axs101.mk  | 16 
 target/linux/arc770/image/Makefile |  2 +-
 7 files changed, 48 insertions(+), 32 deletions(-)
 create mode 100644 target/linux/arc770/generic/profiles/01-all.mk
 delete mode 100644 target/linux/arc770/generic/profiles/01-minimal.mk
 delete mode 100644 target/linux/arc770/generic/profiles/02-axs101.mk
 create mode 100644 target/linux/arc770/generic/profiles/02-minimal.mk
 create mode 100644 target/linux/arc770/generic/profiles/04-axs101.mk

diff --git a/target/linux/arc770/generic/profiles/00-default.mk 
b/target/linux/arc770/generic/profiles/00-default.mk
index b12ceb1..5f565c6 100644
--- a/target/linux/arc770/generic/profiles/00-default.mk
+++ b/target/linux/arc770/generic/profiles/00-default.mk
@@ -8,6 +8,7 @@
 define Profile/Default
NAME:=Default Profile (all drivers)
PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci
+   PROFILE_SKIP_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/arc770/generic/profiles/01-all.mk 
b/target/linux/arc770/generic/profiles/01-all.mk
new file mode 100644
index 000..02daed8
--- /dev/null
+++ b/target/linux/arc770/generic/profiles/01-all.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+$(eval $(call Profile,All))
diff --git a/target/linux/arc770/generic/profiles/01-minimal.mk 
b/target/linux/arc770/generic/profiles/01-minimal.mk
deleted file mode 100644
index c8968da..000
--- a/target/linux/arc770/generic/profiles/01-minimal.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Minimal
-   NAME:=Minimal Profile (no drivers)
-endef
-
-define Profile/Minimal/Description
-   Minimal package set compatible with most boards.
-endef
-$(eval $(call Profile,Minimal))
diff --git a/target/linux/arc770/generic/profiles/02-axs101.mk 
b/target/linux/arc770/generic/profiles/02-axs101.mk
deleted file mode 100644
index 60cf0fc..000
--- a/target/linux/arc770/generic/profiles/02-axs101.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2015 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/axs101
-   NAME:=Synopsys DesignWare AXS101
-   PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci
-endef
-
-define Profile/axs101/Description
-   Package set compatible with hardware using Synopsys DesignWare AXS101 
boards.
-endef
-$(eval $(call Profile,axs101))
diff --git a/target/linux/arc770/generic/profiles/02-minimal.mk 
b/target/linux/arc770/generic/profiles/02-minimal.mk
new file mode 100644
index 000..c8968da
--- /dev/null
+++ b/target/linux/arc770/generic/profiles/02-minimal.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Minimal
+   NAME:=Minimal Profile (no drivers)
+endef
+
+define Profile/Minimal/Description
+   Minimal package set compatible with most boards.
+endef
+$(eval $(call Profile,Minimal))
diff --git a/target/linux/arc770/generic/profiles/04-axs101.mk 
b/target/linux/arc770/generic/profiles/04-axs101.mk
new file mode 100644
index 000..60cf0fc
--- /dev/null
+++ b/target/linux/arc770/generic/profiles/04-axs101.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/axs101
+   NAME:=Synopsys DesignWare AXS101
+   PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci
+endef
+
+define Profile/axs101/Description
+   Package set compatible with hardware using Synopsys DesignWare AXS101 
boards.
+endef
+$(eval $(call Profile,axs101))
diff --git a/target/linux/arc770/image/Makefile 
b/target/linux/arc770/image/Makefile
index 6b9c5e4..0bbf36d 100644
--- a/target/linux/arc770/image/Make

[OpenWrt-Devel] [PATCH 05/13] ramips: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/ramips/image/Makefile | 12 ++--
 target/linux/ramips/mt7620/profiles/00-default.mk  |  1 +
 target/linux/ramips/mt7620/profiles/01-all.mk  | 15 +++
 target/linux/ramips/mt7621/profiles/00-default.mk  |  1 +
 target/linux/ramips/mt7621/profiles/01-all.mk  | 15 +++
 target/linux/ramips/mt7628/profiles/00-default.mk  |  1 +
 target/linux/ramips/mt7628/profiles/01-all.mk  | 15 +++
 target/linux/ramips/mt7688/profiles/00-default.mk  |  1 +
 target/linux/ramips/mt7688/profiles/01-all.mk  | 15 +++
 target/linux/ramips/mt7688/profiles/01-mediatek.mk | 18 --
 target/linux/ramips/mt7688/profiles/02-mediatek.mk | 18 ++
 target/linux/ramips/rt288x/profiles/00-default.mk  |  1 +
 target/linux/ramips/rt288x/profiles/01-all.mk  | 15 +++
 target/linux/ramips/rt305x/profiles/00-default.mk  |  1 +
 target/linux/ramips/rt305x/profiles/01-all.mk  | 15 +++
 target/linux/ramips/rt3883/profiles/00-default.mk  |  1 +
 target/linux/ramips/rt3883/profiles/01-all.mk  | 16 
 17 files changed, 137 insertions(+), 24 deletions(-)
 create mode 100644 target/linux/ramips/mt7620/profiles/01-all.mk
 create mode 100644 target/linux/ramips/mt7621/profiles/01-all.mk
 create mode 100644 target/linux/ramips/mt7628/profiles/01-all.mk
 create mode 100644 target/linux/ramips/mt7688/profiles/01-all.mk
 delete mode 100644 target/linux/ramips/mt7688/profiles/01-mediatek.mk
 create mode 100644 target/linux/ramips/mt7688/profiles/02-mediatek.mk
 create mode 100644 target/linux/ramips/rt288x/profiles/01-all.mk
 create mode 100644 target/linux/ramips/rt305x/profiles/01-all.mk
 create mode 100644 target/linux/ramips/rt3883/profiles/01-all.mk

diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index b58ca7e..ee6f325 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -448,7 +448,7 @@ Image/Build/Profile/WLITX4AG300N=$(call 
BuildFirmware/Default4M/$(1),$(1),wli-tx
 Image/Build/Profile/WZRAGL300NH=$(call 
BuildFirmware/Default4M/$(1),$(1),wzr-agl300nh,WZR-AGL300NH)
 
 ifeq ($(SUBTARGET),rt288x)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/AR670W,$(1))
$(call Image/Build/Profile/AR725W,$(1))
$(call Image/Build/Profile/F5D8235V1,$(1))
@@ -749,7 +749,7 @@ Image/Build/Profile/X8=$(call 
BuildFirmware/Poray8M/$(1),$(1),x8,X8)
 Image/Build/Profile/XDXRN502J=$(call 
BuildFirmware/Default4M/$(1),$(1),xdxrn502j,XDXRN502J)
 
 ifeq ($(SUBTARGET),rt305x)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/3G6200N,$(1))
$(call Image/Build/Profile/3G6200NL,$(1))
$(call Image/Build/Profile/3G150B,$(1))
@@ -897,7 +897,7 @@ rootfs_size_BR6475ND:=5832704
 Image/Build/Profile/BR6475ND=$(call 
BuildFirmware/EdimaxCombined/$(1),$(1),br-6475nd,BR-6475ND,$(kernel_size_BR6475ND),$(rootfs_size_BR6475ND),CSYS,RN54,0x7,0x0110)
 
 ifeq ($(SUBTARGET),rt3883)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/CYSWR1100,$(1))
$(call Image/Build/Profile/DIR645,$(1))
$(call Image/Build/Profile/HPM,$(1))
@@ -956,7 +956,7 @@ Image/Build/Profile/TINY-AC=$(call 
BuildFirmware/Default8M/$(1),$(1),tiny-ac,TIN
 
 
 ifeq ($(SUBTARGET),mt7620)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/E1700,$(1))
$(call Image/Build/Profile/MT7620a,$(1))
$(call Image/Build/Profile/MT7620a_MT7610e,$(1))
@@ -1091,7 +1091,7 @@ Image/Build/Profile/MT7628=$(call 
BuildFirmware/Default4M/$(1),$(1),mt7628,MT762
 Image/Build/Profile/WRTNODE2P=$(call 
BuildFirmware/Default16M/$(1),$(1),wrtnode2p,WRTNODE2P)
 
 ifeq ($(SUBTARGET),mt7628)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/MT7628,$(1))
$(call Image/Build/Profile/WRTNODE2P,$(1))
 endef
@@ -1106,7 +1106,7 @@ Image/Build/Profile/LinkIt7688=$(call 
BuildFirmware/Default32M/$(1),$(1),LinkIt7
 Image/Build/Profile/WRTNODE2R=$(call 
BuildFirmware/Default16M/$(1),$(1),wrtnode2r,WRTNODE2R)
 
 ifeq ($(SUBTARGET),mt7688)
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/LinkIt7688,$(1))
$(call Image/Build/Profile/WRTNODE2R,$(1))
 endef
diff --git a/target/linux/ramips/mt7620/profiles/00-default.mk 
b/target/linux/ramips/mt7620/profiles/00-default.mk
index 6c7d721..b86d541 100644
--- a/target/linux/ramips/mt7620/profiles/00-default.mk
+++ b/target/linux/ramips/mt7620/profiles/00-default.mk
@@ -1

[OpenWrt-Devel] [PATCH 08/13] brcm63xx: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/brcm63xx/image/Makefile |   2 +-
 target/linux/brcm63xx/profiles/00-default.mk |   1 +
 target/linux/brcm63xx/profiles/01-all.mk |  14 +++
 target/linux/brcm63xx/profiles/01-generic.mk | 123 ---
 target/linux/brcm63xx/profiles/02-generic.mk | 123 +++
 5 files changed, 139 insertions(+), 124 deletions(-)
 create mode 100644 target/linux/brcm63xx/profiles/01-all.mk
 delete mode 100644 target/linux/brcm63xx/profiles/01-generic.mk
 create mode 100644 target/linux/brcm63xx/profiles/02-generic.mk

diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index 81a9dc7..3175b5d 100644
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -167,7 +167,7 @@ endef
 
 # Shared device definition: applies to every defined device
 define Device/Default
-  PROFILES = Default $$(DEVICE_PROFILE)
+  PROFILES = All $$(DEVICE_PROFILE)
   KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts)
   KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX).elf
   DEVICE_PROFILE :=
diff --git a/target/linux/brcm63xx/profiles/00-default.mk 
b/target/linux/brcm63xx/profiles/00-default.mk
index a25be92..f7cd1ac 100644
--- a/target/linux/brcm63xx/profiles/00-default.mk
+++ b/target/linux/brcm63xx/profiles/00-default.mk
@@ -8,6 +8,7 @@
 define Profile/Default
   NAME:=Default Profile
   PACKAGES:=kmod-b43 wpad-mini
+  PROFILE_SKIP_DEFAULT:=1
 endef
 define Profile/Default/description
   Package set compatible with most boards.
diff --git a/target/linux/brcm63xx/profiles/01-all.mk 
b/target/linux/brcm63xx/profiles/01-all.mk
new file mode 100644
index 000..12966b5
--- /dev/null
+++ b/target/linux/brcm63xx/profiles/01-all.mk
@@ -0,0 +1,14 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+endef
+define Profile/All/description
+   Builds images for all profiles
+endef
+$(eval $(call Profile,All))
diff --git a/target/linux/brcm63xx/profiles/01-generic.mk 
b/target/linux/brcm63xx/profiles/01-generic.mk
deleted file mode 100644
index 2a9eb15..000
--- a/target/linux/brcm63xx/profiles/01-generic.mk
+++ /dev/null
@@ -1,123 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/963281TAN
-  NAME:=Generic 963281TAN
-  PACKAGES:=
-endef
-define Profile/963281TAN/Description
-  Package set optimized for 963281TAN.
-endef
-$(eval $(call Profile,963281TAN))
-
-define Profile/96328avng
-  NAME:=Generic 96328avng
-  PACKAGES:=
-endef
-define Profile/96328avng/Description
-  Package set optimized for 96328avng.
-endef
-$(eval $(call Profile,96328avng))
-
-define Profile/96338GW
-  NAME:=Generic 96338GW
-  PACKAGES:=
-endef
-define Profile/96338GW/Description
-  Package set optimized for 96338GW.
-endef
-$(eval $(call Profile,96338GW))
-
-define Profile/96338W
-  NAME:=Generic 96338W
-  PACKAGES:=
-endef
-define Profile/96338W/Description
-  Package set optimized for 96338W.
-endef
-$(eval $(call Profile,96338W))
-
-define Profile/96345GW2
-  NAME:=Generic 96345GW2
-  PACKAGES:=
-endef
-define Profile/96345GW2/Description
-  Package set optimized for 96345GW2.
-endef
-$(eval $(call Profile,96345GW2))
-
-define Profile/96348GW
-  NAME:=Generic 96348GW
-  PACKAGES:=
-endef
-define Profile/96348GW/Description
-  Package set optimized for 96348GW.
-endef
-$(eval $(call Profile,96348GW))
-
-define Profile/96348GW_10
-  NAME:=Generic 96348GW-10
-  PACKAGES:=
-endef
-define Profile/96348GW_10/Description
-  Package set optimized for 96348GW-10.
-endef
-$(eval $(call Profile,96348GW_10))
-
-define Profile/96348GW_11
-  NAME:=Generic 96348GW-11
-  PACKAGES:=
-endef
-define Profile/96348GW_11/Description
-  Package set optimized for 96348GW-11.
-endef
-$(eval $(call Profile,96348GW_11))
-
-define Profile/96348R
-  NAME:=Generic 96348R
-  PACKAGES:=
-endef
-define Profile/96348R/Description
-  Package set optimized for 96348R.
-endef
-$(eval $(call Profile,96348R))
-
-define Profile/96358VW
-  NAME:=Generic 96358VW
-  PACKAGES:=
-endef
-define Profile/96358VW/Description
-  Package set optimized for 96358VW.
-endef
-$(eval $(call Profile,96358VW))
-
-define Profile/96358VW2
-  NAME:=Generic 96358VW2
-  PACKAGES:=
-endef
-define Profile/96358VW2/Description
-  Package set optimized for 96358VW2.
-endef
-$(eval $(call Profile,96358VW2))
-
-define Profile/96368MVNgr
-  NAME:=Generic 96368MVNgr
-  PACKAGES:=
-endef
-define Profile/96368MVNgr/Description
-  Package set optimized for 96368MVNgr.
-endef
-$(eval $(call Profile,96368MVN

[OpenWrt-Devel] [PATCH 09/13] sunxi: Add an 'All Profiles' profile

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Sunxi has enough images to make it useful to get all profiles
and multi-profile select working properly, so this patch adds
an 'All Profiles' profile, however it is only used to allow
KConfig to select all profiles and is not used standalone to
build all targets, due to the differences in devices that would
result in every image having a number of packages selected
by other profiles but not applicable the current image.

Signed-off-by: Daniel Dickinson 
---
 target/linux/sunxi/image/Makefile |  8 +---
 target/linux/sunxi/profiles/00-default.mk | 17 +
 target/linux/sunxi/profiles/01-all.mk | 18 ++
 target/linux/sunxi/profiles/01-default.mk | 17 -
 4 files changed, 40 insertions(+), 20 deletions(-)
 create mode 100644 target/linux/sunxi/profiles/00-default.mk
 create mode 100644 target/linux/sunxi/profiles/01-all.mk
 delete mode 100644 target/linux/sunxi/profiles/01-default.mk

diff --git a/target/linux/sunxi/image/Makefile 
b/target/linux/sunxi/image/Makefile
index 6758ba1..a17e1a2 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -106,13 +106,15 @@ endef
 define Image/Build/Profile/Linksprite_pcDuino3
$(call Image/Build/SDCard,$(1),sun7i-a20-pcduino3,$(2))
 endef
-endef
 
-define Image/Build
+define Image/Build/Default
$(call Image/Build/$(1),$(1),$(2))
$(call Image/Build/Profile/$(2),$(1),$(2))
-
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k 
conv=sync
 endef
 
+define Image/Build
+   $(if $(filter-out All,$(2))$(call Image/Build/Default,$(1),$(2)))
+endef
+
 $(eval $(call BuildImage))
diff --git a/target/linux/sunxi/profiles/00-default.mk 
b/target/linux/sunxi/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/sunxi/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/sunxi/profiles/01-all.mk 
b/target/linux/sunxi/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/sunxi/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/sunxi/profiles/01-default.mk 
b/target/linux/sunxi/profiles/01-default.mk
deleted file mode 100644
index 7d83440..000
--- a/target/linux/sunxi/profiles/01-default.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Default
-  NAME:=Default package set
-  PACKAGES += uboot-sunxi-A13-OLinuXino
-endef
-
-define Profile/Default/Description
-   Default package set compatible with most boards.
-endef
-$(eval $(call Profile,Default))
-
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 06/13] mpc85xx: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/mpc85xx/image/Makefile |  2 +-
 target/linux/mpc85xx/profiles/00-default.mk |  1 +
 target/linux/mpc85xx/profiles/01-all.mk | 15 +++
 3 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/mpc85xx/profiles/01-all.mk

diff --git a/target/linux/mpc85xx/image/Makefile 
b/target/linux/mpc85xx/image/Makefile
index ac4541d..0b0ab73 100644
--- a/target/linux/mpc85xx/image/Makefile
+++ b/target/linux/mpc85xx/image/Makefile
@@ -52,7 +52,7 @@ define Image/Build/Profile/TLWDR4900
$(call 
Image/Build/TPLINK,$(1),tl-wdr4900-v1,cuImage.tl-wdr4900-v1,0x4901,1,16Mppc)
 endef
 
-define Image/Build/Profile/Default
+define Image/Build/Profile/All
$(call Image/Build/Profile/TLWDR4900,$(1))
 endef
 
diff --git a/target/linux/mpc85xx/profiles/00-default.mk 
b/target/linux/mpc85xx/profiles/00-default.mk
index a0b2558..94bfb14 100644
--- a/target/linux/mpc85xx/profiles/00-default.mk
+++ b/target/linux/mpc85xx/profiles/00-default.mk
@@ -8,6 +8,7 @@
 define Profile/Default
NAME:=Default Profile (all drivers)
PACKAGES:=kmod-usb-core kmod-usb2 kmod-usb2-fsl
+   PROFILE_SKIP_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/mpc85xx/profiles/01-all.mk 
b/target/linux/mpc85xx/profiles/01-all.mk
new file mode 100644
index 000..024b610
--- /dev/null
+++ b/target/linux/mpc85xx/profiles/01-all.mk
@@ -0,0 +1,15 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   Builds images for all profiles
+endef
+$(eval $(call Profile,All))
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 10/13] kirkwood: Add an 'All Profiles' profile

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Kirkwood has enough images to make it useful to get all profiles
and multi-profile select working properly, so this patch adds
an 'All Profiles' profile.

Signed-off-by: Daniel Dickinson 
---
 target/linux/kirkwood/image/Makefile  | 27 +--
 target/linux/kirkwood/profiles/000-default.mk | 19 +++
 target/linux/kirkwood/profiles/010-all.mk | 17 +
 3 files changed, 61 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/kirkwood/profiles/000-default.mk
 create mode 100644 target/linux/kirkwood/profiles/010-all.mk

diff --git a/target/linux/kirkwood/image/Makefile 
b/target/linux/kirkwood/image/Makefile
index fbcc7b1..3c58b9d 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -15,37 +15,47 @@ KERNEL_LOADADDR:=0x8000
 TARGET_DEVICES = linksys-audi linksys-viper
 
 define Device/Default
+  PROFILES := All $$(DEVICE_PROFILE)
   KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
   KERNEL := kernel-bin | append-dtb | uImage none
   KERNEL_NAME := zImage
 endef
 
 define Device/linksys-audi
+  # Generic AUDI
   DEVICE_DTS := kirkwood-linksys-audi
   PAGESIZE := 512
   SUBPAGESIZE := 256
   BLOCKSIZE := 16KiB
   KERNEL_SIZE := 2624k
   FILESYSTEMS := squashfs
-  PROFILES := Generic AUDI
+  DEVICE_PROFILE := linksys-audi
   IMAGES := factory.bin sysupgrade.tar
   IMAGE/factory.bin := append-kernel (KERNEL_SIZE) | append-ubi
   IMAGE/sysupgrade.tar := sysupgrade-nand
 endef
 
 define Device/linksys-viper
+  # Generic VIPER
   DEVICE_DTS := kirkwood-linksys-viper
   PAGESIZE := 2048
   SUBPAGESIZE := 512
   BLOCKSIZE := 128KiB
   KERNEL_SIZE := 2688k
   FILESYSTEMS := squashfs
-  PROFILES := Generic VIPER
+  DEVICE_PROFILE := linksys-viper
   IMAGES := factory.bin sysupgrade.tar
   IMAGE/factory.bin := append-kernel (KERNEL_SIZE) | append-ubi
   IMAGE/sysupgrade.tar := sysupgrade-nand
 endef
 
+define DefineDevice
+  define Device/$(1)
+DEVICE_PROFILE := $(1)
+  endef
+  TARGET_DEVICES += $(1)
+endef
+
 define Build/append-dtb
cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@
 endef
@@ -143,42 +153,55 @@ define Image/Build/ubi
  endif
 endef
 
+$(eval $(call DefineDevice,Generic))
 Image/BuildKernel/Template/Generic=$(call Image/BuildKernel/Template,,$(1))
 Image/InstallKernel/Template/Generic=$(call Image/InstallKernel/Template)
 
+$(eval $(call DefineDevice,DOCKSTAR))
 Image/BuildKernel/Template/DOCKSTAR=$(call 
Image/BuildKernel/Template,dockstar,$(1))
 Image/InstallKernel/Template/DOCKSTAR=$(call 
Image/InstallKernel/Template,dockstar)
 
+$(eval $(call DefineDevice,GOFLEXHOME))
 Image/BuildKernel/Template/GOFLEXHOME=$(call 
Image/BuildKernel/Template,goflexhome,$(1))
 Image/InstallKernel/Template/GOFLEXHOME=$(call 
Image/InstallKernel/Template,goflexhome)
 
+$(eval $(call DefineDevice,GOFLEXNET))
 Image/BuildKernel/Template/GOFLEXNET=$(call 
Image/BuildKernel/Template,goflexnet,$(1))
 Image/InstallKernel/Template/GOFLEXNET=$(call 
Image/InstallKernel/Template,goflexnet)
 
+$(eval $(call DefineDevice,IB62X0))
 Image/BuildKernel/Template/IB62X0=$(call 
Image/BuildKernel/Template,ib62x0,$(1))
 Image/InstallKernel/Template/IB62X0=$(call Image/InstallKernel/Template,ib62x0)
 
+$(eval $(call DefineDevice,ICONNECT))
 Image/BuildKernel/Template/ICONNECT=$(call 
Image/BuildKernel/Template,iconnect,$(1))
 Image/InstallKernel/Template/ICONNECT=$(call 
Image/InstallKernel/Template,iconnect)
 
+$(eval $(call DefineDevice,IOMEGA_IX2_200))
 Image/BuildKernel/Template/IOMEGA_IX2_200=$(call 
Image/BuildKernel/Template,iomega_ix2_200,$(1))
 Image/InstallKernel/Template/IOMEGA_IX2_200=$(call 
Image/InstallKernel/Template,iomega_ix2_200)
 
+$(eval $(call DefineDevice,NSA310S))
 Image/BuildKernel/Template/NSA310S=$(call 
Image/BuildKernel/Template,nsa310s,$(1))
 Image/InstallKernel/Template/NSA310S=$(call 
Image/InstallKernel/Template,nsa310s)
 
+$(eval $(call DefineDevice,POGOE02))
 Image/BuildKernel/Template/POGOE02=$(call 
Image/BuildKernel/Template,pogo_e02,$(1))
 Image/InstallKernel/Template/POGOE02=$(call 
Image/InstallKernel/Template,pogo_e02)
 
+$(eval $(call DefineDevice,SHEEVAPLUG))
 Image/BuildKernel/Template/SHEEVAPLUG=$(call 
Image/BuildKernel/Template,sheevaplug,$(1))
 Image/InstallKernel/Template/SHEEVAPLUG=$(call 
Image/InstallKernel/Template,sheevaplug)
 
+$(eval $(call DefineDevice,SHEEVAPLUGSATA))
 Image/BuildKernel/Template/SHEEVAPLUGSATA=$(call 
Image/BuildKernel/Template,sheevaplug-esata,$(1))
 Image/InstallKernel/Template/SHEEVAPLUGSATA=$(call 
Image/InstallKernel/Template,sheevaplug-esata)
 
+$(eval $(call DefineDevice,GuruplugServerPlus))
 Image/BuildKernel/Template/GuruplugServerPlus=$(call 
Image/BuildKernel/Template,guruplug-server-plus,$(1))
 Image/InstallKernel/Template/GuruplugServerPlus=$(call 
Image/InstallKernel/Template,guruplug-server-plus)
 
+$(eval $(call DefineDevice,Topkick1281P2))
 Image/BuildKernel/Template/Topkick1281P2

[OpenWrt-Devel] [PATCH 13/13] brcm47xx: Add an 'All Profiles' profile

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Brcm47xx has enough images to make it useful to get all profiles
and multi-profile select working properly, so this patch adds
an 'All Profiles' profile, however it is only used to allow
KConfig to select all profiles and is not used standalone to
build all targets, due to the differences in devices that would
result in every image having a number of packages selected
by other profiles but not applicable the current image.

Signed-off-by: Daniel Dickinson 
---
 target/linux/brcm47xx/generic/profiles/00-default.mk | 17 +
 target/linux/brcm47xx/generic/profiles/01-all.mk | 18 ++
 target/linux/brcm47xx/image/Makefile |  6 +-
 target/linux/brcm47xx/legacy/profiles/00-default.mk  | 17 +
 target/linux/brcm47xx/legacy/profiles/01-all.mk  | 18 ++
 target/linux/brcm47xx/mips74k/profiles/00-default.mk | 17 +
 target/linux/brcm47xx/mips74k/profiles/01-all.mk | 18 ++
 7 files changed, 110 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/brcm47xx/generic/profiles/00-default.mk
 create mode 100644 target/linux/brcm47xx/generic/profiles/01-all.mk
 create mode 100644 target/linux/brcm47xx/legacy/profiles/00-default.mk
 create mode 100644 target/linux/brcm47xx/legacy/profiles/01-all.mk
 create mode 100644 target/linux/brcm47xx/mips74k/profiles/00-default.mk
 create mode 100644 target/linux/brcm47xx/mips74k/profiles/01-all.mk

diff --git a/target/linux/brcm47xx/generic/profiles/00-default.mk 
b/target/linux/brcm47xx/generic/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/brcm47xx/generic/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/brcm47xx/generic/profiles/01-all.mk 
b/target/linux/brcm47xx/generic/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/brcm47xx/generic/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/brcm47xx/image/Makefile 
b/target/linux/brcm47xx/image/Makefile
index 782beef..19e27e9 100644
--- a/target/linux/brcm47xx/image/Makefile
+++ b/target/linux/brcm47xx/image/Makefile
@@ -355,7 +355,7 @@ define Image/Build/Initramfs
 endef
 
 # $(1): filesystem type.
-define Image/Build
+define Image/Build/Default
$(STAGING_DIR_HOST)/bin/trx \
-m 33554432 \
-o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
@@ -381,4 +381,8 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
 endif
 endef
 
+define Image/Build
+   $(if $(filter-out All,$(2)),$(call Image/Build/Default,$(1),$(2)))
+endef
+
 $(eval $(call BuildImage))
diff --git a/target/linux/brcm47xx/legacy/profiles/00-default.mk 
b/target/linux/brcm47xx/legacy/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/brcm47xx/legacy/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/brcm47xx/legacy/profiles/01-all.mk 
b/target/linux/brcm47xx/legacy/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/brcm47xx/legacy/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/brcm47xx/mips74k/profiles/00-default.mk 
b/target/linux/brcm47xx/mips74k/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/brcm47xx/mips74k/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See

[OpenWrt-Devel] [PATCH 11/13] adm5120: Translate existing all profiles profiles to new mult-select structure

2016-01-18 Thread openwrt
From: Daniel Dickinson 

For adm5120 the Generic profile was used to build images for all profiles; 
change
this to the All profile and integrate with multiple (but not all) profile build
mechanism.

Signed-off-by: Daniel Dickinson 
---
 target/linux/adm5120/image/Makefile|  12 +-
 target/linux/adm5120/image/rb1xx.mk|   8 +-
 target/linux/adm5120/image/router_be.mk|  17 ++-
 target/linux/adm5120/image/router_le.mk| 137 -
 target/linux/adm5120/rb1xx/profiles/000-default.mk |  19 +++
 target/linux/adm5120/rb1xx/profiles/005-all.mk |  17 +++
 .../adm5120/router_be/profiles/000-default.mk  |  19 +++
 target/linux/adm5120/router_be/profiles/005-all.mk |  17 +++
 .../adm5120/router_le/profiles/000-default.mk  |  19 +++
 target/linux/adm5120/router_le/profiles/005-all.mk |  17 +++
 .../adm5120/router_le/profiles/010-Generic.mk  |  10 --
 11 files changed, 277 insertions(+), 15 deletions(-)
 create mode 100644 target/linux/adm5120/rb1xx/profiles/000-default.mk
 create mode 100644 target/linux/adm5120/rb1xx/profiles/005-all.mk
 create mode 100644 target/linux/adm5120/router_be/profiles/000-default.mk
 create mode 100644 target/linux/adm5120/router_be/profiles/005-all.mk
 create mode 100644 target/linux/adm5120/router_le/profiles/000-default.mk
 create mode 100644 target/linux/adm5120/router_le/profiles/005-all.mk

diff --git a/target/linux/adm5120/image/Makefile 
b/target/linux/adm5120/image/Makefile
index c0864b7..9adbb96 100644
--- a/target/linux/adm5120/image/Makefile
+++ b/target/linux/adm5120/image/Makefile
@@ -22,10 +22,18 @@ fs_4k:=4k
 fs_64k:=64k
 fs_128k:=128k
 
+define Device/Default
+  PROFILES = All $$(DEVICE_PROFILE)
+endef
+
 define Build/Clean
$(LOADER_MAKE) clean
 endef
 
+define Device/Build/image
+
+endef
+
 define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 
-lp2 -pb2 > $(KDIR)/vmlinux.lzma
rm -f $(JFFS2BLOCK)
@@ -93,11 +101,11 @@ endef
 include $(SUBTARGET).mk
 
 define Image/Build
-   $(call Image/Build/Profile/$(2),$(1))
+   $(call Image/Build/Profile/$(2),$(1),$(2))
 endef
 
 define Image/Build/Initramfs
-   $(call Image/Build/Profile/$(2),Initramfs)
+   $(call Image/Build/Profile/$(1),Initramfs,$(1))
 endef
 
 define Image/BuildKernel
diff --git a/target/linux/adm5120/image/rb1xx.mk 
b/target/linux/adm5120/image/rb1xx.mk
index 3552958..1354a67 100644
--- a/target/linux/adm5120/image/rb1xx.mk
+++ b/target/linux/adm5120/image/rb1xx.mk
@@ -5,7 +5,6 @@
 # See /LICENSE for more information.
 #
 
-
 define Image/cmdline/yaffs2
root=/dev/mtdblock3 rootfstype=yaffs2
 endef
@@ -16,9 +15,16 @@ define Image/BuildKernel/RouterBoard
'$(strip $(call Image/cmdline/yaffs2))'
 endef
 
+Image/BuildKernel/All=$(call Image/BuildKernel/RouterBoard)
+
 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
   define Image/BuildKernel
$(call Image/BuildKernel/RouterBoard)
   endef
 endif
 
+define Device/RouterBoard
+  DEVICE_PROFILE := RouterBoard
+endef
+
+TARGET_DEVICES = RouterBoard
diff --git a/target/linux/adm5120/image/router_be.mk 
b/target/linux/adm5120/image/router_be.mk
index 5a16672..61dd3e1 100644
--- a/target/linux/adm5120/image/router_be.mk
+++ b/target/linux/adm5120/image/router_be.mk
@@ -14,6 +14,7 @@ define Image/Build/ZyXEL
-o $(call imgname,$(1),$(2))-webui.bin
 endef
 
+
 define Image/Build/Template/ZyXEL
$(call Image/Build/ZyXEL,$(1),$(2))
 endef
@@ -33,15 +34,29 @@ endef
 #
 # Profiles
 #
+define Device/P334WT
+  DEVICE_PROFILE := P33WT
+  IMAGES := squashfs trx
+endef
+
+TARGET_DEVICES += P334WT
+
 define Image/Build/Profile/P334WT
$(call Image/Build/Template/ZyXEL/$(1),p-334wt)
 endef
 
+define Device/P335WT
+  DEVICE_PROFILE := P35WT
+  IMAGES := squashfs trx
+endef
+
+TARGET_DEVICES += P335WT
+
 define Image/Build/Profile/P335WT
$(call Image/Build/Template/ZyXEL/$(1),p-335wt)
 endef
 
-define Image/Build/Profile/Generic
+define Image/Build/Profile/All
$(call Image/Build/Profile/P334WT,$(1))
$(call Image/Build/Profile/P335WT,$(1))
 endef
diff --git a/target/linux/adm5120/image/router_le.mk 
b/target/linux/adm5120/image/router_le.mk
index 1e3d7f7..9e2b646 100644
--- a/target/linux/adm5120/image/router_le.mk
+++ b/target/linux/adm5120/image/router_le.mk
@@ -242,22 +242,48 @@ endef
 #
 # Profiles
 #
+
+define Device/CAS630
+  DEVICE_PROFILE := CAS630
+  IMAGES := trx xmodem.bin
+endef
+
 define Image/Build/Profile/CAS630
$(call Image/Build/Template/Cellvision/$(1),cas-630,cas-630)
 endef
 
+define Device/CAS630W
+  DEVICE_PROFILE := CAS630W
+  IMAGES := trx xmodem.bin
+endef
+
 define Image/Build/Profile/CAS630W
$(call Image/Build/Template/Cellvision/$(1),cas-630w,cas-630)
 endef
 
+define Device/CAS670
+  DEVICE_PROFILE := CAS670
+  IMAGES := trx xmodem.bin
+endef
+
 define Image/Build/Profile/CAS670
$(call Image/Build/Te

Re: [OpenWrt-Devel] [PATCH] Add support for Netgear D7800

2016-01-18 Thread Tathagata Das
Any update about the patch?

Regards,
Tathagata


-Original Message-
From: Tathagata Das [mailto:tathag...@alumnux.com] 
Sent: 12 January 2016 20:47
To: openwrt-devel@lists.openwrt.org
Cc: Tathagata Das
Subject: [PATCH] Add support for Netgear D7800

Signed-off-by: Tathagata Das 
---
 .../linux/ipq806x/base-files/etc/board.d/01_leds   |   1 +
 .../ipq806x/base-files/etc/board.d/02_network  |   1 +
 target/linux/ipq806x/base-files/lib/ipq806x.sh |   3 +
 .../ipq806x/base-files/lib/upgrade/platform.sh |   2 +
 target/linux/ipq806x/image/Makefile|  13 +-
 ...dd-Netgear-Nighthawk-X4-D7800-device-tree.patch | 381
+
 target/linux/ipq806x/profiles/netgear.mk   |  13 +
 7 files changed, 413 insertions(+), 1 deletion(-)  create mode 100644
target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D780
0-device-tree.patch

diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds
b/target/linux/ipq806x/base-files/etc/board.d/01_leds
index 07b5b06..b32c1cc 100755
--- a/target/linux/ipq806x/base-files/etc/board.d/01_leds
+++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds
@@ -11,6 +11,7 @@ board_config_update
 board=$(ipq806x_board_name)
 
 case "$board" in
+d7800 |\
 r7500)
ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1"
ucidef_set_led_usbdev "usb2" "USB 2" "r7500:white:usb3" "3-1"
diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network
b/target/linux/ipq806x/base-files/etc/board.d/02_network
index 1302a55..6e18297 100755
--- a/target/linux/ipq806x/base-files/etc/board.d/02_network
+++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
@@ -13,6 +13,7 @@ board=$(ipq806x_board_name)
 
 case "$board" in
 ap148 |\
+d7800 |\
 r7500)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0"
diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh
b/target/linux/ipq806x/base-files/lib/ipq806x.sh
index 5b27bde..db22708 100644
--- a/target/linux/ipq806x/base-files/lib/ipq806x.sh
+++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh
@@ -17,6 +17,9 @@ ipq806x_board_detect() {
*"AP148")
name="ap148"
;;
+   *"D7800")
+   name="d7800"
+   ;;
*"DB149")
name="db149"
;;
diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
index c0e19a1..2400376 100644
--- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
@@ -7,6 +7,7 @@ platform_check_image() {
 
case "$board" in
AP148 |\
+   d7800 |\
r7500)
nand_do_platform_check $board $1
return $?;
@@ -21,6 +22,7 @@ platform_pre_upgrade() {
 
case "$board" in
AP148 |\
+   d7800 |\
r7500)
nand_do_upgrade "$1"
;;
diff --git a/target/linux/ipq806x/image/Makefile
b/target/linux/ipq806x/image/Makefile
index 14cf442..b880a1b 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -103,6 +103,17 @@ define Device/AP148-legacy
BOARD_NAME := ap148
 endef
 
+define Device/D7800
+   $(call Device/DniImage)
+   DEVICE_DTS := qcom-ipq8064-d7800
+   KERNEL_SIZE := 2097152
+   NETGEAR_BOARD_ID := D7800
+   NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
+   BLOCKSIZE := 128KiB
+   PAGESIZE := 2048
+   BOARD_NAME := d7800
+endef
+
 define Device/DB149
$(call Device/FitImage)
DEVICE_DTS := qcom-ipq8064-db149
@@ -121,6 +132,6 @@ define Device/R7500
BOARD_NAME := r7500
 endef
 
-TARGET_DEVICES += AP148 AP148-legacy DB149 R7500
+TARGET_DEVICES += AP148 AP148-legacy D7800 DB149 R7500
 
 $(eval $(call BuildImage))
diff --git
a/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7
800-device-tree.patch
b/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nighthawk-X4-D7
800-device-tree.patch
new file mode 100644
index 000..ecc1cff
--- /dev/null
+++ b/target/linux/ipq806x/patches-3.18/801-ARM-qcom-add-Netgear-Nightha
+++ wk-X4-D7800-device-tree.patch
@@ -0,0 +1,381 @@
+--- a/arch/arm/boot/dts/Makefile   2015-09-22 18:30:09.033530282 +0530
 b/arch/arm/boot/dts/Makefile   2015-09-23 17:06:44.892947581 +0530
+@@ -362,6 +362,7 @@
+   qcom-ipq8064-ap148.dtb \
+   qcom-ipq8064-db149.dtb \
+   qcom-ipq8064-r7500.dtb \
++  qcom-ipq8064-d7800.dtb \
+   qcom-msm8660-surf.dtb \
+   qcom-msm8960-cdp.dtb \
+   qcom-msm8974-sony-xperia-honami.dtb
+--- a/arch/arm/boot/dts/qcom-ipq8064-d7800.dts 1970-01-01
05:30:00.0 +0530
 b/arch/arm/boot/dts/qcom-ipq8064-d7800.dts 2015-09-23
17:06:45.336947567 +0530
+@@ -0,0 +1,368 @@
++#include "qcom-ipq8064-v1.0.dtsi"
++
++#include 
++
++/ {
++  model = "Netgea

[OpenWrt-Devel] [PATCH 12/13] lantiq: Add an 'All Profiles' profile

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Lantiq has enough images to make it useful to get all profiles
and multi-profile select working properly, so this patch adds
an 'All Profiles' profile, however it is only used to allow
KConfig to select all profiles and is not used standalone to
build all targets, due to the differences in devices that would
result in every image having a number of packages selected
by other profiles but not applicable the current image.

Signed-off-by: Daniel Dickinson 
---
 target/linux/lantiq/image/Makefile|  8 
 target/linux/lantiq/xrx200/profiles/00-default.mk | 17 +
 target/linux/lantiq/xrx200/profiles/01-all.mk | 18 ++
 target/linux/lantiq/xway/profiles/00-default.mk   | 17 +
 target/linux/lantiq/xway/profiles/01-all.mk   | 18 ++
 5 files changed, 74 insertions(+), 4 deletions(-)
 create mode 100644 target/linux/lantiq/xrx200/profiles/00-default.mk
 create mode 100644 target/linux/lantiq/xrx200/profiles/01-all.mk
 create mode 100644 target/linux/lantiq/xway/profiles/00-default.mk
 create mode 100644 target/linux/lantiq/xway/profiles/01-all.mk

diff --git a/target/linux/lantiq/image/Makefile 
b/target/linux/lantiq/image/Makefile
index d60af3c..431f206 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -426,21 +426,21 @@ Image/BuildKernel/Profile/VGV7519BRN=$(call 
Image/BuildKernel/Template,VGV7519BR
 Image/Build/Profile/VGV7519BRN=$(call 
Image/Build/$(1),$(1),VGV7519BRN,5D8000,0x12345678,0x2083b8ed,$(1))
 
 define Image/Prepare
-   $(call Image/Prepare/Profile,$(2),,$(2))
+   $(if $(filter-out All,$(2)),$(call Image/Prepare/Profile,$(2),,$(2)))
 endef
 
 endif
 
 define Image/BuildKernel
-   $(call Image/BuildKernel/Profile/$(2),,$(2))
+   $(if $(filter-out All,$(2)),$(call 
Image/BuildKernel/Profile/$(2),,$(2)))
 endef
 
 define Image/InstallKernel
-   $(call Image/InstallKernel/Template/$(2))
+   $(if $(filter-out All,$(2)),$(call Image/InstallKernel/Template/$(2)))
 endef
 
 define Image/Build
-   $(call Image/Build/Profile/$(2),$(1),$(2))
+   $(if $(filter-out All,$(2)),$(call Image/Build/Profile/$(2),$(1),$(2)))
 endef
 
 $(eval $(call BuildImage))
diff --git a/target/linux/lantiq/xrx200/profiles/00-default.mk 
b/target/linux/lantiq/xrx200/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/lantiq/xrx200/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/lantiq/xrx200/profiles/01-all.mk 
b/target/linux/lantiq/xrx200/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/lantiq/xrx200/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
diff --git a/target/linux/lantiq/xway/profiles/00-default.mk 
b/target/linux/lantiq/xway/profiles/00-default.mk
new file mode 100644
index 000..fc35e6d
--- /dev/null
+++ b/target/linux/lantiq/xway/profiles/00-default.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Default
+  NAME:=Default package set
+  PROFILE_SKIP_DEFAULT:=1
+endef
+
+define Profile/Default/Description
+   Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
+
diff --git a/target/linux/lantiq/xway/profiles/01-all.mk 
b/target/linux/lantiq/xway/profiles/01-all.mk
new file mode 100644
index 000..0c750e2
--- /dev/null
+++ b/target/linux/lantiq/xway/profiles/01-all.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+  NAME:=All Profiles
+  PROFILE_SKIP_SINGLE:=1
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
+
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 03/13] at91: Translate the build all profiles profile to new multi-profile config

2016-01-18 Thread openwrt
From: Daniel Dickinson 

Minor fixes so that the former 'Default' profile (now All)
not only builds all profiles but acts correctly in the
new multi-profile build machinery/menuconfig

Signed-off-by: Daniel Dickinson 
---
 target/linux/at91/image/Makefile|  2 +-
 target/linux/at91/legacy/profiles/00-default.mk |  1 +
 target/linux/at91/legacy/profiles/01-all.mk | 16 
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/at91/legacy/profiles/01-all.mk

diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile
index 648b7f5..0cea83a 100644
--- a/target/linux/at91/image/Makefile
+++ b/target/linux/at91/image/Makefile
@@ -66,7 +66,7 @@ Image/Build/Kernel/ETHERNUT5=$(call 
MkuImageDtb,ethernut5,ethernut5)
 Image/Build/Kernel/Q5XR5=$(call MkOftree,q5xr5,at91-q5xr5)
 
 
-define Image/Build/Kernel/Default
+define Image/Build/Kernel/All
$(call Image/Build/Kernel/AT91SAM9263EK)
$(call Image/Build/Kernel/AT91SAM9G15EK)
$(call Image/Build/Kernel/AT91SAM9G20EK)
diff --git a/target/linux/at91/legacy/profiles/00-default.mk 
b/target/linux/at91/legacy/profiles/00-default.mk
index 3ff040d..9a1192f 100644
--- a/target/linux/at91/legacy/profiles/00-default.mk
+++ b/target/linux/at91/legacy/profiles/00-default.mk
@@ -7,6 +7,7 @@
 
 define Profile/Default
NAME:=Default Profile
+   PROFILE_SKIP_DEFAULT:=1
 endef
 
 define Profile/Default/Description
diff --git a/target/linux/at91/legacy/profiles/01-all.mk 
b/target/linux/at91/legacy/profiles/01-all.mk
new file mode 100644
index 000..1c4c5d7
--- /dev/null
+++ b/target/linux/at91/legacy/profiles/01-all.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/All
+   NAME:=All Profiles
+endef
+
+define Profile/All/Description
+   Build images for all profiles
+endef
+
+$(eval $(call Profile,All))
-- 
2.4.3
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Dissociate STA based on SNR

2016-01-18 Thread Bastian Bittorf
* Nishant Sharma  [19.01.2016 07:46]:
> >ubus call hostapd.$dev del_client '{ "addr" : "$mac", "reason" :
> >"assoc toomany", "ban_time" : 1 }'
> Thanks for the pointers. It works for me.
> 
> What exactly is ban_time unit? I presume it's millisecond.

yes, milliseconds.

> Where can I find more documentation about ubus call to different
> processes? The page https://wiki.openwrt.org/doc/techref/ubus doesn't
> mention the call that you have used :)

in the source only 8-)

as far as I understand, these are the same command
which one can use in the hostapd-cli.

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


Re: [OpenWrt-Devel] Dissociate STA based on SNR

2016-01-18 Thread Bastian Bittorf
* Weedy  [19.01.2016 07:46]:
> > I was wondering if there is a way to dissociate STAs who say go below a
> > minimum threshold SNR or signal level of say -65dBm in a multi-AP scenario?
> >
> option disassoc_low_ack1
> Adjust this code to trigger higher?

yes, this also helps but is NOT enough.

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


Re: [OpenWrt-Devel] John, no permission to change patches even own

2016-01-18 Thread Etienne Champetier
Hi

You should respond to the original mail and not create a new thread each
time

Le 19 janv. 2016 03:03, "Daniel Dickinson" daniel.thecshore.com
> a écrit :
>
> Hi John,
>
> Contrary to what you believed it is not possible for the ordinary users
(of which I am one at the moment) to modify their own patches, so I can't
discard, archive, or otherwise do anything to patches even my own.

Maybe your patch email and your account email doesn't match exactly (+
filter or typo)?

There is not a lot of fonctions, but you can change the state of a patch to
superseeded or rejected which should be enough.
I ve created my account without admin intervention and i'm a 'normal' user.

Regards
Etienne

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


Re: [OpenWrt-Devel] [RFC v2] [zynq] Add new target zynq

2016-01-18 Thread Jason Wu

Hi Felix,

Thanks for reviewing the patch. please see my reply inline.

On 19/01/2016 12:09 AM, Felix Fietkau wrote:

On 2016-01-18 14:36, Jason Wu wrote:

Add support for Xilinx ZC702 Dev board

Zynq target is using 4.4 kernel and mainline 2016.1 u-boot.

I symbolic linked /init with /sbin/init, I am sure this is
acceptable from OpenWrt (although this can be workaround with
rdinit="/sbin/init" in bootargs but requires DTS modification).

I think a DTS modification is cleaner than such a workaround.

ok. I will add a patch to the kernel




diff --git a/target/linux/zynq/base-files/etc/config/network 
b/target/linux/zynq/base-files/etc/config/network
new file mode 100644
index 000..4731bd9
--- /dev/null
+++ b/target/linux/zynq/base-files/etc/config/network
@@ -0,0 +1,17 @@
+# Copyright (C) 2006 OpenWrt.org
+
+config interface loopback
+   option ifname   lo
+   option protostatic
+   option ipaddr   127.0.0.1
+   option netmask  255.0.0.0
+
+config interface lan
+   option ifname   eth0
+   option protostatic
+   option ipaddr   192.168.1.1
+   option netmask  255.255.255.0
+   option ip6assign 60
+
+config globals globals
+   option ula_prefix auto

Since you're using board.d, you can drop this file. Please add the
base-files.mk chunk instead that deletes the default
/etc/config/network.

i will add the rm chunk session back to base-file.mk.




diff --git a/target/linux/zynq/base-files/lib/zynq.sh 
b/target/linux/zynq/base-files/lib/zynq.sh
new file mode 100644
index 000..d430829
--- /dev/null
+++ b/target/linux/zynq/base-files/lib/zynq.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+
+ZYNQ_BOARD_NAME=
+ZYNQ_MODEL=
+
+zynq_board_detect() {
+   local machine
+   local name
+
+   machine=$(cat /proc/device-tree/model)
+
+   case "$machine" in
+   "Zynq ZC702 Development BoardBOARD")
+   name="zc702"
+   ;;
+   *)
+   name="generic"
+   ;;
+   esac
+
+   [ -n "$ZYNQ_BOARD_NAME" ] || ZYNQ_BOARD_NAME="$name"
+   [ -n "$ZYNQ_MODEL" ] || ZYNQ_MODEL="$machine"
+
+   [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
+
+   echo "$ZYNQ_BOARD_NAME" > /tmp/sysinfo/board_name
+   echo "$ZYNQ_MODEL" > /tmp/sysinfo/model
+}
+
+zynq_board_name() {
+   local name
+
+   [ -f /tmp/sysinfo/board_name ] || zynq_board_detect
+   [ ! -f /tmp/sysinfo/board_name ] || name=$(cat /tmp/sysinfo/board_name)
+   [ -n "$name" ] || name="unknown"
+
+   echo "$name"
+}

If you adjust your other scripts to be able to deal with names like
"xlnx,zynq-zc702", you can drop this script and let the default sysinfo
script take care of things.
Sorry for the newbie question, so the sysinfo get this board name base 
on the dts root node's compatible binding?


This file will be removed and i will make the network script to read 
/tmp/sysinfo/board_name if board variable is empty. e.g

board=${board:-$(cat /tmp/sysinfo/board_name)}

board_config_update

is this ok?




diff --git a/target/linux/zynq/config-4.4 b/target/linux/zynq/config-4.4
new file mode 100644
index 000..97e2710
--- /dev/null
+++ b/target/linux/zynq/config-4.4
@@ -0,0 +1,823 @@
+CONFIG_ADVISE_SYSCALLS=y
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_AMBA_PL08X is not set
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
+CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=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_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NR_GPIO=1024
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
+CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
+CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_USE_BUILTIN_BSWAP=y
+CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
+# CONFIG_ARCH_VEXPRESS_SPC is not set
+CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+CONFIG_ARCH_ZYNQ=y
+CONFIG_ARM=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_CCI=y
+CONFIG_ARM_CCI400_COMMON=y
+CONFIG_ARM_CCI400_PMU=y
+CONFIG_ARM_CCI_PMU=y
+# CONFIG_ARM_CHARLCD is not set
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_ERRATA_643719=y
+CONFIG_ARM_ERRATA_720789=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_ARM_ERRATA_754327=y
+CONFIG_ARM_ERRATA_764369=y
+CONFIG_ARM_ERRATA_775420=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_GLOBAL_TIMER=y
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HEAVY_MB=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+# CONFIG_ARM_LPAE is not set
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+# CONFIG_ARM_PL