Lines 16-21
Link Here
|
16 |
SRC_URI="${SRC_URI:-unknown - please fix me!!}" |
16 |
SRC_URI="${SRC_URI:-unknown - please fix me!!}" |
17 |
KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}" |
17 |
KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}" |
18 |
|
18 |
|
|
|
19 |
# KERNEL_MOD_SOURCES is used if you don't want to unpack just ${A} |
20 |
if [ -z "${KERNEL_MOD_SOURCES}" ] |
21 |
then |
22 |
KERNEL_MOD_SOURCES=${A} |
23 |
fi |
24 |
|
19 |
kernel-mod_getmakefilevar () |
25 |
kernel-mod_getmakefilevar () |
20 |
{ |
26 |
{ |
21 |
grep $1 $2 | head -n 1 | cut -d = -f 2- | awk '{ print $1 }' |
27 |
grep $1 $2 | head -n 1 | cut -d = -f 2- | awk '{ print $1 }' |
Lines 61-66
Link Here
|
61 |
|
67 |
|
62 |
KV_MK_VERSION_FULL="$KV_MK_MAJOR.$KV_MK_MINOR.$KV_MK_PATCH$KV_MK_TYPE" |
68 |
KV_MK_VERSION_FULL="$KV_MK_MAJOR.$KV_MK_MINOR.$KV_MK_PATCH$KV_MK_TYPE" |
63 |
|
69 |
|
|
|
70 |
KV_MK_OUTPUT="`kernel-mod_getmakefilevar KBUILD_OUTPUT $KV_MK_FILE`" |
71 |
|
64 |
if [ "$KV_MK_VERSION_FULL" != "$KV_DIR_VERSION_FULL" ]; then |
72 |
if [ "$KV_MK_VERSION_FULL" != "$KV_DIR_VERSION_FULL" ]; then |
65 |
ewarn |
73 |
ewarn |
66 |
ewarn "The kernel Makefile says that this is a $KV_MK_VERSION_FULL kernel" |
74 |
ewarn "The kernel Makefile says that this is a $KV_MK_VERSION_FULL kernel" |
Lines 82-88
Link Here
|
82 |
KV_PATCH="$KV_MK_PATCH" |
90 |
KV_PATCH="$KV_MK_PATCH" |
83 |
KV_TYPE="$KV_MK_TYPE" |
91 |
KV_TYPE="$KV_MK_TYPE" |
84 |
|
92 |
|
|
|
93 |
# if we found an output location, use that. otherwise use KERNEL_DIR. |
94 |
if [ ! -z "${KV_MK_OUTPUT}" ] |
95 |
then |
96 |
KV_OUTPUT="$KV_MK_OUTPUT" |
97 |
else |
98 |
KV_OUTPUT="$KERNEL_DIR" |
99 |
fi |
100 |
|
101 |
if [ "${KV_MINOR}" -gt "4" ] |
102 |
then |
103 |
KV_OBJ="ko" |
104 |
else |
105 |
KV_OBJ="o" |
106 |
fi |
107 |
|
85 |
einfo "Building for Linux ${KV_VERSION_FULL} found in ${KERNEL_DIR}" |
108 |
einfo "Building for Linux ${KV_VERSION_FULL} found in ${KERNEL_DIR}" |
|
|
109 |
|
110 |
if [ "${KV_MINOR}" -gt "4" ] |
111 |
then |
112 |
einfo "which outputs to ${KV_OUTPUT}" |
113 |
fi |
86 |
} |
114 |
} |
87 |
|
115 |
|
88 |
kernel-mod_checkzlibinflate_configured () |
116 |
kernel-mod_checkzlibinflate_configured () |
Lines 151-161
Link Here
|
151 |
die "Kernel doesn't include zlib support" |
179 |
die "Kernel doesn't include zlib support" |
152 |
} |
180 |
} |
153 |
|
181 |
|
|
|
182 |
kernel-mod_src_unpack () |
183 |
{ |
184 |
check_KV |
185 |
kernel-mod_getversion |
186 |
unpack ${KERNEL_MOD_SOURCES} |
187 |
} |
188 |
|
154 |
kernel-mod_src_compile () |
189 |
kernel-mod_src_compile () |
155 |
{ |
190 |
{ |
156 |
emake KERNEL_DIR=${KERNEL_DIR} || die |
191 |
emake KERNEL_DIR=${KERNEL_DIR} || die |
157 |
} |
192 |
} |
158 |
|
193 |
|
|
|
194 |
kernel-mod_pkg_postinst() |
195 |
{ |
196 |
depmod -a |
197 |
} |
198 |
|
159 |
kernel-mod_is_2_4_kernel() { |
199 |
kernel-mod_is_2_4_kernel() { |
160 |
kernel-mod_getversion |
200 |
kernel-mod_getversion |
161 |
|
201 |
|
Lines 189-192
Link Here
|
189 |
fi |
229 |
fi |
190 |
} |
230 |
} |
191 |
|
231 |
|
192 |
EXPORT_FUNCTIONS src_compile |
232 |
EXPORT_FUNCTIONS src_unpack src_compile pkg_postinst |