pulling in the useful parts of Daniel's changes
diff --git a/aos/atom_code/init.cc b/aos/atom_code/init.cc
index b3668e8..033a206 100644
--- a/aos/atom_code/init.cc
+++ b/aos/atom_code/init.cc
@@ -30,9 +30,9 @@
     }
     rlim.rlim_cur = soft;
     if (setrlimit64(resource, &rlim) == -1) {
-      Die("%s-init: setrlimit64(%d, {cur=%jd,max=%jd})"
+      Die("%s-init: setrlimit64(%d, {cur=%ju,max=%ju})"
           " failed with %d (%s)\n", program_invocation_short_name,
-          resource, (intmax_t)rlim.rlim_cur, (intmax_t)rlim.rlim_max,
+          resource, (uintmax_t)rlim.rlim_cur, (uintmax_t)rlim.rlim_max,
           errno, strerror(errno));
     }
   }
diff --git a/aos/build/download_externals.sh b/aos/build/download_externals.sh
index 778c358..5b759a8 100755
--- a/aos/build/download_externals.sh
+++ b/aos/build/download_externals.sh
@@ -8,8 +8,8 @@
 
 CROSS_COMPILE=arm-linux-gnueabihf-
 
-export CC=${CROSS_COMPLIE}gcc-4.7
-export CXX=${CROSS_COMPLIE}g++-4.7
+export CC=${CROSS_COMPILE}gcc-4.7
+export CXX=${CROSS_COMPILE}g++-4.7
 export CFLAGS="-mcpu=cortex-a8 -mfpu=neon"
 export CXXFLAGS="-mcpu=cortex-a8 -mfpu=neon"
 export OBJDUMP=${CROSS_COMPLIE}objdump