Re: [OpenWrt-Devel] Why is everyone patching broadcom-wl-5.100.138

2013-09-24 Thread James Hilliard
Ok, well I think I figured out what dd-wrt is doing with broadcom-wl, took
forever due to there being pretty much zero documentation and the whole
source tree being ridiculously confusing. Their build system for the
broadcom-wl appears to be a hybrid kernel agnostic system in which
OS-independent wlc_ binary files are used to create the kernel specific
wl.ko, I was able to compile broadcom-wl against multiple 3.x kernel
version successfully as far as I can tell(getting entire dd-wrt to compile
is a bit more work due to tons of broken symlinks/poor documentation etc).
http://svn.dd-wrt.com/browser/src/linux/universal/linux-3.11/brcm/mipsel/wl
should be the relevant directory.
Per the readme:
Naming conventions:
The driver prefix is wl .
Port (os) specific files, routines, and data structures start with wl_ .
Common (os-independent) files, routines, and data structures start with
wlc_ .

I'm not sure if these files are from public tarballs or not but they seem
to work for most configurations from looking at reports. They are
definitely different from most router tarballs which appear to use the os
specific wl_ files. This appears to be similar to how OpenWRT builds
broadcom-wl to some degree but appears to also be significantly more up to
date and more functional and a more official broadcom method. I could be
wrong about some of this but it appears we should be able to replace
current methods with this and fix a lot of problems.


On Wed, Sep 18, 2013 at 6:28 AM, Gert Doering g...@greenie.muc.de wrote:

 Hi,

 On Wed, Sep 18, 2013 at 05:45:26AM -0500, James Hilliard wrote:
  I thought DD-WRT was only using public tarball drivers.I looked through
  their source and everything seems to match up with tarbar type wl.o files
  and so on.

 Try building from their public source.

 Half of the relevant broadcom bits are not there, so you plainly *can't*...

 gert
 --
 USENET is *not* the non-clickable part of WWW!
//
 www.muc.de/~gert/
 Gert Doering - Munich, Germany
 g...@greenie.muc.de
 fax: +49-89-35655025
 g...@net.informatik.tu-muenchen.de

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


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


[OpenWrt-Devel] [PATCH 0/5] [kirkwood]: Enable device tree support

2013-09-24 Thread Wojciech Dubowik
Enable device tree support for selected targets. Not all kirkwood
variants are ported so one can use generic uImage file for them.

DTS files are appended to zImage and then wrapped into uImage.

Wojciech Dubowik (5):
  [uboot-kirkwood]: Upgrade to 2013.07
  [uboot-kirkwood]: Enable device tree support
  [kirkwood]: Add 3.10 kernel support
  [kirkwood]: Add generic profile
  [kirkwood]: Bump kernel to 3.10.12

 package/boot/uboot-kirkwood/Makefile   |   4 +-
 .../boot/uboot-kirkwood/patches/110-dockstar.patch |   2 +-
 .../patches/120-enable-device-tree.patch   |   9 +
 target/linux/kirkwood/Makefile |   4 +-
 target/linux/kirkwood/config-3.10  | 285 +
 target/linux/kirkwood/image/Makefile   |  22 +-
 .../kirkwood/patches-3.10/001-partition_map.patch  |  11 +
 .../kirkwood/patches-3.10/002-mvsdio_delay.patch   |  32 +++
 target/linux/kirkwood/profiles/100-Generic.mk  |  19 ++
 9 files changed, 382 insertions(+), 6 deletions(-)
 create mode 100644 
package/boot/uboot-kirkwood/patches/120-enable-device-tree.patch
 create mode 100644 target/linux/kirkwood/config-3.10
 create mode 100644 target/linux/kirkwood/patches-3.10/001-partition_map.patch
 create mode 100644 target/linux/kirkwood/patches-3.10/002-mvsdio_delay.patch
 create mode 100644 target/linux/kirkwood/profiles/100-Generic.mk

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


[OpenWrt-Devel] [PATCH 1/5] [uboot-kirkwood]: Upgrade to 2013.07

2013-09-24 Thread Wojciech Dubowik
Signed-off-by: Wojciech Dubowik wojciech.dubo...@neratec.com
---
 package/boot/uboot-kirkwood/Makefile   | 4 ++--
 package/boot/uboot-kirkwood/patches/110-dockstar.patch | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/boot/uboot-kirkwood/Makefile 
b/package/boot/uboot-kirkwood/Makefile
index dc66450..6ca1a95 100644
--- a/package/boot/uboot-kirkwood/Makefile
+++ b/package/boot/uboot-kirkwood/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=u-boot
-PKG_VERSION:=2012.10
+PKG_VERSION:=2013.07
 PKG_RELEASE:=1
 
 
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
-PKG_MD5SUM:=8655f63b1e5c4647295ac9ce44660be3
+PKG_MD5SUM:=8445162690052e6afd4b8f87af2bb557
 PKG_TARGETS:=bin
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/boot/uboot-kirkwood/patches/110-dockstar.patch 
b/package/boot/uboot-kirkwood/patches/110-dockstar.patch
index 4ff7e57..7c9667b 100644
--- a/package/boot/uboot-kirkwood/patches/110-dockstar.patch
+++ b/package/boot/uboot-kirkwood/patches/110-dockstar.patch
@@ -6,7 +6,7 @@
  #define CONFIG_BOOTCOMMAND \
 -  setenv bootargs ${console} ${mtdparts} ${bootargs_root};  \
 -  ubi part root;  \
--  ubifsmount root;  \
+-  ubifsmount ubi:root;  \
 -  ubifsload 0x80 ${kernel};  \
 -  ubifsload 0x110 ${initrd};  \
 -  bootm 0x80 0x110
-- 
1.8.1.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] [kirkwood]: Bump kernel to 3.10.12

2013-09-24 Thread Wojciech Dubowik
Enable device tree support on dockstar, goflexnet, ib62x0,
iconnect and nsa310 boards. The device tree is appended to
in uImage so there is no need to load it separately.

Signed-off-by: Wojciech Dubowik wojciech.dubo...@neratec.com
---
 target/linux/kirkwood/Makefile   |  4 ++--
 target/linux/kirkwood/image/Makefile | 22 +-
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/target/linux/kirkwood/Makefile b/target/linux/kirkwood/Makefile
index f0dda5a..1d5495a 100644
--- a/target/linux/kirkwood/Makefile
+++ b/target/linux/kirkwood/Makefile
@@ -12,11 +12,11 @@ BOARDNAME:=Marvell Kirkwood
 FEATURES:=targz usb jffs2_nand
 MAINTAINER:=Imre Kaloz ka...@openwrt.org
 
-LINUX_VERSION:=3.3.8
+LINUX_VERSION:=3.10.12
 
 include $(INCLUDE_DIR)/target.mk
 
-KERNELNAME:=uImage
+KERNELNAME:=uImage zImage dtbs
 
 DEFAULT_PACKAGES +=
 
diff --git a/target/linux/kirkwood/image/Makefile 
b/target/linux/kirkwood/image/Makefile
index 7be27e6..7c53ef0 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -7,11 +7,31 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
+TARGET_DTBS := kirkwood-dockstar kirkwood-goflexnet kirkwood-ib62x0 \
+   kirkwood-iconnect kirkwood-nsa310
 NAND_BLOCKSIZE := 2048:128k
 
+LOADADDR:=0x8000
+UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
+
+define Image/Build/MkuImage
+   mkimage -A arm -O linux -T kernel -a $(LOADADDR) -C none -e $(LOADADDR) 
\
+   -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' -d $(1) $(2);
+endef
+
+define Image/Build/DTB
+   cp $(KDIR)/zImage$(2) $(KDIR)/zImage$(2)-$(1);
+   cat $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(1).dtb  
$(KDIR)/zImage$(2)-$(1);
+   $(call 
Image/Build/MkuImage,$(KDIR)/zImage$(2)-$(1),$(KDIR)/uImage$(2)-$(1))
+   cp $(KDIR)/uImage$(2)-$(1) $(UIMAGE)$(2)-$(1);
+endef
+
 define Image/BuildKernel
-# do mach-id fixup here, if needed
cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
+   $(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb)))
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+   $(call Image/Build/Initramfs)
+endif
 endef
 
 define Image/Build
-- 
1.8.1.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/5] [kirkwood]: Add 3.10 kernel support

2013-09-24 Thread Wojciech Dubowik
Enable device tree support for selected targets.

Signed-off-by: Wojciech Dubowik wojciech.dubo...@neratec.com
---
 target/linux/kirkwood/config-3.10  | 285 +
 .../kirkwood/patches-3.10/001-partition_map.patch  |  11 +
 .../kirkwood/patches-3.10/002-mvsdio_delay.patch   |  32 +++
 3 files changed, 328 insertions(+)
 create mode 100644 target/linux/kirkwood/config-3.10
 create mode 100644 target/linux/kirkwood/patches-3.10/001-partition_map.patch
 create mode 100644 target/linux/kirkwood/patches-3.10/002-mvsdio_delay.patch

diff --git a/target/linux/kirkwood/config-3.10 
b/target/linux/kirkwood/config-3.10
new file mode 100644
index 000..c061273
--- /dev/null
+++ b/target/linux/kirkwood/config-3.10
@@ -0,0 +1,285 @@
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
+CONFIG_ARCH_KIRKWOOD=y
+CONFIG_ARCH_KIRKWOOD_DT=y
+# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+CONFIG_ARM=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
+# CONFIG_ARM_CPU_SUSPEND is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+CONFIG_ARM_NR_BANKS=8
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+# CONFIG_ARM_THUMB is not set
+# CONFIG_ARPD is not set
+CONFIG_ATAGS=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CACHE_FEROCEON_L2=y
+# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
+# CONFIG_CACHE_L2X0 is not set
+# CONFIG_CHARGER_MANAGER is not set
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE=rootdelay=1 root=/dev/mmcblk0p1 noinitrd console=ttyS0,115200
+CONFIG_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_COMMON_CLK=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_FEROCEON=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_FEROCEON=y
+# CONFIG_CPU_FEROCEON_OLD_ID is not set
+# CONFIG_CPU_ICACHE_DISABLE is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_TLB_FEROCEON=y
+CONFIG_CPU_USE_DOMAINS=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_DEBUG_LL_INCLUDE=mach/debug-macro.S
+# CONFIG_DEBUG_PINCTRL is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DLCI is not set
+CONFIG_DNOTIFY=y
+CONFIG_DTC=y
+CONFIG_EXT4_FS=y
+CONFIG_FRAME_POINTER=y
+CONFIG_FS_MBCACHE=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IO=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_DEVRES=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_MVEBU=y
+CONFIG_GPIO_SYSFS=y
+# CONFIG_HAMRADIO is not set
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
+CONFIG_HAVE_ARCH_JUMP_LABEL=y
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_ARCH_PFN_VALID=y
+CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
+CONFIG_HAVE_BPF_JIT=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_CLK_PREPARE=y
+CONFIG_HAVE_CONTEXT_TRACKING=y
+CONFIG_HAVE_C_RECORDMCOUNT=y
+CONFIG_HAVE_DEBUG_KMEMLEAK=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+CONFIG_HAVE_DMA_ATTRS=y
+CONFIG_HAVE_DMA_CONTIGUOUS=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_GENERIC_DMA_COHERENT=y
+CONFIG_HAVE_GENERIC_HARDIRQS=y
+CONFIG_HAVE_IDE=y
+CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+CONFIG_HAVE_KERNEL_XZ=y
+CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_HAVE_MEMBLOCK=y
+CONFIG_HAVE_NET_DSA=y
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_HAVE_PROC_CPU=y
+CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
+CONFIG_HAVE_UID16=y
+CONFIG_HW_RANDOM=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_INET_LRO=y
+CONFIG_INITRAMFS_SOURCE=
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_KTIME_SCALAR=y
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_REGULATOR is not set
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+# CONFIG_MACH_CLOUDBOX_DT is not set
+# CONFIG_MACH_D2NET_V2 is not set
+# CONFIG_MACH_DB88F6281_BP is not set
+# CONFIG_MACH_DLINK_KIRKWOOD_DT is not set
+CONFIG_MACH_DOCKSTAR=y
+# CONFIG_MACH_DOCKSTAR_DT is not set
+# CONFIG_MACH_DREAMPLUG_DT is not set
+CONFIG_MACH_ESATA_SHEEVAPLUG=y

[OpenWrt-Devel] [PATCH 4/5] [kirkwood]: Add generic profile

2013-09-24 Thread Wojciech Dubowik
Signed-off-by: Wojciech Dubowik wojciech.dubo...@neratec.com
---
 target/linux/kirkwood/profiles/100-Generic.mk | 19 +++
 1 file changed, 19 insertions(+)
 create mode 100644 target/linux/kirkwood/profiles/100-Generic.mk

diff --git a/target/linux/kirkwood/profiles/100-Generic.mk 
b/target/linux/kirkwood/profiles/100-Generic.mk
new file mode 100644
index 000..7bfb4aa
--- /dev/null
+++ b/target/linux/kirkwood/profiles/100-Generic.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Generic
+  NAME:=Generic (default)
+  PACKAGES:=kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
+   kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
+   kmod-rtc-marvell
+endef
+
+define Profile/Generic/Description
+   Package set compatible with most Marvell Kirkwood based boards
+endef
+$(eval $(call Profile,Generic))
+
-- 
1.8.1.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Target kernel config changes not triggering rebuild? (was: Re: DIR-615 E4 factory image padding size)

2013-09-24 Thread Paul Fertser
Hello,

Gabor Juhos juh...@openwrt.org writes:
 Yes, the 'Image/Build/Cameo' macro is broken.
 Don't need to send a patch, I'm working on that already.

Great cleanup and the fixes on top, thank you!

Can you please explain what is this mac partition about, what does it
hold? I know wireless eeprom is in the last art partition and that
seems to be all that's needed, at least on my other wr741nd device.

I also faced a strange issue which forced me to open the device and
attach the serial (and for no evident reason tftpboot didn't work
either, the device kept sending me arp requests ignoring my replies, so
I had to use Ymodem).

Apparently, after I did git pull; make oldconfig; make and
sysupgraded, the resulting images ended up missing the appropriate
firmware partition splitters so it couldn't mount the rootfs after the
reboot. I have no real clue how that might have happened but make
target/linux/clean; make gave me a new sysupgrade image that work fine.

Thank you again for your work.
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] SoC NAND driver ar934x/OpenWRT support on WNDR4300

2013-09-24 Thread Gabor Juhos
2013.09.23. 22:07 keltezéssel, Stefan Agner írta:
 Am 2013-09-23 21:08, schrieb Gabor Juhos:
 It should be possible to fix the board via JTAG. At least it seems that the 
 PCB
 has an unpopulated JTAG header.
 Yes I thought about this too, but since I didn't found an openocd
 configuration which should work with this SoC, I didn't even tried it. I
 guess I would download U-Boot to RAM and try to reflash U-Boot from
 there, right? 

Yes, that would be the simplest method.

 Do you have a working JTAG toolchain for this SoC?

Nope, I did not have to use JTAG on any AR934x based boards yet.

 Today I tested the driver. After adding the relevant Kernel
 configuration (CONFIG_MTD_NAND_AR934X_HW_ECC) I could successfully read
 from the device, data look good. However, when I tried to dd the whole
 kernel I get some errors:
 
 # dd if=/dev/mtdblock7 of=/tmp/wndr4300-mtd7-kernel.img
 [  325.31] end_request: I/O error, dev mtdblock7, sector 424
 [  325.31] Buffer I/O error on device mtdblock7, logical block 53
 [  325.34] end_request: I/O error, dev mtdblock7, sector 536
 [  325.34] Buffer I/O error on device mtdblock7, logical block 67
 [  325.38] end_request: I/O error, dev mtdblock7, sector 424
 [  325.38] Buffer I/O error on device mtdblock7, logical block 53
 dd: /dev/mtdblock7: Input/output error

 My first guess was this is/are bad blocks.
 
 But U-Boot seems not to support this idea:
 
 ar7240 nand bad
 
 Device 0 bad blocks:
 ar7240 
 Maybe U-Boot's bad block management doesn't work with those
 information...

Despite what U-Boot says, those still can be bad blocks. The ar934x-ncf driver
has no special bad block handling yet.

 A dd command with conv=noerror leads to a image witch is 16KiB smaller
 than it should be.

Don't use dd on NAND flashes. Use the nanddump utility from the mtd-utils
package instead.

 After working only with initramfs, the default Firmware doesn't boot
 anymore:
 ** check rootfs image **
Verifying Checksum ...Bad Data CRC
 
 This CRC checks the rootfs. Netgear put another uImage header just
 before the rootfs partition (but still in the kernel partition). It
 looks like the Kernel already changed something on NAND, which causes
 this Bad Data CRC...
 I then flashed the latest Netgear Firmware again. Guess what, I could
 successfully dd the whole kernel... But dd the rootfs still has Buffer
 I/O errors.
 
 Any idea what could go wrong here? I think it would be a good idea to
 figure out whats wrong before doing further steps...

Well, the hardware ECC support in ar934x-nfc driver might contain some bugs.
However, I don't think that the kernel writes anything into the flash by itself.

Did you write/erase the any of the partitions by any chance?

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


[OpenWrt-Devel] Installing OpenWRT on a Gigaset SX762

2013-09-24 Thread Stefan Monnier
[ Previously posted on openwrt-users, but now that it failed halfway,
  I figure that installing via httpd isn't really an option at all. ]

I finally got my Gigaset back, so I can get back at installing OpenWRT
on it.  I have replaced the secondary bootloader, so I get the HTTP
server requesting the firmware image.  All seemed to be well.

Except that when I submit that firmware, the request never ends.
[ See below my sig for the story of what happens in more details.  ]

So I figure I should try and flash it via tftp, but I have no idea what
command to use for that.  The webpage
(http://wiki.openwrt.org/toh/gigaset/sx76x) shows some commands to use
to replace the primary bootloader, but that doesn't give me enough hints
to know what commands to use.  Any idea?


Stefan

Regarding flashing over the recovery httpd, after soldering the serial
line, I now see that the upload goes *rey* slow, repeating
patterns of the form:

214253 / 3145732
215699 / 3145732
.217145
/ 3145732
218591 / 3145732
220037 / 3145732
221483
/ 3145732

Where every dot is a 1s wait (give or take).  At this rate, it would take
days before the firmware is uploaded, and when I tried that, the process
stopped after transferring a bit more than 2MB.

Not sure what's going on: there always seem to be 3 packets sent
together, followed by a wait.  The first few packets get sent without
waiting, but once I get to around 200KB, the wait starts appearing.
It appears gradually, with an exponential pattern: first 3 blocks
followed by a single ., then 3 blocks followed by .., then 3 blocks
followed ..., then ..., then ., ... until hitting
the limit seen above.

I tried to run a ping at the same time, figuring it might disrupt the
wait, but to avail.  Any idea what might be going on, or how I can try
to fix it?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Installing OpenWRT on a Gigaset SX762

2013-09-24 Thread Luka Perkov
Hi Stefan,

is that danube or amazon based board?

On Tue, Sep 24, 2013 at 03:34:24PM -0400, Stefan Monnier wrote:
 So I figure I should try and flash it via tftp, but I have no idea what
 command to use for that.  The webpage
 (http://wiki.openwrt.org/toh/gigaset/sx76x) shows some commands to use
 to replace the primary bootloader, but that doesn't give me enough hints
 to know what commands to use.  Any idea?

In case that is danube board please use openwrt/v2013.07 branch to get
u-boot going:

https://github.com/danielschwierzeck/u-boot-lantiq/commits/openwrt/v2013.07

I'm waiting for next uboot release and then I'll bump the package in
OpenWrt. The httpd in uboot is not and wont be supported anymore (at
least until it is not available in upstream).

Luka

 
 
 Stefan
 
 Regarding flashing over the recovery httpd, after soldering the serial
 line, I now see that the upload goes *rey* slow, repeating
 patterns of the form:
 
 214253 / 3145732
 215699 / 3145732
 .217145
 / 3145732
 218591 / 3145732
 220037 / 3145732
 221483
 / 3145732
 
 Where every dot is a 1s wait (give or take).  At this rate, it would take
 days before the firmware is uploaded, and when I tried that, the process
 stopped after transferring a bit more than 2MB.
 
 Not sure what's going on: there always seem to be 3 packets sent
 together, followed by a wait.  The first few packets get sent without
 waiting, but once I get to around 200KB, the wait starts appearing.
 It appears gradually, with an exponential pattern: first 3 blocks
 followed by a single ., then 3 blocks followed by .., then 3 blocks
 followed ..., then ..., then ., ... until hitting
 the limit seen above.
 
 I tried to run a ping at the same time, figuring it might disrupt the
 wait, but to avail.  Any idea what might be going on, or how I can try
 to fix it?
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] How to enable Seama firmware parser for Ramips?

2013-09-24 Thread Flávio Silveira

Good evening,

 I've tried trunk r38130 for D-Link DIR-610 A1, which uses Seama.

 Stock firmware accepts my openwrt build fine, but it can't find rootfs 
while booting.


 Here is my dts file: http://codepad.org/ONZdgMZ3

 Here is boot log: http://codepad.org/rLOjLHdy

 If there is any information missing, please ask!

Thanks in advance,
 Flavio 
___

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


Re: [OpenWrt-Devel] How to enable Seama firmware parser for Ramips?

2013-09-24 Thread Jacek Kikiewicz
Don't you have to have partition called rootfs in your definition?
Then it should pick it up...
Regards,
Jacek
On 09/24/2013 10:19 PM, Flávio Silveira wrote:
 Good evening,

  I've tried trunk r38130 for D-Link DIR-610 A1, which uses Seama.

  Stock firmware accepts my openwrt build fine, but it can't find
 rootfs while booting.

  Here is my dts file: http://codepad.org/ONZdgMZ3

  Here is boot log: http://codepad.org/rLOjLHdy

  If there is any information missing, please ask!

 Thanks in advance,
  Flavio ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] SoC NAND driver ar934x/OpenWRT support on WNDR4300

2013-09-24 Thread Stefan Agner
Am 2013-09-24 19:09, schrieb Gabor Juhos:
 A dd command with conv=noerror leads to a image witch is 16KiB smaller
 than it should be.
 
 Don't use dd on NAND flashes. Use the nanddump utility from the mtd-utils
 package instead.

Ok I understand that /dev/mtdblock[x] is not the way to handle NAND, but
reading should work anyway. By using nanddump I could successfully dump
the images, although the ECC check corrected bitflips. I guess that when
using this NAND through mtdblock, this leads to an I/O error (since its
the exactly same place, 2880*512 = 0x00168000).

root@OpenWrt:/tmp# dd if=/dev/mtdblock10 of=/tmp/gaga
[ 1350.92] end_request: I/O error, dev mtdblock10, sector 2880
[ 1350.92] Buffer I/O error on device mtdblock10, logical block 360
[ 1351.00] end_request: I/O error, dev mtdblock10, sector 2880
[ 1351.00] Buffer I/O error on device mtdblock10, logical block 360
dd: /dev/mtdblock10: Input/output error
root@OpenWrt:/tmp# nanddump /dev/mtd10 /tmp/wndr4300-mtd10-nanddump.img
--omito
ob --bb=skipbad
ECC failed: 0
ECC corrected: 48
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x and ending at 0x0190...
ECC: 16 corrected bitflip(s) at offset 0x00168000

But this is not a showstopper than, since the driver seems to work
correctly using the mtd interface.

 
 Did you write/erase the any of the partitions by any chance?
Hm, I think I played around mounting the jffs2 partition once.. this
should be after the CRC checked squashfs, but maybe I used the wrong
mtd. This would explain the error. I reflashed the image, since then it
boots fine even after using nanddump etc. from initram 


Now I tried to create a UBI volume using the initramfs-Kernel. I get
this kernel crash dump:

# ubiattach -m 8 /dev/ubi_ctrl
[ 3712.32] UBI: attaching mtd8 to ubi0
[ 3712.51] UBI: scanning is finished
[ 3712.52] UBI: empty MTD device detected
[ 3712.52] CPU 0 Unable to handle kernel paging request at virtual
address , epc == , ra == 802094fc
[ 3712.53] Oops[#1]:
[ 3712.53] CPU: 0 PID: 1216 Comm: ubiattach Not tainted 3.10.12 #10
[ 3712.53] task: 878b5d50 ti: 8654c000 task.ti: 8654c000
[ 3712.53] $ 0   :  0001  8037c810
[ 3712.53] $ 4   : 87826010 0001 01ff 0200
[ 3712.53] $ 8   : 0005 80064830  
[ 3712.53] $12   :  d8197822  
[ 3712.53] $16   : 878261b8  87826010 86e34000
[ 3712.53] $20   : 0200 86e34500 86e34d00 0007
[ 3712.53] $24   :  
[ 3712.53] $28   : 8654c000 8654dae8  802094fc
[ 3712.53] Hi: 
[ 3712.53] Lo: 0010
[ 3712.53] epc   :    (null)
[ 3712.53] Not tainted
[ 3712.53] ra: 802094fc nand_write_subpage_hwecc+0xa0/0x1c4
[ 3712.53] Status: 1100dc03 KERNEL EXL IE
[ 3712.53] Cause : 0088
[ 3712.53] BadVA : 
[ 3712.53] PrId  : 0001974c (MIPS 74Kc)
[ 3712.53] Modules linked in: ath9k ath9k_common pppoe ppp_async
iptable_nat ath9k_hw ath pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv4
mac80211 ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat
xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS
xt_REDIRECT xt_LOG xt_CT slhc nf_nat_irc nf_nat_ftp nf_nat
nf_defrag_ipv4 nf_conntrack_irc nf_conntrack_ftp iptable_raw
iptable_mangle iptable_filter ipt_REJECT ip_tables crc_ccitt compat
ledtrig_usbdev ledtrig_netdev ip6t_REJECT ip6t_rt ip6t_hbh ip6t_mh
ip6t_ipv6header ip6t_frag ip6t_eui64 ip6t_ah ip6table_raw
ip6table_mangle ip6table_filter ip6_tables x_tables nf_conntrack_ipv6
nf_conntrack nf_defrag_ipv6 ipv6 arc4 crypto_blkcipher usb_storage
leds_gpio ohci_hcd ledtrig_timer ledtrig_default_on ehci_platform
ehci_hcd sd_mod scsi_mod gpio_button_hotplug ext4 jbd2 mbcache usbcore
nls_base usb_common crc32c crypto_hash
[ 3712.53] Process ubiattach (pid: 1216, threadinfo=8654c000,
task=878b5d50, tls=77b24440)
[ 3712.53] Stack : 1040   80099d00 0004
 0010 8037c810
  878261b8 87826010  0200 86e34500  0001
0fc0
  0fc0 802093ac 878261b8 80208f98  878261b8 86e34500

  878261b8 878261b8 8654dc00 87826010 0200  0200
0fc0
   80209d18 8794e600 8654dc08   86e34500

  ...
[ 3712.53] Call Trace:
[ 3712.53] [80099d00] __wake_up+0x24/0x44
[ 3712.53] [802093ac] nand_write_page+0xc0/0x170
[ 3712.53] [80208f98] nand_release_device+0x30/0x3c
[ 3712.53] [80209d18] nand_do_write_ops+0x308/0x3c4
[ 3712.53] [801fb0d0] part_erase+0x22c/0x2c8
[ 3712.53] [80209f28] nand_write+0x5c/0x94
[ 3712.53] [8021ae34] ubi_io_write+0x350/0x618
[ 3712.53] [8020048c] erase_callback+0x0/0x14
[ 3712.53] [8021b2ec] ubi_io_write_ec_hdr+0xf0/0x108
[ 

Re: [OpenWrt-Devel] Installing OpenWRT on a Gigaset SX762

2013-09-24 Thread Stefan Monnier
 is that danube or amazon based board?

Danube.

 In case that is danube board please use openwrt/v2013.07 branch to get
 u-boot going:
 https://github.com/danielschwierzeck/u-boot-lantiq/commits/openwrt/v2013.07

Is that required to install OpenWRT?
How do I install that u-boot?


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


Re: [OpenWrt-Devel] Installing OpenWRT on a Gigaset SX762

2013-09-24 Thread Stefan Monnier
 Except that when I submit that firmware, the request never ends.
 [ See below my sig for the story of what happens in more details.  ]

After trying a few more times with various machines, it finally worked
right (without those long waits).  So now I managed to install the
attitude adjustment image for danube (using the secondary u-boot's
httpd server).

Next problem: the boot fails to find the root filesystem (see attached
bootlog).  Is this a known problem?

Obviously, I'll need to build my own image, but since the stock one
fails to boot, I'm wondering what I should change in the config to try
and make sure mine does boot properly.


Stefan


[0.00] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc 
version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sat Mar 23 
11:36:28 UTC 2013
[0.00] SoC: Danube rev 1.3
[0.00] bootconsole [early0] enabled
[0.00] CPU revision is: 00019641 (MIPS 24KEc)
[0.00] Determined physical RAM map:
[0.00]  memory: 0200 @  (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] Zone PFN ranges:
[0.00]   Normal   0x - 0x2000
[0.00] Movable zone start PFN for each node
[0.00] Early memory PFN ranges
[0.00] 0: 0x - 0x2000
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 8128
[0.00] Kernel command line:  console=ttyLTQ1,115200 
rootfstype=squashfs,jffs2 machtype=GIGASX76X
[0.00] PID hash table entries: 128 (order: -3, 512 bytes)
[0.00] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[0.00] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes.
[0.00] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 
bytes
[0.00] Writing ErrCtl register=0003b628
[0.00] Readback ErrCtl register=0003b628
[0.00] Memory: 29216k/32768k available (2413k kernel code, 3552k 
reserved, 404k data, 176k init, 0k highmem)
[0.00] NR_IRQS:256
[0.00] CPU Clock: 333MHz
[0.00] Calibrating delay loop... 221.18 BogoMIPS (lpj=442368)
[0.036000] pid_max: default: 32768 minimum: 301
[0.04] Mount-cache hash table entries: 512
[0.048000] NET: Registered protocol family 16
[0.056000] gpiochip_add: registered GPIOs 0 to 15 on device: ltq_gpio
[0.06] gpiochip_add: registered GPIOs 16 to 31 on device: ltq_gpio
[0.064000] MIPS: machine is GIGASX76X - Gigaset SX761,SX762,SX763
[0.068000] gpiochip_add: registered GPIOs 200 to 223 on device: ltq_stp
[0.108000] bio: create slab bio-0 at 0
[0.116000] PCI host bridge to bus :00
[0.12] pci_bus :00: root bus resource [mem 0x1800-0x19ff]
[0.124000] pci_bus :00: root bus resource [io  0x1ae0-0x1aff]
[0.128000] pci :00:0e.0: unsupported PM cap regs version (6)
[0.132000] pci :00:0e.0: BAR 0: assigned [mem 0x1800-0x1800]
[0.136000] pci :00:0e.1: BAR 1: assigned [mem 0x1801-0x18010fff]
[0.14] pci :00:0e.1: BAR 0: assigned [io  0x1ae0-0x1ae7]
[0.144000] pci :00:0e.0: SLOT:14 PIN:1 IRQ:30
[0.148000] pci :00:0e.1: SLOT:14 PIN:1 IRQ:30
[0.152000] Switching to clocksource MIPS
[0.16] NET: Registered protocol family 2
[0.168000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[0.176000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[0.18] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[0.188000] TCP: Hash tables configured (established 1024 bind 1024)
[0.192000] TCP reno registered
[0.196000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[0.204000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[0.208000] NET: Registered protocol family 1
[0.216000] gptu: totally 6 16-bit timers/counters
[0.22] gptu: misc_register on minor 63
[0.224000] gptu: succeeded to request irq 126
[0.228000] gptu: succeeded to request irq 127
[0.232000] gptu: succeeded to request irq 128
[0.236000] gptu: succeeded to request irq 129
[0.244000] gptu: succeeded to request irq 130
[0.248000] gptu: succeeded to request irq 131
[0.256000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[0.26] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) 
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[0.272000] msgmni has been set to 57
[0.276000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 
254)
[0.284000] io scheduler noop registered
[0.288000] io scheduler deadline registered (default)
[0.292000] ltq_asc.1: ttyLTQ1 at MMIO 0x1e100c00 (irq = 112) is a ltq_asc
[0.30] console [ttyLTQ1] enabled, bootconsole disabled
[0.30] console [ttyLTQ1] enabled, bootconsole disabled
[