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

2012-10-17 Thread Daniel Golle
So now some sosmetics fixes according to the comments I got:
I fixed everything checkpatch.pl was complaining about and refreshed the patches
in target/linux/ar7/patches-3.3

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 | 220 +
 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 |  15 ++
 .../ar7/patches-3.3/300-add-ac49x-platform.patch   | 124 
 .../ar7/patches-3.3/310-ac49x-prom-support.patch   |  20 ++
 .../ar7/patches-3.3/320-ac49x-mtd-partitions.patch |  35 
 .../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, 745 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



pgp5wyVEjc1ds.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-17 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 

 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..399822a
--- /dev/null
+++ b/target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch
@@ -0,0 +1,15 @@
+--- a/arch/mips/ar7/memory.c
 b/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



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


[OpenWrt-Devel] [PATCH 2/8] [ar7] add AudioCodes AC49x platform support to kernel

2012-10-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 create mode 100644 target/linux/ar7/patches-3.3/300-add-ac49x-platform.patch

diff --git a/target/linux/ar7/patches-3.3/300-add-ac49x-platform.patch 
b/target/linux/ar7/patches-3.3/300-add-ac49x-platform.patch
new file mode 100644
index 000..7132743
--- /dev/null
+++ b/target/linux/ar7/patches-3.3/300-add-ac49x-platform.patch
@@ -0,0 +1,124 @@
+--- a/arch/mips/Kconfig
 b/arch/mips/Kconfig
+@@ -39,6 +39,25 @@ choice
+   prompt "System type"
+   default SGI_IP22
+ 
++config AC49X
++  bool "AudioCodes AC49X"
++  select BOOT_ELF32
++  select DMA_NONCOHERENT
++  select CEVT_R4K
++  select CSRC_R4K
++  select IRQ_CPU
++  select NO_EXCEPT_FILL
++  select SWAP_IO_SPACE
++  select SYS_HAS_CPU_MIPS32_R1
++  select SYS_HAS_EARLY_PRINTK
++  select SYS_SUPPORTS_32BIT_KERNEL
++  select SYS_SUPPORTS_LITTLE_ENDIAN
++  select SYS_SUPPORTS_ZBOOT_UART16550
++  select ARCH_REQUIRE_GPIOLIB
++  select VLYNQ
++  help
++Support for the AudioCodes AC49x System-on-a-Chip family.
++
+ config MIPS_ALCHEMY
+   bool "Alchemy processor based machines"
+   select 64BIT_PHYS_ADDR
+--- a/arch/mips/ar7/Platform
 b/arch/mips/ar7/Platform
+@@ -4,3 +4,10 @@
+ platform-$(CONFIG_AR7)  += ar7/
+ cflags-$(CONFIG_AR7)+= -I$(srctree)/arch/mips/include/asm/mach-ar7
+ load-$(CONFIG_AR7)  += 0x9410
++
++#
++# AudioCodes AC49x
++#
++platform-$(CONFIG_AC49X)+= ar7/
++cflags-$(CONFIG_AC49X)  += -I$(srctree)/arch/mips/include/asm/mach-ar7
++load-$(CONFIG_AC49X)+= 0x945ca000
+--- a/drivers/char/Kconfig
 b/drivers/char/Kconfig
+@@ -480,7 +480,7 @@ config MWAVE
+ 
+ config AR7_GPIO
+   tristate "TI AR7 GPIO Support"
+-  depends on AR7
++  depends on AR7 || AC49X
+   help
+ Give userspace access to the GPIO pins on the Texas Instruments AR7
+ processors.
+--- a/drivers/net/ethernet/ti/Kconfig
 b/drivers/net/ethernet/ti/Kconfig
+@@ -5,7 +5,7 @@
+ config NET_VENDOR_TI
+   bool "Texas Instruments (TI) devices"
+   default y
+-  depends on PCI || EISA || AR7 || (ARM && (ARCH_DAVINCI || ARCH_OMAP3))
++  depends on PCI || EISA || AC49X || AR7 || (ARM && (ARCH_DAVINCI || 
ARCH_OMAP3))
+   ---help---
+ If you have a network (Ethernet) card belonging to this class, say Y
+ and read the Ethernet-HOWTO, available from
+@@ -69,7 +69,7 @@ config TLAN
+ 
+ config CPMAC
+   tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)"
+-  depends on EXPERIMENTAL && AR7
++  depends on EXPERIMENTAL && ( AC49X || AR7 )
+   select PHYLIB
+   ---help---
+ TI AR7 CPMAC Ethernet support
+--- a/drivers/vlynq/Kconfig
 b/drivers/vlynq/Kconfig
