Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/flowzone.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: Flowzone

on:
Expand Down Expand Up @@ -25,4 +25,4 @@
secrets: inherit
with:

balena_slugs: 'balenasolutions/browser-generic-aarch64,balenasolutions/browser-generic-amd64,balenasolutions/browser-raspberrypi4-64,balenasolutions/browser-raspberrypi5'
balena_slugs: 'balenasolutions/browser-generic-aarch64,balenasolutions/browser-generic-amd64,balenasolutions/browser-raspberrypi3-64,balenasolutions/browser-raspberrypi4-64,balenasolutions/browser-raspberrypi5'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ sha256bca9ad158da383a9af76908776cf6cd8b06359a8a1529c4862fd17fd3f2fc7b3
Dockerfile.raspberrypi3
Dockerfile.raspberrypi4-64

.DS_Store
10 changes: 1 addition & 9 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:13
FROM debian:13.2-slim

ENV DEBIAN_FRONTEND=noninteractive

Expand Down Expand Up @@ -52,14 +52,6 @@ RUN useradd chromium -m -s /bin/bash -G root || true && \

COPY ./public-html /home/chromium

# udev rule to set specific permissions
RUN echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/10-vchiq-permissions.rules
RUN usermod -a -G audio,video,tty chromium

# Set up the audio block. This won't have any effect if the audio block is not being used.
RUN curl -skL https://raw.githubusercontent.com/balena-labs-projects/audio/master/scripts/alsa-bridge/debian-setup.sh| sh
ENV PULSE_SERVER=tcp:audio:4317

COPY VERSION .

# Start app
Expand Down
57 changes: 32 additions & 25 deletions balena.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,60 @@ description: >-
connected display

post-provisioning: >-
[![balena](https://github.com/balena-labs-projects/browser/actions/workflows/balena.yml/badge.svg)](https://github.com/balena-labs-projects/browser/actions/workflows/balena.yml)

## Usage instructions

Include this snippet in your docker-compose.yml file under 'services':

The browser block renders through a companion display (compositor) block. Include this
snippet in your docker-compose.yml file under 'services', and declare the `display-socket`
(and, if using PERSISTENT, `settings`) volumes:

```
display:
image: bh.cr/balenasolutions/display-<arch> # <arch> is aarch64 or amd64; see https://github.com/balenasolutions/display
privileged: true
volumes:
- display-socket:/run
labels:
io.balena.features.dbus: '1'

browser:
image: bh.cr/balenalabs/browser-<arch> # where <arch> is one of aarch64, arm32 or amd64
image: bh.cr/balenasolutions/browser-<device-type> # one of raspberrypi3-64, raspberrypi4-64, raspberrypi5, generic-aarch64, generic-amd64
privileged: true # required for UDEV to find plugged in peripherals such as a USB mouse
network_mode: host
depends_on:
- display
environment:
XDG_RUNTIME_DIR: /run/user/0
WAYLAND_DISPLAY: wayland-0
devices:
- /dev/dri:/dev/dri
ports:
- '5011:5011' # management API
volumes:
- 'settings:/data' # Only required if using PERSISTENT flag (see below)
- display-socket:/run
- 'settings:/data' # Only required if using PERSISTENT flag
```

To pin to a specific [version](CHANGELOG.md) of this block use:
To pin to a specific version of this block, append it to the image, e.g.
`bh.cr/balenasolutions/browser-<device-type>/<version>`.

```
browser:
image: bh.cr/balenalabs/browser-<arch>/<version>
privileged: true # required for UDEV to find plugged in peripherals such as a USB mouse
network_mode: host
ports:
- '5011' # management API (optional)
- '35173' # Chromium debugging port (optional)
volumes:
- 'settings:/data' # Only required if using PERSISTENT flag (see below)
```
Upgrading from v2? See docs/migrating-from-v2.md in the repository.
version: 2.12.2
type: sw.block
assets:
repository:
type: blob.asset
data:
url: 'https://github.com/balena-labs-projects/browser'
url: 'https://github.com/balenasolutions/browser'
logo:
type: blob.asset
data:
url: 'https://raw.githubusercontent.com/balena-labs-projects/browser/master/logo.png'
url: 'https://raw.githubusercontent.com/balenasolutions/browser/master/logo.png'
data:
defaultDeviceType: raspberrypi3
defaultDeviceType: raspberrypi4-64
supportedDeviceTypes:
- raspberrypi4-64
- fincm3
- raspberrypi3
- raspberrypi3-64
- raspberrypi400-64
- raspberrypi5
- intel-nuc
- genericx86-64-ext
- generic-amd64
- generic-aarch64
46 changes: 31 additions & 15 deletions build/install_chromium
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
BASE_DIR="/usr/src/build"
MACHINE_NAME="$1"


# FORCE_RPI_REPO=0 never includes the repo
# FORCE_RPI_REPO=1 always includes the repo
# If the machine name starts with "raspberry", or if the machine
# is a balenaFin, include the repo
if [ "${FORCE_RPI_REPO}" != "0" ] && [ "${FORCE_RPI_REPO}" = "1" -o "${MACHINE_NAME:0:9}" = "raspberry" -o "${MACHINE_NAME}" = "fincm3" ]
# If the machine name starts with "raspberry"
if [ "${FORCE_RPI_REPO}" != "0" ] && [ "${FORCE_RPI_REPO}" = "1" -o "${MACHINE_NAME:0:9}" = "raspberry" ]
then
echo "Enabling raspios repository"

Expand All @@ -28,21 +28,37 @@ fi
# which is not provided by the upstream package
ln -sf /usr/bin/chromium /usr/bin/chromium-browser

# mimic previous balenalib "install_packages" behavior:
apt-get update && apt-get install -y --no-install-recommends \
# Intel GPUs need Intel's own VA-API driver for hardware video decode: mesa-va-drivers
# only provides VA-API for AMD/gallium, so on Intel libva exposes zero decode profiles
# and Chromium falls back to software for every codec. These packages are x86-only
# (Intel hardware), so we only add them on amd64; AMD x86 keeps using mesa-va-drivers.
# - intel-media-va-driver (iHD): Gen8+ (covers e.g. Kaby Lake, Raptor Lake)
# - i965-va-driver: pre-Gen8 Intel
# Both live in Debian main and handle H.264/HEVC decode (no non-free codecs needed).
# vainfo (libva-utils) is bundled so the diagnostics report can enumerate VA profiles.
ARCH_PACKAGES=""
if [ "$(dpkg --print-architecture)" = "amd64" ]; then
ARCH_PACKAGES="intel-media-va-driver i965-va-driver vainfo"
fi

# Install hardware acceleration libraries and base system libraries
apt-get update && apt-get install -y --no-install-recommends \
${ARCH_PACKAGES} \
chromium \
chromium-common \
ca-certificates \
curl \
lsb-release \
mesa-vdpau-drivers \
mesa-va-drivers \
mesa-vulkan-drivers \
scrot \
x11-xserver-utils \
xserver-xorg-input-evdev \
xserver-xorg-legacy \
xserver-xorg-video-fbdev \
xserver-xorg xinit \
xinput \
xterm && \
rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
v4l-utils \
libgl1-mesa-dri \
libegl-mesa0 \
libglx-mesa0 \
libgbm1 \
libegl1 \
libgles2 \
libgl1 \
fonts-freefont-ttf \
fonts-liberation \
&& rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
6 changes: 0 additions & 6 deletions build/rpi/99-vc4.conf

This file was deleted.

Loading