[OpenWrt-Devel] ubi on BTHH2B

2014-04-20 Thread Ben Mulvihill
Hi John,

May I take up your offer of a hand with overlayfs on top of ubi?
I have in fact managed to get a working overlay + ubi image,
and also a ubifs image. But I still have a few questions:

- Am I right in thinking that there is no way to concatenate the
  kernel and ubi image and have them split automatically like with
  the squashfs image without ubi?

- Is there any point bothering with a jffs2 image as well, either 
  on top of ubi or not?

- the two images require different kernel parameters in the 'chosen'
  line of the device tree: 
ubi.mtd=rootfs_ubi,256 root=/dev/mtdblock8 // for overlayfs
ubi.mtd=rootfs_ubi,256 root=ubi0:rootfs// for ubifs
  Is there any way of combining them so that a single device tree
  can be used with both images? Passing the parameters from uboot
  ought to be one way of dealing with the problem but I believe
  that with recent kernels parameters passed in that way just
  get clobbered.

- What is the best way to get the get the image onto the target?
  nand write from uboot works fine, but you lose the wear levelling
  information each time. I have also use tried booting a ramdisk
  image first, copying root-overlay.ubi to /tmp, and flashing it
  with ubiformat -f. That works too, but is there another option?

Also, I am a little confused about the status of this patch:
  http://patchwork.openwrt.org/patch/5110/
You told me it was a "really bad idea" so I was expecting it to be
rejected! But it is appears in patchwork as accepted. Is that a 
mistake?

Thanks,

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


[OpenWrt-Devel] [PATCH 3/3] ramips: build factory image for Airlink101 AR725W

2014-04-20 Thread Claudio Leite
Signed-off-by: Claudio Leite 
---
 target/linux/ramips/image/Makefile |  12 +-
 tools/firmware-utils/Makefile  |   1 +
 tools/firmware-utils/src/mkheader_gemtek.c | 211 +
 3 files changed, 223 insertions(+), 1 deletion(-)
 create mode 100644 tools/firmware-utils/src/mkheader_gemtek.c

diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index bf9ccc1..26386bf 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -257,11 +257,21 @@ define BuildFirmware/PorayDualSize/squashfs
 endef
 BuildFirmware/PorayDualSize/initramfs=$(call 
BuildFirmware/DefaultDualSize/initramfs,$(1),$(2),$(3))
 
+define BuildFirmware/Gemtek/squashfs
+   $(call BuildFirmware/Default4M/$(1),$(1),$(2),$(3))
+   if [ -e "$(call sysupname,$(1),$(2))" ]; then \
+   mkheader_gemtek "$(call sysupname,$(1),$(2))" \
+   "$(call imgname,$(1),$(2))-factory.bin" $(2) || \
+   rm -f "$(call imgname,$(1),$(2))-factory.bin"; \
+   fi
+endef
+BuildFirmware/Gemtek/initramfs=$(call 
BuildFirmware/OF/initramfs,$(1),$(2),$(3))
+
 #
 # RT288X Profiles
 #
 
-Image/Build/Profile/AR725W=$(call 
BuildFirmware/Default4M/$(1),$(1),ar725w,AR725W)
+Image/Build/Profile/AR725W=$(call BuildFirmware/Gemtek/$(1),$(1),ar725w,AR725W)
 
 # 0x79
 belkin_f5d8235v1_mtd_size=7929856
diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 585090e..3be80e7 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -66,6 +66,7 @@ define Host/Compile
$(call cc,mkporayfw, -Wall)
#$(call cc,mkhilinkfw, -lcrypto)
$(call cc,mkdcs932, -Wall)
+   $(call cc,mkheader_gemtek,-lz)
 endef
 
 define Host/Install
diff --git a/tools/firmware-utils/src/mkheader_gemtek.c 
b/tools/firmware-utils/src/mkheader_gemtek.c
new file mode 100644
index 000..9e618ef
--- /dev/null
+++ b/tools/firmware-utils/src/mkheader_gemtek.c
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2014  Claudio Leite 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/*
+ * Builds a proper flash image for routers using some Gemtek
+ * OEM boards. These include the Airlink101 AR725W, the
+ * Asante SmartHub 600 (AWRT-600N), and Linksys WRT100/110.
+ *
+ * The resulting image is compatible with the factory firmware
+ * web upgrade and TFTP interface.
+ *
+ * To build:
+ *  gcc -O2 -o mkheader_gemtek mkheader_gemtek.c -lz
+ *
+ * Claudio Leite 
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include   /* for crc32() */
+
+/*
+ * The header is in little-endian format. In case
+ * we are on a BE host, we need to swap binary
+ * values.
+ */
+#ifdef __APPLE__
+# include 
+# define le32 OSSwapHostToLittleInt32
+#else
+# if defined(__linux__)
+#  include 
+#  if __BYTE_ORDER == __BIG_ENDIAN
+#   define CPU_BIG_ENDIAN
+#  endif
+# else
+#  include   /* BSD's should have this */
+#  if _BYTE_ORDER == _BIG_ENDIAN
+#   define CPU_BIG_ENDIAN
+#  endif
+# endif
+# ifdef CPU_BIG_ENDIAN
+#  define le32(x) (((x & 0xff00) >> 24) | \
+   ((x & 0x00ff) >> 8)  | \
+   ((x & 0xff00) << 8)  | \
+   ((x & 0x00ff) << 24))
+# else
+#  define le32(x) (x)
+# endif
+#endif
+
+struct gemtek_header {
+   uint8_t magic[4];
+   uint8_t version[4];
+   uint32_tproduct_id;
+   uint32_timagesz;
+   uint32_tchecksum;
+   uint32_tfast_checksum;
+   uint8_t build[4];
+   uint8_t lang[4];
+};
+
+#define HDRLEN sizeof(struct gemtek_header)
+
+struct machines {
+   char   *desc;
+   char   *id;
+   uint32_tmaxsize;
+   struct gemtek_header header;
+};
+
+struct machines mach_def[] = {
+   {"Airlink101 AR725W", "ar725w", 0x34,
+   {"GMTK", "1003", le32(0x0301), 0, 0,
+ 0, "01\0\0", "EN\0\0"}},
+   {"Asante AWRT-600N", "awrt600n", 0x34,
+   {"A600", "1005", le32(0x0301), 0, 0,
+ 0, "01\0\0", "EN\0\0"}},
+   {"Linksys WRT100", "wrt100", 0x32,
+   {"GMTK", "1007", le32(0x03040001), 0, 0,
+ 0, "2\0\0\0", "EN\0\0"}},

[OpenWrt-Devel] [PATCH 1/3] ramips: Add Airlink101 AR725W board support

2014-04-20 Thread Claudio Leite
Signed-off-by: Claudio Leite 
---
 target/linux/ramips/dts/AR725W.dts | 113 +
 target/linux/ramips/image/Makefile |   3 +
 target/linux/ramips/rt288x/config-3.10 |   1 +
 3 files changed, 117 insertions(+)
 create mode 100644 target/linux/ramips/dts/AR725W.dts

diff --git a/target/linux/ramips/dts/AR725W.dts 
b/target/linux/ramips/dts/AR725W.dts
new file mode 100644
index 000..87f2553
--- /dev/null
+++ b/target/linux/ramips/dts/AR725W.dts
@@ -0,0 +1,113 @@
+/dts-v1/;
+
+/include/ "rt2880.dtsi"
+
+/ {
+   compatible = "AR725W", "ralink,rt2880-soc";
+   model = "Airlink101 AR725W";
+
+   palmbus@30 {
+   gpio0: gpio@600 {
+   status = "okay";
+   };
+   };
+
+   pinctrl {
+   state_default: pinctrl0 {
+   gpio {
+   ralink,group = "i2c", "spi", "uartlite";
+   ralink,function = "gpio";
+   };
+   };
+   };
+
+   ethernet@40 {
+   status = "okay";
+   mtd-mac-address = <&factory 0x4>;
+
+   port@0 {
+   phy-handle = <&phy0>;
+   phy-mode = "mii";
+   };
+
+   mdio-bus {
+   status = "okay";
+   phy0: ethernet-phy@0 {
+   phy-mode = "mii";
+   reg = <0>;
+   };
+   };
+   };
+
+   wmac@48 {
+   status = "okay";
+   ralink,mtd-eeprom = <&factory 0>;
+   };
+
+   cfi@bdc0 {
+   compatible = "cfi-flash";
+   reg = <0xbc40 0x80>;
+
+   bank-width = <2>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+
+   u-boot@0 {
+   reg = <0x0 0x3>;
+   label = "u-boot";
+   read-only;
+   };
+
+   u-boot-env@3 {
+   reg = <0x3 0x1>;
+   label = "u-boot-env";
+   };
+
+   factory: factory@4 {
+   reg = <0x4 0x1>;
+   label = "factory";
+   read-only;
+   };
+
+   firmware@5 {
+   reg = <0x5 0x3B>;
+   label = "firmware";
+   };
+   };
+
+   gpio-leds {
+   compatible = "gpio-leds";
+
+   status {
+   label = "ar725w:green:power";
+   gpios = <&gpio0 7 0>;
+   };
+
+   wpsred {
+   label = "ar725w:red:wps";
+   gpios = <&gpio0 8 1>;
+   };
+
+   wpsblue {
+   label = "ar725w:blue:wps";
+   gpios = <&gpio0 13 1>;
+   };
+   };
+
+   gpio-keys-polled {
+   compatible = "gpio-keys-polled";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   poll-interval = <100>;
+   wps {
+   label = "wps";
+   gpios = <&gpio0 0 1>;
+   linux,code = <0x211>;
+   };
+   reset {
+   label = "reset";
+   gpios = <&gpio0 9 1>;
+   linux,code = <0x198>;
+   };
+   };
+};
diff --git a/target/linux/ramips/image/Makefile 
b/target/linux/ramips/image/Makefile
index 63f7425..bf9ccc1 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -261,6 +261,8 @@ BuildFirmware/PorayDualSize/initramfs=$(call 
BuildFirmware/DefaultDualSize/initr
 # RT288X Profiles
 #
 
+Image/Build/Profile/AR725W=$(call 
BuildFirmware/Default4M/$(1),$(1),ar725w,AR725W)
+
 # 0x79
 belkin_f5d8235v1_mtd_size=7929856
 Image/Build/Profile/F5D8235V1=$(call 
BuildFirmware/CustomFlash/$(1),$(1),f5d8235v1,F5D8235_V1,$(belkin_f5d8235v1_mtd_size))
@@ -273,6 +275,7 @@ Image/Build/Profile/WLITX4AG300N=$(call 
BuildFirmware/Default4M/$(1),$(1),wli-tx
 
 ifeq ($(SUBTARGET),rt288x)
 define Image/Build/Profile/Default
+   $(call Image/Build/Profile/AR725W,$(1))
$(call Image/Build/Profile/F5D8235V1,$(1))
$(call Image/Build/Profile/RTN15,$(1))
$(call Image/Build/Profile/V11STFE,$(1))
diff --git a/target/linux/ramips/rt288x/config-3.10 
b/target/linux/ramips/rt288x/config-3.10
index f1ae652..6fd3971 100644
--- a/target/linux/ramips/rt288x/config-3.10
+++ b/target/linux/ramips/rt288x/config-3.10
@@ -79,6 +79,7 @@ CONFIG_HW_RANDOM=m
 CONFIG_HZ_PERIODIC=y
 CONFIG_IMAGE_CMDLINE_HACK=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IP17XX_PHY=y
 CONFIG_IRQCHIP=y
 CONFIG_IRQ_CPU=y
 CONFIG_IRQ_DOMAIN=y
-- 
1.9.2
_

[OpenWrt-Devel] [PATCH 2/3] ramips: add Airlink101 AR725W userland support

2014-04-20 Thread Claudio Leite
Signed-off-by: Claudio Leite 
---
 target/linux/ramips/base-files/etc/diag.sh | 3 +++
 target/linux/ramips/base-files/etc/uci-defaults/01_leds| 3 +++
 target/linux/ramips/base-files/etc/uci-defaults/02_network | 1 +
 target/linux/ramips/base-files/lib/ramips.sh   | 3 +++
 target/linux/ramips/base-files/lib/upgrade/platform.sh | 1 +
 5 files changed, 11 insertions(+)

diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index 4168d0a..1225872 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -12,6 +12,9 @@ get_status_led() {
3g300m | w150m)
status_led="tenda:blue:ap"
;;
+   ar725w)
+   status_led="ar725w:green:power"
+   ;;
argus-atp52b)
status_led="argus-atp52b:green:run"
;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds 
b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 567835e..17d8c97 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -35,6 +35,9 @@ case $board in
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" 
"all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
set_wifi_led "rt2800pci-phy0::radio"
;;
+   ar725w)
+   set_wifi_led "rt2800soc-phy0::radio"
+   ;;
asl26555)
ucidef_set_led_default "power" "POWER" "asl26555:green:power" 
"1"
ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network 
b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index 1cbf7bf..b66d176 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -116,6 +116,7 @@ ramips_setup_interfaces()
ucidef_add_switch_vlan "switch0" "2" "0 5t"
;;
 
