Yocto Web Browser Recipe for Rubik Pi?

Has anyone been successful in adding a web browser to their Yocto build? I keep running into issues trying to add meta-chromium, meta-firefox, or even Epiphany from the meta-gnome layer. Thanks!

1 Like

p.s. - I am building on 1.3, using qcom-multimedia-image

Could you elaborate on the specific issues you’re encountering?

My colleague appears to have attempted browser compilation and encountered similar complications, though no in-depth debugging was conducted.

The official is about to release the Alpha version of Debian. Browser validation on this platform could be attempted, though production-grade optimizations may not be anticipated in the Alpha phase.

1 Like

Sure thing @hongyang-rp. Tomorrow I will capture the log and post the errors I receive. :slightly_smiling_face:

1 Like

Just getting back to this, but here is where I have made it so far:

In my layers directory, I add:

git clone -b kirkstone-clang18 https://github.com/kraj/meta-clang
git clone -b kirkstone/rust https://git.yoctoproject.org/meta-lts-mixins
git clone -b kirkstone https://github.com/OSSystems/meta-browser.git

Then I add them into bblayers.conf:

david@ryzen:~/qualcomm$ cat build-qcom-wayland/conf/bblayers.conf
# This configuration file is dynamically generated every time
# set_bb_env.sh is sourced to set up a workspace.  DO NOT EDIT.
#--------------------------------------------------------------
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "7"
WORKSPACE := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)))}/../.."

BBPATH = "${TOPDIR}"

BBFILES = " \
"

# These layers hold recipe metadata not found in OE-core, but lack any machine or distro content
BASELAYERS ?= " \
  ${WORKSPACE}/layers/meta-openembedded/meta-filesystems \
  ${WORKSPACE}/layers/meta-openembedded/meta-gnome \
  ${WORKSPACE}/layers/meta-openembedded/meta-multimedia \
  ${WORKSPACE}/layers/meta-openembedded/meta-networking \
  ${WORKSPACE}/layers/meta-openembedded/meta-oe \
  ${WORKSPACE}/layers/meta-openembedded/meta-perl \
  ${WORKSPACE}/layers/meta-openembedded/meta-python \
  ${WORKSPACE}/layers/meta-updater \
  ${WORKSPACE}/layers/poky/meta \
  ${WORKSPACE}/layers/poky/meta-poky \
  ${WORKSPACE}/layers/meta-security \
  ${WORKSPACE}/layers/meta-security/meta-tpm \
  ${WORKSPACE}/layers/meta-selinux \
  ${WORKSPACE}/layers/meta-virtualization \
  ${WORKSPACE}/layers/meta-rust \
  ${WORKSPACE}/layers/meta-browser/meta-chromium \
  ${WORKSPACE}/layers/meta-python2 \
  ${WORKSPACE}/layers/meta-clang \
  ${WORKSPACE}/layers/meta-lts-mixins \
"

# These layers hold machine specific content, aka Board Support Packages
BSPLAYERS ?= " \
  ${WORKSPACE}/layers/meta-qt5 \
  ${WORKSPACE}/layers/meta-ros/meta-ros2-humble \
  ${WORKSPACE}/layers/meta-ros/meta-ros2 \
  ${WORKSPACE}/layers/meta-ros/meta-ros-common \
  ${WORKSPACE}/layers/meta-qcom-hwe \
  ${WORKSPACE}/layers/meta-qcom \
  ${WORKSPACE}/layers/meta-rubikpi-extras \
"

# Add your overlay layers location to EXTRALAYERS
# Make sure to have a conf/layers.conf in there
EXTRALAYERS ?= " \
  ${WORKSPACE}/layers/meta-qcom-qim-product-sdk \ 
"

BBLAYERS = " \
  ${WORKSPACE}/layers/meta-rubikpi \
  ${WORKSPACE}/layers/meta-qcom-distro \
  ${EXTRALAYERS} \
  ${BASELAYERS} \
  ${BSPLAYERS} \
"

And also need to add a few items to qcm6490-idp.conf:

david@ryzen:~/qualcomm$ cat layers/meta-rubikpi/conf/machine/qcm6490-idp.conf 
#@TYPE: Machine
#@NAME: qcm6490-idp
#@DESCRIPTION: Machine configuration for the IDP Beta Evaluation Kit (EVK), with Qualcomm QCM6490

require conf/machine/include/qcom-qcs6490.inc

MACHINE_FEATURES = "usbhost usbgadget alsa wifi bluetooth"

# This DT currently exist only as patches against linux-qcom-base recipe.
KERNEL_DEVICETREE:pn-linux-qcom-base = " \
                      qcom/qcm6490-idp.dtb \
                      "

KERNEL_DEVICETREE:pn-linux-qcom-custom = " \
                      qcom/rubikpi3.dtb \
                      "

# Additional dtbo to overylay on top of kernel devicetree files
KERNEL_TECH_DTBOS[rubikpi3] = " \
    qcm6490-graphics.dtbo qcm6490-display.dtbo \
    qcm6490-camera-idp.dtbo \
    qcm6490-video.dtbo \
    rubikpi3-overlay.dtbo \
    "

# Recipe providers of above dtbo files.
KERNEL_TECH_DTBO_PROVIDERS = "\
    cameradtb \
    qcom-displaydevicetree \
    qcom-graphicsdevicetree \
    qcom-videodtb \
    wlan-devicetree \
"
PREFERRED_VERSION_python3-pyqt5-native = "5.15.2"
PREFERRED_VERSION_python3-pyqt5 = "5.15.2"

IMAGE_INSTALL:append = " nano git qt-kiosk-browser qtwebview qtwayland qtvirtualkeyboard chromium-ozone-wayland"
INHERIT += "rm_work"

At this point, I can run a successful build, and flash with tflash -r, and the Rubik Pi boots up to the desktop like normal.

But… Attempting to launch Chromium browser then results in a , and I am still sorting out which flags to use to get it to work…

root@rubikpi:~# cat /log.txt 
sh-5.1# chromium --no-sandbox --ozone-platform=wayland --ozone-override-screen-size="1280,1024" --in-process-gpu
GBM_INFO::msmgbm_mapper(262)::gbm mapper instantiated

gbm_create_device(224): Info: backend name is: msm_drm
GBM_INFO::~msmgbm_mapper(269)::gbm mapper de-instantiated

===== BEGIN DUMP OF OVERRIDDEN SETTINGS =====
===== END DUMP OF OVERRIDDEN SETTINGS =====
GBM_INFO::msmgbm_mapper(262)::gbm mapper instantiated

gbm_create_device(224): Info: backend name is: msm_drm
GBM_INFO::~msmgbm_mapper(269)::gbm mapper de-instantiated

GBM_INFO::msmgbm_mapper(262)::gbm mapper instantiated

gbm_create_device(224): Info: backend name is: msm_drm
QUALCOMM build          : a4d6ce04e1, I363e8f8d61
Build Date              : 12/01/24
Shader Compiler Version : E031.49.02.00
Local Branch            : 
Remote Branch           : 
Remote Branch           : 
Reconstruct Branch      : 

Build Config            : G QGL_C_COMPILER_OPT 4.4.0 AArch64
Driver Path             : /usr/lib/libvulkan_adreno.so.1
Driver Version          : 0808.0
PFP                     : 0x016dc112
ME                      : 0x00000000
Application Name    : 
Application Version : 0x00000001
Engine Name         : 
Engine Version      : 0x00000001
Api Version         : 0x0040312d
GBM_INFO::~msmgbm_mapper(269)::gbm mapper de-instantiated

QUALCOMM build                   : a4d6ce04e1, I363e8f8d61
Build Date                       : 12/01/24
OpenGL ES Shader Compiler Version: 
Local Branch                     : 
Remote Branch                    : 
Remote Branch                    : 
Reconstruct Branch               : 

Build Config                     : G ESX_C_COMPILER_OPT 4.4.0 AArch64
Driver Path                      : /usr/lib/libGLESv2_adreno.so
Driver Version                   : 0808.0
Process Name                     : chromium-bin
Segmentation fault (core dumped)

Or if I drop off the last flag, and eliminate the in-process-gpu, then I get:

root@rubikpi:~# cat /log2.txt                                                                                                                                                                         
sh-5.1# chromium --no-sandbox --ozone-platform=wayland --ozone-override-screen-size="1280,1024"
GBM_INFO::msmgbm_mapper(262)::gbm mapper instantiated

gbm_create_device(224): Info: backend name is: msm_drm
GBM_INFO::~msmgbm_mapper(269)::gbm mapper de-instantiated

GBM_INFO::msmgbm_mapper(262)::gbm mapper instantiated

gbm_create_device(224): Info: backend name is: msm_drm
GBM_INFO::~msmgbm_mapper(269)::gbm mapper de-instantiated

===== BEGIN DUMP OF OVERRIDDEN SETTINGS =====
===== END DUMP OF OVERRIDDEN SETTINGS =====
GBM_INFO::msmgbm_mapper(262)::gbm mapper instantiated

gbm_create_device(224): Info: backend name is: msm_drm
GBM_INFO::~msmgbm_mapper(269)::gbm mapper de-instantiated

GBM_INFO::msmgbm_mapper(262)::gbm mapper instantiated

gbm_create_device(224): Info: backend name is: msm_drm
QUALCOMM build          : a4d6ce04e1, I363e8f8d61
Build Date              : 12/01/24
Shader Compiler Version : E031.49.02.00
Local Branch            : 
Remote Branch           : 
Remote Branch           : 
Reconstruct Branch      : 

Build Config            : G QGL_C_COMPILER_OPT 4.4.0 AArch64
Driver Path             : /usr/lib/libvulkan_adreno.so.1
Driver Version          : 0808.0
PFP                     : 0x016dc112
ME                      : 0x00000000
Application Name    : 
Application Version : 0x00000001
Engine Name         : 
Engine Version      : 0x00000001
Api Version         : 0x0040312d
GBM_INFO::~msmgbm_mapper(269)::gbm mapper de-instantiated

Create: Error: EGL native display handle is NULL 

QUALCOMM build                   : a4d6ce04e1, I363e8f8d61
Build Date                       : 12/01/24
OpenGL ES Shader Compiler Version: 
Local Branch                     : 
Remote Branch                    : 
Remote Branch                    : 
Reconstruct Branch               : 

Build Config                     : G ESX_C_COMPILER_OPT 4.4.0 AArch64
Driver Path                      : /usr/lib/libGLESv2_adreno.so
Driver Version                   : 0808.0
Process Name                     : chromium-bin
[4172:4172:0329/192025.593722:ERROR:wayland_event_watcher.cc(47)] libwayland: wl_display#1: error 1: invalid arguments for xdg_toplevel@27.resize

Trace/breakpoint trap (core dumped)

So I need to keep expertiment, but I am getting closer.

1 Like

Sorry for the late reply. I have a general understanding of the problem;

May I ask if your compilation went smoothly;

I want to reproduce the problem according to the steps you provided, but after compiling multiple times, I have been stuck in this step;

It seems to be a network issue, I am trying to find a solution to it.

1 Like

Yes, I have been stuck like that before as well HY, I had to reboot and restart the build to proceed.

1 Like

Qualcomm has released a new version that supports browsers, and we plan to upgrade to this version in the near future.

Oh, this is excellent news HY, thanks! I will wait for this update, no problem at all.

(I do see in that note that they have upgraded to Scarthgap, which is also good news, but I guess your meta layers will need to be checked because right now they are set to Kirkstone: meta-rubikpi/conf/layer.conf at main · rubikpi-ai/meta-rubikpi · GitHub )

:slightly_smiling_face:

1 Like