OpenWrt Forum Archive

Topic: Rb751

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

I've made small patch for backfire and trunk  which adds support for new MikroTik RB751 device (http://routerboard.com/pricelist/downlo … ile_id=333).
It's small SOHO wireless router with builtin dual-chain wireless AP and USB port with very affordable price ($59,95).
I tested and everything except wireless works. I haven't been playing a lot with wireless, so most likely is just selection of valid drivers.

Patches can be found here: http://ayufan.eu/local/rb751/
Also there's openwrt-vmlinux-initramfs.elf an precompiled vmlinux kernel with builtin openwrt compilation.

In order to boot image check following tutorial (not mine): http://blog.poettner.de/2011/05/27/open … rd-411750/
After TFTP boot reconnect ethernet cable to port 2 in order to access router at 192.168.1.1.

(Last edited by ayufan on 9 Oct 2011, 15:32)

I managed to list AR5008 wireless card, but still no support for chipset in ath9k.
It looks like that eeprom is missing. New patch can be found on my website.

I try it, but the path do not work anymore, with trunk r29967. Some struct change.

I just got RB751G. Will try to post new version.

I have managed to run wlan on RB751U-2hnd. So stay tunned for next patch smile

(Last edited by ayufan on 7 Feb 2012, 23:34)

I'm trying to get the Routerboard 751 2Hn to work with our OpenWRT tree. I've taken your diff from October 2011, that has the RB751 architecture and applied it. It compiled OK with the exception of the following changes:

ar71xx_pci_init(ARRAY_SIZE(rb751_pci_irqs), rb751_pci_irqs); // Commented this line out, as rb751_pci_irqs was not defined

Changed:
ar71xx_add_device_mdio(~RB751_MDIO_PHYMASK);
to
ar71xx_add_device_mdio(0, ~RB751_MDIO_PHYMASK);

The compile finishes, but when it PXEboots it fails. After the PXEboot fails, mikrotik OS boots back up.

I took your initramfs.elf ( from r30025 folder ) and was able to PXEboot it. I couldn't get into your image, couldn't telnet into 192.168.1.1 and DHCP wasn't being handed out on the LAN. I knew it was booted into OpenWRT based on the behavior of the board.

Are there any patches we are missing? I am modifying our existing RB750 port ( Which works great ), I'm trying to port our build to the Routerboard 751 2Hn. Any help would be greatly appreciated.

Hi,

I fixed patches to work with latest trunk release and added support for WLAN module.
Device automatically creates OpenWrt 802.11ng access point and bridges it with LAN.
I started working on RB751G-2HnD. However, still had no time to port new switch chip.
At least you can connect through WLAN. RB751G-2HnD works great in my home smile

Image configuration:
WAN (dhcp client): Port 1
LAN (dhcp server with 192.168.1.1): Port 2-5 + WLAN

What works:
RB751U-2HnD: Switch Chip on ports 2-5, WAN port 1, WLAN, USB host
RB751G-2HnD: WLAN, USB host

What doesn't work:
RB751U-2HnD: All LEDs
RB751G-2HnD: All LEDs, Switch Chip on ports 2-5, WAN port 1

The latest patch:
http://ayufan.eu/local/rb751/trunk-r30386.diff

Compilations:
trunk - r30025: http://ayufan.eu/local/rb751/r30025/
trunk - r30386: http://ayufan.eu/local/rb751/r30386/

Files:
openwrt-ar71xx-nand-vmlinux-initramfs.elf - kernel image with ramdisk
openwrt-ar71xx-nand-vmlinux.elf - kernel image
openwrt-ar71xx-nand-rootfs.tar.gz - openwrt rootfs

Logs from RB751G-2HnD:

