2024-03-25 17:43:06 +00:00
|
|
|
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)
|
2024-03-24 21:22:34 +00:00
|
|
|
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
|
2024-03-25 17:43:06 +00:00
|
|
|
${DOCKER_EXEC} run -it --rm -v ${TOOLCHAINS_MOUNT}:/opt/riscv -v ${CVW_MOUNT}:/home/${USERNAME}/cvw wallysoc/ubuntu_wally
|
2024-03-24 21:22:34 +00:00
|
|
|
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"
|
2024-03-25 17:43:06 +00:00
|
|
|
${DOCKER_EXEC} run -it --rm -v ${CVW_MOUNT}:/home/${USERNAME}/cvw wallysoc/toolchains_wally
|
2024-03-24 21:22:34 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Successfully reach the end"
|