apt-get install subversion
apt-get install make
atp-get install gcc
sudo vim /etc/profile
export PATH= /pub/tools/package/toolchain/mips-2012.07/bin:/pub/tools/package/toolchain/mips-2014.05/bin:$PATH
export LD_LIBRARY_PATH=/opt/rda/mips-2012.07/lib:/opt/rda/mips-2014.05/lib注意:交叉编译器路径不能更改。
以下仅供参考:
1.因为Ubuntu默认的sh是连接到dash的,又因为dash跟bash的不兼容所以出错了.执行时可以把sh换成bash文件名.sh来执行.成功.dash 修改sh默认连接到bash的一种方法: sudo dpkg-reconfigure dash
选择no 即可!
2.32位电脑安装64位虚拟机,连make clean都error了,安装下面的库即可: sudo apt-get install lib32z1-dev 3.新安装的Ubuntu编译遇到情况: 1.sudo apt-get install make 2.make mconfig make[1]: Entering directory '/home/tv/qingji/s2' ./tools/gen_customer.pl -C aps/customer -E aps/external /bin/sh: 1: ./tools/mconf/mconf: not found make[1]: Leaving directory 'xxxx' ===> 2.1.sudo apt-get install build-essential libncurses5 libncurses5-dev ==> NG 2.2.sudo apt-get install lib32ncurses5-dev ==> OK 3.Compiling ../customer/s2tek/ATV_8501_031QJ/adaptableild_gpio_table.c /pub/tools/package/toolchain/mips-2014.05/bin/..bexec/gcc/mipsel-s2-linux-uclibc/4.7.3/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory ../rules.mak:34: recipe for target 'objsild_gpio_table.o' failed ==>两个地方都需要设置环境变量 /etc/profile 加上 PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/pub/tools/package/toolchain/mips-2014.05/bin:/pub/tools/package/toolchain/mips-2012.07/bin" LD_LIBRARY_PATH="/pub/tools/package/toolchain/mips-2014.05b:/pub/tools/package/toolchain/mips-2012.07b" export PATH export LD_LIBRARY_PATH 4. Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373. /home/tv/radisson/s2/kernelnux-2.6.35.9/kernel/Makefile:138: recipe for target 'kernel/timeconst.h' failed make[3]: *** [kernel/timeconst.h] Error 255 Makefile:961: recipe for target 'kernel' failed ==>删除 @val = @{$canned_values{$hz}}; if (!defined(@val)) { @val = compute_values($hz); } output前面加入 $cv = $canned_values{$hz}; @val = defined($cv) ? @$cv : compute_values($hz);