Skip to content

Testing local images

Pablo Saavedra edited this page Dec 21, 2022 · 7 revisions

Testing local images

Prerequisites

Build a local version of the balena-browser-wpe block

  • (optional) Set a bitbake_local.conf with local settings:
SSTATE_DIR = "/home/psaavedra/yocto/sstate-cache/${LAYERSERIES_CORENAMES}"
DL_DIR = "/home/psaavedra/yocto/downloads/${LAYERSERIES_CORENAMES}"

# Default to setting automatically based on cpu count
BB_NUMBER_THREADS = "16"

# Default to setting automatically based on cpu count
PARALLEL_MAKE = "-j 12"
  • Do your local changes

  • Build the block image and push it to the Docker public hub:

export ARCH=armv7hf
export MACHINE=raspberrypi3

export REGISTRY=docker.io
export REGISTRY_PATH=psaavedra
export REGISTRY_USER=psaavedra
export REGISTRY_PASSWORD='XXXXXX'
export BITBAKE_LOCAL_CONF="/home/psaavedra/yocto/bitbake_local.conf"

export VERSION="$(git describe --dirty --always)-r1"

[ -e build ] && rm -rf build
./build.sh

sudo -E bash -x ./push.sh

Test balena-wpe replacing the balena-browser-wpe with the latest custom image created:

  • Go to balena-wpe Git local clone:
  • Do this local change in wpe/Dockerfile.template:
diff --git a/wpe/Dockerfile.template b/wpe/Dockerfile.template
index 998158b..c6b4bbf 100644
--- a/wpe/Dockerfile.template
+++ b/wpe/Dockerfile.template
@@ -1,4 +1,4 @@
-FROM igalia/balena-browser-wpe:%%BALENA_MACHINE_NAME%%-fde567d
+FROM psaavedra/balena-browser-wpe:raspberrypi3-b9e4e6e-dirty-r1

 COPY wpe-init /wpe-init
 RUN chmod +x /wpe-init
  • Set the local device in developer mode and push the block image to it:
balena device local-mode 435ff7aaf5466e16sdfdsfds754347b6
balena push 192.168.1.200  # --env WPE_WESTON_OUTPUT_MAX_WIDTH=1280 --env WPE_WESTON_OUTPUT_MAX_HEIGHT=800
  • Entering in the updated block
balena ssh 192.168.1.200
root@0638f7a:~# balena exec -it wpe_3_1_localrelease ls -l /