arm linux 开发环境搭建

一、vmware中安装Linux发行版,建议安装Fedora9,ubuntu的权限问题会比较麻烦。过程比较简单,省略。。。

 

二、tftp配置步骤

1. #yum install tftp
2. #yum install xinetd
3. #yum install tftp-server
4. #gedit /etc/xinetd.d/tftp
内容如下:
# default: off
# description: The tftp server serves files using the trivial file transfer /
#   protocol.  The tftp protocol is often used to boot diskless /
#   workstations, download configuration files to network-aware printers, /
#   and to start the installation process for some operating systems.
service tftp
{
    disable = no
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -s /tftpboot -c    #ftp根目录
    per_source      = 11
    cps         = 100 2
    flags           = IPv4
}

5. #/etc/init.d/iptables stop #临时关闭防火墙
(永久停用防火墙命令
 lokkit
然后进UI界面选择disable)

6. #setenforce 0  #临时关闭SELinux
(永久停用只要将其加到/root/.bashrc中)
或#gedit /etc/selinux/config将enforcing改成disable(这个方法不太管用)

7. #/etc/init.d/xinetd restart #配置完重启server,或使用serviceconf打开系统服务UI界面打开

8. 这样应该可以了,如果有问题就:
#netstat -a|grep tftp #看服务有没启动
#netstat -nlp #看详细网络服务类表

 

三、nfs引导配置

1. 设置nfs共享目录
#gedit /etc/exports
添加以下内容:
/opt/FriendlyARM/mini2440/root_qtopia *(rw,sync,no_root_squash)
其中:
/opt/FriendlyARM/mini2440/root_qtopia 表示nfs 共享目录,它可以作为开发板的根
文件系统通过nfs 挂接;
* 表示所有的客户机都可以挂接此目录
rw 表示挂接此目录的客户机对该目录有读写的权力
no_root_squash 表示允许挂接此目录的客户机享有该主机的root 身份

2. 使用lokkit关闭防火墙

3. 启动NFS服务
#/etc/init.d/nfs start

4. 本地测试NFS服务
#mount -t nfs localhost: /opt/FriendlyARM/mini2440/root_qtopia /mnt/

 

四、通过NFS 启动系统

1. 烧写u-boot
   在supervivi目录下选a用DNW将u-boot.bin烧写到nand flash

2. nand flash启动,如果开发板中已经安装了linux 系统u-Boot 将会自动启动它,否则
会进入U-Boot 的功能菜单(也可以根据提示,在开机后3 秒中内按任意键进入)

3. 选择s设置引导参数使kernel从nfs引导系统(这样target上就能和pc共享文件系统)参考supervivi的参数配置:
param set linux_cmd_line "console=ttySAC0 root=/dev/nfs nfsroot=10.89.54.73:/home/root_qtopia ip=10.89.58.117:10.89.54.73:10.89.58.254:255.255.255.0:lan-pc-fedora:eth0:off"
其中,param set linux_cmd_line 是设置启动 linux 时的命令参数。其各参数的含义如下:
nfsroot 是自己开发主机的IP 地址(注意是虚拟机内看到的ip,如果使用bridge连接的或会和windows不一样)
“ip=”后面:
第一项(192.168.1.70)是目标板的临时IP(注意不要和局域网内其他IP 冲突);
第二项(192.168.1.111)是开发主机的IP;
第三项(192.168.1.111)是目标板上网关(GW)的设置;
第四项(255.255.255.0)是子网掩码;
第五项是开发主机的名字(一般无关紧要,可随便填写)
eth0 是网卡设备的名称。

4. u-boot通过tftp从host拷贝kernel到nand并加载运行,kernal根据fs引导参数加载fs

 

五、一些有用的命令
服务启动停止
/etc/init.d/xinetd start#tftp
/etc/init.d/xinetd stop
/etc/init.d/xinetd restart
/etc/init.d/iptables restart#防火墙
/etc/init.d/nfs restart
或用命令serviceconf进UI界面配置,这样能使服务在启动时加载

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值