+   ar725w | \
rt-n15 | \
wl-351)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index a3a26cb..913e65c 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -22,6 +22,9 @@ ramips_board_detect() {
*"Edimax 3g-6200nl")
name="3g-6200nl"
;;
+   *"Airlink101 AR725W")
+   name="ar725w"
+   ;;
*"AirLive Air3GII")
name="air3gii"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 8ff6063..616516b 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -23,6 +23,7 @@ platform_check_image() {
all0256n | \
all5002 | \
all5003 | \
+   ar725w | \
asl26555 | \
awm002-evb | \
bc2 | \
-- 
1.9.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/3] ramips: add support for Airlink101 AR725W

2014-04-20 Thread Claudio Leite
The Airlink101 AR725W is a RT2880 router with 32MB RAM, 4MB flash,
100mbit IP175E switch and dual-band 802.11n wireless.

Notes:
- I couldn't get the switch to be recognized without building
  it into the kernel, rather than as a module. Since the driver
  has it attached to the ethernet port, it needs(?) to be present
  when the eth device is probed.

- The factory-compatible image format uses an uncommon header
  format. I wrote a utility to prepare this Gemtek header format.

- GPIOs 8 and 13 (WPS LEDs) do not work. The fix is to turn off
  bit 6 in the RT2880 SYSTEM_CONFIG register. Not sure where
  this should go--I put together a quick hack that does this
  in the rt2880 GPIO driver and triggered from the DT node.
  This works, but any suggestions/comments are appreciated.

Claudio Leite (3):
  ramips: Add Airlink101 AR725W board support
  ramips: add Airlink101 AR725W userland support
  ramips: build factory image for Airlink101 AR725W

 target/linux/ramips/base-files/etc/diag.sh |   3 +
 .../ramips/base-files/etc/uci-defaults/01_leds |   3 +
 .../ramips/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ramips/base-files/lib/ramips.sh   |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ramips/dts/AR725W.dts | 113 +++
 target/linux/ramips/image/Makefile |  13 ++
 target/linux/ramips/rt288x/config-3.10 |   1 +
 tools/firmware-utils/Makefile  |   1 +
 tools/firmware-utils/src/mkheader_gemtek.c | 211 +
 10 files changed, 350 insertions(+)
 create mode 100644 target/linux/ramips/dts/AR725W.dts
 create mode 100644 tools/firmware-utils/src/mkheader_gemtek.c

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


Re: [OpenWrt-Devel] Looking for advice: Bad TX level on the TL-WR841 v9

2014-04-20 Thread Owen Kirby
A difference in tx power like that is usually caused by the presence of an
external power amplifier on the board between the SoC and the antenna that
isn't getting turned on, or otherwise misconfigured.

Cheers,
Owen

On Sunday, April 20, 2014, Matthias Schiffer 
wrote:

> Hi,
> I recently contributed the patches to support the TL-WR841 v9, and I'm
> getting reports that the TX quality of these devices is terrible on
> OpenWrt (RX looks fine).
>
> iwinfo reports Tx-Power: 19 dBm, and in the next room I get about -80
> dBm when the device is running OpenWrt, while I get about -60 dBm with
> the stock firmware.
>
> On a TL-WR841 v7 I have Tx-Power: 21 dBm and see -55 ~ -60 dBm in the
> exact same constellation (using OpenWrt).
>
> Does anyone have an idea what could cause this or where I could start to
> debug this? Unfortunately there don't seem to exist many devices using
> QCA953x SoCs yet...
>
> You can also contact me on IRC, I'm hanging around in
> #openwrt/#openwrt-devel as neoraider.
>
> Thanks in advance,
> Matthias
>
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Looking for advice: Bad TX level on the TL-WR841 v9

2014-04-20 Thread Matthias Schiffer
Hi,
I recently contributed the patches to support the TL-WR841 v9, and I'm
getting reports that the TX quality of these devices is terrible on
OpenWrt (RX looks fine).

iwinfo reports Tx-Power: 19 dBm, and in the next room I get about -80
dBm when the device is running OpenWrt, while I get about -60 dBm with
the stock firmware.

On a TL-WR841 v7 I have Tx-Power: 21 dBm and see -55 ~ -60 dBm in the
exact same constellation (using OpenWrt).

Does anyone have an idea what could cause this or where I could start to
debug this? Unfortunately there don't seem to exist many devices using
QCA953x SoCs yet...

You can also contact me on IRC, I'm hanging around in
#openwrt/#openwrt-devel as neoraider.

Thanks in advance,
Matthias



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


[OpenWrt-Devel] [PATCH] [libubox] sh/jshn.sh - json_cleanup() dont pollute env with local vars

2014-04-20 Thread Bastian Bittorf
this script is mostly sourced, so we should try to keep the pollution
of the users environment as low as possible. make the var 'tmp' local

Signed-off-by: Bastian Bittorf 
---
 sh/jshn.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sh/jshn.sh b/sh/jshn.sh
index b3cd43c..06ba965 100644
--- a/sh/jshn.sh
+++ b/sh/jshn.sh
@@ -103,7 +103,7 @@ json_set_namespace() {
 }
 
 json_cleanup() {
-   local unset
+   local unset tmp
 
_json_get_var unset JSON_UNSET
for tmp in $unset JSON_VAR; do
-- 
1.8.1.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 5/5] [uboot-lantiq] Add Zyxel P-2812HNU-Fx images

2014-04-20 Thread Álvaro Fernández Rojas
P-2812HNU-Fx images are already supported but not generated.

Signed-off-by: Álvaro Fernández Rojas 
---
diff --git a/package/boot/uboot-lantiq/Makefile 
b/package/boot/uboot-lantiq/Makefile
index f2c1c62..a7d5916 100644
--- a/package/boot/uboot-lantiq/Makefile
+++ b/package/boot/uboot-lantiq/Makefile
@@ -223,6 +223,20 @@ define uboot/fb3370_sfspl
   DEPS:=@TARGET_lantiq_xrx200_FRITZ3370
 endef
 
+define uboot/p2812hnufx_ram
+  TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM)
+  SOC:=vr9
+  DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
+endef
+
+define uboot/p2812hnufx_nandspl
+  TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL)
+  SOC:=vr9
+  IMAGE:=u-boot.ltq.lzo.nandspl
+  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
+endef
+
 
 UBOOTS:= \
arv4519pw_ram arv4519pw_nor arv4519pw_brn \
@@ -234,7 +248,8 @@ UBOOTS:= \
acmp252_ram acmp252_nor \
easy50712_ram easy50712_nor easy50712_norspl \
easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl \
-   fb3370_eva fb3370_ram fb3370_sfspl
+   fb3370_eva fb3370_ram fb3370_sfspl \
+   p2812hnufx_ram p2812hnufx_nandspl
 
 define Package/uboot/template
 define Package/uboot-lantiq-$(1)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 4/5] [uboot-lantiq] Add Fritz!Box 3370 images

2014-04-20 Thread Álvaro Fernández Rojas
Fritz!Box 3370 images are already supported but not generated.

Signed-off-by: Álvaro Fernández Rojas 
---
diff --git a/package/boot/uboot-lantiq/Makefile 
b/package/boot/uboot-lantiq/Makefile
index ac2365d..f2c1c62 100644
--- a/package/boot/uboot-lantiq/Makefile
+++ b/package/boot/uboot-lantiq/Makefile
@@ -203,6 +203,26 @@ define uboot/easy80920_sfspl
   
DEPS:=@(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND)
 endef
 
+define uboot/fb3370_eva
+  TITLE:=U-Boot for AVM FRITZ3370 (EVA)
+  SOC:=vr9
+  DEPS:=@TARGET_lantiq_xrx200_FRITZ3370
+endef
+
+define uboot/fb3370_ram
+  TITLE:=U-Boot for AVM FRITZ3370 (RAM)
+  SOC:=vr9
+  DDR_SETTINGS:=board/avm/fb3370/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xrx200_FRITZ3370
+endef
+
+define uboot/fb3370_sfspl
+  TITLE:=U-Boot for AVM FRITZ3370 (SPI SPL)
+  SOC:=vr9
+  IMAGE:=u-boot.ltq.lzo.sfspl
+  DEPS:=@TARGET_lantiq_xrx200_FRITZ3370
+endef
+
 
 UBOOTS:= \
arv4519pw_ram arv4519pw_nor arv4519pw_brn \
@@ -213,7 +233,8 @@ UBOOTS:= \
gigasx76x_ram gigasx76x_nor \
acmp252_ram acmp252_nor \
easy50712_ram easy50712_nor easy50712_norspl \
-   easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl
+   easy80920_ram easy80920_nor easy80920_norspl easy80920_sfspl \
+   fb3370_eva fb3370_ram fb3370_sfspl
 
 define Package/uboot/template
 define Package/uboot-lantiq-$(1)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 2/5] [uboot-lantiq] Create firmware directory if it doesn't exist

2014-04-20 Thread Álvaro Fernández Rojas
Fixes package refreshing.

Signed-off-by: Álvaro Fernández Rojas 
---
diff --git a/package/boot/uboot-lantiq/Makefile 
b/package/boot/uboot-lantiq/Makefile
index f215eee..ac2365d 100644
--- a/package/boot/uboot-lantiq/Makefile
+++ b/package/boot/uboot-lantiq/Makefile
@@ -241,6 +241,7 @@ endef
 
 define Build/Prepare
$(call Build/Prepare/Default)
+   mkdir -p $(PKG_BUILD_DIR)/arch/mips/cpu/mips32/vrx200/
$(call CopyVR9Firmware,11g,1)
$(call CopyVR9Firmware,11g,2)
$(call CopyVR9Firmware,22f,1)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 1/5] [uboot-lantiq] Depend on lantiq board

2014-04-20 Thread Álvaro Fernández Rojas
Depend on lantiq board.

ARV7510 depends on ARV4510 because (according to OpenWrt wiki) both boards are 
identical except for the unsupported WiFi. Moreover, ARV7510 isn't 
especifically supported and ARV4510 images valid.

Signed-off-by: Álvaro Fernández Rojas 
---
diff --git a/package/boot/uboot-lantiq/Makefile 
b/package/boot/uboot-lantiq/Makefile
index 90060ef..f215eee 100644
--- a/package/boot/uboot-lantiq/Makefile
+++ b/package/boot/uboot-lantiq/Makefile
@@ -32,148 +32,175 @@ define uboot/Default
   SOC:=
   DDR_SETTINGS:=
   IMAGE:=
+  DEPS:=
 endef
 
 define uboot/arv4519pw_ram
   TITLE:=U-Boot for Arcadyan arv4519pw (RAM)
   SOC:=danube
   DDR_SETTINGS:=board/arcadyan/arv4519pw/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xway_ARV4519PW
 endef
 
 define uboot/arv4519pw_nor
   TITLE:=U-Boot for Arcadyan arv4519pw (NOR)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV4519PW
 endef
 
 define uboot/arv4519pw_brn
   TITLE:=U-Boot for Arcadyan arv4519pw (BRN)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV4519PW
 endef
 
 define uboot/arv7510pw_ram
   TITLE:=U-Boot for Arcadyan arv7510pw (RAM)
   SOC:=danube
   DDR_SETTINGS:=board/arcadyan/arv7510pw/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xway_ARV4510PW
 endef
 
 define uboot/arv7510pw_nor
   TITLE:=U-Boot for Arcadyan arv7510pw (NOR)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV4510PW
 endef
 
 define uboot/arv7510pw_brn
   TITLE:=U-Boot for Arcadyan arv7510pw (BRN)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV4510PW
 endef
 
 define uboot/arv7518pw_ram
   TITLE:=U-Boot for Arcadyan arv7518pw (RAM)
   SOC:=danube
   DDR_SETTINGS:=board/arcadyan/arv7518pw/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xway_ARV7518PW
 endef
 
 define uboot/arv7518pw_nor
   TITLE:=U-Boot for Arcadyan arv7518pw (NOR)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV7518PW
 endef
 
 define uboot/arv7518pw_brn
   TITLE:=U-Boot for Arcadyan arv7518pw (BRN)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV7518PW
 endef
 
 define uboot/arv752dpw_ram
   TITLE:=U-Boot for Arcadyan arv752dpw (RAM)
   SOC:=danube
   DDR_SETTINGS:=board/arcadyan/arv752dpw/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xway_ARV752DPW
 endef
 
 define uboot/arv752dpw_nor
   TITLE:=U-Boot for Arcadyan arv752dpw (NOR)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV752DPW
 endef
 
 define uboot/arv752dpw_brn
   TITLE:=U-Boot for Arcadyan arv752dpw (BRN)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV752DPW
 endef
 
 define uboot/arv752dpw22_ram
   TITLE:=U-Boot for Arcadyan arv752dpw22 (RAM)
   SOC:=danube
   DDR_SETTINGS:=board/arcadyan/arv752dpw22/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xway_ARV752DPW22
 endef
 
 define uboot/arv752dpw22_nor
   TITLE:=U-Boot for Arcadyan arv752dpw22 (NOR)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV752DPW22
 endef
 
 define uboot/arv752dpw22_brn
   TITLE:=U-Boot for Arcadyan arv752dpw22 (BRN)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ARV752DPW22
 endef
 
 define uboot/gigasx76x_ram
   TITLE:=U-Boot for Siemens Gigaset sx76x (RAM)
   SOC:=danube
   DDR_SETTINGS:=board/gigaset/sx76x/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xway_GIGASX76X
 endef
 
 define uboot/gigasx76x_nor
   TITLE:=U-Boot for Siemens Gigaset sx76x (NOR)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_GIGASX76X
 endef
 
 define uboot/acmp252_ram
   TITLE:=U-Boot for AudioCodes MP-252 (RAM)
   SOC:=danube
   DDR_SETTINGS:=board/audiocodes/acmp252/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xway_ACMP252
 endef
 
 define uboot/acmp252_nor
   TITLE:=U-Boot for AudioCodes MP-252 (NOR)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_ACMP252
 endef
 
 define uboot/easy50712_ram
   TITLE:=U-Boot for Lantiq EASY50712 (RAM)
   SOC:=danube
   DDR_SETTINGS:=board/lantiq/easy50712/ddr_settings.h
+  DEPS:=@TARGET_lantiq_xway_EASY50712
 endef
 
 define uboot/easy50712_nor
   TITLE:=U-Boot for Lantiq EASY50712 (NOR)
   SOC:=danube
+  DEPS:=@TARGET_lantiq_xway_EASY50712
 endef
 
 define uboot/easy50712_norspl
   TITLE:=U-Boot for Lantiq EASY50712 (NOR SPL)
   SOC:=danube
   IMAGE:=u-boot.ltq.lzo.norspl
+  DEPS:=@TARGET_lantiq_xway_EASY50712
 endef
 
 define uboot/easy80920_ram
   TITLE:=U-Boot for Lantiq EASY80920 (RAM)
   SOC:=vr9
   DDR_SETTINGS:=board/lantiq/easy80920/ddr_settings.h
+  
DEPS:=@(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND)
 endef
 
 define uboot/easy80920_nor
   TITLE:=U-Boot for Lantiq EASY80920 (NOR)
   SOC:=vr9
+  
DEPS:=@(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND)
 endef
 
 define uboot/easy80920_norspl
   TITLE:=U-Boot for Lantiq EASY80920 (NOR SPL)
   SOC:=vr9
   IMAGE:=u-boot.ltq.lzo.norspl
+  
DEPS:=@(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND)
 endef
 
 define uboot/easy80920_sfspl
   TITLE:=U-Boot for Lantiq EASY80920 (SPI SPL)
   SOC:=vr9
   IMAGE:=u-boot.ltq.lzo.sfspl
+  
DEPS:=@(TARGET_lantiq_xrx200_EASY80920NOR||TARGET_lantiq_xrx200_EASY80920NAND)
 endef
 
 
@@ -192,7 +219,7 @@ define Package/uboot/template
 define Package/uboot-lantiq-$(1)
 

[OpenWrt-Devel] How could I change the pinmux in RT5350 device?

2014-04-20 Thread Yanbin Yue
Hello everyone,


We want to make a WIFI music device use RT5350, but the I2S function is not 
enable in the openwrt. 
So I want  to change the pinmux to enable the I2S,  but when I search the 
struct rt_gpio_pinmux in the 
openwrt, I could not find any reference of the struct, so have no idea for 
changing  the pinmux function.
I guess that I need to write a rt5350 dts file, but don't know how to write the 
file.


Could anyone give me any suggestion about that?


Thanks~
Yanbin Yue___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Add kernel modules for AFS client

2014-04-20 Thread nwf
On Thu, Apr 17, 2014 at 12:07:31AM +0200, Zoltan HERPAI wrote:
> Hi,
> 
> nwf wrote:
> > Salutations, list.  This patch adds configuration knobs for the in-kernel 
> > kAFS
> > client and its dependencies.  We have an AFS cell used for shared 
> > configuration
> > files and nightly snapshots of local state, and having our OpenWRT devices 
> > be
> > able to play along would be fantastic.  Hopefully I didn't break anything.
> > Thoughts welcome!
> >   
> 
> Can you please update the path package/kernel/modules to 
> package/kernel/linux/modules, update the fcrypt part (the crypto-misc 
> module list has slightly changed) and resubmit the patch as v2. Pending 
> these fixed, this looks good to get an ack.
> 
> Thanks,
> Zoltan H

Fixed; while here I took the liberty of making an FSCACHE option and splitting
out the AFS FSCACHE flag to its own knob.

Signed-Off-By: Nathaniel Wesley Filardo 
<8s9k8ugo5jgpi3u067229bbackmqi...@cmx.ietfng.org>

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index dbeffa7..0df2fbc 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -277,6 +277,17 @@ endef
 
 $(eval $(call KernelPackage,crypto-cbc))
 
+define KernelPackage/crypto-pcbc
+  TITLE:=Propagating Cipher Block Chaining CryptoAPI module
+  DEPENDS:=+kmod-crypto-manager
+  KCONFIG:=CONFIG_CRYPTO_PCBC
+  FILES:=$(LINUX_DIR)/crypto/pcbc.ko
+  AUTOLOAD:=$(call AutoLoad,09,pcbc)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-pcbc))
+
 define KernelPackage/crypto-crc32c
   TITLE:=CRC32c CRC module
   DEPENDS:=+kmod-crypto-hash
