diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver')
18 files changed, 394 insertions, 245 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf deleted file mode 100644 index 72e4fbf59b..0000000000 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf +++ /dev/null @@ -1,9 +0,0 @@ -Section "Module" - Load "fbdevhw" - Load "fb" - Load "shadow" - Load "shadowfb" - Load "int10" - Load "vbe" - Load "vgahw" -EndSection diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf index 629ae214e8..f4cd139e8d 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf @@ -2,34 +2,6 @@ Section "Files" EndSection -Section "InputDevice" - Identifier "Generic Keyboard" - Driver "evdev" - Option "CoreKeyboard" - Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd" - Option "XkbRules" "xorg" - Option "XkbModel" "evdev" - Option "XkbLayout" "us" -EndSection - -Section "InputDevice" - Identifier "Configured Mouse" - Driver "mouse" - Option "CorePointer" - Option "Device" "/dev/input/mice" - Option "Protocol" "ImPS/2" - Option "ZAxisMapping" "4 5" - Option "Emulate3Buttons" "true" -EndSection - -Section "InputDevice" - Identifier "Qemu Tablet" - Driver "evdev" - Option "CorePointer" - Option "Device" "/dev/input/touchscreen0" - Option "USB" "on" -EndSection - Section "Device" Identifier "Graphics Controller" Driver "fbdev" @@ -62,8 +34,5 @@ EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" - InputDevice "Generic Keyboard" - # InputDevice "Configured Mouse" - InputDevice "QEMU Tablet" Option "AllowEmptyInput" "no" EndSection diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf index e6c8b514e3..1d3c64f620 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf @@ -2,34 +2,6 @@ Section "Files" EndSection -Section "InputDevice" - Identifier "Generic Keyboard" - Driver "evdev" - Option "CoreKeyboard" - Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd" - Option "XkbRules" "xorg" - Option "XkbModel" "evdev" - Option "XkbLayout" "us" -EndSection - -Section "InputDevice" - Identifier "Configured Mouse" - Driver "mouse" - Option "CorePointer" - Option "Device" "/dev/input/mice" - Option "Protocol" "ImPS/2" - Option "ZAxisMapping" "4 5" - Option "Emulate3Buttons" "true" -EndSection - -Section "InputDevice" - Identifier "Qemu Tablet" - Driver "evdev" - Option "CorePointer" - Option "Device" "/dev/input/touchscreen0" - Option "USB" "on" -EndSection - Section "Device" Identifier "Graphics Controller" Driver "fbdev" @@ -63,8 +35,5 @@ EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" - InputDevice "Generic Keyboard" - # InputDevice "Configured Mouse" - InputDevice "QEMU Tablet" Option "AllowEmptyInput" "no" EndSection diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf index 629ae214e8..f4cd139e8d 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf @@ -2,34 +2,6 @@ Section "Files" EndSection -Section "InputDevice" - Identifier "Generic Keyboard" - Driver "evdev" - Option "CoreKeyboard" - Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd" - Option "XkbRules" "xorg" - Option "XkbModel" "evdev" - Option "XkbLayout" "us" -EndSection - -Section "InputDevice" - Identifier "Configured Mouse" - Driver "mouse" - Option "CorePointer" - Option "Device" "/dev/input/mice" - Option "Protocol" "ImPS/2" - Option "ZAxisMapping" "4 5" - Option "Emulate3Buttons" "true" -EndSection - -Section "InputDevice" - Identifier "Qemu Tablet" - Driver "evdev" - Option "CorePointer" - Option "Device" "/dev/input/touchscreen0" - Option "USB" "on" -EndSection - Section "Device" Identifier "Graphics Controller" Driver "fbdev" @@ -62,8 +34,5 @@ EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" - InputDevice "Generic Keyboard" - # InputDevice "Configured Mouse" - InputDevice "QEMU Tablet" Option "AllowEmptyInput" "no" EndSection diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf index 629ae214e8..f4cd139e8d 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf @@ -2,34 +2,6 @@ Section "Files" EndSection -Section "InputDevice" - Identifier "Generic Keyboard" - Driver "evdev" - Option "CoreKeyboard" - Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd" - Option "XkbRules" "xorg" - Option "XkbModel" "evdev" - Option "XkbLayout" "us" -EndSection - -Section "InputDevice" - Identifier "Configured Mouse" - Driver "mouse" - Option "CorePointer" - Option "Device" "/dev/input/mice" - Option "Protocol" "ImPS/2" - Option "ZAxisMapping" "4 5" - Option "Emulate3Buttons" "true" -EndSection - -Section "InputDevice" - Identifier "Qemu Tablet" - Driver "evdev" - Option "CorePointer" - Option "Device" "/dev/input/touchscreen0" - Option "USB" "on" -EndSection - Section "Device" Identifier "Graphics Controller" Driver "fbdev" @@ -62,8 +34,5 @@ EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" - InputDevice "Generic Keyboard" - # InputDevice "Configured Mouse" - InputDevice "QEMU Tablet" Option "AllowEmptyInput" "no" EndSection diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf index 629ae214e8..f4cd139e8d 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf @@ -2,34 +2,6 @@ Section "Files" EndSection -Section "InputDevice" - Identifier "Generic Keyboard" - Driver "evdev" - Option "CoreKeyboard" - Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd" - Option "XkbRules" "xorg" - Option "XkbModel" "evdev" - Option "XkbLayout" "us" -EndSection - -Section "InputDevice" - Identifier "Configured Mouse" - Driver "mouse" - Option "CorePointer" - Option "Device" "/dev/input/mice" - Option "Protocol" "ImPS/2" - Option "ZAxisMapping" "4 5" - Option "Emulate3Buttons" "true" -EndSection - -Section "InputDevice" - Identifier "Qemu Tablet" - Driver "evdev" - Option "CorePointer" - Option "Device" "/dev/input/touchscreen0" - Option "USB" "on" -EndSection - Section "Device" Identifier "Graphics Controller" Driver "fbdev" @@ -62,8 +34,5 @@ EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" - InputDevice "Generic Keyboard" - # InputDevice "Configured Mouse" - InputDevice "QEMU Tablet" Option "AllowEmptyInput" "no" EndSection diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf index bbda9eaa63..c12d92c201 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf @@ -2,34 +2,6 @@ Section "Files" EndSection -Section "InputDevice" - Identifier "Generic Keyboard" - Driver "evdev" - Option "CoreKeyboard" - Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd" - Option "XkbRules" "xorg" - Option "XkbModel" "evdev" - Option "XkbLayout" "us" -EndSection - -Section "InputDevice" - Identifier "Configured Mouse" - Driver "vmmouse" - Option "CorePointer" - Option "Device" "/dev/input/mice" - Option "Protocol" "ImPS/2" - Option "ZAxisMapping" "4 5" - Option "Emulate3Buttons" "true" -EndSection - -Section "InputDevice" - Identifier "Qemu Tablet" - Driver "evdev" - Option "CorePointer" - Option "Device" "/dev/input/touchscreen0" - Option "USB" "on" -EndSection - Section "Monitor" Identifier "Generic Monitor" Option "DPMS" @@ -57,8 +29,5 @@ EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" - InputDevice "Generic Keyboard" - # InputDevice "Configured Mouse" - InputDevice "QEMU Tablet" Option "AllowEmptyInput" "no" EndSection diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf index bbda9eaa63..c12d92c201 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf @@ -2,34 +2,6 @@ Section "Files" EndSection -Section "InputDevice" - Identifier "Generic Keyboard" - Driver "evdev" - Option "CoreKeyboard" - Option "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd" - Option "XkbRules" "xorg" - Option "XkbModel" "evdev" - Option "XkbLayout" "us" -EndSection - -Section "InputDevice" - Identifier "Configured Mouse" - Driver "vmmouse" - Option "CorePointer" - Option "Device" "/dev/input/mice" - Option "Protocol" "ImPS/2" - Option "ZAxisMapping" "4 5" - Option "Emulate3Buttons" "true" -EndSection - -Section "InputDevice" - Identifier "Qemu Tablet" - Driver "evdev" - Option "CorePointer" - Option "Device" "/dev/input/touchscreen0" - Option "USB" "on" -EndSection - Section "Monitor" Identifier "Generic Monitor" Option "DPMS" @@ -57,8 +29,5 @@ EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" - InputDevice "Generic Keyboard" - # InputDevice "Configured Mouse" - InputDevice "QEMU Tablet" Option "AllowEmptyInput" "no" EndSection diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb index e07c204c74..4c442bc712 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb @@ -7,10 +7,6 @@ PR = "r33" SRC_URI = "file://xorg.conf" -SRC_URI_append_libc-musl = "\ - file://10-preload-modules.conf \ -" - S = "${WORKDIR}" CONFFILES_${PN} = "${sysconfdir}/X11/xorg.conf" @@ -25,7 +21,3 @@ do_install () { install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/ fi } - -do_install_append_libc-musl () { - install -Dm 0644 ${WORKDIR}/10-preload-modules.conf ${D}/${sysconfdir}/X11/xorg.conf.d/10-preload-modules.conf -} diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc index 29503b1a53..1650c7994c 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc @@ -27,7 +27,7 @@ inherit distro_features_check REQUIRED_DISTRO_FEATURES = "x11" PROTO_DEPS = "randrproto renderproto fixesproto damageproto xextproto xproto xf86dgaproto xf86miscproto xf86vidmodeproto compositeproto recordproto resourceproto videoproto scrnsaverproto xineramaproto fontsproto kbproto inputproto bigreqsproto xcmiscproto presentproto" -LIB_DEPS = "pixman libxfont xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess" +LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess" DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util" # Split out some modules and extensions from the main package @@ -71,7 +71,7 @@ PACKAGES =+ "${PN}-sdl \ SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver" INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi" -XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp" +XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput" RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}" RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}" RDEPENDS_${PN}-xvfb += "xkeyboard-config" @@ -117,12 +117,14 @@ EXTRA_OECONF += "--with-fop=no \ --sysconfdir=/etc/X11 \ --localstatedir=/var \ --with-xkb-output=/var/lib/xkb \ + WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \ " +OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence" PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri glx', '', d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "xwayland", "", d)} \ - ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'xwayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ " PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev" @@ -138,7 +140,7 @@ PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml- PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus," PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd" PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xineramaproto" -PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland libepoxy" +PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy" # Xorg requires a SHA1 implementation, pick one XORG_CRYPTO ??= "openssl" @@ -170,10 +172,10 @@ python populate_packages_prepend() { shell=True, env=newenv, stdout=subprocess.PIPE) stdout, stderr = p.communicate() output = stdout.decode("utf-8").split(".")[0] - mlprefix = d.getVar('MLPREFIX', True) or '' + mlprefix = d.getVar('MLPREFIX') or '' return "%sxorg-abi-%s-%s" % (mlprefix, name, output) - pn = d.getVar("PN", True) + pn = d.getVar("PN") d.appendVar("RPROVIDES_" + pn, " " + get_abi("input")) d.appendVar("RPROVIDES_" + pn, " " + get_abi("video")) } diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch new file mode 100644 index 0000000000..16ec3edb3b --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch @@ -0,0 +1,61 @@ +Discover monotonic clock using compile-time check + +monotonic clock check does not work when cross-compiling. + +Upstream-Status: Denied [Does not work on OpenBSD] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> + + + +Original patch follows: + +When xorg-xserver is being cross-compiled, there is currently no way +for us to detect whether the monotonic clock is available on the +target system, because we aren't able to run a test program on the host +system. Currently, in this situation, we default to not use the +monotonic clock. One problem with this situation is that the user will +be treated as idle when the date is updated. + +To fix this situation, we now use a compile-time check to detect whether the +monotonic clock is available. This check can run just fine when we are +cross-compiling. + +Signed-off-by: David James <davidjames at google.com> +--- + configure.ac | 17 +++++++---------- + 1 file changed, 7 insertions(+), 10 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f7ab48c..26e85cd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1048,19 +1048,16 @@ if ! test "x$have_clock_gettime" = xno; then + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" + fi + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include <time.h> +- +-int main(int argc, char *argv[[]]) { +- struct timespec tp; +- +- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) ++#include <unistd.h> ++int main() { ++#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) ++ #error No monotonic clock ++#endif + return 0; +- else +- return 1; + } +- ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], +- [MONOTONIC_CLOCK="cross compiling"]) ++]])],[MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no]) + + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch new file mode 100644 index 0000000000..eafd07a5f1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch @@ -0,0 +1,38 @@ +From 963428f914c42270d3312d4f0c0840565521534e Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Wed, 16 Nov 2016 00:41:51 +0200 +Subject: [PATCH 2/2] configure.ac: Fix wayland-scanner and protocols locations + +We want to use the wayland-scanner in path (native sysroot) +instead of using pkg-config which gives us target paths. + +The protocols paths on the other hand need to be prefixed with the +(allarch) sysroot because, again, pkg-config gives us target paths. + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + configure.ac | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 58f1567..383a7df 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2525,11 +2525,9 @@ if test "x$XWAYLAND" = xyes; then + AC_MSG_ERROR([Xwayland requires CLOCK_MONOTONIC support.]) + fi + +- WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client` +- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],, +- [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH]) ++ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner]) + +- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`) ++ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, ${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`) + fi + + +-- +2.1.4 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch new file mode 100644 index 0000000000..beed6cb4a4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch @@ -0,0 +1,47 @@ +From cf407b16cd65ad6e26a9c8e5984e163409a5c0f7 Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj <prabhu.sundararaj@nxp.com> +Date: Mon, 30 Jan 2017 16:32:06 -0600 +Subject: [PATCH] Remove check for useSIGIO option + +Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removes the configure of useSIGIO +option. + +As the xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO +and OsReleaseSIGIO. + +No longer the check for useSIGIO is needed + +Upstream-Status: Pending + +Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com> +--- + hw/xfree86/os-support/shared/sigio.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c +index 884a71c..be76498 100644 +--- a/hw/xfree86/os-support/shared/sigio.c ++++ b/hw/xfree86/os-support/shared/sigio.c +@@ -185,9 +185,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) + int i; + int installed = FALSE; + +- if (!xf86Info.useSIGIO) +- return 0; +- + for (i = 0; i < MAX_FUNCS; i++) { + if (!xf86SigIOFuncs[i].f) { + if (xf86IsPipe(fd)) +@@ -256,9 +253,6 @@ xf86RemoveSIGIOHandler(int fd) + int max; + int ret; + +- if (!xf86Info.useSIGIO) +- return 0; +- + max = 0; + ret = 0; + for (i = 0; i < MAX_FUNCS; i++) { +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch new file mode 100644 index 0000000000..5243761f1e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch @@ -0,0 +1,46 @@ +From 5028ef46ff4ab0930224b71024a7349b05610d42 Mon Sep 17 00:00:00 2001 +From: Stefan Agner <stefan@agner.ch> +Date: Thu, 22 Dec 2016 15:41:06 +0100 +Subject: [PATCH] modesetting: Fix 16 bit depth/bpp mode + +When setting DefaultDepth to 16 in the Screen section, the current +code requests a 32 bpp framebuffer, however the X-Server seems to +assumes 16 bpp. + +Fixes commit 21217d02168d ("modesetting: Implement 32->24 bpp +conversion in shadow update") + +Signed-off-by: Stefan Agner <stefan@agner.ch> + +Upstream-Status: Submitted [1] + +[1] https://lists.x.org/archives/xorg-devel/2016-December/052113.html +--- + hw/xfree86/drivers/modesetting/driver.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c +index d7030e5..647ad83 100644 +--- a/hw/xfree86/drivers/modesetting/driver.c ++++ b/hw/xfree86/drivers/modesetting/driver.c +@@ -930,7 +930,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) + "Using 24bpp hw front buffer with 32bpp shadow\n"); + defaultbpp = 32; + } else { +- ms->drmmode.kbpp = defaultbpp; ++ ms->drmmode.kbpp = 0; + } + bppflags = PreferConvert24to32 | SupportConvert24to32 | Support32bppFb; + +@@ -950,6 +950,8 @@ PreInit(ScrnInfoPtr pScrn, int flags) + return FALSE; + } + xf86PrintDepthBpp(pScrn); ++ if (!ms->drmmode.kbpp) ++ ms->drmmode.kbpp = pScrn->bitsPerPixel; + + /* Process the options */ + xf86CollectOptions(pScrn, NULL); +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch new file mode 100644 index 0000000000..23c8049896 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch @@ -0,0 +1,76 @@ +From 215f894965df5fb0bb45b107d84524e700d2073c Mon Sep 17 00:00:00 2001 +From: Michal Srb <msrb@suse.com> +Date: Wed, 24 May 2017 15:54:40 +0300 +Subject: [PATCH] dix: Disallow GenericEvent in SendEvent request. + +The SendEvent request holds xEvent which is exactly 32 bytes long, no more, +no less. Both ProcSendEvent and SProcSendEvent verify that the received data +exactly match the request size. However nothing stops the client from passing +in event with xEvent::type = GenericEvent and any value of +xGenericEvent::length. + +In the case of ProcSendEvent, the event will be eventually passed to +WriteEventsToClient which will see that it is Generic event and copy the +arbitrary length from the receive buffer (and possibly past it) and send it to +the other client. This allows clients to copy unitialized heap memory out of X +server or to crash it. + +In case of SProcSendEvent, it will attempt to swap the incoming event by +calling a swapping function from the EventSwapVector array. The swapped event +is written to target buffer, which in this case is local xEvent variable. The +xEvent variable is 32 bytes long, but the swapping functions for GenericEvents +expect that the target buffer has size matching the size of the source +GenericEvent. This allows clients to cause stack buffer overflows. + +Signed-off-by: Michal Srb <msrb@suse.com> +Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +CVE: CVE-2017-10971 + +Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=215f894965df5fb0bb45b107d84524e700d2073c] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + dix/events.c | 6 ++++++ + dix/swapreq.c | 7 +++++++ + 2 files changed, 13 insertions(+) + +diff --git a/dix/events.c b/dix/events.c +index 3e3a01e..d3a33ea 100644 +--- a/dix/events.c ++++ b/dix/events.c +@@ -5366,6 +5366,12 @@ ProcSendEvent(ClientPtr client) + client->errorValue = stuff->event.u.u.type; + return BadValue; + } ++ /* Generic events can have variable size, but SendEvent request holds ++ exactly 32B of event data. */ ++ if (stuff->event.u.u.type == GenericEvent) { ++ client->errorValue = stuff->event.u.u.type; ++ return BadValue; ++ } + if (stuff->event.u.u.type == ClientMessage && + stuff->event.u.u.detail != 8 && + stuff->event.u.u.detail != 16 && stuff->event.u.u.detail != 32) { +diff --git a/dix/swapreq.c b/dix/swapreq.c +index 719e9b8..6785059 100644 +--- a/dix/swapreq.c ++++ b/dix/swapreq.c +@@ -292,6 +292,13 @@ SProcSendEvent(ClientPtr client) + swapl(&stuff->destination); + swapl(&stuff->eventMask); + ++ /* Generic events can have variable size, but SendEvent request holds ++ exactly 32B of event data. */ ++ if (stuff->event.u.u.type == GenericEvent) { ++ client->errorValue = stuff->event.u.u.type; ++ return BadValue; ++ } ++ + /* Swap event */ + proc = EventSwapVector[stuff->event.u.u.type & 0177]; + if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */ +-- +1.7.9.5 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch new file mode 100644 index 0000000000..5c9887afa1 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch @@ -0,0 +1,55 @@ +From 8caed4df36b1f802b4992edcfd282cbeeec35d9d Mon Sep 17 00:00:00 2001 +From: Michal Srb <msrb@suse.com> +Date: Wed, 24 May 2017 15:54:41 +0300 +Subject: [PATCH] Xi: Verify all events in ProcXSendExtensionEvent. + +The requirement is that events have type in range +EXTENSION_EVENT_BASE..lastEvent, but it was tested +only for first event of all. + +Signed-off-by: Michal Srb <msrb@suse.com> +Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +CVE: CVE-2017-10971 + +Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=8caed4df36b1f802b4992edcfd282cbeeec35d9d] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + Xi/sendexev.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/Xi/sendexev.c b/Xi/sendexev.c +index 1cf118a..5e63bfc 100644 +--- a/Xi/sendexev.c ++++ b/Xi/sendexev.c +@@ -117,7 +117,7 @@ SProcXSendExtensionEvent(ClientPtr client) + int + ProcXSendExtensionEvent(ClientPtr client) + { +- int ret; ++ int ret, i; + DeviceIntPtr dev; + xEvent *first; + XEventClass *list; +@@ -141,10 +141,12 @@ ProcXSendExtensionEvent(ClientPtr client) + /* The client's event type must be one defined by an extension. */ + + first = ((xEvent *) &stuff[1]); +- if (!((EXTENSION_EVENT_BASE <= first->u.u.type) && +- (first->u.u.type < lastEvent))) { +- client->errorValue = first->u.u.type; +- return BadValue; ++ for (i = 0; i < stuff->num_events; i++) { ++ if (!((EXTENSION_EVENT_BASE <= first[i].u.u.type) && ++ (first[i].u.u.type < lastEvent))) { ++ client->errorValue = first[i].u.u.type; ++ return BadValue; ++ } + } + + list = (XEventClass *) (first + stuff->num_events); +-- +1.7.9.5 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch new file mode 100644 index 0000000000..54ba481024 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch @@ -0,0 +1,50 @@ +From ba336b24052122b136486961c82deac76bbde455 Mon Sep 17 00:00:00 2001 +From: Michal Srb <msrb@suse.com> +Date: Wed, 24 May 2017 15:54:42 +0300 +Subject: [PATCH] Xi: Do not try to swap GenericEvent. + +The SProcXSendExtensionEvent must not attempt to swap GenericEvent because +it is assuming that the event has fixed size and gives the swapping function +xEvent-sized buffer. + +A GenericEvent would be later rejected by ProcXSendExtensionEvent anyway. + +Signed-off-by: Michal Srb <msrb@suse.com> +Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +CVE: CVE-2017-10971 + +Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=ba336b24052122b136486961c82deac76bbde455] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + Xi/sendexev.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/Xi/sendexev.c b/Xi/sendexev.c +index 5e63bfc..5c2e0fc 100644 +--- a/Xi/sendexev.c ++++ b/Xi/sendexev.c +@@ -95,9 +95,17 @@ SProcXSendExtensionEvent(ClientPtr client) + + eventP = (xEvent *) &stuff[1]; + for (i = 0; i < stuff->num_events; i++, eventP++) { ++ if (eventP->u.u.type == GenericEvent) { ++ client->errorValue = eventP->u.u.type; ++ return BadValue; ++ } ++ + proc = EventSwapVector[eventP->u.u.type & 0177]; +- if (proc == NotImplemented) /* no swapping proc; invalid event type? */ ++ /* no swapping proc; invalid event type? */ ++ if (proc == NotImplemented) { ++ client->errorValue = eventP->u.u.type; + return BadValue; ++ } + (*proc) (eventP, &eventT); + *eventP = eventT; + } +-- +1.7.9.5 + diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.1.bb index 6700565790..0d6df325e2 100644 --- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb +++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.1.bb @@ -1,8 +1,16 @@ require xserver-xorg.inc -SRC_URI += "file://musl-arm-inb-outb.patch" -SRC_URI[md5sum] = "d4842dfe3bd9a9d062f2fa1df9104a46" -SRC_URI[sha256sum] = "278459b2c31d61a15655d95a72fb79930c480a6bb8cf9226e48a07df8b1d31c8" +SRC_URI += "file://musl-arm-inb-outb.patch \ + file://0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch \ + file://0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch \ + file://0003-modesetting-Fix-16-bit-depth-bpp-mode.patch \ + file://0003-Remove-check-for-useSIGIO-option.patch \ + file://CVE-2017-10971-1.patch \ + file://CVE-2017-10971-2.patch \ + file://CVE-2017-10971-3.patch \ + " +SRC_URI[md5sum] = "caa8ee7b2950abbf734347d137529fb6" +SRC_URI[sha256sum] = "79ae2cf39d3f6c4a91201d8dad549d1d774b3420073c5a70d390040aa965a7fb" # These extensions are now integrated into the server, so declare the migration # path for in-place upgrades. |