build.sh: Support architecture check

Change-Id: If71685c238c8e1690fd50fee9b4151f803305a81