Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tplink-safeloader: Archer C60 v3: add KR, TW, RU #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vamsi3
Copy link

@vamsi3 vamsi3 commented Mar 16, 2024

Added KR, TW, RU special_ids for Archer C60 v3's support list.

The stock TP-Link .bin firmware for this device contains the following

SupportList:
{product_name:Archer C60,product_ver:3.0.0,special_id:45550000}
{product_name:Archer C60,product_ver:3.0.0,special_id:4B520000}
{product_name:Archer C60,product_ver:3.0.0,special_id:54570000}
{product_name:Archer C60,product_ver:3.0.0,special_id:42520000}
{product_name:Archer C60,product_ver:3.0.0,special_id:52550000}
{product_name:Archer C60,product_ver:3.0.0,special_id:55530000}
{product_name:Archer C60,product_ver:3.0.0,special_id:43410000}

Hence, I'm updating the list to add the missing entries (all these devices use the same firmware).

  • 4B520000 is KR
  • 54570000 is TW
  • 52550000 is RU

(can be verified using Hex to ASCII tools)

Copy link
Member

@svanheule svanheule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some formal issues with this commit:

  • No commit message
  • No Signed-off-by: tag

In addition to that, the support-list partition is only 0x100 (256) bytes in size. That means the support-list on flash can only contain three product identifiers (even though the current list already contains four...). Does this actually generate a factory image without errors?

Do you have a link to the firmware you got this list from? You might also want to check if the partition table in tplink-safeloader.c still matches the one in the vendor images.

@svanheule svanheule self-assigned this Mar 16, 2024
@svanheule
Copy link
Member

Found one answer myself in #15.
The support-list partition already doesn't fit, so we shouldn't add any more identifiers before resolving the size issue.

Added KR, TW, RU special_ids for Archer C60 v3's support list based on TP-Link .bin firmware for this device.

Link to original TP-Link firmware:
- Website: https://www.tp-link.com/en/support/download/archer-c60/#Firmware
- Firmware zip file: https://static.tp-link.com/2021/202101/20210118/Archer%20C60(EU)_V3_201231.zip

Signed-off-by: Satti Vamsi Krishna Reddy <[email protected]>
@vamsi3
Copy link
Author

vamsi3 commented Mar 17, 2024

There are some formal issues with this commit:

  • No commit message
  • No Signed-off-by: tag

Thanks for letting me know. I've added these now.

In addition to that, the support-list partition is only 0x100 (256) bytes in size. That means the support-list on flash can only contain three product identifiers (even though the current list already contains four...). Does this actually generate a factory image without errors?

Oh, now I understand why this device doesn't show a factory image since v23.05.0 on the OpenWrt Firmware Selector tool.

Do you have a link to the firmware you got this list from?

Link to original TP-Link firmware:

I've added the same to the commit message.

You might also want to check if the partition table in tplink-safeloader.c still matches the one in the vendor images.

I'll try to verify, though I must admit all this is new to me. I stumbled upon all this while investigating why the factory firmware (v22.03.6 since there were no factory images later) didn't work on my KR (Korea) model.

Found one answer myself in #15.
The support-list partition already doesn't fit, so we shouldn't add any more identifiers before resolving the size issue.

Got it. I think I'm not the right person to pursue this any further, so I'll leave this with a request to the team to take this up and help support all these special_ids :)

@vamsi3
Copy link
Author

vamsi3 commented Mar 17, 2024

In the meantime, I'll try to generate a factory image from v23.05.2 stable by replacing one special_id with KR and reducing the list to three.

That should work for my device, but only if the partition table matches the one in stock firmware as you have mentioned. Since I can't afford to brick my device, I'll keep my OpenWrt flash on hold for now.

@vamsi3
Copy link
Author

vamsi3 commented Mar 18, 2024

I just checked the latest vendor firmware, and found the following partition table,

partition factory-boot base 0x00000 size 0x1fa00
partition default-mac base 0x1fa00 size 0x00200
partition pin base 0x1fc00 size 0x00100
partition product-info base 0x1fd00 size 0x00200
partition device-id base 0x1ff00 size 0x00100
partition fs-uboot base 0x20000 size 0x10000
partition os-image base 0x30000 size 0x100000
partition file-system base 0x130000 size 0x6a9500
partition soft-version base 0x7d9500 size 0x00100
partition support-list base 0x7d9600 size 0x00200
partition extra-para base 0x7d9800 size 0x00100
partition profile base 0x7d9900 size 0x03000
partition default-config base 0x7dc900 size 0x02900
partition partition-table base 0x7df800 size 0x00800
partition user-config base 0x7e0000 size 0x0c000
partition certificate base 0x7ec000 size 0x04000
partition radio base 0x7f0000 size 0x10000

It doesn't seem to match with the current one in this repo.

@svanheule
Copy link
Member

The original commit for the C60-v3 explains why the first partitions don't match. Older FW version used to match the support-list size, but they changed that one to be 0x100 bytes bigger.

Vendor FW can probably get away with that sort of change, because they provide new contents for all partitions that are affected by that repartitioning. OpenWrt does not provide profile and default-config, meaning we can't safely grow support-list downwards. Either we would have to grow it upwards (and move soft-version), or a user would have to install the latest vendor FW before they can install OpenWrt (or risk losing the contents of profile when reverting back to stock).

@vamsi3
Copy link
Author

vamsi3 commented Mar 24, 2024

@svanheule By the original commit, I think you are referring to 2987b53. I get the gist of your message, but again, it's a bit over my head. Is there any way I can help make this work?

@svanheule
Copy link
Member

Depends on if you're willing to test an image with a modified partition table. The person reporting the oversized partition issue didn't seem interested in doing so, but I would rather not merge a change like this without proper testing.

@vamsi3
Copy link
Author

vamsi3 commented Mar 27, 2024

@svanheule Looking at an earlier comment of yours with the person reporting the oversized partition issue, it seems I'll need additional hardware like SOIC-8 clip etc to work on this task. I don't have any at the moment, so maybe I'll revisit later if I find the time.

Shall I close this PR for now?

@svanheule
Copy link
Member

You wouldn't need an SOIC clip, but serial console access (with tftp or some other form of flashing support) would be very beneficial. Although I would expect an alternative partition layout to Just Work (TM), it never hurts to be safe. If you like, I can produce an image you can test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants