From 03650a20281b0c68d593a8198af4d052b76cc34e Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 11 May 2021 17:27:06 -0500 Subject: [PATCH 1/5] Use root within Dockerfile --- dockerfiles/Dockerfile | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index d9fcfa0f..61e2ea81 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -17,19 +17,7 @@ RUN apt-get update && \ keyboard-configuration \ console-setup -# Adds a new user called riscvuser -RUN groupadd --gid 3434 riscvuser \ - && useradd --uid 3434 --gid riscvuser --shell /bin/bash --create-home riscvuser \ - && echo 'riscvuser ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-riscvuser \ - && echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep - -WORKDIR /home/riscvuser -USER riscvuser - -# Update PATH for RISCV toolchain (note: hardcoded for CircleCI) -ENV RISCV="/home/riscvuser/riscv-tools-install" -ENV LD_LIBRARY_PATH="$RISCV/lib" -ENV PATH="$RISCV/bin:$PATH" +WORKDIR /root # Install Chipyard and run ubuntu-req.sh to install necessary dependencies RUN git clone https://github.com/ucb-bar/chipyard.git && \ @@ -38,7 +26,6 @@ RUN git clone https://github.com/ucb-bar/chipyard.git && \ ./scripts/ubuntu-req.sh 1>/dev/null && \ sudo rm -rf /var/lib/apt/lists/* - # BUILD IMAGE WITH TOOLCHAINS # Use above build as base From 86593e294898c4b9e911e20e8ad7afe8926ac030 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 11 May 2021 17:29:07 -0500 Subject: [PATCH 2/5] Bump CI | Update entrypoint.sh for toolchain image --- .circleci/config.yml | 2 +- scripts/entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f3dbf371..96bddd77 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ parameters: executors: main-env: docker: - - image: ucbbar/chipyard-ci-image:c29770 + - image: ucbbar/chipyard-ci-image:03650a environment: JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 41e5bda5..457656e8 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -3,6 +3,6 @@ # used with the dockerfile to set up enviroment variables by running env.sh # adapted from https://stackoverflow.com/questions/55921914/how-to-source-a-script-with-environment-variables-in-a-docker-build-process -. /home/riscvuser/chipyard/env.sh +. /root/chipyard/env.sh exec "$@" From 419a1df3e8deb8b4231a296e104e72c4930070f1 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 11 May 2021 18:05:35 -0500 Subject: [PATCH 3/5] Re-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 96bddd77..d4415ee8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ parameters: executors: main-env: docker: - - image: ucbbar/chipyard-ci-image:03650a + - image: ucbbar/chipyard-ci-image:03650a2 environment: JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit From 1d51bb90db1cca25ba84b0f56256516c45814130 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Wed, 12 May 2021 18:26:01 -0500 Subject: [PATCH 4/5] Bump Dockerfile [ci skip] --- dockerfiles/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index 61e2ea81..1f8ece33 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -26,6 +26,11 @@ RUN git clone https://github.com/ucb-bar/chipyard.git && \ ./scripts/ubuntu-req.sh 1>/dev/null && \ sudo rm -rf /var/lib/apt/lists/* +# Update PATH for RISCV toolchain (note: hardcoded for CircleCI) +ENV RISCV="/root/riscv-tools-install" +ENV LD_LIBRARY_PATH="$RISCV/lib" +ENV PATH="$RISCV/bin:$PATH" + # BUILD IMAGE WITH TOOLCHAINS # Use above build as base From 31fd69a3be6879318fd2415a785ccb4bfaac45d6 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Wed, 12 May 2021 23:35:08 -0500 Subject: [PATCH 5/5] Bump CI image --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d4415ee8..fe932ecc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,13 +6,13 @@ version: 2.1 parameters: tools-cache-version: type: string - default: "v8" + default: "v9" # default execution env.s executors: main-env: docker: - - image: ucbbar/chipyard-ci-image:03650a2 + - image: ucbbar/chipyard-ci-image:1d51bb90 environment: JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit @@ -41,7 +41,7 @@ commands: - save_cache: key: << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} paths: - - "/home/riscvuser/<< parameters.tools-version >>-install" + - "/root/<< parameters.tools-version >>-install" ssh-checkout: description: "Add SSH key and checkout code" @@ -95,7 +95,7 @@ commands: - save_cache: key: << parameters.group-key >>-{{ .Branch }}-{{ .Revision }} paths: - - "/home/riscvuser/project" + - "/root/project" run-tests: description: "Run a set of tests" @@ -190,7 +190,7 @@ jobs: - save_cache: key: extra-tests-{{ .Branch }}-{{ .Revision }} paths: - - "/home/riscvuser/project/tests" + - "/root/project/tests" prepare-chipyard-cores: executor: main-env