ANDROID: setlocalversion: make KMI_GENERATION optional
GKI required the KMI_GENERATION to be added to the kernel version string, but this only makes sense for GKI kernels, for non-GKI kernels we don't need it. Leave all the other stuff we added, though, as it seems useful. Bug: 205897686 Change-Id: I2e7b3cb7ed5529f1e5e7c9d79a1f7ce4a1b6ee1f Signed-off-by: Alistair Delva <adelva@google.com>
This commit is contained in:
parent
5dac28a174
commit
e41b116463
@ -41,8 +41,6 @@ if test $# -gt 0; then
|
|||||||
kmi_generation=$1
|
kmi_generation=$1
|
||||||
[ $(expr $kmi_generation : '^[0-9]\+$') -eq 0 ] && usage
|
[ $(expr $kmi_generation : '^[0-9]\+$') -eq 0 ] && usage
|
||||||
shift
|
shift
|
||||||
else
|
|
||||||
usage
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test $# -gt 0 -o ! -d "$srctree"; then
|
if test $# -gt 0 -o ! -d "$srctree"; then
|
||||||
@ -68,6 +66,8 @@ scm_version()
|
|||||||
|
|
||||||
if [ -n "$android_release" ] && [ -n "$kmi_generation" ]; then
|
if [ -n "$android_release" ] && [ -n "$kmi_generation" ]; then
|
||||||
printf '%s' "-$android_release-$kmi_generation"
|
printf '%s' "-$android_release-$kmi_generation"
|
||||||
|
elif [ -n "$android_release" ]; then
|
||||||
|
printf '%s' "-$android_release"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
|
# If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
|
||||||
|
Loading…
Reference in New Issue
Block a user