Yocto - run QML app on Raspberry Pi 3
-
@MartinD said in Yocto - run QML app on Raspberry Pi 3:
I can run Qt console app but unfortunately QML app fails
- What do you see on your Raspberry Pi's screen before you launch your app?
- How do you launch your app? Is your keyboard plugged directly into your RPi, or are you doing it over SSH?
-
@MartinD said in Yocto - run QML app on Raspberry Pi 3:
I can run Qt console app but unfortunately QML app fails
- What do you see on your Raspberry Pi's screen before you launch your app?
- How do you launch your app? Is your keyboard plugged directly into your RPi, or are you doing it over SSH?
@JKSH said in Yocto - run QML app on Raspberry Pi 3:
- What do you see on your Raspberry Pi's screen before you launch your app?
-
@JKSH said in Yocto - run QML app on Raspberry Pi 3:
- What do you see on your Raspberry Pi's screen before you launch your app?
@JKSH I see this:
160" I 2-9236551 bcm2835 -power Ilm2835 -power: Broadcom BCM2835 power domain,' -iu - I 2.9323671 mmc-bcm2835 3f300000.mmcnr: mmc debug:0 mmc d b 2° ul 2_938169] Indeed it is in host mode hprt0-= 00021501 - e ug 2.939429] mmc-bcm2835 3f300000.mmcnr: DMA ch 2.398119] mmcl: queuing unknown CIS tuple Oxannel allocated80 (2 bytes) 3.006606] sdhost: l ogbuf @ (ptrual) (ded07000) 3.013929] mmcl: queuing unknown CIS tuple Ox80 t 3.0280681 random: fast init done (3 bytes) 3.0423251 mmc1: queuing unknown CIS tuple Ox80 (3 bytes) 3.0523041 mmc 1: queuing unknown CIS tuple Ox80 (7 bytes) E 3.075678] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1) [ 3.085254] of_cfs_init 3.092400] of_cfs_init: OE 1 3.100739] Waiting for root device /deu/mmcb1k0p2... 1_ 3.1428691 mmc0: host does not support reading read-only switch, assuming wri te- enab le E 3.1479981 usb 1-1: new high-speed USB device number 2 using dwc_otg E. 3.1543381 mmc0: new high speed SDHC card at address 0002 [ 3.1569391 Indeed it is in host mode hprt0 = 00001101 [ 3.1652301 mmcblk0: mmc0:0002 NCard 14.9 GiB 3.199846] mmcblk0: p1 p2 E 3.2227781 mmc1: new high speed SDIU card at address 0001 3.2428281 EXT4-fs (mmcblkOp2): INFO : recovery required on readonly filesystem 3.2500381 EXT4-fs (mmcblkOp2): write access will be enabled during recovery 1. 1=1256311 EXT4-fs (mmcblk0p2): recovery complete [ 3.3447421 EXT4-fs (mmcblkOpZ): mounted filesystem with ordered data mode. Opts: (null) [ 3.3518861 UFS: Mounted root (ext4 filesystem) readonly on device 179:2. 3.359713] deutmpfs: mounted 3.374790] Freeing unused kernel memory : 102414 1.382363] Run /sbin/init as init process I 3.393450] Run /etc/init as init process [ 3.4013601 Run /bin/init as knit process 1.4096661 Run /bin/sh as init process 1.4183631 usb 1-1: New USB device found, tdVend_41r- 424, idProduct=9514, bcdDeuice= 2.00 I 3.4Z55551 usb 1-1: New USB device strings.. Mfr= O, Product=0, SerialNumber=0 [ 3.433660] hub 1-1:1.0: USB hub found I 3.440864] hub 1-1:1.0: 5 ports detected sh: cannot set terminal process group (-1): Inappropriate ioctl for device sh: no job control in this shell sh-5.0# L 3.767996] usb 1-1.1: new high-speed USB device number 3 using dwc_otg E. 3.8383201 usb 1-1.1: New USB deuice found, idUendor=0424, idProduct=ec00, bcdDeuice= 2.00 L 3.3054031 usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 3.915483] snsc35xx u1.0.6 4.0124371 smsc95xx 1-1.1:1.0 etb0: register 'smsc95xx' at usb -3f980000.usb -1.1, smsc95xx USD 2.0 Ethernet, b6:27:eb:Oc:69:72 4.317'3'86] usb 1-1.2: new loot-speed USB deuice number 4 using dwc_otg 4.517616] usb 1-1.2: lien USB deuice found, idUendor=04d9, idProduct=a06b, bcdDeuice= 3.01 4.525232] usb 1-1 2: New USB device strings: Plfr=1, Product-2, SerialNumber=0 4.532890] usb 1-1.2: Product= Wireless USD Deuice E 4.576755 input: HOLTEK Wireless USB Device as /deuices/platform/soc/3f900000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:04D9:06B.0001/inpuinpute 4.5404651 usb 1-1.2: Manufacturer: HOLTEN 4.643831] hid-gener lc 0003 :04D9 :(19613.0001 : input,hidrtuo0: USB HID u1.10 Keyboard [HOLTEN Wireless USD Deuice] on 04D9: I 4.7271481 input : HOLUM Wireless USB Deuic.e Mouse as /deuices/platform/soc/3f900000.usb/usb1/1-1/1-1.2/1-1.2:1.1/0003:4D9:A068.0002/input/inputi I 4.736202] input: HOME Wireless USD Deuice as /devices/platforn/soc/3f9130000.usb/usb1/1-1/1-1.2/1-1.2:1. I. 4.715148] input: HOLTEN Wireless USB Deuice Couguner Control as /deuices/platforn/soc/3f9B0000.usb/usb1/1-1,1-1.2/1-1.2:1.1/0083:04D9:S0611.0002/inpuvinput3 4.8278241 hid-generic 0003:04D9:A069.000Z: input,hiddeu96 shidraul: USB HID u1.10 House IHOLTEX Wireless USB Deulce] on usb-M900000.usb-1.2,inputl 1.1/0003:009:110611.0.92./ inpu Vinput4 t 4.818346] input.: MOLTEN Wireless USB Deuice System Control as /deuices/platforn/soc4f900000.usb/usb1/1-1/1-1.2/1-1.2:
-
@JKSH I see this:
160" I 2-9236551 bcm2835 -power Ilm2835 -power: Broadcom BCM2835 power domain,' -iu - I 2.9323671 mmc-bcm2835 3f300000.mmcnr: mmc debug:0 mmc d b 2° ul 2_938169] Indeed it is in host mode hprt0-= 00021501 - e ug 2.939429] mmc-bcm2835 3f300000.mmcnr: DMA ch 2.398119] mmcl: queuing unknown CIS tuple Oxannel allocated80 (2 bytes) 3.006606] sdhost: l ogbuf @ (ptrual) (ded07000) 3.013929] mmcl: queuing unknown CIS tuple Ox80 t 3.0280681 random: fast init done (3 bytes) 3.0423251 mmc1: queuing unknown CIS tuple Ox80 (3 bytes) 3.0523041 mmc 1: queuing unknown CIS tuple Ox80 (7 bytes) E 3.075678] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1) [ 3.085254] of_cfs_init 3.092400] of_cfs_init: OE 1 3.100739] Waiting for root device /deu/mmcb1k0p2... 1_ 3.1428691 mmc0: host does not support reading read-only switch, assuming wri te- enab le E 3.1479981 usb 1-1: new high-speed USB device number 2 using dwc_otg E. 3.1543381 mmc0: new high speed SDHC card at address 0002 [ 3.1569391 Indeed it is in host mode hprt0 = 00001101 [ 3.1652301 mmcblk0: mmc0:0002 NCard 14.9 GiB 3.199846] mmcblk0: p1 p2 E 3.2227781 mmc1: new high speed SDIU card at address 0001 3.2428281 EXT4-fs (mmcblkOp2): INFO : recovery required on readonly filesystem 3.2500381 EXT4-fs (mmcblkOp2): write access will be enabled during recovery 1. 1=1256311 EXT4-fs (mmcblk0p2): recovery complete [ 3.3447421 EXT4-fs (mmcblkOpZ): mounted filesystem with ordered data mode. Opts: (null) [ 3.3518861 UFS: Mounted root (ext4 filesystem) readonly on device 179:2. 3.359713] deutmpfs: mounted 3.374790] Freeing unused kernel memory : 102414 1.382363] Run /sbin/init as init process I 3.393450] Run /etc/init as init process [ 3.4013601 Run /bin/init as knit process 1.4096661 Run /bin/sh as init process 1.4183631 usb 1-1: New USB device found, tdVend_41r- 424, idProduct=9514, bcdDeuice= 2.00 I 3.4Z55551 usb 1-1: New USB device strings.. Mfr= O, Product=0, SerialNumber=0 [ 3.433660] hub 1-1:1.0: USB hub found I 3.440864] hub 1-1:1.0: 5 ports detected sh: cannot set terminal process group (-1): Inappropriate ioctl for device sh: no job control in this shell sh-5.0# L 3.767996] usb 1-1.1: new high-speed USB device number 3 using dwc_otg E. 3.8383201 usb 1-1.1: New USB deuice found, idUendor=0424, idProduct=ec00, bcdDeuice= 2.00 L 3.3054031 usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 3.915483] snsc35xx u1.0.6 4.0124371 smsc95xx 1-1.1:1.0 etb0: register 'smsc95xx' at usb -3f980000.usb -1.1, smsc95xx USD 2.0 Ethernet, b6:27:eb:Oc:69:72 4.317'3'86] usb 1-1.2: new loot-speed USB deuice number 4 using dwc_otg 4.517616] usb 1-1.2: lien USB deuice found, idUendor=04d9, idProduct=a06b, bcdDeuice= 3.01 4.525232] usb 1-1 2: New USB device strings: Plfr=1, Product-2, SerialNumber=0 4.532890] usb 1-1.2: Product= Wireless USD Deuice E 4.576755 input: HOLTEK Wireless USB Device as /deuices/platform/soc/3f900000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:04D9:06B.0001/inpuinpute 4.5404651 usb 1-1.2: Manufacturer: HOLTEN 4.643831] hid-gener lc 0003 :04D9 :(19613.0001 : input,hidrtuo0: USB HID u1.10 Keyboard [HOLTEN Wireless USD Deuice] on 04D9: I 4.7271481 input : HOLUM Wireless USB Deuic.e Mouse as /deuices/platform/soc/3f900000.usb/usb1/1-1/1-1.2/1-1.2:1.1/0003:4D9:A068.0002/input/inputi I 4.736202] input: HOME Wireless USD Deuice as /devices/platforn/soc/3f9130000.usb/usb1/1-1/1-1.2/1-1.2:1. I. 4.715148] input: HOLTEN Wireless USB Deuice Couguner Control as /deuices/platforn/soc/3f9B0000.usb/usb1/1-1,1-1.2/1-1.2:1.1/0083:04D9:S0611.0002/inpuvinput3 4.8278241 hid-generic 0003:04D9:A069.000Z: input,hiddeu96 shidraul: USB HID u1.10 House IHOLTEX Wireless USB Deulce] on usb-M900000.usb-1.2,inputl 1.1/0003:009:110611.0.92./ inpu Vinput4 t 4.818346] input.: MOLTEN Wireless USB Deuice System Control as /deuices/platforn/soc4f900000.usb/usb1/1-1/1-1.2/1-1.2:
@MartinD Ah sorry, I just realized that you said you see a Linux shell.
Well, it looks like you don't have a window manager running, so you can't use either XCB or Wayland. Those can only be used when you can see the Raspberry Pi OS desktop, for example.
Try
-platform eglfs
-
@MartinD Ah sorry, I just realized that you said you see a Linux shell.
Well, it looks like you don't have a window manager running, so you can't use either XCB or Wayland. Those can only be used when you can see the Raspberry Pi OS desktop, for example.
Try
-platform eglfs
-
@JKSH I don't know, but I would like to avoid RPi desktop as I really need fast boot (max 10 sec to my app).
./myapp -platform eglfs
returns
Could not find DRM device!
@MartinD said in Yocto - run QML app on Raspberry Pi 3:
I would like to avoid RPi desktop as I really need fast boot (max 10 sec to my app).
Then you probably want to avoid both X11/XCB and Wayland.
You'll want either eglfs (rendered using the GPU) or linuxfb (rendered using the CPU).
./myapp -platform eglfs
returns
Could not find DRM device!
So you don't have OpenGL ES enabled on your image? Try
-platform linuxfb
then (you'll also need to specify some settings -- see https://doc.qt.io/qt-6/embedded-linux.html#linuxfb ) -
@MartinD said in Yocto - run QML app on Raspberry Pi 3:
I would like to avoid RPi desktop as I really need fast boot (max 10 sec to my app).
Then you probably want to avoid both X11/XCB and Wayland.
You'll want either eglfs (rendered using the GPU) or linuxfb (rendered using the CPU).
./myapp -platform eglfs
returns
Could not find DRM device!
So you don't have OpenGL ES enabled on your image? Try
-platform linuxfb
then (you'll also need to specify some settings -- see https://doc.qt.io/qt-6/embedded-linux.html#linuxfb ) -
@JKSH -platform linuxfb doesn't work, there is no such platform.
I have no idea how to add OpenGL ES to my image (it is core-image-base with default configuration using yocto dunfell release).
@MartinD said in Yocto - run QML app on Raspberry Pi 3:
-platform linuxfb doesn't work, there is no such platform.
Right, the linuxfb plugin wasn't built.
I have no idea how to add OpenGL ES to my image (it is core-image-base with default configuration using yocto dunfell release).
You'll need to check and customize your Yocto recipes. I don't have experience with custom Yocto images, sorry. Try searching your preferred search engine for "yocto opengl es"
-
@JKSH -platform linuxfb doesn't work, there is no such platform.
I have no idea how to add OpenGL ES to my image (it is core-image-base with default configuration using yocto dunfell release).
@MartinD Hi Martin .I have just arrived in the platform .I have succesfully compiled qml for dunfell branch , running on EGLFS
-
@MartinD Hi Martin .I have just arrived in the platform .I have succesfully compiled qml for dunfell branch , running on EGLFS
@Ronel_qtmaster would you mind sharing how you got it to work?
Im having problems getting eglfs working.
Thanks -
@Ronel_qtmaster would you mind sharing how you got it to work?
Im having problems getting eglfs working.
Thanks@SuperMonkeyRules yes sure.OKay first of all in your local.conf file add:
DISTRO_FEATURES_remove = "X11 wayland"
DISTRO_FEATURES_append = " opengl"Next go in meta-qt5 folder, recipes-qt and finally qt5
create a file called qtbase_%.bbappendIn that file , write these two lines
PACKAGECONFIG_append = " linuxfb eglfs gbm gles2 kms sql-sqlite"
PACKAGECONFIG_remove = "gl tests examples"finally run bitbake and at the end you will see eglfs in the plugins folder /usr/lib/plugins
Also, i advice you to try first with core-image-sato to launch your app from the board directly but if you feel that your recipe is deploying well it is fine.
Also, i am using dunfell branch.You can add other qt modules in your local.conf by writing
IMAGE_INSTALL_append = " qtbase qtbase-plugins qtserialport qtdeclarative qtquickcontrols qtquickcontrols2 qtvirtualkeyboard qtcharts qt3d qtlocation qtgraphicaleffects qtimageformats qtsensors qtwebsockets qtmqtt qtquick3d qtscxml qtserialbus qtdatavis3d qtknx qtnetworkauth qtsystems qtwebglplugin qtremoteobjects qtmultimedia qtxmlpatterns psplash openssl openssl-bin"
-
@SuperMonkeyRules yes sure.OKay first of all in your local.conf file add:
DISTRO_FEATURES_remove = "X11 wayland"
DISTRO_FEATURES_append = " opengl"Next go in meta-qt5 folder, recipes-qt and finally qt5
create a file called qtbase_%.bbappendIn that file , write these two lines
PACKAGECONFIG_append = " linuxfb eglfs gbm gles2 kms sql-sqlite"
PACKAGECONFIG_remove = "gl tests examples"finally run bitbake and at the end you will see eglfs in the plugins folder /usr/lib/plugins
Also, i advice you to try first with core-image-sato to launch your app from the board directly but if you feel that your recipe is deploying well it is fine.
Also, i am using dunfell branch.You can add other qt modules in your local.conf by writing
IMAGE_INSTALL_append = " qtbase qtbase-plugins qtserialport qtdeclarative qtquickcontrols qtquickcontrols2 qtvirtualkeyboard qtcharts qt3d qtlocation qtgraphicaleffects qtimageformats qtsensors qtwebsockets qtmqtt qtquick3d qtscxml qtserialbus qtdatavis3d qtknx qtnetworkauth qtsystems qtwebglplugin qtremoteobjects qtmultimedia qtxmlpatterns psplash openssl openssl-bin"
@Ronel_qtmaster Thank you.
I will try once I get home. -
@Ronel_qtmaster Thank you.
I will try once I get home.@SuperMonkeyRules You're welcome