Re: [OpenWrt-Devel] [PATCH] resend: image build fix for siemens se515

2008-08-09 Thread Axel Gembe
Sven Bachmann wrote:
 This patch mainly fixes some CRCs for the CFE of the Siemens SE515.
 It also adds a target to set the firmware tag.
   
Yea, right :) Sorry for not replying earlier on the list.
This patch works good for me, so I just want to give an:

Acked-by: Axel Gembe [EMAIL PROTECTED]

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


[OpenWrt-Devel] [PATCH] brcm63xx: add image generation for many boards

2008-06-01 Thread Axel Gembe
This adds image generation for the following boards to the brcm63xx target:

BCM96335: 96335(R)
BCM96338: 96338(L-2M-8M|SV)
BCM96345: 96345(R|R0|RS|GW)
BCM96348: 96348(R|GW|GW-10|GW-11|GW-DualDSP|SV|LV)

The problem is that CFE checks for a matching board id before executing the
image, even if the image would run on all the devices using runtime detection.
We either need some kind of way to either patch CFE or find some loophole in it.
Otherwise we have to add every board id by hand, which wastes lots of space in
the image Makefile as well as on the filesystem for the generated images.
We also need a way to handle the flash block size for the generated image, but 
so
far I only had boards with a 64k erase block size.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 target/linux/brcm63xx/image/Makefile |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index 47c1df7..bb91310 100644
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -72,7 +72,25 @@ endef
 
 define Image/Build
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx -f 
$(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma $(call trxalign/$(1)) -f 
$(KDIR)/root.$(1)
+   # 6335 devices
+   $(call Image/Build/CFE,$(1),96335R,6335)
+   # 6338 devices
+   $(call Image/Build/CFE,$(1),96338L-2M-8M,6338)
+   $(call Image/Build/CFE,$(1),96338SV,6338)
+   # 6345 devices
+   $(call Image/Build/CFE,$(1),96345GW,6345)
$(call Image/Build/CFE,$(1),96345GW2,6345)
+   $(call Image/Build/CFE,$(1),96345R,6345)
+   $(call Image/Build/CFE,$(1),96345R0,6345)
+   $(call Image/Build/CFE,$(1),96345RS,6345)
+   # 6348 devices
+   $(call Image/Build/CFE,$(1),96348GW,6348)
+   $(call Image/Build/CFE,$(1),96348GW-10,6348)
+   $(call Image/Build/CFE,$(1),96348GW-11,6348)
+   $(call Image/Build/CFE,$(1),96348GW-DualDSP,6348)
+   $(call Image/Build/CFE,$(1),96348LV,6348)
+   $(call Image/Build/CFE,$(1),96348R,6348)
+   $(call Image/Build/CFE,$(1),96348SV,6348)
 endef
 
 $(eval $(call BuildImage))
-- 
1.5.5.1

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


Re: [OpenWrt-Devel] Fonera with OpenWRT Kamikaze and Fonera ath5k

2008-05-30 Thread Axel Gembe
ZioPRoTo (Saverio Proto) wrote:
 Is it yet possibile to use that driver and build the OpenWRT image for
 the Fonera ?
   
No, ath5k has to be changed to support the AHB bus.
But I'd also like to know if there is anything planned regarding this
cause MadWifi is now basically deprecated.

 - Axel





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


Re: [OpenWrt-Devel] Git repository for Linux kernel mainline merges

2008-05-23 Thread Axel Gembe
Gregers Petersen wrote:
 My comment was also a way towards: Ok if this should be done, then it 
 needs to be done in an unconfusing manner - with a bit of thought and 
 planning towards how such a git repository is to be integrated into what 
 is already there ;-)
I totally agree, using git without defining a good workflow is certain
disaster :)

 - Axel

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


Re: [OpenWrt-Devel] watchdog/crondog : (was Re: [PATCH 7/7] atheros: ar531x watchdog support)

2008-05-21 Thread Axel Gembe
Bastian Bittorf wrote:
 I forgot that to mention on wcw2008/berlin, but IMHO those
 hardware-watchdog are a nice-to-have but not really necessary.
 Practically i have never seen an router which totally hangs,
 so the hw-watchdog would'nt react...
   
Well, I had a quite few situations where I've shot a running system and 
was lucky to have it or had crashes in MadWifi, etc
I also never had a situation where the HW watchdog didn't react, but 
thats not surprising given that thats the whole point of having one.
 In Weimar we had _some_ situations, were do to memory-problems
 nearly all tasks were killed. Even sshd/dropbear and cron were
 killed. So sven-ola added an kernel-module named crondog, which
 is early loaded and not killed in lowmem situations.
 A cron-called-script has to do this regulary:

 test -e /dev/misc/crondog  echo  /dev/misc/crondog # sign of life

 If crond is'nt running anymore (and so the checkers cant check:
 is sshd running?, is httpd running?,...), then the device
 reboots hard.

 Maybe we can include this as a package in openWRT.
 Does anyone have enough skill the enhance the crondog.o-driver
 to be more platform independent, so we can include this as a
 package in menuconfig?
   
First, you can't guarantee which processes are killed by the oom-killer, 
so you might end up with dropbear killed and cron still running.
I think what you need is softdog. It is in the current kernels and does 
just that.
Just configure the watchdog program to check for whatever condition 
(i.e. pid files) you want.

 - Axel

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


Re: [OpenWrt-Devel] [PATCH 7/7] atheros: ar531x watchdog support

2008-05-20 Thread Axel Gembe
Frithjof Hammer wrote:
 Works fine for me.
   
Good to hear that. I really dislike targets without proper watchdog so I
hope this gets merged soon.
Can you post your /proc/cpuinfo ? I tested it on a 5315 as well as a
5313. I still wonder if it works on 5312.

- Axel


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


Re: [OpenWrt-Devel] [PATCH 5/7] atheros: console config override

2008-05-19 Thread Axel Gembe
Peter Korsgaard wrote:
 Why add these ifdefs just to change them again in the next patch in
 the series?
   
Those patches were meant to be squashed anyways. I just split them for 
ease of discussion.
Also I didn't know if both changes were wanted.

 - Axel

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


[OpenWrt-Devel] [PATCH 01/15] bcm963xx: fix load address / kernel entry

