Skip to content
Snippets Groups Projects
Commit 9fce4dab authored by Zygmunt Krynicki's avatar Zygmunt Krynicki
Browse files

sysota: install machine-specific sysotad.conf


The systoa package now provides standard sysotad.conf configuration
file, which is safe to install on all systems. For the MACHINE
"raspberrypi4-64" a special sysotad.conf is provided, one that
enables the pi-boot specific boot loader logic.

The entire sysota package becomes MACHINE-specific to avoid populating
the cache with the wrong config settings across builds.

Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent c63cc8f1
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
[OTA]
BootLoaderType=pi-boot
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
[OTA]
BootLoaderType=inert
...@@ -7,6 +7,10 @@ LICENSE = "Apache-2.0" ...@@ -7,6 +7,10 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSES/Apache-2.0.txt;md5=c846ebb396f8b174b10ded4771514fcc" LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSES/Apache-2.0.txt;md5=c846ebb396f8b174b10ded4771514fcc"
SRC_URI = "git://git.ostc-eu.org/OSTC/OHOS/components/sysota.git;protocol=https;branch=main" SRC_URI = "git://git.ostc-eu.org/OSTC/OHOS/components/sysota.git;protocol=https;branch=main"
SRC_URI_append = " \
file://sysotad.conf \
"
SRCREV = "8d2f4fce96a4cf880c329103b2640450857d6423" SRCREV = "8d2f4fce96a4cf880c329103b2640450857d6423"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
...@@ -76,6 +80,10 @@ do_compile_append() { ...@@ -76,6 +80,10 @@ do_compile_append() {
do_install_append() { do_install_append() {
oe_runmake -C ${B}/make-build --warn-undefined-variables install DESTDIR=${D} oe_runmake -C ${B}/make-build --warn-undefined-variables install DESTDIR=${D}
# Install the built-in configuration file.
# See below for machine-specific overrides.
install -D -m 0644 ${WORKDIR}/sysotad.conf ${D}${libdir}/sysota/sysotad.conf
} }
# Include D-Bus configuration files in the primary package. Those contain bus # Include D-Bus configuration files in the primary package. Those contain bus
...@@ -83,6 +91,9 @@ do_install_append() { ...@@ -83,6 +91,9 @@ do_install_append() {
# (not to be confused with the systemd service unit). # (not to be confused with the systemd service unit).
FILES_${PN} += "${datadir}/dbus-1" FILES_${PN} += "${datadir}/dbus-1"
# Include the built-in configuration file.
FILES_${PN} += "${libdir}/sysota/sysotad.conf"
# SystemOTA depends on RAUC and unsquashfs and mksquashfs (for tests). # SystemOTA depends on RAUC and unsquashfs and mksquashfs (for tests).
RDEPENDS_${PN} += "squashfs-tools rauc" RDEPENDS_${PN} += "squashfs-tools rauc"
...@@ -93,3 +104,11 @@ RDEPENDS_${PN}-dev += "bash" ...@@ -93,3 +104,11 @@ RDEPENDS_${PN}-dev += "bash"
# systemd services. # systemd services.
REQUIRED_DISTRO_FEATURES = "systemd" REQUIRED_DISTRO_FEATURES = "systemd"
SYSTEMD_SERVICE_${PN} = "sysotad.service" SYSTEMD_SERVICE_${PN} = "sysotad.service"
# Specific MACHINE configurations have sysotad.conf which provides the right
# settings, like the boot loader type.
FILESEXTRAPATHS_prepend_raspberrypi4-64 := "${THISDIR}/files/raspberrypi4:"
# Make the SystemOTA package machine-specific. This lets us put the specific
# configuration file, which encodes boot loader type, into it safely.
PACKAGE_ARCH = "${MACHINE_ARCH}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment