anchor.diff:  ALTERNATIVE_PRIORITY_libmali-xlnx-x11[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "x11", "20", "10", d)}"
   ALTERNATIVE_PRIORITY_libmali-xlnx-fbdev[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "fbdev", "20", "10", d)}"
   ALTERNATIVE_PRIORITY_libmali-xlnx-wayland[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "wayland", "20", "10", d)}"
  -ALTERNATIVE_PRIORITY_libmali-xlnx-headless[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "headless", "20", "10", d)}"
  +
  +# If misconfigured, fallback to headless
  +ALTERNATIVE_PRIORITY_libmali-xlnx-headless[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "headless", "20", "15", d)}"
   
   
   # Package gets renamed on the debian class, but we want to keep -xlnx
  
positive.code: 
  S = "${WORKDIR}/git"
  
  # If were switching at runtime, we need all RDEPENDS needed for all backends available
  RDEPENDS_${PN} = " kernel-module-mali libxdamage libxext libx11 libdrm libxfixes"
  
  # We dont build anything but we want to avoid QA warning build-deps
  DEPENDS = "wayland"
  
  # x11 is default, set to "fbdev" , "wayland", or "headless" if required
  MALI_BACKEND_DEFAULT ?= "x11"
  
  do_install() {
      #Identify the ARCH type
  
negative.code: 
      cp -a --no-preserve=ownership ${S}/${PV}/${ARCH_PLATFORM_DIR}/common/*.so* ${D}${libdir}
  
      install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/headless/libMali.so.8.0 ${D}${libdir}/headless/libMali.so.8.0
      ln -snf headless/libMali.so.8.0 ${D}${libdir}/libMali.so.8.0
  
      if [ "${USE_FB}" = "yes" ]; then
          install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/fbdev/libMali.so.8.0 ${D}${libdir}/fbdev/libMali.so.8.0
          if [ "${MALI_BACKEND_DEFAULT}" = "fbdev" ]; then
              ln -snf fbdev/libMali.so.8.0 ${D}${libdir}/libMali.so.8.0
          fi
      fi
      if [ "${USE_X11}" = "yes" ]; then
          install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/x11/libMali.so.8.0 ${D}${libdir}/x11/libMali.so.8.0
          if [ "${MALI_BACKEND_DEFAULT}" = "x11" ]; then
              ln -snf x11/libMali.so.8.0 ${D}${libdir}/libMali.so.8.0
          fi
      fi
      if [ "${USE_WL}" = "yes" ]; then
          install -m 0644 ${S}/${PV}/glesHeaders/GBM/gbm.h ${D}${includedir}/
          install -m 0644 ${WORKDIR}/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc
          install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/wayland/libMali.so.8.0 ${D}${libdir}/wayland/libMali.so.8.0
          if [ "${MALI_BACKEND_DEFAULT}" = "wayland" ]; then
              ln -snf wayland/libMali.so.8.0 ${D}${libdir}/libMali.so.8.0
          fi
      fi
  }
  
  
  