SlideShare a Scribd company logo
static void
_f_do_barnacle_install_properties(GObjectClass
*gobject_class)
{
GParamSpec *pspec;
/* Party code attribute */
pspec = g_param_spec_uint64
(F_DO_BARNACLE_CODE,
"Barnacle code.",
"Barnacle code",
0,
G_MAXUINT64,
G_MAXUINT64 /*
default value */,
G_PARAM_READABLE
| G_PARAM_WRITABLE |
G_PARAM_PRIVATE);
g_object_class_install_property (gobject_class,
F_DO_BARNACLE_PROP_CODE,
Jacobo Aragunde Pérez
http://blogs.igalia.com/jaragunde
@JacoboAragunde
Building Chromium on an
embedded platform using
Ozone-Wayland
● Open Source experts and consultants
● 14 years of experience
● Important contributions to:
● Client-side web tecnologies: WebKit,
Blink/Chromium, Servo
● Graphics: Wayland, Mesa
● Compilers: V8, JavaScriptCore, Guile
● Multimedia: GStreamer, Grilo
● ...
Introduction
Ingredients
● Renesas R-Car M2
Porter
● Recipes to build a
Weston image
● Meta-browser recipes
to build Chromium
● Computing power
● Patience!
Layers
● Poky
● meta-openembedded
● meta-linaro
● meta-renesas
● meta-browser
BBLAYERS ?= " 
  ${TOPDIR}/../poky/meta 
  ${TOPDIR}/../poky/meta­yocto 
  ${TOPDIR}/../poky/meta­yocto­bsp 
  ${TOPDIR}/../meta­renesas/meta­rcar­gen2 
  ${TOPDIR}/../meta­renesas 
  ${TOPDIR}/../meta­openembedded/meta­oe 
  ${TOPDIR}/../meta­openembedded/meta­multimedia 
  ${TOPDIR}/../meta­linaro/meta­linaro­toolchain 
  ${TOPDIR}/../meta­browser 
  "
local.conf
● Use local-wayland.conf file for porter board
● Add Chromium to the list of software in the
image
● IMAGE_INSTALL_append = " chromium"
Our tools
Devshell
● devshell opens a shell where all the OE
variables and recipe defines are set.
● you need the xterm package around
● depending on your environment, you may need
export DISPLAY=:0.0
Devshell: usage
● bitbake ­c devshell <package name>
gdbserver
● Allows to debug a piece of software that is
running on a remote machine
● Very useful for development on embedded
● gdb difficult or impossible to run there
– Memory, processing power, disk space constraints
– 30 minutes to load chromium symbols in the porter!
gdbserver: requirements
● Gdbserver available in the image for the target
board
● Add to local.conf:
– IMAGE_INSTALL_append = " ... gdbserver"
● On the build/host machine:
● apt­get install gdb­multiarch
gdbserver: usage
● On the target:
● $ gdbserver 0.0.0.0:15000 <program>
● $ gdbserver ­­attach 0.0.0.0:15000 <pid>
● On the build/host machine:
● $ cd ${YOCTOBUILDIR}
● $ gdb­multiarch tmp/work/cortexa15hf­vfp­neon­poky­
linux­gnueabi/<module>/image/<path­to­exec>
● (gdb) set sysroot tmp/sysroots/porter
● (gdb) set arch armv5
● (gdb) target remote ${ip.address.of.board}:15000
● (gdb) run | continue
Chromium --gpu-startup-dialog
● Multi-process architecture
● Great for user experience and security
● Extra difficulty to debug
● Flag --gpu-startup-dialog to debug the GPU
process
--gpu-startup-dialog: usage
● On the target:
● $ google­chrome ­­gpu­startup­dialog
Gpu (816) paused waiting for debugger to attach. Send SIGUSR1 
to unpause.
● $ gdbserver ­­attach 0.0.0.0:15000 816
● On the build/host machine:
● $ cd ${YOCTOBUILDIR}
● $ gdb­multiarch tmp/work/cortexa15hf­vfp­neon­poky­linux­
gnueabi/chromium/46.0.2459.0­r0/src/out/Release/chrome
● (gdb) set sysroot tmp/sysroots/porter
● (gdb) set arch armv5
● (gdb) target remote 192.168.10.135:15000
● (gdb) signal SIGUSR1
Getting in trouble…
and out of it
Missing gnome-keyring
● Error:
| No package 'gnome­keyring­1' found
| gyp: Call to 'pkg­config ­­cflags gnome­keyring­1'
  returned exit status 1.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is
  located at .../log.do_configure.17258)
ERROR: Task 5 (.../chromium_46.0.2459.0.bb,
  do_configure) failed with exit code '1'
Missing gnome-keyring
● Workaround: add to local.conf:
● IMAGE_INSTALL_append = " chromium libgnome­keyring"
● Solution: check dependencies in Chromium recipe:
● In chromium_40.0.2214.91.bb:
DESCRIPTION = "Chromium browser"
DEPENDS += "libgnome­keyring"
include chromium.inc
● In chromium.inc:
DEPENDS = "xz­native pciutils pulseaudio cairo nss zlib­
native libav cups ninja­native gconf libexif pango 
libdrm"
● Wrong include, libgnome-keyring dependency gets overwritten!
Missing gnome-keyring
● Patch: Include chromium.inc before
appending to DEPENDS
­­­ a/recipes­browser/chromium/chromium_40.0.2214.91.bb
+++ b/recipes­browser/chromium/chromium_40.0.2214.91.bb
@@ ­16,9 +16,9 @@
 #    * CHROMIUM_WAYLAND_DEPENDS
 #    * CHROMIUM_WAYLAND_GYP_DEFINES
 
+include chromium.inc
 DESCRIPTION = "Chromium browser"
 DEPENDS += "libgnome­keyring"
­include chromium.inc
 SRC_URI = "
         .../chromium­browser­official/${P}.tar.xz 
         file://include.gypi 
Missing gnome-keyring
● New error:
ERROR: Nothing PROVIDES 'libgnome­keyring' (but
 .../chromium_40.0.2214.91.bb DEPENDS on or otherwise
 requires it)
NOTE: Runtime target 'chromium' is unbuildable,
 removing...
Missing or unbuildable dependency chain was:
 ['chromium', 'libgnome­keyring']
ERROR: Required build target 'core­image­weston' has
 no buildable providers.
Missing or unbuildable dependency chain was:
 ['core­image­weston', 'chromium', 'libgnome­keyring']
Missing gnome-keyring
● How to get libgnome-keyring?
$ find ­name libgnome­keyring*
./meta­openembedded/meta­gnome/recipes­
gnome/gnome­keyring/libgnome­keyring_2.32.0.bb
● Solution: add meta-gnome layer:
BBLAYERS ?= " 
  ${TOPDIR}/../poky/meta 
  ${TOPDIR}/../poky/meta­yocto 
  ${TOPDIR}/../poky/meta­yocto­bsp 
  ${TOPDIR}/../meta­renesas/meta­rcar­gen2 
  ${TOPDIR}/../meta­renesas 
  ${TOPDIR}/../meta­openembedded/meta­oe 
  ${TOPDIR}/../meta­openembedded/meta­multimedia 
  ${TOPDIR}/../meta­linaro/meta­linaro­toolchain 
  ${TOPDIR}/../meta­browser 
  ${TOPDIR}/../meta­openembedded/meta­gnome 
  "
Problem building libglu
● Error:
| .../tmp/sysroots/x86_64­linux/usr/libexec/
  cortexa15hf­vfp­neon­poky­linux­gnueabi/gcc/
  arm­poky­linux­gnueabi/4.8.3/ld: cannot find ­lGL
| collect2: error: ld returned 1 exit status
| Makefile:1041: recipe for target 'libGLU.la' failed
| make: *** [libGLU.la] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is
  located at .../log.do_compile.27132)
