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

RISCV toolchain from source #13

Open
v3l0c1r4pt0r opened this issue Oct 28, 2020 · 7 comments
Open

RISCV toolchain from source #13

v3l0c1r4pt0r opened this issue Oct 28, 2020 · 7 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@v3l0c1r4pt0r
Copy link

Hi folks,

Do you think it might be useful to spend some time to recover toolchain from source? I mean to be able to build exactly the same versions of tools like GCC, libc, etc. and adjust some configuration bits if needed. I did this kind of stuff for few boards lately (https://github.com/v3l0c1r4pt0r/cc-factory) and I think I might be able to do the same thing for BL602. For the mentioned boards this allowed me to link to existing binaries, but I didn't have any working toolchain in these cases. Here we have some. So let me know, what do you think? Is it worth to do it now? I can spend an evening or two on that.

@gamelaster gamelaster added enhancement New feature or request question Further information is requested labels Oct 28, 2020
@WildCryptoFox
Copy link

If this was done quickly, the history could be rewritten to strip out the large binaries. However, this is generally a nasty thing to do to git and to all developers who cloned the repo already. I mean "quickly" here as in to minimize the inconvenience of the rewritten history.

@gamelaster
Copy link
Member

@WildCryptoFox Well, this would be great, but as you noted, already many people forked it.
@v3l0c1r4pt0r Generally, I think this is good idea :) Also, probably the toolchain needs to be done for the core what is used in BL602, which is SiFive E24 from what I know.

@jamespthomas
Copy link

Not entirely sure we need to build this as part of the project, most distributions carry riscv64 cross compilers now, could simply document using them?

@WildCryptoFox
Copy link

@jamespthomas Ideally a generic toolchain would suffice but this involves custom extensions (I.e. the crypto coprocessor). It is plausible the toolchain is specialized for this target. Can someone confirm?

@jamespthomas
Copy link

@WildCryptoFox I did not know that, some documentation on this would be good (I saw your existing issue)

@v3l0c1r4pt0r
Copy link
Author

@jamespthomas If I have working compiler, built from source I could in theory try compiling some sources from this repo and compare for any differences.

@v3l0c1r4pt0r
Copy link
Author

v3l0c1r4pt0r commented Oct 28, 2020

So, I have good news. At least GCC and binutils are the exactly same binary as is available here. They simply copied CentOS variant (https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz) and that's it. Therefore it is not necessary to create any custom scripts.

Edit: I made a draft pull request #23 that deletes files known to be present in SiFive's package.

Avamander pushed a commit that referenced this issue Nov 15, 2020
Clean whitespace in customer_apps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants