Skip to content

Commit

Permalink
Merge pull request #212 from antmicro/conda-pack-preparations
Browse files Browse the repository at this point in the history
Use Renode from Conda
  • Loading branch information
mithro committed Nov 10, 2019
2 parents 2703309 + ab1cca1 commit 10dc73a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion scripts/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if [ "$FIRMWARE" != "linux" ]; then
fi

# Install a baremetal toolchain with the newlib standard library
if ! ${CPU_ARCH}-elf-newlib --version > /dev/null 2>&1; then
if ! ${CPU_ARCH}-elf-newlib-gcc --version > /dev/null 2>&1; then
conda install gcc-${CPU_ARCH}-elf-newlib
fi
# Install a Linux userspace toolchain with the musl standard library
Expand Down
19 changes: 1 addition & 18 deletions scripts/build-renode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,7 @@ fi

if ! $RENODE_FOUND; then
# Download prebuilt renode Release if none is currently installed

RENODE_PACKAGE=renode-latest.linux-portable.tar.gz
RENODE_URL=https://antmicro.com/projects/renode/builds/$RENODE_PACKAGE
RENODE_LOCATION="$BUILD_DIR/renode"
mkdir -p $RENODE_LOCATION

RENODE_BIN=`find $RENODE_LOCATION -executable -type f -name renode`
if [ ! -x "$RENODE_BIN" ]; then
(
cd $RENODE_LOCATION
wget $RENODE_URL
tar -xf $RENODE_PACKAGE
)

RENODE_BIN=`find $RENODE_LOCATION -executable -type f -name renode`
chmod u+x $RENODE_BIN
echo "Renode downloaded and installed locally: $RENODE_BIN"
fi
conda install -c antmicro -c conda-forge renode
fi

case $CPU in
Expand Down
4 changes: 4 additions & 0 deletions scripts/download-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ set -e

. $SETUP_DIR/settings.sh

# If we activate an environment, CONDA_PREFIX is set. Otherwise use CONDA_DIR.
export CONDA_PREFIX="${CONDA_PREFIX:-$CONDA_DIR}"
export CONDA_DIR=$CONDA_PREFIX

echo " This script is: $SETUP_SRC"
echo " Firmware directory: $TOP_DIR"
echo " Build directory is: $BUILD_DIR"
Expand Down
4 changes: 4 additions & 0 deletions scripts/enter-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ fi

. $SETUP_DIR/settings.sh

# If we activate an environment, CONDA_PREFIX is set. Otherwise use CONDA_DIR.
export CONDA_PREFIX="${CONDA_PREFIX:-$CONDA_DIR}"
export CONDA_DIR=$CONDA_PREFIX

echo " This script is: $SETUP_SRC"
echo " Firmware directory: $TOP_DIR"
echo " Build directory is: $BUILD_DIR"
Expand Down

0 comments on commit 10dc73a

Please sign in to comment.