Skip to content
New issue

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

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

Already on GitHub? # to your account

Switch to Python3 #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Switch to Python3 #7

wants to merge 2 commits into from

Conversation

lemenkov
Copy link

Python 2.x no longer supported by upstream. Let's use Python3 explicitly.

lemenkov added 2 commits June 21, 2024 10:27
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
@mbuesch
Copy link
Owner

mbuesch commented Jun 21, 2024

Thanks for your contribution.

Did you actually test this, or is this only a simple 2to3 conversion?

@lemenkov
Copy link
Author

Only b43-asm was tested (as a build-tool for OpenFWWF firmware). Other tools weren't tested. And yes this was done with 2to3.

/usr/bin/make -O -j12 V=1 VERBOSE=1
b43-asm ucode5.asm ucode5.fw --cpp-args -DDEBUG=1 -- --ivalext .fw --psize
ucode5.fw:  text = 1190 instructions (9520 bytes)
b0g0initvals5.fw:  177 values (968 bytes)
b0g0bsinitvals5.fw:  31 values (150 bytes)
Assembler info:
  Using start address 0

@mbuesch
Copy link
Owner

mbuesch commented Jun 22, 2024

Ok. Hm.

Well, porting Python2 to 3 is hard, because every single line of code should be executed at least once to get a reasonable idea of whether it works or not.
I would expect at least a couple of str<->bytes conversions to be required here and there in addition to 2to3.

I would like to rather leave the ancient scripts as-is Python2 than breaking them. For example the debug scripts. Does anybody really use them today? And if so, do they do it on a modern system?

Can we split this PR into seperate PRs? One for fwcutter and one for disassembler? And can we leave the debug scripts as-is?

@lemenkov
Copy link
Author

I would like to rather leave the ancient scripts as-is Python2 than breaking them. For example the debug scripts.

Sounds reasonable.

Can we split this PR into seperate PRs? One for fwcutter and one for disassembler? And can we leave the debug scripts as-is?

Sure thing. I'll split it and review it more thoroughly.

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

Successfully merging this pull request may close these issues.

2 participants