[PATCH v2] ath79: add support for Ubiquiti NanoBeam M5

Jan-Niklas Burfeind git at aiyionpri.me
Wed Apr 20 23:37:46 PDT 2022


The dmesg output you asked for is attached.

Thanks
Jan-Niklas

On 4/21/22 08:34, Jan-Niklas Burfeind wrote:
> Ubiquiti NanoBeam M5 devices are CPE equipment for customer locations
> with one Ethernet port and a 5 GHz 300Mbps wireless interface.
> 
> Specificatons:
> 
> - Atheros AR9342
> - 535 MHz CPU
> - 64 MB RAM
> - 8 MB Flash
> - 1x 10/100 Mbps Ethernet with passive PoE input (24 V)
> - 6 LEDs of which four are rssi
> - 1 reset button
> - UART (4-pin) header on PCB
> 
> Notes:
> 
> The device was supported by OpenWrt in ar71xx.
> 
> Flash instructions (web/ssh/tftp):
> 
> Loading the image via ssh vias a stock firmware prior "AirOS 5.6".
> Downgrading stock is possible.
> 
> * Flashing is possible via AirOS software update page:
> The "factory" ROM image is recognized as non-native and then installed correctly.
> AirOS warns to better be familiar with the recovery procedure.
> 
> * Flashing can be done via ssh, which is becoming difficult due to legacy
> keyexchange methods.
> 
> This is an exempary ssh-config:
> KexAlgorithms +diffie-hellman-group1-sha1
> HostKeyAlgorithms ssh-rsa
> PubkeyAcceptedKeyTypes ssh-rsa
> User ubnt
> 
> The password is ubnt.
> 
> Connecting via IPv6 link local worked best for me.
> 
> 1. scp the factory image to /tmp
> 2. fwupdate.real -m /tmp/firmware_image_file.bin -d
> 
> * Alternatively tftp is possible:
> 
> 1. Configure PC with static IP 192.168.1.2/24.
> 2. Enter the rescue mode. Power off the device, push the reset button on
>     the device (or the PoE) and keep it pressed.
>     Power on the device, while still pushing the reset button.
> 3. When all the leds blink at the same time, release the reset button.
> 4. Upload the firmware image file via TFTP:
> 
> tftp 192.168.1.20
> tftp> bin
> tftp> trace
> Packet tracing on.
> tftp> put firmware_image.bin
> 
> Signed-off-by: Jan-Niklas Burfeind <git at aiyionpri.me>
> ---
>   .../ath79/dts/ar9342_ubnt_nanobeam-m5.dts     | 26 +++++++++++++++++++
>   target/linux/ath79/image/generic-ubnt.mk      |  8 ++++++
>   2 files changed, 34 insertions(+)
>   create mode 100644 target/linux/ath79/dts/ar9342_ubnt_nanobeam-m5.dts
> 
> diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanobeam-m5.dts b/target/linux/ath79/dts/ar9342_ubnt_nanobeam-m5.dts
> new file mode 100644
> index 0000000000..86a5e3a751
> --- /dev/null
> +++ b/target/linux/ath79/dts/ar9342_ubnt_nanobeam-m5.dts
> @@ -0,0 +1,26 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
> +
> +#include "ar9342_ubnt_xw.dtsi"
> +
> +/ {
> +	compatible = "ubnt,nanobeam-m5-xw", "ubnt,xw", "qca,ar9342";
> +	model = "Ubiquiti NanoBeam M5 (XW)";
> +};
> +
> +&mdio0 {
> +	status = "okay";
> +
> +	phy-mask = <0x1>;
> +
> +	phy1: ethernet-phy at 1 {
> +		reg = <1>;
> +		phy-mode = "mii";
> +		reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
> +	};
> +};
> +
> +&eth0 {
> +	status = "okay";
> +
> +	phy-handle = <&phy1>;
> +};
> diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
> index 0b613df62b..9de83d42c2 100644
> --- a/target/linux/ath79/image/generic-ubnt.mk
> +++ b/target/linux/ath79/image/generic-ubnt.mk
> @@ -255,6 +255,14 @@ define Device/ubnt_nanobeam-ac-xc
>   endef
>   TARGET_DEVICES += ubnt_nanobeam-ac-xc
>   
> +define Device/ubnt_nanobeam-m5
> +  $(Device/ubnt-xw)
> +  DEVICE_MODEL := NanoBeam M5
> +  DEVICE_PACKAGES += rssileds
> +  SUPPORTED_DEVICES += loco-m-xw
> +endef
> +TARGET_DEVICES += ubnt_nanobeam-m5
> +
>   define Device/ubnt_nanobridge-m
>     $(Device/ubnt-xm)
>     SOC := ar7241
-------------- next part --------------
[    0.000000] Linux version 5.10.111 (aiyion at chromia) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19508+1-0d2d52df69) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Wed Apr 20 16:26:56 2022
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is Ubiquiti NanoBeam M5 (XW)
[    0.000000] SoC: Atheros AR9342 rev 2
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 144 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 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, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 56188K/65536K available (5459K kernel code, 598K rwdata, 1200K rodata, 1180K init, 201K bss, 9348K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] random: get_random_bytes called from start_kernel+0x3c0/0x5b0 with crng_init=0
[    0.000000] CPU clock: 535.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7144898866 ns
[    0.000011] sched_clock: 32 bits at 267MHz, resolution 3ns, wraps every 8027976190ns
[    0.008331] Calibrating delay loop... 266.64 BogoMIPS (lpj=1333248)
[    0.094957] pid_max: default: 32768 minimum: 301
[    0.100060] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.107865] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.118562] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.129970] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.140503] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.147884] pinctrl core: initialized pinctrl subsystem
[    0.154746] NET: Registered protocol family 16
[    0.229306] clocksource: Switched to clocksource MIPS
[    0.236195] NET: Registered protocol family 2
[    0.241105] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.249634] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.258597] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.266822] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.274351] TCP: Hash tables configured (established 1024 bind 1024)
[    0.281285] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.288274] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.296063] NET: Registered protocol family 1
[    0.300803] PCI: CLS 0 bytes, default 32
[    0.312688] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.324534] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.330814] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.346113] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[    0.353462] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.361223] printk: console [ttyS0] disabled
[    0.365877] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[    0.375146] printk: console [ttyS0] enabled
[    0.384056] printk: bootconsole [early0] disabled
[    0.407168] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    0.412384] 5 fixed-partitions partitions found on MTD device spi0.0
[    0.418834] Creating 5 MTD partitions on "spi0.0":
[    0.423726] 0x000000000000-0x000000040000 : "u-boot"
[    0.433619] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.440313] 0x000000050000-0x0000007b0000 : "firmware"
[    0.448890] 2 uimage-fw partitions found on MTD device firmware
[    0.454995] Creating 2 MTD partitions on "firmware":
[    0.460076] 0x000000000000-0x000000230000 : "kernel"
[    0.467269] 0x000000230000-0x000000760000 : "rootfs"
[    0.473421] mtd: device 4 (rootfs) set to be root filesystem
[    0.480473] 1 squashfs-split partitions found on MTD device rootfs
[    0.486783] 0x000000560000-0x000000760000 : "rootfs_data"
[    0.493424] 0x0000007b0000-0x0000007f0000 : "cfg"
[    0.501506] 0x0000007f0000-0x000000800000 : "art"
[    0.905155] ag71xx 19000000.eth: connected to PHY at mdio.0:01 [uid=004dd023, driver=Qualcomm Atheros AR8032]
[    0.916106] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
[    0.922667] i2c /dev entries driver
[    0.928594] NET: Registered protocol family 10
[    0.945600] Segment Routing with IPv6
[    0.949549] NET: Registered protocol family 17
[    0.954169] 8021q: 802.1Q VLAN Support v1.8
[    0.969573] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.984524] Freeing unused kernel memory: 1180K
[    0.989128] This architecture does not have kernel memory protection.
[    0.995712] Run /sbin/init as init process
[    0.999882]   with arguments:
[    0.999889]     /sbin/init
[    0.999894]   with environment:
[    0.999900]     HOME=/
[    0.999906]     TERM=linux
[    1.796884] init: Console is alive
[    1.801023] init: - watchdog -
[    2.339547] random: fast init done
[    3.151145] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.214708] usbcore: registered new interface driver usbfs
[    3.220472] usbcore: registered new interface driver hub
[    3.225963] usbcore: registered new device driver usb
[    3.241768] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.250536] ehci-fsl: Freescale EHCI Host controller driver
[    3.259501] ehci-platform: EHCI generic platform driver
[    3.269079] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.287122] init: - preinit -
[    5.125688] random: jshn: uninitialized urandom read (4 bytes read)
[    5.634367] random: jshn: uninitialized urandom read (4 bytes read)
[    5.692953] random: jshn: uninitialized urandom read (4 bytes read)
[    8.100783] eth0: link up (100Mbps/Full duplex)
[    8.105438] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.403610] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   10.415933] urandom-seed: Seed file not found (/etc/urandom.seed)
[   10.754308] eth0: link down
[   10.773605] procd: - early -
[   10.776992] procd: - watchdog -
[   11.618792] procd: - watchdog -
[   11.659624] procd: - ubus -
[   12.002244] urandom_read: 5 callbacks suppressed
[   12.002256] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.038538] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.064101] procd: - init -
[   13.572555] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.119378] urngd: v1.0.2 started.
[   14.274901] Loading modules backported from Linux version v5.15.33-0-g06f50ca83ace
[   14.282668] Backport generated by backports.git v5.15.33-1-0-g183c4ab2
[   14.399361] random: crng init done
[   15.076320] PPP generic driver version 2.4.2
[   15.100865] NET: Registered protocol family 24
[   15.233862] ath: EEPROM regdomain: 0x0
[   15.233880] ath: EEPROM indicates default country code should be used
[   15.233886] ath: doing EEPROM country->regdmn map search
[   15.233906] ath: country maps to regdmn code: 0x3a
[   15.233915] ath: Country alpha2 being used: US
[   15.233921] ath: Regpair used: 0x3a
[   15.248596] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   15.251368] ieee80211 phy0: Atheros AR9340 Rev:2 mem=0xb8100000, irq=12
[   15.379877] kmodloader: done loading kernel modules from /etc/modules.d/*
[   57.070849] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   57.077852] jffs2_build_filesystem(): unlocking the mtd device... 
[   57.099385] done.
[   57.107628] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   66.155066] br-lan: port 1(eth0) entered blocking state
[   66.168042] br-lan: port 1(eth0) entered disabled state
[   66.173802] device eth0 entered promiscuous mode
[   69.300850] eth0: link up (100Mbps/Full duplex)
[   69.305521] br-lan: port 1(eth0) entered blocking state
[   69.310880] br-lan: port 1(eth0) entered forwarding state
[   69.376916] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   72.637581] done.
[   72.639657] jffs2: notice: (1532) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   73.003626] overlayfs: upper fs does not support tmpfile.


More information about the openwrt-devel mailing list