-
Notifications
You must be signed in to change notification settings - Fork 237
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
Unable to build the firmware in Linux #186
Comments
Ohh, I found it: it generates the CRC of the firmware and cannot be flashed without it.
Is there any reason not to use it? Will you accept a pull request changing it back? |
This is from Ai-Thinker. Ai-Thinker OTA does not examine or check CRC. PS: Publish correct CRC version for OTA Telink for Linux. |
Oh, I understand now why I was not able of upgrading the firmware. Do you
where the source code of that exec file is? I would like to compile it in
Linux.
El El mié, 2 feb 2022 a las 18:07, Victor ***@***.***>
escribió:
… This version gives a different CRC. It is not suitable for OTAs created on
new SDKs and does not work with Mijia firmware.
—
Reply to this email directly, view it on GitHub
<#186 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABM4WB4XII5FX6ADIDYXZUTUZFQFHANCNFSM5NIY5V6Q>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I don't have the source code for "tl_check_fw2.exe". |
After playing a bit with the check_fw command, I think that both versions can be replaced by this simple python script:
|
That's not all. It is required to check the size of the multiplicity of 16 bytes (+4) in the header and the CRC must be concentrated at the end of the binary at an address divisible by 16. |
Let me recap:
Is that all? |
It's better to add 0xff up to a multiple of 16 bytes, and then a checksum of 4 bytes. SDK from Ai-Thinker (build from ATC1441) is not correct for Telink OTA of most devices on TLSR825x. Unfortunately, it is not possible to apply OTA verification, because this will remove support for the ATC1441 OTA users. It does not allow you to use new Telink SDKs with fixed OTAs. PS: Telink has adopted third-party SPI-Flash in new SoC packages and the new SDKs support different kinds of SPI-Flash. Soon these chips may be found in various devices and the SDK from Ai-Thinker will not work. |
Also, check_fw modifies 2 bytes at offset 6 from 0x0000 to 0x5d02. According to the source code, in that place there is an asm instruction "tj __reset". Is it important to also change that address? |
In any case, if you are interested in replacing that binary blob for some source code:
|
offset 6 - nothing there. Maybe it's a version number or a flag. |
I get this error
It seems that you are using a Windows EXE in the final steps of the build process that cannot be executed in Linux.
The original ATC_MiThermometer is not using it, so I guess is optional.
Is there any side-effect if I replace ./src/../utils/tl_check_fw2.exe with an empty shell script?
The text was updated successfully, but these errors were encountered: