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 <[email protected]>
  • Loading branch information
rotu authored and patrickelectric committed May 23, 2024
1 parent 3b1e262 commit c370841
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
20 changes: 10 additions & 10 deletions scripts/build_gst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ 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
RPICAM_ENABLED=false
fi
RPICAM_ENABLED=${RPICAM_ENABLED:-$ARM}

# 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
Expand Down Expand Up @@ -73,19 +73,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
3 changes: 2 additions & 1 deletion scripts/inspect_gst_plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ PLUGINS=(
ARCH=${ARCH:-$(uname -m)}
GST_OMX_ENABLED=${GST_OMX_ENABLED:-false}
LIBCAMERA_ENABLED=${LIBCAMERA_ENABLED:-false}
if [[ $ARCH == arm* ]]; then
if [[ $ARCH =~ ^(arm|aarch64) ]]; then ARM=true; else ARM=false; fi
if [[ $ARM == true ]]; then
RPICAM_ENABLED=${RPICAM_ENABLED:-false}

if [ $RPICAM_ENABLED == true ] && [ -f /dev/vchiq ]; then
Expand Down

0 comments on commit c370841

Please sign in to comment.