#!/bin/sh

__BITBAKE_LAST_LINE=0

# Emit a useful diagnostic if something fails:
bb_sh_exit_handler() {
    ret=$?
    if [ "$ret" != 0 ]; then
        echo "WARNING: exit code $ret from a shell command."
    fi
    exit $ret
}

bb_bash_exit_handler() {
    ret=$?
    { set +x; } > /dev/null
    trap "" DEBUG
    if [ "$ret" != 0 ]; then
        echo "WARNING: ${BASH_SOURCE[0]}:${__BITBAKE_LAST_LINE} exit $ret from '$1'"

        echo "WARNING: Backtrace (BB generated script): "
        for i in $(seq 1 $((${#FUNCNAME[@]} - 1))); do
            if [ "$i" -eq 1 ]; then
                echo -e "	#$((i)): ${FUNCNAME[$i]}, ${BASH_SOURCE[$((i-1))]}, line ${__BITBAKE_LAST_LINE}"
            else
                echo -e "	#$((i)): ${FUNCNAME[$i]}, ${BASH_SOURCE[$((i-1))]}, line ${BASH_LINENO[$((i-1))]}"
            fi
        done
    fi
    exit $ret
}

bb_bash_debug_handler() {
    local line=${BASH_LINENO[0]}
    # For some reason the DEBUG trap trips with lineno=1 when scripts exit; ignore it
    if [ "$line" -eq 1 ]; then
        return
    fi

    # Track the line number of commands as they execute. This is so we can have access to the failing line number
    # in the EXIT trap. See http://gnu-bash.2382.n7.nabble.com/trap-echo-quot-trap-exit-on-LINENO-quot-EXIT-gt-wrong-linenumber-td3666.html
    if [ "${FUNCNAME[1]}" != "bb_bash_exit_handler" ]; then
        __BITBAKE_LAST_LINE=$line
    fi
}

case $BASH_VERSION in
"") trap 'bb_sh_exit_handler' 0
    set -e
    ;;
*)  trap 'bb_bash_exit_handler "$BASH_COMMAND"' 0
    trap '{ bb_bash_debug_handler; } 2>/dev/null' DEBUG
    set -e
    shopt -s extdebug
    ;;
esac
export AR="aarch64-poky-linux-gcc-ar"
export AS="aarch64-poky-linux-as "
export BUILD_AR="ar"
export BUILD_AS="as "
export BUILD_CC="gcc "
export BUILD_CCLD="gcc "
export BUILD_CFLAGS="-isystem/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/include -O2 -pipe"
export BUILD_CPP="gcc  -E"
export BUILD_CPPFLAGS="-isystem/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/include"
export BUILD_CXX="g++ "
export BUILD_CXXFLAGS="-isystem/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/include -O2 -pipe"
export BUILD_FC="gfortran "
export BUILD_LD="ld "
export BUILD_LDFLAGS="-L/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/lib                         -L/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/lib                         -Wl,-rpath,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/sim/yocto/scarthgap/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 -pthread"
export BUILD_NM="nm"
export BUILD_RANLIB="ranlib -D"
export BUILD_STRIP="strip"
export CC="aarch64-poky-linux-gcc  -mcpu=cortex-a72+crc -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot"
export CCLD="aarch64-poky-linux-gcc  -mcpu=cortex-a72+crc -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot"
export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map  -fmacro-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/git=/usr/src/debug/systemd/255.22  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/git=/usr/src/debug/systemd/255.22  -fmacro-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/build=/usr/src/debug/systemd/255.22  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/build=/usr/src/debug/systemd/255.22  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot=  -fmacro-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot=  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native= "
export CPP="aarch64-poky-linux-gcc -E --sysroot=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot  -mcpu=cortex-a72+crc -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security"
export CPPFLAGS=""
export CXX="aarch64-poky-linux-g++  -mcpu=cortex-a72+crc -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot"
export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -fcanon-prefix-map  -fmacro-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/git=/usr/src/debug/systemd/255.22  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/git=/usr/src/debug/systemd/255.22  -fmacro-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/build=/usr/src/debug/systemd/255.22  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/build=/usr/src/debug/systemd/255.22  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot=  -fmacro-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot=  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native=  -fvisibility-inlines-hidden"
export FC="aarch64-poky-linux-gfortran  -mcpu=cortex-a72+crc -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot"
export GETTEXTDATADIRS=":/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/share/gettext"
export GIT_CEILING_DIRECTORIES="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22:/home/sim/yocto/scarthgap/build/tmp"
export HOME="/home/sim"
export LC_ALL="en_US.UTF-8"
export LD="aarch64-poky-linux-ld --sysroot=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot "
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map  -fmacro-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/git=/usr/src/debug/systemd/255.22  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/git=/usr/src/debug/systemd/255.22  -fmacro-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/build=/usr/src/debug/systemd/255.22  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/build=/usr/src/debug/systemd/255.22  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot=  -fmacro-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot=  -fdebug-prefix-map=/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native=  -Wl,-z,relro,-z,now"
export LOGNAME="sim"
export MAKE="make"
export NM="aarch64-poky-linux-gcc-nm"
export OBJCOPY="aarch64-poky-linux-objcopy"
export OBJDUMP="aarch64-poky-linux-objdump"
export OMP_NUM_THREADS="8"
export PATH="/home/sim/yocto/scarthgap/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/bin/python3-native:/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/bin/perl-native:/home/sim/yocto/scarthgap/poky/scripts:/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/bin/crossscripts:/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/sbin:/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/bin:/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/sbin:/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/bin:/home/sim/yocto/scarthgap/poky/bitbake/bin:/home/sim/yocto/scarthgap/build/tmp/hosttools"
export PERL_HASH_SEED="0"
export PKG_CONFIG_DIR="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/lib/pkgconfig"
export PKG_CONFIG_DISABLE_UNINSTALLED="yes"
export PKG_CONFIG_LIBDIR="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/lib/pkgconfig"
export PKG_CONFIG_PATH="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/lib/pkgconfig:/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/share/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot"
export PKG_CONFIG_SYSTEM_INCLUDE_PATH="/usr/include"
export PKG_CONFIG_SYSTEM_LIBRARY_PATH="/usr/lib:/usr/lib"
export PSEUDO_DISABLED="0"
export PSEUDO_IGNORE_PATHS="/usr/,/etc/,/usr/lib,/dev/,/run/,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/temp,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot,/home/sim/yocto/scarthgap/sstate-cache,/home/sim/yocto/scarthgap/build/tmp/stamps,/home/sim/yocto/scarthgap/build/tmp/sstate-control,/home/sim/yocto/scarthgap/build/tmp/buildstats,/home/sim/yocto/scarthgap/build/tmp/sysroots-components,/home/sim/yocto/scarthgap/build/tmp/pkgdata,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/deploy-,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/sstate-build-package_,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/sstate-install-package_,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/pkgdata-sysroot,/home/sim/yocto/scarthgap/build/tmp/deploy,/home/sim/yocto/scarthgap/build/cache,/home/sim/yocto/scarthgap/poky/scripts,/home/sim/yocto/scarthgap/poky/meta/files/common-licenses,/home/sim/yocto/scarthgap/poky/meta-openembedded/meta-multimedia/licenses,/home/sim/yocto/scarthgap/poky/meta-openembedded/meta-networking/licenses,/home/sim/yocto/scarthgap/poky/meta-openembedded/meta-oe/licenses,/home/sim/yocto/scarthgap/poky/meta-openembedded/meta-python/licenses,/home/sim/yocto/scarthgap/poky/meta-openembedded/meta-webserver/licenses,/home/sim/yocto/scarthgap/poky/meta-raspberrypi/files/custom-licenses,/home/sim/yocto/scarthgap/poky/meta-qt5/licenses,/home/sim/yocto/scarthgap/poky/meta/COPYING,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/git,/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/build"
export PSEUDO_LOCALSTATEDIR="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/pseudo/"
export PSEUDO_NOSYMLINKEXP="1"
export PSEUDO_PASSWD="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot:/home/sim/yocto/scarthgap/build/tmp/sysroots-components/x86_64/pseudo-native"
export PSEUDO_PREFIX="/home/sim/yocto/scarthgap/build/tmp/sysroots-components/x86_64/pseudo-native/usr"
export PYTHON="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot-native/usr/bin/python3-native/python3"
export PYTHONHASHSEED="0"
export PYTHONNOUSERSITE="1"
export PYTHON_INCLUDE_DIR="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/include/python3.12"
export PYTHON_LIBRARY="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/lib/libpython3.12.so"
export RANLIB="aarch64-poky-linux-gcc-ranlib"
export READELF="aarch64-poky-linux-readelf"
unset SHELL
export SOURCE_DATE_EPOCH="1750927453"
export STAGING_DIR_HOST="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot"
export STAGING_INCDIR="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/include"
export STAGING_LIBDIR="/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/recipe-sysroot/usr/lib"
export STRINGS="aarch64-poky-linux-strings"
export STRIP="aarch64-poky-linux-strip"
export TZ="UTC"
export USER="sim"
export base_bindir="/usr/bin"
export base_libdir="/usr/lib"
export base_prefix=""
export base_sbindir="/usr/sbin"
export bindir="/usr/bin"
export datadir="/usr/share"
export docdir="/usr/share/doc"
export exec_prefix="/usr"
export includedir="/usr/include"
export infodir="/usr/share/info"
export libdir="/usr/lib"
export libexecdir="/usr/libexec"
export localstatedir="/var"
export mandir="/usr/share/man"
export nonarch_base_libdir="/usr/lib"
export nonarch_libdir="/usr/lib"
export prefix="/usr"
export sbindir="/usr/sbin"
export servicedir="/srv"
export sharedstatedir="/com"
export sysconfdir="/etc"
export systemd_system_unitdir="/usr/lib/systemd/system"
export systemd_unitdir="/usr/lib/systemd"
export systemd_user_unitdir="/usr/lib/systemd/user"

# line: 281, file: /home/sim/yocto/scarthgap/poky/meta/recipes-core/systemd/systemd_255.22.bb
do_install() {
	meson_do_install
	if true; then
            # Change the root user's home directory in /lib/sysusers.d/basic.conf.
            # This is done merely for backward compatibility with previous systemd recipes.
            # systemd hardcodes root user's HOME to be "/root". Changing to use other values
            # may have unexpected runtime behaviors.
            if [ "/root" != "/root" ]; then
                    bbwarn "Using /root as root user's home directory is not fully supported by systemd"
                    sed -i -e 's#/root#/root#g' /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/sysusers.d/basic.conf
            fi
        fi
	install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image//usr/sbin
	if true; then
		# Provided by a separate recipe
		rm /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/serial-getty* -f
	fi

	# Provide support for initramfs
	[ ! -e /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/init ] && ln -s /usr/lib/systemd/systemd /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/init
	[ ! -e /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image//usr/sbin/udevd ] && ln -s /usr/lib/systemd/systemd-udevd /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image//usr/sbin/udevd

	install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/udev/rules.d/
	install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d
	for rule in $(find /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22 -maxdepth 1 -type f -name "*.rules"); do
		install -m 0644 $rule /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/udev/rules.d/
	done

	install -m 0644 /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/00-create-volatile.conf /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/

	if false; then
		install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/init.d
		install -m 0755 /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/init /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/init.d/systemd-udevd
		sed -i s%@UDEVD@%/usr/lib/systemd/systemd-udevd% /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/init.d/systemd-udevd
		install -Dm 0755 /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/git/src/systemctl/systemd-sysv-install.SKELETON /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/systemd-sysv-install
	fi

	if "true"; then
		# base-files recipe provides /var/log which is a symlink to /var/volatile/log
		rm -rf /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/var/log
		printf 'L\t\t%s/log\t\t-\t-\t-\t-\t%s/volatile/log\n' "/var" \
			"/var" >>/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/00-create-volatile.conf
	elif [ -e /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/var/log/journal ]; then
		chown root:systemd-journal /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/var/log/journal

		# journal-remote creates this at start
		rm -rf /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/var/log/journal/remote
	fi

	# if the user requests /tmp be on persistent storage (i.e. not volatile)
	# then don't use a tmpfs for /tmp
	if [ "yes" != "yes" ]; then
		rm -f /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/tmp.mount
		rm -f /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/local-fs.target.wants/tmp.mount
	fi

	install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/graphical.target.wants
	install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/multi-user.target.wants
	install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/poweroff.target.wants
	install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/reboot.target.wants
	install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/rescue.target.wants

	# Create symlinks for systemd-update-utmp-runlevel.service
	if true; then
		ln -sf ../systemd-update-utmp-runlevel.service /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/graphical.target.wants/systemd-update-utmp-runlevel.service
		ln -sf ../systemd-update-utmp-runlevel.service /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
		ln -sf ../systemd-update-utmp-runlevel.service /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
		ln -sf ../systemd-update-utmp-runlevel.service /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/reboot.target.wants/systemd-update-utmp-runlevel.service
		ln -sf ../systemd-update-utmp-runlevel.service /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/rescue.target.wants/systemd-update-utmp-runlevel.service
	fi

	# this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
	# for existence else it fails
	if [ -s /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/systemd.conf ] &&
	   ! true; then
		echo 'd /run/systemd/netif/links 0755 root root -' >>/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/systemd.conf
	fi
	if ! true; then
		echo 'L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/etc.conf
		echo 'd /run/systemd/resolve 0755 root root -' >>/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/systemd.conf
		echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/systemd.conf
		ln -s ../run/systemd/resolve/resolv.conf /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/resolv-conf.systemd
	else
		resolv_conf="run/systemd/resolve/resolv.conf"
		sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../${resolv_conf}%g" /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/etc.conf
		ln -s ../${resolv_conf} /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/resolv-conf.systemd
	fi
	if false; then
		rm /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/x11.conf
		rm -r /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/X11
	fi

	# If polkit is setup fixup permissions and ownership
	if true; then
		if [ -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/share/polkit-1/rules.d ]; then
			chmod 700 /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/share/polkit-1/rules.d
			chown polkitd:root /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/share/polkit-1/rules.d
		fi
	fi

	# If polkit is not available and a fallback was requested, install a drop-in that allows networkd to
	# request hostname changes via DBUS without elevating its privileges
	if false; then
		install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/systemd-hostnamed.service.d/
		install -m 0644 /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/00-hostnamed-network-user.conf /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system/systemd-hostnamed.service.d/
		install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/share/dbus-1/system.d/
		install -m 0644 /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/org.freedesktop.hostname1_no_polkit.conf /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/share/dbus-1/system.d/
	fi

	# create link for existing udev rules
	ln -s /usr/bin/udevadm /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/sbin/udevadm

	# install default policy for presets
	# https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
	install -Dm 0644 /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/99-default.preset /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system-preset/99-default.preset

	# add a profile fragment to disable systemd pager with busybox less
	install -Dm 0644 /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/systemd-pager.sh /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/profile.d/systemd-pager.sh

    if [ -n "60" ]; then
        sed -i -e 's/#RebootWatchdogSec=10min/RebootWatchdogSec=60/' \
            /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image//etc/systemd/system.conf
    fi

	if false; then
		if ! grep -q '^NamePolicy=.*mac' /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/network/99-default.link; then
			sed -i '/^NamePolicy=/s/$/ mac/' /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/network/99-default.link
		fi
		if ! grep -q 'AlternativeNamesPolicy=.*mac' /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/network/99-default.link; then
			sed -i '/AlternativeNamesPolicy=/s/$/ mac/' /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/network/99-default.link
		fi
	fi

	if [ -e /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/legacy.conf ];then
		sed -i -e '/^L \/var\/log\/README/d' /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/tmpfiles.d/legacy.conf
	fi
    install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system-preset
    install -m 0644 /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/20-simos.preset /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/usr/lib/systemd/system-preset/

    install -d /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc
    echo "LANG=${SIMOS_DEFAULT_LOCALE}" > /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/locale.conf
    echo "KEYMAP=${SIMOS_DEFAULT_KEYMAP}" > /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image/etc/vconsole.conf
}

# line: 38, file: /home/sim/yocto/scarthgap/poky/meta/classes-global/logging.bbclass
bbwarn() {
	if [ -p /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/temp/fifo.1072900 ] ; then
		printf "%b\0" "bbwarn $*" > /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/temp/fifo.1072900
	else
		echo "WARNING: $*"
	fi
}

# line: 177, file: /home/sim/yocto/scarthgap/poky/meta/classes-recipe/meson.bbclass
meson_do_install() {
    meson install --destdir /home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/image --no-rebuild
}

cd '/home/sim/yocto/scarthgap/build/tmp/work/cortexa72-poky-linux/systemd/255.22/build'
do_install

# cleanup
ret=$?
trap '' 0
exit $ret