@@ -312,6 +323,16 @@ endef
 $(eval $(call KernelPackage,crypto-deflate))
 
 
+define KernelPackage/crypto-fcrypt
+  TITLE:=FCRYPT cipher CryptoAPI module
+  KCONFIG:=CONFIG_CRYPTO_FCRYPT
+  FILES:=$(LINUX_DIR)/crypto/fcrypt.ko
+  AUTOLOAD:=$(call AutoLoad,09,fcrypt)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-fcrypt))
+
 define KernelPackage/crypto-ecb
   TITLE:=Electronic CodeBook CryptoAPI module
   DEPENDS:=+kmod-crypto-manager
@@ -429,7 +450,6 @@ define KernelPackage/crypto-misc
$(if $(call kernel_patchver_ge,3.7),$(LINUX_DIR)/crypto/cast_common.ko) 
\
$(LINUX_DIR)/crypto/cast5$(cast56_mod_suffix).ko \
$(LINUX_DIR)/crypto/cast6$(cast56_mod_suffix).ko \
-   $(LINUX_DIR)/crypto/fcrypt.ko \
$(LINUX_DIR)/crypto/khazad.ko \
$(LINUX_DIR)/crypto/sha512_generic.ko \
$(LINUX_DIR)/crypto/tea.ko \
diff --git a/package/kernel/linux/modules/fs.mk 
b/package/kernel/linux/modules/fs.mk
index cd27e4a..a25a3f0 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -7,6 +7,46 @@
 
 FS_MENU:=Filesystems
 
+define KernelPackage/fs-cache
+  SUBMENU:=$(FS_MENU)
+  TITLE:=General filesystem local cache manager
+  DEPENDS:=
+  KCONFIG:=CONFIG_FSCACHE=m
+  FILES:=$(LINUX_DIR)/fs/fscache/fscache.ko
+  AUTOLOAD:=$(call AutoLoad,30,fscache)
+endef
+
+define KernelPackage/fs-afs
+  SUBMENU:=$(FS_MENU)
+  TITLE:=Andrew FileSystem client
+  DEPENDS:=+kmod-rxrpc +kmod-dnsresolver
+  KCONFIG:=\
+   CONFIG_AFS_FS=m \
+   CONFIG_AFS_DEBUG=n
+  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
+  AUTOLOAD:=$(call AutoLoad,31,kafs)
+endef
+
+define KernelPackage/fs-afs/description
+  Kernel module for Andrew FileSystem client support
+endef
+
+define KernelPackage/fs-afs-fscache
+  SUBMENU:=$(FS_MENU)
+  TITLE:=Andrew FileSystem client fscache support
+  DEPENDS:=+kmod-fs-afs
+  KCONFIG:=CONFIG_AFS_FSCACHE=y
+  FILES:=$(LINUX_DIR)/fs/afs/kafs.ko
+  AUTOLOAD:=$(call AutoLoad,31,kafs)
+endef
+
+define KernelPackage/fs-afs-fscache/description
+  Add support for using fscache to the AFS client module.
+  This simply changes the way the module is built.
+endef
+
+$(eval $(call KernelPackage,fs-afs))
+
 define KernelPackage/fs-autofs4
   SUBMENU:=$(FS_MENU)
   TITLE:=AUTOFS4 filesystem support
diff --git a/package/kernel/linux/modules/netsupport.mk 
b/package/kernel/linux/modules/netsupport.mk
index 6f61630..fc85e22 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -938,3 +938,32 @@ endef
 
 $(eval $(call KernelPackage,slip))
 
+define KernelPackage/dnsresolver
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=In-kernel DNS Resolver
+  KCONFIG:= CONFIG_DNS_RESOLVER
+  FILES:=$(LINUX_DIR)/net/dns_resolver/dns_resolver.ko
+  AUTOLOAD:=$(call AutoLoad,30,dns_resolver)
+endef
+
+$(eval $(call KernelPackage,dnsresolver))
+
+define KernelPackage/rxrpc
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=AF_RXRPC support
+  KCONFIG:= \
+   CONFIG_AF_RXRPC \
+   CONFIG_RXKAD=m \
+   CONFIG_AF_RXRPC_DEBUG=n
+  FILES:= \
+   $(LINUX_DIR)/net/rxrpc/af-rxrpc.ko \
+   $(LINUX_DIR)/net/rxrpc/rxkad.ko
+  AUTOLOAD:=$(call AutoLoad,30,rxkad af-rxrpc)
+  DEPENDS:=+kmod-crypto-core +kmod-crypto-manager +kmod-crypto-pcbc 
+kmod-crypto-fcrypt
+endef
+
+define KernelPack