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

arch: mach-socfpga: cv_bsp_generator: fix support for Python3 #12

Open
wants to merge 1 commit into
base: socfpga_v2023.01
Choose a base branch
from

Conversation

commodo
Copy link

@commodo commodo commented Jul 21, 2023

Tested with generating a preloader for a DE10 nano board.

On newer systems (like Arch) getting Python2 back in-there is a bit of a hassle (even if it is possible).
Also, on newer versions of Ubuntu, this is also going to be a bit more difficult (over time).

Luckily, the conversion to Python3 is just a few lines. A 'print' statement requires parentheses, and the 'unicode()' instantiation can be converted to 'str()'. The 'unicode()' class is a derivative of 'str()', which is required in Python2 for unicode string handling; though, it's unlikely we would need to generate unicode C definitions, so 'str()' should be fine.

Signed-off-by: Alexandru Ardelean [email protected]

Tested with generating a preloader for a DE10 nano board.

On newer systems (like Arch) getting Python2 back in-there is a bit of a
hassle (even if it is possible).
Also, on newer versions of Ubuntu, this is also going to be a bit more
difficult (over time).

Luckily, the conversion to Python3 is just a few lines.
A 'print' statement requires parentheses, and the 'unicode()' instantiation
can be converted to 'str()'. The 'unicode()' class is a derivative of
'str()', which is required in Python2 for unicode string handling; though,
it's unlikely we would need to generate unicode C definitions, so 'str()'
should be fine.

Signed-off-by: Alexandru Ardelean <[email protected]>
@commodo commodo closed this Jul 21, 2023
@commodo commodo deleted the cv_bsp_generator_fix_python3 branch July 21, 2023 08:37
@commodo commodo restored the cv_bsp_generator_fix_python3 branch July 21, 2023 08:37
@commodo commodo reopened this Jul 21, 2023
@commodo
Copy link
Author

commodo commented Jul 21, 2023

i'm a little confused here;

i think the Github auto-message is from the uboot project;

i am updating the cv_bsp_generator script, which is an Intel/Altera specific code segment.

if there's any other place to submit these changes, i am fine to adapt

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.

1 participant