11.1 System
11.1.1 OProfile
11.1.1.1 Test Name
- autorun-oprofile.sh
11.1.1.1.1 Location
/unit_tests/OProfile/
11.1.1.1.2 Functionality
OProfile은 실행중인 모든 코드를 낮은 오버헤드로 프로파일링할 수 있는 시스템 전체 프로파일러이다. OProfile은 커널 드라이버, 샘플 데이터 수집을 위한 데몬, 데이터를 정보로 변환하기 위한 여러 포스트 프로파일링 도구로 구성된다.
11.1.1.1.3 Configuration
None
11.1.1.1.4 Use Case and Expected Output
./autorun-oprofile.sh
11.1.2 Owire
11.1.2.1 Test Name
- autorun-owire.sh
11.1.2.1.1 Location
/unit_tests/OWire/
11.1.2.1.2 Functionality
EEPROM 기능을 테스트한다.
11.1.2.1.3 Configuration
None
11.1.2.1.4 Use Case and Expected Output
./autorun-owire.sh
11.1.3 Power Management
11.1.3.1 Test Name
- /unit_tests/Power_Management/suspend_random_auto.sh
- /unit_tests/Power_Management/suspend_quick_auto.sh
11.1.3.1.1 Location
/unit_tests/Power_Management/
11.1.3.1.2 Functionality
모든 i.MX 보드에서 저전력 모드를 활성화하고 다른 코어를 깨운다.
11.1.3.1.3 Configuration
None
11.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 Sabre 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
11.1.4 Remote Processor Messaging
11.1.4.1 Test Name
- mxc_mcc_tty_test.out
11.1.4.1.1 Location
/unit_tests/Remote_Processor_Messaging
11.1.4.1.2 Functionality
Cortex-A와 Cortex-M 코어 사이의 통신을 테스트한다.
11.1.4.1.3 Configuration
i.MX RPMsg 테스트 프로그램을 실행하려면, 아래 작업을 수행한다. 적절한 Cortex-M4 프로세서 RTOS와 Linux 이미지가 사용되는지 확인한다. 아래는 i.MX7Dual 보드의 예이다:
- rpmsg_pingpong_sdk_7dsdb.bin → i.MX7Dual SDB 보드에서 사용되는 핑퐁 테스트
- rpmsg_str_echo_sdk_7dsdb.bin → i.MX7Dual SDB 보드에서 사용되는 tty 문자열 에코 테스트
- rpmsg_pingpong_sdk_7dval.bin → i.MX7Dual 12x12 LPDDR3 ARM2 보드에서 사용되는 핑퐁 테스트
- rpmsg_str_echo_sdk_7dval.bin → i.MX7Dual 12x12 LPDDR3 ARM2 보드에서 사용되는 tty 문자열 에코 테스트
Cortex-M4 프로세서 RTOS 이미지를 로드하고, U-Boot에서 시작한다. TFTP 서버나 U-Boot에서 부팅 가능한 SD 카드에서 Cortex-M4 프로세서 RTOS 이미지를 로드한다.
- TFTP 서버에서 Cortex-M4 프로세서 RTOS 이미지를 로드한다:
- U-Boot로 부팅하고 중지한다.
- 아래 커맨드를 사용하여 응답하는 Cortex-M4 프로세서 RTOS 이미지를 TFTP에서 부팅한다.
=> dhcp 0x7f8000 10.192.242.53:rpmsg_pingpong_sdk_7dval.bin;
bootaux 0x7f8000
- SD 카드에서 Cortex-M4 프로세서 RTOS 이미지를 로드한다:
- MFGtools를 사용하여 부팅 가능한 SD 카드를 생성한다.
- VFAT 파일 시스템으로 포맷된 첫 번째 파티션에 Cortex-M4 프로세서 RTOS 파일을 복사한다.
- 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 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에서 필요로 한다. 따라서, i.MX 6SoloX에서 U-Boot의 mmcargs를 수정해야 한다.
=> 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"를 사용하여 테스트 프로그램을 실행한다.
참고
참고로 동시에 서로 다른 테스트 프로그램을 실행하지 않는다.
11.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
11.1.5 Watchdog (WDOG)
11.1.5.1 Test Name
- autorun-wdog.sh
- wdt_driver_test.out
11.1.5.1.1 Location
/unit_tests/Watchdog/
11.1.5.1.2 Functionality
예기치 않은 중단, 무한 루프 상황이나 프로그램 오류로부터 벗어나는 수단을 제공하여, 시스템 오류로부터 보호하는 Watchdog Timer 모듈을 테스트한다.
11.1.5.1.3 Configuration
None
11.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 timeout
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.