diff --git a/buildroot/scripts/entrypoint.bash b/buildroot/scripts/entrypoint.bash index 99cd4a6..0d68bf3 100644 --- a/buildroot/scripts/entrypoint.bash +++ b/buildroot/scripts/entrypoint.bash @@ -16,5 +16,5 @@ elif [ "$1" = 'bash' ]; then bash else colcon "$@" - chown -R $ORIG_UID:$ORIG_GID /ws/install /ws/build /ws/log || true + chown -R $ORIG_UID:$ORIG_GID $PWD/install $PWD/build $PWD/log || true fi \ No newline at end of file diff --git a/buildroot/xcolcon b/buildroot/xcolcon old mode 100644 new mode 100755 index b993131..3fe9649 --- a/buildroot/xcolcon +++ b/buildroot/xcolcon @@ -2,8 +2,13 @@ set -e -docker run --rm -v $PWD/src:/ws/src -v $PWD/xbuild:/ws/build \ - -v $PWD/xinstall:/ws/install -w /ws \ - -e ORIG_UID=$(id -u) -e ORIG_GID=$(id -g) \ - ghcr.io/fortefibre/buildroot:$ROS_DISTRO-aarch64 \ - "$@" \ No newline at end of file +if [ ! -f /proc/sys/fs/binfmt_misc/qemu-aarch64 ]; then + docker run --privileged --rm tonistiigi/binfmt --install all +fi + +docker run --rm -v $PWD/src:$PWD/src -v $PWD/xbuild:$PWD/build \ + -v $PWD/xinstall:$PWD/install -w $PWD \ + -e ORIG_UID=$(id -u) -e ORIG_GID=$(id -g) -it \ + --platform linux/arm64 \ + ghcr.io/fortefibre/buildroot:$ROS_DISTRO-aarch64 \ + "$@" \ No newline at end of file