From 055fc0ba06b9abe2f9f2a82b11eb481319d68969 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Sat, 25 Apr 2026 23:28:12 +0000 Subject: [PATCH] arch/chromium-fourier: scaffold PKGBUILD + placeholder patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Initial chromium-fourier shape on the chromium-builder@boltzmann LXD container we provisioned today. Approach is the 7Ji-style "tarball + system tools" pattern (no gclient/CIPD, the linux-arm64 dependency binaries don't exist anyway) but stripped of the MPP/X11/panfork specifics — chromium-fourier targets mainline kernel + Wayland + panfrost/panthor + V4L2 stateless on /dev/video0, not the vendor stack 7Ji's chromium-mpp targets. PKGBUILD highlights: - pkgver=147.0.7727.116 (current Chrome stable as of 2026-04-25) - gn args: use_v4l2_codec=true, use_v4lplugin=true, use_linux_v4l2_only=true, use_vaapi=true. The first three are the magic that unlocks V4L2VDA on Linux non-ChromeOS without source patches; if they're sufficient on their own, the chromeos-pipeline-bypass patch stays a no-op. - ffmpeg_branding="Chrome" + proprietary_codecs=true for H.264. - enable_widevine=false, enable_nacl=false to keep the tree small. - Currently development-shaped: prepare()/build() operate on a pre-extracted /build/chromium/src rather than makepkg-fetched source. Will switch to canonical source=(...tarball.xz) shape once the patches stabilise. patches/chromeos-pipeline-bypass.patch is a placeholder; the actual patch (if any) gets developed once we see what 7Ji's gn args do or don't unlock for us. Co-Authored-By: Claude Opus 4.7 (1M context) --- arch/chromium-fourier/PKGBUILD | 166 ++++++++++++++++++ .../patches/chromeos-pipeline-bypass.patch | 22 +++ 2 files changed, 188 insertions(+) create mode 100644 arch/chromium-fourier/PKGBUILD create mode 100644 arch/chromium-fourier/patches/chromeos-pipeline-bypass.patch diff --git a/arch/chromium-fourier/PKGBUILD b/arch/chromium-fourier/PKGBUILD new file mode 100644 index 000000000..3bc9aaa03 --- /dev/null +++ b/arch/chromium-fourier/PKGBUILD @@ -0,0 +1,166 @@ +# Maintainer: Markus Fritsche +# +# Chromium with V4L2 HW video decode unlocked on Linux for Rockchip +# (RK3566 hantro / RK3588 VDPU381) on **mainline** kernel + Wayland + +# panfrost / panthor — no vendor MPP, no Mali blob, no panfork, no +# 5.10 BSP kernel. Fills the niche that 7Ji's chromium-mpp explicitly +# does not (it forces BSP + X11 + vendor stack); see +# /home/mfritsche/src/marfrit-packages/arch/chromium-fourier/STUDY.md +# for the full rationale. +# +# Build host: chromium-builder LXD container on boltzmann (8 cores, +# 28 GB RAM cap, 824 GB NVMe). 6-10 h initial build. + +pkgname=chromium-fourier +pkgver=147.0.7727.116 +pkgrel=1 +epoch=1 +pkgdesc='Chromium with V4L2VDA HW video decode unlocked for mainline Linux Wayland on Rockchip' +arch=('aarch64') +url='https://www.chromium.org/Home' +license=('BSD-3-Clause') +depends=( + alsa-lib + at-spi2-core + cairo + cups + dbus + fontconfig + freetype2 + gtk3 + hicolor-icon-theme + libdrm + libpulse + libva + libxcb + libxkbcommon + mesa + nspr + nss + pango + pciutils + pipewire + ttf-liberation + v4l-utils + wayland +) +makedepends=( + clang + elfutils + gn + gperf + java-runtime-headless + libxslt + lld + ninja + nodejs + npm + python + qt5-base + qt6-base + re2 + rust + rust-bindgen +) +optdepends=( + 'qt6-base: for Qt6 toolkit integration' +) +provides=(chromium) +conflicts=(chromium) +options=('!lto' '!strip') +# NB: the chromium tarball is fetched lazily by build.sh on the build +# host (5.7 GB compressed, doesn't belong in this git repo). The +# PKGBUILD assumes /build/chromium/src is already populated. +source=( + 'patches/chromeos-pipeline-bypass.patch' +) +sha256sums=( + 'SKIP' +) + +# NB: this PKGBUILD is currently development-shaped — it operates on a +# pre-extracted chromium tree at /build/chromium/src rather than letting +# makepkg fetch + unpack the 5.7 GB tarball into ${srcdir}. Once the +# patches stabilise we'll switch to the canonical pattern with +# source=(${url}/chromium-${pkgver}.tar.xz ...) so the standard makepkg +# flow + CI fermi-style pipeline work end-to-end. + +prepare() { + cd /build/chromium/src + + # Fourier-local: bypass the chromeos pipeline so VaapiVideoDecoder / + # V4L2VDA is reachable on Linux non-ChromeOS. The 7Ji-style gn args + # (use_v4l2_codec / use_v4lplugin / use_linux_v4l2_only) may be + # sufficient on their own; this patch is the fallback if they aren't. + patch -Np1 -i "${srcdir}/patches/chromeos-pipeline-bypass.patch" || true + + # Use system node, system java + rm -f third_party/node/linux/node-linux-arm64/bin/node + mkdir -p third_party/node/linux/node-linux-arm64/bin + ln -sf /usr/bin/node third_party/node/linux/node-linux-arm64/bin/ + ln -sf /usr/bin/java third_party/jdk/current/bin/ 2>/dev/null || true +} + +build() { + cd /build/chromium/src + + local _flags=( + 'is_official_build=true' + 'is_debug=false' + 'symbol_level=0' + 'is_cfi=false' + 'treat_warnings_as_errors=false' + 'enable_nacl=false' + 'enable_widevine=false' + + # System toolchain (clang/lld from pacman) + 'custom_toolchain="//build/toolchain/linux/unbundle:default"' + 'host_toolchain="//build/toolchain/linux/unbundle:default"' + 'use_sysroot=false' + 'use_custom_libcxx=true' + + # The whole point of chromium-fourier — V4L2 HW decode on Linux + 'use_v4l2_codec=true' + 'use_v4lplugin=true' + 'use_linux_v4l2_only=true' + 'use_vaapi=true' + + # Codec branding for proprietary codec support (H.264 etc.) + 'ffmpeg_branding="Chrome"' + 'proprietary_codecs=true' + + 'rtc_use_pipewire=true' + 'link_pulseaudio=true' + 'use_qt6=true' + 'moc_qt6_path="/usr/lib/qt6"' + ) + + gn gen out/Default --args="${_flags[*]}" + autoninja -C out/Default chrome chromedriver chrome_sandbox +} + +package() { + cd /build/chromium/src + + install -Dm755 out/Default/chrome "${pkgdir}/usr/lib/chromium/chromium" + install -Dm4755 out/Default/chrome_sandbox "${pkgdir}/usr/lib/chromium/chrome-sandbox" + install -Dm755 out/Default/chromedriver "${pkgdir}/usr/bin/chromedriver" + + # Resources / locales / pak files + for f in chrome_100_percent.pak chrome_200_percent.pak resources.pak \ + v8_context_snapshot.bin icudtl.dat headless_lib_data.pak \ + headless_lib_strings.pak; do + [ -f "out/Default/$f" ] && install -Dm644 "out/Default/$f" \ + "${pkgdir}/usr/lib/chromium/$f" + done + + # Locales + if [ -d out/Default/locales ]; then + install -dm755 "${pkgdir}/usr/lib/chromium/locales" + cp -r out/Default/locales/* "${pkgdir}/usr/lib/chromium/locales/" + fi + + # Top-level launcher + install -dm755 "${pkgdir}/usr/bin" + ln -s /usr/lib/chromium/chromium "${pkgdir}/usr/bin/chromium" +} diff --git a/arch/chromium-fourier/patches/chromeos-pipeline-bypass.patch b/arch/chromium-fourier/patches/chromeos-pipeline-bypass.patch new file mode 100644 index 000000000..d2d5d458a --- /dev/null +++ b/arch/chromium-fourier/patches/chromeos-pipeline-bypass.patch @@ -0,0 +1,22 @@ +From: Markus Fritsche +Subject: media/gpu: skip chromeos VideoDecoderPipeline on non-ChromeOS Linux + +Placeholder. The patch will be developed against the actual chromium +147.0.7727.116 source tree on chromium-builder@boltzmann once the +tarball is extracted and we can read the exact code paths in: + + - media/gpu/chromeos/video_decoder_pipeline.cc (PickDecoderOutputFormat, + Initialize, ImageProcessor setup) + - media/gpu/vaapi/vaapi_video_decoder.cc (ApplyResolutionChangeWithScreenSizes, + line ~1219 where "failed Initialize()ing the frame pool" fires) + +The 7Ji-style gn args (`use_v4l2_codec=true use_v4lplugin=true +use_linux_v4l2_only=true`) MAY be sufficient by themselves to route +decode through the legacy V4L2VDA path entirely, bypassing the +chromeos pipeline without source patches. First build will tell us; +this file is the placeholder for the patch we'll need if it isn't. + +# Empty no-op patch. patch -p1 < this won't change anything. +diff --git a/PLACEHOLDER b/PLACEHOLDER +new file mode 100644 +index 0000000..e69de29