diff --git a/recipes-support/qbootctl/files/0001-Fix-to-uint32_t-has-not-been-declared.patch b/recipes-support/qbootctl/files/0001-Fix-to-uint32_t-has-not-been-declared.patch new file mode 100644 index 000000000..1c1668424 --- /dev/null +++ b/recipes-support/qbootctl/files/0001-Fix-to-uint32_t-has-not-been-declared.patch @@ -0,0 +1,49 @@ +From 26d488b38a0357468b8657f283ad24a433e30beb Mon Sep 17 00:00:00 2001 +From: alefnode +Date: Thu, 4 May 2023 09:15:29 +0200 +Subject: [PATCH] Fix to << uint32_t has not been declared >> + +Link: https://gitlab.com/sdm845-mainline/qbootctl/-/commit/df63d7c21c19a3e3afb41d029b97b9d068880484 +Signed-off-by: Neil Armstrong +--- + bootctrl_impl.cpp | 1 + + gpt-utils.h | 1 + + qbootctl.cpp | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/bootctrl_impl.cpp b/bootctrl_impl.cpp +index 7c1a082..59fcc7d 100644 +--- a/bootctrl_impl.cpp ++++ b/bootctrl_impl.cpp +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include "utils.h" + #include "gpt-utils.h" +diff --git a/gpt-utils.h b/gpt-utils.h +index 319f3fe..f153012 100644 +--- a/gpt-utils.h ++++ b/gpt-utils.h +@@ -37,6 +37,7 @@ extern "C" { + #endif + #include + #include ++#include + + #define GPT_SIGNATURE "EFI PART" + #define HEADER_SIZE_OFFSET 12 +diff --git a/qbootctl.cpp b/qbootctl.cpp +index 0225f0f..3559e29 100644 +--- a/qbootctl.cpp ++++ b/qbootctl.cpp +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include "bootctrl.h" + diff --git a/recipes-support/qbootctl/files/qbootclt-bless-boot.service.in b/recipes-support/qbootctl/files/qbootclt-bless-boot.service.in new file mode 100644 index 000000000..6227a5c3e --- /dev/null +++ b/recipes-support/qbootctl/files/qbootclt-bless-boot.service.in @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# This file was copied from systemd at [1] +# +# https://github.com/systemd/systemd/blob/main/units/systemd-bless-boot.service.in +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Mark the Current Boot slot as Good +DefaultDependencies=no +Requires=boot-complete.target +After=local-fs.target boot-complete.target +Conflicts=shutdown.target +Before=shutdown.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=@bindir@/qbootctl -m diff --git a/recipes-support/qbootctl/qbootctl_0.1.2.bb b/recipes-support/qbootctl/qbootctl_0.1.2.bb new file mode 100644 index 000000000..c4fda08a3 --- /dev/null +++ b/recipes-support/qbootctl/qbootctl_0.1.2.bb @@ -0,0 +1,25 @@ +SUMMARY = "A port of the Qualcomm Android bootctrl HAL for musl/glibc userspace" +HOMEPAGE = "https://gitlab.com/sdm845-mainline/qbootctl" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1ebbd3e34237af26da5dc08a4e440464" + +SRCREV = "77b48f092a3690d587e2d3b1e30cf8bc2abf87e7" +SRC_URI = "git://gitlab.com/sdm845-mainline/qbootctl.git;protocol=https;branch=main \ + file://qbootclt-bless-boot.service.in \ + file://0001-Fix-to-uint32_t-has-not-been-declared.patch \ + " + +DEPENDS = "zlib" + +S = "${WORKDIR}/git" + +PV = "0.1.2" + +inherit meson systemd + +do_install:append () { + install -d ${D}${systemd_system_unitdir} + sed 's:@bindir@:${bindir}:' < ${WORKDIR}/qbootclt-bless-boot.service.in > ${D}${systemd_system_unitdir}/qbootclt-bless-boot.service +} + +SYSTEMD_SERVICE:${PN} = "qbootclt-bless-boot.service"