stangri / source.openwrt.melmac.net

OpenWrt Packages
GNU General Public License v3.0
144 stars 47 forks source link

luci-app-advanced-reboot: (Create xiaomi-ax9000.json) #171

Closed tiagofreire-pt closed 1 year ago

tiagofreire-pt commented 1 year ago

Wiki: https://openwrt.org/inbox/toh/xiaomi/ax9000#experimental_firmware

stangri commented 1 year ago

Thank you for this again!

Could you please confirm/clarify a few things:

  1. What is the actual device name in /tmp/sysinfo/board_name? For some other models which have been supported longer, their names changed between OpenWrt releases, so multiple names are listed in json file for backwards compatibility. For the new device, one name should be sufficient.
  2. Do you actually have /dev/rootfs and /dev/rootfs_1 partitions? For most other devices partitions are either /dev/mtdX or /dev/mmcblk0pX.
  3. Have you tested this by putting this file into /usr/share/advanced-reboot/devices/ on the live router?
tiagofreire-pt commented 1 year ago
-----------------------------------------------------
 OpenWrt SNAPSHOT, r21394-1d82c6b4e3
 -----------------------------------------------------
root@AX9000:~# cat /tmp/sysinfo/board_name
xiaomi,ax9000
root@AX9000:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "0:sbl1"
mtd1: 00100000 00020000 "0:mibib"
mtd2: 00080000 00020000 "0:bootconfig"
mtd3: 00080000 00020000 "0:bootconfig1"
mtd4: 00300000 00020000 "0:qsee"
mtd5: 00300000 00020000 "0:qsee_1"
mtd6: 00080000 00020000 "0:devcfg"
mtd7: 00080000 00020000 "0:devcfg_1"
mtd8: 00080000 00020000 "0:apdp"
mtd9: 00080000 00020000 "0:apdp_1"
mtd10: 00080000 00020000 "0:rpm"
mtd11: 00080000 00020000 "0:rpm_1"
mtd12: 00080000 00020000 "0:cdt"
mtd13: 00080000 00020000 "0:cdt_1"
mtd14: 00080000 00020000 "0:appsblenv"
mtd15: 00100000 00020000 "0:appsbl"
mtd16: 00100000 00020000 "0:appsbl_1"
mtd17: 00080000 00020000 "0:art"
mtd18: 00080000 00020000 "bdata"
mtd19: 00100000 00020000 "pstore"
mtd20: 03800000 00020000 "rootfs"
mtd21: 03800000 00020000 "rootfs_1"
mtd22: 00100000 00020000 "cfg_bak"
mtd23: 07d80000 00020000 "overlay"
tiagofreire-pt commented 1 year ago

https://imgur.com/QtjHDBd

tiagofreire-pt commented 1 year ago

I have a dual firmware boot, with still the OEM firmware on rootfs and the experimental openwrt firmware on rootfs_1, compiled by me for the target IPQ8072, from the robimarko's repo.

On the next few days, I'll flash the rootfs with openwrt, as was today the first day that this "international" hardware variant got support: https://forum.openwrt.org/t/openwrt-support-for-xiaomi-ax9000/98908/909

stangri commented 1 year ago

I have a dual firmware boot, with still the OEM firmware on rootfs and the experimental openwrt firmware on rootfs_1, compiled by me for the target IPQ8072, from the robimarko's repo.

It should read the kernel version from OpenWrt at least then, if the mtd and offset values are correct.

tiagofreire-pt commented 1 year ago

I have a dual firmware boot, with still the OEM firmware on rootfs and the experimental openwrt firmware on rootfs_1, compiled by me for the target IPQ8072, from the robimarko's repo.

It should read the kernel version from OpenWrt at least then, if the mtd and offset values are correct.

The offset value seems to be correct for the robimarko's firmware, as the OEM one is based on an ancient openwrt version (18.0x).

https://imgur.com/7yJMPPl

tiagofreire-pt commented 1 year ago

With partitions changed:

image

stangri commented 1 year ago

Great, thank you again for this, it should be available from my private repo as luci-app-advanced-reboot 1.0.1-4 momentarily.

PS. Sorry, should have asked you to bump a version in the Makefile too. ;)