Problem building libglu
● Cause: libglu, required by dependencies, depends on full GL,
which is not available in the device.
● Dependency chain when X11 is enabled:
● chromium → libav → libsdl → libglu → GL
$ cat ./meta/recipes­multimedia/libav/libav.inc
...
PACKAGECONFIG[x11] = "­­enable­x11grab,­­disable­
x11grab,virtual/libx11 libxfixes libxext xproto 
virtual/libsdl"
● Workaround: add to local.conf:
● DISTRO_FEATURES_remove = " x11"
Problem building libglu
● Solution: patch recipe, glu was not really
necessary to build libsdl
­­­ a/meta/recipes­graphics/libsdl/libsdl_1.2.15.bb
+++ b/meta/recipes­graphics/libsdl/libsdl_1.2.15.bb
@@ ­13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b827
 PROVIDES = "virtual/libsdl"
 
 DEPENDS = "${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} 
­ ${@base_contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl libglu', '', d)} 
+ ${@base_contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} 
  ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxext libxrandr libxr
  tslib"
Problem building libglu
● Proper patch is already upstream
commit 0e5a9114f58828058595d773e5b97771c88f7be8
Author: Robert Yang <liezhi.yang@windriver.com>
Date:   Tue Sep 15 19:28:46 2015 ­0700
    libsdl: depends on libglu when both x11 and opengl
    
    The libglu requires both opengl (depends on
    virtual/libgl) and x11
    (needs libGL.so which is provided by mesa when x11 in
    DISTRO_FEATURES),
    so let libsdl depends on libglu when both x11 and
    opengl in
    DISTRO_FEATURES.
Missing includes in v8
● Error:
| FAILED: g++  ­MMD ­MF obj.host/v8/src/base/v8_libbase.bits.o.d
  ­D... ­W... ­f... ­pipe ­m32 ­O3 ­std=gnu++11
  ­I../../v8 ­Igen ­­param=ssp­buffer­size=4 ­pthread
  ­c ../../v8/src/base/bits.cc
  ­o obj.host/v8/src/base/v8_libbase.bits.o
| In file included from /usr/include/bits/errno.h:24:0,
|                  ...
|                  from ../../v8/src/base/bits.cc:5:
| /usr/include/linux/errno.h:1:23: fatal error: asm/errno.h:
  No such file or directory
|  #include <asm/errno.h>
|                        ^
| compilation terminated.
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at
  .../log.do_compile.25688)
