Skip to content

Commit

Permalink
Merge pull request #1382 from eric-ch/vglass
Browse files Browse the repository at this point in the history
vglass: replace surfman/input-server with vglass
  • Loading branch information
jandryuk authored May 28, 2021
2 parents 466193a + 401e525 commit 8522fd8
Show file tree
Hide file tree
Showing 126 changed files with 675 additions and 24,119 deletions.
1 change: 1 addition & 0 deletions conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ LAYERDEPENDS_xenclient-oe = " \
meta-python \
openembedded-layer \
core \
vglass \
"
4 changes: 2 additions & 2 deletions conf/machine/xenclient-dom0.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ PREFERRED_PROVIDER_libgl1 = "nvidia-lib"
MACHINE_FEATURES = "screen keyboard ethernet pci usbhost acpi ext2 x86"
MACHINE_FEATURES += "rtc"

module_conf_i915 = "options i915 enable_psr=0"

KERNEL_MODULE_PROBECONF += " \
i915 \
"
Expand All @@ -22,3 +20,5 @@ KERNEL_MODULE_AUTOLOAD += " \
hid-multitouch \
txt \
"

PREFERRED_PROVIDER_virtual/libivc = "libivc2"
2 changes: 2 additions & 0 deletions conf/machine/xenclient-stubdomain.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ require xenclient-common.conf
MACHINE_FEATURES = "screen keyboard ethernet pci acpi ext2 x86"

USE_VT = "0"

PREFERRED_PROVIDER_virtual/libivc = "libivc"
5 changes: 5 additions & 0 deletions conf/machine/xenclient-uivm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ require xenclient-common.conf
MACHINE_FEATURES = "screen keyboard ethernet pci acpi ext2 x86"

USE_VT = "0"

module_conf_xen-fbfront = "blacklist xen-fbfront"
KERNEL_MODULE_PROBECONF += " \
xen-fbfront \
"
1 change: 1 addition & 0 deletions recipes-core/images/xenclient-dom0-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ BAD_RECOMMENDATIONS += " \
avahi-daemon \
avahi-autoipd \
${@bb.utils.contains('IMAGE_FEATURES', 'web-certificates', '', 'ca-certificates', d)} \
libivc \
"

IMAGE_INSTALL += "\
Expand Down
4 changes: 4 additions & 0 deletions recipes-core/images/xenclient-stubdomain-initramfs-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ IMAGE_FSTYPES = "cpio.gz"

COMPATIBLE_MACHINE = "(xenclient-stubdomain)"

BAD_RECOMMENDATIONS += " \
libivc2 \
"

IMAGE_INSTALL = " \
busybox \
bridge-utils \
Expand Down
5 changes: 2 additions & 3 deletions recipes-core/images/xenclient-uivm-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ XSERVER = " \
xserver-xorg \
xf86-input-evdev \
xf86-input-mouse \
xf86-video-fbdev \
xf86-input-keyboard \
xf86-video-openxtfb \
"

IMAGE_INSTALL += "\
Expand All @@ -55,7 +55,6 @@ IMAGE_INSTALL += "\
packagegroup-xenclient-xfce-minimal \
openssh \
packagegroup-base \
xenfb2 \
kernel-modules \
argo-module \
libargo \
Expand Down Expand Up @@ -89,7 +88,6 @@ IMAGE_INSTALL += "\
glibc-gconv-libjis \
glibc-gconv-euc-jp \
mobile-broadband-provider-info \
shutdown-screen \
ttf-dejavu-sans \
ttf-dejavu-sans-mono \
uim \
Expand All @@ -98,6 +96,7 @@ IMAGE_INSTALL += "\
anthy \
matchbox-keyboard \
matchbox-keyboard-im \
kernel-module-openxtfb \
"

require xenclient-version.inc
Expand Down
7 changes: 3 additions & 4 deletions recipes-core/initrdscripts/initramfs-stubdomain/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ exec 0< /dev/hvc0
exec 1> /dev/hvc0
exec 2> /dev/hvc0

## the modprobe of busybox-static is broken
## so we have to use insmod directly
insmod /lib/modules/`uname -r`/extra/xen-argo.ko

sync
mkdir -p /proc /sys /mnt /tmp
mount -t proc proc /proc
Expand All @@ -52,6 +48,9 @@ for arg in $KERNEL_CMDLINE; do
esac
done

modprobe xen-argo
modprobe ivc

if [ "${LOGLVL}" = "debug" ]; then
cut -f1,2,3,4,5 -d ' ' /proc/modules
fi
Expand Down
6 changes: 2 additions & 4 deletions recipes-core/packagegroups/packagegroup-xenclient-dom0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ RDEPENDS_${PN} = " \
ovmf-firmware \
xcpmd \
xen-vif-scripts-dom0 \
xenclient-input-daemon \
xenclient-dom0-tweaks \
xenclient-splash-images \
xenclient-config-access \
Expand Down Expand Up @@ -94,16 +93,13 @@ RDEPENDS_${PN} = " \
libicbinn-server \
screen \
xenclient-pcrdiff \
drm-surfman-plugin \
eject \
linux-input \
iputils-ping \
vusb-daemon \
xenmgr-data \
updatemgr \
uid \
surfman \
linuxfb-surfman-plugin \
xenmgr \
xen-tools-xenstore \
tpm2-tss \
Expand All @@ -112,6 +108,8 @@ RDEPENDS_${PN} = " \
pesign \
ipxe \
udev-extraconf-dom0 \
vglass \
disman \
"

# OE upgrade - temporarly disabled:
Expand Down
13 changes: 3 additions & 10 deletions recipes-extended/qemu-dm/qemu-dm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ DEPENDS = " \
libargo \
zlib \
libcap-ng \
libdmbus \
pixman \
"

Expand Down Expand Up @@ -43,15 +42,9 @@ SRC_URI += "file://0001-configure-use-valid-args-testing-sem_timedwait.patch \
file://generic-xenstore-extensions.patch \
file://readonly-ide.patch \
file://hvm-param-dm-domain.patch \
file://dmbus.patch \
file://switcher.patch \
file://acpi.patch \
file://xenmou.patch \
file://argo-configure.patch \
file://atapi-pass-through.patch \
file://vbe-xt-extensions.patch \
file://vga-spinlock.patch \
file://vga-shadow-bda.patch \
file://surfman-dcl.patch \
file://audio-policy.patch \
file://msix-cap-disable.patch \
file://openxtaudio.patch \
Expand All @@ -62,7 +55,6 @@ SRC_URI += "file://0001-configure-use-valid-args-testing-sem_timedwait.patch \
file://acpi-wakeup.patch \
file://openxt-misc-fixes.patch \
file://qmp-argo-char-driver.patch \
file://exit-mainloop-on-reset.patch \
file://write-acpi-state-to-xenstore.patch \
file://set-blockdev-ro.patch \
file://block-remove-unused-block-format-support.patch \
Expand All @@ -77,6 +69,8 @@ S = "${WORKDIR}/qemu-${PV}"

inherit autotools-brokensep pkgconfig python3native

require recipes-extended/qemu-dm/qemu-dm-vglass.inc

# Include a minimal amount of blobs by default.
FILES_${PN} += "/usr/share/qemu/keymaps/en-us \
/usr/share/qemu/keymaps/commons \
Expand Down Expand Up @@ -127,7 +121,6 @@ EXTRA_OECONF += " \
--disable-tpm \
--enable-pie \
--enable-werror \
--enable-surfman \
--enable-atapi-pt \
--enable-atapi-pt-argo \
--enable-readonly-ide \
Expand Down
10 changes: 5 additions & 5 deletions recipes-extended/qemu-dm/qemu-dm/acpi-pm-feature.patch
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PATCHES
################################################################################
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -738,15 +738,24 @@ void acpi_send_gpe_event(ACPIREGS *ar, q
@@ -742,15 +742,24 @@ void acpi_send_gpe_event(ACPIREGS *ar, q

void acpi_update_sci(ACPIREGS *regs, qemu_irq irq)
{
Expand Down Expand Up @@ -134,10 +134,10 @@ PATCHES
{
--- a/hw/xen/Makefile.objs
+++ b/hw/xen/Makefile.objs
@@ -6,3 +6,4 @@ obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen
@@ -4,3 +4,4 @@ common-obj-$(CONFIG_XEN) += xen_backend.
obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o
obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_graphics.o xen_pt_msi.o
obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt_load_rom.o
obj-$(CONFIG_XEN) += xenmou.o
+obj-$(CONFIG_XEN) += xen_acpi_pm.o
--- /dev/null
+++ b/hw/xen/xen_acpi_pm.c
Expand Down Expand Up @@ -1349,15 +1349,15 @@ PATCHES
DEF("no-reboot", 0, QEMU_OPTION_no_reboot, \
--- a/vl.c
+++ b/vl.c
@@ -132,6 +132,7 @@ int main(int argc, char **argv)
@@ -131,6 +131,7 @@ int main(int argc, char **argv)
#include "qapi/qapi-commands-ui.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/iothread.h"
+#include "hw/xen/xen_acpi_pm.h"

#define MAX_VIRTIO_CONSOLES 1

@@ -3865,6 +3866,15 @@ int main(int argc, char **argv, char **e
@@ -3860,6 +3861,15 @@ int main(int argc, char **argv, char **e
}
xen_domid_restrict = true;
break;
Expand Down
2 changes: 1 addition & 1 deletion recipes-extended/qemu-dm/qemu-dm/acpi-wakeup.patch
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Applied in any order:
common-obj-$(call lnot,$(CONFIG_IPMI)) += ipmi-stub.o
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -614,6 +614,7 @@ void acpi_pm1_cnt_update(ACPIREGS *ar,
@@ -618,6 +618,7 @@ void acpi_pm1_cnt_update(ACPIREGS *ar,
/* ACPI specs 3.0, 4.7.2.5 */
if (sci_enable) {
ar->pm1.cnt.cnt |= ACPI_BITMASK_SCI_ENABLE;
Expand Down
14 changes: 1 addition & 13 deletions recipes-extended/qemu-dm/qemu-dm/acpi.patch
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,7 @@ PATCHES
}
--- a/hw/xen/xen_backend.c
+++ b/hw/xen/xen_backend.c
@@ -37,6 +37,9 @@

#include <xen/grant_table.h>

+#include "ui/xen-input.h"
+#include "hw/xen/xen-dmbus.h"
+
DeviceState *xen_sysdev;
BusState *xen_sysbus;

@@ -955,3 +958,19 @@ int xenstore_generic_init(void)
@@ -955,3 +955,17 @@ int xenstore_generic_init(void)

return 0;
}
Expand All @@ -199,8 +189,6 @@ PATCHES
+ return -1;
+ }
+
+ xen_input_send_shutdown(type);
+
+ return xenstore_write_int(dompath, "power-state", type);
+}
--- a/include/hw/xen/xen.h
Expand Down
47 changes: 47 additions & 0 deletions recipes-extended/qemu-dm/qemu-dm/argo-configure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
--- a/configure
+++ b/configure
@@ -486,6 +486,7 @@ docker="no"
debug_mutex="no"
libpmem=""
libudev="no"
+libargo="no"

# cross compilers defaults, can be overridden with --cross-cc-ARCH
cross_cc_aarch64="aarch64-linux-gnu-gcc"
@@ -5686,6 +5687,16 @@ if test "$libudev" != "no" ; then
fi
fi

+##########################################
+# argo support probe
+if test "$libargo" = "yes"; then
+ libargo_cflags=$($pkg_config --cflags libargo)
+ libargo_libs=$($pkg_config --libs libargo)
+ if ! compile_prog "$libargo_cflags" "$libargo_libs"; then
+ feature_not_found "libargo" "Install libargo devel"
+ fi
+fi
+
# Now we've finished running tests it's OK to add -Werror to the compiler flags
if test "$werror" = "yes"; then
QEMU_CFLAGS="-Werror $QEMU_CFLAGS"
@@ -6122,6 +6133,7 @@ echo "capstone $capstone"
echo "docker $docker"
echo "libpmem support $libpmem"
echo "libudev $libudev"
+echo "libargo $libargo"

if test "$sdl_too_old" = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -6997,6 +7009,11 @@ if test "$libudev" != "no"; then
echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
fi

+if test "$libargo" = "yes" ; then
+ echo "LIBARGO_CFLAGS=$libargo_cflags" >> $config_host_mak
+ echo "LIBARGO_LIBS=$libargo_libs" >> $config_host_mak
+fi
+
# use included Linux headers
if test "$linux" = "yes" ; then
mkdir -p linux-headers
21 changes: 15 additions & 6 deletions recipes-extended/qemu-dm/qemu-dm/atapi-pass-through.patch
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ Ross Philipson, <philipsonr@ainfosec.com>, 10/13/2016
block-obj-y += null.o mirror.o commit.o io.o create.o
block-obj-y += throttle-groups.o
block-obj-$(CONFIG_LINUX) += nvme.o
@@ -61,3 +62,5 @@ qcow.o-libs := -lz
linux-aio.o-libs := -laio
parallels.o-cflags := $(LIBXML2_CFLAGS)
parallels.o-libs := $(LIBXML2_LIBS)
+atapi-pt-protocol.o-cflags := $(LIBARGO_CFLAGS)
+atapi-pt-protocol.o-libs := $(LIBARGO_LIBS)
--- /dev/null
+++ b/block/atapi-pt-protocol.c
@@ -0,0 +1,1503 @@
Expand Down Expand Up @@ -1791,7 +1797,7 @@ Ross Philipson, <philipsonr@ainfosec.com>, 10/13/2016
break;
--- a/configure
+++ b/configure
@@ -452,6 +452,8 @@ crypto_afalg="no"
@@ -451,6 +451,8 @@ crypto_afalg="no"
seccomp=""
glusterfs=""
stubdom="no"
Expand All @@ -1800,22 +1806,22 @@ Ross Philipson, <philipsonr@ainfosec.com>, 10/13/2016
glusterfs_xlator_opt="no"
glusterfs_discard="no"
glusterfs_fallocate="no"
@@ -1357,6 +1359,14 @@ for opt do
@@ -1353,6 +1355,14 @@ for opt do
;;
--enable-glusterfs) glusterfs="yes"
;;
+ --enable-atapi-pt) atapipt="yes"
+ ;;
+ --disable-atapi-pt) atapipt="no"
+ ;;
+ --enable-atapi-pt-argo) atapiptargo="yes" && atapipt="yes"
+ --enable-atapi-pt-argo) atapiptargo="yes" && atapipt="yes" && libargo="yes"
+ ;;
+ --disable-atapi-pt-argo) atapiptargo="no"
+ ;;
--disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane)
echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2
;;
@@ -6128,6 +6138,8 @@ echo "GlusterFS support $glusterfs"
@@ -6104,6 +6114,8 @@ echo "GlusterFS support $glusterfs"
echo "gcov $gcov_tool"
echo "gcov enabled $gcov"
echo "OpenXT stubdomain support $stubdom"
Expand All @@ -1824,7 +1830,7 @@ Ross Philipson, <philipsonr@ainfosec.com>, 10/13/2016
echo "TPM support $tpm"
echo "libssh2 support $libssh2"
echo "TPM passthrough $tpm_passthrough"
@@ -6802,6 +6814,14 @@ if test "$stubdom" = "yes" ; then
@@ -6776,6 +6788,14 @@ if test "$stubdom" = "yes" ; then
echo "CONFIG_STUBDOM=y" >> $config_host_mak
fi

Expand All @@ -1841,11 +1847,14 @@ Ross Philipson, <philipsonr@ainfosec.com>, 10/13/2016
# TPM passthrough support?
--- a/hw/ide/Makefile.objs
+++ b/hw/ide/Makefile.objs
@@ -12,3 +12,4 @@ common-obj-$(CONFIG_AHCI) += ahci.o
@@ -12,3 +12,7 @@ common-obj-$(CONFIG_AHCI) += ahci.o
common-obj-$(CONFIG_AHCI) += ich.o
common-obj-$(CONFIG_ALLWINNER_A10) += ahci-allwinner.o
common-obj-$(CONFIG_IDE_SII3112) += sii3112.o
+common-obj-$(CONFIG_ATAPI_PT) += atapi_pt.o
+
+atapi-pt.o-cflags := $(LIBARGO_CFLAGS)
+atapi-pt.o-libs := $(LIBARGO_LIBS)
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -320,7 +320,10 @@ void ide_atapi_cmd_reply_end(IDEState *s
Expand Down
Loading

0 comments on commit 8522fd8

Please sign in to comment.