Support for Ubiquiti Edgerouter 4?

I am out of US so it would probably cost quite a lot.
I am sure somebody from US is interested

do you know who was the original developer who got openwrt on the edgerouter lite?

See https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=3a2040ffee99053070cd3f0424f40f64ba6403c9

Does John's email still work? I tried it and it bounces back to gmail.

You could try to catch @blogic here in the forum.

not played with octeon in ages I am afraid.

I just brought up a CN7020 Octeon3 Device. This would give me a reason to create an Octeon3 target rather than OcteonPlus.

At the very least, it'll give you a big start on adding it yourself.

2 Likes

hello, is there any update if there is stable openwrt port on edgerouter4? thanks

In the Snapshot repo. New devices won't see "official" support until 20.xx releases, but Snapshots are available now

but i cant see openwrt page with description how to flash it on the device

Ping @damex

flash instructions are available at git commit message https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=dd651e54cc5eadba480a56a7d2c18471e560f491 that adds device support

4 Likes

Hi,

I just got a brand new EdgeRouter 4 and followed the instructions from the git commit, but I cannot mount the FAT32 partition from the USB drive once the initramfs is loaded, there is no /dev/sda1 device:

SPI stage 1 bootloader
SPI ID: c2:20:17:c2:20
header found at offset 0x2000
Image 1.2: address: 0xffffffffc0000000, header length: 192, data length: 359416
Validating data...
Starting next bootloader at 0xffffffff81000000
Board type: UBNT_E300

U-Boot 2013.07 (UBNT Build Version: e300_001_3f6cf) (Aug 27 2018 - 07:16:24)

Octeon unique ID: 064000018321f31e050b
N0.LMC0 Configuration Completed: 1024 MB
Warning: Board descriptor tuple not found in eeprom, using defaults
Core clock: 1000 MHz, IO clock: 400 MHz, DDR clock: 533 MHz (1066 Mhz DDR)
Start hw_watchdog_start!
Stop hw_watchdog_start!
Base DRAM address used by u-boot: 0x4fc00000, size: 0x400000
DRAM: 1 GiB
Clearing DRAM...... done

SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Found valid SPI bootloader at offset: 0x5c000, size: 1438728 bytes
Found valid SPI bootloader at offset: 0x200000, size: 1438728 bytes
Loading bootloader from SPI offset 0x200000, size: 1438728 bytes


U-Boot 2013.07 (UBNT Build Version: e300_003_6be37) (Jun 05 2019 - 08:57:57)

Octeon unique ID: 064000018321f31e050b
Using DRAM size from environment: 1024 MBytes
Core clock: 1000 MHz, IO clock: 400 MHz, DDR clock: 533 MHz (1066 Mhz DDR)
Base DRAM address used by u-boot: 0x4f000000, size: 0x1000000
DRAM: 1 GiB
Clearing DRAM...... done
SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB
SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB



UBNT_E300 r1:0, r2:15, serial #: E063DAE51559
MPR 13-02427-15
Loading bootloader from SPI offset 0x200000, size: 1438728 bytes


U-Boot 2013.07 (UBNT Build Version: e300_003_6be37) (Jun 05 2019 - 08:57:57)

Octeon unique ID: 064000018321f31e050b
Using DRAM size from environment: 1024 MBytes
Core clock: 1000 MHz, IO clock: 400 MHz, DDR clock: 533 MHz (1066 Mhz DDR)
Base DRAM address used by u-boot: 0x4f000000, size: 0x1000000
DRAM: 1 GiB
Clearing DRAM...... done
SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB
SF: Detected MX25L6405D with page size 256 Bytes, erase size 4 KiB, total 8 MiB



UBNT_E300 r1:0, r2:15, serial #: E063DAE51559
MPR 13-02427-15
Flash boot bus region not enabled, skipping NOR flash config
DLM0: QSGMII ports selected
DLM1: mini-PCIe slots selected
DLM2: mini-PCIe slots selected
SPI: SPI NOR enabled
MMC:   Octeon MMC/SD0: 0
PCIe: Link timeout on port 0, probably the slot is empty
PCIe: Port 1 not in PCIe mode, skipping
PCIe: Port 2 not in PCIe mode, skipping
PCI console init succeeded, 1 consoles, 1024 bytes each
Net:   octeth0, octeth1 [PRIME], octeth2, octeth3
Node 0 Interface 0 has 4 ports (QSGMII)
Node 0 Interface 1 has 4 ports (QSGMII)
Node 0 Interface 2 has 4 ports (NPI)
Node 0 Interface 3 has 4 ports (LOOP)
Node 0 Interface 4 has 1 ports (AGL)
Type the command 'usb start' to scan for USB storage devices.

Hit any key to stop autoboot:  0
Octeon ubnt_e300(ram)# usb start
Octeon ubnt_e300(ram)# fatload usb 0:1 0x20000000 openwrt-octeon-ubnt_edgerouter-4-initramfs-kernel.bin
reading openwrt-octeon-ubnt_edgerouter-4-initramfs-kernel.bin
16676872 bytes read in 0 ms

Octeon ubnt_e300(ram)# bootoctlinux 0 numcores=4 endbootargs mem=0
Allocating memory for ELF segment: addr: 0xffffffff81100000 (adjusted to: 0x1100000), size 0x213cdc8
## Loading big-endian Linux kernel with entry point: 0xffffffff81784ea0 ...
Bootloader: Done loading app on coremask:
 0xf
Starting cores:
 0xf
[    0.000000] Linux version 5.4.85 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r15339-bc99b56d7e)) #0 SMP Thu Dec 24 16:23:41 2020
[    0.000000] Skipping L2 locking due to reduced L2 cache size
[    0.000000] CVMSEG size: 0 cache lines (0 bytes)
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 000d9602 (Cavium Octeon III)
[    0.000000] Checking for the multiply/shift bug... no.
[    0.000000] Checking for the daddiu bug... no.
[    0.000000] Kernel sections are not in the memory maps
[    0.000000] Wasting 278528 bytes for tracking 4352 unused pages
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Using appended Device Tree.
[    0.000000] software IO TLB: mapped [mem 0x0330e000-0x0334e000] (0MB)
[    0.000000] Primary instruction cache 78kB, virtually tagged, 39 way, 16 sets, linesize 128 bytes.
[    0.000000] Primary data cache 32kB, 32-way, 8 sets, linesize 128 bytes.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000001100000-0x00000000efffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000001100000-0x000000000323cfff]
[    0.000000]   node   0: [mem 0x0000000003300000-0x000000000fafffff]
[    0.000000]   node   0: [mem 0x0000000020000000-0x000000004ebfffff]
[    0.000000] Zeroed struct page in unavailable ranges: 10947 pages
[    0.000000] Initmem setup node 0 [mem 0x0000000001100000-0x000000004ebfffff]
[    0.000000] percpu: Embedded 18 pages/cpu s35872 r8192 d29664 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 247272
[    0.000000] Kernel command line:  root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 952208K/1004788K available (6703K kernel code, 373K rwdata, 1628K rodata, 8628K init, 16691K bss, 52580K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=128, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     CONFIG_RCU_FANOUT set to non-default value of 32.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=4.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 127
[    0.000000] CIB interrupt controller probed: 800107000000e000 23
[    0.000000] CIB interrupt controller probed: 800107000000e200 12
[    0.000000] CIB interrupt controller probed: 800107000000e400 6
[    0.000000] CIB interrupt controller probed: 800107000000e600 4
[    0.000000] CIB interrupt controller probed: 800107000000e800 11
[    0.000000] CIB interrupt controller probed: 800107000000e900 11
[    0.000000] CIB interrupt controller probed: 800107000000ec00 15
[    0.000000] random: get_random_bytes called from start_kernel+0x320/0x580 with crng_init=0
[    1.332543] clocksource: OCTEON_CVMCOUNT: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    1.351697] Calibrating delay loop (skipped) preset value.. 2000.00 BogoMIPS (lpj=4000000)
[    1.359922] pid_max: default: 32768 minimum: 301
[    1.364617] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    1.371887] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    1.380312] Checking for the daddi bug... no.
[    1.385079] rcu: Hierarchical SRCU implementation.
[    1.389975] smp: Bringing up secondary CPUs ...
[    1.394624] SMP: Booting CPU01 (CoreId  1)...
[    1.398904] CPU1 revision is: 000d9602 (Cavium Octeon III)
[    1.399271] SMP: Booting CPU02 (CoreId  2)...
[    1.408979] CPU2 revision is: 000d9602 (Cavium Octeon III)
[    1.409321] SMP: Booting CPU03 (CoreId  3)...
[    1.419027] CPU3 revision is: 000d9602 (Cavium Octeon III)
[    1.419128] smp: Brought up 1 node, 4 CPUs
[    1.431295] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    1.440902] futex hash table entries: 1024 (order: 5, 131072 bytes, linear)
[    1.448404] NET: Registered protocol family 16
[    1.458034] PCIe: Initializing port 0
[    1.464876] PCIe: BIST2 FAILED for port 0 (0x0000000000000003)
[    1.635056] random: fast init done
[    3.470573] PCIe: Link timeout on port 0, probably the slot is empty
[    3.476919] PCIe: Initializing port 1
[    3.483889] PCIe: BIST FAILED for port 1 (0xffffffffffffffff)
[    5.496819] PCIe: Link timeout on port 1, probably the slot is empty
[    5.509192] SCSI subsystem initialized
[    5.513013] usbcore: registered new interface driver usbfs
[    5.518398] usbcore: registered new interface driver hub
[    5.523696] usbcore: registered new device driver usb
[    5.528687] EDAC MC: Ver: 3.0.0
[    5.532144] PCI host bridge to bus 0000:00
[    5.536110] pci_bus 0000:00: root bus resource [mem 0x1000000000000]
[    5.542414] pci_bus 0000:00: root bus resource [io  0x0000]
[    5.547967] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    5.554737] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    5.563553] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    5.570070] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    5.580368] clocksource: Switched to clocksource OCTEON_CVMCOUNT
[    5.586923] NET: Registered protocol family 2
[    5.591655] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    5.599901] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    5.607646] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    5.614882] TCP: Hash tables configured (established 8192 bind 8192)
[    5.621204] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    5.627742] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    5.634934] NET: Registered protocol family 1
[    5.639154] PCI: CLS 0 bytes, default 128
[    5.687707] platform 1180068000000.uctl: clocks initialized.
[    5.693927] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    5.706351] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.712169] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    5.723115] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    5.731040] octeon_gpio 1070000000800.gpio-controller: OCTEON GPIO driver probed.
[    5.738600] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    5.746188] printk: console [ttyS0] disabled
[    5.750356] 1180000000800.serial: ttyS0 at MMIO 0x1180000000800 (irq = 45, base_baud = 25000000) is a OCTEON
[    5.760123] printk: console [ttyS0] enabled
[    5.760123] printk: console [ttyS0] enabled
[    5.768444] printk: bootconsole [early0] disabled
[    5.768444] printk: bootconsole [early0] disabled
[    5.778088] octeon_rng octeon_rng: Octeon Random Number Generator
[    5.787985] loop: module loaded
[    5.791181] Loading iSCSI transport class v2.0-870.
[    5.797308] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    5.802335] 3 fixed-partitions partitions found on MTD device spi0.0
[    5.808697] Creating 3 MTD partitions on "spi0.0":
[    5.813496] 0x000000000000-0x000000300000 : "boot0"
[    5.819015] 0x000000300000-0x000000400000 : "dummy"
[    5.824556] 0x000000400000-0x000000410000 : "eeprom"
[    5.830180] spi-octeon 1070000001000.spi: OCTEON SPI bus driver
[    5.836377] libphy: mdio_octeon: probed
[    5.858839] mdio_octeon 1180000001800.mdio: Probed
[    5.863855] libphy: Fixed MDIO Bus: probed
[    5.868764] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.875322] ehci-pci: EHCI PCI platform driver
[    5.879810] ehci-platform: EHCI generic platform driver
[    5.885121] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.891329] ohci-platform: OHCI generic platform driver
[    5.896685] usbcore: registered new interface driver usb-storage
[    5.902994] i2c-octeon 1180000001000.i2c: probed
[    5.907722] octeon_wdt: Initial granularity 5 Sec
[    5.912855] EDAC DEVICE0: Giving out device to module octeon-cpu controller cache: DEV octeon_pc_edac (INTERRUPT)
[    5.923273] EDAC DEVICE1: Giving out device to module octeon-l2c controller octeon_l2c_err: DEV octeon_l2c_edac (POLLED)
[    5.934242] octeon_lmc_edac octeon_lmc_edac.0: Disabled (ECC not enabled)
[    5.966012] Interface 0 has 4 ports (SGMII)
[    5.970285] Interface 1 has 4 ports (SGMII)
[    5.975309] Interface 3 has 4 ports (LOOP)
[    5.985269] NET: Registered protocol family 10
[    5.991219] Segment Routing with IPv6
[    5.995001] NET: Registered protocol family 17
[    5.999503] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    6.012585] 8021q: 802.1Q VLAN Support v1.8
[    6.017317] OF: fdt: not creating '/sys/firmware/fdt': CRC check failed
[    6.027911] Freeing unused kernel memory: 8628K
[    6.032459] This architecture does not have kernel memory protection.
[    6.038902] Run /init as init process
[    6.170673] init: Console is alive
[    6.175016] init: - watchdog -
[    6.182818] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.189731] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.198659] init: - preinit -
[    6.308640] random: jshn: uninitialized urandom read (4 bytes read)
[    6.332865] random: jshn: uninitialized urandom read (4 bytes read)
[    6.352698] random: jshn: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    9.730379] random: crng init done
[   10.444614] procd: - early -
[   10.447542] procd: - watchdog -
[   10.965559] procd: - watchdog -
[   10.968937] procd: - ubus -
[   11.022137] procd: - init -
Please press Enter to activate this console.
[   11.182113] urngd: v1.0.2 started.
[   11.194082] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.213765] xt_time: kernel timezone is -0000
[   11.226069] PPP generic driver version 2.4.2
[   11.231217] NET: Registered protocol family 24
[   11.241294] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.382882] mmc0: new DDR MMC card at address 0001
[   15.388224] mmcblk0: mmc0:0001 MMC4GB 3.64 GiB
[   15.392989] mmcblk0boot0: mmc0:0001 MMC4GB partition 1 2.00 MiB
[   15.399124] mmcblk0boot1: mmc0:0001 MMC4GB partition 2 2.00 MiB
[   15.405211] mmcblk0rpmb: mmc0:0001 MMC4GB partition 3 512 KiB, chardev (251:0)
[   15.413472]  mmcblk0: p1 p2
[   16.014894] br-lan: port 1(lan1) entered blocking state
[   16.020178] br-lan: port 1(lan1) entered disabled state
[   16.025683] device lan1 entered promiscuous mode
[   16.037358] br-lan: port 2(lan2) entered blocking state
[   16.042617] br-lan: port 2(lan2) entered disabled state
[   16.048199] device lan2 entered promiscuous mode
[   16.053016] br-lan: port 2(lan2) entered blocking state
[   16.058278] br-lan: port 2(lan2) entered forwarding state
[   16.063817] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   16.073154] br-lan: port 3(lan3) entered blocking state
[   16.078409] br-lan: port 3(lan3) entered disabled state
[   16.083998] device lan3 entered promiscuous mode
[   16.088835] br-lan: port 3(lan3) entered blocking state
[   16.094093] br-lan: port 3(lan3) entered forwarding state
[   16.113707] lan0: 1000 Mbps Full duplex, port 1, queue 1
[   16.119468] IPv6: ADDRCONF(NETDEV_CHANGE): lan0: link becomes ready
[   17.048840] br-lan: port 2(lan2) entered disabled state
[   17.054692] br-lan: port 3(lan3) entered disabled state



BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r15339-bc99b56d7e
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# mkdir /tmp/sda
root@OpenWrt:/# mount /dev/sda1 /tmp/sda
[  124.423046] /dev/sda1: Can't open blockdev
[  124.427810] /dev/sda1: Can't open blockdev
mount: mounting /dev/sda1 on /tmp/sda failed: No such file or directory

root@OpenWrt:/# ls -l /dev/
crw-------    1 root     root        5,   1 Jan  1  1970 console
crw-------    1 root     root       10,  63 Jan  1  1970 cpu_dma_latency
crw-rw-rw-    1 root     root        1,   7 Jan  1  1970 full
crw-------    1 root     root      254,   0 Jan  1  1970 gpiochip0
crw-------    1 root     root       10, 183 Jan  1  1970 hwrng
crw-------    1 root     root        1,  11 Jan  1  1970 kmsg
srw-rw-rw-    1 root     root             0 Dec 24 16:23 log
crw-------    1 root     root       10, 237 Jan  1  1970 loop-control
brw-------    1 root     root        7,   0 Jan  1  1970 loop0
brw-------    1 root     root        7,   1 Jan  1  1970 loop1
brw-------    1 root     root        7,   2 Jan  1  1970 loop2
brw-------    1 root     root        7,   3 Jan  1  1970 loop3
brw-------    1 root     root        7,   4 Jan  1  1970 loop4
brw-------    1 root     root        7,   5 Jan  1  1970 loop5
brw-------    1 root     root        7,   6 Jan  1  1970 loop6
brw-------    1 root     root        7,   7 Jan  1  1970 loop7
brw-------    1 root     root      179,   0 Dec 24 16:23 mmcblk0
brw-------    1 root     root      179,   8 Dec 24 16:23 mmcblk0boot0
brw-------    1 root     root      179,  16 Dec 24 16:23 mmcblk0boot1
brw-------    1 root     root      179,   1 Dec 24 16:23 mmcblk0p1
brw-------    1 root     root      179,   2 Dec 24 16:23 mmcblk0p2
crw-------    1 root     root      251,   0 Dec 24 16:23 mmcblk0rpmb
crw-------    1 root     root       90,   0 Jan  1  1970 mtd0
crw-------    1 root     root       90,   1 Jan  1  1970 mtd0ro
crw-------    1 root     root       90,   2 Jan  1  1970 mtd1
crw-------    1 root     root       90,   3 Jan  1  1970 mtd1ro
crw-------    1 root     root       90,   4 Jan  1  1970 mtd2
crw-------    1 root     root       90,   5 Jan  1  1970 mtd2ro
brw-------    1 root     root       31,   0 Jan  1  1970 mtdblock0
brw-------    1 root     root       31,   1 Jan  1  1970 mtdblock1
brw-------    1 root     root       31,   2 Jan  1  1970 mtdblock2
crw-rw-rw-    1 root     root        1,   3 Jan  1  1970 null
crw-------    1 root     root        1,   4 Jan  1  1970 port
crw-------    1 root     root      108,   0 Dec 24 16:23 ppp
crw-rw-rw-    1 root     root        5,   2 Jan  1  1970 ptmx
drwxr-xr-x    2 root     root             0 Jan  1  1970 pts
crw-rw-rw-    1 root     root        1,   8 Jan  1  1970 random
lrwxrwxrwx    1 root     root             8 Jan  1  1970 shm -> /tmp/shm
crw-rw-rw-    1 root     root        5,   0 Jan  1  1970 tty
crw-rw----    1 root     dialout     4,  64 Dec 24 16:39 ttyS0
crw-rw----    1 root     dialout     4,  65 Jan  1  1970 ttyS1
crw-rw----    1 root     dialout     4,  74 Jan  1  1970 ttyS10
crw-rw----    1 root     dialout     4,  75 Jan  1  1970 ttyS11
crw-rw----    1 root     dialout     4,  76 Jan  1  1970 ttyS12
crw-rw----    1 root     dialout     4,  77 Jan  1  1970 ttyS13
crw-rw----    1 root     dialout     4,  78 Jan  1  1970 ttyS14
crw-rw----    1 root     dialout     4,  79 Jan  1  1970 ttyS15
crw-rw----    1 root     dialout     4,  66 Jan  1  1970 ttyS2
crw-rw----    1 root     dialout     4,  67 Jan  1  1970 ttyS3
crw-rw----    1 root     dialout     4,  68 Jan  1  1970 ttyS4
crw-rw----    1 root     dialout     4,  69 Jan  1  1970 ttyS5
crw-rw----    1 root     dialout     4,  70 Jan  1  1970 ttyS6
crw-rw----    1 root     dialout     4,  71 Jan  1  1970 ttyS7
crw-rw----    1 root     dialout     4,  72 Jan  1  1970 ttyS8
crw-rw----    1 root     dialout     4,  73 Jan  1  1970 ttyS9
crw-rw-rw-    1 root     root        1,   9 Jan  1  1970 urandom
crw-------    1 root     root       10, 130 Jan  1  1970 watchdog
crw-------    1 root     root      253,   0 Jan  1  1970 watchdog0
crw-rw-rw-    1 root     root        1,   5 Jan  1  1970 zero

