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

Add a riscv toolchain to Dockerfile #10

Closed
wants to merge 1 commit into from
Closed

Add a riscv toolchain to Dockerfile #10

wants to merge 1 commit into from

Conversation

fgaz
Copy link
Contributor

@fgaz fgaz commented May 18, 2020

The ubuntu repos do not provide a complete enough (static, with simulator)
riscv toolchain.
Instead of building it manually, we first install nix
(https://nixos.org/nix) and then use that to install a cross gcc, spike,
and the proxy kernel.


This is a bit unorthodox, but it's the most reliable (and quite fast, since there should be no compiling) way I found to have gcc, spike, and pk in the ubuntu image.

I will shortly make another pr with the testing.py patch.

@myreen myreen requested a review from talsewell May 19, 2020 19:54
@talsewell
Copy link
Collaborator

Quick comment: I don't think we're going to change the base image at this point in the cycle. There are some tricky compatibility issues with some of the tools some people are using, and there isn't a lot of time to check everything. Is that necessary for the other parts to work?

Also, it's not clear to me that modifying the default docker image is the right way to go. It is good that we have a precise document for how to set up a system with the necessary tools. Do you have a measure of how much additional time/space is needed to build the image with an additional nixos install in it? If it's anything much, we might want an alternative image instead, or just run these commands on one of our testing setups (we aren't strictly using the docker image for all testing).

@fgaz
Copy link
Contributor Author

fgaz commented May 21, 2020

I don't think we're going to change the base image at this point in the cycle. There are some tricky compatibility issues with some of the tools some people are using, and there isn't a lot of time to check everything

Makes sense, I didn't think about that.

Is that necessary for the other parts to work?

I don't think it is. I'm rebuilding the image on bionic right now, and I'll report back as soon as it finishes.

Do you have a measure of how much additional time/space is needed to build the image with an additional nix install in it?

I do not have a specific number, but most of it should be downloaded from a binary cache, so it shouldn't take that much.

we might want an alternative image instead

If we take that path here's an image with the nix package manager already installed: https://hub.docker.com/r/nixos/nix/

or just run these commands on one of our testing setups

They should work on any semi-recent system, so that's doable too

The ubuntu repos do not provide a complete (static, with simulator)
riscv toolchain.
Instead of building it manually, we first install nix
(https://nixos.org/nix) and then use that to install a cross gcc, spike,
and the proxy kernel.
@fgaz
Copy link
Contributor Author

fgaz commented May 21, 2020

@talsewell Works fine on bionic

@fgaz fgaz changed the title Add a riscv toolchain, and update ubuntu to latest LTS Add a riscv toolchain to Dockerfile May 31, 2020
oskarabrahamsson added a commit that referenced this pull request Dec 23, 2020
@oskarabrahamsson
Copy link
Collaborator

I included @fgaz changes into its own Docker image building on the base one. See #14.

Closing this.

@fgaz fgaz deleted the riscv-docker branch December 23, 2020 20:00
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.

3 participants