+@@ -1,5 +1,5 @@
+ menu "TI VLYNQ"
+-  depends on AR7 && EXPERIMENTAL
++  depends on ( AR7 || AC49X ) && EXPERIMENTAL
+ 
+ config VLYNQ
+   bool "TI VLYNQ bus support"
+--- a/drivers/watchdog/Kconfig
 b/drivers/watchdog/Kconfig
+@@ -989,7 +989,7 @@ config SIBYTE_WDOG
+ 
+ config AR7_WDT
+   tristate "TI AR7 Watchdog Timer"
+-  depends on AR7
++  depends on AR7 || AC49X
+   help
+ Hardware driver for the TI AR7 Watchdog Timer.
+ 
+--- a/arch/mips/boot/compressed/uart-16550.c
 b/arch/mips/boot/compressed/uart-16550.c
+@@ -13,7 +13,7 @@
+ #define PORT(offset) (CKSEG1ADDR(UART_BASE) + (offset))
+ #endif
+ 
+-#ifdef CONFIG_AR7
++#if defined(CONFIG_AR7) || defined(CONFIG_AC49X)
+ #include 
+ #define PORT(offset) (CKSEG1ADDR(AR7_REGS_UART0) + (4 * offset))
+ #endif
+--- a/arch/mips/ar7/setup.c
 b/arch/mips/ar7/setup.c
+@@ -69,6 +69,8 @@ const char *get_system_type(void)
+   return "TI AR7 (TNETV1056)";
+   case TITAN_CHIP_1060:
+   return "TI AR7 (TNETV1060)";
++  case TITAN_CHIP_AC:
++  return "AudioCodes AC49x";
+   }
+   default:
+   return "TI AR7 (unknown)";
+--- a/arch/mips/include/asm/mach-ar7/ar7.h
 b/arch/mips/include/asm/mach-ar7/ar7.h
+@@ -92,6 +92,7 @@
+ #define TITAN_CHIP_1055   0x0e
+ #define TITAN_CHIP_1056   0x0d
+ #define TITAN_CHIP_1060   0x07
++#define TITAN_CHIP_AC 0x02
+ 
+ /* Interrupts */
+ #define AR7_IRQ_UART0 15
-- 
1.7.12.2



pgpXUfs1Zevpq.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-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 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..dddf221
--- /dev/null
+++ b/target/linux/ar7/patches-3.3/310-ac49x-prom-support.patch
@@ -0,0 +1,20 @@
+--- a/arch/mips/ar7/prom.c
 b/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



