diff --git a/scripts/build_gst.sh b/scripts/build_gst.sh index 23decc6..d503de1 100755 --- a/scripts/build_gst.sh +++ b/scripts/build_gst.sh @@ -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 @@ -73,11 +73,7 @@ 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 @@ -85,7 +81,11 @@ if [ $GST_OMX_ENABLED == true ]; then -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+=( diff --git a/scripts/inspect_gst_plugins.sh b/scripts/inspect_gst_plugins.sh index 468a251..9e02def 100755 --- a/scripts/inspect_gst_plugins.sh +++ b/scripts/inspect_gst_plugins.sh @@ -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