[OpenWrt-Devel] [PATCH 0/8] [ar7] AudioCodes AC49x sub-target

2012-10-15 Thread Daniel Golle
This series splits AR7 into sub-targets, moving the current target into a
generic sub-target and adding a sub-target for the AC49x.
I tried to avoid code-duplication by adding support for the AC49x to the
existing ar7 platform in the kernel.
Generally, I'd of course be happy if lzma-loader can be user to by-pass the
restrictions of the boot-loader and allow merging all this into a single target
with only the parameters of lzma-loader taking the different load-address of
the bootloader into account. However, I didn't manage to get lzma-loader
working.

Daniel Golle (8):
  [ar7] free memory below kernel offset
  [ar7] add AudioCodes AC49x platform support to kernel
  [ar7] support AC49x bootloader environment
  [ar7] detect AC49x flash partitions
  [ar7] enable serial kludge on AC49x
  [ar7] create generic subtarget
  [ar7] create AC49x subtarget
  [ar7] generate image for AC49x

 target/linux/ar7/Makefile  |   1 +
 target/linux/ar7/ac49x/config-3.3  | 102 +++
 target/linux/ar7/ac49x/profiles/210-None.mk|  17 ++
 target/linux/ar7/ac49x/target.mk   |  10 ++
 target/linux/ar7/config-3.3| 102 ---
 target/linux/ar7/files/drivers/mtd/ac49xpart.c | 199 +
 target/linux/ar7/generic/config-3.3| 102 +++
 target/linux/ar7/generic/profiles/100-Annex-A.mk   |  17 ++
 target/linux/ar7/generic/profiles/110-Annex-B.mk   |  17 ++
 target/linux/ar7/generic/profiles/200-Texas.mk |  18 ++
 target/linux/ar7/generic/profiles/210-None.mk  |  17 ++
 target/linux/ar7/generic/target.mk |  10 ++
 target/linux/ar7/image/Makefile|  15 ++
 .../200-free-mem-below-kernel-offset.patch |  17 ++
 .../ar7/patches-3.3/300-add-ac49x-platform.patch   | 142 +++
 .../ar7/patches-3.3/310-ac49x-prom-support.patch   |  22 +++
 .../ar7/patches-3.3/320-ac49x-mtd-partitions.patch |  41 +
 .../linux/ar7/patches-3.3/500-serial_kludge.patch  |   8 +-
 target/linux/ar7/profiles/100-Annex-A.mk   |  17 --
 target/linux/ar7/profiles/110-Annex-B.mk   |  17 --
 target/linux/ar7/profiles/200-Texas.mk |  18 --
 target/linux/ar7/profiles/210-None.mk  |  17 --
 22 files changed, 752 insertions(+), 174 deletions(-)
 create mode 100644 target/linux/ar7/ac49x/config-3.3
 create mode 100644 target/linux/ar7/ac49x/profiles/210-None.mk
 create mode 100644 target/linux/ar7/ac49x/target.mk
 delete mode 100644 target/linux/ar7/config-3.3
 create mode 100644 target/linux/ar7/files/drivers/mtd/ac49xpart.c
 create mode 100644 target/linux/ar7/generic/config-3.3
 create mode 100644 target/linux/ar7/generic/profiles/100-Annex-A.mk
 create mode 100644 target/linux/ar7/generic/profiles/110-Annex-B.mk
 create mode 100644 target/linux/ar7/generic/profiles/200-Texas.mk
 create mode 100644 target/linux/ar7/generic/profiles/210-None.mk
 create mode 100644 target/linux/ar7/generic/target.mk
 create mode 100644 
target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch
 create mode 100644 target/linux/ar7/patches-3.3/300-add-ac49x-platform.patch
 create mode 100644 target/linux/ar7/patches-3.3/310-ac49x-prom-support.patch
 create mode 100644 target/linux/ar7/patches-3.3/320-ac49x-mtd-partitions.patch
 delete mode 100644 target/linux/ar7/profiles/100-Annex-A.mk
 delete mode 100644 target/linux/ar7/profiles/110-Annex-B.mk
 delete mode 100644 target/linux/ar7/profiles/200-Texas.mk
 delete mode 100644 target/linux/ar7/profiles/210-None.mk

-- 
1.7.12.2



pgpeCYdWgkkvX.pgp
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/8] [ar7] free memory below kernel offset

2012-10-15 Thread Daniel Golle
Some bootloaders (e.g. PSPBoot on AC49x) have a load-offset, this frees that
memory region so it is usable for Linux.

Signed-off-by: Daniel Golle dgo...@allnet.de
---
 .../patches-3.3/200-free-mem-below-kernel-offset.patch  | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 
target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch

diff --git 
a/target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch 
b/target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch
new file mode 100644
index 000..48a3d14
--- /dev/null
+++ b/target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch
@@ -0,0 +1,17 @@
+Index: linux-3.3.8/arch/mips/ar7/memory.c
+===
+--- linux-3.3.8.orig/arch/mips/ar7/memory.c
 linux-3.3.8/arch/mips/ar7/memory.c
+@@ -67,5 +67,11 @@ void __init prom_meminit(void)
+ 
+ void __init prom_free_prom_memory(void)
+ {
+-  /* Nothing to free */
++  /* adapted from arch/mips/txx9/generic/setup.c */
++  unsigned long saddr = PHYS_OFFSET + PAGE_SIZE;
++  unsigned long eaddr = __pa_symbol(_text);
++
++  /* free memory between prom-record and kernel _text base */
++  if (saddr  eaddr)
++  free_init_pages(prom memory, saddr, eaddr);
+ }
-- 
1.7.12.2



pgpNIeEtmfKp2.pgp
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/8] [ar7] support AC49x bootloader environment

2012-10-15 Thread Daniel Golle

Signed-off-by: Daniel Golle dgo...@allnet.de
---
 .../ar7/patches-3.3/310-ac49x-prom-support.patch   | 22 ++
 1 file changed, 22 insertions(+)
 create mode 100644 target/linux/ar7/patches-3.3/310-ac49x-prom-support.patch

diff --git a/target/linux/ar7/patches-3.3/310-ac49x-prom-support.patch 
b/target/linux/ar7/patches-3.3/310-ac49x-prom-support.patch
new file mode 100644
index 000..ada0aeb
--- /dev/null
+++ b/target/linux/ar7/patches-3.3/310-ac49x-prom-support.patch
@@ -0,0 +1,22 @@
+Index: linux-3.3.8/arch/mips/ar7/prom.c
+===
+--- linux-3.3.8.orig/arch/mips/ar7/prom.c
 linux-3.3.8/arch/mips/ar7/prom.c
+@@ -70,6 +70,7 @@ struct psbl_rec {
+ };
+ 
+ static const char psp_env_version[] __initconst = TIENV0.8;
++static const char psp_env_version_ac49x[] __initconst = MaxENV0.2;
+ 
+ struct psp_env_chunk {
+   u8  num;
+@@ -186,7 +187,8 @@ static void __init ar7_init_env(struct e
+   struct psbl_rec *psbl = (struct psbl_rec *)(KSEG1ADDR(0x14000300));
+   void *psp_env = (void *)KSEG1ADDR(psbl-env_base);
+ 
+-  if (strcmp(psp_env, psp_env_version) == 0) {
++  if (strcmp(psp_env, psp_env_version) == 0 ||
++  strcmp(psp_env, psp_env_version_ac49x) == 0) {
+   parse_psp_env(psp_env);
+   } else {
+   for (i = 0; i  MAX_ENTRY; i++, env++)
-- 
1.7.12.2



pgpA1QSwJTUPb.pgp
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/8] [ar7] detect AC49x flash partitions

2012-10-15 Thread Daniel Golle

Signed-off-by: Daniel Golle dgo...@allnet.de
---
 target/linux/ar7/files/drivers/mtd/ac49xpart.c | 199 +
 .../ar7/patches-3.3/320-ac49x-mtd-partitions.patch |  41 +
 2 files changed, 240 insertions(+)
 create mode 100644 target/linux/ar7/files/drivers/mtd/ac49xpart.c
 create mode 100644 target/linux/ar7/patches-3.3/320-ac49x-mtd-partitions.patch

diff --git a/target/linux/ar7/files/drivers/mtd/ac49xpart.c 
b/target/linux/ar7/files/drivers/mtd/ac49xpart.c
new file mode 100644
index 000..1eb19b5
--- /dev/null
+++ b/target/linux/ar7/files/drivers/mtd/ac49xpart.c
@@ -0,0 +1,199 @@
+/*
+ * AudioCodes AC49x PSPBoot-based flash partition table
+ * Copyright 2012 Daniel Golle daniel.go...@gmail.com
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#include linux/kernel.h
+#include linux/slab.h
+
+#include linux/mtd/mtd.h
+#include linux/mtd/partitions.h
+#include linux/bootmem.h
+#include linux/magic.h
+#include linux/module.h
+
+#include asm/mach-ar7/prom.h
+
+#define AC49X_MAXENVPARTS  8
+
+#define AC49X_PARTTYPE_LOADER  0
+#define AC49X_PARTTYPE_BOOTENV 1
+#define AC49X_PARTTYPE_LINUX   2
+#define AC49X_PARTTYPE_ROOTFS  3
+#define AC49X_PARTTYPE_UNKNOWN 4
+#define AC49X_NUM_PARTTYPES5
+
+#define AC49X_FLASH_ADDRMASK   0x00FF
+
+#define AC49X_LOADER_MAGIC 0x40809000
+#define AC49X_LINUX_MAGIC  0x464c457f //  ELF
+#define AC49X_BOOTENV_MAGIC0x4578614d // MaxE
+
+#define ROOTFS_MIN_OFFSET  0xC
+
+int parse_partvar(const unsigned char *partvar, struct mtd_partition *part)
+{
+   unsigned int partstart, partend;
+   unsigned int pnum;
+   pnum = sscanf(partvar, 0x%x,0x%x, partstart, partend);
+   if (pnum != 2) return 1;
+   part-offset = partstart  AC49X_FLASH_ADDRMASK;
+   part-size = partend - partstart;
+   return 0;
+}
+
+int detect_parttype(struct mtd_info *master, struct mtd_partition part)
+{
+   unsigned int magic;
+   size_t len;
+
+   if (part.size  4) return -1;
+
+   mtd_read(master, part.offset, sizeof(magic), len,
+(uint8_t *)magic);
+
+   if (len != sizeof(magic)) return -1;
+
+   switch (magic) {
+   case AC49X_LOADER_MAGIC:
+   return AC49X_PARTTYPE_LOADER;
+   case AC49X_LINUX_MAGIC:
+   return AC49X_PARTTYPE_LINUX;
+   case SQUASHFS_MAGIC:
+   case CRAMFS_MAGIC:
+   case CRAMFS_MAGIC_WEND:
+   return AC49X_PARTTYPE_ROOTFS;
+   case AC49X_BOOTENV_MAGIC:
+   return AC49X_PARTTYPE_BOOTENV;
+   default:
+   switch (magic  0xFF) {
+   case JFFS2_SUPER_MAGIC:
+   return AC49X_PARTTYPE_ROOTFS;
+   }
+   switch (magic  8) {
+   case JFFS2_SUPER_MAGIC:
+   return AC49X_PARTTYPE_ROOTFS;
+   }
+   return AC49X_PARTTYPE_UNKNOWN;
+   }
+}
+
+const char *partnames[] = {
+   loader,
+   config,
+   linux,
+   rootfs,
+   data
+   };
+
+void gen_partname(unsigned int type, unsigned int *typenumeration, struct 
mtd_partition *part)
+{
+   char *s  = kzalloc(sizeof(char) * 8, GFP_KERNEL);
+
+   (typenumeration[type])++;
+   if ( typenumeration[type] == 1 )
+   sprintf(s, %s, partnames[type]);
+   else
+   sprintf(s, %s%d, partnames[type], typenumeration[type]);
+
+   part-name = s;
+}
+
+static int create_mtd_partitions(struct mtd_info *master,
+struct mtd_partition **pparts,
+struct mtd_part_parser_data *data)
+{
+   unsigned int envpartnum = 0, linuxpartnum = 0;
+   unsigned int typenumeration[5] = { 0,0,0,0,0 };
+   unsigned char evn[5];
+   const unsigned char *partvar = NULL;
+
+   struct mtd_partition *ac49x_parts;
+
+   ac49x_parts = kzalloc(sizeof(*ac49x_parts) * AC49X_MAXENVPARTS, 
GFP_KERNEL);
+   if (!ac49x_parts)
+   return -ENOMEM;
+
+   linuxpartnum=0;
+   for (envpartnum = 0; 

[OpenWrt-Devel] [PATCH 5/8] [ar7] enable serial kludge on AC49x

2012-10-15 Thread Daniel Golle

Signed-off-by: Daniel Golle dgo...@allnet.de
---
 target/linux/ar7/patches-3.3/500-serial_kludge.patch | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/target/linux/ar7/patches-3.3/500-serial_kludge.patch 
b/target/linux/ar7/patches-3.3/500-serial_kludge.patch
index 5c19cf2..159fb56 100644
--- a/target/linux/ar7/patches-3.3/500-serial_kludge.patch
+++ b/target/linux/ar7/patches-3.3/500-serial_kludge.patch
@@ -1,5 +1,7 @@
 a/drivers/tty/serial/8250/8250.c
-+++ b/drivers/tty/serial/8250/8250.c
+Index: linux-3.3.8/drivers/tty/serial/8250/8250.c
+===
+--- linux-3.3.8.orig/drivers/tty/serial/8250/8250.c
 linux-3.3.8/drivers/tty/serial/8250/8250.c
 @@ -290,6 +290,13 @@ static const struct serial8250_config ua
.fcr= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
.flags  = UART_CAP_FIFO | UART_CAP_AFE | UART_CAP_EFR,
@@ -18,7 +20,7 @@
struct uart_8250_port *up =
container_of(port, struct uart_8250_port, port);
  
-+#ifdef CONFIG_AR7
++#if defined(CONFIG_AR7) || defined(CONFIG_AC49X)
 +  wait_for_xmitr(up, BOTH_EMPTY);
 +#else
wait_for_xmitr(up, UART_LSR_THRE);
-- 
1.7.12.2



pgp0y6CoywKUP.pgp
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 6/8] [ar7] create generic subtarget

2012-10-15 Thread Daniel Golle
This moves everything over to the generic sub-target.

Signed-off-by: Daniel Golle dgo...@allnet.de
---
 target/linux/ar7/Makefile|   1 +
 target/linux/ar7/config-3.3  | 102 ---
 target/linux/ar7/generic/config-3.3  | 102 +++
 target/linux/ar7/generic/profiles/100-Annex-A.mk |  17 
 target/linux/ar7/generic/profiles/110-Annex-B.mk |  17 
 target/linux/ar7/generic/profiles/200-Texas.mk   |  18 
 target/linux/ar7/generic/profiles/210-None.mk|  17 
 target/linux/ar7/generic/target.mk   |  10 +++
 target/linux/ar7/profiles/100-Annex-A.mk |  17 
 target/linux/ar7/profiles/110-Annex-B.mk |  17 
 target/linux/ar7/profiles/200-Texas.mk   |  18 
 target/linux/ar7/profiles/210-None.mk|  17 
 12 files changed, 182 insertions(+), 171 deletions(-)
 delete mode 100644 target/linux/ar7/config-3.3
 create mode 100644 target/linux/ar7/generic/config-3.3
 create mode 100644 target/linux/ar7/generic/profiles/100-Annex-A.mk
 create mode 100644 target/linux/ar7/generic/profiles/110-Annex-B.mk
 create mode 100644 target/linux/ar7/generic/profiles/200-Texas.mk
 create mode 100644 target/linux/ar7/generic/profiles/210-None.mk
 create mode 100644 target/linux/ar7/generic/target.mk
 delete mode 100644 target/linux/ar7/profiles/100-Annex-A.mk
 delete mode 100644 target/linux/ar7/profiles/110-Annex-B.mk
 delete mode 100644 target/linux/ar7/profiles/200-Texas.mk
 delete mode 100644 target/linux/ar7/profiles/210-None.mk

diff --git a/target/linux/ar7/Makefile b/target/linux/ar7/Makefile
index da3e252..ead26d9 100644
--- a/target/linux/ar7/Makefile
+++ b/target/linux/ar7/Makefile
@@ -11,6 +11,7 @@ BOARD:=ar7
 BOARDNAME:=TI AR7
 FEATURES:=squashfs jffs2 atm
 MAINTAINER:=Florian Fainelli flor...@openwrt.org
+SUBTARGETS:=generic ac49x
 
 LINUX_VERSION:=3.3.8
 
diff --git a/target/linux/ar7/config-3.3 b/target/linux/ar7/config-3.3
deleted file mode 100644
index 8ff39e2..000
--- a/target/linux/ar7/config-3.3
+++ /dev/null
@@ -1,102 +0,0 @@
-CONFIG_ADM6996_PHY=y
-CONFIG_AR7=y
-CONFIG_AR7_GPIO=y
-CONFIG_AR7_WDT=y
-CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-CONFIG_ARCH_DISCARD_MEMBLOCK=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_BCMA_POSSIBLE=y
-CONFIG_BOOT_ELF32=y
-CONFIG_CEVT_R4K=y
-CONFIG_CEVT_R4K_LIB=y
-CONFIG_CPMAC=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPS32_R1=y
-CONFIG_CPU_MIPSR1=y
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CSRC_R4K=y
-CONFIG_CSRC_R4K_LIB=y
-# CONFIG_DEBUG_ZBOOT is not set
-CONFIG_DECOMPRESS_LZMA=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_ETHERNET_PACKET_MANGLE=y
-CONFIG_FIXED_PHY=y
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_GPIO=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GPIOLIB=y
-CONFIG_HARDWARE_WATCHPOINTS=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-CONFIG_HAVE_C_RECORDMCOUNT=y
-CONFIG_HAVE_DMA_API_DEBUG=y
-CONFIG_HAVE_DMA_ATTRS=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
-CONFIG_HAVE_GENERIC_DMA_COHERENT=y
-CONFIG_HAVE_GENERIC_HARDIRQS=y
-CONFIG_HAVE_IDE=y
-CONFIG_HAVE_IRQ_WORK=y
-CONFIG_HAVE_KERNEL_BZIP2=y
-CONFIG_HAVE_KERNEL_GZIP=y
-CONFIG_HAVE_KERNEL_LZMA=y
-CONFIG_HAVE_KERNEL_LZO=y
-CONFIG_HAVE_MEMBLOCK=y
-CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HW_RANDOM=y
-CONFIG_INITRAMFS_SOURCE=
-CONFIG_IP17XX_PHY=y
-CONFIG_IRQ_CPU=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_KALLSYMS=y
-CONFIG_KERNEL_GZIP=y
-CONFIG_LEDS_GPIO=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=y
-CONFIG_MDIO_BOARDINFO=y
-CONFIG_MIPS=y
-CONFIG_MIPS_L1_CACHE_SHIFT=5
-# CONFIG_MIPS_MACHINE is not set
-CONFIG_MIPS_MT_DISABLED=y
-CONFIG_MTD_AR7_PARTS=y
-CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MVSWITCH_PHY=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NO_EXCEPT_FILL=y
-CONFIG_PAGEFLAGS_EXTENDED=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PHYLIB=y
-# CONFIG_PREEMPT_RCU is not set
-# CONFIG_SCSI_DMA is not set
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SWCONFIG=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_SYS_HAS_EARLY_PRINTK=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-CONFIG_SYS_SUPPORTS_ZBOOT=y
-CONFIG_SYS_SUPPORTS_ZBOOT_UART16550=y
-CONFIG_VLYNQ=y
-# CONFIG_VLYNQ_DEBUG is not set
-CONFIG_XZ_DEC=y
-CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/ar7/generic/config-3.3 
b/target/linux/ar7/generic/config-3.3
new file mode 100644
index 000..8ff39e2
--- /dev/null
+++ 

[OpenWrt-Devel] [PATCH 7/8] [ar7] create AC49x subtarget

2012-10-15 Thread Daniel Golle

Signed-off-by: Daniel Golle dgo...@allnet.de
---
 target/linux/ar7/ac49x/config-3.3   | 102 
 target/linux/ar7/ac49x/profiles/210-None.mk |  17 +
 target/linux/ar7/ac49x/target.mk|  10 +++
 3 files changed, 129 insertions(+)
 create mode 100644 target/linux/ar7/ac49x/config-3.3
 create mode 100644 target/linux/ar7/ac49x/profiles/210-None.mk
 create mode 100644 target/linux/ar7/ac49x/target.mk

diff --git a/target/linux/ar7/ac49x/config-3.3 
b/target/linux/ar7/ac49x/config-3.3
new file mode 100644
index 000..2875d3b
--- /dev/null
+++ b/target/linux/ar7/ac49x/config-3.3
@@ -0,0 +1,102 @@
+CONFIG_AC49X=y
+CONFIG_ADM6996_PHY=y
+CONFIG_AR7_GPIO=y
+CONFIG_AR7_WDT=y
+CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
+CONFIG_ARCH_DISCARD_MEMBLOCK=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_BCMA_POSSIBLE=y
+CONFIG_BOOT_ELF32=y
+CONFIG_CEVT_R4K=y
+CONFIG_CEVT_R4K_LIB=y
+CONFIG_CPMAC=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MIPS32=y
+CONFIG_CPU_MIPS32_R1=y
+CONFIG_CPU_MIPSR1=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CSRC_R4K=y
+CONFIG_CSRC_R4K_LIB=y
+# CONFIG_DEBUG_ZBOOT is not set
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_ETHERNET_PACKET_MANGLE=y
+CONFIG_FIXED_PHY=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GPIOLIB=y
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAVE_ARCH_JUMP_LABEL=y
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_C_RECORDMCOUNT=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+CONFIG_HAVE_DMA_ATTRS=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_HAVE_GENERIC_HARDIRQS=y
+CONFIG_HAVE_IDE=y
+CONFIG_HAVE_IRQ_WORK=y
+CONFIG_HAVE_KERNEL_BZIP2=y
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+CONFIG_HAVE_MEMBLOCK=y
+CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_HW_RANDOM=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_IP17XX_PHY=y
+CONFIG_IRQ_CPU=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_KALLSYMS=y
+CONFIG_KERNEL_GZIP=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_MDIO_BOARDINFO=y
+CONFIG_MIPS=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+# CONFIG_MIPS_MACHINE is not set
+CONFIG_MIPS_MT_DISABLED=y
+CONFIG_MTD_AC49X_PARTS=y
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MVSWITCH_PHY=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NO_EXCEPT_FILL=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PHYLIB=y
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_SCSI_DMA is not set
+CONFIG_SWAP_IO_SPACE=y
+CONFIG_SWCONFIG=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_EARLY_PRINTK=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_SYS_SUPPORTS_ZBOOT_UART16550=y
+CONFIG_VLYNQ=y
+# CONFIG_VLYNQ_DEBUG is not set
+CONFIG_XZ_DEC=y
+CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/ar7/ac49x/profiles/210-None.mk 
b/target/linux/ar7/ac49x/profiles/210-None.mk
new file mode 100644
index 000..2fcfacd
--- /dev/null
+++ b/target/linux/ar7/ac49x/profiles/210-None.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/None
+  NAME:=No WiFi
+  PACKAGES:=
+endef
+
+define Profile/None/Description
+   Package set without WiFi support
+endef
+$(eval $(call Profile,None))
+
diff --git a/target/linux/ar7/ac49x/target.mk b/target/linux/ar7/ac49x/target.mk
new file mode 100644
index 000..47f3ab2
--- /dev/null
+++ b/target/linux/ar7/ac49x/target.mk
@@ -0,0 +1,10 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+
+SUBTARGET:=ac49x
+BOARDNAME:=AudioCodes AC49x
+
+define Target/Description
+   Build firmware images for AudioCodes AC49x based routers.
+endef
-- 
1.7.12.2



pgpzDOEk9nLsd.pgp
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 8/8] [ar7] generate image for AC49x

2012-10-15 Thread Daniel Golle

Signed-off-by: Daniel Golle dgo...@allnet.de
---
 target/linux/ar7/image/Makefile | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/target/linux/ar7/image/Makefile b/target/linux/ar7/image/Makefile
index 6278b31..dcc8a75 100644
--- a/target/linux/ar7/image/Makefile
+++ b/target/linux/ar7/image/Makefile
@@ -67,6 +67,9 @@ define Image/Build/Titan
$(STAGING_DIR_HOST)/bin/mktitanimg -o 
$(BIN_DIR)/openwrt-$(2)-na-$(4)-code.bin -i $(KDIR)/loader.bin 
$(KDIR)/root.$(1) -a 0x1 0x1 -h 2  -p 0x4D575943 -s 0x0b01
 endef
 
+define Image/Build/AudioCodes
+   ( dd if=$(KDIR)/vmlinux.elf bs=64k conv=sync ; dd if=$(KDIR)/root.$(1) 
)  $(BIN_DIR)/openwrt-$(2)-$(1).bin
+endef
 
 #define Image/Build/sErCoMm
 #  cat sercomm/adam2.bin $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin  
$(KDIR)/dgfw.tmp
@@ -86,6 +89,7 @@ define Image/Build/Initramfs
$(CP) $(KDIR)/vmlinux.bin $(BIN_DIR)/$(IMG_PREFIX)-initramfs.bin
 endef
 
+ifeq ($(CONFIG_AR7),y)
 define Image/Build
dd if=$(KDIR)/loader.bin $(call align/$(1))  
$(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
cat $(KDIR)/root.$(1)  $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
@@ -113,5 +117,16 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
$(call Image/Build/Initramfs)
 endif
 endef
+endif
+
+ifeq ($(CONFIG_AC49X),y)
+define Image/Build
+#  $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).bin)
+   $(call Image/Build/AudioCodes,$(1),mp202,$(1))
+ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
+   $(call Image/Build/Initramfs)
+endif
+endef
+endif
 
 $(eval $(call BuildImage))
-- 
1.7.12.2



pgpLoXTqdvnjs.pgp
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/8] [ar7] free memory below kernel offset

2012-10-15 Thread Jonas Gorski
On 15 October 2012 11:42, Daniel Golle dgo...@allnet.de wrote:
 Some bootloaders (e.g. PSPBoot on AC49x) have a load-offset, this frees that
 memory region so it is usable for Linux.

 Signed-off-by: Daniel Golle dgo...@allnet.de
 ---
  .../patches-3.3/200-free-mem-below-kernel-offset.patch  | 17 
 +
  1 file changed, 17 insertions(+)
  create mode 100644 
 target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch

 diff --git 
 a/target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch 
 b/target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch
 new file mode 100644
 index 000..48a3d14
 --- /dev/null
 +++ b/target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch
 @@ -0,0 +1,17 @@
 +Index: linux-3.3.8/arch/mips/ar7/memory.c
 +===
 +--- linux-3.3.8.orig/arch/mips/ar7/memory.c
  linux-3.3.8/arch/mips/ar7/memory.c

You should refresh this patch so it doesn't get modified for the next
one refreshing them.

 +@@ -67,5 +67,11 @@ void __init prom_meminit(void)
 +
 + void __init prom_free_prom_memory(void)
 + {
 +-  /* Nothing to free */
 ++  /* adapted from arch/mips/txx9/generic/setup.c */
 ++  unsigned long saddr = PHYS_OFFSET + PAGE_SIZE;
 ++  unsigned long eaddr = __pa_symbol(_text);
 ++
 ++  /* free memory between prom-record and kernel _text base */
 ++  if (saddr  eaddr)
 ++  free_init_pages(prom memory, saddr, eaddr);
 + }
 --
 1.7.12.2

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


Re: [OpenWrt-Devel] WPS patch set overlooked

2012-10-15 Thread Bas Mevissen

Hi Lorenzo,

Does this WPS patch set contain a way to mitigate the security design flaw?

Reading the Wikipedia article
(http://en.wikipedia.org/wiki/Wi-Fi_Protected_Setup#Security), it looks
to me a compatible fix should be possible.

Cheers,

Bas.

On 10/13/2012 01:39 PM, Lorenzo Cappelletti wrote:
 Hi everyone,
 
 I posted  my first patch set on October 1. Since then, it hasn't been
 acknowledged. I must conclude it got overlooked.
 
 The patch set regards WPS (Wi-Fi Protected Setup) support. Could anyone
 have a look at it (maybe Felix, who recently moved hostapd directory
 under network?). It's not over yet, but I'll be submitting more patches
 if these get committed.
 
 Thanks. Lorenzo.
 
 Links to my patch set posts:
 
 https://lists.openwrt.org/pipermail/openwrt-devel/2012-October/016870.html
 https://lists.openwrt.org/pipermail/openwrt-devel/2012-October/016871.html
 https://lists.openwrt.org/pipermail/openwrt-devel/2012-October/016872.html
 https://lists.openwrt.org/pipermail/openwrt-devel/2012-October/016873.html
 
 
 
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel
 


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


Re: [OpenWrt-Devel] [PATCH 4/8] [ar7] detect AC49x flash partitions

2012-10-15 Thread Jonas Gorski
On 15 October 2012 11:43, Daniel Golle dgo...@allnet.de wrote:

 Signed-off-by: Daniel Golle dgo...@allnet.de
 ---
  target/linux/ar7/files/drivers/mtd/ac49xpart.c | 199 
 +
  .../ar7/patches-3.3/320-ac49x-mtd-partitions.patch |  41 +
  2 files changed, 240 insertions(+)
  create mode 100644 target/linux/ar7/files/drivers/mtd/ac49xpart.c
  create mode 100644 
 target/linux/ar7/patches-3.3/320-ac49x-mtd-partitions.patch

 diff --git a/target/linux/ar7/files/drivers/mtd/ac49xpart.c 
 b/target/linux/ar7/files/drivers/mtd/ac49xpart.c
 new file mode 100644
 index 000..1eb19b5
 --- /dev/null
 +++ b/target/linux/ar7/files/drivers/mtd/ac49xpart.c
 @@ -0,0 +1,199 @@
 +/*
 + * AudioCodes AC49x PSPBoot-based flash partition table
 + * Copyright 2012 Daniel Golle daniel.go...@gmail.com
 + *
 + * 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 + *
 + */
 +
 +#include linux/kernel.h
 +#include linux/slab.h
 +
 +#include linux/mtd/mtd.h
 +#include linux/mtd/partitions.h
 +#include linux/bootmem.h
 +#include linux/magic.h
 +#include linux/module.h
 +
 +#include asm/mach-ar7/prom.h
 +
 +#define AC49X_MAXENVPARTS  8
 +
 +#define AC49X_PARTTYPE_LOADER  0
 +#define AC49X_PARTTYPE_BOOTENV 1
 +#define AC49X_PARTTYPE_LINUX   2
 +#define AC49X_PARTTYPE_ROOTFS  3
 +#define AC49X_PARTTYPE_UNKNOWN 4
 +#define AC49X_NUM_PARTTYPES5
 +
 +#define AC49X_FLASH_ADDRMASK   0x00FF
 +
 +#define AC49X_LOADER_MAGIC 0x40809000
 +#define AC49X_LINUX_MAGIC  0x464c457f //  ELF
 +#define AC49X_BOOTENV_MAGIC0x4578614d // MaxE

No C99 comments, please.

 +
 +#define ROOTFS_MIN_OFFSET  0xC
 +
 +int parse_partvar(const unsigned char *partvar, struct mtd_partition *part)
 +{
 +   unsigned int partstart, partend;
 +   unsigned int pnum;

You should try to keep this as close to the kernel style as possible
to make upstreaming it easier, so empty line here, please.

 +   pnum = sscanf(partvar, 0x%x,0x%x, partstart, partend);
 +   if (pnum != 2) return 1;

The return needs to be on a separate line.

 +   part-offset = partstart  AC49X_FLASH_ADDRMASK;
 +   part-size = partend - partstart;
 +   return 0;
 +}
 +
 +int detect_parttype(struct mtd_info *master, struct mtd_partition part)
 +{
 +   unsigned int magic;
 +   size_t len;
 +
 +   if (part.size  4) return -1;

Same here.

 +
 +   mtd_read(master, part.offset, sizeof(magic), len,
 +(uint8_t *)magic);
 +
 +   if (len != sizeof(magic)) return -1;

And here.

 +
 +   switch (magic) {
 +   case AC49X_LOADER_MAGIC:
 +   return AC49X_PARTTYPE_LOADER;
 +   case AC49X_LINUX_MAGIC:
 +   return AC49X_PARTTYPE_LINUX;
 +   case SQUASHFS_MAGIC:
 +   case CRAMFS_MAGIC:
 +   case CRAMFS_MAGIC_WEND:
 +   return AC49X_PARTTYPE_ROOTFS;
 +   case AC49X_BOOTENV_MAGIC:
 +   return AC49X_PARTTYPE_BOOTENV;
 +   default:
 +   switch (magic  0xFF) {
 +   case JFFS2_SUPER_MAGIC:
 +   return AC49X_PARTTYPE_ROOTFS;
 +   }
 +   switch (magic  8) {
 +   case JFFS2_SUPER_MAGIC:
 +   return AC49X_PARTTYPE_ROOTFS;
 +   }

Why these two switch statements with only one condition, why not
   if ((magic  0xFF) == JFFS2_SUPER_MAGIC ||
   (magic  8) == JFFS2_SUPER_MAGIC)

 +   return AC49X_PARTTYPE_UNKNOWN;
 +   }
 +}
 +
 +const char *partnames[] = {
 +   loader,
 +   config,
 +   linux,
 +   rootfs,
 +   data
 +   };
 +
 +void gen_partname(unsigned int type, unsigned int *typenumeration, struct 
 mtd_partition *part)
 +{
 +   char *s  = kzalloc(sizeof(char) * 8, GFP_KERNEL);
 +
 +   (typenumeration[type])++;
 +   if ( typenumeration[type] == 1 )
 +   sprintf(s, %s, partnames[type]);
 +   else
 +   sprintf(s, %s%d, partnames[type], typenumeration[type]);
 +
 +   part-name = s;
 +}
 +
 +static int 

Re: [OpenWrt-Devel] [PATCH] bcm63xx: HW553 buttons and net patch

2012-10-15 Thread Jonas Gorski
On 8 October 2012 20:31, Daniel dgcb...@gmail.com wrote:
 I don't how to rid of the quote printable thing. This is a new attempt.


 - Added the buttons for this bcm6358 board.
 - The internal phy is unused in this board, deleted.
 patch made against current AA

 Signed-off-by: Daniel Gonzalez  dgcbueu at gmail.com

Can you resend this patch maybe as an attachment? I can't get it to
apply; it seems to be seriously borked.


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


Re: [OpenWrt-Devel] Freescale P1020 WLAN support?

2012-10-15 Thread Rainer 'Rei' Schuth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi

On 10/13/2012 12:21 AM, John Clark wrote:
 I have been looking and eventually found some set of patches which I have 
 been using that were posted in March.
 
 However, what was not clear from the various posts at that time was the 
 following:
 
 1) what SVN revision of OpenWRT that was used.
 2) whether anyone has done any further work.
 

We have been using the patches since March.
You can find working patches under [0].

I hope it works also for you.


Rainer Schuth

[0]
http://git.fem.tu-ilmenau.de/?p=fem-wlan.git;a=tree;f=target/linux/mpc85xx/patches-3.3;hb=968a75becbd35df6430e9f5af889a9abe3281423
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAlB8LG4ACgkQsD/BjTdkA1cRyQEAwAPIMcc694MNYsLmqbTL0HMA
CvAX2T2hjwX5ZQcYPyYA/1YKx9wbLiBGB/cr/hvUHmUNA/Ha39ZBJHOyOWJlAMdR
=K60w
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv2] Add support for Huawei E970

2012-10-15 Thread Rafał Miłecki
2012/10/14 Mathias Adam m.adam--open...@adamis.de:
 This patch adds support for Huawei E970 wireless gateway devices.
 It has been tested on an E970 labelled as T-Mobile web'n'walk Box IV.
 E960/B970 should work too, from what I know it's basically the same hardware.

 The device has a Broadcom BCM5354 SoC and a built-in 3G USB modem.
 For reference, it has already been addressed in this open ticket:
 https://dev.openwrt.org/ticket/2711

Could you provide dmesg from booting OpenWRT, please? I'd like to see
bcma/b43/mtd logs.

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


Re: [OpenWrt-Devel] [PATCHv2] Add support for Huawei E970

2012-10-15 Thread Mathias Adam
Am Mo, 15.10.2012, 17:57 schrieb Rafał Miłecki:
 2012/10/14 Mathias Adam m.adam--open...@adamis.de:
 This patch adds support for Huawei E970 wireless gateway devices.
 It has been tested on an E970 labelled as T-Mobile web'n'walk Box IV.
 E960/B970 should work too, from what I know it's basically the same
 hardware.

 The device has a Broadcom BCM5354 SoC and a built-in 3G USB modem.
 For reference, it has already been addressed in this open ticket:
 https://dev.openwrt.org/ticket/2711

 Could you provide dmesg from booting OpenWRT, please? I'd like to see
 bcma/b43/mtd logs.

sure, rather not dmesg but the bootlog from serial console, see attachment...

Regards,
Mathias

bootlog_121014.cap
Description: application/vnd.tcpdump.pcap
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCHv2] Add support for Huawei E970

2012-10-15 Thread Rafał Miłecki
2012/10/15 Mathias Adam m.adam--open...@adamis.de:
 Am Mo, 15.10.2012, 17:57 schrieb Rafał Miłecki:
 2012/10/14 Mathias Adam m.adam--open...@adamis.de:
 This patch adds support for Huawei E970 wireless gateway devices.
 It has been tested on an E970 labelled as T-Mobile web'n'walk Box IV.
 E960/B970 should work too, from what I know it's basically the same
 hardware.

 The device has a Broadcom BCM5354 SoC and a built-in 3G USB modem.
 For reference, it has already been addressed in this open ticket:
 https://dev.openwrt.org/ticket/2711

 Could you provide dmesg from booting OpenWRT, please? I'd like to see
 bcma/b43/mtd logs.

 sure, rather not dmesg but the bootlog from serial console, see attachment...

Thanks! I was surprised to see wiki page [0] saying it contains
BCM4318 (which is G-PHY type).

After seeing log I can tell it's standard BCM5354 with a 80211 core that has:
b43-phy0: Found PHY: Analog 6, Type 5 (LP), Revision 0

There is no separated chipset with just wireless, it's just a mistake
on wiki page :)

[0] http://wiki.openwrt.org/toh/huawei/e970

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


Re: [OpenWrt-Devel] WPS patch set overlooked

2012-10-15 Thread Lorenzo Cappelletti
On Mon, Oct 15, 2012 at 3:11 PM, Bas Mevissen ab...@basmevissen.nl wrote:

 Does this WPS patch set contain a way to mitigate the security design flaw?

Not yet.

 Reading the Wikipedia article
 (http://en.wikipedia.org/wiki/Wi-Fi_Protected_Setup#Security), it looks
 to me a compatible fix should be possible.

I'm not an expert, but, from the picture of the whole system I gained
by reading here and there, it is possible.  In particular, the brute
force attack can be brought from feasible to computationally
impossible with the following precautions:

- increase the wait time between one attempt and a new one
- enable a setup time window by mean of a (virtual) button to be
pressed on the router
- move away from label setup method to a more secure one such as keypad method.

The last point is my final goal.  My plan is to have a web page
securely accessible on the router where one can enter random PINs
generated by devices that want to connect to my network.

I hope some maintainer on this list will read my posts and make the commits.

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