root@atom:~# cat /proc/cpuinfo
system type             : Atheros AR7242 rev 1
machine                 : MikroTik RouterBOARD 751G
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 265.42
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ff8, 0x0ff8, 0x0ff8, 0x0ff8]
ASEs implemented        : mips16
shadow register sets    : 1
kscratch registers      : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00004000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00004000
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 802f7620, node_mem_map 81000000
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16256 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  no-uart gpio=3911 HZ=200000000 mem=64M kmac=00:0C:42:F8:91:34 board=751g boot=1 mlc=2 rootfstype=squashfs,yaffs,jffs2 noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 61592k/65536k available (2210k kernel code, 3944k reserved, 444k data, 192k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:80
[    0.000000] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is MikroTik RouterBOARD 751G
[    0.100000] ar71xx: pll_reg 0xb805002c: 0x62000000
[    0.730000] registering PCI controller with io_map_base unset
[    0.740000] rb7xx: calibration data found
[    0.750000] bio: create slab <bio-0> at 0
[    0.750000] pci 0000:00:00.0: [168c:ff1c] type 0 class 0x000200
[    0.750000] pci 0000:00:00.0: fixup device configuration
[    0.760000] pci 0000:00:00.0: reg 10: [mem 0x00000000-0x0000ffff 64bit]
[    0.760000] pci 0000:00:00.0: supports D1
[    0.760000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.760000] pci 0000:00:00.0: PME# disabled
[    0.760000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[    0.760000] pci 0000:00:00.0: BAR 0: set to [mem 0x10000000-0x1000ffff 64bit] (PCI address [0x10000000-0x1000ffff])
[    0.770000] PCI: mapping irq 72 to pin1@0000:00:00.0
[    0.770000] Switching to clocksource MIPS
[    0.780000] NET: Registered protocol family 2
[    0.780000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.780000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.790000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.790000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.800000] TCP reno registered
[    0.800000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.810000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.820000] NET: Registered protocol family 1
[    0.820000] PCI: CLS 0 bytes, default 32
[    0.840000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.840000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.850000] yaffs built Feb  8 2012 00:03:34 Installing.
[    0.850000]
[    0.850000]
[    0.850000]
[    0.850000]
[    0.850000] YAFFS-WARNING CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED selected.
[    0.850000]
[    0.850000]
[    0.850000]
[    0.850000] msgmni has been set to 120
[    0.860000] io scheduler noop registered
[    0.860000] io scheduler deadline registered (default)
[    0.870000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.890000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.900000] console [ttyS0] enabled, bootconsole disabled
[    1.030000] Atheros AR71xx SPI Controller driver version 0.2.4
[    1.100000] NAND flash driver for the RouterBOARD 750 version 0.1.0
[    1.180000] NAND device: Manufacturer ID: 0x20, Chip ID: 0x76 (ST Micro NAND 64MiB 3,3V 8-bit)
[    1.280000] Scanning device for bad blocks
[    1.430000] Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
[    1.500000] 0x000000000000-0x000000040000 : "booter"
[    1.560000] 0x000000040000-0x000000400000 : "kernel"
[    1.620000] 0x000000400000-0x000004000000 : "rootfs"
[    1.680000] mtd: partition "rootfs" set to be root filesystem
[    1.750000] split_squashfs: no squashfs found in "NAND 64MiB 3,3V 8-bit"
[    2.060000] ar8216: Unknown Atheros device [ver=18, rev=2, phy_id=004dd033]
[    2.280000] ar8216: Unknown Atheros device [ver=18, rev=2, phy_id=004dd033]
[    2.500000] ar8216: Unknown Atheros device [ver=18, rev=2, phy_id=004dd033]
[    2.720000] ar8216: Unknown Atheros device [ver=18, rev=2, phy_id=004dd033]
[    2.940000] ar8216: Unknown Atheros device [ver=18, rev=2, phy_id=004dd033]
[    2.940000] ag71xx_mdio: probed
[    2.980000] eth0: Atheros AG71xx at 0xba000000, irq 5
[    3.590000] eth0: invalid speed specified
[    3.640000] eth0: using fixed link parameters
[    3.650000] ag71xx: probe of ag71xx.1 failed with error -22
[    3.710000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    4.320000] eth0: invalid speed specified
[    4.370000] eth0: using fixed link parameters
[    4.380000] ag71xx: probe of ag71xx.0 failed with error -22
[    4.440000] Atheros AR71xx hardware watchdog driver version 0.1.0
[    4.520000] ar71xx-wdt: timeout=15 secs (max=21)
[    4.520000] TCP westwood registered
[    4.560000] NET: Registered protocol family 17
[    4.610000] Bridge firewalling registered
[    4.660000] 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
[    4.740000] All bugs added by David S. Miller <davem@redhat.com>
[    4.830000] yaffs: dev is 32505858 name is "mtdblock2" ro
[    4.890000] yaffs: passed flags ""
[    4.930000] yaffs: Attempting MTD mount of 31.2,"mtdblock2"
[    6.480000] yaffs_read_super: is_checkpointed 0
[    6.480000] VFS: Mounted root (yaffs filesystem) readonly on device 31:2.
[    6.560000] Freeing unused kernel memory: 192k freed
[    7.830000] Button Hotplug driver version 0.4.1
[   12.450000] ocf: module license 'BSD' taints kernel.
[   12.510000] Disabling lock debugging due to kernel taint
[   12.890000] NET: Registered protocol family 38
[   13.450000] Compat-wireless backport release: compat-wireless-2011-11-29
[   13.530000] Backport based on wireless-testing.git master-2011-12-01
[   13.820000] cfg80211: Calling CRDA to update world regulatory domain
[   14.050000] cfg80211: World regulatory domain updated:
[   14.110000] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   14.210000] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   14.300000] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   14.400000] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   14.490000] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   14.590000] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   15.090000] NET: Registered protocol family 10
[   15.810000] SCSI subsystem initialized
[   16.070000] usbcore: registered new interface driver usbfs
[   16.140000] usbcore: registered new interface driver hub
[   16.210000] usbcore: registered new device driver usb
[   17.730000] PCI: Setting latency timer of device 0000:00:00.0 to 64
[   17.740000] ath: EEPROM regdomain: 0x0
[   17.740000] ath: EEPROM indicates default country code should be used
[   17.740000] ath: doing EEPROM country->regdmn map search
[   17.740000] ath: country maps to regdmn code: 0x3a
[   17.740000] ath: Country alpha2 being used: US
[   17.740000] ath: Regpair used: 0x3a
[   17.740000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   17.740000] Registered led device: ath9k-phy0
[   17.740000] ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=72
[   17.830000] cfg80211: Calling CRDA for country: US
[   18.010000] NET: Registered protocol family 8
[   18.060000] NET: Registered protocol family 20
[   18.120000] cfg80211: Regulatory domain changed to country: US
[   18.190000] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   18.290000] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   18.390000] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   18.480000] cfg80211:     (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   18.580000] cfg80211:     (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   18.670000] cfg80211:     (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   18.770000] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   19.080000] device-mapper: ioctl: 4.20.0-ioctl (2011-02-02) initialised: dm-devel@redhat.com

root@atom:~# lspci
00:00.0 Class 0280: 168c:002a
root@atom:~# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 1058:1021

Feel free to test and post results.

Damn. Tried to implement your patches to help overcome the 751G networking problem and found that the 2.6.39 support your ptaches are built upon have been nuked. It is now on 3.2
Cannot find the machtype.h file for the life of me. Any idea where that went?

Use older revision. The best for me is r30025.

No can do, as I need some upstream fixes in the 650 or so updates since 30025.

I will request nbd's assistance to port your patches into trunk.

ayufan wrote:

Hi,

I fixed patches to work with latest trunk release and added support for WLAN module.
Device automatically creates OpenWrt 802.11ng access point and bridges it with LAN.
I started working on RB751G-2HnD. However, still had no time to port new switch chip.
At least you can connect through WLAN. RB751G-2HnD works great in my home smile

Image configuration:
WAN (dhcp client): Port 1
LAN (dhcp server with 192.168.1.1): Port 2-5 + WLAN

What works:
RB751U-2HnD: Switch Chip on ports 2-5, WAN port 1, WLAN, USB host
RB751G-2HnD: WLAN, USB host

What doesn't work:
RB751U-2HnD: All LEDs
RB751G-2HnD: All LEDs, Switch Chip on ports 2-5, WAN port 1
....
Feel free to test and post results.

Hi !
Thank you !
RB751U-2HnD is UP with r30025 !
The VLAN switch work too. I can use 4 diferent VLAN (eth0.2 to eth0.5) and port 1 (eth1).
The USB port work well with 3G USB modem.

chillifire wrote:

No can do, as I need some upstream fixes in the 650 or so updates since 30025.

I will request nbd's assistance to port your patches into trunk.

Great stuff! I was thinking of doing the same, got one RB751G-2HnD coming in. Looks like a serious contender for the home setup! smile I only wish they could have had two sets of SDRAM pads, it would have been perfect to feed this thing with 128MB RAM as well.

There's still problem with Ethernet ports on RB751G. Ethernet is working only when OpenWRT is run over network from tftp server. But WLAN and rest works great. I have my home setup with 1TB fully encrypted disk wink

No response from nbd on this.

I tried to port the fixes to trunk latest myself, but am not shamed to admit I failed miserably. Most of your patches are easy enough to reply one the right file has been found, but the mach-rb750.c has too many changes in terms of includes, changes constants and function names affecting your code for me to keep up with (since I do not speak C).

We should push through through with these changes as with revision 31011 (generic: ar8216: add support for the AR8327 chip) the AR8327 switch chip is supported.

This is the switch chip built into RB750GL and RB751G-2HnD, while RB750, RB750UP and RB751U-2HnD were using the previously already supported AR7240 (see http://wiki.mikrotik.com/wiki/Manual:Sw … _Features).

So now that this switch is supported by OpenWrt, I suggest we make another effort to port your changes to trunk 31011 or later.


I have a RB750GL and a RB751G-2HnD to test here and know my way around the buildroot system, so I am willing and able to test any any patches that we can come up with.

Great. I'll port them to new release. Just wait few days wink

I started making the new patches, we will see how will it work wink

It booted with full ethernet ports support on RB751G-2HnD. However, I couldnt make wlan-tx work, only wlan-rx, so still working on it.

Thanks a lot for these efforts - RB751G booted and used as 4G wireless router smile
Actually I wouldn't bother running OpenWRT if RouterOs would support Zte MF821 4G stick, but it doesn't and support is not answering to my emails for almost a week now smile

Whatever, openwrt is quite funny to use (MC and other stuff, and of course possibilities comparing with RouterOs are limitless, although mikrotik product is very user friendly), now the chances I would stick with it are not 0.0% smile

Had problem using tftpd32 (yes, I'm not a linux guy), it seems it sends responses as DHCP_OFFER and not BOOTPREPLY, or for whatever reasons mikrotik doesnt accept his replies smile Combination of tftpd32 (for TFTP proto) and DHCPSRV (http://www.dhcpserver.de/, for BOOTP proto) worked fine.

Using RB751G without eth interfaces is a strange thing - can't even play with wireless settings (btw I can't make it work in anything better than MCS-7, can't connect any WIFI devices after setting HT to 40-/+ and got no idea for the moment on how to switch second channel on - will google it later).

Good job anyway, and hoping for having uptodate-allstuffworking version soon, thanks smile

Maybe today or tomorrow smile

Ok. Works. Just needs more tests and will post the results.

(Last edited by ayufan on 22 Mar 2012, 16:28)

Seeing this is probably a good sign? wink

@ brainsuccker

Hi, I am also not getting anywhere with Linux and usually use tftpd. Works fine with the 450 and 450G boards, but the 75x do not accept anything. How do you make the tftpd32 and dhcpserv play together? Can you maybe share your respective ini files? Thanks

(Last edited by chillifire on 23 Mar 2012, 05:28)

chillifire wrote:

Works fine with the 450 and 450G boards, but the 75x do not accept anything.

ouch smile Wouldn't expect their bootloaders to be that different, I thought that's something all routerboards inherit (althrough I was getting suspicious if it was working with RB150 some time ago).

What you need to do is just disable everything beside TFTP server in TFTPD32 (I was also binding TFTP server to particular interface and starting it up only after RouterBoard getting DHCP lease), and everything beside DHCP in DHCPSRV (binding to same ethernet interface, providing next server address (same local address - used as TFTP server address), and bootp file name (available in TFTPD32 download dir, I reduced it to vmlinux.elf).
Ini-files

I fixed tftpd32 (original 4.0 version) to work with Mikrotik routerboot's (at least with RB751G, fix was as simple as removing DHCP_MESSAGE_TYPE option, since mikrotik is expecting BOOTP replies to BOOTP requests smile.  Also some other nullref on unexpected program close fixed.
Download fixed TFTPD32 / TFTPD64 (tftpd32_mikrotik.7z)

(Last edited by brainsucker on 23 Mar 2012, 11:05)