From 83101cd679f4635bb2df1d06a16973926635840b Mon Sep 17 00:00:00 2001 From: Nathan Pemberton Date: Wed, 16 Jun 2021 15:56:25 -0400 Subject: [PATCH 1/3] Add marshal support to the Dockerfile --- dockerfiles/Dockerfile | 15 ++++++++++++++- dockerfiles/README.md | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index 1f8ece33..d17f4027 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -15,7 +15,9 @@ RUN apt-get update && \ sudo \ ca-certificates \ keyboard-configuration \ - console-setup + console-setup \ + bc \ + unzip WORKDIR /root @@ -51,6 +53,17 @@ RUN cd chipyard && \ export MAKEFLAGS=-"j $(nproc)" && \ ./scripts/build-toolchains.sh esp-tools 1>/dev/null + +# Set up FireMarshal +SHELL ["/bin/bash", "-c"] +RUN cd chipyard && \ + source env.sh && \ + cd software/firemarshal && \ + ./init-submodules.sh && \ + pip3 install -r python-requirements.txt && \ + marshal build br-base.json + + # Run script to set environment variables on entry ENTRYPOINT ["chipyard/scripts/entrypoint.sh"] diff --git a/dockerfiles/README.md b/dockerfiles/README.md index 09ede715..887cda62 100644 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -13,7 +13,8 @@ Build and Deploy the Container sudo docker tag :tag . # to tag the image after the build (ex. 0.0.3) sudo docker login # login into the account to push to sudo docker push :tag # to push to repo with tag - sudo docker run -it bash # to run an interactive version of the container + sudo docker run -it --privileged bash # to run an interactive version of the container + Path Names ---------- From 554b4363904e6db7ffc812d06507d1353ca12d9c Mon Sep 17 00:00:00 2001 From: Nathan Pemberton Date: Tue, 24 Aug 2021 19:54:51 -0400 Subject: [PATCH 2/3] Clean br-base after building to keep only the br.XXXX.img file around which is the painful one to build. Also moves the SHELL command earlier. --- dockerfiles/Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index d17f4027..7011f38e 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -7,6 +7,8 @@ ARG CHIPYARD_HASH MAINTAINER https://groups.google.com/forum/#!forum/chipyard +SHELL ["/bin/bash", "-c"] + # Install dependencies for ubuntu-req.sh RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -54,14 +56,16 @@ RUN cd chipyard && \ ./scripts/build-toolchains.sh esp-tools 1>/dev/null -# Set up FireMarshal -SHELL ["/bin/bash", "-c"] +# Set up FireMarshal. Building and cleaning br-base.json builds the underlying +# buildroot image (which takes a long time) but doesn't keep all the br-base +# stuff around (since that's faster to rebuild). RUN cd chipyard && \ source env.sh && \ cd software/firemarshal && \ ./init-submodules.sh && \ pip3 install -r python-requirements.txt && \ - marshal build br-base.json + marshal build br-base.json && \ + marshal clean br-base.json # Run script to set environment variables on entry From 2511cd48c1e9a903a36ee8653c46194b318b7e36 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Thu, 26 Aug 2021 11:13:09 -0700 Subject: [PATCH 3/3] Bump CI image --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b6ac7178..2a78794a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ parameters: executors: main-env: docker: - - image: ucbbar/chipyard-ci-image:1d51bb90 + - image: ucbbar/chipyard-ci-image:554b436 environment: JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit