Adding OpenWrt support for Linksys MR6350

Good evening, if there is an unofficial version of OpenWrt 22.03.2 which I am using and it is really very stable, I use it as a WiFi repeater since the official version only has bridge mode.

Yes, I saw the other changes in the pull request. I probably have the chance to get the device next days. Then I can check if it works as expected

1 Like

Some more information for the deivce:

  • MAC address on the router label seems to be WAN and LAN MAC
  • 2.4GHz MAC is LAN/WAN MAC +1
  • 5GHz MAC is LAN/WAN MAC + 2
  • Serial settings 15200, 8N1

U-Boot commands:

?       - alias for 'help'
base    - print or set address offset
bootipq - bootipq from flash device
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
chpart  - change active partition
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
dcache  - enable or disable data cache
devinfo - device info handling commands
dhcp    - boot image via network using DHCP/TFTP protocol
dumpipq_data- dumpipq_data crashdump collection from memory
dumpipq_flash_data- dumpipq_flash_data crashdump collection and storing in flash
echo    - echo args to console
env     - environment handling commands
exit    - exit script
false   - do nothing, unsuccessfully
fdt     - flattened device tree utility commands
fuseipq - fuse QFPROM registers from memory

go      - start application at address 'addr'
help    - print command description/usage
hw_err_blinking- blinking LED when HW component is error
i2c     - I2C sub-system
icache  - enable or disable instruction cache
imxtract- extract a part of a multi-image
is_sec_boot_enabled- check secure boot fuse is enabled or not

loop    - infinite loop on address range
md      - memory display
mii     - MII utility commands
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - display MMC info
mtdparts- define flash/nand partitions
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
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
secure_authenticate- authenticate the signed image

setenv  - set environment variables
sf      - SPI flash sub-system
showvar - print local hushshell variables
smeminfo- print SMEM FLASH information
source  - run script from memory
test    - minimal test like /bin/sh
tftp    - boot image via network using TFTP protocol
tftpput - TFTP put command, for uploading files to a server
true    - do nothing, successfully
uartrd  - uartrd read from second UART
uartwr  - uartwr to second UART
ubi     - ubi commands
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version

Output of U-Boot printenv:

bootcmd=if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi
bootpart1=set bootargs $partbootargs && nand read $loadaddr $prikern $kernsize && bootm $loadaddr
bootpart2=set bootargs $partbootargs2 && nand read $loadaddr $altkern $kernsize && bootm $loadaddr
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
partbootargs=init=/sbin/init rootfstype=squashfs ubi.mtd=rootfs root=mtd:squashfs rootwait rw
partbootargs2=init=/sbin/init rootfstype=squashfs ubi.mtd=alt_rootfs root=mtd:squashfs rootwait rw

Initramfs cann be booted:

  • Connect serial interface
  • Set up a TFTP server on IP
  • Copy openwrt-ipq40xx-generic-linksys_mr6350-initramfs-zImage.itb to TFTP server
  • Rename file to C0A80101.img
  • Boot up the device and stop in U-Boot
  • Run the following commands after a link has been established:

Initramfs image is started now:

Currently, only LAN3 and LAN4 are working. Wifi scanning is working on 2.4 and 5 GHz.

1 Like

Good afternoon, these are tests, it is normal that errors occur, you must also correct the details that you find along the way and have a stable compilation.

Sure, I'm working on it :slight_smile:
I already fixed the LAN/WAN assignment, now all ports work and are listed in LuCI as expected.
Next step is testing flashing.
Update: Can sucessfully flash the sysupgrade image from the initramfs boot, OpenWrt is starting from flash:

@guidosarducci: Thanks to your PR, not much changes were required to get flashing working. Basic steps:

  • Load the initramfs image
  • Call fw_printenv in OpenWrt after booting
  • Look for entries kernsize=300000
  • Execute "fw_setenv kernsize 500000", confirm the change with fw_printenv
  • Flash sysupgrade image (e.g. via LuCI). Forcing the flash is required

Excellent, there is little left to have a stable version, I hope since this router has a good 4-core processor, 256 RAM, 256 ROM, you have more than 50 megabytes of space to install packages, this is great. :grinning:

Does anybody have more information about this topic? Where does the file come from and which modifications are required?
@guidosarducci: As you created the PR for similar devices, do you know how to create/modify the board files?
@denisr24: This is one of the open topics on my list. Additionally, the following topics are open from my side:

  • USB Port
  • Correct MAC adresses
  • Test WPS/Reset pins
  • Test LED configuration (LEDs basically work but I did not yet test all of them)

Good morning, unfortunately the friend @rwl408 is absent, who was the one who worked on the current functional compilation of openwrt unofficially, did you validate his publication? Comment and detail the changes made.

   On the other hand, I appreciate that you are working on this router that many people have and getting the most out of it since the factory firmware is very limited. :neutral_face:

Here it is:

I didn't test the old images itself, but most of the changes he did were taken over by me

1 Like

Excellent waiting for a stable build for installation.

USB port seems to work in general, at least I get messages when connecting/disconnecting an USB stick:

[  174.980237] usb 2-1: new SuperSpeed USB device number 3 using xhci-hcd
[  182.723270] usb 2-1: USB disconnect, device number 3

LEDs (red, green, blue) are also working as exepcted. There is another LED (usb green) in the DTS, not sure for what it is used.

WPS and reset button work as well

1 Like

When will there be a stable version to install??? I see that the details are already being corrected. :grinning: :grinning: :grinning:

Based on my experience on other devices, we’re talking about weeks or months.
First, the PR must be completed, next there are some reviews/reworks before the pull request is accepted.
After it is accepted, you will get snapshot builds as long as there isn’t a new OpenWrt release.
If there is no backport to version 23.05, the next stable release would be 24.x

1 Like

Thank you very much, I thought it would take less time, I see that it will take a while with the unofficial version OpenWrt 22.03.2 created by @rwl408 for a while which works quite well, I have only noticed the defect that the wan port is lan port 1. I currently have it configured as a wireless repeater and AP and it works perfectly. since the factory firmware is very limited, and it cannot be configured as a wireless repeater.

This is already fixed in my pull request

Would it be possible after you finish it and it is 100% operational? Try it before and not have to wait so long for it to be official???

Some information regarding (not) possible upgrade/downgrade paths. In the following, "main" is the version I'm currently working on, 22.03 is the version which was provided by @rwl408.
:warning: :warning: :warning:

  • Note that it was only tested on one device, not sure if it works for all devices.
  • Precondition for updating to "main" is always that U-Boot was already configured to support kernel sizes of 5MB

:warning: :warning: :warning:

  • :x: "main" downgrade to 22.03 with openwrt-22.03.2-ipq40xx-generic-linksys_mr6350-squashfs-sysupgrade.bin: NOT WORKING
  • :white_check_mark: "main" downgrade to 22.03 with openwrt-22.03.2-ipq40xx-generic-linksys_mr6350-squashfs-factory.bin: working
  • :x: 22.03 upgrade to "main" with openwrt-ipq40xx-generic-linksys_mr6350-squashfs-factory.bin: NOT WORKING
  • :white_check_mark: 22.03 upgrade to "main" with openwrt-ipq40xx-generic-linksys_mr6350-squashfs-sysupgrade.bin: working

Long story short: Don't try to up- or downgrade between these two versions. Always use the TFTP method described in the pull request.

Tricky, because official buils are only proviced by OpenWrt. As far as I saw, @rwl408 modified his build to look like 22.03. Usually, there are restrictions when providing self built images:

I created one, but it's just for testing without any guarantee that it works. I just tested it on my device: