Skip to content

Commit

Permalink
scripts: Update to detect aarch64
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
  • Loading branch information
rotu authored and patrickelectric committed May 23, 2024
1 parent 635c3ed commit d524c14
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
19 changes: 10 additions & 9 deletions scripts/build_gst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ LIBCAMERA_ENABLED=${LIBCAMERA_ENABLED:-false} # FIXME: libcamera is failing to
LIBCAMERA_VERSION=${LIBCAMERA_VERSION:-master}
LIBCAMERA_GIT_URL=${LIBCAMERA_GIT_URL:-https://git.libcamera.org/libcamera/libcamera.git}
ARCH=${ARCH:-$(uname -m)}
if [[ $ARCH =~ ^(arm|aarch64) ]]; then ARM=true; else ARM=false; fi
# RPICAM is only supported for arm
RPICAM_ENABLED=${RPICAM_ENABLED:-false}
if [[ $ARCH != arm* ]]; then
if [[ $ARM == true ]]; then
RPICAM_ENABLED=${RPICAM_ENABLED:-true}
else
RPICAM_ENABLED=false
fi

# Here we carefully select what we want to build/install. Even though several
# of the listed options are disabled by default, it is interesting to have
# them here to be documented.
Expand Down Expand Up @@ -73,19 +74,19 @@ if [ $GST_OMX_ENABLED == true ]; then
GST_MESON_OPTIONS+=(
-D omx=enabled
)
if [[ $ARCH == x86_64 ]]; then
GST_MESON_OPTIONS+=(
-D gst-omx:target=generic
)
elif [[ $ARCH == arm* ]]; then
if [[ $ARM == true ]]; then
# To build omx for the "rpi" target, we need to provide the raspberrypi
# IL headers:
USERLAND_PATH=/tmp/userland
GST_MESON_OPTIONS+=(
-D gst-omx:target=rpi
-D gst-omx:header_path=$USERLAND_PATH/interface/vmcs_host/khronos/IL
)
fi
else
GST_MESON_OPTIONS+=(
-D gst-omx:target=generic
)
fi
fi
if [ $LIBCAMERA_ENABLED == true ]; then
GST_MESON_OPTIONS+=(
Expand Down
7 changes: 4 additions & 3 deletions scripts/inspect_gst_plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ PLUGINS=(
)

ARCH=${ARCH:-$(uname -m)}
GST_OMX_ENABLED=${GST_OMX_ENABLED:-false}
GST_OMX_ENABLED=${GST_OMX_ENABLED:-true}
LIBCAMERA_ENABLED=${LIBCAMERA_ENABLED:-false}
if [[ $ARCH == arm* ]]; then
RPICAM_ENABLED=${RPICAM_ENABLED:-false}
if [[ $ARCH =~ ^(arm|aarch64) ]]; then ARM=true; else ARM=false; fi
if [[ $ARM == true ]]; then
RPICAM_ENABLED=${RPICAM_ENABLED:-true}

if [ $RPICAM_ENABLED == true ] && [ -f /dev/vchiq ]; then
# This test needs to be run in a Raspberry Pi hardware to work.
Expand Down

0 comments on commit d524c14

Please sign in to comment.