diff --git a/meta-oniro-core/recipes-core/rauc/files/rauc-state-dir.conf b/meta-oniro-core/recipes-core/rauc/files/rauc-state-dir.conf new file mode 100644 index 0000000000000000000000000000000000000000..063451509c1611c475148b800f7266faf9668020 --- /dev/null +++ b/meta-oniro-core/recipes-core/rauc/files/rauc-state-dir.conf @@ -0,0 +1,8 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +# Create directory where RAUC stores the status file. This must be +# synchronized with the system.conf file installed into /etc/rauc/system.conf. +[Service] +ExecStartPre=/bin/mkdir -p /run/mount/sysdata/common diff --git a/meta-oniro-core/recipes-core/rauc/rauc_%.bbappend b/meta-oniro-core/recipes-core/rauc/rauc_%.bbappend index b7ebcbd1879f5f4d2d5ba0fd538579fb469c904d..b5e60bf13141eb87ed706596508e1d4fd0c55418 100644 --- a/meta-oniro-core/recipes-core/rauc/rauc_%.bbappend +++ b/meta-oniro-core/recipes-core/rauc/rauc_%.bbappend @@ -43,3 +43,17 @@ do_install_append() { bbwarn "The image is using a known, insecure test key for verifying RAUC bundles. Do not use this in production systems." fi } + +# Install Oniro specific override for RAUC state directory. + +SRC_URI_append = " \ + file://rauc-state-dir.conf \ + " + +FILES_${PN}-service += "\ + ${systemd_unitdir}/system/rauc.service.d/*.conf \ + " + +do_install_append() { + install -D -m 644 ${WORKDIR}/rauc-state-dir.conf --target-directory=${D}${systemd_unitdir}/system/rauc.service.d/ +}