建議在centos下編譯apollo,沒辦法,只有本身搞定在Ubuntu下面的編譯問題。
遇到的問題和解決方法以下:
1. no gmake
gmake 其實就是Ubuntu下面的make,只是個別系統如centos攜帶自身的make,因此用gmake指GNU make。
修改文件: pnx8400_a9_env.sh
----------------------------------------------------------------
# for most linux system such as Ubuntu, gmake is just make
if which gmake ; then
export MAKE='gmake'
else
export MAKE='make'
fi
if [ "$_TMTGTREL" = "retail" ]; then
export MAKE="${MAKE} -s"
fi
------------------------------------------------------------------
2. bash string comparision
target/build/systems/linux/stbtv/makefile
------------------------------------------------------------------
check_config:
@echo -n "Checking environment configuration ... "
@if [ x$(NXP_BASE_ROOT) == x ] ; then \
echo "Error: NXP_BASE_ROOT not set"; \
exit 1; \
fi
------------------------------------------------------------------
這樣的語法會存在問題,須要把 == 改爲 =進行字符串比較。
refer: http://tldp.org/LDP/abs/html/comparison-ops.html#EQUALSIGNREF
html