pine64 / bl_iot_sdk

BL602 SDK (Pine64 fork)
https://pine64.github.io/bl602-docs/
Apache License 2.0
134 stars 58 forks source link

Remove pyinstaller-packed binary version of flash_build.py #85

Closed tchebb closed 3 years ago

tchebb commented 3 years ago

No scripts actually use this version: the one reference to it, which I've also removed in this commit, was commented out. Having the binary version is confusing because it indicates a proprietary component where there is none. It's also of limited use, since it only works on 64-bit Linux (and, at least on my system, doesn't even run properly there).

I disassembled the bytecode of the compiled version and the source version and verified that they are identical, so we are losing nothing with this deletion.

Binary version disassembly: flash_build_binary_disassembly.txt Source version disassembly: flash_build_source_disassembly.txt (removed the shebang added by 74e20e247129b4b22bdc8917c43d87dd6acc4e6e to make the line numbers match)

As you can see, they differ only in internal addresses of the disassembled objects.

robertlipe commented 3 years ago

Removing that shebang is why the Mac build failed. I added that exactly to fix the problem of the funky head|tail as argv[] members. The latest Python on MacOS is 2.7.16 which handles sys.exec() by passing it to exec() instead of a shell command that can possibly dequote inlined args llike that.

I don't know if this remains on master.

tchebb commented 3 years ago

Thanks for checking up on your change, @robertlipe! This pull request didn't remove the shebang line from the committed version of the script (although I admit my wording was confusing). You can confirm that by looking at the "Files changed" tab of this PR.

The "removed the shebang" statement only pertained to a temporary copy of the script that I disassembled to create flash_build_source_disassembly.txt linked above. I did this to make it easier to diff the two disassembly files, since they contain line numbers and the binary version was assembled from a version without the shebang line.