Linksys MR8300

From Leo's Notes
Last edited on 11 December 2023, at 00:56.

Installing OpenWRT[edit | edit source]

A stock MR8300 can run the latest version of OpenWRT. However, you must first install OpenWRT 22.03 first, adjust a boot parameter, before being able to flash OpenWRT 23.05 properly.

These are the steps I went through to install OpenWRT 23.05 on a brand new MR8300.

  1. Log in to the Linksys UI at 192.168.1.1. Reset the password if you need to using the pin printed on the underside of the device.
  2. Click on 'Connectivity' and then the 'CA' link at the bottom of the page.
  3. Download the OpenWRT 22.03 factory.bin file (https://downloads.openwrt.org/releases/22.03.5/targets/ipq40xx/generic/openwrt-22.03.5-ipq40xx-generic-linksys_mr8300-squashfs-factory.bin).
  4. Upload the .bin file. Acknowledge the "Unrecognized file name" warning.
  5. After the device reboots, you should be able to login to luci at 192.168.1.1. You're now running OpenWRT 22.03.
  6. SSH into the device and tweak the boot parameters: fw_setenv kernsize 500000
  7. Install the luci-app-advanced-reboot package and then reboot back into Linksys.
  8. In the Linksys firmware, flash the OpenWRT 23.05 factory.bin file (https://downloads.openwrt.org/releases/23.05.2/targets/ipq40xx/generic/openwrt-23.05.2-ipq40xx-generic-linksys_mr8300-squashfs-factory.bin)
  9. After the device reboots, you should be able to login to luci at 192.168.1.1. You're now running OpenWRT 23.05. From now on, you should also be able to do a sysupgrade.

Notes on OpenWRT 22.03[edit | edit source]

After flashing OpenWRT 22.03 from the Linksys firmware, these are the stock boot params:

root@OpenWrt:~# fw_printenv
altkern=5f80000
baudrate=115200
boot_ver=1.3.3
bootcmd=if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi
bootdelay=2
bootpart1=set bootargs $partbootargs && nand read $loadaddr $prikern $kernsize && bootm $loadaddr
bootpart2=set bootargs $partbootargs2 && nand read $loadaddr $altkern $kernsize && bootm $loadaddr
ethact=eth0
ethaddr=00:03:7f:xx:xx:xx
flash_type=2
flashimg=tftp $loadaddr $image && nand erase $prikern $imgsize && nand write $loadaddr $prikern $filesize
flashimg2=tftp $loadaddr $image && nand erase $altkern $imgsize && nand write $loadaddr $altkern $filesize
image=rogue.img
imgsize=5800000
ipaddr=192.168.1.1
kernsize=300000
loadaddr=84000000
machid=8010006
netmask=255.255.255.0
partbootargs=init=/sbin/init rootfstype=ubifs ubi.mtd=11,2048 root=ubi0:ubifs rootwait rw
partbootargs2=init=/sbin/init rootfstype=ubifs ubi.mtd=13,2048 root=ubi0:ubifs rootwait rw
prikern=780000
serverip=192.168.1.254
stderr=serial
stdin=serial
stdout=serial
boot_part_ready=3
boot_part=2

To adjust the kernsize, run:

# fw_setenv kernsize 500000

## Verify
# fw_printenv

Install luci-app-advanced-reboot. This lets you select which partition to reboot into. If you want to keep the Linksys firmware, you will have to reboot into the linksys firmware and then re-flash OpenWRT with the upgrade.

# opkg update
# opkg install luci-app-advanced-reboot

Log out of luci and then log back in in order to see the advanced reboot option in the navigation. See more at: https://docs.openwrt.melmac.net/luci-app-advanced-reboot/