Incorrect Hardware Target for Official OpenWrt ASUS RT-AC58U image?

Hi All! This is my first post in this forum, although I've installed OpenWrt on a few different devices in the past. I'm not a linux expert at all, but some of the features OpenWrt has are fantastic! I'm a big fan of this project.

I've recently purchased an ASUS RT-AC58U and gotten OpenWrt installed on it. That process was more difficult than I expected it to be and it seems like maybe I had to go a wee bit outside of the usual process for installing OpenWrt.

First I read this forum thread:

That thread seemed to suggest that I would have to physically open the router and use a specialised usb cable to modify it. I'm glad I didn't do that.

I subsequently found @zyxmon's guide here:
http://lede-ac58u.zyxmon.org/HowToFlashENG.html
Along with the related firmware versions here:
http://lede-ac58u.zyxmon.org/firmware/

Using that guide and the associated firmware I managed to get my router running:

Blockquote
Model: ASUS RT-AC58U
Firmware Version: OpenWrt SNAPSHOT r1834-0f04829 / LuCI Master (git-18.077.69876-c575c78)
Kernel Version: 4.9.86

When I first got the router running in this state I wasn't sure if this was the correct firmware to run (it is a snapshot version, rather than the stable release at: https://openwrt.org/toh/asus/rt-ac58u )

So I did another flash from the version quoted above to "openwrt-18.06.1-ipq40xx-asus_rt-ac58u-squashfs-sysupgrade.bin". That flash worked alright, but once I had installed it, any time the router was powered off the web gui would become inaccessible, ssh sessions would be rejected, and I would have to use the factory reset button to regain access to the web-gui. In addition, that version of the firmware also seemed to have an incorrect configuration of the device's switch - I couldn't properly enable vlan tagging for the wan port, which meant that it wouldn't pick up an ip address from my ISP's modem. Of course, this could just be because I'm still a bit of a newbie when it comes to setting up advanced configurations of routers, but using zyxmon's firmware, after I'd flashed back to that firmware again, I was easily able to tag vlan 10 on the wan port and the router got an ip address from our modem immediately.

So then I wanted to install luci-app-sqm, but when I tried to install that, the router gives me this error:

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-app-sqm:
 * 	iptables-mod-ipopt * 	iptables-mod-conntrack-extra * 
 * opkg_install_cmd: Cannot install package luci-app-sqm.

It would be super awesome to be able to get cake to run on it, but when I look through the available packages "iptables-mod-ipopt" and "iptables-mod-conntrack-extra" don't seem to exist, and I suspect that if there is a solution for this problem the tecnical ability required is greater than what I currently possess. If anyone knows how to go about this, I'd be very pleased to get some advice!

Anyway, I thought it might be good to have all of this information linked in one place, rather than having to search through several different topics and links to get it as I had to.

Cheers!

That is not going to be possible. SQM depends on its corresponding kernel modules, which in turn depend on the exact kernel version in use (exact really means identical, same minor version, same kernel config, same hash over the config) - this means all kernel modules (effectively) need to be part of the same build as the firmware image itself. This is obviously the case for all stable versions or LEDE/ OpenWrt and is partially possible for official snapshot builds, where corresponding module packages are kept for a few days (weeks?) - this is not a given for personal or third party (community) builds, where the hash differs pretty much by definition.

If you want to be able to install kernel modules on your router, you need to either build it all yourself from source, fetch them from the 3rd party providing the firmware image or use an official OpenWrt release image (which means 18.06.0 or 18.06.1 for your router at this time).

Yes, so there is a technical solution to the problem, but it is a long way beyond my skillset. I wouldn't even know where to begin with most of that, and it seems to me that the official OpenWrt release image doesn't actually work with the hardware (although, I haven't tried 18.06.0, only 18.06.1, but I assume that the differences between these releases are not so large as to cause the router to be non-functional in one but not the other?).

The thing I notice is that zyxmon's image identifies the target hardware as ipq806x, whereas the official OpenWrt release identifies the target hardware as ipq40xx, even though the model of the device, Asus RT-AC58U, is the same in both cases, and there do not seem to be any revisions/versions of the device listed on the ToH.

After sysupgrade, you should reboot the router by "reboot" in the terminal or LUCI. then you can use the power off button.
In case you cant access the web gui, you need to connect to the router via openwrt's failsafe mode to reset (mount_root and firstboot).

Yes, I did reboot from the software menu after the sysupgrade, several times.

You should try again since RT-AC58U is one of the well-rounded trouble-free openwrt routers nowaday.

  1. try to go back stock firmware
  2. flash the openwrt-18.06.1-ipq40xx-asus_rt-ac58u-initramfs-fit-uImage.itb
  3. flash the sysupgrade
  4. If you can accces Luci after sysupgrade, boot the router in OpenWrt falsafe mode then mount_root and firstboot.

I've done above procedures several times with my routers.

I'm not convinced. Why would the firmware zyxmon produced have a different hardware target (ipq806x) than the offical image (ipq40xx)? Given that zyxmon's firmware worked immediately and without problems, and the official image had a lot of problems and a different hardware target, why should I expect that doing a reinstall of the one that didn't immediately work would fix problems that aren't present at all with zyxmon's firmware?

Support for ipq40xx was originally merged into the ipq806x target in OpenWrt, some conflicting configurations for both targets (USB) lead to splitting it up again (after it had been part of ipa806x for a couple of months).

Okay, one more question. Why do you flash the sysupgrade if you successfully flash the itb image in the first place? Aren't they ultimately the same thing? Just that one is meant to be an upgrade from previous systems and the other is a full, clean install?

Sorry I don't know that much in details.

Yeah, I have read through that thread. It sort of makes it look like you must crack your router open and hook up a special sort of usb cable to it. Not really something you want to do with a brand new router, if you can avoid it.

No you needn't. It was the first commit which show how the issue was solved. Now you just need to flash the router twice.

Well, I used zyxmon's instructions to restore the manufacturers firmware, so now I have the Asus firmware on it again, but when I try to flash the .itb file to install OpenWrt, I just get an error message from the Asus firmware:

Blockquote
Invalid Firmware Upload
Firmware upgrade unsuccessful. This might result from incorrect image or error transmission, please check the model name RT-AC58U and version of firmware from support site and try again.

So at this point I'm really very confused about what the procedure is meant to be for getting OpenWrt onto this router. zyxmon's snapshot firmware didn't seem to be stable, as the router was becoming unresponsive every other day or so. Flashing the official OpenWrt firmware image after zyxmon's image seemed to produce some problems in the router's function, and I don't know how to flash the official OpenWrt image directly from the manufacturers firmware, that doesn't seem to work. It's a bit of a bummer, but it's starting to look like I might just have to stick with the Asus firmware.

Maybe ASUS prevents the router from being upgraded to Openwrt with latest firmware. You can downgrade the Asus firmware and try again.
Try instruction from below link which works for me.
https://4pda.ru/forum/index.php?showtopic=790326&st=300#entry62828141. It's in Russian, you can use Google translate.

That basically just takes me back to the method zyxmon used, which I've already tried, and which doesn't tell you to flash the .itb file at any point. There's no link to older ASUS firmware which is supposed to work for a straight upgrade to the .itb image on that page, and the method it recommends requires the use of a non-official OpenWrt image which re-partitions the flash memory of the router. I'm sure I could use that to flash it again, but that was exactly what I did last time, so I have no reason to assume it will work just because I do it a second time.