[OpenWrt-Devel] [PATCH 0/5] BASEFILES, refactoring ifconfig/route - ip , explanation
After discussing some style- and method-related things, now the hole bunch of basefiles that are affected: ./package/base-files/files/etc/hotplug.d/iface/10-routes ./package/base-files/files/etc/preinit ./package/base-files/files/lib/network/config.sh ./package/base-files/files/sbin/ifdown ./package/base-files/files/usr/share/udhcpc/default.script (i've just grep'ed all basefiles for ifconfig and route ) Signed-off-by: Bastian Bittorf [EMAIL PROTECTED] signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/5] BASEFILES, refactoring ifconfig/route - ip , /etc/preinit
I've also added one more netmsg and moved the netmsg direct into the function, for not having two different places for the broadcast-address. Signed-off-by: Bastian Bittorf [EMAIL PROTECTED] --- Index: package/base-files/files/etc/preinit === --- package/base-files/files/etc/preinit(Revision 11157) +++ package/base-files/files/etc/preinit(Arbeitskopie) @@ -1,18 +1,35 @@ #!/bin/sh # Copyright (C) 2006 OpenWrt.org + export PATH=/bin:/sbin:/usr/bin:/usr/sbin . /etc/diag.sh -failsafe_ip() { - ifconfig $ifname 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up +failsafe_ip () +{ + localDEVICE=$1# ARG1 + localIP=192.168.1.1 + local MASK=255.255.255.0 + local BROADCAST=$( /bin/ipcalc.sh $IP $MASK | sed -n 's/^BROADCAST=\(.*\)/\1/p' ) + local PRE=$( /bin/ipcalc.sh $IP $MASK | sed -n 's/^PREFIX=\(.*\)/\1/p') + + ifconfig $DEVICE $IP netmask $MASK broadcast $BROADCAST up || { + # ifconfig n/a - fallback to ip + ip addr add dev $DEVICE $IP/$PRE broadcast +# broadcast is calculated (is this clean? we calc it anyway) + ip link set dev $DEVICE arp on # maybe not necessary + ip link set dev $DEVICE up + } + + netmsg $BROADCAST set up $IP/$PRE dev $DEVICE # would'nt it be better to send + netmsg $BROADCAST Entering Failsafe! # this messages to 255.255.255.255 ? } -failsafe() { +failsafe () +{ [ -n $ifname ] grep $ifname /proc/net/dev /dev/null { - failsafe_ip - netmsg 192.168.1.255 Entering Failsafe! + failsafe_ip $ifname telnetd -l /bin/login /dev/null 21 } + lock /tmp/.failsafe ash --login } signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/5] BASEFILES, refactoring ifconfig/route - ip , /etc/hotplug.d/iface/10-routes
maybe we should define variables for some things, so we must not double-generate things... Is it correct to use absolut path: /usb/sbin/ip ? Signed-off-by: Bastian Bittorf [EMAIL PROTECTED] --- Index: package/base-files/files/etc/hotplug.d/iface/10-routes === --- package/base-files/files/etc/hotplug.d/iface/10-routes (Revision 11157) +++ package/base-files/files/etc/hotplug.d/iface/10-routes (Arbeitskopie) @@ -28,7 +28,11 @@ dest=${netmask:+-net $target netmask $netmask} dest=${dest:--host $target} - /sbin/route add $dest gw $gateway ${dev:+dev $dev} ${metric:+ metric $metric} + /sbin/route add $dest gw $gateway ${dev:+dev $dev} ${metric:+ metric $metric} || { + # route is n/a - fallback by using ip + local PRE=$( /bin/ipcalc.sh $target $netmask | sed -n 's/^PREFIX=\(.*\)/\1/p' ) + /usr/sbin/ip route add ${target}/${PRE} via $gateway ${dev:+dev $dev} ${metric:+ metric $metric} + } } add_route6() { @@ -56,7 +60,10 @@ return 1 } - /sbin/route -A inet6 add $target gw $gateway ${dev:+dev $dev} ${metric:+ metric $metric} + /sbin/route -A inet6 add $target gw $gateway ${dev:+dev $dev} ${metric:+ metric $metric} || { + # route is n/a - fallback by using ip + /usr/sbin/ip route add $target via $gateway ${dev:+dev $dev} ${metric:+ metric $metric} + } } case $ACTION in signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 0/5] BASEFILES, refactoring ifconfig/route - ip , explanation
Bastian Bittorf wrote: After discussing some style- and method-related things, now the hole bunch of basefiles that are affected: ./package/base-files/files/etc/hotplug.d/iface/10-routes ./package/base-files/files/etc/preinit ./package/base-files/files/lib/network/config.sh ./package/base-files/files/sbin/ifdown ./package/base-files/files/usr/share/udhcpc/default.script (i've just grep'ed all basefiles for ifconfig and route ) The problem with this approach is that it relies only on the return type of the ifconfig/route calls. I'd suggest the following approach: In a central include file, check for presence of the ip applet or executable and if it is not present, define a function ip(), which calls ifconfig and route. The advantage to this would be that we can convert all our scripts to the new format without having to add checks everywhere, and when we want to switch completely, it's simply a matter of removing the legacy code. What do you think? - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 0/5] BASEFILES, refactoring ifconfig/route - ip , explanation
* Felix Fietkau [EMAIL PROTECTED] [18.05.2008 15:23]: The problem with this approach is that it relies only on the return type of the ifconfig/route calls. I'd suggest the following approach: In a central include file, check for presence of the ip applet or executable and if it is not present, define a function ip(), which calls ifconfig and route. sounds fine, will deliver a patch this week. bye, Bastian. signature.asc Description: Digital signature ___ 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
Axel Gembe wrote: This patch adds a number of configuration options to the MadWifi package. You can now configure the HAL, bus, default rate control algorithm as well as the debug mode from within make menuconfig. The goal is to be able to support hardware profiles with different HALs without messing around with the Makefile directly. 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. - Felix ___ 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
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
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
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
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
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
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
Re: [OpenWrt-Devel] [PATCH 2/2] madwifi: make hal, bus and rate control configurable
Axel Gembe wrote: 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. Support for changing the HAL is fine for now. I'll leave it in until the new HAL hits OpenWrt and madwifi.org (soon) But why support for overriding the bus type? Anyways, I still think the rate control configuration is useful for experimenting with it. ACK. Though after my changes, minstrel should perform a bit better than the alternatives. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 15/15] bcm96345: correct some 6345 specific stuff
Axel Gembe wrote: This fixes some problems with the 6345 support and adds a macro for CPU identification that is easier on the eyes. The first thing it does is to not initialize MPI on the 6345 as it does not have PCI. The second thing it does is to use a static value for the CPU frequency of the 6345 chip to provide an accurate timer. Signed-off-by: Axel Gembe [EMAIL PROTECTED] Thanks. Full series applied as of r11183 - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel