diff --git a/meta-isar/recipes-kernel/linux/files/x86_64_defconfig b/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
index f3bafe00..c27a5a61 100644
--- a/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
+++ b/meta-isar/recipes-kernel/linux/files/x86_64_defconfig
@@ -1,6 +1,6 @@
 # Copy of linux/arch/x86/configs/x86_64_defconfig for demonstration purposes
 
-# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_BSD_PROCESS_ACCT=y
diff --git a/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl b/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
index 17effe52..1ab699f5 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/version.cfg.tmpl
@@ -1,2 +1 @@
 CONFIG_LOCALVERSION="${LINUX_VERSION_EXTENSION}"
-# CONFIG_LOCALVERSION_AUTO is not set
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 0f23d6f0..bf6c879b 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -296,6 +296,16 @@ EOF
 	done
 }
 
+get_localversion_auto() {
+	if grep -q "^CONFIG_LOCALVERSION_AUTO=y" ${S}/${KERNEL_BUILD_DIR}/.config; then
+		cd ${S}
+		if head=$(git rev-parse --verify --short HEAD 2>/dev/null); then
+			echo "-g${head}" >${S}/.scmversion
+		fi
+	fi
+}
+
 do_dpkg_source:prepend() {
 	dpkg_configure_kernel
+	get_localversion_auto
 }
