Step4: 解壓縮flash tools 檔案,並複製到U盤中(Unzip the flash tools file , then copy to USB Disk)
1. 插入U盤到你的Ubuntu 電腦上 (Plug the USB Disk into you Linux PC
2. 檢視U盤在Ubuntu 系統代號 (Check the USB Disk's symbol in Ubuntu System)
3. 掛載U盤在Ubuntu 系統中 (Mount the USB Disk's in Ubuntu System)
4. 複製檔案到U盤(Copy the file to USB disk)
5. 將U盤連接到ROM-5721系統, 進入flash tool下的mk_inand資料夾, 執行指令./mksd-linux.sh /dev/mmcblk2燒錄image到eMMC (Connect USB Disk to ROM-5721 system, browser to mk_inand folder and execute flash shell script "./mksd-linux.sh /dev/mmcblk2"
6. 切換開機switch 1:on 2,3,4,5,6:off來設定成從eMMC開機(Change boot switch to "1:on 2,3,4,5,6:off" to boot from eMMC. Reboot system).
Debug 串口調試 (Debug port Setting)
以 Tera Term 为例介绍如何使用串口调试功能
Baud Rate波特率:115200<br/> Data 数据位:8<br/> Parity 奇偶校验:无<br/> Stop 停止位:1<br/> Flow Control流控:无
-
Tera Term Tool
Check the Sriel port in Device Manager (查看PC端的串口号):
if you can not identify the Serial device , please check your serial driver.
Debug port connection (串口連接)
Log into Terminal Tool (进入串口调试终端):
Linux系统的基本使用(Linux System Basic Operating Method)
UUU 使用方法(USB Connection (OTG port))
Download uuu tool from (Release [ADVv20200619 · ADVANTECH-Corp/uuu · GitHub]) or in the folder.
The “imx-boot-imx8mmrom5721a1-sd.bin-flash_evk” file be included in 5721A1AIM20LIV90XXX_iMX8MM_misc.tgz. XXX is the version.
Connect USB cable to USB OTG port.
Change boot switch to "4:on 1,2,3,5,6:off" to boot from force recovery mode.
Type command below to flash eMMC:
Display Setting (ROM-5721)
U-boot Command :
setenv fdt_file xxxx.dtb
env save
boot
U-boot load fefault setting:
env default -a
env save
reset
- Display: Default support g070vw01 LVDS panel on LVDS0
Yocto 2.5
**DSI to LVDS
***g070vw01
****adv-imx8mm-rom5721-a1.dtb
***g150xgel05
****adv-imx8mm-rom5721-a1-dsi2lvds-g150xgel05.dtb
***g215hvn01
****adv-imx8mm-rom5721-a1-dsi2lvds-g215hvn01.dtb
**DSI to DP
***adv-imx8mm-rom5721-a1-dsi2dp.dtb
**DSI to HDMI
***adv-imx8mm-rom5721-a1-adv7535.dtb
**DSI
***auog101uan02
****adv-imx8mm-rom5721-a1-auog101uan02.dtb
*M.2 SDIO
**Adjust CN43~CN48
**adv-imx8mm-rom5721-a1-m2-sdio.dtb
*M.2 I2S
**adv-imx8mm-rom5721-a1-m2-i2s.dtb
Yocto 3.0
**DSI to LVDS
***g070vw01
****imx8mm-rom5721-a1.dtb
***g150xgel05
****imx8mm-rom5721-a1-dsi2lvds-g150xgel05.dtb
***g215hvn01
****imx8mm-rom5721-a1-dsi2lvds-g215hvn01.dtb
**DSI to DP
***imx8mm-rom5721-a1-dsi2dp.dtb
**DSI to HDMI
***imx8mm-rom5721-a1-adv7535.dtb
**DSI
***auog101uan02
****imx8mm-rom5721-a1-auog101uan02.dtb
*M.2 SDIO
**Adjust CN43~CN48
**imx8mm-rom5721-a1-m2-sdio.dtb
乙太網路使用方法(Ethernent Testing Method)
Command : ifconfig
Command: Ping - I eth1 8.8.8.8 or Ping - I eth0 8.8.8.8
=== WiFi使用方法(WIFI Testing Method) ===
Command :
preparatory work:将WIFI天线安装到ROM-5721上<br/> 举例:<br/> root@imx8mmrom5721a1:~# ifconfig mlan0 up<br/> root@imx8mmrom5721a1:~#iwlist mlan0 scan<br/> 备注:(ESSID:"SSID"—热点名称,密码:123456789)<br/> Cell 41 - Address: E2:92:00:7C:81:95<br/> ESSID:"SSID" [41]<br/> Mode:Master<br/> Frequency=5.785 GHz<br/> Quality:5/5 Signal level:-46 dBm Noise level:-96 dBm<br/> Encryption key:on<br/> Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s<br/> 36 Mb/s; 48 Mb/s; 54 Mb/s<br/> Extra:Beacon interval=200<br/> IE: IEEE 802.11i/WPA2 Version 1<br/> Group Cipher : CCMP<br/> Pairwise Ciphers (1) : CCMP<br/> Authentication Suites (1) : PSK<br/> IE: Unknown: DD180050F2020101810003A4000027A4000042435E0062322F00<br/> Extra:band=a
root@imx8mmrom5721a1:~# wpa_passphrase "SSID" 123456789 > /tmp/wpa.conf<br/> root@imx8mmrom5721a1:~# sync<br/> root@imx8mmrom5721a1:~# cat /tmp/wpa.conf<br/> network={<br/> ssid="SSID" <br/> #psk="123456789"<br/> psk=63079f1c4891c9bb8a0496498d793993b5a0927e042358833eef89f1a90719a1<br/> }<br/> root@imx8mmrom5721a1:~# wpa_supplicant -BDwext -imlan0 -c/tmp/wpa.conf<br/> Successfully initialized wpa_supplicant<br/> rfkill: Cannot get wiphy information<br/> [ 189.719149] wlan: SCAN COMPLETED: scanned AP count=41<br/> ioctl[SIOCSIWESSID]: Bad address<br/> root@imx8mmrom5721a1:~# [ 191.724260] EXT_SCAN: wlan_interpret_bss_desc_with_ie returned error<br/> [ 197.337568] wlan: SCAN COMPLETED: scanned AP count=41<br/> [ 197.370146] IPv6: ADDRCONF(NETDEV_CHANGE): mlan0: link becomes ready<br/> ^C<br/> root@imx8mmrom5721a1:~#<br/> root@imx8mmrom5721a1:~# udhcpc -b -i mlan0<br/> udhcpc: started, v1.31.0<br/> udhcpc: sending discover<br/> udhcpc: sending select for 192.168.43.132<br/> udhcpc: lease of 192.168.43.132 obtained, lease time 3600<br/> /etc/udhcpc.d/50default: Adding DNS 192.168.43.1<br/> root@imx8mmrom5721a1:~# ifconfig<br/> lo Link encap:Local Loopback<br/> inet addr:127.0.0.1 Mask:255.0.0.0<br/> inet6 addr: ::1/128 Scope:Host<br/> UP LOOPBACK RUNNING MTU:65536 Metric:1<br/> RX packets:214 errors:0 dropped:0 overruns:0 frame:0<br/> TX packets:214 errors:0 dropped:0 overruns:0 carrier:0<br/> collisions:0 txqueuelen:1000<br/> RX bytes:15212 (14.8 KiB) TX bytes:15212 (14.8 KiB)
mlan0 Link encap:Ethernet HWaddr c0:e4:34:6d:fa:bf<br/> inet addr:192.168.43.132 Bcast:192.168.43.255 Mask:255.255.255.0<br/> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br/> RX packets:9 errors:0 dropped:0 overruns:0 frame:0<br/> TX packets:48 errors:0 dropped:0 overruns:0 carrier:0<br/> collisions:0 txqueuelen:1000<br/> RX bytes:1248 (1.2 KiB) TX bytes:7034 (6.8 KiB)<br/> 备注:以上步骤完成,就可以查看到mlan0 是否有连接到wifi或热点。
root@imx8mmrom5721a1:~# ping 8.8.8.8<br/> PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.<br/> 64 bytes from 8.8.8.8: icmp_seq=1 ttl=50 time=287 ms<br/> 64 bytes from 8.8.8.8: icmp_seq=2 ttl=50 time=104 ms<br/> 64 bytes from 8.8.8.8: icmp_seq=3 ttl=50 time=331 ms<br/> 64 bytes from 8.8.8.8: icmp_seq=4 ttl=50 time=149 ms<br/> ^C<br/> --- 8.8.8.8 ping statistics ---<br/> 4 packets transmitted, 4 received, 0% packet loss, time 3005ms<br/> rtt min/avg/max/mdev = 104.162/217.722/331.103/93.911 ms<br/> root@imx8mmrom5721a1:~#
=== ''' GPIO使用方法(GPIO Operating Method)''' ===
[[File:Z17.jpg|RTENOTITLE]]
<br/> <pre>Loop-back Test (Take GPIO0 and GPIO2 as examples)
Step 1: Connect GPIO0 and GPIO2<br/> Step 2: Export GPIO interface
root@imx8mmrom5721a1: ~# echo 496 > /sys/class/gpio/export<br/> root@imx8mmrom5721a1: ~# echo 497 > /sys/class/gpio/export
Step 3: Set direction
root@imx8mmrom5721a1: ~# echo out > /sys/class/gpio/gpio1/direction<br/> root@imx8mmrom5721a1: ~# echo in > /sys/class/gpio/gpio2/direction
Step 4: Read value and set output value then check
root@imx8mmrom5721a1: ~# cat /sys/class/gpio/gpio2/value<br/> 0<br/> root@imx8mmrom5721a1: ~# echo 1 > /sys/class/gpio/gpio1/value<br/> root@imx8mmrom5721a1: ~# cat /sys/class/gpio/gpio2/value<br/> 1
串口使用方法(Serial Port Operating Method)
RS-232 Test
CN15上(SER0/UART3): /dev/ttymxc2
CN15 下(SER2/UART1): /dev/ttymxc0
COM 3 (A53 debug/SER3/UART2): /dev/ttymxc1
COM 1 (M4 debug/SER1/UART4): /dev/ttymxc3
SW7 Setting (SW7設置)
MODE1 MODE0
0 0 LOOPBACK
0 1 RS232
1 0 RS485
1 1 RS422
Loopback test (eg. ttymxc0)
Connect loopback test tool
- stty ‐F /dev/ttymxc0 115200
# stty ‐F /dev/ttymxc0 ‐echo
# cat /dev/ttymxc0 &
# echo test > /dev/ttymxc0
=== 蓝牙使用方法(BlueTooth Operating Method) ===
Command :
$ hciconfig hci0 up<br/> $ bluetoothctl<br/> $ discoverable on<br/> $ pairable on<br/> $ scan on<br/> [NEW] FC:18:3C:8D:75:F4 myphone<br/> $ scan off<br/> $ pair FC:18:3C:8D:75:F4<br/> $ connect FC:18:3C:8D:75:F4
查看主板IP位址 ( Chech IP Address ):
Command : ifconfig
Windows下SSH访问及文件传输
SSH Remote Log into Device
- SSH远程登录,以putty选择putty.exe(或者使用Xshell、SecureCRT等类似软件)
*需要设置远程设备的IP、通讯端口(默认22)、通讯方式,登录后验证用户名密码
通用方法(General Method)
=== 查看CPU温度(Check CPU Temperature) ===
root@imx8mmrom5721a1:/# cat /sys/devices/virtual/thermal/thermal_zone0/temp 44600
# 或者直接以度爲單位顯示 echo $[$(cat /sys/class/thermal/thermal_zone0/temp)/1000]° >>> 45°
=== 查看CPU频率(Check CPU Frequency) ===
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq <br/> >> 900000<br/> cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq <br/> >> 1200000
=== 查看内存容量(Check Memory Capacity) ===
root@imx8mmrom5721a1:/# busybox free -m<br/> total used free shared buffers cached<br/> Mem: 1794920 516080 1278840 17252 9852 80292<br/> -/+ buffers/cache: 425936 1368984<br/> Swap: 0 0 0<br/>
=== 查看存储容量(Check Storage Capacity) ===
root@imx8mmrom5721a1:/# busybox df -h<br/> Filesystem Size Used Available Use% Mounted on<br/> /dev/root 13.4G 1.7G 11.1G 13% /<br/> devtmpfs 395.8M 4.0K 395.8M 0% /dev<br/> tmpfs 876.4M 0 876.4M 0% /dev/shm<br/> tmpfs 876.4M 16.5M 859.9M 2% /run<br/> tmpfs 876.4M 0 876.4M 0% /sys/fs/cgroup<br/> tmpfs 876.4M 4.0K 876.4M 0% /tmp<br/> tmpfs 876.4M 280.0K 876.2M 0% /var/volatile<br/> /dev/mmcblk0p2 13.6G 1.7G 11.3G 13% /run/media/mmcblk0p2<br/> /dev/mmcblk0p1 63.9M 23.4M 40.5M 37% /run/media/mmcblk0p1<br/> /dev/mmcblk1p1 63.9M 23.4M 40.5M 37% /run/media/mmcblk1p1<br/> tmpfs 175.3M 88.0K 175.2M 0% /run/user/0<br/> root@imx8qxprom5620a1:/#
=== 網路Ping測試(Ping Network Testing) ===
ping 8.8.8.8<br/> PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.<br/> 64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=2.10 ms<br/> 64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=2.10 ms
=== 設置RTC (RTC Setting) ===
root@imx8mmrom5721a1:/# systemctl stop ntpdate.service<br/> root@imx8mmrom5721a1:/# date 090816072021 && hwclock -w && date<br/> Wed Sep 8 16:07:00 UTC 2021<br/> Wed Sep 8 16:07:00 UTC 2021<br/> root@imx8mmrom5721a1:/# date<br/> Wed Sep 8 16:07:06 UTC 2021<br/> root@imx8mmrom5721a1:/#'''
Linux BSP編譯方法(Linux BSP Compile Method)
### repo sync failed with Server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none ERROR: gstreamer1.0-1.14.4.imx-r0 do_unpack: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/hom e/adv/adv-release-bsp/build_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/recipe-sysroot-native/usr/bin/py thon3-native:/home/adv/adv-release-bsp/sources/poky/scripts:/home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-poky-l inux/gstreamer1.0/1.14.4.imx-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/adv/adv-release-bsp/build_x11/tm p/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/recipe-sysroot/usr/bin/crossscripts:/home/adv/adv-release-bsp/buil d_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/recipe-sysroot-native/usr/sbin:/home/adv/adv-release-bsp/b uild_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/recipe-sysroot-native/usr/bin:/home/adv/adv-release-bsp /build_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/recipe-sysroot-native/sbin:/home/adv/adv-release-bsp/ build_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/recipe-sysroot-native/bin:/home/adv/adv-release-bsp/so urces/poky/bitbake/bin:/home/adv/adv-release-bsp/build_x11/tmp/hosttools"; export HOME="/home/adv"; git -c core.fsyncob jectfiles=0 submodule update --init --recursive failed with exit code 1, output:
Submodule 'common' (
https://anongit.freedesktop.org/git/gstreamer/common.git) registered for path 'common'
Cloning into '/home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/git/common'...
fatal: unable to access '
https://anongit.freedesktop.org/git/gstreamer/common.git/': server certificate verification fa iled. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
fatal: clone of '
https://anongit.freedesktop.org/git/gstreamer/common.git' into submodule path '/home/adv/adv-release-b sp/build_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/git/common' failed
Failed to clone 'common'. Retry scheduled
Cloning into '/home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/git/common'...
fatal: unable to access '
https://anongit.freedesktop.org/git/gstreamer/common.git/': server certificate verification fa iled. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
fatal: clone of '
https://anongit.freedesktop.org/git/gstreamer/common.git' into submodule path '/home/adv/adv-release-b sp/build_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14.4.imx-r0/git/common' failed
Failed to clone 'common' a second time, aborting
ERROR: gstreamer1.0-1.14.4.imx-r0 do_unpack: Function failed: base_do_unpack
ERROR: Logfile of failure stored in: /home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-poky-linux/gstreamer1.0/1.14. 4.imx-r0/temp/log.do_unpack.42631
ERROR: Task (/home/adv/adv-release-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/gstreamer/gstreamer 1.0_1.14.imx.bb:do_unpack) failed with exit code '1'
ERROR: gstreamer1.0-plugins-base-1.14.4.imx-r0 do_unpack: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; expo rt PATH="/home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0-plugins-base/1.14.4.imx-r0/ recipe-sysroot-native/usr/bin/python3-native:/home/adv/adv-release-bsp/sources/poky/scripts:/home/adv/adv-release-bsp/b uild_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0-plugins-base/1.14.4.imx-r0/recipe-sysroot-native/usr/bin/aarch6 4-poky-linux:/home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0-plugins-base/1.14.4.imx -r0/recipe-sysroot/usr/bin/crossscripts:/home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer 1.0-plugins-base/1.14.4.imx-r0/recipe-sysroot-native/usr/sbin:/home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-mx8m m-poky-linux/gstreamer1.0-plugins-base/1.14.4.imx-r0/recipe-sysroot-native/usr/bin:/home/adv/adv-release-bsp/build_x11/ tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0-plugins-base/1.14.4.imx-r0/recipe-sysroot-native/sbin:/home/adv/adv-rele ase-bsp/build_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0-plugins-base/1.14.4.imx-r0/recipe-sysroot-native/bin:/ home/adv/adv-release-bsp/sources/poky/bitbake/bin:/home/adv/adv-release-bsp/build_x11/tmp/hosttools"; export HOME="/hom e/adv"; git -c core.fsyncobjectfiles=0 submodule update --init --recursive failed with exit code 1, output:
Submodule 'common' (
https://anongit.freedesktop.org/git/gstreamer/common.git) registered for path 'common'
Cloning into '/home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0-plugins-base/1.14.4.im x-r0/git/common'...
fatal: unable to access '
https://anongit.freedesktop.org/git/gstreamer/common.git/': server certificate verification fa iled. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
fatal: clone of '
https://anongit.freedesktop.org/git/gstreamer/common.git' into submodule path '/home/adv/adv-release-b sp/build_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0-plugins-base/1.14.4.imx-r0/git/common' failed
Failed to clone 'common'. Retry scheduled
Cloning into '/home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0-plugins-base/1.14.4.im x-r0/git/common'...
fatal: unable to access '
https://anongit.freedesktop.org/git/gstreamer/common.git/': server certificate verification fa iled. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
fatal: clone of '
https://anongit.freedesktop.org/git/gstreamer/common.git' into submodule path '/home/adv/adv-release-b sp/build_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0-plugins-base/1.14.4.imx-r0/git/common' failed
Failed to clone 'common' a second time, aborting
ERROR: gstreamer1.0-plugins-base-1.14.4.imx-r0 do_unpack: Function failed: base_do_unpack
ERROR: Logfile of failure stored in: /home/adv/adv-release-bsp/build_x11/tmp/work/aarch64-mx8mm-poky-linux/gstreamer1.0 -plugins-base/1.14.4.imx-r0/temp/log.do_unpack.51633
ERROR: Task (/home/adv/adv-release-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/gstreamer/gstreamer 1.0-plugins-base_1.14.imx.bb:do_unpack) failed with exit code '1'
============================================================
export GIT_SSL_NO_VERIFY=1
#or
git config --global http.sslverify false
============================================================
- Build error with git protocal:
ERROR: ExpansionError during parsing /home/adv/adv-release-bsp/sources/meta-advantech/meta-tools/recipes-utils/mdio-tool/mdio-tool_1.0.bb
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
Modify: "/home/adv/adv-release-bsp/sources/meta-advantech/meta-tools/recipes-utils/mdio-tool/mdio-tool_1.0.bb" file to
SRC_URI = "git://github.com/PieVo/mdio-tool.git;protocol=https;branch=master"
|