Running kmscube as init

cancel
Showing results for 
Search instead for 
Did you mean: 

Running kmscube as init

869 Views
michael_kainz
Contributor I

Hello!

I'm currently trying to optimize boottime of the IMX8MQ-EVK.

For this i wanted to use kmscube on a monitor connected with HDMI as an example application to replace init.

So far i have a bashscript which executes instead of init and launches kmscube (and after that init).

But when kmscube should execute  it prints 

could not open drm device
failed to initialize legacy DRM

I tried to give it other devices from /dev/dri but with the same outcome.

So i thought about "attaching" the monitor before executing the script.

Unfortunately i have no idea how to do that.

Any ideas?

0 Kudos
2 Replies

185 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Michael,

You can since drm/kms is from linux kernel , not from weston

 

You need to change the framebuffer lib to hook up to frame buffer display. . export LD_PRELOAD=libVDK-framebuffer.so. libVDK.so is linked to libVDK-wayland.so by default. 

 

I just tried.  kmscube runs ok after killall weston and export LD_PRELOAD=libVDK-framebuffer.so

kmscube runs also without the export once weston is killed but Qt still doesn't, it needs an eglfs QT_QPA_PLATFORM and changing the qtbase recipe was not enough.

Regards

0 Kudos

185 Views
michael_kainz
Contributor I

Thanks for the answer!
I used the core-image-minimal and didn't add libvdk-imx at first. So weston isn't even included in the image.

Now that does solve the issue i submitted but it still doesn't work.

It seems like kmscube gets interrupted or cant work.

Any more ideas?

Here is the script:

#!/bin/sh

echo "Starting needed programm"
export LD_PRELOAD=libVDK-framebuffer.so
export QT_QPA_PLATFORM=eglfs
exec /usr/bin/kmscube -D /dev/dri/card0 &
exec /sbin/init

Here is the bootlog. At "Starting needed programm" my script gets called.

U-Boot 2017.03-imx_v2017.03_4.9.88_2.0.0_ga+g0b5c4c8bf2 (Feb 05 2019 - 10:47:53 +0100)

CPU: Freescale i.MX8MQ rev2.0 1500 MHz (running at 1000 MHz)
CPU: Commercial temperature grade (0C to 95C) at 26C
Reset cause: POR
Model: Freescale i.MX8MQ EVK
DRAM: 3 GiB
TCPC: Vendor ID [0x1fc9], Product ID [0x5110]
MMC: FSL_SDHC: 0, FSL_SDHC: 1
No panel detected: default to HDMI
Display: HDMI (1280x720)
In: serial
Out: serial
Err: serial

BuildInfo:
- ATF 6a83ae0
- U-Boot 2017.03-imx_v2017.03_4.9.88_2.0.0_ga+g0b5c4c8bf2

switch to partitions #0, OK
mmc0(part 0) is current device
Net: eth0: ethernet@30be0000
Normal Boot
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0(part 0) is current device
reading boot.scr
** Unable to read file boot.scr **
reading Image
20335104 bytes read in 447 ms (43.4 MiB/s)
Booting from mmc ...
reading fsl-imx8mq-evk.dtb
42111 bytes read in 17 ms (2.4 MiB/s)
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Using Device Tree in place at 0000000043000000, end 000000004300d47e

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.88-imx_4.9.88_2.0.0_ga+g5e23f9d61147 (oe-user@oe-host) (gcc version 7.3.0 (GCC) ) #5 SMP PREEMPT Thu Jan 31 14:31:44 CET 2019
[ 0.000000] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000] earlycon: ec_imx6q0 at MMIO 0x0000000030860000 (options '115200')
[ 0.000000] bootconsole [ec_imx6q0] enabled
[ 0.302962] dmi: Firmware registration failed.
[ 1.152133] NXP PHY: loading NXP PHY driver: [autonomous mode]
[ 1.174831] Can't support > 32 bit dma.
[ 1.265917] ov5640_read_reg:write reg error:reg=300a
[ 1.374396] Can't support > 32 bit dma.
[ 1.380814] Can't support > 32 bit dma.
[ 1.385754] Failed to run desc RNG4 SH0 status (0xfffffff5)
[ 1.391504] Failed to run desc RNG4 SH1 status (0xfffffff5)
[ 1.532655] Can't support > 32 bit dma.
[ 1.537435] Can't support > 32 bit dma.
[ 1.565159] caam-snvs 30370000.caam-snvs: can't get snvs clock
[ 1.585229] ak5558 1-0013: ak5558_i2c_probe(748)
[ 1.616743] wm8524-codec wm8524: Supported sample rate: 192000Hz
[ 1.622786] wm8524-codec wm8524: Supported sample rate: 96000Hz
[ 1.628779] wm8524-codec wm8524: Supported sample rate: 48000Hz
[ 1.634713] wm8524-codec wm8524: Supported sample rate: 32000Hz
[ 1.654687] ak4458 1-0010: ASoC: failed to probe component -6
[ 1.660491] imx-ak4458 sound-ak4458: ASoC: failed to instantiate card -6
[ 1.667325] imx-ak4458 sound-ak4458: snd_soc_register_card failed (-6)
[ 1.689701] ak5558 1-0013: ASoC: failed to probe component -6
[ 1.695540] imx-ak5558 sound-ak5558: ASoC: failed to instantiate card -6
[ 1.702308] imx-ak5558 sound-ak5558: snd_soc_register_card failed (-6)
[ 1.801716] imx-pcie 33800000.pcie: Speed change timeout
[ 2.063679] imx-pcie 33c00000.pcie: phy link never came up
[ 2.069192] imx-pcie 33c00000.pcie: failed to initialize host
[ 2.074946] imx-pcie 33c00000.pcie: unable to add pcie port.
Starting needed programm
[ 1] Failed to open device: No such file or directory, Try again...
Using display 0x3baa06b0 with EGL version 1.5
===================================
EGL information:
version: "1.5"
vendor: "Vivante Corporation"
client extensions: "EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_platform_wayland EGL_EXT_platform_wayland EGL_KHR_platform_gbm"
display extensions: "EGL_KHR_fence_sync EGL_KHR_reusable_sync EGL_KHR_wait_sync EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_EXT_image_dma_buf_import EGL_KHR_lock_surface EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_EXT_create_context_robustness EGL_EXT_protected_surface EGL_EXT_protected_content EGL_EXT_buffer_age EGL_WL_bind_wayland_display EGL_WL_create_wayland_buffer_from_image EGL_KHR_partial_update EGL_EXT_image_dma_buf_import_modifiers"
===================================
OpenGL ES 2.x information:
version: "OpenGL ES 3.1 V6.2.4.p1.150331"
shading language version: "OpenGL ES GLSL ES 3.10"
vendor: "Vivante Corporation"
renderer: "Vivante GC7000L"
extensions: "GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_half_float GL_OES_element_index_uint GL_OES_mapbuffer GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_texture_npot GL_OES_rgb8_rgba8 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_depth24 GL_OES_depth32 GL_OES_packed_depth_stencil GL_OES_fbo_render_mipmap GL_OES_get_program_binary GL_OES_fragment_precision_high GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_sync GL_OES_texture_stencil8 GL_OES_shader_image_atomic GL_OES_texture_storage_multisample_2d_array GL_OES_required_internalformat GL_OES_surfaceless_context GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_draw_elements_base_vertex GL_OES_texture_half_float GL_OES_texture_float GL_KHR_blend_equation_advanced GL_KHR_debug GL_KHR_robustness GL_KHR_robust_buffer_access_behavior GL_EXT_texture_type_2_10_10_10_REV GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888 GL_EXT_texture_compression_s3tc GL_EXT_read_format_bgra GL_EXT_multi_draw_arrays GL_EXT_frag_depth GL_EXT_discard_framebuffer GL_EXT_blend_minmax GL_EXT_multisampled_render_to_texture GL_EXT_color_buffer_half_float GL_EXT_color_buffer_float GL_EXT_robustness GL_EXT_texture_sRGB_decode GL_EXT_draw_buffers_indexed GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_copy_image GL_EXT_texture_cube_map_array GL_EXT_multi_draw_indirect GL_EXT_draw_elements_base_vertex GL_EXT_texture_rg GL_EXT_protected_textures GL_EXT_sRGB GL_VIV_direct_texture "
===================================
user interrupted!
failed to queue page flip: Device or resource busy
[ 3.864238] ol_download_firmware: chip_id:0x5030000 board_id:0x0
[ 4.265382] __ol_transfer_bin_file: Failed to get athsetup.bin:-11
[ 4.890172] __wmi_control_rx : event handler is not registered: event id 0x1d019

NXP i.MX Release Distro 4.9.88-2.0.0 imx8mqevk ttymxc0

imx8mqevk login:

0 Kudos