2008-05-18 Thread Axel Gembe
Current kernels have the same kernel entry as load address, so just set them
like this. Also, the BCM963xx uses 0x8001 as its load address, so use this
too.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 target/linux/brcm63xx/image/Makefile   |4 ++--
 .../linux/brcm63xx/image/lzma-loader/src/Makefile  |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index 16c57ca..227dbd7 100644
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -7,8 +7,8 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-LOADADDR = 0x8108c8f4  # RAM start + 16M 
-KERNEL_ENTRY = 0x8010  # Default kernel entry in arch/mips/Makefile
+LOADADDR = 0x8001  # RAM start + 16M 
+KERNEL_ENTRY = $(LOADADDR) # Newer kernels add a jmp to the kernel_entry 
at the start of the binary
 RAMSIZE = 0x0100   # 64MB
 
 LOADER_MAKEOPTS= \
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/Makefile 
b/target/linux/brcm63xx/image/lzma-loader/src/Makefile
index 85a8646..83e2c52 100644
--- a/target/linux/brcm63xx/image/lzma-loader/src/Makefile
+++ b/target/linux/brcm63xx/image/lzma-loader/src/Makefile
@@ -17,7 +17,7 @@
 #   Cleaned up, modified for lzma support, removed from kernel
 #
 
-TEXT_START := 0x80001000
+TEXT_START := 0x8001
 BZ_TEXT_START  := 0x8030
 
 OBJCOPY:= $(CROSS_COMPILE)objcopy -O binary -R .reginfo -R 
.note -R .comment -R .mdebug -S
-- 
1.5.5.1

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


[OpenWrt-Devel] [PATCH 02/15] bcm963xx: add cfe image tagging utility

2008-05-18 Thread Axel Gembe
This replaces the proprietary bcmImageBuilder program from the Broadcom source
drops. It basically adds a 256 bytes header in front of the kernel + rootfs
which contains a few text signatures, the locations of the data as well as the
checksums of the data and the tag. It also adds a 12 bytes header in front of
the LZMA kernel which contains the load address, kernel entry and the size of
the compressed LZMA data.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 tools/firmware-utils/Makefile   |1 +
 tools/firmware-utils/src/imagetag.c |  301 +++
 2 files changed, 302 insertions(+), 0 deletions(-)
 create mode 100644 tools/firmware-utils/src/imagetag.c

diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 3d8e9ea..acb429c 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -30,6 +30,7 @@ define Build/Compile
$(call cc,lzma2eva,-lz)
$(call cc,mkcasfw)
$(call cc,mkfwimage,-lz)
+   $(call cc,imagetag)
 endef
 
 define Build/Install
diff --git a/tools/firmware-utils/src/imagetag.c 
b/tools/firmware-utils/src/imagetag.c
new file mode 100644
index 000..04b1f48
--- /dev/null
+++ b/tools/firmware-utils/src/imagetag.c
@@ -0,0 +1,301 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2008 Axel Gembe [EMAIL PROTECTED]
+ */
+
+#include stdio.h
+#include stdlib.h
+#include string.h
+#include stdint.h
+#include time.h
+#include unistd.h
+#include sys/stat.h
+#include netinet/in.h
+
+#define IMAGETAG_MAGIC1OpenWRT BCM963xx
+#define IMAGETAG_MAGIC2V1
+#define IMAGETAG_VER   6
+#define IMAGETAG_DEFAULT_LOADADDR  0x8001
+#define IMAGETAG_CRC_START 0x
+#define FLASH_CFE_SIZE 0x1 /* TODO: Make 
this a command line option */
+#define FLASH_START0xBFC0  /* TODO: Make 
this a command line option */
+#define FLASH_BS   (64 * 1024) /* TODO: Make 
this a command line option */
+
+/* Kernel header */
+struct kernelhdr {
+   uint32_tloadaddr;   /* Kernel load address */
+   uint32_tentry;  /* Kernel entry point address */
+   uint32_tlzmalen;/* Compressed length of the 
LZMA data that follows */
+};
+
+/* Image component */
+struct imagecomp {
+   uint8_t address[12];/* Address of this component as 
ASCII */
+   uint8_t len[10];/* Length of this component as 
ASCII */
+};
+
+/* Image tag */
+struct imagetag {
+   uint8_t tagver[4];  /*   0 -   3: Version of the 
tag as ASCII (2) */
+   uint8_t sig1[20];   /*   4 -  23: BCM_MAGIC_1 */
+   uint8_t sig2[14];   /*  24 -  37: BCM_MAGIC_2 */
+   uint8_t chipid[6];  /*  38 -  43: Chip id as ASCII 
(6345) */
+   uint8_t boardid[16];/*  44 -  59: Board id as ASCII 
(96345GW2, etc...) */
+   uint8_t bigendian[2];   /*  60 -  61: 1 for big 
endian, 0 for little endian */
+   uint8_t imagelen[10];   /*  62 -  71: The length of all 
data that follows */
+   struct imagecompcfe;/*  72 -  93: The offset and 
length of CFE */
+   struct imagecomprootfs; /*  94 - 115: The offset and 
length of the root file system */
+   struct imagecompkernel; /* 116 - 137: The offset and 
length of the kernel */
+   uint8_t dualimage[2];   /* 138 - 139: use 0 here */
+   uint8_t inactive[2];/* 140 - 141: use 0 here */
+   uint8_t reserved1[74];  /* 142 - 215: reserved */
+   uint32_timagecrc;   /* 216 - 219: crc of the images 
(net byte order) */
+   uint8_t reserved2[16];  /* 220 - 235: reserved */
+   uint32_theadercrc;  /* 236 - 239: crc starting from 
sig1 until headercrc (net byte order) */
+   uint8_t reserved3[16];  /* 240 - 255: reserved */
+};
+
+static uint32_t crc32tab[256] = {
+   0x, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 
0xE963A535, 0x9E6495A3,
+   0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 
0xE7B82D07, 0x90BF1D91,
+   0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 
0xF4D4B551, 0x83D385C7,
+   0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 
0xFA0F3D63, 0x8D080DF5,
+   0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 
0xD20D85FD, 0xA50AB56B,
+   0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6

[OpenWrt-Devel] [PATCH 06/15] bcm963xx: board support

2008-05-18 Thread Axel Gembe

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 .../brcm63xx/patches-2.6.25/001-bcm963xx.patch |  182 
 1 files changed, 182 insertions(+), 0 deletions(-)
 create mode 100644 target/linux/brcm63xx/patches-2.6.25/001-bcm963xx.patch

diff --git a/target/linux/brcm63xx/patches-2.6.25/001-bcm963xx.patch 
b/target/linux/brcm63xx/patches-2.6.25/001-bcm963xx.patch
new file mode 100644
index 000..530c145
--- /dev/null
+++ b/target/linux/brcm63xx/patches-2.6.25/001-bcm963xx.patch
@@ -0,0 +1,182 @@
+From 2b2b8e163d28646cbbfde81c900fbb57d6572a11 Mon Sep 17 00:00:00 2001
+From: Axel Gembe [EMAIL PROTECTED]
+Date: Thu, 15 May 2008 11:00:43 +0200
+Subject: [PATCH] bcm963xx: board support
+
+
+Signed-off-by: Axel Gembe [EMAIL PROTECTED]
+---
+ arch/mips/Kconfig|   11 +++
+ arch/mips/Makefile   |4 
+ arch/mips/kernel/cpu-probe.c |   16 
+ arch/mips/mm/c-r4k.c |7 +++
+ arch/mips/mm/tlbex.c |4 
+ arch/mips/pci/Makefile   |1 +
+ include/asm-mips/bootinfo.h  |   12 
+ include/asm-mips/cpu.h   |7 ++-
+ 8 files changed, 61 insertions(+), 1 deletions(-)
+
+diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
+index 8724ed3..1b1c4bf 100644
+--- a/arch/mips/Kconfig
 b/arch/mips/Kconfig
+@@ -59,6 +59,17 @@ config BCM47XX
+   help
+Support for BCM47XX based boards
+ 
++config BCM963XX
++   bool Support for Broadcom BCM963xx SoC
++   select SYS_SUPPORTS_32BIT_KERNEL
++   select SYS_SUPPORTS_BIG_ENDIAN
++   select SYS_HAS_CPU_MIPS32_R1
++   select HW_HAS_PCI
++   select DMA_NONCOHERENT
++   select IRQ_CPU
++   help
++ This is a fmaily of boards based on the Broadcom MIPS32
++
+ config MIPS_COBALT
+   bool Cobalt Server
+   select CEVT_R4K
+diff --git a/arch/mips/Makefile b/arch/mips/Makefile
+index 1c62381..16a29e1 100644
+--- a/arch/mips/Makefile
 b/arch/mips/Makefile
+@@ -560,6 +560,10 @@ core-$(CONFIG_BCM47XX)+= arch/mips/bcm47xx/
+ cflags-$(CONFIG_BCM47XX)  += -Iinclude/asm-mips/mach-bcm47xx
+ load-$(CONFIG_BCM47XX):= 0x80001000
+ 
++core-$(CONFIG_BCM963XX)   += arch/mips/bcm963xx/
++cflags-$(CONFIG_BCM963XX) += -Iinclude/asm-mips/mach-bcm963xx
++load-$(CONFIG_BCM963XX)   := 0x8001000
++
+ #
+ # SNI RM
+ #
+diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
+index 89c3304..6706a07 100644
+--- a/arch/mips/kernel/cpu-probe.c
 b/arch/mips/kernel/cpu-probe.c
+@@ -803,6 +803,18 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips 
*c)
+   case PRID_IMP_BCM4710:
+   c-cputype = CPU_BCM4710;
+   break;
++//case PRID_IMP_BCM6338:
++//c-cputype = CPU_BCM6338;
++//break;
++  case PRID_IMP_BCM6345:
++  c-cputype = CPU_BCM6345;
++  break;
++  case PRID_IMP_BCM6348:
++  c-cputype = CPU_BCM6348;
++  break;
++  case PRID_IMP_BCM6358:
++  c-cputype = CPU_BCM6358;
++  break;
+   default:
+   c-cputype = CPU_UNKNOWN;
+   break;
+@@ -887,6 +899,10 @@ static __cpuinit const char *cpu_to_name(struct 
cpuinfo_mips *c)
+   case CPU_SR71000:   name = Sandcraft SR71000; break;
+   case CPU_BCM3302:   name = Broadcom BCM3302; break;
+   case CPU_BCM4710:   name = Broadcom BCM4710; break;
++  case CPU_BCM6338:   name = Broadcom BCM6338; break;
++  case CPU_BCM6345:   name = Broadcom BCM6345; break;
++  case CPU_BCM6348:   name = Broadcom BCM6348; break;
++  case CPU_BCM6358:   name = Broadcom BCM6358; break;
+   case CPU_PR4450:name = Philips PR4450; break;
+   case CPU_LOONGSON2: name = ICT Loongson-2; break;
+   default:
+diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
+index 77aefb4..23a67cb 100644
+--- a/arch/mips/mm/c-r4k.c
 b/arch/mips/mm/c-r4k.c
