update build-magma script for onyxbuild