Missing includes in v8
● Check what is happening with devshell:
● $ bitbake ­c devshell chromium
● # whereis g++
g++: /usr/bin/g++
● # env
CPP=arm­poky­linux­gnueabi­gcc ­E –sysroot=.../build/tmp/sysroots/porter  ­march=armv7­a 
­mthumb­interwork ­mfloat­abi=hard ­mfpu=neon ­mtune=cortex­a15
PATH=.../build/tmp/sysroots/x86_64­linux/usr/bin/python­
native:.../poky/scripts:.../build/tmp/sysroots/x86_64­linux/usr/bin/cortexa15hf­vfp­neon­
poky­linux­
gnueabi:.../build/tmp/sysroots/porter/usr/bin/crossscripts:.../build/tmp/sysroots/x86_64­
linux/usr/sbin:.../build/tmp/sysroots/x86_64­linux/usr/bin:.../build/tmp/sysroots/x86_64­
linux/sbin:.../build/tmp/sysroots/x86_64­
linux/bin:.../poky/scripts:.../poky/bitbake/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games
:/usr/games
CXX=arm­poky­linux­gnueabi­g++  ­march=armv7­a ­mthumb­interwork ­mfloat­abi=hard ­mfpu=neon 
­mtune=cortex­a15 –sysroot=.../build/tmp/sysroots/porter
CC=arm­poky­linux­gnueabi­gcc  ­march=armv7­a ­mthumb­interwork ­mfloat­abi=hard ­mfpu=neon 
­mtune=cortex­a15 –sysroot=.../build/tmp/sysroots/porter
● # whereis arm­poky­linux­gnueabi­g++
arm­poky­linux­gnueabi­g++: .../build/tmp/sysroots/x86_64­linux/usr/bin/cortexa15hf­vfp­neon­
poky­linux­gnueabi/arm­poky­linux­gnueabi­g++
Missing includes in v8
● Problem: wrong compiler being used
● Calling g++ instead of $CXX
● $CXX points to arm­poky­linux­gnueabi­g++
inside the sysroot
● g++ is the system compiler
● Workaround:
● apt­get install gcc­multilib g++­multilib
● Proper solution would be fixing the recipe!
Cannot open libGLESv2.so
● Error:
[display.cc (117)] Failed to load GLES 
library: libGLESv2.so.2: cannot open shared 
object file: no such file or directory
● Check contents in /usr/lib
● libGLESv2.so is there, symlinks with version numbers are
not
● Workaround: manually add a symlink
cd /usr/lib
ln ­s libGLESv2.so libGLESv2.so.2
Cannot open libGLESv2.so
● Solution: patch recipe
­­­ a/meta­rcar­gen2/recipes­graphics/gles­module/gles­user­module.bb
+++ b/meta­rcar­gen2/recipes­graphics/gles­module/gles­user­module.bb
@@ ­65,7 +65,10 @@ do_install() {
            ${D}/${sysconfdir}/powervr.ini
         fi
     fi
­} 
+
+    # Fix symlink
+    cd ${D}/usr/lib && ln ­s libGLESv2.so libGLESv2.so.2
+}
 
 PACKAGES = "
     ${PN} 
Error in egl.c
● Error:
egl.c:228: eglQueryString: Assertion `ret != ((void 
*)0)' failed.
● Check code flow with the debugger
● Set breakpoint at egl.c:228
224     ret = _eglQueryString(dpy, name);
225
226 #ifdef WANT_WAYLAND
227     if (name == EGL_EXTENSIONS) {
228         assert(ret != NULL);
229         …
● Check backtrace to know where we are: libegl
Error in egl.c
● Solution: replace the assert with a softer if
sentence
● Check solution with original developers,
share upstream
­­­ a/egl.c
+++ b/egl.c
@@ ­224,8 +223,7 @@ const char *eglQueryString(EGLDisplay dpy, EGLint name)
        ret = _eglQueryString(dpy, name);
 
 #ifdef WANT_WAYLAND
­       if (name == EGL_EXTENSIONS) {
­               assert(ret != NULL);
+       if (ret && name == EGL_EXTENSIONS) {
 
                if (!_eglextstr) {
                        _eglextstr = calloc(1, strlen(ret) + strlen(EGL_WL_EXT
Error in egl.c
● Solution: replace the assert with a softer
if sentence
● Modify libegl recipe:
­­­ a/meta­rcar­gen2/recipes­graphics/wayland/libegl.bb
+++ b/meta­rcar­gen2/recipes­graphics/wayland/libegl.bb
@@ ­5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://egl.c;beginline=5;endline=15;md5=36
 COMPATIBLE_MACHINE = "(r8a7790|r8a7791|r8a7793|r8a7794)"
 
 PROVIDES = "${@base_contains("DISTRO_FEATURES", "wayland", "virtual/egl", "",
­SRCREV = "ee4bce93878d02a144ae6ebfba1eff28fe9b4442"
+SRCREV = "02b559098042a0aeb9ac63eece547868a140fa46"
Missing certificates
Missing certificates
● Solution: add ca-certificates package to the
image
● IMAGE_INSTALL_append = " chromium 
ca­certificates"
Finally, it's working!
Summary
Contributions upstream
● Contributions to meta-browser
● 4b27058 chromium: Include chromium.inc before
appending to DEPENDS
● 6ae140b chromium: Rework the evaluation of the
Wayland feature.
● 65d7e9f chromium: Clean the definitions of some
ozone-wayland variables.
● 556b41a chromium: Allow to build in Debug mode.
Contributions upstream
● Contributions to libegl
● ce7caca Don't assert when eglQueryString() returns
null.
● Contributions to meta-renesas
● rcar-gen2: libegl: Update SRCREV.
● rcar-gen2: gles-user-module: Add symlink for the
GLESv2 library.
Contributions upstream
● Contributions to Ozone-Wayland
● a12c78e Add support for receiving drag data from
external processes
● 5b0b336 Add an error message when running with
software rendering
● 3bc3655 tools/jhbuild: moduleset requires the full path
● b0988bb WindowManagerWayland: guard against
invalid window handles
● Some additional commits and more under
development now
What's next
● Build on top of meta-ivi
● Run on the GENIVI Demo Platform
● Continue with the development of Ozone-
Wayland
Thank you!
© 2015 Igalia, S.L.

More Related Content

PDF
Rhel8 Beta - Halifax RHUG
PDF
Javascript in linux desktop (ICOS ver.)
PDF
GUI Programming with Perl / GTK
PDF
Android Platform Debugging and Development
PDF
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
PDF
Openwrt startup
PDF
Android Platform Debugging and Development
PDF
Inside Android's UI / ABS 2013
Rhel8 Beta - Halifax RHUG
Javascript in linux desktop (ICOS ver.)
GUI Programming with Perl / GTK
Android Platform Debugging and Development
Coscup x ruby conf tw 2021 google cloud buildpacks 剖析與實踐
Openwrt startup
Android Platform Debugging and Development
Inside Android's UI / ABS 2013

What's hot (15)

PDF
Google App Engine: Basic
PDF
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
PDF
Embedded Android Workshop with Marshmallow
PDF
How to Contribute to GStreamer
PDF
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
PDF
State of the Art OpenGL and Qt
 
PDF
Docker presentation
PDF
Introduction to QtWebKit
PDF
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...
ODP
Git dvcs and Information Security Review
PDF
OSDC 2014: Christian Patsch - System Orchestration with Capistrano and Puppet
PDF
Why use JavaScript in Hardware? GoTo Conf - Berlin
PDF
Reaching the multimedia web from embedded platforms with WPEWebkit
PDF
Rest, sockets em golang
PDF
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
Google App Engine: Basic
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
Embedded Android Workshop with Marshmallow
How to Contribute to GStreamer
Debug C/C++ Programs More Comfortably @ 2014.12.14 Trace Code Meetup
State of the Art OpenGL and Qt
 
Docker presentation
Introduction to QtWebKit
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...
Git dvcs and Information Security Review
OSDC 2014: Christian Patsch - System Orchestration with Capistrano and Puppet
Why use JavaScript in Hardware? GoTo Conf - Berlin
Reaching the multimedia web from embedded platforms with WPEWebkit
Rest, sockets em golang
Maximize The Performance of HTML5 Video in RPI2 (Embedded Linux Conference 2016)
Ad

Viewers also liked (18)

PDF
Android Chromium Rendering Pipeline
PDF
Mobile Browser Internal (Blink Rendering Engine)
PPTX
Chromium ppt
PDF
BKK16-209 Chromium with V4L2 playback - is it ready today?
PDF
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
PDF
HKG15-407: EME implementation in Chromium: Linaro Clear Key
PDF
Chromium OS Introduction
PDF
BUD17-DF15 - Optimized Android N MR1 + 4.9 Kernel
PPTX
Borel azote
PDF
PPTX
Serveur http embarqué dans une application Android. Usages et implémentations
PPT
TURBINE FUNDAMENTAL
PDF
Chromium ui framework(shared)
PDF
Chromium Contributing Explained: Writing Good Patches
PDF
Clean Sky Projects on the More Electric Aircraft
PDF
Thomann2015 dissertation
PDF
Hitea Press Article April 2014
Android Chromium Rendering Pipeline
Mobile Browser Internal (Blink Rendering Engine)
Chromium ppt
BKK16-209 Chromium with V4L2 playback - is it ready today?
Ozone-Wayland Support in Chromium (GENIVI 13th All Member Meeting & AMM Open ...
HKG15-407: EME implementation in Chromium: Linaro Clear Key
Chromium OS Introduction
BUD17-DF15 - Optimized Android N MR1 + 4.9 Kernel
Borel azote
Serveur http embarqué dans une application Android. Usages et implémentations
TURBINE FUNDAMENTAL
Chromium ui framework(shared)
Chromium Contributing Explained: Writing Good Patches
Clean Sky Projects on the More Electric Aircraft
Thomann2015 dissertation
Hitea Press Article April 2014
Ad

Similar to Building Chromium on an Embedded Platform using Ozone-Wayland Layer (GENIVI 13th All Member Meeting & AMM Open Days) (20)

PDF
005 skyeye
PDF
Build your own embedded linux distributions by yocto project
PDF
An Introduction to the Yocto Embedded Framework 2018
 
PDF
Project ACRN Yocto Project meta-acrn layer introduction
PDF
LCA14: LCA14-412: GPGPU on ARM SoC session
PDF
LAS16-403: GDB Linux Kernel Awareness
PDF
LAS16-403 - GDB Linux Kernel Awareness
ODT
Cross-compilation native sous android
PDF
Yocto: Training in English
PPTX
Effective Linux Development Using PetaLinux Tools 2017.4
PDF
Jagan Teki - U-boot from scratch
PDF
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
PDF
ELC-E Linux Awareness
PDF
Android Things Internals
PDF
Android Things: Android for IoT
PDF
Yocto Project : Custom Embedded Linux Distribution
PDF
Android 5.0 Lollipop platform change investigation report
PDF
[Webinar] An Introduction to the Yocto Embedded Framework
 
PDF
The Yocto Project
PDF
Android Things Internals
005 skyeye
Build your own embedded linux distributions by yocto project
An Introduction to the Yocto Embedded Framework 2018
 
Project ACRN Yocto Project meta-acrn layer introduction
LCA14: LCA14-412: GPGPU on ARM SoC session
LAS16-403: GDB Linux Kernel Awareness
LAS16-403 - GDB Linux Kernel Awareness
Cross-compilation native sous android
Yocto: Training in English
Effective Linux Development Using PetaLinux Tools 2017.4
Jagan Teki - U-boot from scratch
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
ELC-E Linux Awareness
Android Things Internals
Android Things: Android for IoT
Yocto Project : Custom Embedded Linux Distribution
Android 5.0 Lollipop platform change investigation report
[Webinar] An Introduction to the Yocto Embedded Framework
 
The Yocto Project
Android Things Internals

More from Igalia (20)

PDF
Life of a Kernel Bug Fix
PDF
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
PDF
Advancing WebDriver BiDi support in WebKit
PDF
Jumping Over the Garden Wall - WPE WebKit on Android
PDF
Collective Funding, Governance and Prioritiation of Browser Engine Projects
PDF
Don't let your motivation go, save time with kworkflow
PDF
Solving the world’s (localization) problems
PDF
The Whippet Embeddable Garbage Collection Library
PDF
Nobody asks "How is JavaScript?"
PDF
Getting more juice out from your Raspberry Pi GPU
PDF
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
PDF
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
PDF
CSS :has() Unlimited Power
PDF
Device-Generated Commands in Vulkan
PDF
Current state of Lavapipe: Mesa's software renderer for Vulkan
PDF
Vulkan Video is Open: Application showcase
PDF
Scheme on WebAssembly: It is happening!
PDF
EBC - A new backend compiler for etnaviv
PDF
RISC-V LLVM State of the Union
PDF
Device-Generated Commands in Vulkan
Life of a Kernel Bug Fix
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
Advancing WebDriver BiDi support in WebKit
Jumping Over the Garden Wall - WPE WebKit on Android
Collective Funding, Governance and Prioritiation of Browser Engine Projects
Don't let your motivation go, save time with kworkflow
Solving the world’s (localization) problems
The Whippet Embeddable Garbage Collection Library
Nobody asks "How is JavaScript?"
Getting more juice out from your Raspberry Pi GPU
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
CSS :has() Unlimited Power
Device-Generated Commands in Vulkan
Current state of Lavapipe: Mesa's software renderer for Vulkan
Vulkan Video is Open: Application showcase
Scheme on WebAssembly: It is happening!
EBC - A new backend compiler for etnaviv
RISC-V LLVM State of the Union
Device-Generated Commands in Vulkan

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Spectroscopy.pptx food analysis technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Big Data Technologies - Introduction.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Chapter 3 Spatial Domain Image Processing.pdf
Encapsulation_ Review paper, used for researhc scholars
Dropbox Q2 2025 Financial Results & Investor Presentation
Network Security Unit 5.pdf for BCA BBA.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Spectroscopy.pptx food analysis technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Unlocking AI with Model Context Protocol (MCP)
Big Data Technologies - Introduction.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”

Building Chromium on an Embedded Platform using Ozone-Wayland Layer (GENIVI 13th All Member Meeting & AMM Open Days)

  • 1. static void _f_do_barnacle_install_properties(GObjectClass *gobject_class) { GParamSpec *pspec; /* Party code attribute */ pspec = g_param_spec_uint64 (F_DO_BARNACLE_CODE, "Barnacle code.", "Barnacle code", 0, G_MAXUINT64, G_MAXUINT64 /* default value */, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_PRIVATE); g_object_class_install_property (gobject_class, F_DO_BARNACLE_PROP_CODE, Jacobo Aragunde Pérez http://blogs.igalia.com/jaragunde @JacoboAragunde Building Chromium on an embedded platform using Ozone-Wayland
  • 2. ● Open Source experts and consultants ● 14 years of experience ● Important contributions to: ● Client-side web tecnologies: WebKit, Blink/Chromium, Servo ● Graphics: Wayland, Mesa ● Compilers: V8, JavaScriptCore, Guile ● Multimedia: GStreamer, Grilo ● ...
  • 4. Ingredients ● Renesas R-Car M2 Porter ● Recipes to build a Weston image ● Meta-browser recipes to build Chromium ● Computing power ● Patience!
  • 5. Layers ● Poky ● meta-openembedded ● meta-linaro ● meta-renesas ● meta-browser BBLAYERS ?= "    ${TOPDIR}/../poky/meta    ${TOPDIR}/../poky/meta­yocto    ${TOPDIR}/../poky/meta­yocto­bsp    ${TOPDIR}/../meta­renesas/meta­rcar­gen2    ${TOPDIR}/../meta­renesas    ${TOPDIR}/../meta­openembedded/meta­oe    ${TOPDIR}/../meta­openembedded/meta­multimedia    ${TOPDIR}/../meta­linaro/meta­linaro­toolchain    ${TOPDIR}/../meta­browser    "
  • 6. local.conf ● Use local-wayland.conf file for porter board ● Add Chromium to the list of software in the image ● IMAGE_INSTALL_append = " chromium"
  • 8. Devshell ● devshell opens a shell where all the OE variables and recipe defines are set. ● you need the xterm package around ● depending on your environment, you may need export DISPLAY=:0.0
  • 10. gdbserver ● Allows to debug a piece of software that is running on a remote machine ● Very useful for development on embedded ● gdb difficult or impossible to run there – Memory, processing power, disk space constraints – 30 minutes to load chromium symbols in the porter!
  • 11. gdbserver: requirements ● Gdbserver available in the image for the target board ● Add to local.conf: – IMAGE_INSTALL_append = " ... gdbserver" ● On the build/host machine: ● apt­get install gdb­multiarch
  • 12. gdbserver: usage ● On the target: ● $ gdbserver 0.0.0.0:15000 <program> ● $ gdbserver ­­attach 0.0.0.0:15000 <pid> ● On the build/host machine: ● $ cd ${YOCTOBUILDIR} ● $ gdb­multiarch tmp/work/cortexa15hf­vfp­neon­poky­ linux­gnueabi/<module>/image/<path­to­exec> ● (gdb) set sysroot tmp/sysroots/porter ● (gdb) set arch armv5 ● (gdb) target remote ${ip.address.of.board}:15000 ● (gdb) run | continue
  • 13. Chromium --gpu-startup-dialog ● Multi-process architecture ● Great for user experience and security ● Extra difficulty to debug ● Flag --gpu-startup-dialog to debug the GPU process
  • 14. --gpu-startup-dialog: usage ● On the target: ● $ google­chrome ­­gpu­startup­dialog Gpu (816) paused waiting for debugger to attach. Send SIGUSR1  to unpause. ● $ gdbserver ­­attach 0.0.0.0:15000 816 ● On the build/host machine: ● $ cd ${YOCTOBUILDIR} ● $ gdb­multiarch tmp/work/cortexa15hf­vfp­neon­poky­linux­ gnueabi/chromium/46.0.2459.0­r0/src/out/Release/chrome ● (gdb) set sysroot tmp/sysroots/porter ● (gdb) set arch armv5 ● (gdb) target remote 192.168.10.135:15000 ● (gdb) signal SIGUSR1
  • 17. Missing gnome-keyring ● Workaround: add to local.conf: ● IMAGE_INSTALL_append = " chromium libgnome­keyring" ● Solution: check dependencies in Chromium recipe: ● In chromium_40.0.2214.91.bb: DESCRIPTION = "Chromium browser" DEPENDS += "libgnome­keyring" include chromium.inc ● In chromium.inc: DEPENDS = "xz­native pciutils pulseaudio cairo nss zlib­ native libav cups ninja­native gconf libexif pango  libdrm" ● Wrong include, libgnome-keyring dependency gets overwritten!
  • 18. Missing gnome-keyring ● Patch: Include chromium.inc before appending to DEPENDS ­­­ a/recipes­browser/chromium/chromium_40.0.2214.91.bb +++ b/recipes­browser/chromium/chromium_40.0.2214.91.bb @@ ­16,9 +16,9 @@  #    * CHROMIUM_WAYLAND_DEPENDS  #    * CHROMIUM_WAYLAND_GYP_DEFINES   +include chromium.inc  DESCRIPTION = "Chromium browser"  DEPENDS += "libgnome­keyring" ­include chromium.inc  SRC_URI = "          .../chromium­browser­official/${P}.tar.xz           file://include.gypi 
  • 19. Missing gnome-keyring ● New error: ERROR: Nothing PROVIDES 'libgnome­keyring' (but  .../chromium_40.0.2214.91.bb DEPENDS on or otherwise  requires it) NOTE: Runtime target 'chromium' is unbuildable,  removing... Missing or unbuildable dependency chain was:  ['chromium', 'libgnome­keyring'] ERROR: Required build target 'core­image­weston' has  no buildable providers. Missing or unbuildable dependency chain was:  ['core­image­weston', 'chromium', 'libgnome­keyring']
  • 20. Missing gnome-keyring ● How to get libgnome-keyring? $ find ­name libgnome­keyring* ./meta­openembedded/meta­gnome/recipes­ gnome/gnome­keyring/libgnome­keyring_2.32.0.bb ● Solution: add meta-gnome layer: BBLAYERS ?= "    ${TOPDIR}/../poky/meta    ${TOPDIR}/../poky/meta­yocto    ${TOPDIR}/../poky/meta­yocto­bsp    ${TOPDIR}/../meta­renesas/meta­rcar­gen2    ${TOPDIR}/../meta­renesas    ${TOPDIR}/../meta­openembedded/meta­oe    ${TOPDIR}/../meta­openembedded/meta­multimedia    ${TOPDIR}/../meta­linaro/meta­linaro­toolchain    ${TOPDIR}/../meta­browser    ${TOPDIR}/../meta­openembedded/meta­gnome    "
  • 21. Problem building libglu ● Error: | .../tmp/sysroots/x86_64­linux/usr/libexec/   cortexa15hf­vfp­neon­poky­linux­gnueabi/gcc/   arm­poky­linux­gnueabi/4.8.3/ld: cannot find ­lGL | collect2: error: ld returned 1 exit status | Makefile:1041: recipe for target 'libGLU.la' failed | make: *** [libGLU.la] Error 1 | ERROR: oe_runmake failed | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_compile (log file is   located at .../log.do_compile.27132)
  • 22. Problem building libglu ● Cause: libglu, required by dependencies, depends on full GL, which is not available in the device. ● Dependency chain when X11 is enabled: ● chromium → libav → libsdl → libglu → GL $ cat ./meta/recipes­multimedia/libav/libav.inc ... PACKAGECONFIG[x11] = "­­enable­x11grab,­­disable­ x11grab,virtual/libx11 libxfixes libxext xproto  virtual/libsdl" ● Workaround: add to local.conf: ● DISTRO_FEATURES_remove = " x11"
  • 23. Problem building libglu ● Solution: patch recipe, glu was not really necessary to build libsdl ­­­ a/meta/recipes­graphics/libsdl/libsdl_1.2.15.bb +++ b/meta/recipes­graphics/libsdl/libsdl_1.2.15.bb @@ ­13,7 +13,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b827  PROVIDES = "virtual/libsdl"    DEPENDS = "${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}  ­ ${@base_contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl libglu', '', d)}  + ${@base_contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)}    ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxext libxrandr libxr   tslib"
  • 24. Problem building libglu ● Proper patch is already upstream commit 0e5a9114f58828058595d773e5b97771c88f7be8 Author: Robert Yang <liezhi.yang@windriver.com> Date:   Tue Sep 15 19:28:46 2015 ­0700     libsdl: depends on libglu when both x11 and opengl          The libglu requires both opengl (depends on     virtual/libgl) and x11     (needs libGL.so which is provided by mesa when x11 in     DISTRO_FEATURES),     so let libsdl depends on libglu when both x11 and     opengl in     DISTRO_FEATURES.
  • 25. Missing includes in v8 ● Error: | FAILED: g++  ­MMD ­MF obj.host/v8/src/base/v8_libbase.bits.o.d   ­D... ­W... ­f... ­pipe ­m32 ­O3 ­std=gnu++11   ­I../../v8 ­Igen ­­param=ssp­buffer­size=4 ­pthread   ­c ../../v8/src/base/bits.cc   ­o obj.host/v8/src/base/v8_libbase.bits.o | In file included from /usr/include/bits/errno.h:24:0, |                  ... |                  from ../../v8/src/base/bits.cc:5: | /usr/include/linux/errno.h:1:23: fatal error: asm/errno.h:   No such file or directory |  #include <asm/errno.h> |                        ^ | compilation terminated. | ninja: build stopped: subcommand failed. | WARNING: exit code 1 from a shell command. | ERROR: Function failed: do_compile (log file is located at   .../log.do_compile.25688)
  • 26. Missing includes in v8 ● Check what is happening with devshell: ● $ bitbake ­c devshell chromium ● # whereis g++ g++: /usr/bin/g++ ● # env CPP=arm­poky­linux­gnueabi­gcc ­E –sysroot=.../build/tmp/sysroots/porter  ­march=armv7­a  ­mthumb­interwork ­mfloat­abi=hard ­mfpu=neon ­mtune=cortex­a15 PATH=.../build/tmp/sysroots/x86_64­linux/usr/bin/python­ native:.../poky/scripts:.../build/tmp/sysroots/x86_64­linux/usr/bin/cortexa15hf­vfp­neon­ poky­linux­ gnueabi:.../build/tmp/sysroots/porter/usr/bin/crossscripts:.../build/tmp/sysroots/x86_64­ linux/usr/sbin:.../build/tmp/sysroots/x86_64­linux/usr/bin:.../build/tmp/sysroots/x86_64­ linux/sbin:.../build/tmp/sysroots/x86_64­ linux/bin:.../poky/scripts:.../poky/bitbake/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games :/usr/games CXX=arm­poky­linux­gnueabi­g++  ­march=armv7­a ­mthumb­interwork ­mfloat­abi=hard ­mfpu=neon  ­mtune=cortex­a15 –sysroot=.../build/tmp/sysroots/porter CC=arm­poky­linux­gnueabi­gcc  ­march=armv7­a ­mthumb­interwork ­mfloat­abi=hard ­mfpu=neon  ­mtune=cortex­a15 –sysroot=.../build/tmp/sysroots/porter ● # whereis arm­poky­linux­gnueabi­g++ arm­poky­linux­gnueabi­g++: .../build/tmp/sysroots/x86_64­linux/usr/bin/cortexa15hf­vfp­neon­ poky­linux­gnueabi/arm­poky­linux­gnueabi­g++
  • 27. Missing includes in v8 ● Problem: wrong compiler being used ● Calling g++ instead of $CXX ● $CXX points to arm­poky­linux­gnueabi­g++ inside the sysroot ● g++ is the system compiler ● Workaround: ● apt­get install gcc­multilib g++­multilib ● Proper solution would be fixing the recipe!
  • 28. Cannot open libGLESv2.so ● Error: [display.cc (117)] Failed to load GLES  library: libGLESv2.so.2: cannot open shared  object file: no such file or directory ● Check contents in /usr/lib ● libGLESv2.so is there, symlinks with version numbers are not ● Workaround: manually add a symlink cd /usr/lib ln ­s libGLESv2.so libGLESv2.so.2
  • 29. Cannot open libGLESv2.so ● Solution: patch recipe ­­­ a/meta­rcar­gen2/recipes­graphics/gles­module/gles­user­module.bb +++ b/meta­rcar­gen2/recipes­graphics/gles­module/gles­user­module.bb @@ ­65,7 +65,10 @@ do_install() {             ${D}/${sysconfdir}/powervr.ini          fi      fi ­}  + +    # Fix symlink +    cd ${D}/usr/lib && ln ­s libGLESv2.so libGLESv2.so.2 +}    PACKAGES = "      ${PN} 
  • 30. Error in egl.c ● Error: egl.c:228: eglQueryString: Assertion `ret != ((void  *)0)' failed. ● Check code flow with the debugger ● Set breakpoint at egl.c:228 224     ret = _eglQueryString(dpy, name); 225 226 #ifdef WANT_WAYLAND 227     if (name == EGL_EXTENSIONS) { 228         assert(ret != NULL); 229         … ● Check backtrace to know where we are: libegl
  • 31. Error in egl.c ● Solution: replace the assert with a softer if sentence ● Check solution with original developers, share upstream ­­­ a/egl.c +++ b/egl.c @@ ­224,8 +223,7 @@ const char *eglQueryString(EGLDisplay dpy, EGLint name)         ret = _eglQueryString(dpy, name);    #ifdef WANT_WAYLAND ­       if (name == EGL_EXTENSIONS) { ­               assert(ret != NULL); +       if (ret && name == EGL_EXTENSIONS) {                   if (!_eglextstr) {                         _eglextstr = calloc(1, strlen(ret) + strlen(EGL_WL_EXT
  • 32. Error in egl.c ● Solution: replace the assert with a softer if sentence ● Modify libegl recipe: ­­­ a/meta­rcar­gen2/recipes­graphics/wayland/libegl.bb +++ b/meta­rcar­gen2/recipes­graphics/wayland/libegl.bb @@ ­5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://egl.c;beginline=5;endline=15;md5=36  COMPATIBLE_MACHINE = "(r8a7790|r8a7791|r8a7793|r8a7794)"    PROVIDES = "${@base_contains("DISTRO_FEATURES", "wayland", "virtual/egl", "", ­SRCREV = "ee4bce93878d02a144ae6ebfba1eff28fe9b4442" +SRCREV = "02b559098042a0aeb9ac63eece547868a140fa46"
  • 34. Missing certificates ● Solution: add ca-certificates package to the image ● IMAGE_INSTALL_append = " chromium  ca­certificates"
  • 37. Contributions upstream ● Contributions to meta-browser ● 4b27058 chromium: Include chromium.inc before appending to DEPENDS ● 6ae140b chromium: Rework the evaluation of the Wayland feature. ● 65d7e9f chromium: Clean the definitions of some ozone-wayland variables. ● 556b41a chromium: Allow to build in Debug mode.
  • 38. Contributions upstream ● Contributions to libegl ● ce7caca Don't assert when eglQueryString() returns null. ● Contributions to meta-renesas ● rcar-gen2: libegl: Update SRCREV. ● rcar-gen2: gles-user-module: Add symlink for the GLESv2 library.
  • 39. Contributions upstream ● Contributions to Ozone-Wayland ● a12c78e Add support for receiving drag data from external processes ● 5b0b336 Add an error message when running with software rendering ● 3bc3655 tools/jhbuild: moduleset requires the full path ● b0988bb WindowManagerWayland: guard against invalid window handles ● Some additional commits and more under development now
  • 40. What's next ● Build on top of meta-ivi ● Run on the GENIVI Demo Platform ● Continue with the development of Ozone- Wayland
  • 41. Thank you! © 2015 Igalia, S.L.