Rockchip Linux System Test User Guide
:::info 文档信息
文档标识:RK-SM-YF-352 · 发布版本:V1.1.3 · 发布日期:2020-12-18 · 页数:19 · 语言:英文
原始文档:Rockchip_User_Guide_Linux_Software_Test_EN.pdf
:::
章节大纲
- Rockchip Linux System Test User Guide(P1)
- Functions Test(P4)
- Buildroot(P4)
- Restore Moving Layer Down(P4)
- Remove Background Applications(P4)
- Video(P4)
- Recording(P4)
- Wi-Fi Connecting(P5)
- Music Player(P6)
- System Time Checking and Setting(P6)
- RTC Clock Test(P6)
- Screen Rotation(P7)
- Video Playback(P7)
- SD Card Upgrade and Boot(P8)
- Search the File(P8)
- Check Memories(P8)
- Check Memory Usage(P9)
- Default Path of U Disk or SD Card Mount Automatically(P9)
- Copy Files(P10)
- Debian(P10)
- Disable Standby(P10)
- Wi-Fi Connection(P10)
- Dual-screen with Different Display(P10)
- Dual-screen with Different Audio(P11)
- Display Rotation(P12)
- The Default Path for Automatic Mounting of U Disk(P12)
- Buildroot(P4)
- Performance Test(P12)
- Disk Read and Write Test(P12)
- e Read and Write(P13)
- U disk Read and Write(P13)
- Set Performance Mode(P13)
- Check Current CPU Frequency(P13)
- glmark2 Performance Score(P13)
- Disk Read and Write Test(P12)
- Stress Test(P14)
- glmark2(P14)
- Reboot Test(P15)
- Recovery Test(P15)
- memtester Test(P15)
- stressapptest(P16)
- cpufreq Test(P16)
- Flash Stress Test(P16)
- Bluetooth Test(P16)
- suspend_resume Test(P17)
- Wi-Fi Test(P17)
- DDR freq Scaling Test(P17)
- NPU Stress Test(P17)
- Camera Test(P18)
- Video Test(P18)
- Functions Test(P4)
在线预览
若预览无法显示,请直接下载 PDF 后用本地阅读器打开。
1. Functions Test
1.1 Buildroot
1.1.1 Restore Moving Layer Down
When the touch screen of the device is invalid and serial port input is available, the layer is set to move down, which can be restored with the following command:
/etc/init.d/S50launcher stop (Close lanucher first)
/etc/init.d/S50launcher start (Then open lanucher)
1.1.2 Remove Background Applications
Example: remove background audio.
Search the audio playing:
| 1 ps | grep audio 2 [root@rk3399pro:/]# ps | grep audio 3 569 root 557m S /usr/bin/audioservice 4 1248 root 2412 S grep audio | |
|---|---|
| 1 2 3 4 | ps | grep audio [root@rk3399pro:/]# ps | grep audio 569 root 557m S /usr/bin/audioservice 1248 root 2412 S grep audio |
Remove background audio playback: kill 569.
1.1.3 Video
Video:
rkisp_demo --device=/dev/video1 --output=/tmp/isp.yuv --
iqfile=/etc/iqfiles/OV5695.xml
Play video:
Pull the file in the /tmp/cif.yuv directory to PC: adb pull /tmp/cif.yuv /tmp/cif.yuv , and play it through a YUV tool.
1.1.4 Recording
arecord -c channel -r sampling frequency -f sampling bits -d recording duration/recording storage path/recording file name. Channel ch_tbl="2 4 6 8"
Sampling frequency: fs_tbl="8000 11025 16000 22050 32000 44100 48000 64000 88200 96000 176400 192000"
Sampling bits: bits_tbl="S16_LE S24_LE S32_LE" Package format = "wmv, wav, mp3, etc."
For example:
Time-limited recording- after recording for 10 seconds will exit and save automatically:
| 1 arecord -c 2 -r 44100 -f S16 LE –d 10 /tmp/record.wav _ | |
|---|---|
| 1 | arecord -c 2 -r 44100 -f S16 LE –d 10 /tmp/record.wav _ |
Unlimited time recording -ctrl+c: exit to save:
| 1 arecord -c 2 -r 44100 -f S16 LE /tmp/record.wav _ | |
|---|---|
| 1 | arecord -c 2 -r 44100 -f S16 LE /tmp/record.wav _ |
Play recording files:
| 1 aplay /tmp/record.wav | |
|---|---|
| 1 | aplay /tmp/record.wav |
1.1.5 Wi-Fi Connecting
First way:
cp data/cfg/wpa_supplicant.conf userdata/
vi /userdata/cfg/wpa_supplicant.conf
Add the following configuration items:
| 1 network={ 2 ssid="WiFi-AP" // Wi-Fi name 3 psk="12345678" // Wi-Fi password 4 key mgmt=WPA-PSK // Encryption _ 5 key mgmt=NONE // Not encrypted _ 6 } 7 | |
|---|---|
| 1 2 3 4 5 6 7 | network={ ssid="WiFi-AP" // Wi-Fi name psk="12345678" // Wi-Fi password key mgmt=WPA-PSK // Encryption _ key mgmt=NONE // Not encrypted _ } |
| Re-re |
And reconnect: wpa_cli reconnect
Ping baidu.com
Second way:
| 1 ./usr/sbin/wpa supplicant -D nl80211 -i wlan0 -c /etc/wpa supplicant.conf & _ _ #Open Wi-Fi 2 wpa cli -i wlan0 add network #add a network connection ID number, which is _ _ used in steps 3-6 3 wpa cli -i wlan0 set network 0 ssid \"pzb\" #add the SSID of the router to _ _ be connected, such as: pzb 4 wpa cli -iwlan0 set network 0 psk \"123456789\" #add the ap password to be _ _ connected, such as: 123456789 5 wpa cli -iwlan0 enable network 0 #0 here is obtained according to step 2, _ _ so that the network ID can be used 6 wpa cli -iwlan0 select network 0 #0 here is obtained according to step 2, _ _ connect the ID 7 wpa cli -iwlan0 set network 0 psk \"" #(No password) _ _ 8 ifconfig 以及ping baidu.com #if you can get an IP address and can ping normally, it means you can connect to network | |
|---|---|
| 1 2 3 4 5 6 7 8 | ./usr/sbin/wpa supplicant -D nl80211 -i wlan0 -c /etc/wpa supplicant.conf & _ _ #Open Wi-Fi wpa cli -i wlan0 add network #add a network connection ID number, which is _ _ used in steps 3-6 wpa cli -i wlan0 set network 0 ssid \"pzb\" #add the SSID of the router to _ _ be connected, such as: pzb wpa cli -iwlan0 set network 0 psk \"123456789\" #add the ap password to be _ _ connected, such as: 123456789 wpa cli -iwlan0 enable network 0 #0 here is obtained according to step 2, _ _ so that the network ID can be used wpa cli -iwlan0 select network 0 #0 here is obtained according to step 2, _ _ connect the ID wpa cli -iwlan0 set network 0 psk \"" #(No password) _ _ ifconfig 以及ping baidu.com #if you can get an IP address and can ping normally, it means you can connect to network |
| 1.1.6 |
| 1 aplay /media/usb0/musicdemo.wmv | |
|---|---|
| 1 | aplay /media/usb0/musicdemo.wmv |
1.1.7 System Time Checking and Setting
| 1 date #check system time 2 date --set='2018-12-24 15:17:42' #Set system time 3 hwclock --show #check hardware time 4 hwclock --systohc #synchronous display of hardware time and system time | |
|---|---|
| 1 2 3 4 | date #check system time date --set='2018-12-24 15:17:42' #Set system time hwclock --show #check hardware time hwclock --systohc #synchronous display of hardware time and system time |
1.1.8 RTC Clock Test
cat /path/time is used to check whether the time has changed in the current state or after restart.
Such as:
RK3399 excavator EVB:
| 1 cat /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/rk808-rtc/rtc/rtc0/time | |
|---|---|
| 1 | cat /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/rk808-rtc/rtc/rtc0/time |
PX30 EVB:
| 1 cat /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/rk808-rtc/rtc/rtc0/time | |
|---|---|
| 1 | cat /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/rk808-rtc/rtc/rtc0/time |
RK3399Pro EVB:
| 1 cat /sys/devices/platform/ff3c0000.i2c/i2c-0/0-0020/rk808-rtc/rtc/rtc0/time | |
|---|---|
| 1 | cat /sys/devices/platform/ff3c0000.i2c/i2c-0/0-0020/rk808-rtc/rtc/rtc0/time |
Different platforms correspond to different node paths of time. You can find the above similar nodes through this command: find ./ -name time .
1.1.9 Screen Rotation
Write in the /etc/xdg/weston/weston.ini configuration file:
| 1 [output] 2 name=eDP-1 3 transform=90 | |
|---|---|
| 1 2 3 | [output] name=eDP-1 transform=90 |
The name needs to be written according to the actual situation and obtained through ls /sys/class/drm :
[root@rk3399:/]# ls /sys/class/drm/
card0 card0-HDMI-A-1 controlD64 version card0-DP-1 card0-eDP-1
renderD128
For example, the drm device here is card0-eDP-1, and the name="eDP-1".
1.1.10 Video Playback
Video playback in single window:
| 1 gst-play-1.0 /oem/SampleVideo 1280x720 5mb.mp4 _ _ | |
|---|---|
| 1 | gst-play-1.0 /oem/SampleVideo 1280x720 5mb.mp4 _ _ |
Video playback in multi-window:
First find the multi-window script and then execute:
cd rockchip_test/video/
sh test_gst_multivideo.sh test #it is not this name probably, but
test_multivideo.sh
Stop multi-window:
| 1 killall videowidget 2 etc/init.d/S50launcher stop 3 etc/init.d/S50launcher start | |
|---|---|
| 1 2 3 | killall videowidget etc/init.d/S50launcher stop etc/init.d/S50launcher start |
1.1.11 SD Card Upgrade and Boot
Insert the SD card into PC, execute the SD_Firmware_Tool.exe on PC, select firmware upgrade/SD boot, select firmware-update.img, and start creating. After the SDK enters the maskrom and erases the flash, power off. Insert the prepared SD card, power on the SDK, and it will automatically burn the firmware.
1.1.12 Search the File
| 1 find ./ -name \*.sh | |
|---|---|
| 1 | find ./ -name \*.sh |
1.1.13 Check Memories
| 1 cat /proc/meminfo or free –h | |
|---|---|
| 1 | cat /proc/meminfo or free –h |
1.1.14 Check Memory Usage
df -h:
1.1.15 Default Path of U Disk or SD Card Mount Automatically
U disk: /media/usb0/
SD car: /sdcard/
1.1.16 Copy Files
Copy files from U disk to device:
| 1 cp -r /media/usb0/3399-linux/ /userdata | |
|---|---|
| 1 | cp -r /media/usb0/3399-linux/ /userdata |
1.2 Debian
1.2.1 Disable Standby
Enter the command on the Debian terminal:
| 1 sudo xset –dpms 2 sudo xset s off 3 xset dpms force off (Turn off the screen immediately) | |
|---|---|
| 1 2 3 | sudo xset –dpms sudo xset s off xset dpms force off (Turn off the screen immediately) |
Note: after restarting the device, the above settings will become disabled.
Terminal position: start at the bottom left corner of the main interface -> System Tools -> LXTerminal
1.2.2 Wi-Fi Connection
Enter the following command in the serial port:
| 1 nmcli r wifi on #steps 1:turn on Wi-Fi 2 nmcli dev wifi #steps 2:scan nearby AP 3 #steps 3:connect AP 4 nmcli dev wifi connect "DIR-803" password "839919060" ifname wlan0 5 nmcli r wifi off #steps 4:turn off Wi-Fi | |
|---|---|
| 1 2 3 4 5 | nmcli r wifi on #steps 1:turn on Wi-Fi nmcli dev wifi #steps 2:scan nearby AP #steps 3:connect AP nmcli dev wifi connect "DIR-803" password "839919060" ifname wlan0 nmcli r wifi off #steps 4:turn off Wi-Fi |
1.2.3 Dual-screen with Different Display
Use hdmi-toggle to make sure how many display devices there are. For example, the following two devices, HDMI-1 and DP-1 can be detected: xrandr is used to set the relationship between the two screens:
| 1 su linaro-c "DISPLAY=:0xrandr--outputHDMI-1--aboveDP-1" | |
|---|---|
| 1 | su linaro-c "DISPLAY=:0xrandr--outputHDMI-1--aboveDP-1" |
The --above can be replaced by right-of, left-of, below, same-as, preferred, off, etc.
In this way to realize the dual-screen with different display function.
1.2.4 Dual-screen with Different Audio
Open the Sound&Video---->PulseAudio Volume Control in the bottom left corner, and then select the song to play. which sound card for playback can be selected as follows: You can also use aplay to confirm the sound card and select the sound card to play:
aplay-l:
| 1 rt5640: aplay-Dplughw:0,0/dev/urandom 2 hdmiaudio: aplay-Dplughw:1,0/dev/urandom 3 DPaudio: aplay-Dplughw:2,0/dev/urandom | |
|---|---|
| 1 2 3 | rt5640: aplay-Dplughw:0,0/dev/urandom hdmiaudio: aplay-Dplughw:1,0/dev/urandom DPaudio: aplay-Dplughw:2,0/dev/urandom |
Open a song and drag it from the main screen to the secondary screen, and then select a sound card to play in the same way on the main screen to complete the dual-screen with different audio function.
1.2.5 Display Rotation
Rotation normal/left/right:
| 1 vi /etc/X11/xorg.conf.d/20-modesetting.conf | |
|---|---|
| 1 | vi /etc/X11/xorg.conf.d/20-modesetting.conf |
You can change the normal to left/right/ and it will take effect after reboot.
1.2.6 The Default Path for Automatic Mounting of U Disk
/media/linaro/B4EA-8716
Note: Different USB drives with different names, it depends actually.
2. Performance Test
2.1 Disk Read and Write Test
Check the node before testing: fdisk -l .
mmcblk1p9 is used to check the partition that can be readable and writable, the maximum capacity of this partition is 13.5G, the capacity of other P1-8 is relatively small with the capacity of 3.5G. After reading and writing this disk, it is easy to cause system damage. Restart the device and find that it cannot be turned on, so please choose p9.
2.1.1 e Read and Write
Write to disk:
| 1 dd if=/dev/zero of=/dev/mmcblk1p9 bs=1M count=2000 oflag=direct,nonblock | |
|---|---|
| 1 | dd if=/dev/zero of=/dev/mmcblk1p9 bs=1M count=2000 oflag=direct,nonblock |
Read disk:
| 1 dd if=/dev/mmcblk1p9 of=/dev/null bs=1M count=2000 iflag=direct,nonblock | |
|---|---|
| 1 | dd if=/dev/mmcblk1p9 of=/dev/null bs=1M count=2000 iflag=direct,nonblock |
2.1.2 U disk Read and Write
Write to disk:
| 1 dd if=/dev/zero of=/dev/sda1 bs=1M count=2000 oflag=direct,nonblock | |
|---|---|
| 1 | dd if=/dev/zero of=/dev/sda1 bs=1M count=2000 oflag=direct,nonblock |
Read disk:
| 1 dd if=/dev/sda1 of=/dev/null bs=1M count=2000 iflag=direct,nonblock | |
|---|---|
| 1 | dd if=/dev/sda1 of=/dev/null bs=1M count=2000 iflag=direct,nonblock |
2.2 Set Performance Mode
First way:
| 1 echo performance | tee $(find /sys/ -name *governor) | |
|---|---|
| 1 | echo performance | tee $(find /sys/ -name *governor) |
Second way:
Set small core and large core respectively:
echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo performance > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
2.3 Check Current CPU Frequency
cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq
cat /sys/devices/system/cpu/cpufreq/policy4/scaling_cur_freq
2.4 glmark2 Performance Score
Buildroot glmark2
Display screen performance score:
| 1 sh /rockchip test/gpu/test glmark2 fullscreen.sh _ _ _ | |
|---|---|
| 1 | sh /rockchip test/gpu/test glmark2 fullscreen.sh _ _ _ |
Do not display screen performance score:
| 1 sh /rockchip test/gpu/test glmark2 offscreen.sh _ _ _ | |
|---|---|
| 1 | sh /rockchip test/gpu/test glmark2 offscreen.sh _ _ _ |
Debian glmark2
Display screen performance score:
cd /usr/local/bin/
sh test_glmark2_fullscreen.sh
Do not display screen performance score:
cd /usr/local/bin/
sh test_glmark2_offscreen.sh
3. Stress Test
List of stress tests:
3.1 glmark2
Buildroot
The script under the stress test table cannot be tested in a loop, use the command to test:
| 1 while true; do /rockchip test/gpu/test glmark2 fullscreen.sh sleep 2; done _ _ _ | |
|---|---|
| 1 | while true; do /rockchip test/gpu/test glmark2 fullscreen.sh sleep 2; done _ _ _ |
Debian
| 1 while true; do /usr/local/bin/test glmark2 fullscreen.sh sleep 2; done _ _ | |
|---|---|
| 1 | while true; do /usr/local/bin/test glmark2 fullscreen.sh sleep 2; done _ _ |
3.2 Reboot Test
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 10 in the stress test list) Exit the test
| 1 echo off > /data/cfg/rockchip test/reboot cnt _ _ | |
|---|---|
| 1 | echo off > /data/cfg/rockchip test/reboot cnt _ _ |
3.3 Recovery Test
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 6 in the stress test list) Exit the test
| 1 echo off > /oem/rockchip test/reboot cnt _ _ | |
|---|---|
| 1 | echo off > /oem/rockchip test/reboot cnt _ _ |
3.4 memtester Test
First way:
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 1 in the stress test list) Then select the serial number corresponding to memtester test (default memtester is 128M)
Second way:
Directly execute memtester 300M
Note: 300MB can be set according to the actual DDR size, for example: 100MB, 200MB, but this value cannot be greater than the DDR size.
3.5 stressapptest
First way:
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 1 in the stress test list) Then select the corresponding serial number of stressapptest (is 48 hours by default).
Second way:
stressapptest -s 86400 -i 4 -C 4 -W --stop_on_errors -M 300 #The test will
stop automatically after 24 hours
3.6 cpufreq Test
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 2 in the stress test list) Then select "cpu freq stress test" and "cpu freq test": (with out stress test) corresponding serial number.
3.7 Flash Stress Test
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 3 in the stress test list)
3.8 Bluetooth Test
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 4 in the stress test list)
3.9 suspend_resume Test
Buildroot
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 7 in the stress test list) Then select auto suspend (resume by rtc) corresponding serial number 3 to start the test.
Debian
cd /usr/local/bin/
sh test_suspend_resume.sh Then select auto suspend (resume by rtc) corresponding serial number 3 to start the test.
3.10 Wi-Fi Test
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 8 in the stress test list)
3.11 DDR freq Scaling Test
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 11 in the stress test list)
3.12 NPU Stress Test
Connect the SDK serial port to the NPU port:
stressapptest -s 86400 -i 4 -C 4 -W --stop_on_errors -M 300 #The test will
stop within 24 hours automatically
3.13 Camera Test
Open the stress test list:
| 1 sh rockchip test/rockchip test.sh _ _ | |
|---|---|
| 1 | sh rockchip test/rockchip test.sh _ _ |
Start testing (select the test item with the serial number 13 in the stress test list) Then select camera stresstest corresponding series number 3 to start the test.
3.14 Video Test
The player cannot play all the videos in a loop by executing the script.
Firstly, copy the video folder and script included all English video files into the device, and then execute the script to test:
| 1 cp -r /media/usb0/video /userdata 2 cp /media/usb0/video.sh /userdata 3 chmod 777 /userdata/video.sh 4 ./video.sh | |
|---|---|
| 1 2 3 4 | cp -r /media/usb0/video /userdata cp /media/usb0/video.sh /userdata chmod 777 /userdata/video.sh ./video.sh |