gateway_build.sh v2.0