|
|
check_version_h | check_version_h |
| |
# Get the kernel version of sources in /usr/src/linux ... | # Get the kernel version of sources in /usr/src/linux ... |
export KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3 }' \ |
export KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); utsrelease=$3}; \ |
|
/LINUX_VERSION_CODE/ { \ |
|
major=rshift( $3, 16 ); \ |
|
minor=and( rshift( $3, 8 ), 255 ); \ |
|
micro=and( $3, 255); \ |
|
linuxversion=major"."minor"."micro; \ |
|
}; \ |
|
END {if (utsrelease) {print utsrelease} \ |
|
else {if (linuxversion) {print linuxversion}}}' \ |
"${ROOT}/usr/src/linux/include/linux/version.h")" | "${ROOT}/usr/src/linux/include/linux/version.h")" |
export KV_major="$(echo "${KV_full}" | cut -d. -f1)" | export KV_major="$(echo "${KV_full}" | cut -d. -f1)" |
export KV_minor="$(echo "${KV_full}" | cut -d. -f2)" | export KV_minor="$(echo "${KV_full}" | cut -d. -f2)" |