1.source ~/workspace/source/Terminator/Icebox/configs/test/env.sh
设置环境变量,主要是交叉编译链的路径
等同:export PATH=/opt/toolchains/stbgcc-4.8-1.0/bin:$PATH
cd ccmake/out (带外编译,将编译过程放入out内)
2.ccmake ~/workspace/source/Terminator/Icebox
带外编译 要到项目根目录
c(continue) c(configures) g(genarate)
3.make
cp bin/cloud-start.elf /var/www/html
调试:
(1)apache
sudo apt-get install apache2
rm /root/cloud-start.elf
板子:wget http://ubuntu ip/cloud-start.elf
chmod 777 /root/cloud-start.elf
/root/cloud-start.elf
网页:http://ubuntu ip/index.html
(2)nfs
主机:
1. sudo apt-get install nfs-kernel-server
2. mkdir -p /var/www/nfs
3. sudo vi /etc/exports (末尾添加)
/var/www/nfs *(rw,sync,no_root_squash,no_subtree_check)
4. sudo /etc/init.d/nfs-kernel-server restart
5. sudo mount -t nfs YourUbuntuIP:/var/www/nfs YourOtherDir
cp ~/workspace/ccmake/out/sdk/rootfs /var/www/nfs -aprf (注:nfs下的/home/hybroad/bin都是由/ccmake/out/sdk/rootfs拷贝来的)
vi /etc/exports
cp /bin/cloud-start.elf /var/www/nfs/rootfs/home/hybroad/bin
板子:mount -t nfs ubuntu ip:/var/www/nfs/rootfs/home /home
cloud-start.elf
(3)
启动后通过命令进行nfs挂载
ifconfig eth0 -hwaddr=56:F5:C7:77:83:19 -auto;boot 192.168.12.213:/var/www/ftp/tftproot/vmlinuz 'root=/dev/nfs rw nfsroot=192.168.12.213:/var/www/nfs/rootfs,v3 ip=dhcp'