Web UI to reboot to another partition (for Linksys/ZyXEL dual-partition routers) and to power off/power down

Do you have an idea if/when @robimarko is going to submit PR to support this router in the OpenWrt repo?

I don't want to discourage you from submitting PR, but until the support is official in the OpenWrt repo, I'd be reluctant to merge your changes because if the router is not officially supported in OpenWrt repo, why merge changes to OpenWrt luci repo for it?

In the mean time, I'll be more than happy to merge your changes to my private source code repo: https://github.com/stangri/source.openwrt.melmac.net/ and build a package for my packages repo: https://github.com/stangri/repo.openwrt.melmac.net containing support for this router.

PS. Please also make sure your PR/commits comply with formalities:

: === Checking commit 'c75dfd129ccd9928a2d73db6eeba7957f2900ea3'
: Author name (tiagofreire-pt) need to be your real name 'firstname lastname'
: Commit subject line MUST start with '<package name>: ' (Update xiaomi-ax9000.json)
: Signed-off-by is missing or doesn't match author (should be 'Signed-off-by: tiagofreire-pt <41837236+tiagofreire-pt@users.noreply.github.com>')
: === Checking commit '47fe23fe31b13300f0da1335df4d3f8be8079300'
: Author name (tiagofreire-pt) need to be your real name 'firstname lastname'
: Commit subject line MUST start with '<package name>: ' (Create xiaomi-ax9000.json)
: Signed-off-by is missing or doesn't match author (should be 'Signed-off-by: tiagofreire-pt <41837236+tiagofreire-pt@users.noreply.github.com>')

Done: https://github.com/stangri/source.openwrt.melmac.net/pull/171

I would appreciate your kind effort to compile this package for IPQ807x target.

1 Like

Thank you, your changes have been merged, the Xiaomi AX9000 is supported in luci-app-advanced-reboot 1.0.1-4 and later.

2 Likes

Where can I get version 1.0.1-4? Trying to install on my AX9000 but it's only showing 1.0.1-3

I'm pretty sure it's covered in the README, have you checked it?

1 Like

Adding the custom repo. Totally missed that thank you!

Hi @stangri,
I am not a programmer, as such I was wondering if you or someone else would be so kind to add support for Linksys WHW01 :

[OpenWrt Wiki] Techdata: Linksys WHW01 v1
[OpenWrt Wiki] Linksys WHW01 v1 (Velop)

I'm not sure if WHW03 is already supported, as I don't have this device :
[OpenWrt Wiki] Techdata: Linksys WHW03 V2
[OpenWrt Wiki] Linksys WHW03 V2

I just bought a couple of these WHW01 brand new for CAD $29 each, their form factor without protruding antennas would make them great for travel as secure APs in the hotel room.

Hardware & software wise, these feel a lot like my EA8300 and MR8300 which have been supported for quite a while now, I would hope adding support should be relatively strait forward at this point.

Any feedback would be appreciated as to the possibility of my wish be granted.

Many thanks in advance !

It's a possibility. @chunkeey or @vtremblay who authored commits to support these devices can create the necessary json files to add support as it's definitely easier with the devices on hand.

In case they're otherwise preoccupied I'll just leave direct links to the commits to have a look at them later:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=9e4ede8344d60d4837e047e9275c21fd2a8f130b

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=b4184c666c13fdf08ecd3abf340538d593e9084c

1 Like

