• 芯驰D9评测(2)--系统环境配置连接


    linux开发板的软件开发三件套: 建立连接-->建立交叉编译环境-->建立驱动开发环境。 

    如果我们不涉及镜像的深度定制,只是平台化应用的话

    1. 建立串口连接

    查看手册, 获取接口定义说明: 

    板载一共两个端子,三个串口。 

     调试端口信息参照快速指南,用原配的USB-TTL线缆连接电脑(看驱动应该是用的CH340): 

     调试R5内核,就连接上面的UART3,另外一节说明。 

    调试工具还是我们经典的secureCRT,连接好后,设置串口速率115200, 选择正确的串口建立连接: 

    最好重新复位一下,登录用户root, 初始无密码,可以用passwd命令设置密码: 

     

    小核R5核可以通过另外个串口连接RTOS进行开发, 但没看到详细文档, 在评估手册里有一句“如需深入了解异构多核通信方式的实现,请阅读应用笔记《MYD-JD9X R5 协处理器
    应用开发笔记》。”, 这个应用笔记暂时还没找到,确认串口连接后,只能放一放。 

    串口连到J6: 

     

    1. >help
    2. >
    3. help:
    4. Lists all the registered commands
    5. >
    6. sleepm: sleep number of milliseconds
    7. sleepm 1000
    8. >
    9. sleep: sleep number of seconds
    10. sleep 5
    11. >
    12. chain:
    13. chain load another binary
    14. >
    15. stackstomp:
    16. intentionally overrun the stack
    17. >
    18. crash:
    19. intentionally crash
    20. >
    21. mc:
    22. copy a range of memory
    23. >
    24. fb:
    25. fill range of memory by byte
    26. >
    27. fh:
    28. fill range of memory by halfword
    29. >
    30. fw:
    31. fill range of memory by word
    32. >
    33. mb:
    34. modify byte of memory
    35. >
    36. mh:
    37. modify halfword of memory
    38. >
    39. mw:
    40. modify word of memory
    41. >
    42. db:
    43. display memory in bytes
    44. >
    45. dh:
    46. display memory in halfwords
    47. >
    48. dw:
    49. display memory in words
    50. >
    51. task-stats:
    52. Showing the state of RTOS task
    53. >

     应该是RTOS的系统调试命令,其中并没有手册上的GPIO命令,待找到文档后另文记录。

    2. 对照手册熟悉板载资源和命令: 

     2. 1查看CPU信息: 

    1. root@myd-jd9x:~# cat /proc/cpuinfo
    2. processor : 0
    3. BogoMIPS : 6.00
    4. Features : fp asimd evtstrm crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop
    5. CPU implementer : 0x41
    6. CPU architecture: 8
    7. CPU variant : 0x2
    8. CPU part : 0xd05
    9. CPU revision : 0
    10. processor : 1
    11. BogoMIPS : 6.00
    12. Features : fp asimd evtstrm crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop
    13. CPU implementer : 0x41
    14. CPU architecture: 8
    15. CPU variant : 0x2
    16. CPU part : 0xd05
    17. CPU revision : 0
    18. processor : 2
    19. BogoMIPS : 6.00
    20. Features : fp asimd evtstrm crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop
    21. CPU implementer : 0x41
    22. CPU architecture: 8
    23. CPU variant : 0x2
    24. CPU part : 0xd05
    25. CPU revision : 0
    26. processor : 3
    27. BogoMIPS : 6.00
    28. Features : fp asimd evtstrm crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop
    29. CPU implementer : 0x41
    30. CPU architecture: 8
    31. CPU variant : 0x2
    32. CPU part : 0xd05
    33. CPU revision : 0

     查看CPU温度: 

    1. root@myd-jd9x:~# cat /sys/class/thermal/thermal_zone0/temp
    2. 42000

    2.2 查看系统RTC,设置系统时间

       RTC(Real-time clock)本身是一个时钟,用来记录真实时间,当软件系统关机后
    保留系统时间并继续进行计时,系统重新开启后在将时间同步进软件系统。
      JD9X 芯片内部包含 RTC 时钟,如果实际产品对 RTC 功耗要求不是很高,对断电时间
    保持要求在一个月以内,可以直接使用芯片内部 RTC,否则就需要采用专用外部 RTC 芯
    片了。RTC 的测试通常采用 Linux 系统常用的 hwclock 和 date 命令配合进行,下面测试
    将系统时间写入 RTC,读取 RTC 时间并设置为系统时间并进行时间掉电保持的测试。 

     查看设备:

    1. root@myd-jd9x:/mnt/mmc# ls /dev/rtc* -al
    2. lrwxrwxrwx 1 root root 4 Jan 1 00:00 /dev/rtc -> rtc0
    3. crw------- 1 root root 250, 0 Jan 1 00:00 /dev/rtc0
    4. crw------- 1 root root 250, 1 Jan 1 00:00 /dev/rtc1

    查看及设置系统时间:

    1. root@myd-jd9x:/mnt/mmc# date
    2. Fri Jan 1 01:55:16 UTC 2066
    3. root@myd-jd9x:/mnt/mmc# date 100311332023.10
    4. Tue Oct 3 11:33:10 UTC 2023

     设置系统时间格式: YYDDHHMMYYYY.SS

    此时设置的系统时间掉电不会保存,可以用hwclock命令查看、写入、再去人RTC设备的系统时钟:

    1. root@myd-jd9x:/mnt/mmc# hwclock
    2. Fri Jan 1 01:58:07 2066 0.000000 seconds
    3. root@myd-jd9x:/mnt/mmc# hwclock -w
    4. root@myd-jd9x:/mnt/mmc# hwclock -r
    5. Tue Oct 3 11:35:43 2023 0.000000 seconds
    6. root@myd-jd9x:/mnt/mmc# hwclock
    7. Tue Oct 3 11:35:48 2023 0.000000 seconds

    2.3 查看内存: 

    1. root@myd-jd9x:~# cat /proc/meminfo
    2. MemTotal: 1646188 kB
    3. MemFree: 1218344 kB
    4. MemAvailable: 1353540 kB
    5. Buffers: 6272 kB
    6. Cached: 283548 kB
    7. SwapCached: 0 kB
    8. Active: 52676 kB
    9. Inactive: 274908 kB
    10. Active(anon): 37892 kB
    11. Inactive(anon): 1164 kB
    12. Active(file): 14784 kB
    13. Inactive(file): 273744 kB
    14. Unevictable: 0 kB
    15. Mlocked: 0 kB
    16. SwapTotal: 0 kB
    17. SwapFree: 0 kB
    18. Dirty: 0 kB
    19. Writeback: 0 kB
    20. AnonPages: 35888 kB
    21. Mapped: 45416 kB
    22. Shmem: 1288 kB
    23. Slab: 37956 kB
    24. SReclaimable: 19988 kB
    25. SUnreclaim: 17968 kB
    26. KernelStack: 2080 kB
    27. PageTables: 632 kB
    28. NFS_Unstable: 0 kB
    29. Bounce: 0 kB
    30. WritebackTmp: 0 kB
    31. CommitLimit: 823092 kB
    32. Committed_AS: 103868 kB
    33. VmallocTotal: 135290290112 kB
    34. VmallocUsed: 0 kB
    35. VmallocChunk: 0 kB
    36. AnonHugePages: 18432 kB
    37. ShmemHugePages: 0 kB
    38. ShmemPmdMapped: 0 kB
    39. CmaTotal: 262144 kB
    40. CmaFree: 240888 kB
    41. HugePages_Total: 0
    42. HugePages_Free: 0
    43. HugePages_Rsvd: 0
    44. HugePages_Surp: 0
    45. Hugepagesize: 2048 kB

     看懂参数 

     MemTotal
    :所有可用的 RAM 大小,物理内存减去预留位和内核使用
     MemFree
    :LowFree + HighFree
     Buffers
    :用来给块设备做缓存的大小
     Cached
    :文件的缓冲区大小
     SwapCached
    :已经被交换出来的内存。与 I/O 相关
     Active
    :经常(最近)被使用的内存
     Inactive
    :最近不常使用的内存 

     系统内置了memtester工具,可以做压测:

    1. root@myd-jd9x:~# memtester
    2. memtester version 4.5.0 (64-bit)
    3. Copyright (C) 2001-2020 Charles Cazabon.
    4. Licensed under the GNU General Public License version 2 (only).
    5. pagesize is 4096
    6. pagesizemask is 0xfffffffffffff000
    7. need memory argument, in MB
    8. Usage: memtester [-p physaddrbase [-d device]] <mem>[B|K|M|G] [loops]

     测试看看: 

    1. root@myd-jd9x:~# memtester 300M 1
    2. memtester version 4.5.0 (64-bit)
    3. Copyright (C) 2001-2020 Charles Cazabon.
    4. Licensed under the GNU General Public License version 2 (only).
    5. pagesize is 4096
    6. pagesizemask is 0xfffffffffffff000
    7. want 300MB (314572800 bytes)
    8. got 300MB (314572800 bytes), trying mlock ...locked.
    9. Loop 1/1:
    10. Stuck Address : ok
    11. Random Value : ok
    12. Compare XOR : ok
    13. Compare SUB : ok
    14. Compare MUL : ok
    15. Compare DIV : ok
    16. Compare OR : ok
    17. Compare AND : ok
    18. Sequential Increment: ok
    19. Solid Bits : ok
    20. Block Sequential : ok
    21. Checkerboard : ok
    22. Bit Spread : ok
    23. Bit Flip : ok
    24. Walking Ones : ok
    25. Walking Zeroes : ok
    26. 8-bit Writes : ok
    27. 16-bit Writes : ok
    28. Done.

    2.3查看EMMC, 测试读写速度

    1. root@myd-jd9x:/mnt/mmc# fdisk -l
    2. Found valid GPT with protective MBR; using GPT
    3. Disk /dev/mmcblk0: 30777344 sectors, 2740M
    4. Logical sector size: 512
    5. Disk identifier (GUID): 4ad76685-a1da-474a-8041-154d90f10ef7
    6. Partition table holds up to 128 entries
    7. First usable sector is 4096, last usable sector is 30777310
    8. Number Start (sector) End (sector) Size Name
    9. 1 4096 4607 256K dil2_a
    10. 2 4608 5119 256K dil2_b
    11. 3 5120 6143 512K ddr_init_seq_a
    12. 4 6144 7167 512K ddr_init_seq_b
    13. 5 7168 8191 512K ddr_fw_a
    14. 6 8192 9215 512K ddr_fw_b
    15. 7 9216 9247 16384 ddr_ioretention
    16. 8 9248 9503 128K system_config_a
    17. 9 9504 9759 128K system_config_b
    18. 10 9760 10783 512K ssystem_a
    19. 11 10784 11807 512K ssystem_b
    20. 12 11808 11935 65536 hsm_fw_a
    21. 13 11936 12063 65536 hsm_fw_b
    22. 14 12064 13087 512K preloader_a
    23. 15 13088 14111 512K preloader_b
    24. 16 14112 18207 2048K safety_os_a
    25. 17 18208 22303 2048K safety_os_b
    26. 18 22304 71455 24.0M res_a
    27. 19 71456 120607 24.0M res_b
    28. 20 120608 120863 128K atf_a
    29. 21 120864 121119 128K atf_b
    30. 22 121120 125215 2048K tos_a
    31. 23 125216 129311 2048K tos_b
    32. 24 129312 129439 65536 vbmeta_a
    33. 25 129440 129567 65536 vbmeta_b
    34. 26 129568 133663 2048K bootloader_a
    35. 27 133664 137759 2048K bootloader_b
    36. 28 137760 137887 65536 env_a
    37. 29 137888 138015 65536 env_b
    38. 30 138016 12720927 6144M rootfs
    39. 31 12720928 16915231 2048M backup
    40. 32 16915232 16980767 32.0M sdrv_update
    41. 33 16980768 16981791 512K dtb_a
    42. 34 16981792 16982815 512K dtb_b
    43. 35 16982816 16983839 512K dtbo_a
    44. 36 16983840 16984863 512K dtbo_b
    45. 37 16984864 17042207 28.0M kernel_a
    46. 38 17042208 17099551 28.0M kernel_b
    47. 39 17099552 17623839 256M data
    48. 40 17623840 30777310 6422M userdata
    49. Disk /dev/mmcblk0rpmb: 4 MB, 4194304 bytes, 8192 sectors
    50. 128 cylinders, 4 heads, 16 sectors/track
    51. Units: sectors of 1 * 512 = 512 bytes
    52. Disk /dev/mmcblk0rpmb doesn't contain a valid partition table
    53. Disk /dev/mmcblk0boot1: 4 MB, 4194304 bytes, 8192 sectors
    54. 128 cylinders, 4 heads, 16 sectors/track
    55. Units: sectors of 1 * 512 = 512 bytes
    56. Disk /dev/mmcblk0boot1 doesn't contain a valid partition table
    57. Disk /dev/mmcblk0boot0: 4 MB, 4194304 bytes, 8192 sectors
    58. 128 cylinders, 4 heads, 16 sectors/track
    59. Units: sectors of 1 * 512 = 512 bytes
    60. Disk /dev/mmcblk0boot0 doesn't contain a valid partition table
    61. Disk /dev/mmcblk2: 29 GB, 31266439168 bytes, 61067264 sectors
    62. 3801 cylinders, 255 heads, 63 sectors/track
    63. Units: sectors of 1 * 512 = 512 bytes
    64. Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
    65. /dev/mmcblk2p1 0,130,3 1023,254,63 8192 61067263 61059072 29.1G 7 HPFS/NTFS

    df命令查看分区信息 

    1. root@myd-jd9x:~# df -h
    2. Filesystem Size Used Available Use% Mounted on
    3. /dev/root 1.9G 1.4G 353.4M 81% /
    4. devtmpfs 659.1M 0 659.1M 0% /dev
    5. tmpfs 803.8M 0 803.8M 0% /dev/shm
    6. tmpfs 803.8M 128.0K 803.7M 0% /tmp
    7. tmpfs 803.8M 408.0K 803.4M 0% /run

     izone命令测试读写速度:

    1. root@myd-jd9x:~# iozone -e -I -a -s 100M -r 1M -i 0 -i 1 -i 2
    2. Iozone: Performance Test of File I/O
    3. Version $Revision: 3.489 $
    4. Compiled for 64 bit mode.
    5. Build: linux
    6. Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
    7. Al Slater, Scott Rhine, Mike Wisner, Ken Goss
    8. Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
    9. Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
    10. Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
    11. Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
    12. Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,
    13. Vangel Bojaxhi, Ben England, Vikentsi Lapa,
    14. Alexey Skidanov, Sudhir Kumar.
    15. Run began: Tue Oct 3 11:49:24 2023
    16. Include fsync in write timing
    17. O_DIRECT feature enabled
    18. Auto Mode
    19. File size set to 102400 kB
    20. Record Size 1024 kB
    21. Command line used: iozone -e -I -a -s 100M -r 1M -i 0 -i 1 -i 2
    22. Output is in kBytes/sec
    23. Time Resolution = 0.000001 seconds.
    24. Processor cache size set to 1024 kBytes.
    25. Processor cache line size set to 32 bytes.
    26. File stride size set to 17 * record size.
    27. random random bkwd record stride
    28. kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread
    29. 102400 1024 81469 82252 259652 270079 253454 81344
    30. iozone test complete.

     测试结果: 读--253Mbps, 写--81Mbps

    2.4 查看SD卡, 挂载分区, 测试读写速度 

     上面fdisk命令有列出sd卡的分区信息: 

    1. Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
    2. /dev/mmcblk2p1 0,130,3 1023,254,63 8192 61067263 61059072 29.1G 7 HPFS/NTFS

    注意,如果提示信息是windows系统的话,可以在PC上用读卡器重新格式化NTFS格式。  

    新建目录,并挂载分区,查看:

    1. root@myd-jd9x:~# mount /dev/mmcblk2p1 /mmc
    2. root@myd-jd9x:~# df -h
    3. Filesystem Size Used Available Use% Mounted on
    4. /dev/root 1.9G 1.4G 353.4M 81% /
    5. devtmpfs 659.1M 0 659.1M 0% /dev
    6. tmpfs 803.8M 0 803.8M 0% /dev/shm
    7. tmpfs 803.8M 124.0K 803.7M 0% /tmp
    8. tmpfs 803.8M 408.0K 803.4M 0% /run
    9. /dev/mmcblk2p1 29.1G 63.5M 29.1G 0% /mmc

    此时目录/mmc为只读属性

    1. root@myd-jd9x:~# cd /mmc
    2. root@myd-jd9x:/mmc# ls
    3. System Volume Information
    4. root@myd-jd9x:/mmc# mkdir temp
    5. mkdir: can't create directory 'temp': Read-only file system

    在目录下操作,就可以读写了

    1. root@myd-jd9x:/mmc# mount /dev/mmcblk2p1 /mmc
    2. root@myd-jd9x:/mmc# ls
    3. root@myd-jd9x:/mmc# mkdir temp
    4. root@myd-jd9x:/mmc# ls
    5. temp
    6. root@myd-jd9x:/mmc# df -h
    7. Filesystem Size Used Available Use% Mounted on
    8. /dev/root 1.9G 1.4G 353.4M 81% /
    9. devtmpfs 659.1M 0 659.1M 0% /dev
    10. tmpfs 803.8M 0 803.8M 0% /dev/shm
    11. tmpfs 803.8M 128.0K 803.7M 0% /tmp
    12. tmpfs 803.8M 408.0K 803.4M 0% /run
    13. /dev/mmcblk2p1 29.1G 63.5M 29.1G 0% /mmc

    遗留问题--怎么开机自动挂载还没解决,编辑/etc/fstab方法没起作用

     测试读写速度: 

    1. root@myd-jd9x:/mmc# iozone -e -I -a -s 100M -r 1M -i 0 -i 1
    2. Iozone: Performance Test of File I/O
    3. Version $Revision: 3.489 $
    4. Compiled for 64 bit mode.
    5. Build: linux
    6. Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
    7. Al Slater, Scott Rhine, Mike Wisner, Ken Goss
    8. Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
    9. Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
    10. Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
    11. Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
    12. Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,
    13. Vangel Bojaxhi, Ben England, Vikentsi Lapa,
    14. Alexey Skidanov, Sudhir Kumar.
    15. Run began: Fri Jan 1 00:23:55 2066
    16. Include fsync in write timing
    17. O_DIRECT feature enabled
    18. Auto Mode
    19. File size set to 102400 kB
    20. Record Size 1024 kB
    21. Command line used: iozone -e -I -a -s 100M -r 1M -i 0 -i 1
    22. Output is in kBytes/sec
    23. Time Resolution = 0.000001 seconds.
    24. Processor cache size set to 1024 kBytes.
    25. Processor cache line size set to 32 bytes.
    26. File stride size set to 17 * record size.
    27. random random bkwd record stride
    28. kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread
    29. 102400 1024 81814 81549 244964 254929
    30. iozone test complete.

     3. 建立网络连接,方便文件传输

     首先在PC端配置网口为固定IP(windows为例): 

    在开发板,先查看所有网络设备:

    1. root@myd-jd9x:~# ifconfig -a
    2. can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
    3. NOARP MTU:16 Metric:1
    4. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    5. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    6. collisions:0 txqueuelen:10
    7. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    8. Interrupt:47
    9. can1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
    10. NOARP MTU:16 Metric:1
    11. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    12. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    13. collisions:0 txqueuelen:10
    14. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    15. Interrupt:48
    16. eth0 Link encap:Ethernet HWaddr DA:8D:4E:34:29:06
    17. BROADCAST MULTICAST MTU:1500 Metric:1
    18. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    19. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    20. collisions:0 txqueuelen:1000
    21. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    22. Interrupt:42
    23. eth1 Link encap:Ethernet HWaddr F2:37:37:90:2E:7D
    24. BROADCAST MULTICAST MTU:1500 Metric:1
    25. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    26. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    27. collisions:0 txqueuelen:1000
    28. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    29. Interrupt:43
    30. lo Link encap:Local Loopback
    31. inet addr:127.0.0.1 Mask:255.0.0.0
    32. inet6 addr: ::1/128 Scope:Host
    33. UP LOOPBACK RUNNING MTU:65536 Metric:1
    34. RX packets:2472 errors:0 dropped:0 overruns:0 frame:0
    35. TX packets:2472 errors:0 dropped:0 overruns:0 carrier:0
    36. collisions:0 txqueuelen:1000
    37. RX bytes:182912 (178.6 KiB) TX bytes:182912 (178.6 KiB)
    38. mlan0 Link encap:Ethernet HWaddr 5C:C5:63:4F:65:50
    39. BROADCAST MULTICAST MTU:1500 Metric:1
    40. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    41. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    42. collisions:0 txqueuelen:1000
    43. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    44. p2p0 Link encap:Ethernet HWaddr 5E:C5:63:4F:65:50
    45. BROADCAST MULTICAST MTU:1500 Metric:1
    46. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    47. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    48. collisions:0 txqueuelen:1000
    49. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    50. tunl0 Link encap:UNSPEC HWaddr 00-00-00-00-30-30-00-30-00-00-00-00-00-00-00-00
    51. NOARP MTU:1480 Metric:1
    52. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    53. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    54. collisions:0 txqueuelen:1000
    55. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    56. uap0 Link encap:Ethernet HWaddr 5C:C5:63:4F:66:50
    57. BROADCAST MULTICAST MTU:1500 Metric:1
    58. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    59. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    60. collisions:0 txqueuelen:1000
    61. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    配置打开以太网口,并配置固定IP, 分别把两个网口固定IP设置为192.168.0.101和192.168.0.102, 并互拼一下: 

    1. root@myd-jd9x:~# ifconfig eth1 192.168.0.102 netmask 255.255.255.0 up
    2. root@myd-jd9x:~# ifconfig
    3. eth0 Link encap:Ethernet HWaddr DA:8D:4E:34:29:06
    4. inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0
    5. UP BROADCAST MULTICAST MTU:1500 Metric:1
    6. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    7. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    8. collisions:0 txqueuelen:1000
    9. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    10. Interrupt:42
    11. eth1 Link encap:Ethernet HWaddr F2:37:37:90:2E:7D
    12. inet addr:192.168.0.102 Bcast:192.168.0.255 Mask:255.255.255.0
    13. UP BROADCAST MULTICAST MTU:1500 Metric:1
    14. RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    15. TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    16. collisions:0 txqueuelen:1000
    17. RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    18. Interrupt:43
    19. lo Link encap:Local Loopback
    20. inet addr:127.0.0.1 Mask:255.0.0.0
    21. inet6 addr: ::1/128 Scope:Host
    22. UP LOOPBACK RUNNING MTU:65536 Metric:1
    23. RX packets:2631 errors:0 dropped:0 overruns:0 frame:0
    24. TX packets:2631 errors:0 dropped:0 overruns:0 carrier:0
    25. collisions:0 txqueuelen:1000
    26. RX bytes:195856 (191.2 KiB) TX bytes:195856 (191.2 KiB)
    27. root@myd-jd9x:~# ping 192.168.0.102
    28. PING 192.168.0.102 (192.168.0.102): 56 data bytes
    29. 64 bytes from 192.168.0.102: seq=0 ttl=64 time=0.916 ms
    30. 64 bytes from 192.168.0.102: seq=1 ttl=64 time=0.793 ms
    31. 64 bytes from 192.168.0.102: seq=2 ttl=64 time=1.175 ms

     上位机在命令行下ping下开发板,确认可以连接:

    为了方便后续加载传输可执行文件,下载安装filezilla进行ftp连接, 然后打开,连接开发板, 输入用户root,密码admin(或自己设定的其他密码),端口22, 连接成功: 

    基本特性及连接配置完成,下一节开始编程测试。 

  • 相关阅读:
    【工具篇】Unity导出粒子模型序列帧Png带有透明通道
    项目启动报错提示包有冲突 ReflectionUtils$MethodFilter
    C++构建response
    02 CSS技巧
    eclipse汉化方法
    基于JAVA养老智慧服务平台计算机毕业设计源码+系统+mysql数据库+lw文档+部署
    H5自适应图片-picture标签实现
    PHP Warning: Module ‘curl‘ already loaded in Unknown on line 0
    多文本键值关联
    Docker创建FTP服务器
  • 原文地址:https://blog.csdn.net/pocean2012/article/details/133306397