How to Compile Ozone-GBM for Linux
This has to be done on an x86 system otherwise no goma_ctl.py therefore no .src folder will be created and game over.
- Run from console DRM and GBM buffers (build for platform DRM)
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
sudo apt install gedit -y
gedit .bashrc #add this at the bottom
export PATH="$PATH:${HOME}/depot_tools"
umask 002
gedit nano /etc/profile #add this at the bottom
umask 022
sudo reboot #shutdown linux and open again
cd ~/depot_tools
./fetch --nohooks --no-history chromium
./src/build/install-build-deps.sh
gclient runhooks
#Copy the .gclient file to the chromium source directory (//chromium not //chromium/src/)
gedit .gclient #add these lines
target_os = ['arm64', 'chromeos']
gclient sync
#Prepares files for Ninja Build
gn args src/out/ --arch='arm64' --args='dcheck_always_on=true enable_nacl=false has_native_accessibility=false is_chrome_branded=false is_debug=false is_official_build=false ozone_auto_platforms=false ozone_platform="gbm" ozone_platform_gbm=true use_evdev_gestures=false use_glib=false use_gtk=false use_ozone=true use_pulseaudio=false use_system_minigbm=false use_vc4_minigbm=true use_xkbcommon=false'
#gn args src/out/ --arch='arm64'
#gn args src/out/ --arch='arm64' --args='ozone_auto_platforms=false ozone_platform_wayland=true'
#Building with ozone_demo for a quicker test.
ninja -C src/out/ -j$(nproc) ozone_demo
🖱️Or Manually gedit args.gn:🖱️
cd src/out/
gedit args.gn # src/out/args.gn
# Set build arguments here. See `gn help buildargs`.
use_ozone = true
target_os = "chromeos"
target_cpu = "arm64"
#cc_wrapper = "ccache"
enable_nacl = false
has_native_accessibility = false
is_chrome_branded = false
ozone_auto_platforms = false
ozone_platform = "gbm"
ozone_platform_gbm = true
#target_sysroot = "//build/linux/debian_bullseye_arm64-sysroot"
use_evdev_gestures = false
use_pulseaudio = false
use_vc4_minigbm = true
use_system_minigbm = false
use_glib = false
use_gtk = false
ozone_platform = "drm"
ozone_platform_drm = true
is_debug = false
is_official_build = false
use_xkbcommon = true
dcheck_always_on = true
#save it
Now you will wished u had 64GB’s of ram and threadrippers to become a Speedy Gonzales… plenty of targets to achieve under a full build.
#Full Build
#ninja -C src/out/ -j$(nproc) chrome
From here on I have no clue the right process to follow
But I assume we need to compile the output files into .tar.gz
To then extract them on the system and boot it.
There is obviously the matters of google users api’s which is another process but for this for now I will keep it ‘guest user’.
#now files to a .tar.gz to be extracted in system and run with:
./chrome --ozone-platform=drm --force-system-compositor-mode --login-profile=user --user-data-dir=/home/area/.config/google-chrome-gbm --use-gl=egl --in-process-gpu --crosh-command=/bin/bash
Building MiniGBM (i dont even know what this is exacly but whatever)
ninja -C out/OzoneChromeOS chrome
sudo apt install libdrm-dev
ln -s libminigbm.so.1.0.0 libminigbm.so
Official ChromeOS startup flags:
/opt/google/chrome/chrome --enable-native-gpu-memory-buffers --enable-webgl-image-chromium --enable-features=Pepper3DImageChromium,UmaStorageDimensions,QuickUnlockFingerprint,AutoNightLight,AllowAmbientEQ,ArcAdbSideloading,Crostini,CrostiniGpuSupport,PluginVm,Borealis,SmartDim,EnableNeuralPalmDetectionFilter,OnDeviceSpeechRecognition --gpu-sandbox-failures-fatal=yes --gpu-sandbox-start-early --video-capture-use-gpu-memory-buffer --enable-logging --log-level=1 --use-cras --enable-wayland-server --user-data-dir=/home/chronos --disable-mojo-broker --ash-use-cros-mojo-service-manager --cros-healthd-uses-service-manager --login-profile=user --has-chromeos-keyboard --enable-touchview --enable-dim-shelf --form-factor=CHROMEBOOK --guest-wallpaper-large=/usr/share/chromeos-assets/wallpaper/guest_large.jpg --guest-wallpaper-small=/usr/share/chromeos-assets/wallpaper/guest_small.jpg --child-wallpaper-large=/usr/share/chromeos-assets/wallpaper/child_large.jpg --child-wallpaper-small=/usr/share/chromeos-assets/wallpaper/child_small.jpg --default-wallpaper-large=/usr/share/chromeos-assets/wallpaper/kohaku_large.jpg --default-wallpaper-small=/usr/share/chromeos-assets/wallpaper/kohaku_small.jpg --default-wallpaper-is-oem --device-help-content-id=kohaku --has-internal-stylus --fingerprint-sensor-location=keyboard-top-right --ozone-nnpalm-properties={"model":"alpha","radius-polynomial":"0.1010944, 3.51837568","touch-compatible":"true"} --arc-availability=officially-supported --enable-arcvm --enable-houdini --enable-houdini64 --enterprise-enrollment-initial-modulus=15 --enterprise-enrollment-modulus-limit=19 --enable-crashpad --ml_service=enabled --ondevice_handwriting=use_rootfs --ondevice_document_scanner=use_rootfs --feature-management-level=0 --feature-management-max-level=1 --login-manager --feature-flags=["borealis-enabled@1","borealis-linux-mode@1","crostini-multi-container@1"] --first-exec-after-boot --enable-features=AllowAmbientEQ,ArcAdbSideloading,AutoNightLight,Borealis,Crostini,CrostiniGpuSupport,EnableNeuralPalmDetectionFilter,OnDeviceSpeechRecognition,Pepper3DImageChromium,PluginVm,QuickUnlockFingerprint,SmartDim,UmaStorageDimensions --flag-switches-begin --enable-features=AllowAmbientEQ,ArcAdbSideloading,AutoNightLight,Borealis,Crostini,CrostiniGpuSupport,EnableNeuralPalmDetectionFilter,OnDeviceSpeechRecognition,Pepper3DImageChromium,PluginVm,QuickUnlockFingerprint,SmartDim,UmaStorageDimensions,BorealisLinuxMode,BorealisPermitted,CrostiniMultiContainer --flag-switches-end --origin-trial-disabled-features=WebGPU
Following this complex guide: https://dev.to/yaegashi/howto-building-chromium-on-ozone-gbm-for-rpi4-568e