diff options
author | Mykhaylo Sul <ext-mykhaylo.sul@here.com> | 2019-11-01 11:02:30 +0100 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2019-11-20 10:42:54 +0100 |
commit | fb4e10c846fe01bce525f0ceef777fd6502b4452 (patch) | |
tree | b443a21571a4c52a2a1112a058b9d34ffbcf5b55 | |
parent | 0b087a34b708bfd808a013b3656f543d2709692e (diff) | |
download | meta-updater-fb4e10c846fe01bce525f0ceef777fd6502b4452.tar.gz |
OTA-3988: Non-systemd/poky-sota local.conf
Signed-off-by: Mykhaylo Sul <ext-mykhaylo.sul@here.com>
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
-rw-r--r-- | conf/local.nonsystemd.conf.sample.append | 19 | ||||
-rwxr-xr-x | scripts/envsetup.sh | 9 |
2 files changed, 26 insertions, 2 deletions
diff --git a/conf/local.nonsystemd.conf.sample.append b/conf/local.nonsystemd.conf.sample.append new file mode 100644 index 0000000..6aeb61c --- /dev/null +++ b/conf/local.nonsystemd.conf.sample.append | |||
@@ -0,0 +1,19 @@ | |||
1 | |||
2 | # | ||
3 | # meta-updater configuration, see README.adoc and aktualizr's | ||
4 | # documentation for more options and detailed documentation | ||
5 | # | ||
6 | |||
7 | MACHINE = "##MACHINE##" | ||
8 | DISTRO = "poky-sota" | ||
9 | |||
10 | # General SOTA setup | ||
11 | #SOTA_CLIENT_PROV = "aktualizr-shared-prov" | ||
12 | #SOTA_PACKED_CREDENTIALS = "/path/to/credentials.zip" | ||
13 | |||
14 | # Uncomment this line to start an ssh server at boot automatically | ||
15 | #IMAGE_FEATURES += "ssh-server-dropbear" | ||
16 | |||
17 | # Uncomment this line to set the log level of aktualizr to 'debug' (from 'info' | ||
18 | # by default) | ||
19 | #IMAGE_INSTALL_append += " aktualizr-log-debug" | ||
diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index 5827bc2..4754e1d 100755 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh | |||
@@ -3,9 +3,12 @@ | |||
3 | SCRIPT="envsetup.sh" | 3 | SCRIPT="envsetup.sh" |
4 | MACHINE="$1" | 4 | MACHINE="$1" |
5 | BUILDDIR="build" | 5 | BUILDDIR="build" |
6 | DISTRO="poky-sota-systemd" | ||
7 | declare -A supported_distros=( ["poky-sota-systemd"]="local.conf.sample.append" ["poky-sota"]="local.nonsystemd.conf.sample.append" ) | ||
6 | 8 | ||
7 | [[ "$#" -lt 1 ]] && { echo "Usage: ${SCRIPT} <machine> [builddir]"; return 1; } | 9 | [[ "$#" -lt 1 ]] && { echo "Usage: ${SCRIPT} <machine> [builddir] [distro=< poky-sota-systemd | poky-sota >]"; return 1; } |
8 | [[ "$#" -eq 2 ]] && { BUILDDIR="$2"; } | 10 | [[ "$#" -eq 2 ]] && { BUILDDIR="$2"; } |
11 | [[ "$#" -eq 3 ]] && { DISTRO="$3"; } | ||
9 | 12 | ||
10 | # detect if this script is sourced: see http://stackoverflow.com/a/38128348/6255594 | 13 | # detect if this script is sourced: see http://stackoverflow.com/a/38128348/6255594 |
11 | SOURCED=0 | 14 | SOURCED=0 |
@@ -22,6 +25,8 @@ if [[ $SOURCED -ne 1 ]]; then | |||
22 | fi | 25 | fi |
23 | 26 | ||
24 | METADIR=${METADIR:-${SOURCEDIR}/../..} | 27 | METADIR=${METADIR:-${SOURCEDIR}/../..} |
28 | DISTRO_CONF=${supported_distros[$DISTRO]} | ||
29 | [[ -n $DISTRO_CONF ]] && { echo "Using $DISTRO_CONF for the specified distro $DISTRO"; } || { echo "The specified distro $DISTRO is not supported"; return 1; } | ||
25 | 30 | ||
26 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then | 31 | if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then |
27 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | 32 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" |
@@ -30,7 +35,7 @@ if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then | |||
30 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf | 35 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf |
31 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf | 36 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf |
32 | 37 | ||
33 | sed "s/##MACHINE##/$MACHINE/g" "${METADIR}/meta-updater/conf/local.conf.sample.append" >> conf/local.conf | 38 | sed "s/##MACHINE##/$MACHINE/g" "${METADIR}/meta-updater/conf/$DISTRO_CONF" >> conf/local.conf |
34 | else | 39 | else |
35 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | 40 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" |
36 | fi | 41 | fi |