From patchwork Sun Jun 16 11:24:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1948290 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=O2Jky5zx; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::43d; helo=mail-wr1-x43d.google.com; envelope-from=swupdate+bncbd2zdgn6sekrbaexxozqmgqedmero5q@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-wr1-x43d.google.com (mail-wr1-x43d.google.com [IPv6:2a00:1450:4864:20::43d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W29fM1cDWz20Pb for ; Sun, 16 Jun 2024 21:24:59 +1000 (AEST) Received: by mail-wr1-x43d.google.com with SMTP id ffacd0b85a97d-36083bd1b12sf1656582f8f.1 for ; Sun, 16 Jun 2024 04:24:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718537089; cv=pass; d=google.com; s=arc-20160816; b=Qa0eUJ2emVrr8frOgRFwwExzRj6pbHE/mtRXbhDZaaXemlLZxQ4SNZhw08kLAHfyGD KtMws/6KUkGsbtsEpv2R3H682dkLFlxeUlsVfgjCHj/X8q7WtSUlNX+g4XYS5zg9zwaG zFHRXymlk3itjYL52ZizkEOYpHBd1x2mjcjNASKa5z625x2g1wf5hO7GG7qNoTHxOpnR xQxzf7hsh5LXkD/LKz/3KflE7YFnyJaO3wLdmiaC27g0JGh0axSllGlWPuqFudu2fOu6 y6VD5ugwuz1QhJ/hMfen6VS7XZ1vgdfhOPUfmc8evHJJZS7bvP3ozm+xcsD/MQ3wLTom Fiqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:ui-outboundreport:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=XJajcFtUsy1mJTHeNonH93pSp0SdIVsxhIza0919vyM=; fh=2XDONctVsZ+43+WXQdyy8kWDGsKmErkoAN7MPtpRxYM=; b=cTxtspGXjCVlJ5YKsVJ5WAGR0fb3/0JadJjFGRmaxUmfMMI1kGTOWibf9E9rtRxiF3 tXxcqUaHsmHByhbKHXpU8SmRt/ZDGVxbcVA8GlMT2+Kkvvj0w+K8peU+yGEuTe8JcUeq 26ADrulmnFYJTrVgIkF/xNHnsysejkjtTMkFjHFoqkfFOjJg3wJCYzXc7vzY5Jfr+bRu 2b/4A9vfyK2ocEqm/KwmYE7sf40FIVeOBF4u+N8GfWgqDCv0DeqYyaUW9XSN+F+KD/Pa 1rd8a/UciNCRK6jJcmX6/wkT1G50QXcvA3zhDT57kbhbABfBJ6C1ppIGssgcmF9bFycN nBrA==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=LpFhnMon; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1718537089; x=1719141889; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:ui-outboundreport:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=XJajcFtUsy1mJTHeNonH93pSp0SdIVsxhIza0919vyM=; b=O2Jky5zxlD62j7bW1pbVkb9R+DPzhhD8xrUwgeK9XdY6aWCt5aQUgtTHI+Gd9sXYHD gnzG24yl6urPuhsjQpZI1e7JLxmFHJLL8mTogUXF3xWK2sys30WZBCoIOBdcKeiceoYU wGvLLpQYjuZ0BDGtPYNIEZO/z65Ut7ExQTD+8jMOctC6S8eIybfm/paNUNYMmyqhCSSx vI8n4qqaYPTU2JgpF39w/RMMnpVESFZELmbAnZBrk0sa2ALFrQYZS+SFBo0vHH9F6HuC NsP5/YsAQHOSGP4iQ+EHN+cmzmLgnh1Vb4ATa6bvSRH3FBk40I3VAAK8ennz7PkA4rhj a1dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718537089; x=1719141889; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :ui-outboundreport:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=XJajcFtUsy1mJTHeNonH93pSp0SdIVsxhIza0919vyM=; b=J85x8L/U4yBdN5int5T022gPVzx9Hs0HNDW5A+pIR2wpqe0iWwNh+yXRfUnD3Zet6k cEPQ4sYWzmioH0YelJ3ZFk/vYpKVdW3zh+fcnnK0veW3gRfIfzD/LnpTaqXdaLV2wz5Z VtRzE3FEOD3gSIa8ZCzloe2qz8aVGNLKPRZM5ltCff/F9JUY/KsbIbGMNZBnXvakPWor hdRTlYiDJpYZ4uUHsyO8LaDtXAOaoLDFt1itvGX3TQSGZAK1K9pfJBgJ2LtyiQRsGW0s YjH4OuyYrj9bOVCqMQAw6kS/mGpoGAYs3w+aGjeGMWa3VLYH5tu/Yi2qdBb+UW5uqluj y2gw== Sender: swupdate@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXjytOQVQ+8m3Fc1R1FXeYpaIvdR8hDS4DLVt5NdJDlKymX8sWLv+0NegDmvjpgvpscbsaudDfhGHc82Y35k8DTRPunPMeqmdIh/e3CLQ== X-Gm-Message-State: AOJu0YwrASpmbyr5ayGHe9Ybf5Owf+cRUDgheXfkzglrkbdeAsbBqBC3 Qlp2k4XwZIQ5flJ7Ciw18JDXTo3kr64pPAtT5Oxs0N7c97XIvJxM X-Google-Smtp-Source: AGHT+IFVo1j1SN5bq8nJIpNAflv1vFPM+iYXR+L+TjZ9OSb/3gpqTCKM4WdA44H78+5z9KsIzTyAFQ== X-Received: by 2002:adf:efc9:0:b0:35f:219d:e529 with SMTP id ffacd0b85a97d-3607a78338cmr7270580f8f.47.1718537089031; Sun, 16 Jun 2024 04:24:49 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:adf:fbcd:0:b0:35f:1b09:66d4 with SMTP id ffacd0b85a97d-360718cfa28ls1651976f8f.0.-pod-prod-05-eu; Sun, 16 Jun 2024 04:24:46 -0700 (PDT) X-Received: by 2002:a5d:5344:0:b0:360:711b:114f with SMTP id ffacd0b85a97d-3607a74212amr6696924f8f.5.1718537086279; Sun, 16 Jun 2024 04:24:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718537086; cv=none; d=google.com; s=arc-20160816; b=H4myOeRaFRA8rUEMp7QK33piwji55v4z85vWilB47+OamG7xc1YYi/954VB3/WrGUr C1Sr/CyT+n4yno9qjztVOHTs5omtpplhMfdYJfmwuk/ATx9m6n+wHPcFdHc96XOX5QCE w10YKdKRbvhcMO+Bmzy/pe4oMqAkuWqD2ujehfQFrbqJE0UCuwl9YWhaGmHs9Z1NVeES sBxiCCDoC+/1LIIaIIHtY8RTkecr7khYAKd9uDU5umTQtYu3NLbKK/wPI4xEUBDepL15 36s5IkOgt9sYPh8nIQhQfpcESbwYTkCumxruOnSyjkjESDoEyesx2C2BIGTI/Aq3LR+v n4zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=hAOCjuzA8y/X82GI1t4hHSqBcDztP7pCHLKwFk7n8tc=; fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=; b=OSUxgYKebXTwoXMc59GtGCHjipAR8TBOmH3zIdI9/UCMaPERzyWNS0AYm3ZsC+U8H4 JmTAj5RlHfYakXpWqiRP6fUteC2J4AQpIFFt75ddwenpN47e7tBruSTTGMrx50jcp0Ls k53jACUdwV3PTlMSbVYxMoBTc4kyU1/yGMvHwpu1gibhHKILpoHIFNmflC2fAC7AOtbm p3VZPmR0vLF9ppK25Zad7DttRrKto42l11lgTqont8WDeLs32HYLTl8nfSjXaXkpSpGv JcRDbag8wGmJHJ+Eg14+RNwYlAJXWwdHWpCsCvd85t9iY07o9jd0xv3c0Jf3H8S+9Rng gRkA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=LpFhnMon; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Received: from mout.kundenserver.de (mout.kundenserver.de. [212.227.126.134]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-422855708b8si1154175e9.1.2024.06.16.04.24.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jun 2024 04:24:46 -0700 (PDT) Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) client-ip=212.227.126.134; X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from paperino.fritz.box ([88.217.136.221]) by mrelayeu.kundenserver.de (mreue012 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MEUaQ-1sBhFH2dqM-005X1r; Sun, 16 Jun 2024 13:24:45 +0200 From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [meta-swupdate] [PATCH 2/2] New GUI for recovery mode Date: Sun, 16 Jun 2024 13:24:36 +0200 Message-Id: <20240616112436.50001-3-stefano.babic@swupdate.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240616112436.50001-1-stefano.babic@swupdate.org> References: <20240616112436.50001-1-stefano.babic@swupdate.org> MIME-Version: 1.0 X-Provags-ID: V03:K1:QpsFXvKwkM4ZVShvQwX9ggReA2rCrL7UiF+I51KdR2dYIp3rAnW S6lLyRV+6SZoK1z6WGpIgpEY3RrI3oST7haGXCDq4zZsTood/zXrPj1FidhU0SdN0OOXlgr vlqYrQLi5ylN/xVaEy/zAuF5hczU/wLczxq2F+YmzH8kleNxCkVkygjt9yQWrwE28nOQoj2 IckFD20rQT8hN2XlhweFA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:6VJJ3bOQw7A=;xR1xdoyz6J3z55V4Nj0Lf/mI658 5eqPerQyaN0Bef+DWZ2yo7IRYZN40qQoBuno/sZkLERcnhTeSe65WvB9TzYN0pIn9gt924qAv 8PEjmXWBE7hSbdjFb57+GtpciHLIrAb0gIpTvCFVuwEteNEjh3dPzEqzsg0cxpPXblAbLDFCq ncNQ0YISULno2571ycvEOP82I54ek554RvXZeaCDesz/SMu/duh2R0Hv71kIiANOSEq/1K+2r 5CF28Vek/a9UTXUT4CvLvF07ZxZTogTFf4y1WWgTDHQIi7vE86Io1yCN0/z4GHQGYspljhZHm Uvqm3RPw7Ao6JVF+kObbBCZRv7sgB8hX+8PyISeIE/dYAI28CZ9y5Rebb+7UhljfeGtNh3HqB xcuHtCdEddisZODKH0tjDjnnSFBAdt85kFrBV/M1R1cA5I/F1ZnStxHip5xMvLGZd6AC7Z6/o zGuZXBsuKb5hPLY0veIwWT+Yitly8EWSUqCp/edLBlIwk7CftvYJJU3MQlKSVSFfp89ymbh/O CzLqbqT5yN4MQVdGx1Ht3G+ciSCOCu2tsb9dliQvzf30YxcuIlFFBYFkEYZAgNtoQJjmhEh1f NHTFbQtoiq4SZhopSvOUJmTer6d+A+sOOAqgtocT2EpImG58T39dQ72iw8IH40gV95X0LEd2O TVtmRcCaqaRSrTlz197WXyKZ4eHVxr7IlDob3Orx9zQh+se9UHxWT28xB8Vi2l77fb1SU2glw mmTZWCayG5UBK8wjLaU8hsZUlUDcucvik5mSU1/g+pdb8ACaN3cDKw= X-Original-Sender: stefano.babic@swupdate.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=LpFhnMon; spf=pass (google.com: domain of stefano.babic@swupdate.org designates 212.227.126.134 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , The rescueGUI is based on a graphic library (TeKUI) that is not maintained anymore. This is a replacement based on LVGL, with the same interfaces and the same look, but open to extensions in the future. Signed-off-by: Stefano Babic --- recipes-support/rescuegui/files/swupdate-gui | 72 +++++++++++++++++++ .../rescuegui/files/swupdate-gui.service | 11 +++ recipes-support/rescuegui/swupdate-gui_git.bb | 45 ++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 recipes-support/rescuegui/files/swupdate-gui create mode 100644 recipes-support/rescuegui/files/swupdate-gui.service create mode 100644 recipes-support/rescuegui/swupdate-gui_git.bb -- 2.34.1 diff --git a/recipes-support/rescuegui/files/swupdate-gui b/recipes-support/rescuegui/files/swupdate-gui new file mode 100644 index 0000000..4c8528f --- /dev/null +++ b/recipes-support/rescuegui/files/swupdate-gui @@ -0,0 +1,72 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: recovery_gui +# Required-Start: $local_fs +# Should-Start: +# Required-Stop: $local_fs +# Should-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start recovery_gui application +### END INIT INFO + +# The definition of actions: +# start start the service +# stop stop the service +# restart stop and restart the service if the service is already running, +# otherwise start the service + +# The start, stop, and restart, actions shall be supported +# by all init scripts; + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin + +DESC="GUI for SWUpdate" +NAME="recovery_gui" +DAEMON=/usr/bin/recovery_gui +PIDFILE=/var/run/$NAME.pid + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Function that starts the daemon/service +# +do_start() { + echo "Starting $DESC ..." + + #Export the the screen orientation + rotation=$(fw_printenv -n screen_orientation) + export SCREEN_ORIENTATION_ANGLE=${rotation} + echo 0 > /sys/class/graphics/fbcon/cursor_blink + export LD_PRELOAD=/lib/libpthread.so.0 + + #Start recovery_gui + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --exec $DAEMON +} + +# +# Function that stops the daemon/service +# +do_stop() { + echo "Stopping $DESC" + #Stop recovery_gui + start-stop-daemon --stop --pidfile $PIDFILE +} + +case "$1" in +start) + do_start + ;; +stop) + do_stop || exit $? + ;; +restart) + do_stop + do_start + ;; +*) + echo "Usage: $0 {start|stop|restart}" >&2 + exit 3 + ;; +esac diff --git a/recipes-support/rescuegui/files/swupdate-gui.service b/recipes-support/rescuegui/files/swupdate-gui.service new file mode 100644 index 0000000..fddfa31 --- /dev/null +++ b/recipes-support/rescuegui/files/swupdate-gui.service @@ -0,0 +1,11 @@ +[Unit] +Description=SWUpdate Light GUI +After=swupdate.service + +[Service] +Type=Simple +ExecStartPre=/bin/sh -c "echo 0 > /sys/class/graphics/fbcon/cursor_blink" +ExecStart=/usr/bin/recovery_gui + +[Install] +WantedBy=multi-user.target diff --git a/recipes-support/rescuegui/swupdate-gui_git.bb b/recipes-support/rescuegui/swupdate-gui_git.bb new file mode 100644 index 0000000..68875c3 --- /dev/null +++ b/recipes-support/rescuegui/swupdate-gui_git.bb @@ -0,0 +1,45 @@ +SUMMARY = "Recovery GUI application" +DESCRIPTION = "This recipe provides the GUI for recovery system and works with LVGL and framebuffer." + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=de4b1111cc7f3c8bc81546de6f9b24e4" + +DEPENDS:append = " \ + lvgl \ + swupdate \ + " + +SRC_URI = "git://github.com/sbabic/SWUpdateGUI.git;protocol=https;branch=main \ + file://swupdate-gui \ + file://swupdate-gui.service \ + " +SRCREV = "d6bd129b4cea1e5c53bcad077a7d25af8260ef84" + +S = "${WORKDIR}/git" + +inherit cmake update-rc.d systemd + +TARGET_CFLAGS:append = " -I${STAGING_INCDIR}/lvgl" +TARGET_CFLAGS:append = " -I${STAGING_INCDIR}/lvgl/lv_drivers" + +INITSCRIPT_NAME = "swupdate-gui" +INITSCRIPT_PARAMS = "defaults 90" +SYSTEMD_SERVICE:${PN} = "swupdate-gui.service" + +do_install:append () { + install -d ${D}${sysconfdir}/init.d + install -d ${D}${systemd_system_unitdir} + install -m 0755 ${WORKDIR}/swupdate-gui ${D}${sysconfdir}/init.d/ + install -m 644 ${WORKDIR}/swupdate-gui.service ${D}${systemd_system_unitdir} + install -d ${D}${sysconfdir}/recovery_gui + install -m 0644 ${S}/config/config.txt ${D}${sysconfdir}/recovery_gui/ + install -m 0755 ${S}/scripts/recovery-check-bridge-interface.sh ${D}${bindir} + install -m 0755 ${S}/scripts/recovery-edit-default-gateway.sh ${D}${bindir} + install -m 0755 ${S}/scripts/recovery-get-dhcp-status.sh ${D}${bindir} + install -m 0755 ${S}/scripts/recovery-set-dhcp.sh ${D}${bindir} + install -m 0755 ${S}/scripts/recovery-set-static.sh ${D}${bindir} +} + +RDEPENDS:${PN}:append = " \ + swupdate \ + "