mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 10:15:19 +00:00
26 lines
973 B
Bash
Executable File
26 lines
973 B
Bash
Executable File
DOCKER_EXEC=${DOCKER_EXEC-$(which podman)}
|
|
CVW_MOUNT=${CVW_MOUNT:$(pwd)/../../}
|
|
|
|
UBUNTU_WALLY_HASH=$(${DOCKER_EXEC} images --quiet wallysoc/ubuntu_wally)
|
|
TOOLCHAINS_HASH=$(${DOCKER_EXEC} images --quiet wallysoc/toolchains_wally)
|
|
TOOLCHAINS_MOUNT=${TOOLCHAINS_MOUNT}
|
|
|
|
if [ -z $UBUNTU_WALLY_HASH ]; then
|
|
echo "CANNOT FIND wallysoc/ubuntu_wally, please get the image first with \`get_image.sh\`";
|
|
exit 1
|
|
else
|
|
echo "Get ${UBUNTU_WALLY_HASH} for ubuntu_wally"
|
|
fi
|
|
|
|
if [ ! -z $TOOLCHAINS_MOUNT ]; then
|
|
${DOCKER_EXEC} run -it --rm -v ${TOOLCHAINS_MOUNT}:/opt/riscv -v ${CVW_MOUNT}:/home/${USERNAME}/cvw wallysoc/ubuntu_wally
|
|
elif [ -z $TOOLCHAINS_HASH ]; then
|
|
echo "CANNOT FIND wallysoc/toolchains_wally, please get the image first with \`get_image.sh\`";
|
|
exit 1
|
|
else
|
|
echo "Get ${TOOLCHAINS_HASH} for toolchains_wally"
|
|
${DOCKER_EXEC} run -it --rm -v ${CVW_MOUNT}:/home/${USERNAME}/cvw wallysoc/toolchains_wally
|
|
fi
|
|
|
|
echo "Successfully reach the end"
|