diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e174c310..98fcc60c 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -78,9 +78,9 @@ jobs: - name: Setup conda (install all deps) run: | cd ${{ env.REMOTE_WORK_DIR }} - conda env create -f ./conda-reqs.yaml -p ./.conda-env eval "$(conda shell.bash hook)" - conda install -y -p $PWD/.conda-env -c ucb-bar riscv-tools=1.0.4 + conda-lock --conda $(which conda) -f ./conda-reqs.yaml -f ./riscv-tools.yaml -p linux-64 + conda-lock install --conda $(which conda) -p $PWD/.conda-env - name: Install Spike run: | cd ${{ env.REMOTE_WORK_DIR }} diff --git a/.github/workflows/weekly-build.yml b/.github/workflows/weekly-build.yml index 25a3ba5d..a240fef9 100644 --- a/.github/workflows/weekly-build.yml +++ b/.github/workflows/weekly-build.yml @@ -32,9 +32,9 @@ jobs: - name: Setup conda (install all deps) run: | cd ${{ env.REMOTE_WORK_DIR }} - conda env create -f ./conda-reqs.yaml -p ./.conda-env eval "$(conda shell.bash hook)" - conda install -y -p $PWD/.conda-env -c ucb-bar riscv-tools=1.0.4 + conda-lock --conda $(which conda) -f ./conda-reqs.yaml -f ./riscv-tools.yaml -p linux-64 + conda-lock install --conda $(which conda) -p $PWD/.conda-env - name: Initialize all submodules run: | cd ${{ env.REMOTE_WORK_DIR }} diff --git a/README.md b/README.md index ae55aa37..0be75268 100644 --- a/README.md +++ b/README.md @@ -22,32 +22,29 @@ To run FireMarshal independently, follow along from the next section (Standalone FireMarshal uses the [Conda](https://docs.conda.io/en/latest/) package manager to help manage system dependencies. This allows users to create an "environment" that holds system dependencies like ``make``, ``git``, etc. -Please install Conda using the Chipyard documentation [here](https://chipyard.readthedocs.io/en/main/Chipyard-Basics/Initial-Repo-Setup.html#default-requirements-installation). +Additionally, FireMarshal uses [Conda Lock](https://conda.github.io/conda-lock/) to generate lock files for Conda environments. +Please install Conda and Conda Lock using the Chipyard documentation [here](https://chipyard.readthedocs.io/en/main/Chipyard-Basics/Initial-Repo-Setup.html#default-requirements-installation). -Next you can run the following command to create a FireMarshal environment called ``firemarshal``. +Next you can run the following commands to create a FireMarshal environment called ``firemarshal`` with a RISC-V compatible toolchain: ```bash -conda env create -f ./conda-reqs.yaml -n firemarshal +conda-lock --conda $(which conda) -f ./conda-reqs.yaml -f ./riscv-tools.yaml -p linux-64 +conda-lock install --conda $(which conda) -n firemarshal ``` To enter this environment, you then run the ``activate`` command. **Note that this command should be run whenever you want to use FireMarshal so that packages can be properly be added to your ``PATH``**. ```bash -conda activate firemarshal # or whatever name you gave during environment creation -``` - -In addition to standard packages added in the conda environment, you will need a RISC-V compatible toolchain and the RISC-V ISA simulator (Spike). -A RISC-V compatible toolchain can be obtained by the following: - -```bash -conda install -n firemarshal -c ucb-bar riscv-tools +conda activate firemarshal # or whatever name/prefix you gave during environment creation ``` +In addition to standard packages added in the conda environment, you will need the RISC-V ISA simulator (Spike). To install Spike, please refer to https://github.com/riscv-software-src/riscv-isa-sim. Finally, if you are running as a user on a machine without ``sudo`` access it is required for you to install ``guestmount`` for disk manipulation. You can install this through your default package manager (for ex. ``apt`` or ``yum``). +You can also follow along with the ``guestmount`` [installation instructions found in the FireSim project](https://docs.fires.im/en/stable/Getting-Started-Guides/On-Premises-FPGA-Getting-Started/Initial-Setup/RHS-Research-Nitefury-II.html?highlight=guestmount#install-guestmount). ## Basic Usage diff --git a/conda-reqs.yaml b/conda-reqs.yaml index 08b85a02..a0cd4e70 100644 --- a/conda-reqs.yaml +++ b/conda-reqs.yaml @@ -9,10 +9,10 @@ platforms: dependencies: - qemu # from ucb-bar channel - https://github.com/ucb-bar/qemu-feedstock - - python>=3.9 + - python>=3.8 - rsync - psutil - - doit>=0.34 + - doit>=0.34.0 - git - gitpython - humanfriendly @@ -27,8 +27,8 @@ dependencies: - sphinx - sphinx_rtd_theme - unzip - - gcc - - gxx + - gcc<13 + - gxx<13 - conda-gcc-specs - binutils - sysroot_linux-64=2.17 @@ -47,3 +47,4 @@ dependencies: - findutils - lzop - pygithub + - autoconf diff --git a/riscv-tools.yaml b/riscv-tools.yaml new file mode 100644 index 00000000..35f89fe6 --- /dev/null +++ b/riscv-tools.yaml @@ -0,0 +1,11 @@ +channels: + - conda-forge + - ucb-bar + - nodefaults + +# non-standard key used in conda-lock: https://github.com/conda-incubator/conda-lock#platform-specification +platforms: + - linux-64 + +dependencies: + - riscv-tools==1.0.4 # from ucb-bar channel - https://github.com/ucb-bar/riscv-tools-feedstock