From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id C7B0D87D58; Fri, 30 Sep 2022 12:50:25 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id DDE4C87D46; Fri, 30 Sep 2022 12:50:22 +0000 (UTC) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by atuin.qyliss.net (Postfix) with ESMTPS id 1E48487D40 for ; Fri, 30 Sep 2022 12:50:21 +0000 (UTC) Received: by mail-ej1-x635.google.com with SMTP id sd10so8865362ejc.2 for ; Fri, 30 Sep 2022 05:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unikie.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=ygdJuiOtcsu5Dl8LiRxKx2/lVry0JqWQ+PVHpSgPS3g=; b=XLcrWo+8JF+dyCP/xCm0zT79qjaIYbs6kRFhvaX01VL+3iq5O5uaCoTCcbtUrpH22t MoNdE/ajEbjUHVf0RUy1zgILtDztcP1bnlmovVwQo82XIAcMUouqlRJfO+16+ZxqqCoI HIYUqW95MXZSUE5HgsXAaiZMbbiowsAah3WmOQmw9bya4Y/RL0KTPJSSJ+xVNACimvqn SMgN4U0dRO+rB+ASWyerqIVCvXKrL4ruJi93KNVNCNBTPEraaq6iS/jt6HP9Dn/QXzLh tElV6dRSqToWkxOMNLptqXRvf4lhBiOTYJZhvQ03tuBrlz1xLesFebd6NjXfYdQnzK56 ZZ0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ygdJuiOtcsu5Dl8LiRxKx2/lVry0JqWQ+PVHpSgPS3g=; b=PV2RWcm3CqCfN/hPadoA/x0X+1P5gdcvuwQjwan0DROg/SaB+8lbMCSbi/N1RRfioM SganxUjeExqSAz8x4IeLP7zTBwdsKOh3DdWUfzwvI3vL5dtXt+ND/1TxOro5nGThAkMQ sVt4ASBcH+2RWZHFIoMg04DyoRvcZ/w4yJAuN5q6LMWL/vWXiQxK48QKeS0SNVIqwSOI 8M81jmc0EiFXDsSs2DA1gZB1Jux5aD/RAdb7wToBPnIBkuTcM0E6/kIZxG023rhJzoUo 86nZrBXosfvgQXCZzJ2ZtLwbzIbOMOvXjum4zzzz1XNLeTsmSgPoGNHAWvNr6nUs/dCB v0aw== X-Gm-Message-State: ACrzQf27/mNt4HOJ5vEgGUVZ+t7NEuQQWoW27O5rA3NIKMfHQabVTlsj vT03rcEV+p2urUluiG13Hc4QUA== X-Google-Smtp-Source: AMsMyM7RPe38gMJK+owj4PKyrr6VX8kvGoqWtMKuW3R5rQjC0RK631dN4jCn1pPyVRBxJtMY2DVGEQ== X-Received: by 2002:a17:907:2721:b0:77f:d471:47b3 with SMTP id d1-20020a170907272100b0077fd47147b3mr6351018ejl.591.1664542220824; Fri, 30 Sep 2022 05:50:20 -0700 (PDT) Received: from x220.qyliss.net (p54b8e692.dip0.t-ipconnect.de. [84.184.230.146]) by smtp.gmail.com with ESMTPSA id d7-20020a170906304700b0073d9630cbafsm1119100ejd.126.2022.09.30.05.50.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 05:50:20 -0700 (PDT) Received: by x220.qyliss.net (Postfix, from userid 1000) id 5A8344FE; Fri, 30 Sep 2022 12:49:49 +0000 (UTC) From: Alyssa Ross To: devel@spectrum-os.org Subject: [RFC PATCH 09/10] vm/app: add hello-wayland demo VM Date: Fri, 30 Sep 2022 12:49:39 +0000 Message-Id: <20220930124940.1013577-10-alyssa.ross@unikie.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220930124940.1013577-1-alyssa.ross@unikie.com> References: <20220930124940.1013577-1-alyssa.ross@unikie.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: WUVVFWIVVHJDUS4XZP6Z3AQ7W7WIZQJY X-Message-ID-Hash: WUVVFWIVVHJDUS4XZP6Z3AQ7W7WIZQJY X-MailFrom: alyssa.ross@unikie.com X-Mailman-Rule-Hits: header-match-devel.spectrum-os.org-0 X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1 CC: Puck Meerburg , Ville Ilvonen X-Mailman-Version: 3.3.5 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: hello-wayland is the simplest possible Wayland client. This VM is used to demonstrate Spectrum's new Wayland capabilities. Signed-off-by: Alyssa Ross --- More complex applications may not work yet. We've had issues with Sway hosts, where cloud-hypervisor will attempt to map the keymap read/write, which isn't allowed. I'm not sure if this is also the case for Weston. Testing them is the next thing on my todo list. host/initramfs/extfs.nix | 3 +++ vm/app/hello-wayland.nix | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 vm/app/hello-wayland.nix diff --git a/host/initramfs/extfs.nix b/host/initramfs/extfs.nix index bfaaf17..3c4ac1c 100644 --- a/host/initramfs/extfs.nix +++ b/host/initramfs/extfs.nix @@ -10,6 +10,7 @@ let }; appvm-catgirl = import ../../vm/app/catgirl.nix { inherit config; }; + appvm-hello-wayland = import ../../vm/app/hello-wayland.nix { inherit config; }; appvm-lynx = import ../../vm/app/lynx.nix { inherit config; }; in @@ -22,6 +23,8 @@ runCommand "ext.ext4" { chmod +w svc/data tar -C ${appvm-catgirl} -c data | tar -C svc -x chmod +w svc/data + tar -C ${appvm-hello-wayland} -c data | tar -C svc -x + chmod +w svc/data tar -C ${appvm-lynx} -c data | tar -C svc -x tar -cf ext.tar svc diff --git a/vm/app/hello-wayland.nix b/vm/app/hello-wayland.nix new file mode 100644 index 0000000..410220d --- /dev/null +++ b/vm/app/hello-wayland.nix @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2022 Unikie + +{ config ? import ../../../nix/eval-config.nix {} }: + +import ../../vm-lib/make-vm.nix { inherit config; } { + name = "appvm-hello-wayland"; + wayland = true; + run = config.pkgs.callPackage ( + { writeScript, hello-wayland, wayland-proxy-virtwl }: + writeScript "run-hello-wayland" '' + #!/bin/execlineb -P + if { modprobe virtio-gpu } + foreground { ln -ns /run/ext /run/opengl-driver } + foreground { mkdir /run/user } + foreground { + umask 077 + mkdir /run/user/0 + } + export XDG_RUNTIME_DIR /run/user/0 + ${wayland-proxy-virtwl}/bin/wayland-proxy-virtwl --virtio-gpu + ${hello-wayland}/bin/hello-wayland + '' + ) { }; +} -- 2.37.1