webzit
6026
I have repeated this 10 times on both AX3600s. Without success. Also, it would be quite surprising to me why this should suddenly free up disk space?! 
cfg & output:
echo "CONFIG_TARGET_ipq807x=y" > .config
echo "CONFIG_TARGET_ipq807x_generic=y" >> .config
echo "CONFIG_TARGET_MULTI_PROFILE=y" >> .config
echo "CONFIG_TARGET_ALL_PROFILES=y" >> .config
echo "CONFIG_TARGET_PER_DEVICE_ROOTFS=y" >> .config
echo "CONFIG_TARGET_ROOTFS_INITRAMFS=y" >> .config
echo "CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD=y" >> .config
echo "CONFIG_PACKAGE_luci=y" >> .config
echo "CONFIG_PACKAGE_kmod-qca-nss-dp=y" >> .config
echo "CONFIG_PACKAGE_qca-ssdk-shell=y" >> .config
echo "CONFIG_PACKAGE_nss-firmware-ipq8074=y" >> .config
echo "CONFIG_PACKAGE_kmod-wireguard=y" >> .config
echo "CONFIG_PACKAGE_wireguard-tools=y" >> .config
echo "CONFIG_PACKAGE_luci-app-wireguard=y" >> .config
echo "CONFIG_PACKAGE_htop=y" >> .config
echo "CONFIG_PACKAGE_wpad-mesh-wolfssl=y" >> .config
echo "CONFIG_PACKAGE_iperf3=y" >> .config
echo "CONFIG_PACKAGE_luci-app-https-dns-proxy=y" >> .config
echo "CONFIG_PACKAGE_https-dns-proxy=y" >> .config
echo "CONFIG_PACKAGE_luci-app-sqm=y" >> .config
echo "CONFIG_PACKAGE_nano=y" >> .config
echo "CONFIG_PACKAGE_luci-app-unbound=y" >> .config
echo "CONFIG_PACKAGE_luci-app-adblock=y" >> .config
echo "CONFIG_PACKAGE_luci-ssl=y" >> .config
echo "CONFIG_PACKAGE_qrencode=y" >> .config
echo "CONFIG_PACKAGE_curl=y" >> .config
echo "CONFIG_PACKAGE_luci-app-ddns=y" >> .config
echo "CONFIG_PACKAGE_ddns-scripts=y" >> .config
echo "CONFIG_PACKAGE_vpn-policy-routing=y" >> .config
echo "CONFIG_PACKAGE_luci-app-vpn-policy-routing=y" >> .config
make defconfig
make -j$(nproc) V=s
based on: https://github.com/robimarko/openwrt/commit/f0843405871e7cf6555c0fdd09cfe550e3ff346d
fw_printenv flag_boot_rootfs 0
= 12 MB
fw_setenv flag_boot_rootfs 1
fw_setenv flag_last_success 1
reboot
fw_printenv flag_boot_rootfs -> 1
= 12 MB
cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "0:sbl1"
mtd1: 00100000 00020000 "0:mibib"
mtd2: 00300000 00020000 "0:qsee"
mtd3: 00080000 00020000 "0:devcfg"
mtd4: 00080000 00020000 "0:rpm"
mtd5: 00080000 00020000 "0:cdt"
mtd6: 00080000 00020000 "0:appsblenv"
mtd7: 00100000 00020000 "0:appsbl"
mtd8: 00080000 00020000 "0:art"
mtd9: 00080000 00020000 "bdata"
mtd10: 00080000 00020000 "crash"
mtd11: 00080000 00020000 "crash_syslog"
mtd12: 023c0000 00020000 "rootfs"
mtd13: 023c0000 00020000 "rootfs_1"
mtd14: 01ec0000 00020000 "overlay"
mtd15: 00080000 00020000 "rsvd0"
df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 9.8M 9.8M 0 100% /rom
tmpfs 203.9M 384.0K 203.5M 0% /tmp
/dev/ubi0_2 12.1M 80.0K 11.4M 1% /overlay
overlayfs:/overlay 12.1M 80.0K 11.4M 1% /
tmpfs 512.0K 0 512.0K 0% /dev
The second AX3600 is used as a mesh access point (connected via wifi) and both are super stable and additionally with activated SQM also super responsive. Many thanks robimarko! I am now getting into openwrt for the first time and it is a joy!
I don’t know why! I just sysupgrade and first time I have ~12MB, second time I have ~100MB and stop upgrade.
You can build your own or download the latest pre-release version on robimarko github
Honestly, nothing should happen, you certainly won't get more space as it still uses the same partition table, it cant magically increase.
1 Like
cjom
6030
That's why I followed this guide, the img used changes mtd table and add all the unused space to the last boot system.
That's why when I do sysupgrade my adguard disappears (system says ~12MB free) and then I have to sysupgrade again to get ~100MB free again.
I was very afraid to do this, but it worked very well. If the linked files are no longer available I can upload somewhere, I still have them.
Please guys don't advertise flashing random QSDK images that alter the partition table, too many people got burned and bricked their routers just in this thread alone.
Proper way to solve this is to unify the two rootfs in OpenWrt
4 Likes
cjom
6032
OK, sorry. I was afraid it was a risky process when I did it but I thought it was a tested process with relative safety.
Anyway, for sure the best solution would be if openwrt could mount all that free space in opt in both filesystems.
Unfortunatelly you cant be safe with the binary only random QSDK images floating around.
I follow the QSDK guide first, then I back to stock, finally I flash Openwrt twice and have more free space. Does it safe? I see everything still work well. Btw how can I restore the default partition table, and unify the two rootfs as you told? Thank you very much!
vit0r
6035
The quick TL;DR for anyone that flashed that guide's QSDK build, coming from personal experience as I also did that in the early days:
- DO NOT try to use Xiaomi's recovery tools, it will "soft brick" your device
- Alas, unless you already opened your device and soldered the serial header, DO NOT eff up your flashing because you no longer have the "easy" recovery methods
- AFAIK currently we do not have a way to restore the original partition layout. Going back to stock does not revert these changes.
- DO NOT overburden the thread or robimarko with QSDK questions. There are still bigger fishes to fry before we get (official) OpenWRT in stock AX3600s, we don't need extra issues in the way.
Last but not least, to this date, things will work just fine if you are careful with what you flash (i.e., make sure images work and have proper size). I am not sure what may happen if/when the two rootfs get merged in OpenWRT, so beware of the bricking opportunity when that change happens (but, there's a very good chance we'll still be fine).
5 Likes
A great note! I myself soft bricked my AX3600 using MIWIFIRepairTool, can confirm it's a bad idea. As an addendum to the list, you must have uart_en=1 set in nvram to be able to recover using serial access. It's preferable to patch bdata partition to retain uart_en=1 on firmware reset to defaults. I guess the easiest way to do this is by using mitool:
A compiled binary, if you have troubles building it: googledrive
P.S. mitool usage, considering you copied it to /etc on your device:
chmod +x /etc/mitool
/etc/mitool unlock # unlocks bdata and reboots
/etc/mitool hack # patches bdata, locks bdata and reboots
2 Likes
cjom
6037
Well, maybe I got very lucky, but I recovered from 2 softbricks without opening the router (I have set uart_en and telnet too). Or maybe it was not a real softbrick but I could not connect to the router anyway.
1st time I used a firmware downloaded from github (not robimarko's but can't remember the name at this moment) but it was too big for the space I had, I suppose.
I'm almost sure I recovered with miwifitools, but now I am not 100% sure.
2nd time with robimarko's github but compiled by me, something made it unbootable although I had no errors compiling.
This time I used https://openwrt.org/inbox/toh/xiaomi/xiaomi_ax3600#tftp_recovery the"official" tftp method and worked too.
2 Likes
robimarko I use the latest compilation for 4 days, free memory 130-190mb, all stable, no reboots, no packet loss, 3 tv, 4 phones, 5 pc, 1 printer, 1 home server on the network all working without problems, it's really good maybe it's time to think about the official release
1 Like
snoova
6039
I do not have any serious problems either!
It runs very stable, amazing work @robimarko Only the following things bother me:
- download speed is too low (available 1Gbps, possible max. 720 Mbps)
- free disk space could be higher
Well, I managed to soft-brick my AX3600 also last night.
I tried the classic failsafe/recovery mode, it enters the failsafe, but I can't reach it at 192.168.1.1, most likely the nss-dp drivers not being loaded?
I don't have serial, so was just going to try TFTP recovery now, since apparently MiWifiRepair will break it even worse. Any other ideas would be appreciated 
I've been working on a 5.15 build with NSS support, got all the clocks and everything to compile properly, sysupgrade ran successfully, but as soon as the kernel finishes booting and after I see the first radio (IoT) antenna turn blue, it just crashes and reboots.
As a reference, here are the patches I needed to get the NSS clocks and everything to compile:
patches-5.15/0150-ipq8074-gcc-Added-support-for-NSS-clocks.patch
patches-5.15/0151-clk-ipq8074-Support-added-for-necessary-clocks-and-r.patch
patches-5.15/0152-clk-qcom-ipq8074-Fix-gcc_snoc_bus_timeout_ahb_clk-of.patch
patches-5.15/0154-clk-ipq8074-defer-from-disabling-gcc_sleep_clk_src.patch
patches-5.15/0155-clk-ipq8074-fix-gcc_blsp1_ahb_clk-properties.patch
patches-5.15/0156-clk-qcom-fix-wrong-RCG-clock-rate-for-high-parent-fr.patch
patches-5.15/0157-clk-qcom-add-support-for-hw-controlled-RCG.patch
patches-5.15/0158-clk-qcom-ipq8074-add-hw-controlled-flag.patch
patches-5.15/0159-clk-qcom-clk-rcg2-fix-set-duty-cycle-call.patch
I had to make adjustments to match offsets and remove stuff that @robimarko added to 5.15 for other things, and had to also write a small patch for a rcg2_set_duty_cycle function calling update_config() without the hardware controlled flag. I just set that flag to true and everything compiled.
1 Like
Honestly, the more I reworked stuff the more broken stuff I found, most of those clock patches from the 5.10 branch are broken or not needed.
You can use TFTP recovery even without any external tool, its baked into the bootloader.
I personally wouldnt try adding new features without UART and using initramfs images, chance of bricking is really high otherwise
Yes, I fully agree with you, I went through all the clocks and stuff before cherrypicking what seemed to be necessary to get NSS up, it's one hell of a mess.
Again, you're 100% right, I just hoped for the best, I figured if things worked fine on 5.10 with those clocks, what could go wrong? Big mistake, I'll get a serial adapter after I hopefully get it back up and running. 
Ah nice, I'm gonna try recovering it now, will it work with an openwrt image or do I have to use stock?
I have a modded official INT firmware on partition 1, but for some reason power-cycling it a few times doesn't seem to trigger the partition switch failover.
You have to use the stock FW as even the bootloader checks the FW signature
I see, I'll try that, I think I still have one around from ages ago, before modding it, thanks!
cjom
6045
I'm learning now about this and I would like to do that, but it's there any way to boot without using a serial connection?