Bootlog:
U-Boot usw-v1.1.4.115-g14af1ee6 (Feb 14 2017 - 18:50:54)
DEV ID= 0000db56
SKU ID = 0x8342
DDR type: DDR3
MEMC 0 DDR speed = 667MHz
Validate Shmoo parameters stored in flash ..... OK
Press Ctrl-C to run Shmoo ..... skipped
Restoring Shmoo parameters from flash ..... done
Running simple memory test ..... OK
DDR Tune Completed
DRAM: 256 MiB
WARNING: Caches not enabled
soc_pcie_hw_init : port->reg_base = 0x18012000 , its value = 0x4
PCIe port 0 in RC mode
pos is 172
==>PCIE: LINKSTA reg 0xbe val 0x1001
**************
port 0 is not active!!
**************
In: serial
Out: serial
Err: serial
Unlocking L2 Cache ...Done
arm_clk=400MHz, axi_clk=200MHz, apb_clk=50MHz, arm_periph_clk=200MHz
Disabling outer cache
Net: Board Net Initialization Failed
No ethernet found.
Hit any key to stop autoboot: 0
u-boot>
nknown command 'ry 'help'
u-boot> ?
? - alias for 'help'
base - print or set address offset
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
chpart - change active partition
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
echo - echo args to console
env - environment handling commands
exit - exit script
false - do nothing, unsuccessfully
fsinfo - print information about filesystems
fsload - load binary file from a filesystem image
go - start application at address 'addr'
help - print command description/usage
itest - return true/false on integer compare
license - print GPL license text
loadb - load binary file over serial line (kermit mode)
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls - list files in a directory (default /)
md - memory display
mdc - memory display cyclic
mm - memory modify (auto-incrementing address)
mtdparts- define flash/nand partitions
mtest - simple RAM read/write test
mw - memory write (fill)
mwc - memory write cyclic
nm - memory modify (constant address)
pci - list and access PCI Configuration Space
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sf - SPI flash sub-system
showvar - print local hushshell variables
sleep - delay execution for some time
source - run script from memory
sspi - SPI utility command
test - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
tftpsrv - act as a TFTP server and boot the first received file
true - do nothing, successfully
urescue - urescue - start TFTP server and wait for firmware
version - print monitor, compiler and linker version
u-boot> printenv
bootargs=console=ttyS0,115200 mem=128M@0x0 mem=128M@0x68000000 mtdparts=spi1.0:768k(u-boot),64k(u-boot-env),64k(shmoo),15360k(kernel0),15424k(kernel1),1024k(cfg),64k(EEPROM)
bootcmd=run ubntappinit ubntboot
bootdelay=3
ethaddr=00:90:4c:06:a5:72
ipaddr=192.168.1.20
loadaddr=0x01000000
mtdparts=mtdparts=spi1.0:768k(u-boot),64k(u-boot-env),64k(shmoo),15360k(kernel0),15424k(kernel1),1024k(cfg),64k(EEPROM)
serverip=192.168.1.254
stderr=serial
stdin=serial
stdout=serial
ubntaddr=67030020
ubntappinit=go ${ubntaddr} uappinit;go ${ubntaddr} ureset_button;urescue;go ${ubntaddr} uwrite;go ${ubntaddr} ubntboot
ubntboot=bootm 0x01000000
Environment size: 661/65532 bytes
u-boot> ls
incorrect device type in spi0=spi1.0
u-boot>
U-Boot usw-v1.1.4.115-g14af1ee6 (Feb 14 2017 - 18:50:54)
DEV ID= 0000db56
SKU ID = 0x8342
DDR type: DDR3
MEMC 0 DDR speed = 667MHz
Validate Shmoo parameters stored in flash ..... OK
Press Ctrl-C to run Shmoo ..... skipped
Restoring Shmoo parameters from flash ..... done
Running simple memory test ..... OK
DDR Tune Completed
DRAM: 256 MiB
WARNING: Caches not enabled
soc_pcie_hw_init : port->reg_base = 0x18012000 , its value = 0x4
PCIe port 0 in RC mode
pos is 172
==>PCIE: LINKSTA reg 0xbe val 0x1001
**************
port 0 is not active!!
**************
In: serial
Out: serial
Err: serial
Unlocking L2 Cache ...Done
arm_clk=400MHz, axi_clk=200MHz, apb_clk=50MHz, arm_periph_clk=200MHz
Disabling outer cache
Net: Board Net Initialization Failed
No ethernet found.
Hit any key to stop autoboot: 0
ubnt_bootsel_init: bootsel magic=a34de82b, bootsel = 0
UBNT application initialized
Boot partition selected = 0
Loading Kernel Image @ 1000000, size = 15728640
Verifying 'kernel0' parition:OK
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Ubiquiti 5.76.7.13442
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 15429120 Bytes = 14.7 MiB
Load Address: 00018000
Entry Point: 00018000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
boot_prep_linux commandline: console=ttyS0,115200 mem=128M@0x0 mem=128M@0x68000000 mtdparts=spi1.0:768k(u-boot),64k(u-boot-env),64k(shmoo),15360k(kernel0),15424k(kernel1),1024k(cfg),64k(EEPROM) ubntbootid=0
Starting kernel ...
Disabling outer cache
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.6.5 (builder@owrt1505-builder) (gcc version 4.7.2 (OpenWrt GCC 4.7.2 unknown) ) #2 SMP Wed Nov 17 07:30:19 UTC 2021
[ 0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Broadcom iProc
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] BUG: mapping for 0x18000000 at 0xf0000000 out of vmalloc space
[ 0.000000] BUG: mapping for 0x19000000 at 0xf1000000 out of vmalloc space
[ 0.000000] PERCPU: Embedded 7 pages/cpu @c1d07000 s6272 r8192 d14208 u32768
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 61952
[ 0.000000] Kernel command line: console=ttyS0,115200 mem=128M@0x0 mem=128M@0x68000000 mtdparts=spi1.0:768k(u-boot),64k(u-boot-env),64k(shmoo),15360k(kernel0),15424k(kernel1),1024k(cfg),64k(EEPROM) ubntbootid=0 ubootver=usw-v1.1.4.115-g14af1ee6
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Memory: 128MB 128MB = 256MB total
[ 0.000000] Memory: 244640k/244640k available, 17504k reserved, 131072K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xc8800000 - 0xf0000000 ( 632 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0018000 - 0xc03528b0 (3307 kB)
[ 0.000000] .init : 0xc0353000 - 0xc0ea5880 (11595 kB)
[ 0.000000] .data : 0xc0ea6000 - 0xc0ecee00 ( 164 kB)
[ 0.000000] .bss : 0xc0ecee24 - 0xc0efd454 ( 186 kB)
[ 0.000000] SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[ 0.000000] NR_IRQS:292
[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[ 0.010000] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[ 0.050000] pid_max: default: 4096 minimum: 301
[ 0.050000] Mount-cache hash table entries: 512
[ 0.050000] CPU: Testing write buffer coherency: ok
[ 0.050000] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.050000] Setting up static identity map for 0x286c38 - 0x286c90
[ 0.050000] L310 cache controller enabled
[ 0.050000] l2x0: 8 ways, CACHE_ID 0x410000c9, AUX_CTRL 0x0a120000, Cache size: 131072 B
[ 0.050000] Brought up 1 CPUs
[ 0.050000] SMP: Total of 1 processors activated (795.44 BogoMIPS).
[ 0.050000] devtmpfs: initialized
[ 0.060000] NET: Registered protocol family 16
[ 0.060000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.060000] GENPLL[5] mdiv=40 rate=2000000000
[ 0.060000] Sel=1 Ovr=1 Div=48
[ 0.060000] UART clock rate 50000000
[ 0.080000] bio: create slab <bio-0> at 0
[ 0.080000] Bluetooth: Core ver 2.16
[ 0.080000] NET: Registered protocol family 31
[ 0.080000] Bluetooth: HCI device and connection manager initialized
[ 0.080000] Bluetooth: HCI socket layer initialized
[ 0.080000] Bluetooth: L2CAP socket layer initialized
[ 0.080000] Bluetooth: SCO socket layer initialized
[ 0.080000] Switching to clocksource iproc_gtimer
[ 0.090000] NET: Registered protocol family 2
[ 0.090000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.090000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.090000] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.090000] TCP: reno registered
[ 0.090000] UDP hash table entries: 128 (order: 0, 4096 bytes)
[ 0.090000] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
[ 0.090000] NET: Registered protocol family 1
[ 14.860000] pm_init: Initializing Power Management ....
[ 14.860000] iproc gpiochip add GPIOA
[ 14.860000] GPIOA:ioaddr f0000060
[ 14.860000] GPIOA:intr_ioaddr f0000000 dmu_ioaddr (null)
[ 15.110000] PCIE0: LINKSTA reg 0xbe val 0x1001
[ 15.110000] reg[0xac]=0x10, reg[0xae]=0x42, reg[0xb0]=0x8000, reg[0xb4]=0x2c10, reg[0xb6]=0x10, reg[0xb8]=0x5c12, reg[0xba]=0x65, reg[0xbe]=0x1001, reg[0xc6]=0x40, reg[0xca]=0x1, reg[0xd0]=0x1f, reg[0xd2]=0x8, reg[0xdc]=0x2, PCIE0 link=0
[ 15.460000] PCIe port 1 in End-Point mode - ignored
[ 15.460000] Registering iproc_pmu_device
[ 15.460000] bounce pool size: 64 pages
[ 15.470000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 15.470000] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 15.480000] msgmni has been set to 221
[ 15.480000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[ 15.480000] io scheduler noop registered
[ 15.480000] io scheduler deadline registered (default)
[ 15.480000] io scheduler cfq registered
[ 15.480000] Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
[ 15.480000] serial8250.0: ttyS0 at MMIO 0x18000400 (irq = 123) is a 16550A
[ 15.960000] console [ttyS0] enabled
[ 15.960000] serial8250.0: ttyS1 at MMIO 0x18000300 (irq = 123) is a 16550A
[ 15.990000] brd: module loaded
[ 16.010000] loop: module loaded
[ 16.010000] nbd: registered device at major 43
[ 16.040000] tun: Universal TUN/TAP device driver, 1.6
[ 16.040000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[ 16.050000] Bluetooth: HCI UART driver ver 2.2
[ 16.050000] Bluetooth: HCI H4 protocol initialized
[ 16.060000] Bluetooth: HCI BCSP protocol initialized
[ 16.070000] TCP: cubic registered
[ 16.070000] NET: Registered protocol family 10
[ 16.080000] sit: IPv6 over IPv4 tunneling driver
[ 16.090000] NET: Registered protocol family 17
[ 16.090000] Bluetooth: RFCOMM TTY layer initialized
[ 16.090000] Bluetooth: RFCOMM socket layer initialized
[ 16.100000] Bluetooth: RFCOMM ver 1.11
[ 16.100000] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 16.110000] Bluetooth: BNEP filters: protocol multicast
[ 16.110000] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 16.120000] 8021q: 802.1Q VLAN Support v1.8
[ 16.130000] GENPLL[5] mdiv=40 rate=2000000000
[ 16.130000] qspi_iproc qspi_iproc.1: 1-lane output, 3-byte address
[ 16.140000] m25p80 spi1.0: found mx25l25635e, expected m25p80
[ 16.140000] m25p80 spi1.0: mx25l25635e (32768 Kbytes)
[ 16.150000] 7 cmdlinepart partitions found on MTD device spi1.0
[ 16.150000] Creating 7 MTD partitions on "spi1.0":
[ 16.160000] 0x000000000000-0x0000000c0000 : "u-boot"
[ 16.170000] 0x0000000c0000-0x0000000d0000 : "u-boot-env"
[ 16.170000] 0x0000000d0000-0x0000000e0000 : "shmoo"
[ 16.180000] 0x0000000e0000-0x000000fe0000 : "kernel0"
[ 16.190000] 0x000000fe0000-0x000001ef0000 : "kernel1"
[ 16.200000] 0x000001ef0000-0x000001ff0000 : "cfg"
[ 16.200000] 0x000001ff0000-0x000002000000 : "EEPROM"
[ 16.230000] Freeing init memory: 11592K
[ 16.310000] ubnt_common: module license 'Proprietary' taints kernel.
[ 16.320000] Disabling lock debugging due to kernel taint
[ 16.400000] Data abort at addr=0xc8a10224, fsr=0x1406 ignored.
[ 16.400000] Data abort at addr=0xc8a10224, fsr=0x1406 ignored.
[ 16.430000] gpiodev: reset_timeout=3
...running /sbin/init
init started: BusyBox v1.23.2 (2021-11-17 07:22:05 UTC)
[ 51.970000] device eth0 entered promiscuous mode
can't run '/etc/rc.d/rc.platform': No such file or directory
Please press Enter to activate this console.
SwitchBuero-ALT login:
(Pictures are WTFPL in case someone needs them.)
Looks like there is support comming:
openwrt:master
← clayface:master
opened 04:11PM - 16 Mar 21 UTC
This commit adds OpenWrt support for the MX64 and MX65, which use the bcm5862x "… Northstar Plus" platform.
Note that wireless capability on the MX64W and MX65W is not supported, but these devices will work otherwise.
Further, early MX64 units use an A0 variant of the BCM958625 SoC which lacks cache coherency and uses a different "secondary-boot-reg". As a consequence a different device tree is needed.
Installation of OpenWrt requires changing u-boot to a custom version. This is due to the stock u-boot "nand read" command being limited to load only 2MB, in spite of the bootkernel1 and bootkernel2 partitions both being 3MB in the stock layout. It is also required to allow booting via USB and enabling cache coherency.
###########################################################################
MX64 Hardware info:
CPU: Broadcom BCM58625 Cortex A9 @ 1200Mhz
RAM: 2 GB (4 x 4Gb SK Hynix H5TC4G83CFR)
Storage: 1 GB (Micron MT29F8G08ABACA)
Networking: BCM58625 internal switch (5x 1GbE ports)
USB: 1x USB2.0
Serial: Internal header
MX65 Hardware info:
CPU: Broadcom BCM58625 Cortex A9 @ 1200Mhz
RAM: 2 GB (4 x 4Gb SK Hynix H5TC4G83CFR)
Storage: 1 GB (Micron MT29F8G08ABACA)
Networking: BCM58625 internal switch (2x 1GbE ports, used for WAN ports 1 & 2)
2x Qualcomm QCA8337 switches (10x 1GbE ports, used for LAN ports 3 - 12)
PSE: Broadcom BCM59111KMLG connected to LAN ports 11 & 12
USB: 1x USB2.0
Serial: Internal header
The wireless versions of these devices feature the same hardware, with additional 2x Broadcom wireless BCM43520KMLG chips on the PCI bus.
###########################################################################
Initial installation steps:
1. Compile OpenWrt for the MX64 or MX65.
2. If installing onto an MX64, set up a local webserver.
3. On the device, boot into diagnostic mode by holding reset when powering on the device. Continue to hold reset until the orange LED begins to flash white. On used units the white flash may be difficult to see.
4. Plug an Ethernet cable into the first LAN port, set the host to 192.168.1.2 and confirm telnet connectivity to 192.168.1.1.
###########################################################################
U-boot installation: MX65 Only
1. Prepare a USB drive formatted to FAT. Download uboot_mx65 to the USB drive from the following location:
https://github.com/clayface/U-boot-MX64-20190430_MX65
2. Once you have telnet access to the MX65, plug in the USB stick and run the following commands. This is the most dangerous step so please ensure the dd command is entered correctly:
`cd /tmp/media/sda1`
`dd if=uboot_mx65 of=/dev/mtdblock0`
3. Once this has successfully completed, power off the device.
###########################################################################
U-boot installation: MX64 Only
1. Newer fw versions require extra steps to support OpenWrt. To check, please connect via telnet and run:
`cat /sys/block/mtdblock0/ro`
If the result is 1, your mtd0 is locked will need to perform extra steps detailed later. If the result is 0 then skip these.
2. For later reference, run the following command:
`devmem 0x18000000`
If devmem is not found then try:
`devmem2 0x18000000`
If the output begins with anything between "0x3F00-0x3F03" you will need to use the A0 release. For any other output, eg "0x3F04" or higher, use the regular MX64 image.
3. Set up a webserver to serve uboot_mx64 from the following location:
https://github.com/clayface/U-boot-MX64-20190430_MX64
4. (Only if mtd0 is locked) You will also need the mtd-rw.ko kernel module to unlock the partition. An mtd executable is also needed to write the mtd block. These can be downloaded from the previous location. Place these on the web server as well.
5. (Only if mtd0 is locked) Use wget to retrieve the files on the MX64:
`wget http://192.168.1.2/mtd-rw.ko`
`insmod mtd-rw.ko i_want_a_brick=1`
and confirm the unlock is set with dmesg
`mtd-rw: mtd0: setting writeable flag`
7. Download and install u-boot. If you did not need to unlock the mtd0 partition then use dd to write the file, with caution:
`wget http://192.168.1.2/uboot_mx64`
`dd if=uboot_mx64 of=/dev/mtdblock0`
If you needed to unlock the mtd0 partition using the mtd-rw module, run these commands instead to install u-boot instead:
`wget http://192.168.1.2/mtd`
`chmod +x mtd`
`wget http://192.168.1.2/uboot_mx64`
`./mtd write uboot_mx64 /dev/mtd0`
8. Once successfully completed, power off the device
###########################################################################
OpenWrt Installation:
1. Having compiled OpenWrt earlier, please copy the file
`bin/targets/bcm5862x/generic/openwrt-bcm5862x-generic-meraki_XXX-initramfs-kernel.bin`
to a FAT formatted USB drive, where XXX is mx64, mx64a0 or mx65 depending on which device you have. Do not rename the initramfs file.
2. With the USB drive already inserted, power on the device while holding the reset button. A different white/orange flashing pattern will occur shortly after power on. Let go of the reset button. The device is now booting into OpenWrt initramfs stored on the USB drive.
3. Ensuring Ethernet is plugged into a LAN port with IP set in the 192.168.1.0/24 range excluding 192.168.1.1, use SCP to copy the sysupgrade file to 192.168.1.1:/tmp, eg:
`scp bin/targets/bcm5862x/generic/openwrt-bcm5862x-generic-meraki_mx65-squashfs-sysupgrade.bin 192.168.1.1:/tmp`
4. Connect by SSH to 192.168.1.1 and run sysupgrade:
`sysupgrade /tmp/openwrt-bcm5862x-generic-meraki_mx65-squashfs-sysupgrade.bin`
5. OpenWrt should now be installed on the device.
###########################################################################
Notes:
The modified sources for U-boot are available for the MX64 [1] and MX65 [2]
[1] https://github.com/clayface/U-boot-MX64-20190430_MX64
[2] https://github.com/clayface/U-boot-MX64-20190430_MX65
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>