10.1 System
10.1.1 OProfile
10.1.1.1 Test Name
- autorun-oprofile.sh
10.1.1.1.1 Location
/unit_tests/OProfile/
10.1.1.1.2 Functionality
OProfile은 낮은 오버헤드로 실행 중인 모든 코드를 프로파일링할 수 있는 광범위한 시스템 프로파일러이다. OProfile은 커널 드라이버, 샘플 데이터 수집을 위한 데몬, 데이터를 정보로 변환하기 위한 여러 포스트 프로파일링 도구로 구성된다.
10.1.1.1.3 Configuration
None
10.1.1.1.4 Use Case and Expected Output
./autorun-oprofile.sh
10.1.2 OWire
10.1.2.1 Test Name
- autorun-owire.sh
10.1.2.1.1 Location
/unit_tests/OWire/
10.1.2.1.2 Functionality
EEPROM 기능 테스트.
10.1.2.1.3 Configuration
None
10.1.2.1.4 Use Case and Expected Output
./autorun-owire.sh
10.1.3 Power Management
10.1.3.1 Test Name
- /unit_tests/Power_Management/suspend_random_auto.sh
- /unit_tests/Power_Management/suspend_quick_auto.sh
10.1.3.1.1 Location
/unit_tests/Power_Management/
10.1.3.1.2 Functionality
저전력 모드를 활성화하고 모든 i.MX 보드의 다른 코어를 깨운다.
10.1.3.1.3 Configuration
None
10.1.3.1.4 Use Case and Expected Output
$ /unit_tests/Power_Management/suspend_random_auto.sh
or
$ /unit_tests/Power_Management/suspend_quick_auto.sh
i.MX 7D Saber SD 보드의 예상되는 출력:
# /unit_tests/Power_Management/suspend_random_auto.sh
rtcwakeup.out: wakeup from "mem" using rtc0 at Wed Feb 22 22:55:29 2017
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 632.862 msecs
PM: suspend devices took 0.640 seconds
PM: late suspend of devices complete after 1.258 msecs
PM: noirq suspend of devices complete after 1.198 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
Turn off Mega/Fast mix in DSM
Enabling non-boot CPUs ...
CPU1 is up
PM: noirq resume of devices complete after 0.832 msecs
imx-sdma 30bd0000.sdma: loaded firmware 4.2
PM: early resume of devices complete after 0.930 msecs
PM: resume of devices complete after 483.310 msecs
PM: resume devices took 0.480 seconds
Restarting tasks ... done.
=============================
suspend 0 times
=============================
wakeup 7 seconds, sleep 16 seconds
rtcwakeup.out: wakeup from "mem" using rtc0 at Wed Feb 22 22:55:42 2017
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 630.328 msecs
PM: suspend devices took 0.640 seconds
PM: late suspend of devices complete after 1.252 msecs
PM: noirq suspend of devices complete after 1.203 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
Turn off Mega/Fast mix in DSM
Enabling non-boot CPUs ...
CPU1 is up
PM: noirq resume of devices complete after 0.777 msecs
imx-sdma 30bd0000.sdma: loaded firmware 4.2
PM: early resume of devices complete after 0.873 msecs
PM: resume of devices complete after 483.406 msecs
PM: resume devices took 0.480 seconds
Restarting tasks ... done.
=============================
suspend 1 times
=============================
wakeup 11 seconds, sleep 20 seconds
rtcwakeup.out: wakeup from "mem" using rtc0 at Wed Feb 22 22:56:10 2017
37PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 651.761 msecs
PM: suspend devices took 0.660 seconds
PM: late suspend of devices complete after 1.245 msecs
PM: noirq suspend of devices complete after 1.193 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
Turn off Mega/Fast mix in DSM
Enabling non-boot CPUs ...
CPU1 is up
PM: noirq resume of devices complete after 0.728 msecs
imx-sdma 30bd0000.sdma: loaded firmware 4.2
PM: early resume of devices complete after 0.859 msecs
PM: resume of devices complete after 483.441 msecs
PM: resume devices took 0.480 seconds
Restarting tasks ... done.
=============================
suspend 2 times
=============================
wakeup 3 seconds, sleep 12 seconds
rtcwakeup.out: wakeup from "mem" using rtc0 at Wed Feb 22 22:56:34 2017
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 641.321 msecs
PM: suspend devices took 0.650 seconds
PM: late suspend of devices complete after 1.258 msecs
PM: noirq suspend of devices complete after 1.195 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
Turn off Mega/Fast mix in DSM
Enabling non-boot CPUs ...
CPU1 is up
PM: noirq resume of devices complete after 0.730 msecs
imx-sdma 30bd0000.sdma: loaded firmware 4.2
PM: early resume of devices complete after 0.857 msecs
PM: resume of devices complete after 483.451 msecs
PM: resume devices took 0.480 seconds
Restarting tasks ... done.
=============================
suspend 3 times
=============================
wakeup 9 seconds, sleep 8 seconds
rtcwakeup.out: wakeup from "mem" using rtc0 at Wed Feb 22 22:56:56 2017
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
38Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 641.492 msecs
PM: suspend devices took 0.650 seconds
PM: late suspend of devices complete after 1.255 msecs
PM: noirq suspend of devices complete after 1.201 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
Turn off Mega/Fast mix in DSM
Enabling non-boot CPUs ...
CPU1 is up
PM: noirq resume of devices complete after 0.731 msecs
imx-sdma 30bd0000.sdma: loaded firmware 4.2
PM: early resume of devices complete after 0.861 msecs
PM: resume of devices complete after 483.476 msecs
PM: resume devices took 0.480 seconds
Restarting tasks ... done.
^c
# /unit_tests/Power_Management/suspend_quick_auto.sh
rtcwakeup.out: wakeup from "mem" using rtc0 at Wed Feb 22 23:01:16 2017
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 632.891 msecs
PM: suspend devices took 0.640 seconds
PM: late suspend of devices complete after 1.254 msecs
PM: noirq suspend of devices complete after 1.200 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
Turn off Mega/Fast mix in DSM
Enabling non-boot CPUs ...
CPU1 is up
PM: noirq resume of devices complete after 0.734 msecs
imx-sdma 30bd0000.sdma: loaded firmware 4.2
PM: early resume of devices complete after 0.862 msecs
PM: resume of devices complete after 483.417 msecs
PM: resume devices took 0.480 seconds
Restarting tasks ... done.
===============================
suspend 1 times
===============================
rtcwakeup.out: wakeup from "mem" using rtc0 at Wed Feb 22 23:01:19 2017
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 631.833 msecs
39PM: suspend devices took 0.640 seconds
PM: late suspend of devices complete after 1.253 msecs
PM: noirq suspend of devices complete after 1.242 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
Turn off Mega/Fast mix in DSM
Enabling non-boot CPUs ...
CPU1 is up
PM: noirq resume of devices complete after 0.729 msecs
imx-sdma 30bd0000.sdma: loaded firmware 4.2
PM: early resume of devices complete after 0.862 msecs
PM: resume of devices complete after 483.416 msecs
PM: resume devices took 0.480 seconds
Restarting tasks ... done.
===============================
suspend 2 times
===============================
rtcwakeup.out: wakeup from "mem" using rtc0 at Wed Feb 22 23:01:22 2017
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 633.624 msecs
PM: suspend devices took 0.640 seconds
PM: late suspend of devices complete after 1.252 msecs
PM: noirq suspend of devices complete after 1.204 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
Turn off Mega/Fast mix in DSM
Enabling non-boot CPUs ...
CPU1 is up
PM: noirq resume of devices complete after 0.733 msecs
imx-sdma 30bd0000.sdma: loaded firmware 4.2
PM: early resume of devices complete after 0.853 msecs
PM: resume of devices complete after 483.450 msecs
PM: resume devices took 0.480 seconds
Restarting tasks ... done.
^c
10.1.4 Remote Processor Messaging
10.1.4.1 Test Name
- mxc_mcc_tty_test.out
10.1.4.1.1 Location
/unit_tests/Remote_Processor_Messaging
10.1.4.1.2 Functionality
Cortex-A와 Cortex-M 코어 사이의 통신 테스트.
10.1.4.1.3 Configuration
i.MX RPMsg 테스트 프로그램을 실행하려면, 다음 작업을 수행한다. 적절한 Cortex-M4 프로세서 RTOS와 Linux 이미지가 사용되는지 확인한다. 다음은 i.MX7Dual 보드의 예이다:
- rpmsg_pingpong_sdk_7dsdb.bin → i.MX7Dual SDB 보드에서 사용되는 ping-pong 테스트
- rpmsg_str_echo_sdk_7dsdb.bin → i.MX7Dual SDB 보드에서 사용되는 tty 문자열 echo 테스트
- rpmsg_pingpong_sdk_7dval.bin → i.MX7Dual 12x12 LPDDR3 ARM2 보드에서 사용되는 ping-pong 테스트
- rpmsg_str_echo_sdk_7dval.bin → i.MX7Dual 12x12 LPDDR3 ARM2 보드에서 사용되는 tty 문자열 echo 테스트
Cortex-M4 프로세서 RTOS 이미지를 로드하고 U-Boot에서 시작한다. TFTP 서버나 부팅 가능한 SD 카드로 Cortex-M4 프로세서 RTOS 이미지를 로드한다.
- TFTP 서버에서 Cortex-M4 프로세서 RTOS 이미지를 로드한다:
- U-Boot로 부팅하고 중지한다.
- TFTP에서 다음 명령을 사용하여 응답하는 Cortex-M4 프로세서 RTOS 이미지로 부팅한다.
=> dhcp 0x7f8000 10.192.242.53:rpmsg_pingpong_sdk_7dval.bin; bootaux 0x7f8000
- SD 카드에서 Cortex-M4 프로세서 RTOS 이미지를 로드한다:
- MFGtools를 사용하여 부팅 가능한 SD 카드를 만든다.
- Cortex-M4 프로세서 RTOS 파일을 VFAT 파일 시스템으로 포맷된 첫 번째 파티션에 복사한다.
- U-Boot의 기본 Cortex-M4 프로세서 RTOS 이름을 변경한다.
=> setenv m4image '<The name of the M4/RTOS image>';save
Cortex-M4 프로세서에서 사용하는 bootargs를 설정한다.
=> setenv run_m4_tcm 'if run loadm4image; then cp.b ${loadaddr} 0x7f8000 0x8000;
=> bootaux 0x7f8000; fi'; save
run_m4_tcm 실행을 추가하기 위해 원래 bootcmd를 수정한다.
=> setenv bootcmd "run run_m4_tcm; <original contents of the bootcmd>"; save
참고
"uart_from_osc"는 Cortex-M4 프로세서 RTOS 이미지가 실행 중일 때, i.MX 6SoloX에 필요하다. 따라서 U-Boot의 mmcargs는 i.MX 6SoloX에서 수정되어야 한다.
=> setenv mmcargs 'setenv bootargs console=${console},${baudrate} root=${mmcroot}, uart_from_osc';save
RPMsg 테스트 프로그램을 실행한다. * imx_rpmsg_pingpong.ko와 imx_rpmsg_tty.ko가 빌드되어 있는지 확인한다. * insmod imx_rpmsg_pingpong.ko나 insmod imx_rpmsg_tty.ko를 사용하여 테스트 프로그램을 실행한다.
참고
동시에 다른 테스트 프로그램을 실행하지 않는다.
10.1.4.1.4 Use Case and Expected Output
다음 명령을 실행하고 RPMsg TTY 테스트를 시작할 때 RPMsg TTY 수신 프로그램이 백엔드에서 실행 중인지 확인한다.
# ./mxc_mcc_tty_test.out /dev/ttyRPMSG30 115200 R 100 1000 &
Expected output:
mxc_mcc_tty_test.out:
$ insmod imx_rpmsg_tty.ko
$ imx_rpmsg_tty rpmsg0: new channel: 0x400 -> 0x1!
$ Install rpmsg tty driver!
$ echo deadbeaf > /dev/ttyRPMSG30
$ imx_rpmsg_tty rpmsg0: msg(<- src 0x1) deadbeaf len 8
10.1.5 Watchdog (WDOG)
10.1.5.1 Test Name
- autorun-wdog.sh
- wdt_driver_test.out
10.1.5.1.1 Location
/unit_tests/Watchdog/
10.1.5.1.2 Functionality
예기치 않은 중단, 무한 루프 상황이나 프로그램 오류로부터의 탈출을 제공하기 위해 오류로부터 시스템을 보호하는 Watchdog Timer 모듈을 테스트한다.
10.1.5.1.3 Configuration
None
10.1.5.1.4 Use Case and Expected Output
Use case
./autorun-wdog.sh
or
./wdt_driver_test.out 1 2 0 &
Expected output
This should generate a reset after 3 seconds (a 1 second time-out and a 2 second sleep).
or
./wdt_driver_test.out 2 1 0
The system should keep running without being reset. This test requires the kernel to be executed
with the "jtag=on" on some platforms. Press "Ctrl+C" to terminate this test program.
'NXP i.MX SoC Family > i.MX Linux Reference Manual' 카테고리의 다른 글
i.MX Linux Reference Manual - Unit Tests - Connectivity (0) | 2022.09.01 |
---|---|
i.MX Linux Reference Manual - Unit Tests - Storage (0) | 2022.08.30 |
i.MX Linux Reference Manual - Unit Tests (0) | 2022.08.29 |
i.MX Linux Reference Manual - NXP eIQ Machine Learning - Overview of NXP eIQ Machine Learning (0) | 2022.08.26 |
i.MX Linux Reference Manual - NXP eIQ Machine Learning (0) | 2022.08.26 |