pgpLlykafwkLu.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-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 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..1f937f0
--- /dev/null
+++ b/target/linux/ar7/files/drivers/mtd/ac49xpart.c
@@ -0,0 +1,220 @@
+/*
+ * AudioCodes AC49x PSPBoot-based flash partition table
+ * Copyright 2012 Daniel Golle 
+ *
+ * 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 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#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; envpartnum < AC49X_MAXENVPARTS; envpartnum++) {
+   struct mtd_partition parsepart;
+   unsigned int offset, size, type;
+   int err;
+   sprintf(evn, "mtd%d", envpartnum);
+   partvar = prom_getenv(evn);
+   if (!partvar)
+   continue;
+   err = parse_partvar(partvar, &parsepart);
+   if (err)
+

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

2012-10-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

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



pgpi26cqvlKqC.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-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 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 
+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
+++ b/target/linux/ar7/generic/config-3.3
@@ -0,0 +1,102 @@
+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_UPDA

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

2012-10-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 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



pgpAOfAUzPlyn.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-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

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



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


[OpenWrt-Devel] [PATCH] Fix broadcast DHCP client startup option in dhcp.sh

2012-10-17 Thread Hans Dedecker
Signed-off-by: Hans Dedecker (hans.dedecker at technicolor.com)

Fixes the DHCP request broadcasts replies option parsing

---
 package/netifd/files/lib/netifd/proto/dhcp.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/netifd/files/lib/netifd/proto/dhcp.sh
b/package/netifd/files/lib/netifd/proto/dhcp.sh
index 9182d58..7b1fe37 100755
--- a/package/netifd/files/lib/netifd/proto/dhcp.sh
+++ b/package/netifd/files/lib/netifd/proto/dhcp.sh
@@ -26,7 +26,7 @@ proto_dhcp_setup() {
append dhcpopts "-O $opt"
done

-   [ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
+   [ "$broadcast" = 1 ] && broadcast="-B" || broadcast=

proto_export "INTERFACE=$config"
proto_run_command "$config" udhcpc \
-- 
1.7.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [dnsmasq] Changed the init script to not check if dhcp-hostsfile exists as it may be used dynamically with a HUP signal

2012-10-17 Thread Alex Guerra
Signed-off-by: Alex Guerra 
---
 .../network/services/dnsmasq/files/dnsmasq.init|2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init
b/package/network/services/dnsmasq/files/dnsmasq.init
index 85c22c3..2f81cef 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -131,7 +131,7 @@ dnsmasq() {
config_get_bool cachelocal "$cfg" cachelocal 1

config_get hostsfile "$cfg" dhcphostsfile
-   [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
+   [ -n "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"

local rebind
config_get_bool rebind "$cfg" rebind_protection 1
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [base-files] Changed START to 25 in sysntpd

2012-10-17 Thread Alex Guerra
Correct date and time are necessary for certificate based daemons
(for example openvpn)

Signed-off-by: Alex Guerra 
---
 package/base-files/files/etc/init.d/sysntpd |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/base-files/files/etc/init.d/sysntpd
b/package/base-files/files/etc/init.d/sysntpd
index bb42ef7..bc4aaae 100755
--- a/package/base-files/files/etc/init.d/sysntpd
+++ b/package/base-files/files/etc/init.d/sysntpd
@@ -1,7 +1,7 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2011 OpenWrt.org

-START=98
+START=25

 SERVICE_DAEMONIZE=1
 SERVICE_WRITE_PID=1
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [base-files] Changed START to 25 in sysntpd

2012-10-17 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Time synchronization is not guaranteed to be done when the sysntpd
init script finished so this start index change doesn ot reliably
solve the problem.

~ Jow
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlB+sfcACgkQdputYINPTPNqrACgpdrkiaP79DKJ8rQkA6gKXQAe
7KcAn3Awo1cQ2P5eVjdvzndIXGOB77eI
=R2Ty
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


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

2012-10-17 Thread Daniel Golle
Some more cleanup was done:
AC49x is now a sub-target (instead of a separate machine) also in the kernel.
This further reduces the foot-print of this addition...

Daniel Golle (7):
  [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] create generic subtarget
  [ar7] create AC49x subtarget
  [ar7] generate image for AC49x

 target/linux/ar7/Makefile  |   1 +
 target/linux/ar7/ac49x/config-default  |   6 +
 target/linux/ar7/ac49x/profiles/210-None.mk|  17 ++
 target/linux/ar7/ac49x/target.mk   |  10 +
 target/linux/ar7/config-3.3|   1 -
 target/linux/ar7/files/drivers/mtd/ac49xpart.c | 220 +
 target/linux/ar7/generic/config-default|   6 +
 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 |  15 ++
 .../ar7/patches-3.3/300-add-ac49x-platform.patch   |  82 
 .../ar7/patches-3.3/310-ac49x-prom-support.patch   |  20 ++
 .../ar7/patches-3.3/320-ac49x-mtd-partitions.patch |  35 
 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 --
 21 files changed, 506 insertions(+), 70 deletions(-)
 create mode 100644 target/linux/ar7/ac49x/config-default
 create mode 100644 target/linux/ar7/ac49x/profiles/210-None.mk
 create mode 100644 target/linux/ar7/ac49x/target.mk
 create mode 100644 target/linux/ar7/files/drivers/mtd/ac49xpart.c
 create mode 100644 target/linux/ar7/generic/config-default
 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



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


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

2012-10-17 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 

 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..399822a
--- /dev/null
+++ b/target/linux/ar7/patches-3.3/200-free-mem-below-kernel-offset.patch
@@ -0,0 +1,15 @@
+--- a/arch/mips/ar7/memory.c
 b/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



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


[OpenWrt-Devel] [PATCH v3 2/7] [ar7] add AudioCodes AC49x platform support to kernel

2012-10-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 create mode 100644 target/linux/ar7/patches-3.3/300-add-ac49x-platform.patch

diff --git a/target/linux/ar7/patches-3.3/300-add-ac49x-platform.patch 
b/target/linux/ar7/patches-3.3/300-add-ac49x-platform.patch
new file mode 100644
index 000..80f0f28
--- /dev/null
+++ b/target/linux/ar7/patches-3.3/300-add-ac49x-platform.patch
@@ -0,0 +1,82 @@
+--- a/arch/mips/ar7/Platform
 b/arch/mips/ar7/Platform
+@@ -3,4 +3,9 @@
+ #
+ platform-$(CONFIG_AR7)  += ar7/
+ cflags-$(CONFIG_AR7)+= -I$(srctree)/arch/mips/include/asm/mach-ar7
+-load-$(CONFIG_AR7)  += 0x9410
++load-$(CONFIG_AR7_TI)   += 0x9410
++
++#
++# AudioCodes AC49x
++#
++load-$(CONFIG_AR7_AC49X)+= 0x945ca000
+--- a/arch/mips/ar7/setup.c
 b/arch/mips/ar7/setup.c
+@@ -69,6 +69,8 @@ const char *get_system_type(void)
+   return "TI AR7 (TNETV1056)";
+   case TITAN_CHIP_1060:
+   return "TI AR7 (TNETV1060)";
++  case TITAN_CHIP_AC:
++  return "AudioCodes AC49x";
+   }
+   default:
+   return "TI AR7 (unknown)";
+--- a/arch/mips/include/asm/mach-ar7/ar7.h
 b/arch/mips/include/asm/mach-ar7/ar7.h
+@@ -92,6 +92,7 @@
+ #define TITAN_CHIP_1055   0x0e
+ #define TITAN_CHIP_1056   0x0d
+ #define TITAN_CHIP_1060   0x07
++#define TITAN_CHIP_AC 0x02
+ 
+ /* Interrupts */
+ #define AR7_IRQ_UART0 15
+--- a/arch/mips/Kconfig
 b/arch/mips/Kconfig
+@@ -72,7 +72,7 @@ config AR7
+   select VLYNQ
+   help
+ Support for the Texas Instruments AR7 System-on-a-Chip
+-family: TNETD7100, 7200 and 7300.
++family: TI TNETD7100, 7200, 7300 and AudioCodes AC49x.
+ 
+ config ATH79
+   bool "Atheros AR71XX/AR724X/AR913X based boards"
+@@ -814,6 +814,7 @@ config NLM_XLP_BOARD
+ endchoice
+ 
+ source "arch/mips/alchemy/Kconfig"
++source "arch/mips/ar7/Kconfig"
+ source "arch/mips/ath79/Kconfig"
+ source "arch/mips/bcm47xx/Kconfig"
+ source "arch/mips/bcm63xx/Kconfig"
+--- /dev/null
 b/arch/mips/ar7/Kconfig
+@@ -0,0 +1,26 @@
++if AR7
++
++config AR7_TI
++  bool
++
++config AR7_AC49X
++  bool
++
++choice
++  prompt "AR7 SoC family selection"
++  default AR7_TYPE_TI
++  depends on AR7
++  help
++Select AR7 MIPS SoC implementation.
++
++  config AR7_TYPE_TI
++  bool "Texas Instruments AR7"
++  select AR7_TI
++
++  config AR7_TYPE_AC49X
++  bool "AudioCodes AC49X"
++  select AR7_AC49X
++
++endchoice
++
++endif
-- 
1.7.12.2



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


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

2012-10-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 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..dddf221
--- /dev/null
+++ b/target/linux/ar7/patches-3.3/310-ac49x-prom-support.patch
@@ -0,0 +1,20 @@
+--- a/arch/mips/ar7/prom.c
 b/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



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


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

2012-10-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 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..1f937f0
--- /dev/null
+++ b/target/linux/ar7/files/drivers/mtd/ac49xpart.c
@@ -0,0 +1,220 @@
+/*
+ * AudioCodes AC49x PSPBoot-based flash partition table
+ * Copyright 2012 Daniel Golle 
+ *
+ * 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 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#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; envpartnum < AC49X_MAXENVPARTS; envpartnum++) {
+   struct mtd_partition parsepart;
+   unsigned int offset, size, type;
+   int err;
+   sprintf(evn, "mtd%d", envpartnum);
+   partvar = prom_getenv(evn);
+   if (!partvar)
+   continue;
+   err = parse_partvar(partvar, &parsepart);
+   if (err)
+

[OpenWrt-Devel] [PATCH v3 5/7] [ar7] create generic subtarget

2012-10-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 create mode 100644 target/linux/ar7/generic/config-default
 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 
+SUBTARGETS:=generic ac49x
 
 LINUX_VERSION:=3.3.8
 
diff --git a/target/linux/ar7/config-3.3 b/target/linux/ar7/config-3.3
index 8ff39e2..db26403 100644
--- a/target/linux/ar7/config-3.3
+++ b/target/linux/ar7/config-3.3
@@ -75,7 +75,6 @@ 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
diff --git a/target/linux/ar7/generic/config-default 
b/target/linux/ar7/generic/config-default
new file mode 100644
index 000..b3b9a93
--- /dev/null
+++ b/target/linux/ar7/generic/config-default
@@ -0,0 +1,6 @@
+# CONFIG_AR7_AC49X is not set
+CONFIG_AR7_TI=y
+# CONFIG_AR7_TYPE_AC49X is not set
+CONFIG_AR7_TYPE_TI=y
+# CONFIG_MTD_AC49X_PARTS is not set
+CONFIG_MTD_AR7_PARTS=y
diff --git a/target/linux/ar7/generic/profiles/100-Annex-A.mk 
b/target/linux/ar7/generic/profiles/100-Annex-A.mk
new file mode 100644
index 000..3d74b5d
--- /dev/null
+++ b/target/linux/ar7/generic/profiles/100-Annex-A.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Annex-A
+  NAME:=Annex-A DSL firmware (default)
+  PACKAGES:=kmod-sangam-atm-annex-a
+endef
+
+define Profile/Annex-A/Description
+   Package set compatible with Annex-A DSL lines (most countries).
+endef
+$(eval $(call Profile,Annex-A))
+
diff --git a/target/linux/ar7/generic/profiles/110-Annex-B.mk 
b/target/linux/ar7/generic/profiles/110-Annex-B.mk
new file mode 100644
index 000..66692e7
--- /dev/null
+++ b/target/linux/ar7/generic/profiles/110-Annex-B.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Annex-B
+  NAME:=Annex-B DSL firmware
+  PACKAGES:=kmod-sangam-atm-annex-b
+endef
+
+define Profile/Annex-B/Description
+   Package set compatible with Annex-B DSL lines (Germany).
+endef
+$(eval $(call Profile,Annex-B))
+
diff --git a/target/linux/ar7/generic/profiles/200-Texas.mk 
b/target/linux/ar7/generic/profiles/200-Texas.mk
new file mode 100644
index 000..7d868bd
--- /dev/null
+++ b/target/linux/ar7/generic/profiles/200-Texas.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2006-2009 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Texas
+  NAME:=Texas Instruments WiFi (mac80211)
+  PACKAGES:=kmod-acx-mac80211
+endef
+
+define Profile/Texas/Description
+   Package set compatible with hardware using Texas Instruments WiFi cards
+   using the mac80211 driver.
+endef
+$(eval $(call Profile,Texas))
+
diff --git a/target/linux/ar7/generic/profiles/210-None.mk 
b/target/linux/ar7/generic/profiles/210-None.mk
new file mode 100644
index 000..2fcfacd
--- /dev/null
+++ b/target/linux/ar7/generic/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/generic/target.mk 
b/target/linux/ar7/generic/target.mk
new file mode 100644
index 000..1595c1a
--- /dev/null
+++ b/target/linux/ar7/generic/target.mk
@@ -0,0 +1,10 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+
+SUBTARGET:=generic
+BOARDNAME:=Texas Instruments AR7 boards
+
+define Target/Description
+   Build firmware images for TI AR7 based routers.
+endef
diff --git a/target/linux/ar7/profiles/100-Annex-A.mk 
b/target/linux/ar7/profiles/100-Annex-A.mk
deleted file mode 100644
index 3d74b5d..000
--- a/target/linux/ar7/profiles/100-Annex-A.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2009 OpenWrt.org
-#
-# This is free so

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

2012-10-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

 create mode 100644 target/linux/ar7/ac49x/config-default
 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-default 
b/target/linux/ar7/ac49x/config-default
new file mode 100644
index 000..6c7e5fa
--- /dev/null
+++ b/target/linux/ar7/ac49x/config-default
@@ -0,0 +1,6 @@
+CONFIG_AR7_AC49X=y
+# CONFIG_AR7_TI is not set
+CONFIG_AR7_TYPE_AC49X=y
+# CONFIG_AR7_TYPE_TI is not set
+CONFIG_MTD_AC49X_PARTS=y
+# CONFIG_MTD_AR7_PARTS is not set
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



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


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

2012-10-17 Thread Daniel Golle

Signed-off-by: Daniel Golle 

diff --git a/target/linux/ar7/image/Makefile b/target/linux/ar7/image/Makefile
index 6278b31..fb42e42 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_TI),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_AR7_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



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


[OpenWrt-Devel] [PATCH] vlynq: fix typo in comment

2012-10-17 Thread Daniel Golle
I started reviewing the vlynq driver and found a small typo.

Signed-off-by: Daniel Golle 

--- a/drivers/vlynq/vlynq.c 2012-10-17 17:03:34.740744318 +0200
+++ b/drivers/vlynq/vlynq.c 2012-10-17 17:03:40.910744182 +0200
@@ -457,7 +457,7 @@
 /*
  * A VLYNQ remote device can clock the VLYNQ bus master
  * using a dedicated clock line. In that case, both the
- * remove device and the bus master should have the same
+ * remote device and the bus master should have the same
  * serial clock dividers configured. Iterate through the
  * 8 possible dividers until we actually link with the
  * device.


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


[OpenWrt-Devel] [PATCH] ixp4xx/cns3xxx: add rfkill module support

2012-10-17 Thread Tim Harvey
Both ixp4xx and cns3xxx targets support RFKILL in the kernel.
Also add a RFKILL_GPIO default for kernel config

Signed-off-by: Tim Harvey 
---
 package/kernel/modules/001-depends.mk |4 ++--
 package/kernel/modules/other.mk   |3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/kernel/modules/001-depends.mk 
b/package/kernel/modules/001-depends.mk
index 6c49301..e0af735 100644
--- a/package/kernel/modules/001-depends.mk
+++ b/package/kernel/modules/001-depends.mk
@@ -24,11 +24,11 @@ endef
 
 
 define SetDepends/rfkill
-  DEPENDS:= 
@(TARGET_ar71xx||TARGET_brcm47xx||TARGET_s3c24xx||TARGET_x86||TARGET_gemini)
+  DEPENDS:= 
@(TARGET_ar71xx||TARGET_brcm47xx||TARGET_s3c24xx||TARGET_x86||TARGET_gemini||TARGET_cns3xxx||TARGET_ixp4xx)
 endef
 
 define AddDepends/rfkill
-  DEPENDS+= 
+(TARGET_ar71xx||TARGET_brcm47xx||TARGET_s3c24xx||TARGET_x86):kmod-rfkill $(1)
+  DEPENDS+= 
+(TARGET_ar71xx||TARGET_brcm47xx||TARGET_s3c24xx||TARGET_x86||TARGET_cns3xxx||TARGET_ixp4xx):kmod-rfkill
 $(1)
 endef
 
 
diff --git a/package/kernel/modules/other.mk b/package/kernel/modules/other.mk
index 5761438..f370f65 100644
--- a/package/kernel/modules/other.mk
+++ b/package/kernel/modules/other.mk
@@ -363,7 +363,8 @@ define KernelPackage/rfkill
   KCONFIG:= \
 CONFIG_RFKILL \
 CONFIG_RFKILL_INPUT=y \
-CONFIG_RFKILL_LEDS=y
+CONFIG_RFKILL_LEDS=y \
+CONFIG_RFKILL_GPIO=y
   FILES:= \
 $(LINUX_DIR)/net/rfkill/rfkill.ko
   AUTOLOAD:=$(call AutoLoad,20,rfkill)
-- 
1.7.5.4

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


Re: [OpenWrt-Devel] [PATCH] [dnsmasq] Changed the init script to not check if dhcp-hostsfile exists as it may be used dynamically with a HUP signal

2012-10-17 Thread John Crispin

On 17/10/12 15:04, Alex Guerra wrote:

Signed-off-by: Alex Guerra
---
  .../network/services/dnsmasq/files/dnsmasq.init|2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init
b/package/network/services/dnsmasq/files/dnsmasq.init
index 85c22c3..2f81cef 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -131,7 +131,7 @@ dnsmasq() {
 config_get_bool cachelocal "$cfg" cachelocal 1

 config_get hostsfile "$cfg" dhcphostsfile
-   [ -e "$hostsfile" ]&&  xappend "--dhcp-hostsfile=$hostsfile"
+   [ -n "$hostsfile" ]&&  xappend "--dhcp-hostsfile=$hostsfile"

 local rebind
 config_get_bool rebind "$cfg" rebind_protection 1



the subject should be shorter and the currect subject should be moved to 
the description. also the description which is currently the subject is 
vague and not really consisent with what the patch does. the check is 
not removed but replced with a check that tests if the $hostsfile is set


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


Re: [OpenWrt-Devel] [PATCH] [dnsmasq] Parse the option 'conf_dir' in the init script

2012-10-17 Thread John Crispin

On 16/10/12 22:04, Jonh Wendell wrote:

Signed-off-by: Jonh Wendell mailto:jonh.wend...@oiwifi.com.br>>
---
  .../network/services/dnsmasq/files/dnsmasq.init|3 +++
  1 file changed, 3 insertions(+)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init
b/package/network/services/dnsmasq/files/dnsmasq.init
index 85c22c3..cb65bef 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -133,6 +133,9 @@ dnsmasq() {
  config_get hostsfile "$cfg" dhcphostsfile
  [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"

+config_get confdir "$cfg" conf_dir
+[ -d "$confdir" ] && xappend "--conf-dir=$confdir"
+
  local rebind
  config_get_bool rebind "$cfg" rebind_protection 1
  [ $rebind -gt 0 ] && {
--
1.7.9.5


--
Jonh Wendell
http://www.bani.com.br


patch fails to apply, please rebase and resend

error: patch failed: package/network/services/dnsmasq/files/dnsmasq.init:133
error: package/network/services/dnsmasq/files/dnsmasq.init: patch does 
not apply

Patch failed at 0001 Parse the option 'conf_dir' in the init script
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [dnsmasq] Parse the option 'conf_dir' in the init script

2012-10-17 Thread Jonh Wendell
sigh, tabs vs spaces issue I think...

attached is a version that applies fine in my trunk.
thanks!

2012/10/17 John Crispin 

> On 16/10/12 22:04, Jonh Wendell wrote:
>
>> Signed-off-by: Jonh Wendell > >
>>
>> ---
>>   .../network/services/dnsmasq/**files/dnsmasq.init|3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/package/network/services/**dnsmasq/files/dnsmasq.init
>> b/package/network/services/**dnsmasq/files/dnsmasq.init
>> index 85c22c3..cb65bef 100644
>> --- a/package/network/services/**dnsmasq/files/dnsmasq.init
>> +++ b/package/network/services/**dnsmasq/files/dnsmasq.init
>> @@ -133,6 +133,9 @@ dnsmasq() {
>>   config_get hostsfile "$cfg" dhcphostsfile
>>   [ -e "$hostsfile" ] && xappend "--dhcp-hostsfile=$hostsfile"
>>
>> +config_get confdir "$cfg" conf_dir
>> +[ -d "$confdir" ] && xappend "--conf-dir=$confdir"
>> +
>>   local rebind
>>   config_get_bool rebind "$cfg" rebind_protection 1
>>   [ $rebind -gt 0 ] && {
>> --
>> 1.7.9.5
>>
>>
>> --
>> Jonh Wendell
>> http://www.bani.com.br
>>
>
> patch fails to apply, please rebase and resend
>
> error: patch failed: package/network/services/**
> dnsmasq/files/dnsmasq.init:133
> error: package/network/services/**dnsmasq/files/dnsmasq.init: patch does
> not apply
> Patch failed at 0001 Parse the option 'conf_dir' in the init script
> __**_
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.**org 
> https://lists.openwrt.org/**mailman/listinfo/openwrt-devel
>



-- 
Jonh Wendell
http://www.bani.com.br


0001-dnsmasq-Parse-the-option-conf_dir-in-the-init-script.patch
Description: Binary data
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel