1. 使用win32diskimager将Z2的系统镜像文件写入tf卡,
  2. tf卡插入Z2的卡槽,
  3. 配置win10网卡静态地址
    1. 以管理员模式打开一个powershell
    2. 输入$var = Get-NetAdapter -InterfaceDescription "*Ethernet*" -Physical | select -ExpandProperty Name; Remove-NetIPAddress -InterfaceAlias $var -Confirm:$false; New-NetIPAddress -InterfaceAlias $var -AddressFamily IPv4 -IPAddress 192.168.2.100 -PrefixLength 24
  4. 连接网线
  5. Z2接上电源线
  6. Z2打开电源
  7. win10上监视网卡连接状态
    1. 打开一个cmd并执行ping 192.168.2.99 -t
    2. 发现ping通后关闭cmd即可
  8. ssh登陆z2
    1. 打开bash,输入xilinx@192.168.2.99,密码同用户名
    2. 进入后执行myhost=$(< /dev/urandom tr -dc a-z0-9|head -c8;echo);sudo pynq_hostname.sh pynq-$myhost;echo /etc/hostname
    3. 记下终端的输出,那将会是pynq的新hostname,如pynq-hostname
    4. 执行reboot重启z2
  9. 释放win10静态地址
    1. 在之前的powershell中执行$var = Get-NetAdapter -InterfaceDescription "*Ethernet*" -Physical | select -ExpandProperty Name; Remove-NetIPAddress -InterfaceAlias $var -Confirm:$false;select -ExpandProperty Name; Set-NetIPInterface -InterfaceAlias $var -Dhcp Enabled
  10. 将z2和win10连入一个网络
    1. 断开win10上的网线,连入带dhcp的网络中,
    2. win10另外连接,确保可以访问pynq-hostname或者pynq-hostname.<localdomain>
    3. 确保ssh xilinx@pynq-hostname可以连接
  11. 访问z2的资源
    1. chrome打开pynq-hostname,输入密码后即可进入z2的jupyter
    2. win10挂载z2的samba文件夹
      1. win10打开文件管理器
      2. 选择Map network drive
      3. 盘符选P:,路径写\\pynq-hostname\xilinx,勾选Connect using different credentials,点击Finish
      4. 输入xilinx和密码,记得选中Remember,然后z2的文件夹就被挂载到P:盘了