20220311在MT6739的android8.1下测试modetest
需求:鸿蒙(Openharmony3.1 beta)下LCD屏幕显示需要MT6739支持DRM显示。
于是先在MT6739的android8.1下验证了。
OS:android8.1
内核:linux-4.4(SDK里面同时有linx-3.18)
1、编译modetest:
rootroot@rootroot-desktop:~/mt6739_android8.1$ mmm external/libdrm/
#### build completed successfully (04:00 (mm:ss)) ####
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ find . -name modetest
./external/libdrm/tests/modetest
./out/target/product/k39tv1_bsp_1g/symbols/system/bin/modetest
./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/LINKED/modetest
./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/PACKED/modetest
./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/modetest
./out/target/product/k39tv1_bsp_1g/system/bin/modetest
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ file ./external/libdrm/tests/modetest
./external/libdrm/tests/modetest: directory
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ file ./out/target/product/k39tv1_bsp_1g/symbols/system/bin/modetest
./out/target/product/k39tv1_bsp_1g/symbols/system/bin/modetest: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), BuildID[md5/uuid]=a0219833759c1421cf3996690c812563, not stripped
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ file ./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/LINKED/modetest
./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/LINKED/modetest: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), BuildID[md5/uuid]=a0219833759c1421cf3996690c812563, not stripped
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ file ./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/PACKED/modetest
./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/PACKED/modetest: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), BuildID[md5/uuid]=a0219833759c1421cf3996690c812563, not stripped
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ file ./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/modetest
./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/modetest: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), BuildID[md5/uuid]=a0219833759c1421cf3996690c812563, stripped
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ file ./out/target/product/k39tv1_bsp_1g/system/bin/modetest
./out/target/product/k39tv1_bsp_1g/system/bin/modetest: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), BuildID[md5/uuid]=a0219833759c1421cf3996690c812563, stripped
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ cp ./out/target/product/k39tv1_bsp_1g/symbols/system/bin/modetest modetest1
rootroot@rootroot-desktop:~/mt6739_android8.1$ cp ./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/LINKED/modetest modetest2
rootroot@rootroot-desktop:~/mt6739_android8.1$ cp ./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/PACKED/modetest modetest3
rootroot@rootroot-desktop:~/mt6739_android8.1$ cp ./out/target/product/k39tv1_bsp_1g/obj/EXECUTABLES/modetest_intermediates/modetest modetest4
rootroot@rootroot-desktop:~/mt6739_android8.1$ cp ./out/target/product/k39tv1_bsp_1g/system/bin/modetest modetest5
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ diff modetest1 modetest2
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ diff modetest1 modetest3
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ diff modetest1 modetest4
Binary files modetest1 and modetest4 differ
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ diff modetest4 modetest5
rootroot@rootroot-desktop:~/mt6739_android8.1$
使用./out/target/product/k39tv1_bsp_1g/system/bin/modetest
2、通过adb将modetest这个可执行文件push到MT6739的/data目录,并修改权限,执行。
X:\mt6739_android8.1>adb push modetest5 /data/
modetest5: 1 file pushed, 0 skipped. 0.5 MB/s (49544 bytes in 0.093s)
k39tv1_bsp_1g:/data # chmod 777 modetest1
k39tv1_bsp_1g:/data #
k39tv1_bsp_1g:/data # ./modetest1
CANNOT LINK EXECUTABLE "./modetest1": library "libdrm_platform.so" not found
Aborted (core dumped)
134|k39tv1_bsp_1g:/data #
3、查找:libdrm_platform.so
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ find . -name libdrm_platform
^C
rootroot@rootroot-desktop:~/mt6739_android8.1$ find . -name libdrm_platform.so
./out/target/product/k39tv1_bsp_1g/symbols/system/lib/libdrm_platform.so
./out/target/product/k39tv1_bsp_1g/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/libdrm_platform.so
./out/target/product/k39tv1_bsp_1g/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so
./out/target/product/k39tv1_bsp_1g/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/PACKED/libdrm_platform.so
./out/target/product/k39tv1_bsp_1g/obj/lib/libdrm_platform.so
./out/target/product/k39tv1_bsp_1g/system/lib/libdrm_platform.so
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ diff ./out/target/product/k39tv1_bsp_1g/symbols/system/lib/libdrm_platform.so ./out/target/product/k39tv1_bsp_1g/system/lib/libdrm_platform.so
Binary files ./out/target/product/k39tv1_bsp_1g/symbols/system/lib/libdrm_platform.so and ./out/target/product/k39tv1_bsp_1g/system/lib/libdrm_platform.so differ
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ diff ./out/target/product/k39tv1_bsp_1g/symbols/system/lib/libdrm_platform.so ./out/target/product/k39tv1_bsp_1g/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/libdrm_platform.so
Binary files ./out/target/product/k39tv1_bsp_1g/symbols/system/lib/libdrm_platform.so and ./out/target/product/k39tv1_bsp_1g/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/libdrm_platform.so differ
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ diff ./out/target/product/k39tv1_bsp_1g/obj/lib/libdrm_platform.so ./out/target/product/k39tv1_bsp_1g/system/lib/libdrm_platform.so
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ diff ./out/target/product/k39tv1_bsp_1g/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/LINKED/libdrm_platform.so ./out/target/product/k39tv1_bsp_1g/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/PACKED/libdrm_platform.so
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ diff ./out/target/product/k39tv1_bsp_1g/symbols/system/lib/libdrm_platform.so ./out/target/product/k39tv1_bsp_1g/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/libdrm_platform.so
Binary files ./out/target/product/k39tv1_bsp_1g/symbols/system/lib/libdrm_platform.so and ./out/target/product/k39tv1_bsp_1g/obj/SHARED_LIBRARIES/libdrm_platform_intermediates/libdrm_platform.so differ
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ cp ./out/target/product/k39tv1_bsp_1g/system/lib/libdrm_platform.so
cp: missing destination file operand after ‘./out/target/product/k39tv1_bsp_1g/system/lib/libdrm_platform.so’
Try 'cp --help' for more information.
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$ cp ./out/target/product/k39tv1_bsp_1g/system/lib/libdrm_platform.so .
rootroot@rootroot-desktop:~/mt6739_android8.1$
rootroot@rootroot-desktop:~/mt6739_android8.1$
根据经验使用:./out/target/product/k39tv1_bsp_1g/system/lib/libdrm_platform.so
可执行文件采用:./out/target/product/k39tv1_bsp_1g/system/bin/modetest
X:\mt6739_android8.1>
X:\mt6739_android8.1>adb push libdrm_platform.so /system/lib
libdrm_platform.so: 1 file pushed, 0 skipped. 0.8 MB/s (58684 bytes in 0.074s)
X:\mt6739_android8.1>adb push modetest5 /data/
modetest5: 1 file pushed, 0 skipped. 0.5 MB/s (49544 bytes in 0.093s)
X:\mt6739_android8.1>
4、再次执行:
255|k39tv1_bsp_1g:/data #
255|k39tv1_bsp_1g:/data # chmod 777 modetest5
k39tv1_bsp_1g:/data #
k39tv1_bsp_1g:/data # ./mod
modetest1 modetest5
k39tv1_bsp_1g:/data # ./modetest5
trying to open device 'i915'...failed
trying to open device 'amdgpu'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...failed
trying to open device 'msm'...failed
trying to open device 'sti'...failed
trying to open device 'tegra'...failed
trying to open device 'imx-drm'...failed
trying to open device 'rockchip'...failed
trying to open device 'atmel-hlcdc'...failed
trying to open device 'fsl-dcu-drm'...failed
trying to open device 'vc4'...failed
trying to open device 'virtio_gpu'...failed
trying to open device 'mediatek'...failed
trying to open device 'meson'...failed
no device found
255|k39tv1_bsp_1g:/data #
255|k39tv1_bsp_1g:/data #