build cube hal library
fix file permissions