Add support for ASUS RT-AX89X AX6000

Good to know, thanks!

By the way, will the SFP+ port work with transceivers in 1 or 2.5 Gbps modes? From Asus FAQ they only support 10 Gbps mode, but not sure if it's the cage limitation or their firmware is simply not supporting more.

And does this router have several installation partitions that can be swapped for booting in case of some failure (like some other models)?

Hmm..trying to build the trx (to at least flash from uboot). Anyone tried this yet? I wasn't able to make the trx boot correctly when I chose flash at u-boot. Still works to tftp boot the initramfs file directly though.

I think this relates to SFP+ modules firmware more, not talking about this AX98X, even on my Mikrotik switch, most cheap 3rd party RJ45 SFP+ copper get recognized as "multimode 10G SFP+" as a result host device will default it as 10G device, however something like Mikrotik S+RJ10 would indicate itself as 2.5/5/10G based on peer device speed (I remember Supermicro has one that can do the same as well)

1 Like

Main issue is the whole QCA networking stack here as we cannot attach a proper SFP bus on top of the MAC currently, so there is no Phylink support which would change the MAC mode on the fly and no EEPROM decoding to figure out the SFP capabilities.

Based on the @robimarko repository, I compiled my own versions of the OpenWRT images.
Similar installation instructions are here: Asus TUF AX4200 support - #241 by remittor
(download images from the ASUS_RT-AX89X folder)

PS.: I haven't tested anything on this device! Use this at your own risk!!!

1 Like

So it means that it will always try to operate in 10 Gbps?

By default for sure, maybe its possible to force a certain speed via ethtool.

1 Like

Just to follow up, does this router have multiple partitions like let's say Linksys WRT3200ACM or it's all a single partition one?

Reader, Hes talking about this link https://drive.google.com/drive/folders/1c10G1LZuTiCo8dOItq3FV6A3-XK7-QfV

Remittor, I notice that in the folder, you have "initramfs for web". Does this load through the webgui but still stay loaded in memory instead of the routers nand chip?

It seems to me like the final thing for this router is its nand chip.

With each successful call to command sysupgrade, volume linux is deleted and created again (contain kernel image).

???

I am talking about permanent flashing to the nand chip. I read here a while ago that this firmware can only be loaded into ram and work from there.

So if this router is rebooted, the firmware has to be reloaded again.

AFAIK anyway.

initramfs images are loaded once into RAM and do not require additional access to other data storage devices for their operation.
It’s just that in all instructions these images are loaded via TFTP into RAM, and then loaded into another RAM location using the bootm (or other) command.
Any bootloader can easily load an initramfs image into memory directly from flash memory. The main thing is to assemble the image itself correctly.

Each time command sysupgrade is called, volumes linux (kernel), rootfs, rootfs_data are completely reinitialized.
On this device this process is not scary, since a huge partition UBI_DEV is used.

Booting to initramfs; I've tried to flash with the trx file - but this doesn't work, which makes sense as it doesn't contain a root_fs:

root@OpenWrt:/tmp# sysupgrade -v openwrt-24_rt-ax89x-initramfs.trx
ERROR: Incorrect TRX image! Part 'rootfs-1' not found!.
Image check failed.

How do you assemble the trx with the initramfs with the rootfs partition?

Also - I thought I'd bricked it for a bit; just had to do an

mtd erase /dev/mtd9 

to revert to stock fortunately.

TRX-image is needed for flash firmware via AsusWRT!

Do not do this)

Read the instructions carefully!

Yes, upgrading from stock with the trx was the first thing I tried. Sorry if I didn't make that clear. The UI gave an unsuccessful error; UART showed:

Slurp remaining -1 bytes
not support CAP or RE, don't start_amas_lanctrl
[Mastiff]exit.
clean_mode(1) clean_time(5) threshold(17742)
free_caches: memfree=528888.
free_caches: memfree > threshold.
read from stream: 4096
header crc: EE777C03
org header crc: EE777C03
image len: 1153584
header crc: EE777C03
org header crc: EE777C03
image len: 1153584
##### hdr2.tail.sn = 0184
##### hdr2.tail.en = bf68
##### hdr2.tail.key = ff
##### Key = c4
/tmp/linux.trx doesn't support HE20!
check trx fail!!

at least on the older 386 code. The newer 388 code gives the same error on the console, but reboots the router instead.

1 Like

@crajohnson , Thanks for testing!

Everything worked fine here. The image passed the test because there is no message version check fail! in the log.

But this message most likely indicates that the unsquashfs utility was unable to unpack the rootfs part of the image.

disasm
  data_ptr = img + 0x40;
  data_size = bswap32(*((_DWORD *)img + 3));
  LOBYTE(xx) = 0;
  v8 = img;
  do
  {
    v9 = *(_DWORD *)v8;
    v10 = *((_DWORD *)v8 + 1);
    v8 += 8;
    *v2 = v9;
    v2[1] = v10;
    v2 += 2;
  }
  while ( v8 != data_ptr );
  hdr2_tail_sn = *((unsigned __int16 *)img + 0x18);
  hdr2_tail_en = *((unsigned __int16 *)img + 0x19);
  j_cprintf("##### hdr2.tail.sn = %04x\n", hdr2_tail_sn);
  j_cprintf("##### hdr2.tail.en = %04x\n", hdr2_tail_en);
  j_cprintf("##### hdr2.tail.key = %02x\n", (unsigned __int8)img[0x35]);
  enc_sp_extendno = j_nvram_get_int("enc_sp_extendno");
  v14 = hdr2_tail_sn == 0;
  if ( hdr2_tail_sn )
    v14 = hdr2_tail_en == 0;
  if ( v14 || hdr2_tail_sn <= 381 || hdr2_tail_sn == 382 && hdr2_tail_en < enc_sp_extendno )
  {
    j_cprintf("version check fail!\n");
    return 0;
  }
  buf = (unsigned __int8 *)(img + 0x36);
  i = 5;
  xoffset = 0;
  do
  {
    if ( *buf == 0xA9 )
    {
      x3 = buf[3];
      if ( (x3 & 3) == 0 )
      {
        x1 = (unsigned __int8)xx | (buf[1] << 8);
        x2 = buf[2];
        buf += 2;
        xx = x1 | (x2 << 16) & 0xFFFFFF | (x3 << 24);
        xoffset = bswap32(xx);
      }
    }
    --i;
    buf += 2;
  }
  while ( i );
  k1 = img[xoffset + ((data_size + 0x40 - xoffset) >> 1)];
  if ( k1 )
    k2 = (unsigned __int8)(img[xoffset >> 1] + ~k1);
  else
    k2 = (unsigned __int8)((unsigned __int8)img[xoffset >> 1] % 3u - 3);
  if ( j_get_soc_version_major() != 2 || !j_f_exists((int)"/usr/sbin/unsquashfs") )
    return (unsigned __int8)img[0x35] == k2;
  if ( j_d_exists("/tmp/.squashfs-root") )
  {
    j__eval("rm -rf /tmp/.squashfs-root");
  }
  v24 = "/usr/sbin/unsquashfs";
  v25 = "-d";
  v29 = 0;
  v26 = "/tmp/.squashfs-root";
  v27 = img_name;
  v28 = "lib/firmware/IPQ8074A/fw_version.txt";
  j__eval((int)&v24, 0, 0, 0);
  system("ls -al /tmp/.squashfs-root/lib/firmware");
  if ( j_f_exists((int)"/tmp/.squashfs-root/lib/firmware/IPQ8074A/fw_version.txt") )
  {
    unlink("/tmp/.squashfs-root/lib/firmware/IPQ8074A/fw_version.txt");
    return (unsigned __int8)img[0x35] == k2;
  }
  j_dbg("%s doesn't support HE20!\n", img_name);
  j_logmessage_normal("CHKTRX", "%s doesn't support HE20!\n", img_name);
  return 0;

Need to come up with something....

UPD:
Alternatively, you can try to manually create file : /tmp/.squashfs-root/lib/firmware/IPQ8074A/fw_version.txt

UPD2:
You can try rename the file /usr/sbin/unsquashfs to /usr/sbin/unsquashfs_orig

That's just read only though, right?

admin@RT-AX89U-DDE0:/usr/sbin# mv unsquashfs unsquashfs_orig
mv: can't rename 'unsquashfs': Read-only file system

I might be able to initramfs boot the openwrt image and edit the squashfs image to rename that file. I'll give that a try.

Do not do this! This will definitely do harm!
I'm still having a hard time coming up with a simple solution.
But it seems that when assembling the TRX-image, I will have to create an additional squashfs image and implement it into TRX....