I tried with two different USB keys, a 64GB Transcend and a 1GB Swissbit Victorinox one.

Unplugging/replugging the key does not trigger any event in dmesg.

Any idea what may be going on?

Note, this is with today's snapshots:

ubnt_edgerouter-4-initramfs-kernel.bin	fca00c760e7955f6f3d18424100cf18d92e7db6ea9533431cb13d1d83487b813	16286.0 KB	Fri Dec 25 00:50:04 2020
ubnt_edgerouter-4-squashfs-sysupgrade.tar	770932fae7a584b1c416adc3b7a84923a51b5d3b6888d546c95fa6c80a061806	11480.0 KB	Fri Dec 25 00:50:09 2020

I ended up copying the second file from the USB device to the MMC from EdgeOS, before rebooting into U-Boot:

ubnt@ubnt:~$ sudo mount /dev/sda1 /media/
ubnt@ubnt:~$ sudo mount /dev/mmcblk0p1 /mnt/
ubnt@ubnt:~$ sudo cp /media/openwrt-octeon-ubnt_edgerouter-4-squashfs-sysupgrade.tar /mnt/
ubnt@ubnt:~$ sha256sum /mnt/openwrt-octeon-ubnt_edgerouter-4-squashfs-sysupgrade.tar
770932fae7a584b1c416adc3b7a84923a51b5d3b6888d546c95fa6c80a061806  /mnt/openwrt-octeon-ubnt_edgerouter-4-squashfs-sysupgrade.tar
ubnt@ubnt:~$ reboot

Then interrupt boot by pressing a key log in to U-Boot and start initramfs:

Octeon ubnt_e300(ram)# usb start
Octeon ubnt_e300(ram)# fatload usb 0:1 0x20000000 openwrt-octeon-ubnt_edgerouter-4-initramfs-kernel.bin
Octeon ubnt_e300(ram)# bootoctlinux 0 numcores=4 endbootargs mem=0

Then flash the squashfs archive from MMC:

root@OpenWrt:/# mount /dev/mmcblk0p1 /mnt/
root@OpenWrt:/# sysupgrade /mnt/openwrt-octeon-ubnt_edgerouter-4-squashfs-sysupgrade.tar
Thu Dec 24 16:25:37 UTC 2020 upgrade: Image not in /tmp, copying...
Thu Dec 24 16:25:38 UTC 2020 upgrade: Image metadata not present
Cannot save config while running from ramdisk.
Thu Dec 24 16:25:39 UTC 2020 upgrade: Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Thu Dec 24 16:25:39 UTC 2020 upgrade: Sending TERM to remaining processes ... logd netifd odhcpd ntpd dnsmasq ubusd urngd
Thu Dec 24 16:25:42 UTC 2020 upgrade: Sending KILL to remaining processes ... ntpd
[  133.996575] sh (2043): drop_caches: 3
Thu Dec 24 16:25:43 UTC 2020 upgrade: Switching to ramdisk...
Thu Dec 24 16:25:44 UTC 2020 upgrade: Performing system upgrade...
flashing kernel to /dev/mmcblk0p1
flashing rootfs to /dev/mmcblk0p2
618+1 records in
618+1 records out
cp: can't stat '/tmp/sysupgrade.tgz': No such file or directory
Thu Dec 24 16:25:46 UTC 2020 upgrade: Upgrade completed
Thu Dec 24 16:25:47 UTC 2020 upgrade: Rebooting system...
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
[  139.953874] reboot: Restarting system
...

