From 9616f2c908adfb94f4455b219856daf147a41748 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Mon, 27 May 2019 14:25:03 +0200 Subject: Add some sample configuration in default local.conf Signed-off-by: Laurent Bonnans --- conf/local.conf.sample.append | 35 +++++++++++++++++++++++++++++++++++ scripts/envsetup.sh | 5 +++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 conf/local.conf.sample.append diff --git a/conf/local.conf.sample.append b/conf/local.conf.sample.append new file mode 100644 index 0000000..4588ec3 --- /dev/null +++ b/conf/local.conf.sample.append @@ -0,0 +1,35 @@ + +# +# meta-updater configuration, see README.adoc and aktualizr's +# documentation for more options and detailed documentation +# + +MACHINE = "##MACHINE##" +DISTRO = "poky-sota-systemd" + +# General SOTA setup +#SOTA_CLIENT_PROV = "aktualizr-auto-prov" +#SOTA_PACKED_CREDENTIALS = "/path/to/credentials.zip" + +# Uncomment this line to start an ssh server at boot automatically +#IMAGE_FEATURES += "ssh-server-dropbear" + +# Uncomment this line to set the log level of aktualizr to 'debug' (from 'info' +# by default) +#IMAGE_INSTALL_append += " aktualizr-log-debug" + +# Store systemd logs in persistent storage +# +# It greatly helps diagnosing issues on testing devices but should be +# carefully weighted against file system usage and flash device wear for +# production systems. Please refer to systemd's docs for more details +IMAGE_INSTALL_append += " systemd-journald-persistent" + +# Set resource limits for aktualizr service +# +# Uncomment these lines to change the default parameters. +# +#RESOURCE_CPU_WEIGHT_pn-aktualizr = "100" +#RESOURCE_MEMORY_HIGH_pn-aktualizr = "100M" +#RESOURCE_MEMORY_MAX_pn-aktualizr = "80%" +IMAGE_INSTALL_append += " aktualizr-resource-control" diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index ff78681..6103cf6 100755 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh @@ -25,11 +25,12 @@ METADIR="${SOURCEDIR}/../.." if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" + echo "METADIR := \"\${@os.path.abspath('${METADIR}')}\"" >> conf/bblayers.conf cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf - echo "MACHINE = \"${MACHINE}\"" >> conf/local.conf - echo "DISTRO = \"poky-sota-systemd\"" >> conf/local.conf + + sed "s/##MACHINE##/$MACHINE/g" "${METADIR}/meta-updater/conf/local.conf.sample.append" >> conf/local.conf else source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" fi -- cgit v1.2.3-54-g00ecf