diff --git a/rpi0/git-version.sh b/rpi0/git-version.sh index ef874e62..4895c569 100755 --- a/rpi0/git-version.sh +++ b/rpi0/git-version.sh @@ -21,6 +21,7 @@ VERSION_FILE=$1 DEF_VER=UNKNOWN LF=' ' +cd $(dirname $0) if test -f "$VERSION_FILE" then @@ -40,7 +41,6 @@ then # BUILD_VERSION=$(echo "$BUILD_VERSION" | sed -e 's/-/./g'); : else - # TODO add version logic for develop and feature branches? BUILD_VERSION="$DEF_VER" fi diff --git a/rpi0/post-build.sh b/rpi0/post-build.sh index 6b2826eb..23510569 100755 --- a/rpi0/post-build.sh +++ b/rpi0/post-build.sh @@ -12,29 +12,26 @@ if [ -e ${TARGET_DIR}/etc/inittab ]; then tty1::respawn:/sbin/getty -L tty1 0 vt100 # HDMI console' ${TARGET_DIR}/etc/inittab fi +echo "Creating systemd services" ln -fs ../../../../usr/lib/systemd/system/wpa_supplicant@.service $1/etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service - ln -fs ../../../../usr/lib/systemd/system/backlight.service $1/etc/systemd/system/multi-user.target.wants/backlight.service - ln -fs ../../../../usr/lib/systemd/system/sharp-init.service $1/etc/systemd/system/multi-user.target.wants/sharp-init.service - ln -fs ../../../../usr/lib/systemd/system/app.service $1/etc/systemd/system/multi-user.target.wants/app.service rm -rf $1/var/log/journal #rm -r $1/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service - #rm -r $1/etc/systemd/system/multi-user.target.wants/dhcpcd.service # Determine build version BUILD_VERSION=$("$SCRIPT_DIR/git-version.sh" "$BR2_EXTERNAL/version") -# We need the Git hash of remote-os and not of the buildroot submodule! -GIT_HASH=`cd $1; git rev-parse HEAD` - echo "Setting build version in YIO env variable: $BUILD_VERSION" sed -i "s/\$BUILD_VERSION/$BUILD_VERSION/g" $1/etc/profile.d/yio.sh +# We need the Git hash of remote-os and not of the buildroot submodule! +GIT_HASH=`cd $SCRIPT_DIR; git rev-parse HEAD` + echo "Setting Git hash in YIO env variable: $GIT_HASH" sed -i "s/\$GIT_HASH/$GIT_HASH/g" $1/etc/profile.d/yio.sh