And voilà:

BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r15339-bc99b56d7e
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# uname -a
Linux OpenWrt 5.4.85 #0 SMP Thu Dec 24 16:23:41 2020 mips64 GNU/Linux

Finally cleanup:

root@OpenWrt:/# mount /dev/mmcblk0p1 /mnt/
root@OpenWrt:/# rm /mnt/openwrt-octeon-ubnt_edgerouter-4-squashfs-sysupgrade.tar
5 Likes

I have not flashed my own device yet (will probablly wait for the official version).

But I see you have u-boot version 3 installed, mine did come with version 1 from factory one month ago. Had to do some manual labor to correct the u-boot.

When I look at your install I noticed this.
In the snapshot install instructions there is a line:

  • interrupt boot by pressing button(s) on your keyboard to log in to the uboot (this instruction line is way better when looking at the Er-8 official install instructions!)

In your log:

Node 0 Interface 3 has 4 ports (LOOP)
Node 0 Interface 4 has 1 ports (AGL)
Type the command 'usb start' to scan for USB storage devices.

Hit any key to stop autoboot:  0
Octeon ubnt_e300(ram)#

The timer has counted down to 0 and there are no ‘usb start’ command issued. Did you start the USB interface correct?

In the UI quick start manual it says for the USB port, “it is not functional, left for future use”.

The usb start was properly done in my first test too, it's just a copy/paste mistake. The fatload usb command would have failed otherwise.

Octeon ubnt_e300(ram)# usb start
Octeon ubnt_e300(ram)# fatload usb 0:1 0x20000000 openwrt-octeon-ubnt_edgerouter-4-initramfs-kernel.bin
Octeon ubnt_e300(ram)# bootoctlinux 0 numcores=4 endbootargs mem=0

The issue really was in the initramfs image that failed to see usb devices.

1 Like

@pdecat

Thanks for the tip. No matter what I do I always end here after "bootoctlinux 0 numcores=4 endbootargs mem=0"

[    0.000000] Linux version 5.4.89 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r15541-e87c0d934c)) #0 SMP Tue Jan 19 12:01:03 2021
[    0.000000] Skipping L2 locking due to reduced L2 cache size
[    0.000000] CVMSEG size: 0 cache lines (0 bytes)
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 000d9602 (Cavium Octeon III)
[    0.000000] Checking for the multiply/shift bug... no.
[    0.000000] Checking for the daddiu bug... no.
[    0.000000] Wasting 278528 bytes for tracking 4352 unused pages
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Using appended Device Tree.
[    0.000000] software IO TLB: mapped [mem 0x0330e000-0x0334e000] (0MB)
[    0.000000] Primary instruction cache 78kB, virtually tagged, 39 way, 16 sets, linesize 128 bytes.
[    0.000000] Primary data cache 32kB, 32-way, 8 sets, linesize 128 bytes.
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000001100000-0x00000000efffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000001100000-0x000000000324bfff]
[    0.000000]   node   0: [mem 0x0000000003300000-0x000000000fafffff]
[    0.000000]   node   0: [mem 0x0000000020000000-0x000000004ebfffff]
[    0.000000] Zeroed struct page in unavailable ranges: 10932 pages
[    0.000000] Initmem setup node 0 [mem 0x0000000001100000-0x000000004ebfffff]
[    0.000000] percpu: Embedded 18 pages/cpu s35872 r8192 d29664 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 247286
[    0.000000] Kernel command line:  root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)

With a blinking cursor. I can't type or reconnect. Any idea?

Kind regards,

carstino

I flashed my original firmware v.2 & u-boot 3.0 to OpenWRT 21.02 snapshot today. I first tried the original method but it failed so I then tried your method with positive result.
Used console cable connection.

Actually it works so smooth I would have no problem seeing this method as formal install method if the other one doesn’t work.

The only thing I changed was to shorten the filenames a lot because PuTTY didn’t manage well with the longest lines of text.

1 Like

I used the instructions above, had to copy image on EdgeOS to eMMC (uboot is version 3 on my router). After installing snapshot version (USB+terminal cable), I "upgraded" it to May 30 rc2 version using Sysupgrade. I'm more general purpose user than developer and more of GUI than CLI guy, but without these instructions it would have been impossible to get it up and running.

For me, reasons for choosing OpenWRT and EdgeRouter was 4G/5G wireless internet connection. I do have ZTE MC801A modem which has powerful hardware, but quite sad firmware. My ISP has CG-NAT on 4G, public IPv4 costs extra, public IPv6 is free, /64 prefix without PD. So I need something that can handle this IPv6 and is well documented, and I'll use ZTE as bridge. I can do basic things with Cisco IOS, but IPv6/64 without PD seems to be such new thing, that there aren't too many examples on Cisco side, therefore using OpenWRT. For hardware side, EdgeRouter 4 seems very powerful (I do have C897 and I'm used to snappy hardware in metal enclosure!) and is reasonably priced.

Thanks for damex and other people contributing for ER4-version!

soon after device was implemented - there happened to be a bug (not directly related to edgerouter 4) regarding not having a usb storage available for initramfs. it should be fixed by now and if it is still not - please report back so it could be checked even further.

1 Like