Support for Ubiquiti Edgerouter 4?

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