Lines 34-46
get_KV() {
Link Here
|
34 |
EXV=`grep ^EXTRAVERSION\ \= ${KERNEL_DIR}/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g" -e 's/\$([a-z]*)//gi'` |
34 |
EXV=`grep ^EXTRAVERSION\ \= ${KERNEL_DIR}/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g" -e 's/\$([a-z]*)//gi'` |
35 |
if [ "${PAT}" -gt '4' -a "${VER}" -ge '2' -a -e ${KERNEL_DIR}/.config ] |
35 |
if [ "${PAT}" -gt '4' -a "${VER}" -ge '2' -a -e ${KERNEL_DIR}/.config ] |
36 |
then |
36 |
then |
|
|
37 |
local VERSION_SOURCE |
38 |
|
37 |
KERN_24=0 |
39 |
KERN_24=0 |
38 |
cd ${KERNEL_DIR} |
40 |
cd ${KERNEL_DIR} |
39 |
#compile_generic prepare kernel > /dev/null 2>&1 |
41 |
#compile_generic prepare kernel > /dev/null 2>&1 |
40 |
cd - > /dev/null 2>&1 |
42 |
cd - > /dev/null 2>&1 |
41 |
if [ -f ${KERNEL_DIR}/include/linux/version.h ] |
43 |
|
|
|
44 |
#2.6.18 uses utsrelease.h |
45 |
[ -f "${KERNEL_DIR}/include/linux/version.h" ] && VERSION_SOURCE="${KERNEL_DIR}/include/linux/version.h" |
46 |
[ -f "${KERNEL_DIR}/include/linux/utsrelease.h" ] && VERSION_SOURCE="${KERNEL_DIR}/include/linux/utsrelease.h" |
47 |
|
48 |
if [ -n "${VERSION_SOURCE}" ] |
42 |
then |
49 |
then |
43 |
UTS_RELEASE=`grep UTS_RELEASE ${KERNEL_DIR}/include/linux/version.h | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'` |
50 |
UTS_RELEASE=`grep UTS_RELEASE "${VERSION_SOURCE}" | sed -e 's/#define UTS_RELEASE "\(.*\)"/\1/'` |
44 |
LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"` |
51 |
LOV=`echo ${UTS_RELEASE}|sed -e "s/${VER}.${PAT}.${SUB}${EXV}//"` |
45 |
KV=${VER}.${PAT}.${SUB}${EXV}${LOV} |
52 |
KV=${VER}.${PAT}.${SUB}${EXV}${LOV} |
46 |
else |
53 |
else |