Support for EA8100 v2 please (if it hasn't already been added). It's not available in 23.03.3.

Someone with the device on their desk will have to provide the necessary data in form of a tested patch - this someone might be you.

1 Like

What data do I provide and how do I get it?

I have this much so far:

dev:    size   erasesize  name
mtd0: 00080000 00020000 "boot"
mtd1: 00040000 00020000 "u_env"
mtd2: 00040000 00020000 "factory"
mtd3: 00040000 00020000 "s_env"
mtd4: 00040000 00020000 "devinfo"
mtd5: 00400000 00020000 "kernel"
mtd6: 02400000 00020000 "ubi"
mtd7: 00400000 00020000 "alt_kernel"
mtd8: 02400000 00020000 "alt_rootfs"
mtd9: 00100000 00020000 "sysdiag"
mtd10: 02d00000 00020000 "syscfg"

And the error reporting says linksys,ea8100-v2

1 Like

You can try the luci-app-advanced-reboot 1.0.1-7 from my repo. If you have stock firmware on another partition it may be a one way trip tho.

Let me know how/if it works, so I can create PRs for master and 22.03 branches.

Had to look up the instructions to add your repo again (familiar with it due to VPN policy routing, wonderful app). Will need to wait until later to test it when there's less need for available internet.

So what I pasted was all that you needed? If not, where did you figure it out from? Curious to learn a little bit here.

Does it detect the device and show partitions? You can check that without rebooting.

Yes, it does.

First is OpenWRT, second is "Linksys/Unknown."

Partition Status Firmware
01 Current OpenWrt 22.03.3
02 Alternative Linksys/Unknown

Weird thing is, I had looked at some of the other files and if I change the mtd's to 5 & 7 (like with EA7500 v2 which the EA8100 v2 may be similar to), it gives me this on the page:

Partition Status Firmware
01 Current OpenWrt 22.03.3 (Linux 5.10.161)
02 Alternative Linksys
1 Like

Okay so I did a firmware flash of my custom image and it only wrote to the same partition (I kept the settings thankfully). Is there a way to force a flash to the alternate partition?

That said, when clicking to reboot to the current partition, it works. I don't want to test to the other partition because I'm not sure how to force it back to the first (OpenWRT) from the Linksys firmware.

Well, if it successfully finds the kernel information, maybe mtd5 and mtd7 are proper options. I'll change the values in the json file.

I am using Linksys WHW01 and was hoping for the device support

Table of Hardware:

Here is the output of the commands




BusyBox v1.36.0 built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r22506-9a62b3977f
 -----------------------------------------------------


root@OpenWrt:~# ubus call system board
{
        "kernel": "5.15.105",
        "hostname": "OpenWrt",
        "system": "ARMv7 Processor rev 5 (v7l)",
        "model": "Linksys WHW01",
        "board_name": "linksys,whw01",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "revision": "r22506-9a62b3977f",
                "target": "ipq40xx/generic",
                "description": "OpenWrt SNAPSHOT r22506-9a62b3977f"
        }
}


root@OpenWrt:~# cat /tmp/sysinfo/board_name
linksys,whw01


root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "0:SBL1"
mtd1: 00020000 00010000 "0:MIBIB"
mtd2: 00060000 00010000 "0:QSEE"
mtd3: 00010000 00010000 "0:CDT"
mtd4: 000a0000 00010000 "APPSBL"
mtd5: 00010000 00010000 "0:ART"
mtd6: 00040000 00010000 "u_env"
mtd7: 00020000 00010000 "s_env"
mtd8: 00020000 00010000 "devinfo"
mtd9: 05000000 00020000 "kernel"
mtd10: 04a00000 00020000 "rootfs"
mtd11: 05000000 00020000 "alt_kernel"
mtd12: 04a00000 00020000 "alt_rootfs"
mtd13: 00200000 00020000 "sysdiag"
mtd14: 05e00000 00020000 "syscfg"


root@OpenWrt:~# fw_print
-ash: fw_print: not found

root@OpenWrt:~#

Here is some more info if it helps

root@OpenWrt:~# fw_printenv
altkern=5000000
auto_recovery=yes
baudrate=115200
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 device 1 && nand read $loadaddr $prikern $kernsize && bootm $loadaddr
bootpart2=set bootargs $partbootargs2 && nand device 1 && nand read $loadaddr $altkern $kernsize && bootm $loadaddr
fdt_high=87000000
flash_type=0
flashimg=tftpboot $loadaddr $image && nand erase $prikern $imgsize && nand write $loadaddr $prikern $filesize
flashimg2=tftpboot $loadaddr $image && nand erase $altkern $imgsize && nand write $loadaddr $altkern $filesize
image=nodes-jr.img
imgsize=5000000
ipaddr=192.168.1.11
kernsize=600000
loadaddr=81000000
machid=8010100
maxpartialboots=3
partbootargs=init=/sbin/init rootfstype=squashfs ubi.mtd=rootfs root=mtd:squashfs rootwait
partbootargs2=init=/sbin/init rootfstype=squashfs ubi.mtd=alt_rootfs root=mtd:squashfs rootwait
prikern=0
serverip=192.168.1.200
stderr=serial
stdin=serial
stdout=serial
boot_part_ready=3
boot_part=2

Currently, I am using the below commands to see active partition and to switch the partitions

For active partition:

/usr/sbin/fw_printenv -n boot_part

For switching the partition (1 or 2, in this case, it is 1):

/usr/sbin/fw_setenv boot_part 1

Please test luci-app-advanced-reboot 1.0.1-8 and report back if it works.

I tested the version you specified and am glad to report that it works.
Device: WHW01

here is the link for those who can't find it:

1 Like