Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Maybe the single partition is affecting? Until now, the "official" was dual partition. Some people moved to the single partition as test, but some of them didn't upgrade or if something failed, they ignored it because it was "experimental" and maybe they did something wrong.
We tested that moving to single partition worked, but we didn't test too much that the sysupgrade worked.

It really shouldnt as every time sysupgrade is called env is set to explicitly boot from the first "rootfs" where the kernel is now, I have been using it for a while now and it just keeps on working.

It would be great to be able to catch it, as it could really be some stupid bootloader logic interpreting the environment

2 Likes

Same problem, Falshing from the second last version to the last version bricked the router. Since that was not the frist time I was able to bring it up again within an hour.

1 Like

Can you give more details?
Version numbers; How did you flash? throu luci or via command line? Which parameters? Did you check SHA256 sum, did you kept settings etc ...
Whats your environment variables ...

After I went to single partition in 2023-01-05-2313, I restored my config as described bellow:

Then i made a config backup in luci, that I still use.

Now that I think of it, when I untar my config ontop of the the deafult one in a running router, I can't be sure if any of those files were not locked, but I didn't had any errors, so I guess not.

Then all sysupgrades worked, except the last one and I still load that config, so I guess this was not the problem.

Don't know of it helps, these are the last upgrades I did:

...
bce37ee (2022-12-19-1045) -> backed up config -> ssh service wpad stop -> sysupgrade through luci keeping settings -> OK

63ba272 (2023-01-01-1759) (new network names) -> backed up config -> changed the network names -> ssh service wpad stop -> sysupgrade through luci NOT keeping settings -> upload changed config -> OK

8faba05 (2023-01-05-2313) (single partition) -> backed up config -> followed the instructions (ubiformat, sysupgrade, etc) -> upload backedup config -> OK

ef42fc4 (2023-01-08-1438) -> still compat_version warning so I set system.@system[0].compat_version="2.0" and commit -> backed up config -> ssh service wpad stop -> sysupgrade through luci keeping settings -> OK

a38982e (2023-01-09-2026) -> backed up config -> first try I forgot to ssh service wpad stop so it rebooted without the new version -> ssh service wpad stop -> sysupgrade through luci keeping settings -> NOK

Bricked router -> followed the Debricking TFTP recovery steps (only worked on lan3) -> obtained SSH with the javascript method -> followed the instructions (ubiformat, sysupgrade, etc) -> upload backedup config - ok

Never happend before, never had to recover the router, allways did the sysupgrade through luci, only problem was when I forgot to stop wpad and had to do it again.

1 Like

untar-ing rather than restoring the backup was my shortcut to avoid finding out if the restore process would reject a "1.1 compat" archive on a 2.0 compat system. I haven't done my homework on this. My gut feeling is that locks won't be a problem. I often edit most of those files in vi and bounce wifi/network/processes through init.d to activate changes, rather than using the GUI or UCI.

edit: it all looks OK, and the restore process of 1.1 conf backup should proceed on a 2.0 system even through the GUI (though you still have to manually update after).

sysupgrade -r is a simple untar too:

	[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
	v "Restoring config files..."
	tar -C / -x${TAR_V}zf "$CONF_RESTORE"
	exit $?
1 Like

Couldn’t the changes triggered by 981213 (GitHub user) PR review from two-three days ago around platform_pre_jupgrade cause this?

Either as a bug in change or unknown side effect .
And it’s the only change around this area..

Well no as you are upgrading to that, old version doesn't have that in the recipe at all.
Its only gonna get used when sysupgrading after that version

Yes, you are right.

So we are using the pre upgrade from old version and post upgrade from new when updating? Or the post upgrade is executed before rebooting?

You are confusing things, when you are sysupgrading you are always using the recipe from the FW you are currently running.

So if you are running version X, and you sysupgrade you are using the recipe that is in that version X to flash version Y.

Then on version Y you are using the recipe from it, to flash version Z and so on

2 Likes

Can anybody help me to debrick my router with tftpd64 application. I have tried multiple time but haven't make any progress. can any body please help me.....

I do it exactly like this:

However, it doesn't work for me using my basic desktop computer - no response at all. I must be using an old laptop, then this procedure is always successful

1 Like

Can I get some bootlog captures from CPR, ideally from various devices?
So this part only:

[    2.141995] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    2.142304] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    2.148272] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    2.154720] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    2.162402] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    2.169900] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    2.179034] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 704000 uV
[    2.185982] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 840000 uV
[    2.195964] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 904000 uV
[    2.205766] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop=1000000 uV
[    2.215632] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 684, quot_offset[ 7]=   0
[    2.225394] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 923, quot_offset[ 7]= 235
[    2.236244] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1022, quot_offset[ 7]=  95
[    2.247180] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1176, quot_offset[ 7]= 150
[    2.258270] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop

I want to see the differences between devices and SoC models

AX9000

[    2.164295] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    2.164594] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    2.170596] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    2.177030] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    2.184682] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    2.192209] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    2.201335] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 704000 uV
[    2.208282] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 808000 uV
[    2.218264] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 864000 uV
[    2.228073] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop= 944000 uV
[    2.237930] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 726, quot_offset[ 7]=   0
[    2.247695] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 926, quot_offset[ 7]= 200
[    2.258543] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1023, quot_offset[ 7]=  95
[    2.269482] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1173, quot_offset[ 7]= 150
[    2.280556] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop

AX3600

[    1.636010] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    1.636345] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    1.642162] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    1.648739] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    1.656411] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    1.663916] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    1.673073] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 704000 uV
[    1.680002] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 832000 uV
[    1.689984] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 896000 uV
[    1.699792] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop= 984000 uV
[    1.709651] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 702, quot_offset[ 7]=   0
[    1.719413] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 946, quot_offset[ 7]= 240
[    1.730264] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1055, quot_offset[ 7]= 105
[    1.741200] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1213, quot_offset[ 7]= 155
[    1.752281] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop

Thank you for the reply. can you also please share the screenshot of the application. What host address and port did you put and also which version of windows are you running on your old laptop.

Dynalink DL-WRX36

[    0.888868] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    0.889154] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    0.895164] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    0.901594] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    0.909280] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    0.916787] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    0.925911] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 704000 uV
[    0.932859] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 824000 uV
[    0.942841] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 880000 uV
[    0.952649] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop= 984000 uV
[    0.962505] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 697, quot_offset[ 7]=   0
[    0.972269] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 917, quot_offset[ 7]= 220
[    0.983121] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1008, quot_offset[ 7]=  90
[    0.994056] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1188, quot_offset[ 7]= 180
[    1.005131] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop

AX3600, mine has some different values, probably cpu binning:

EDIT: somehow, I had copy/paste here the wrong log when I compared it, this is my correct log, different from the user above ax3600:

[    1.659230] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    1.659540] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    1.665550] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    1.671980] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    1.679621] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    1.687155] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    1.696271] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 704000 uV
[    1.703219] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 808000 uV
[    1.713202] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 872000 uV
[    1.723010] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop= 952000 uV
[    1.732870] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 727, quot_offset[ 7]=   0
[    1.742630] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 930, quot_offset[ 7]= 200
[    1.753481] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1042, quot_offset[ 7]= 110
[    1.764418] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1193, quot_offset[ 7]= 150
[    1.775499] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop