Skip to content

Commit

Permalink
Add qbootctl package
Browse files Browse the repository at this point in the history
Add qbootclt package to control the boot A/B slot flags.

Signed-off-by: Neil Armstrong <[email protected]>
  • Loading branch information
superna9999 committed Jun 19, 2023
1 parent 2482ad8 commit 52a55c2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
23 changes: 23 additions & 0 deletions recipes-support/qbootctl/files/qbootclt-bless-boot.service.in
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions recipes-support/qbootctl/qbootctl_git.bb
Original file line number Diff line number Diff line change
@@ -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 = "20572c1417030908fac57ffb35288323034bc6b2"
SRC_URI = "\
git://gitlab.com/sdm845-mainline/qbootctl.git;protocol=https;branch=main \
file://qbootclt-bless-boot.service.in \
"

DEPENDS = "zlib"

S = "${WORKDIR}/git"

PV = "0.1.2+git${SRCPV}"

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"

0 comments on commit 52a55c2

Please sign in to comment.