-
Notifications
You must be signed in to change notification settings - Fork 762
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
Building binaries without instruction compression #5509
Labels
Comments
imphil
added
Component:Software
Issue related to Software
Type:Question
Questions
labels
Mar 9, 2021
Hi Georges,
Thank you for your question.
Am I understanding it correctly that you are trying to selectively compile
some of the binaries without the `C` extension, whilst keeping all the rest
built with the provided toolchain?
If my above conclusion is correct, then I think that the project as is
doesn't support this option. Moreover I think meason doesn't support mixing
and matching of different toolchains - you can have "build" (usually x86
machine), host (rv32xx). There is this meason merged PR
<mesonbuild/meson#5083> that allows to overlay
cross files, but I have never tried it, and not sure whether it allows to
override toolchain completely or just some options.
A non ideal alternative
<mesonbuild/meson#5125 (comment)> -
the use-case is slightly different, here someone needs to build for N
targets at the same time.
I think I would look into the "--cross-file" overlay, if that is not
helpful, then you would need to have a custom solution for your problem.
@luís Marques <[email protected]>
Adding Luis who has worked on the toolchains infrastructure for OpenTitan,
just to double-check the above.
P.S.
Please let us know if you have further questions, and also it would be
interesting to know what you went for in the end.
Regards,
Silvestrs
…On Tue, Mar 9, 2021 at 1:39 AM Georges Alsankary ***@***.***> wrote:
Hello all,
I have been trying to build OpenTitan software from C sources using this
tutorial: https://docs.opentitan.org/doc/ug/getting_started_sw/.
I want to generate the binaries without instruction compression. I built
the riscv toolchain without the C extension (i.e. by using all the
recommended flags except for --with-arch=rv32im
<https://docs.opentitan.org/doc/ug/install_instructions/#compiler-toolchain>
when building). After that, I added and modified the toolchain
configuration file to replace the default toolchain with the one I built. I
also modified meson-init.sh to point to that configuration file.
Unfortunately, the build's compiler settings only change after adding the
-f flag to ./meson-init.sh -r, which removes the previously working
binaries built with the original working compiler. I don't want to happen,
because compiling all the other binaries without compression doesn't work.
So my question is: is there a way to compile new c binaries without
compressed instructions while keeping the original working binaries (e.g.
boot_rom) for the rest of the system? Meson is not cooperating and only
changes after deleting all other working files, even after adding an -r
flag to reconfigure. Should I just compile them using my own build system
instead of relying on OpenTitan's?
Thank you,
Georges
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5509>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANWSLWUSYSHB54KLNCFRJV3TCV34HANCNFSM4Y2QFLWQ>
.
|
Thank you, @silvestrst! There might have been a misunderstanding. What I wanted to know was whether we can create executables without instruction compression, and whether they'd run on OpenTitan if compiled. Thanks again, Georges |
Hi Georges,
I don't see why this would be an issue?
Have you tried building without instruction compression and encountered any
issues?
Thanks,
Silvestrs
…On Wed, Mar 10, 2021 at 5:54 PM Georges Alsankary ***@***.***> wrote:
Thank you, @silvestrst <https://github.com/silvestrst>!
There might have been a misunderstanding. What I wanted to know was
whether we can create executables without instruction compression, and
whether they'd run on OpenTitan if compiled.
Thanks again,
Georges
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5509 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANWSLWTB4SXARXRBVISWX33TC6P3XANCNFSM4Y2QFLWQ>
.
|
Please reopen if this problem persists. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello all,
I have been trying to build OpenTitan software from C sources using this tutorial: https://docs.opentitan.org/doc/ug/getting_started_sw/.
I want to generate the binaries without instruction compression. I built the riscv toolchain without the C extension (i.e. by using all the recommended flags except for
--with-arch=rv32im
when building). After that, I added and modified the toolchain configuration file to replace the default toolchain with the one I built. I also modifiedmeson-init.sh
to point to that configuration file.Unfortunately, the build's compiler settings only change after adding the -f flag to
./meson-init.sh -r
, which removes the previously working binaries built with the original working compiler. I don't want to happen, because compiling all the other binaries without compression doesn't work.So my question is: is there a way to compile new c binaries without compressed instructions while keeping the original working binaries (e.g. boot_rom) for the rest of the system? Meson is not cooperating and only changes after deleting all other working files, even after adding an -r flag to reconfigure. Should I just compile them using my own build system instead of relying on OpenTitan's?
Thank you,
Georges
The text was updated successfully, but these errors were encountered: