Apply this (I'm going to add it to git later, after I checked it on Linux):
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index 6b12fa015e..09b420c0c9 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -32,7 +32,12 @@ fi
# This is the absolute path to where the script resides.
rockboxdevdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-parallel=`nproc`
+if [ `uname -s` != "Darwin" ]; then
+ parallel=`nproc`
+else
+ parallel=`sysctl -n hw.physicalcpu`
+fi
+
if [ $parallel -gt 1 ] ; then
make_parallel=-j$parallel
fi
After that you'll need further tools, likely best approach is to use homebrew.