• arm nfs 启动


    step 1:创建根文件系统目录
    cd /opt/FriendlyARM/mini6410/linux
    mkdir rootfs
    cd rootfs
    mkdir bin dev etc lib proc sbin sys usr mnt tmp var
    mkdir usr/bin usr/lib usr/sbin lib/modules

    step2:创建设备文件:
    cd dev/
    mknod -m 666 console c 5 1
    mknod -m 666 null c 1 3
    cd ..


    step3:安装/etc(配置文件可以从其他做好的嵌入式系统中cp)
    tarzxvf etc.tar.gz –C /xxx/rootfs

    step4:编译内核模块:
    进入Linux内核目录(linux 2.6.36)
    make modules ARCH=arm CROSS_COMPILE=arm-linux-

    step5:安装内核模块
    make modules_install ARCH=arm INSTALL_MOD_PATH=/xxx/rootfs

    step6: 配置busybox
    Busybox: 嵌入式开发中的瑞士军刀
    进入busybox目录执行
    make menuconfig
    a.进入 Busybox Settings à
    build Options->
       选中 “Build busybox as a static binary”, 静态链接
       Cross Compiler prefix (arm-linux-)
       Installation Options->
       选中 “Don‘t use /usr”, 选中该项可以避免busybox 被安装到宿主系统的/usr目录下,破坏宿主系统
       Busybox Installation Prefix (/xxx/rootfs)
       该选项表明编译后的busybox的安装位置

    step7: 编译,安转busybox
    make ARCH=arm CROSS_COMPILE=arm-linux-
    make install

    step8: 从 NandFlash 启动 Tiny6410,然后修改UBoot 的环境变量 bootargs(就是这里了,可以解决一开始文章的 not responding的问题)!
    操作命令:
    setenv serverip console=ttySAC0 root=/dev/nfs nfsroot=192.168.1.100:/opt/FriendlyARM/mini6410/linux/rootfs,proto=tcp,nfsvers=3,nolock ip=192.168.1.70:192.168.1.100:192.168.1.100:255.255.255.0:linux.arm9.net:eth0:off

    解释一下其中的意思了:
    console=ttySAC0   ttySAC0 作为控制台
    root=dev/nfs    固定格式,表示内核采用nfs 方式起根文件系统
    nfsroot=192.168.1.100:/opt/FriendlyARM/mini6410/linux/rootfs,
    表示的是 nfs 起的根文件系统位于 nfs 服务器 /opt/FriendlyARM/mini6410/linux/rootfs,目录下
    proto=tcp,nfsvers=3,nolock
    如果不加这条语句会造成上面的nfs: server192.168.1.100 not responding, still trying这样的错误!
    原因:NFS的默认传输协议是UDP,而PC机与嵌入式系统通过UPD交互时就会出现严重的网卡丢包现象(这个也只是暂时的分析)
    !貌似好多人都说是网卡移植出现的问题!具体我也就不知道了,反正写上这个,然后就没有问题了!
    ip=192.168.1.70:192.168.1.100:192.168.1.100:255.255.255.0:linux.arm9.net:eth0:off
    这句话的格式是:ip=IP1:IP0:IP2:IP3:nameofyoulike:eth0:off
    第一项(IP1)是目标板的临时IP(注意不要和局域网内其它的IP有冲突)
    第二项(IP0)是我的虚拟机的IP
    第三项(IP2)是目标板上网管(GW)的设置,这个参数设置跟虚拟机网管一致
    第四项(IP3)是子网掩码
    第五项(yourname)是开发板的名字(随便啦)
    第六项(eth0)是网卡设备的名字
    ----------------------------------------------------------------------------------------------------------------------

    1 setenv serverip 192.168.2.1
    2 setenv ipaddr 192.168.2.230
    -------------------------------------------------------------------------------
    3 setenv bootargs console=ttySAC0 root=/dev/nfs nfsroot=192.168.2.1:/home/nfs/linux_qt,proto=tcp,nfsvers=3,nolock ip=192.168.2.230:192.168.2.1:192.168.2.1:255.255.255.0:linux.arm9.net:eth0:off
    -------------------------------------------------------------------------------
    setenv bootargs console=ttySAC0 root=/dev/nfs nfsroot=192.168.2.1:/home/nfs/linux_qt ip=192.168.2.230:192.168.2.1:192.168.2.1:255.255.255.0:linux.arm9.net:eth0:off

    bootargs=root=ubi0:FriendlyARM-root ubi.mtd=2 rootfstype=ubifs init=/linuxrc console=ttySAC0,115200
    -------------------------------------------------------------------------------
    4 setenv gatewayip 192.168.2.1

    5 ping 192.168.2.1

    6 tftp c0008000 zImage

    7 bootm

    尝试了好多次, 终于成功,其过程有点难, 没有一一记录,其中很多来自网上的内容,仅供参考, 和自己复习。

  • 相关阅读:
    Python 中的 None 与真假
    AVR第5课:蜂鸣器
    Solr使用入门指南
    EJB究竟是什么,真的那么神奇吗??
    Android 各个版本号WebView
    android SQLite 使用实例
    BackTrack5 (BT5)无线password破解教程之WPA/WPA2-PSK型无线password破解
    腾讯QQ企业邮箱POP3/SMTP设置
    【LeetCode】Substring with Concatenation of All Words
    PreferenceFragment 使用 小结
  • 原文地址:https://www.cnblogs.com/kwingmei/p/3241888.html
Copyright © 2020-2023  润新知