q

搭建TFTP服务

sudo apt-get install tftpd-hpa tftp-hpa xinetd
mkdir 工作目录

vim /etc/default/tftpd-hpa
---------------------------
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/opt/hiphon/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -c -s"
----------------------------

sudo /etc/init.d/xinetd restart
sudo /etc/init.d/tftpd-hpa restart

test:
touch /opt/hiphon/tftpboot/aaa
tftp 127.0.0.1
get aaa


搭建NFS服务

sudo apt-get install nfs-kernel-server
mkdir 工作目录
chmod 755 nfs_rootfs -R

vim /etc/exports
-----------------------------
添加一行:
/opt/hiphon/nfs_rootfs *(rw,sync,no_root_squash)
-----------------------------

sudo /etc/init.d/nfs-kernel-server restart

test:
mkdir mt
touch mt/aaa
mount -o nolock,tcp 127.0.0.1:/opt/hiphon/nfs_rootfs ./mt
cd mt;ls

umount mt;rm mt -r


网络开发模式

在开发板的UBOOT中输入:
setenv bootcmd tftp 40000000 uImage\;bootm\;

setenv bootargs console=ttySAC0,115200 root=/dev/nfs rw nfsroot=192.168.0.10:/opt/hiphon/nfs_rootfs/ram_rootfs ip=192.168.0.30:192.168.0.10:192.168.0.1:255.255.255.0::eth0:off init=/linuxrc

注意:ram_rootfs文件夹下存放未压缩的根文件系统

saveenv

reset

posted @ 2014-03-13 10:16  tkid  阅读(209)  评论(0编辑  收藏  举报