xilinx挂载网络文件系统(NFS)使用QSPI TFTP服务器


写在前面:
    1.PC机上要搭建好一个TFTP server, 可以提供给target机tftp uImage 和 devicetree
    2.在一个linux机上搭建好一个NFS server, 建立好一个目录用来将文件系统解压到NFS目录

一、烧写QSPIFLASH
1.在SD卡启动模块下启动,进入U-BOOT
    Hit any key to stop autoboot:  0
    zynq-uboot>
    zynq-uboot>
2.确认QSPIFLASH
    zynq-uboot> sf probe 0 0 0
    SF: Detected S25FL128S_64K with page size 512 Bytes, erase size 128 KiB, total 32 MiB
    zynq-uboot>
3.读出BOOT.bin,得到文件大小
    zynq-uboot> fatload mmc 0 0x03000000 ${boot_image}
    reading BOOT.bin
    17909744 bytes read in 1513 ms (11.3 MiB/s)
4.计算出17909744这个大小的HEX值-->    0x11147f0
5.按这个企擦出QSPI-FLASH
    zynq-uboot> sf erase 0 +0x11147f0
    SF: 17956864 bytes @ 0x0 Erased: OK
6.将刚刚读出的BOOT.bin这个文件,从这个地址写入到qspi-flash的0地址处
    zynq-uboot> sf write 0x03000000 0 0x11147f0
    SF: 17909744 bytes @ 0x0 Written: OK

二、从NFS启动系统
1.正确的配置好跳线,从QSPI启动。
2.对应该的连接器也要接到EMMC接口上
3.上电进入U-Boot

    Net:   Gem.e000b000
    Hit any key to stop autoboot:  0
    zynq-uboot>
4.设置好本机IP
    zynq-uboot> setenv ipaddr 10.180.8.223
5.设置好TFTP服务器IP
    zynq-uboot> setenv serverip 10.180.8.171
6.从TFTP服务器上下载devicetree
    zynq-uboot> tftpboot 0x2A00000 10.180.8.171:devicetree.dtb
    Gem.e000b000 Waiting for PHY auto negotiation to complete.... done
    Using Gem.e000b000 device
    TFTP from server 10.180.8.171; our IP address is 10.180.8.223
    Filename 'devicetree.dtb'.
    Load address: 0x2a00000
    Loading: ####
             509.8 KiB/s
    done
    Bytes transferred = 44923 (af7b hex)    
7.从TFTP服务器上下载uImage
    zynq-uboot> tftpboot 0x3000000 10.180.8.171:uImage
    Gem.e000b000:1 is connected to Gem.e000b000.  Reconnecting to Gem.e000b000
    Gem.e000b000 Waiting for PHY auto negotiation to complete.... done
    Using Gem.e000b000 device
    TFTP from server 10.180.8.171; our IP address is 10.180.8.223
    Filename 'uImage'.
    Load address: 0x3000000
    Loading: #################################################################
             #################################################################
             #################################################################
             #################################################################
             #################################################################
             ####
             1.6 MiB/s
    done
    Bytes transferred = 4819144 (4988c8 hex)
8.设置好启动参数
    zynq-uboot> setenv bootargs "noinitrd console=ttyPS1,115200 earlyprintk loglevel=8 rootwait root=/dev/nfs rootfstype=nfs rw nfsroot=10.180.8.200:/home/adolph/share/nfs_rootfs,vers=4,tcp ip=10.180.8.223:10.180.8.200:10.180.8.1:255.255.255.0::eth0::off"    
9.启动Kernel
    zynq-uboot> bootm 0x3000000 - 0x2A00000
    ## Booting kernel from Legacy Image at 03000000 ...
       Image Name:   Linux-4.14.0-g7cee85234c39
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4819080 Bytes = 4.6 MiB
       Load Address: 00008000
       Entry Point:  00008000
       Verifying Checksum ... OK
    ## Flattened Device Tree blob at 02a00000
       Booting using the fdt blob at 0x2a00000
       Loading Kernel Image ... OK
       Loading Device Tree to 1fff2000, end 1fffff7a ... OK

    Starting kernel ...
10.    状态
    axi-jesd204-tx 44b90000.axi-jesd204-tx: axi_jesd204_tx_probe: enter
    macb e000b000.ethernet eth0: link up (100/Full)
    IP-Config: Complete:
         device=eth0, hwaddr=00:0a:35:00:01:22, ipaddr=10.180.8.223, mask=255.255.255.0, gw=10.180.8.1
         host=10.180.8.223, domain=, nis-domain=(none)
         bootserver=10.180.8.200, rootserver=10.180.8.200, rootpath=     nameserver0=238.0.0.0
    ALSA device list:
    : Mounted root (nfs4 filesystem) on device 0:15.
    devtmpfs: mounted
    Freeing unused kernel memory: 1024K
    Starting rcS...
    ++ Mounting filesystem
    mount: mounting /dev/mmcblk0p1 on /mnt failed: No such file or directory
    mount: mounting /dev/mmcblk0 on /mnt failed: No such file or directory
    ++ Setting up mdev
    ++ Starting telnet daemon
    ++ Starting http daemon
    ++ Starting ftp daemon
    ++ Starting ssh daemon
    /etc/init.d/rcS: line 34: /usr/sbin/sshd: not found
    rcS Complete
    zynq>
    

 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值