+@@ -882,6 +882,13 @@ static void __cpuinit probe_pcache(void)
+   if (!(config  MIPS_CONF_M))
+   panic(Don't know how to probe P-caches on this cpu.);
+ 
++  if (c-cputype == CPU_BCM6338 || c-cputype == CPU_BCM6345 || 
c-cputype == CPU_BCM6348 || c-cputype == CPU_BCM6358)
++  {
++  printk(bcm963xx: enabling icache and dcache...\n);
++  /* Enable caches */
++  write_c0_diag(read_c0_diag() | 0xC000);
++  }
++
+   /*
+* So we seem to be a MIPS32 or MIPS64 CPU
+* So let's probe the I-cache ...
+diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
+index 382738c..b3b6120 100644
+--- a/arch/mips/mm/tlbex.c
 b/arch/mips/mm/tlbex.c
+@@ -315,6 +315,10 @@ static void __cpuinit build_tlb_write_entry(u32 **p, 
struct uasm_label **l,
+   case CPU_25KF

[OpenWrt-Devel] [PATCH 08/15] bcm963xx: flashmap support

2008-05-18 Thread Axel Gembe

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 .../patches-2.6.25/040-bcm963xx_flashmap.patch |   82 
 1 files changed, 82 insertions(+), 0 deletions(-)
 create mode 100644 
target/linux/brcm63xx/patches-2.6.25/040-bcm963xx_flashmap.patch

diff --git a/target/linux/brcm63xx/patches-2.6.25/040-bcm963xx_flashmap.patch 
b/target/linux/brcm63xx/patches-2.6.25/040-bcm963xx_flashmap.patch
new file mode 100644
index 000..193eb32
--- /dev/null
+++ b/target/linux/brcm63xx/patches-2.6.25/040-bcm963xx_flashmap.patch
@@ -0,0 +1,82 @@
+From e734ace5baa04e0e8af1d4483475fbd6bd2b32a1 Mon Sep 17 00:00:00 2001
+From: Axel Gembe [EMAIL PROTECTED]
+Date: Mon, 12 May 2008 18:54:09 +0200
+Subject: [PATCH] bcm963xx: flashmap support
+
+
+Signed-off-by: Axel Gembe [EMAIL PROTECTED]
+---
+ drivers/mtd/maps/Kconfig  |7 +++
+ drivers/mtd/maps/Makefile |1 +
+ drivers/mtd/redboot.c |   13 ++---
+ 3 files changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
+index 12c2536..38b8d94 100644
+--- a/drivers/mtd/maps/Kconfig
 b/drivers/mtd/maps/Kconfig
+@@ -262,6 +262,13 @@ config MTD_MTX1
+ Flash memory access on 4G Systems MTX-1 Board. If you have one of
+ these boards and would like to use the flash chips on it, say 'Y'.
+ 
++config MTD_BCM963XX
++tristate BCM963xx Flash device
++depends on MIPS  BCM963XX
++help
++Flash memory access on BCM963xx boards. Currently only works with
++RedBoot and CFE.
++
+ config MTD_DILNETPC
+   tristate CFI Flash device mapped on DIL/Net PC
+   depends on X86  MTD_CONCAT  MTD_PARTITIONS  MTD_CFI_INTELEXT
+diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
+index a9cbe80..e2c10be 100644
+--- a/drivers/mtd/maps/Makefile
 b/drivers/mtd/maps/Makefile
+@@ -68,3 +68,4 @@ obj-$(CONFIG_MTD_PLATRAM)+= plat-ram.o
+ obj-$(CONFIG_MTD_OMAP_NOR)+= omap_nor.o
+ obj-$(CONFIG_MTD_MTX1)+= mtx-1_flash.o
+ obj-$(CONFIG_MTD_INTEL_VR_NOR)+= intel_vr_nor.o
++obj-$(CONFIG_MTD_BCM963XX)+= bcm963xx-flash.o
+diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
+index 4747490..4f500af 100644
+--- a/drivers/mtd/redboot.c
 b/drivers/mtd/redboot.c
+@@ -39,7 +39,7 @@ static inline int redboot_checksum(struct fis_image_desc 
*img)
+   return 1;
+ }
+ 
+-static int parse_redboot_partitions(struct mtd_info *master,
++int parse_redboot_partitions(struct mtd_info *master,
+  struct mtd_partition **pparts,
+  unsigned long fis_origin)
+ {
+@@ -161,6 +161,14 @@ static int parse_redboot_partitions(struct mtd_info 
*master,
+   goto out;
+   }
+ 
++  if (!fis_origin) {
++  for (i = 0; i  numslots; i++) {
++  if (!strncmp(buf[i].name, RedBoot, 8)) {
++  fis_origin = (buf[i].flash_base  (master-size 
 1) - 1);
++  }
++  }
++  }
++
+   for (i = 0; i  numslots; i++) {
+   struct fis_list *new_fl, **prev;
+ 
+@@ -183,9 +191,8 @@ static int parse_redboot_partitions(struct mtd_info 
*master,
+   new_fl-img = buf[i];
+ if (fis_origin) {
+ buf[i].flash_base -= fis_origin;
+-} else {
+-buf[i].flash_base = master-size-1;
+ }
++  buf[i].flash_base = (master-size  1) - 1;
+ 
+   /* I'm sure the JFFS2 code has done me permanent damage.
+* I now think the following is _normal_
+-- 
+1.5.5.1
+
-- 
1.5.5.1

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


[OpenWrt-Devel] [PATCH 14/15] bcm963xx: fix cfe detection

2008-05-18 Thread Axel Gembe
The CFE detection failed to account for zero termination.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 .../110-bcm963xx_fix_cfe_detection.patch   |   46 
 1 files changed, 46 insertions(+), 0 deletions(-)
 create mode 100644 
target/linux/brcm63xx/patches-2.6.25/110-bcm963xx_fix_cfe_detection.patch

diff --git 
a/target/linux/brcm63xx/patches-2.6.25/110-bcm963xx_fix_cfe_detection.patch 
b/target/linux/brcm63xx/patches-2.6.25/110-bcm963xx_fix_cfe_detection.patch
new file mode 100644
index 000..dcc92ee
--- /dev/null
+++ b/target/linux/brcm63xx/patches-2.6.25/110-bcm963xx_fix_cfe_detection.patch
@@ -0,0 +1,46 @@
+From f1a605c36cf1659f5f486ae4135de1e285fdf86c Mon Sep 17 00:00:00 2001
+From: Axel Gembe [EMAIL PROTECTED]
+Date: Sat, 17 May 2008 16:17:22 +0200
+Subject: [PATCH] bcm963xx: fix cfe detection
+
+The CFE detection failed to account for zero termination.
+
+Signed-off-by: Axel Gembe [EMAIL PROTECTED]
+---
+ drivers/mtd/maps/bcm963xx-flash.c |   11 ++-
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/mtd/maps/bcm963xx-flash.c 
b/drivers/mtd/maps/bcm963xx-flash.c
+index c4c4526..4da672b 100644
+--- a/drivers/mtd/maps/bcm963xx-flash.c
 b/drivers/mtd/maps/bcm963xx-flash.c
+@@ -1,8 +1,7 @@
+ /*
+- * $Id$
+  * Copyright (C) 2006  Florian Fainelli [EMAIL PROTECTED]
+- *Mike Albon [EMAIL PROTECTED]
+- * Copyright (C) $Date$  $Author$
++ * Mike Albon [EMAIL PROTECTED]
++ * Copyright (C) 2008  Axel Gembe [EMAIL PROTECTED]
+  *
+  * 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
+@@ -184,11 +183,13 @@ static int bcm963xx_parts_size = sizeof(bcm963xx_parts) 
/ sizeof(bcm963xx_parts[
+ static int bcm963xx_detect_cfe(struct mtd_info *master)
+ {
+int idoffset = 0x4e0;
+-   static char idstring[8] = CFE1CFE1;
+-   char buf[8];
++   static char idstring[9] = CFE1CFE1;
++   char buf[9];
+int ret;
+size_t retlen;
+ 
++   memset(buf, 0, sizeof(buf));
++
+ret = master-read(master, idoffset, 8, retlen, (void *)buf);
+printk(bcm963xx: Read Signature value of %s\n, buf);
+return strcmp(idstring,buf);
+-- 
+1.5.5.1
+
-- 
1.5.5.1

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


Re: [OpenWrt-Devel] [PATCH 2/2] madwifi: make hal, bus and rate control configurable

2008-05-18 Thread Axel Gembe
Felix Fietkau wrote:
 I know the patch has been merged, but I'd still like to know: What would 
 that be useful for? Just a hint: The next public HAL release will support 
 all 5312+ and 2315+ SoC with a single binary. It seems to me that this adds 
 unnecessary configuration complexity.
   
If this really bugs you, remove it. I can manage to have a local branch
with just AP43, but its not for the average user.
You're right about that it is unnecessary when the next HAL will support
all SoCs, I didn't know about this.
I mainly needed this for a DWL2100-AP which uses AP43.
Anyways, I still think the rate control configuration is useful for
experimenting with it.

 - Axel

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


[OpenWrt-Devel] [PATCH 3/5] bcm963xx: remove obsolete timer code

2008-05-14 Thread Axel Gembe
This removes some code that has been deprecated in kernels = 2.6.24.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 .../060-bcm963xx_remove_obsolete_timer_code.patch  |   59 
 1 files changed, 59 insertions(+), 0 deletions(-)
 create mode 100644 
target/linux/brcm63xx/patches/060-bcm963xx_remove_obsolete_timer_code.patch

diff --git 
a/target/linux/brcm63xx/patches/060-bcm963xx_remove_obsolete_timer_code.patch 
b/target/linux/brcm63xx/patches/060-bcm963xx_remove_obsolete_timer_code.patch
new file mode 100644
index 000..79b4cd6
--- /dev/null
+++ 
b/target/linux/brcm63xx/patches/060-bcm963xx_remove_obsolete_timer_code.patch
@@ -0,0 +1,59 @@
+From b1f0b1cf172caaa4003365bc39577a58758f07e1 Mon Sep 17 00:00:00 2001
+From: Axel Gembe [EMAIL PROTECTED]
+Date: Wed, 14 May 2008 00:25:28 +0200
+Subject: [PATCH 5/8] bcm963xx: remove obsolete timer code
+
+This removes some code that has been deprecated in kernels = 2.6.24.
+
+Signed-off-by: Axel Gembe [EMAIL PROTECTED]
+---
+ arch/mips/bcm963xx/time.c |   29 -
+ 1 files changed, 0 insertions(+), 29 deletions(-)
+
+diff --git a/arch/mips/bcm963xx/time.c b/arch/mips/bcm963xx/time.c
+index fa0fa71..8a5007e 100644
+--- a/arch/mips/bcm963xx/time.c
 b/arch/mips/bcm963xx/time.c
+@@ -71,26 +71,6 @@ static inline unsigned long __init cal_r4koff(void)
+   return (mips_hpt_frequency / HZ);
+ }
+ 
+-
+-/*
+- * There are a lot of conceptually broken versions of the MIPS timer interrupt
+- * handler floating around.  This one is rather different, but the algorithm
+- * is provably more robust.
+- */
+-#if 0
+-irqreturn_t brcm_timer_interrupt(struct pt_regs *regs)
+-{
+-  int irq = MIPS_TIMER_INT;
+-
+-  irq_enter();
+-  kstat_this_cpu.irqs[irq]++;
+-
+-  timer_interrupt(irq, regs);
+-  irq_exit();
+-  return IRQ_HANDLED;
+-}
+-#endif
+-
+ void __init plat_time_init(void)
+ {
+   unsigned int est_freq, flags;
+@@ -107,12 +87,3 @@ void __init plat_time_init(void)
+  (est_freq % 100) * 100 / 100);
+   local_irq_restore(flags);
+ }
+-
+-#if 0
+-void __init plat_timer_setup(struct irqaction *irq)
+-{
+-  r4k_cur = (read_c0_count() + r4k_offset);
+-  write_c0_compare(r4k_cur);
+-  set_c0_status(IE_IRQ5);
+-}
+-#endif
+-- 
+1.5.5.1
+
-- 
1.5.5.1

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


[OpenWrt-Devel] [PATCH 5/7] atheros: console config override

2008-05-07 Thread Axel Gembe
This patch makes it possible to override the console kernel command line
option by passing a command line to the kernel. It basically removes the
console option from the default command line and adds it at runtime in
prom_init when console= was not yet specified.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 target/linux/atheros/config-2.6.23 |2 +-
 target/linux/atheros/config-2.6.24 |2 +-
 target/linux/atheros/config-2.6.25 |2 +-
 .../linux/atheros/files/arch/mips/atheros/prom.c   |6 ++
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/target/linux/atheros/config-2.6.23 
b/target/linux/atheros/config-2.6.23
index 5d299d9..1497f7c 100644
--- a/target/linux/atheros/config-2.6.23
+++ b/target/linux/atheros/config-2.6.23
@@ -13,7 +13,7 @@ CONFIG_BASE_SMALL=0
 CONFIG_BITREVERSE=y
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_BT is not set
-CONFIG_CMDLINE=console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit
+CONFIG_CMDLINE=rootfstype=squashfs,jffs2 init=/etc/preinit
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_PREFETCH=y
diff --git a/target/linux/atheros/config-2.6.24 
b/target/linux/atheros/config-2.6.24
index db6196f..3916e64 100644
--- a/target/linux/atheros/config-2.6.24
+++ b/target/linux/atheros/config-2.6.24
@@ -16,7 +16,7 @@ CONFIG_BITREVERSE=y
 # CONFIG_BROADCOM_PHY is not set
 # CONFIG_BT is not set
 CONFIG_CEVT_R4K=y
-CONFIG_CMDLINE=console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit
+CONFIG_CMDLINE=rootfstype=squashfs,jffs2 init=/etc/preinit
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_PREFETCH=y
diff --git a/target/linux/atheros/config-2.6.25 
b/target/linux/atheros/config-2.6.25
index 4b97840..50aad1c 100644
--- a/target/linux/atheros/config-2.6.25
+++ b/target/linux/atheros/config-2.6.25
@@ -18,7 +18,7 @@ CONFIG_BITREVERSE=y
 # CONFIG_BT is not set
 CONFIG_CEVT_R4K=y
 CONFIG_CLASSIC_RCU=y
-CONFIG_CMDLINE=console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit
+CONFIG_CMDLINE=rootfstype=squashfs,jffs2 init=/etc/preinit
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_PREFETCH=y
diff --git a/target/linux/atheros/files/arch/mips/atheros/prom.c 
b/target/linux/atheros/files/arch/mips/atheros/prom.c
index 82617cd..2f2da0c 100644
--- a/target/linux/atheros/files/arch/mips/atheros/prom.c
+++ b/target/linux/atheros/files/arch/mips/atheros/prom.c
@@ -8,6 +8,7 @@
  * Copyright (C) 2006 FON Technology, SL.
  * Copyright (C) 2006 Imre Kaloz [EMAIL PROTECTED]
  * Copyright (C) 2006 Felix Fietkau [EMAIL PROTECTED]
+ * Copyright (C) 2008 Axel Gembe [EMAIL PROTECTED]
  */
 
 /*
@@ -27,7 +28,9 @@
 
 void __init prom_init(void)
 {
+#if 0
char **argv;
+#endif
 
mips_machtype = -1;
 
@@ -38,6 +41,9 @@ void __init prom_init(void)
/* RedBoot desired command line is argv[1] */
strcat(arcs_cmdline, argv[1]);
 #endif
+   /* Default console speed is 9600 baud */
+   if (strstr(arcs_cmdline, console=) == NULL)
+   strcat(arcs_cmdline,  console=ttyS0,9600);
 }
 
 void __init prom_free_prom_memory(void)
-- 
1.5.5.1

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


[OpenWrt-Devel] [PATCH 7/7] atheros: ar531x watchdog support

2008-05-07 Thread Axel Gembe
Atheros AR531X (Generic) watchdog support code (based on ar7_wdt.c). This
watchdog should work on most AR5315 / AR5312 devices. I've personally tested it
on La Fonera and D-Link DWL-2100AP. Please note that the DWL-2100AP uses a
slightly faster clock for its watchdog, see the source files.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 target/linux/atheros/config-2.6.23 |1 +
 target/linux/atheros/config-2.6.24 |1 +
 target/linux/atheros/config-2.6.25 |1 +
 .../files/drivers/char/watchdog/ar531x_wdt.c   |  326 
 .../atheros/files/drivers/watchdog/ar531x_wdt.c|  326 
 .../include/asm-mips/mach-atheros/ar5315/ar5315.h  |1 +
 .../atheros/patches-2.6.23/160-watchdog.patch  |   35 ++
 .../atheros/patches-2.6.24/160-watchdog.patch  |   35 ++
 .../atheros/patches-2.6.25/160-watchdog.patch  |   35 ++
 9 files changed, 761 insertions(+), 0 deletions(-)
 create mode 100644 
target/linux/atheros/files/drivers/char/watchdog/ar531x_wdt.c
 create mode 100644 target/linux/atheros/files/drivers/watchdog/ar531x_wdt.c
 create mode 100644 target/linux/atheros/patches-2.6.23/160-watchdog.patch
 create mode 100644 target/linux/atheros/patches-2.6.24/160-watchdog.patch
 create mode 100644 target/linux/atheros/patches-2.6.25/160-watchdog.patch

diff --git a/target/linux/atheros/config-2.6.23 
b/target/linux/atheros/config-2.6.23
index e1694ba..4876047 100644
--- a/target/linux/atheros/config-2.6.23
+++ b/target/linux/atheros/config-2.6.23
@@ -8,6 +8,7 @@ CONFIG_AR2313=y
 CONFIG_ATHEROS=y
 CONFIG_ATHEROS_AR5312=y
 CONFIG_ATHEROS_AR5315=y
+CONFIG_ATHEROS_WDT=y
 # CONFIG_ATM is not set
 CONFIG_BASE_SMALL=0
 CONFIG_BITREVERSE=y
diff --git a/target/linux/atheros/config-2.6.24 
b/target/linux/atheros/config-2.6.24
index 848f459..ef34de9 100644
--- a/target/linux/atheros/config-2.6.24
+++ b/target/linux/atheros/config-2.6.24
@@ -9,6 +9,7 @@ CONFIG_ARCH_SUPPORTS_OPROFILE=y
 CONFIG_ATHEROS=y
 CONFIG_ATHEROS_AR5312=y
 CONFIG_ATHEROS_AR5315=y
+CONFIG_ATHEROS_WDT=y
 # CONFIG_ATM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_BCM47XX is not set
diff --git a/target/linux/atheros/config-2.6.25 
b/target/linux/atheros/config-2.6.25
index fc1cda4..39e31b2 100644
--- a/target/linux/atheros/config-2.6.25
+++ b/target/linux/atheros/config-2.6.25
@@ -10,6 +10,7 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ATHEROS=y
 CONFIG_ATHEROS_AR5312=y
 CONFIG_ATHEROS_AR5315=y
+CONFIG_ATHEROS_WDT=y
 # CONFIG_ATM is not set
 CONFIG_BASE_SMALL=0
 # CONFIG_BCM47XX is not set
diff --git a/target/linux/atheros/files/drivers/char/watchdog/ar531x_wdt.c 
b/target/linux/atheros/files/drivers/char/watchdog/ar531x_wdt.c
new file mode 100644
index 000..16c0eea
--- /dev/null
+++ b/target/linux/atheros/files/drivers/char/watchdog/ar531x_wdt.c
@@ -0,0 +1,326 @@
+/*
+ * drivers/watchdog/ar531x_wdt.c
+ *
+ * Atheros 531x Watchdog Timer support
+ *
+ * Copyright (C) 2008 Axel Gembe [EMAIL PROTECTED]
+ *
+ * Some base code taken from:
+ * OpenWRT AR7 watchdog driver
+ * Copyright (C) 2007 Nicolas Thill [EMAIL PROTECTED]
+ * Copyright (C) 2005 Enrik Berkhan [EMAIL PROTECTED]
+ * Copyright (C) 2001, 2002 Christer Weinigel [EMAIL PROTECTED]
+ *
+ * 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/module.h
+#include linux/moduleparam.h
+#include linux/errno.h
+#include linux/init.h
+#include linux/miscdevice.h
+#include linux/watchdog.h
+#include linux/notifier.h
+#include linux/reboot.h
+#include linux/fs.h
+#include linux/ioport.h
+#include linux/io.h
+#include linux/uaccess.h
+#include linux/interrupt.h
+
+#include asm/addrspace.h
+#include asm/mach-atheros/ar531x.h
+
+#define DRVNAME ar531x_wdt
+#define LONGNAME Atheros 531x Watchdog Timer
+
+MODULE_AUTHOR(Axel Gembe [EMAIL PROTECTED]);
+MODULE_DESCRIPTION(LONGNAME);
+MODULE_LICENSE(GPL);
+MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
+
+static int margin = 60;
+module_param(margin, int, 0);
+MODULE_PARM_DESC(margin, Watchdog margin in seconds);
+
+/*
+   I found these clock rates so far:
+   48MHz   -   DLink DWL-2100AP
+   40MHz   -   Meraki
+*/
+
+static int wdtclock = 4000; /* 40MHz */
+module_param(wdtclock, int, 0);
+MODULE_PARM_DESC(wdtclock, Watchdog clock in hertz);
+
+static int nowayout

[OpenWrt-Devel] [PATCH 4/7] atheros: kgdb support

2008-05-07 Thread Axel Gembe
Atheros supports KGDB using the generic KGDB MIPS support. We can use the 
generic
serial functions because the Atheros boards have a standard serial port.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 .../linux/atheros/patches-2.6.23/100-board.patch   |   41 ++--
 .../linux/atheros/patches-2.6.24/100-board.patch   |   51 
 .../linux/atheros/patches-2.6.25/100-board.patch   |   38 +--
 3 files changed, 78 insertions(+), 52 deletions(-)

diff --git a/target/linux/atheros/patches-2.6.23/100-board.patch 
b/target/linux/atheros/patches-2.6.23/100-board.patch
index 28509a3..92b6358 100644
--- a/target/linux/atheros/patches-2.6.23/100-board.patch
+++ b/target/linux/atheros/patches-2.6.23/100-board.patch
@@ -1,7 +1,14 @@
-diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
 linux.old/arch/mips/Kconfig2007-02-02 23:55:52.912446784 +0100
-+++ linux.dev/arch/mips/Kconfig2007-02-03 21:50:25.262027104 +0100
-@@ -44,6 +44,16 @@
+commit 5bf3d96b88068651524a3543ce282c2b9506dca3
+Author: Axel Gembe [EMAIL PROTECTED]
+Date:   Wed May 7 10:15:44 2008 +0200
+
+100-board.patch
+
+diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
+index 3b807b4..7d04ec3 100644
+--- a/arch/mips/Kconfig
 b/arch/mips/Kconfig
+@@ -44,6 +44,17 @@ config BASLER_EXCITE_PROTOTYPE
  note that a kernel built with this option selected will not be
  able to run on normal units.
  
