OpenWrt Forum Archive

Topic: Porting OpenWRT to Buffalo WZR-1750-DHPD

The content of this topic has been archived on 25 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

  I have a Buffalo WZR-1750-DHPD and I'd like the community help in order to port OpenWRT to it.

  It's a 802.11ac router and is shipped with DD-WRT. So, I think it would be a little bit easier to do the porting.

  I'm a C programmer but don't have a good device driver programming skill.

  Any help would be appreciated.

  Following is the hardware specs ...

root@DD-WRT:~# cat /proc/cpuinfo
model name    : ARMv7 Processor rev 0 (v7l)
processor    : 0
BogoMIPS    : 1594.16
Features    : swp half thumb fastmult edsp tls
CPU implementer    : 0x41
CPU architecture: 7
CPU variant    : 0x3
CPU part    : 0xc09
CPU revision    : 0

model name    : ARMv7 Processor rev 0 (v7l)
processor    : 1
BogoMIPS    : 1594.16
Features    : swp half thumb fastmult edsp tls
CPU implementer    : 0x41
CPU architecture: 7
CPU variant    : 0x3
CPU part    : 0xc09
CPU revision    : 0

Hardware    : Northstar Prototype
Revision    : 0000
Serial        : 0000000000000000

root@DD-WRT:~# uname -a
Linux DD-WRT 3.10.34-rc1 #2005 SMP Mon Mar 24 07:49:09 CET 2014 armv7l GNU/Linux

root@DD-WRT:~# cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  528314368 33550336 494764032        0  3817472 10436608
Swap:        0        0        0
MemTotal:         515932 kB
MemFree:          483168 kB
MemShared:             0 kB
Buffers:            3728 kB
Cached:            10192 kB
SwapCached:            0 kB
Active:             5624 kB
Inactive:          10068 kB
Active(anon):       1772 kB
Inactive(anon):        0 kB
Active(file):       3852 kB
Inactive(file):    10068 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:        393216 kB
HighFree:         380320 kB
LowTotal:         122716 kB
LowFree:          102848 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1772 kB
Mapped:             1160 kB
Shmem:                 0 kB
Slab:               6208 kB
SReclaimable:       1380 kB
SUnreclaim:         4828 kB
KernelStack:         336 kB
PageTables:          196 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      257964 kB
Committed_AS:       4800 kB
VmallocTotal:     892928 kB
VmallocUsed:       34196 kB
VmallocChunk:     584220 kB

root@DD-WRT:~# dmesg
Booting Linux on physical CPU 0x0
Linux version 3.10.34-rc1 (root@dd-wrt.buildserver) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.01 r39555) ) #2005 SMP Mon Mar 24 07:49:09 CET 2014
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Northstar Prototype
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writealloc
map io
MPCORE found at 19020000 (VIRT d9020000) 18000000 d8000000
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat c03a6900, node_mem_map c0429000
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32768 pages, LIFO batch:7
  HighMem zone: 4864 pages used for memmap
  HighMem zone: 98304 pages, LIFO batch:31
PERCPU: Embedded 7 pages/cpu @c1838000 s7040 r8192 d13440 u32768
pcpu-alloc: s7040 r8192 d13440 u32768 alloc=8*4096
pcpu-alloc: [0] 0 [0] 1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130816
Kernel command line: console=ttyS0,115200 panic=10 root=/dev/mtdblock3 earlyprintk=1 rootfstype=squashfs,jffs2 noinitrd init=/bin/sh
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB 384MB = 512MB total
Memory: 515700k/515700k available, 8588k reserved, 393216K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc034fda4   (3360 kB)
      .init : 0xc0350000 - 0xc038ab80   ( 235 kB)
      .data : 0xc038c000 - 0xc03c8b48   ( 243 kB)
       .bss : 0xc03c8b48 - 0xc0428e64   ( 385 kB)
Hierarchical RCU implementation.
    CONFIG_RCU_FANOUT set to non-default value of 2
NR_IRQS:256
MPCORE GIC init
External imprecise Data abort at addr=0x0, fsr=0x1c06 ignored.
MPCORE Global Timer Clock 400000000Hz on IRQ 27
sched_clock: 32 bits at 400MHz, resolution 2ns, wraps every 10737ms
register local timer
smp_twd: clock not found -2
Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Calibrating local timer... 399.69MHz.
2 cores has been found
Setting up static identity map for 0xc0012660 - 0xc0012694
L310: cache controller enabled 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x7a130000
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (3188.32 BogoMIPS).
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Found a ST compatible (Marconix) serial flash with 16 64KB blocks; total size 1MB
found remapped nvram on sflash
CCA UART Clock Config: Sel=1 Ovr=1 Div=48
CCA UART Clock rate 100000000Hz
bio: create slab <bio-0> at 0
Switching to clocksource mpcore_gtimer
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
PCI: CLS 0 bytes, default 64
init gpio code
Buffalo WZR-1750DHP
PCI: no core
PCI: no core
PCI: scanning bus 0
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0xffffffff]
pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: [14e4:0800] type 00 class 0x050100
pci 0000:00:00.0: reg 10: [mem 0x18000000-0x18000fff]
pci 0000:00:00.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:01.0: [14e4:050b] type 00 class 0xffffff
pci 0000:00:01.0: reg 10: [mem 0x18001000-0x18001fff]
pci 0000:00:01.0: reg 14: [mem 0x18002000-0x18002fff]
pci 0000:00:01.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:02.0: [14e4:0502] type 00 class 0xffffff
pci 0000:00:02.0: reg 10: [mem 0x1802c000-0x1802cfff]
pci 0000:00:02.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:03.0: [14e4:4715] type 00 class 0x020000
pci 0000:00:03.0: reg 10: [mem 0x18024000-0x18024fff]
pci 0000:00:03.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:04.0: [14e4:4715] type 00 class 0x020000
pci 0000:00:04.0: reg 10: [mem 0x18025000-0x18025fff]
pci 0000:00:04.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:05.0: [14e4:4715] type 00 class 0x020000
pci 0000:00:05.0: reg 10: [mem 0x18026000-0x18026fff]
pci 0000:00:05.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:06.0: [14e4:4715] type 00 class 0x020000
pci 0000:00:06.0: reg 10: [mem 0x18027000-0x18027fff]
pci 0000:00:06.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:07.0: [14e4:0501] type 00 class 0xffffff
pci 0000:00:07.0: reg 10: [mem 0x18012000-0x18012fff]
pci 0000:00:07.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:08.0: [14e4:0501] type 00 class 0xffffff
pci 0000:00:08.0: reg 10: [mem 0x18013000-0x18013fff]
pci 0000:00:08.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:09.0: [14e4:0501] type 00 class 0xffffff
pci 0000:00:09.0: reg 10: [mem 0x18014000-0x18014fff]
pci 0000:00:09.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:0a.0: [14e4:0510] type 00 class 0xffffff
pci 0000:00:0a.0: reg 10: [mem 0x1800b000-0x1800bfff]
pci 0000:00:0a.0: reg 14: [mem 0x1800c000-0x1800cfff]
pci 0000:00:0a.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:0b.0: [14e4:471a] type 00 class 0x0c0310
pci 0000:00:0b.0: reg 10: [mem 0x18022000-0x18022fff]
pci 0000:00:0b.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:0b.1: [14e4:471a] type 00 class 0x0c0320
pci 0000:00:0b.1: reg 10: [mem 0x18021000-0x18021fff]
pci 0000:00:0b.1: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:0c.0: [14e4:472a] type 00 class 0x0c0330
pci 0000:00:0c.0: reg 10: [mem 0x18023000-0x18023fff]
pci 0000:00:0c.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:0d.0: [14e4:0503] type 00 class 0xffffff
pci 0000:00:0d.0: reg 10: [mem 0x18020000-0x18020fff]
pci 0000:00:0d.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:0e.0: [14e4:0506] type 00 class 0xffffff
pci 0000:00:0e.0: reg 10: [mem 0x18210000-0x1821ffff]
pci 0000:00:0e.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:0f.0: [14e4:0507] type 00 class 0xffffff
pci 0000:00:0f.0: reg 10: [mem 0x18010000-0x18010fff]
pci 0000:00:0f.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:10.0: [14e4:0508] type 00 class 0xffffff
pci 0000:00:10.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:11.0: [14e4:0509] type 00 class 0xffffff
pci 0000:00:11.0: reg 10: [mem 0x18028000-0x18028fff]
pci 0000:00:11.0: reg 30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:12.0: [14e4:050a] type 00 class 0xffffff
pci 0000:00:12.0: reg 10: [mem 0x18029000-0x18029fff]
pci 0000:00:12.0: reg 30: [mem 0x00000000-0x000007ff pref]
PCI: Fixing up bus 0
PCIE1 link=1
PCIE1 switching to GEN2
PCIE1 link=1
PCI host bridge to bus 0001:00
pci_bus 0001:00: root bus resource [mem 0x08000000-0x0fffffff]
pci_bus 0001:00: No busn resource found for root bus, will use [bus 00-ff]
pci 0001:00:00.0: [14e4:8011] type 01 class 0x060400
pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
PCI: Fixing up bus 0
PCI: bus0: Fast back to back transfers disabled
pci 0001:01:00.0: [14e4:4360] type 00 class 0x028000
pci 0001:01:00.0: reg 10: [mem 0x08000000-0x08007fff 64bit]
pci 0001:01:00.0: supports D1 D2
PCI: Fixing up bus 1
PCI: bus1: Fast back to back transfers disabled
pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
pci_bus 0001:00: busn_res: [bus 00-ff] end is updated to 01
pci 0001:00:00.0: BAR 8: assigned [mem 0x08000000-0x080fffff]
pci 0001:01:00.0: BAR 0: assigned [mem 0x08000000-0x08007fff 64bit]
pci 0001:00:00.0: PCI bridge to [bus 01]
pci 0001:00:00.0:   bridge window [mem 0x08000000-0x080fffff]
PCIE2 link=1
PCIE2 switching to GEN2
PCIE2 link=1
PCI host bridge to bus 0002:00
pci_bus 0002:00: root bus resource [mem 0x40000000-0x47ffffff]
pci_bus 0002:00: No busn resource found for root bus, will use [bus 00-ff]
pci 0002:00:00.0: [14e4:8011] type 01 class 0x060400
pci 0002:00:00.0: PME# supported from D0 D3hot D3cold
PCI: Fixing up bus 0
PCI: bus0: Fast back to back transfers disabled
pci 0002:02:00.0: [14e4:4331] type 00 class 0x028000
pci 0002:02:00.0: reg 10: [mem 0x00000000-0x00003fff 64bit]
pci 0002:02:00.0: supports D1 D2
PCI: Fixing up bus 2
PCI: bus2: Fast back to back transfers disabled
pci_bus 0002:02: busn_res: [bus 02-ff] end is updated to 02
pci_bus 0002:00: busn_res: [bus 00-ff] end is updated to 02
pci 0002:00:00.0: BAR 8: assigned [mem 0x40000000-0x400fffff]
pci 0002:02:00.0: BAR 0: assigned [mem 0x40000000-0x40003fff 64bit]
pci 0002:00:00.0: PCI bridge to [bus 02]
pci 0002:00:00.0:   bridge window [mem 0x40000000-0x400fffff]
PCIE3 link=0
Error creating gpio class
squashfs: version 3.0 (2006/03/15) Phillip Lougher
msgmni has been set to 239
alg: No test for stdrng (krng)
io scheduler noop registered (default)
io scheduler cfq registered
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18000300 (irq = 117) is a 16550
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x18000400 (irq = 117) is a 16550
brd: module loaded
loop: module loaded
Boot partition size = 262144(0x40000)
Creating 3 MTD partitions on "bcmsflash":
0x000000000000-0x000000040000 : "boot"
0x0000000f0000-0x000000100000 : "nvram_cfe"
0x0000000e0000-0x0000000f0000 : "nvram"
Found a Esmt NAND flash:
Total size:  128MB
Block size:  128KB
Page Size:   2048B
OOB Size:    64B
Sector size: 512B
Spare size:  16B
ECC level:   8 (8-bit)
Device ID: 0x92 0xf1 0x80 0x95 0x40 0x7f
lookup_nflash_rootfs_offset: offset = 0x0, 0x20000
found TRX Header on nflash!
nflash: squash filesystem with lzma found at block 11
Creating 2 MTD partitions on "nflash":
0x000000000000-0x000002000000 : "linux"
0x000000160000-0x000002000000 : "rootfs"
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
GACT probability NOT on
Mirror/redirect action on
Failed to load ipt action
Simple TC action Loaded
netem: version 1.3
u32 classifier
    Performance counters on
    input device check on
    Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (8057 buckets, 32228 max)
nf_conntrack_rtsp v0.6.21 loading
xt_time: kernel timezone is -0000
ip_set: protocol 6
gre: GRE over IPv4 demultiplexor driver
nf_nat_rtsp v0.6.21 loading
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP: bic registered
TCP: cubic registered
TCP: westwood registered
TCP: highspeed registered
TCP: hybla registered
TCP: htcp registered
TCP: vegas registered
TCP: veno registered
TCP: scalable registered
TCP: lp registered
TCP: yeah registered
TCP: illinois registered
NET: Registered protocol family 17
Bridge firewalling registered
8021q: 802.1Q VLAN Support v1.8
found cfe nvram
Key type encrypted registered
Northstar brcmnand NAND Flash Controller driver, Version 0.1 (c) Broadcom Inc. 2012
NAND device: Manufacturer ID: 0x92, Chip ID: 0xf1 (Eon NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
Spare area=64 eccbytes 56, ecc bytes located at:
2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 19 20 21 22 23 24 25 26 27 28 29 30 31 34 35 36 37 38 39 40 41 42 43 44 45 46 47 50 51 52 53 54 55 56 57 58 59 60 61 62 63
Available 7 bytes at (off,len):
(1,1) (16,2) (32,2) (48,2) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (0,0)
Driver must set ecc.strength when using hardware ECC
Scanning device for bad blocks
Bad eraseblock 1023 at 0x000007fe0000
Options: NO_SUBPAGE_WRITE,
Creating 1 MTD partitions on "brcmnand":
0x000002000000-0x000008000000 : "ddwrt"
VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
Freeing unused kernel memory: 232K (c0350000 - c038a000)
softdog: Software Watchdog Timer: 0.08 initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=1)
et: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
et_module_init: passivemode set to 0x0
et_module_init: txworkq set to 0x0
et_module_init: et_txq_thresh set to 0x400
et0: online cpus 2
eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 6.37.14.86 (r456083)
roboswitch: Probing device 'eth0'
roboswitch: trying a 53011! at eth0
roboswitch: found a 53011! at eth0
PCI: Enabling device 0002:02:00.0 (0140 -> 0142)
eth0: mixed HW and IP checksum settings.

root@DD-WRT:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "boot"
mtd1: 00010000 00010000 "nvram_cfe"
mtd2: 00010000 00010000 "nvram"
mtd3: 02000000 00020000 "linux"
mtd4: 01ea0000 00020000 "rootfs"
mtd5: 06000000 00020000 "ddwrt"

you don't need to write the device driver, just add support for this model pointing to the right drivers. If there is no source for the drivers from the manufacturer, then forget it. I don't think there is any such support from Broadcom for their AC radios. DD-WRT has access to Broadcom source that others do not (i.e. it's not truly open source).

Hi Drawz,

  First of all, thank you for your reply.

  Well, I'm very interested in running OpenWRT in that hardware even if it's not possible for me to use the WiFi interface.

  I understood you concern about the drivers, but I'm little bit lost about how to do the porting itself. Do you know any OpenWRT documentation (tutorial) that explains how to port a new hardware to OpenWRT?

  It's kind of new topic for me and any help would be appreciated.

  Thanks ...

[]s
Ronaldo

@ronaldoafonso: just boot bcm53xx, see what is not working and develop needed drivers.

Hi Guys,

  Well, after some studying about WZR-1750-DHPD, I have reached the following conclusions:

  1) It's bootloader is CFE and not U-Boot. The good news is that I have console access to that device:

Welcome to minicom 2.6.1

OPTIONS: I18n
Compiled on Feb 11 2012, 18:56:01.
Port /dev/ttyUSB0

Press CTRL-A Z for help on special keys



BUFFALO CFE Version 1.00  [DDRCLK:400]
Memory Test start(0x07E00000) end(0x08000000) size(2097152)
Data line test start:0x07e00000 pattern 0x00000001 0x00000003 0x00000007 0x0000000F 0x00000005 0x00000015 0x00000055 0xAAAAAAAA
Address line test start:0x07e00000 len:0x200000 pattern 0xAAAAAAAA 0x55555555 
Fill test patnum:2
fill Pattern 5555AAAA  Writing...   Reading...
fill Pattern AAAA5555  Writing...   Reading...
decompressing
Decompressing...done
Found a ST compatible (Marconix) serial flash with 16 64KB blocks; total size 1MB
et0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 6.30.163.18 (r377098)

  2) I have compiled the latest trunck version of OpenWRT (revision 42418) and it produced the following file:

    bin/bcm53xx/openwrt-bcm4708-netgear-r6250-squashfs.chk

  So, now I have the following question:

   1) How I can use that ".chk" file?

  I don't have any idea about how to flash the router using that file.

  Thanks for you reply ...

[]s
Ronaldo

Where the dd-wrt for this router could be accessible?
If it works, I just try to guess if it's arch is based on dtb, or on hard-coded definitions.
If dtb - it would be more glue to try this (and other) systems 'northstar prototype'.

The discussion might have continued from here.