@@ -13,12 +20,13 @@ diff -urN linux.old/arch/mips/Kconfig 
linux.dev/arch/mips/Kconfig
 +  select SYS_HAS_CPU_MIPS32_R1
 +  select SYS_SUPPORTS_BIG_ENDIAN
 +  select SYS_SUPPORTS_32BIT_KERNEL
++  select SYS_SUPPORTS_KGDB
 +  select GENERIC_GPIO
 +
  config MIPS_COBALT
bool Cobalt Server
select DMA_NONCOHERENT
-@@ -597,6 +607,7 @@
+@@ -597,6 +608,7 @@ config WR_PPMC
  
  endchoice
  
@@ -26,10 +34,11 @@ diff -urN linux.old/arch/mips/Kconfig 
linux.dev/arch/mips/Kconfig
  source arch/mips/au1000/Kconfig
  source arch/mips/jazz/Kconfig
  source arch/mips/pmc-sierra/Kconfig
-diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
 linux.old/arch/mips/Makefile   2007-02-02 23:55:52.913446632 +0100
-+++ linux.dev/arch/mips/Makefile   2007-02-03 17:40:29.193776000 +0100
-@@ -267,6 +267,13 @@
+diff --git a/arch/mips/Makefile b/arch/mips/Makefile
+index 32c1c8f..4231a9a 100644
+--- a/arch/mips/Makefile
 b/arch/mips/Makefile
+@@ -270,6 +270,13 @@ libs-$(CONFIG_MIPS_XXS1500)   += 
arch/mips/au1000/xxs1500/
  load-$(CONFIG_MIPS_XXS1500)   += 0x8010
  
  #
@@ -43,12 +52,13 @@ diff -urN linux.old/arch/mips/Makefile 
linux.dev/arch/mips/Makefile
  # Cobalt Server
  #
  core-$(CONFIG_MIPS_COBALT)+= arch/mips/cobalt/
-diff -urN linux.old/include/asm-mips/bootinfo.h 
linux.dev/include/asm-mips/bootinfo.h
 linux.old/include/asm-mips/bootinfo.h  2007-02-02 23:55:52.913446632 
+0100
-+++ linux.dev/include/asm-mips/bootinfo.h  2007-02-03 17:51:02.531494032 
+0100
-@@ -213,6 +213,18 @@
- #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */
- #define  MACH_NEC_MARKEINS0   /* NEC EMMA2RH Mark-eins*/
+diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h
+index c0f052b..29be9e6 100644
+--- a/include/asm-mips/bootinfo.h
 b/include/asm-mips/bootinfo.h
+@@ -208,6 +208,18 @@
+ #define MACH_GROUP_WINDRIVER   28 /* Windriver boards */
+ #define MACH_WRPPMC 1
  
 +/*
 + * Valid machtype for group ATHEROS
@@ -65,4 +75,3 @@ diff -urN linux.old/include/asm-mips/bootinfo.h 
linux.dev/include/asm-mips/booti
  #define CL_SIZE   COMMAND_LINE_SIZE
  
  const char *get_system_type(void);
-
diff --git a/target/linux/atheros/patches-2.6.24/100-board.patch 
b/target/linux/atheros/patches-2.6.24/100-board.patch
index f1a0d06..3a37295 100644
--- a/target/linux/atheros/patches-2.6.24/100-board.patch
+++ b/target/linux/atheros/patches-2.6.24/100-board.patch
@@ -1,9 +1,16 @@
-diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
 linux.old/arch/mips/Kconfig2007-02-02 23:55:52.912446784 +0100
-+++ linux.dev/arch/mips/Kconfig2007-02-03 21:50:25.262027104 +0100
-@@ -45,6 +45,18 @@
- note that a kernel built with this option selected will not be
- able to run on normal units.
+commit a57d9b35069c0c61ca2d24a4e135d2bb2d10
+Author: Axel Gembe [EMAIL PROTECTED]
+Date:   Wed May 7 10:27:14 2008 +0200
+
+100-board.patch
+
+diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
+index b22c043..38d2c61 100644
+--- a/arch/mips/Kconfig
 b/arch/mips/Kconfig
+@@ -67,6 +67,19 @@ config BCM47XX
+   help
+Support for BCM47XX based boards
  
 +config ATHEROS
 +  bool Atheros SoC support (EXPERIMENTAL)
@@ -15,23 +22,25 @@ diff -urN linux.old/arch/mips/Kconfig 
linux.dev/arch/mips/Kconfig
 +  select SYS_HAS_CPU_MIPS32_R1
 +  select SYS_SUPPORTS_BIG_ENDIAN
 +  select

[OpenWrt-Devel] [PATCH 3/7] atheros: use 2.6.25 kernel

2008-05-07 Thread Axel Gembe

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 target/linux/atheros/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target/linux/atheros/Makefile b/target/linux/atheros/Makefile
index ab301ba..ed32e20 100644
--- a/target/linux/atheros/Makefile
+++ b/target/linux/atheros/Makefile
@@ -11,7 +11,7 @@ BOARD:=atheros
 BOARDNAME:=Atheros 231x/5312
 FEATURES:=squashfs jffs2
 
-LINUX_VERSION:=2.6.23.16
+LINUX_VERSION:=2.6.25.1
 
 include $(INCLUDE_DIR)/target.mk
 
-- 
1.5.5.1

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


[OpenWrt-Devel] [PATCH] leds-parport: make a package

2008-05-07 Thread Axel Gembe
This adds a package for leds-parport (http://code.bastart.eu.org/leds-parport/)
Leds-parport is a LED subsystem device driver for the Linux operating system.
The code was written for Linux version 2.6.22 but has since been tested up to
2.6.25. The module takes 1 parameter, which is parled_port_nr, which is the
parallel port number on which the LEDs are connected.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 package/leds-parport/Makefile |   45 +
 1 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 package/leds-parport/Makefile

diff --git a/package/leds-parport/Makefile b/package/leds-parport/Makefile
new file mode 100644
index 000..959d907
--- /dev/null
+++ b/package/leds-parport/Makefile
@@ -0,0 +1,45 @@
+# 
+# Copyright (C) 2008 Axel Gembe [EMAIL PROTECTED]
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=leds-parport
+PKG_VERSION:=0.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://code.bastart.eu.org/files
+PKG_MD5SUM:=dec1d115b60c7def65e79b374dc06d15
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/leds-parport
+  SUBMENU:=Other modules
+  TITLE:=Parallel port LED support
+  URL:=http://code.bastart.eu.org/leds-parport/
+  FILES:=$(PKG_BUILD_DIR)/leds-parport.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,99,leds-parport)
+endef
+
+define KernelPackage/leds-parport/description
+ This is a LED subsystem device driver for the Linux operating system. The code
+ was written for Linux version 2.6.22 but has since been tested up to 2.6.25.
+ The module takes 1 parameter, which is parled_port_nr, which is the parallel
+ port number on which the LEDs are connected.
+endef
+
+define Build/Compile
+   $(MAKE) -C $(LINUX_DIR) \
+   ARCH=$(LINUX_KARCH) \
+   CROSS_COMPILE=$(TARGET_CROSS) \
+   SUBDIRS=$(PKG_BUILD_DIR)
+   modules
+endef
+
+$(eval $(call KernelPackage,leds-parport))
-- 
1.5.5.1

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


Re: [OpenWrt-Devel] [PATCH 1/7] build: fix watchdog path for 2.6.24+

2008-05-07 Thread Axel Gembe
Geoff Levand wrote:
 It would be nice if we had a patch description for this and
 your other changes, that stated what they do or why they were
 needed.
   
This patch is needed because in 2.6.24 the watchdog directory was
changed. OpenWRT accounted for this by checking for 2.6.24, but of
course that breaks when you use a kernel  2.6.24. This patch is
basically a = check hack (check here for the source:
https://dev.openwrt.org/ticket/3402)
The other build patch is for the crypto modules which got renamed,
almost the same issue (again, see https://dev.openwrt.org/ticket/3402)
I didn't add a description to the first 3 patches because I thought they
were obvious, so sorry for that, guess I was wrong.

The rest of the patches are my current patchset for 2.6.25. It basically
adds KGDB, RedBoot command line and watchdog support for Atheros. Of
course this can be applied without switching Atheros to 2.6.25, I've
tested it on 2.6.23 too (but not 2.6.24, although i refreshed the
patches, I guess we will skip it for Atheros anyways).

 - Axel

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


Re: [OpenWrt-Devel] Problem with build-system and feeds script

2008-05-07 Thread Axel Gembe
Oliver Ertl wrote:
 Now go to Utilities  Editors and tell me if the nano package is selected as 
 M
Seems to work, it is selected as module.

[EMAIL PROTECTED]:~/src/openwrt/test$ grep nano .config
CONFIG_PACKAGE_nano=m
[EMAIL PROTECTED]:~/src/openwrt/test$

 - Axel

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


[OpenWrt-Devel] [PATCH][RFC] feeds: create config if not found

2008-05-07 Thread Axel Gembe
Check for a file named .config before actually installing the package. If it 
does
not exist, create a default configuration file before proceeding. This fixes the
problem where you get all entries marked as module in the generated 
configuration
file when you use ./scripts/feeds install -d m pkg to install a package 
without
having a .config file already.

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 scripts/feeds |   15 ---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/scripts/feeds b/scripts/feeds
index 78e65ad..e3123a5 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -289,6 +289,10 @@ sub install_package {
return $ret;
 }
 
+sub make_defconfig {
+   system(make defconfig Config.in /dev/null 2/dev/null);
+}
+
 sub refresh_config {
my $default = shift;
 
@@ -299,10 +303,15 @@ sub refresh_config {
if ($default) { 
system(make oldconfig CONFDEFAULT=\$default\ Config.in 
/dev/null 2/dev/null);
} else {
-   system(make defconfig Config.in /dev/null 2/dev/null);
+   make_defconfig();
}
 }
 
+sub check_for_config {
+   # make sure we have a config file
+   -f .config or make_defconfig();
+}
+
 sub install {
my $name;
my %opts;
@@ -326,6 +335,8 @@ sub install {
$opts{p} and $f-[1] eq $opts{p} and $feed = $f;
}
 
+   check_for_config();
+
if($opts{a}) {
foreach my $f (@feeds) {
if (!defined($opts{p}) or $opts{p} eq $f-[1]) {
@@ -345,8 +356,6 @@ sub install {
}
}
 
-   # workaround for timestamp check
-
# set the defaults
if ($opts{d} and $opts{d} =~ /^[ymn]$/) {
refresh_config($opts{d});
-- 
1.5.5.1

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


Re: [OpenWrt-Devel] [PATCH][RFC] feeds: create config if not found

2008-05-07 Thread Axel Gembe
Sorry about the wrong time, I just installed an NTP client on my dev install.



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


[OpenWrt-Devel] [PATCH 1/2] kernel: allow kernel modules to have a configuration definition

2008-05-06 Thread Axel Gembe
This patch makes kernel modules check if config is defined and creates a config
passthrough target which will evaluate the original config in the generated
package. This is done so kernel modules can have configuration menus like
busybox, etc...

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 include/kernel.mk |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/kernel.mk b/include/kernel.mk
index 52355dc..6d03683 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -120,6 +120,12 @@ $(call KernelPackage/$(1)/description)
 endef
   endif
 
+  ifdef KernelPackage/$(1)/config
+define Package/kmod-$(1)/config
+$(call KernelPackage/$(1)/config)
+endef
+  endif
+
   ifneq ($(if $(KCONFIG),$(filter m,$(foreach c,$(filter-out %=y %=n 
%=m,$(KCONFIG)),$($(c,.),)
 ifneq ($(strip $(FILES)),)
   define Package/kmod-$(1)/install
-- 
1.5.5.1

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


Re: [OpenWrt-Devel] [PATCH] Regression on watchdog module for kernel 2.6.25 (x86 target)

2008-05-06 Thread Axel Gembe
I suggest using the snippet from here:
https://dev.openwrt.org/ticket/3402

Signed-off-by: Axel Gembe [EMAIL PROTECTED]
---
 package/kernel/modules/other.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/kernel/modules/other.mk b/package/kernel/modules/other.mk
index bf67464..18e7b19 100644
--- a/package/kernel/modules/other.mk
+++ b/package/kernel/modules/other.mk
@@ -270,7 +270,7 @@ $(eval $(call KernelPackage,mmc-at91))
 ifeq ($(KERNEL),2.4)
   WATCHDOG_DIR=char
 endif
-ifeq ($(KERNEL_PATCHVER),2.6.24)
+ifeq ($(firstword $(sort $(KERNEL_PATCHVER) 2.6.24)),2.6.24)
   WATCHDOG_DIR=watchdog
 endif
 WATCHDOG_DIR?=char/watchdog
-- 
1.5.5.1

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


Re: [OpenWrt-Devel] mmc-over-gpio driver and fon2100

2008-04-03 Thread Axel Gembe
Oliver Ertl wrote:
 You may take a look at my first try to migrate the configuration to a UCI 
 config file.
 
 http://lists.openwrt.org/pipermail/openwrt-devel/2008-March/001867.html

I totally missed that post. The patch I was about to send looks almost the same.
Your patch gives me this on the Fonera:
[EMAIL PROTECTED]:~# /etc/rc.common: eval: line 1: cannot create 
/proc/diag/gpiomask: nonexistent directory
I commented out the line and everything else works.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel