diff options
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r-- | meta/classes/kernel.bbclass | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 13381740a1..56e3946c4a 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -14,12 +14,7 @@ KERNEL_IMAGETYPE ?= "zImage" | |||
14 | 14 | ||
15 | KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}" | 15 | KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}" |
16 | 16 | ||
17 | # [jbowler 20051109] ${PV}${KERNEL_LOCALVERSION} is used throughout this | 17 | KERNEL_RELEASE ?= "${KERNEL_VERSION}" |
18 | # .bbclass to (apparently) find the full 'uname -r' kernel version, this | ||
19 | # should be the same as UTS_RELEASE or (in this file) KERNEL_VERSION: | ||
20 | # KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION) | ||
21 | # but since this is not certain this overridable setting is used here: | ||
22 | KERNEL_RELEASE ?= "${PV}${KERNEL_LOCALVERSION}" | ||
23 | 18 | ||
24 | KERNEL_CCSUFFIX ?= "" | 19 | KERNEL_CCSUFFIX ?= "" |
25 | KERNEL_LDSUFFIX ?= "" | 20 | KERNEL_LDSUFFIX ?= "" |
@@ -111,9 +106,9 @@ kernel_do_stage() { | |||
111 | cp -fR drivers/sound/*.h ${STAGING_KERNEL_DIR}/include/drivers/sound/ | 106 | cp -fR drivers/sound/*.h ${STAGING_KERNEL_DIR}/include/drivers/sound/ |
112 | fi | 107 | fi |
113 | 108 | ||
114 | install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${KERNEL_RELEASE} | 109 | install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${KERNEL_VERSION} |
115 | ln -sf config-${KERNEL_RELEASE} ${STAGING_KERNEL_DIR}/.config | 110 | ln -sf config-${KERNEL_VERSION} ${STAGING_KERNEL_DIR}/.config |
116 | ln -sf config-${KERNEL_RELEASE} ${STAGING_KERNEL_DIR}/kernel-config | 111 | ln -sf config-${KERNEL_VERSION} ${STAGING_KERNEL_DIR}/kernel-config |
117 | echo "${KERNEL_VERSION}" >${STAGING_KERNEL_DIR}/kernel-abiversion | 112 | echo "${KERNEL_VERSION}" >${STAGING_KERNEL_DIR}/kernel-abiversion |
118 | echo "${S}" >${STAGING_KERNEL_DIR}/kernel-source | 113 | echo "${S}" >${STAGING_KERNEL_DIR}/kernel-source |
119 | echo "${KERNEL_CCSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ccsuffix | 114 | echo "${KERNEL_CCSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ccsuffix |
@@ -128,7 +123,7 @@ kernel_do_stage() { | |||
128 | fi | 123 | fi |
129 | cp -fR include/config* ${STAGING_KERNEL_DIR}/include/ | 124 | cp -fR include/config* ${STAGING_KERNEL_DIR}/include/ |
130 | install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE} | 125 | install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE} |
131 | install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} | 126 | install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} |
132 | [ -e Module.symvers ] && install -m 0644 Module.symvers ${STAGING_KERNEL_DIR}/ | 127 | [ -e Module.symvers ] && install -m 0644 Module.symvers ${STAGING_KERNEL_DIR}/ |
133 | 128 | ||
134 | cp -fR scripts ${STAGING_KERNEL_DIR}/ | 129 | cp -fR scripts ${STAGING_KERNEL_DIR}/ |
@@ -144,9 +139,9 @@ kernel_do_install() { | |||
144 | 139 | ||
145 | install -d ${D}/${KERNEL_IMAGEDEST} | 140 | install -d ${D}/${KERNEL_IMAGEDEST} |
146 | install -d ${D}/boot | 141 | install -d ${D}/boot |
147 | install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} | 142 | install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} |
148 | install -m 0644 System.map ${D}/boot/System.map-${KERNEL_RELEASE} | 143 | install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} |
149 | install -m 0644 .config ${D}/boot/config-${KERNEL_RELEASE} | 144 | install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} |
150 | install -d ${D}/etc/modutils | 145 | install -d ${D}/etc/modutils |
151 | 146 | ||
152 | # Check if scripts/genksyms exists and if so, build it | 147 | # Check if scripts/genksyms exists and if so, build it |
@@ -163,11 +158,11 @@ kernel_do_configure() { | |||
163 | } | 158 | } |
164 | 159 | ||
165 | pkg_postinst_kernel () { | 160 | pkg_postinst_kernel () { |
166 | update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} ${KERNEL_PRIORITY} || true | 161 | update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true |
167 | } | 162 | } |
168 | 163 | ||
169 | pkg_postrm_kernel () { | 164 | pkg_postrm_kernel () { |
170 | update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_RELEASE} || true | 165 | update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true |
171 | } | 166 | } |
172 | 167 | ||
173 | inherit cml1 | 168 | inherit cml1 |
@@ -184,11 +179,11 @@ ALLOW_EMPTY_kernel = "1" | |||
184 | ALLOW_EMPTY_kernel-image = "1" | 179 | ALLOW_EMPTY_kernel-image = "1" |
185 | 180 | ||
186 | pkg_postinst_kernel-image () { | 181 | pkg_postinst_kernel-image () { |
187 | if [ ! -e "$D/lib/modules/${KERNEL_RELEASE}" ]; then | 182 | if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then |
188 | mkdir -p $D/lib/modules/${KERNEL_RELEASE} | 183 | mkdir -p $D/lib/modules/${KERNEL_VERSION} |
189 | fi | 184 | fi |
190 | if [ -n "$D" ]; then | 185 | if [ -n "$D" ]; then |
191 | ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION} | 186 | ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION} |
192 | else | 187 | else |
193 | depmod -a | 188 | depmod -a |
194 | fi | 189 | fi |
@@ -196,7 +191,7 @@ fi | |||
196 | 191 | ||
197 | pkg_postinst_modules () { | 192 | pkg_postinst_modules () { |
198 | if [ -n "$D" ]; then | 193 | if [ -n "$D" ]; then |
199 | ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION} | 194 | ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION} |
200 | else | 195 | else |
201 | depmod -a | 196 | depmod -a |
202 | update-modules || true | 197 | update-modules || true |
@@ -257,7 +252,7 @@ python populate_packages_prepend () { | |||
257 | bb.error("D not defined") | 252 | bb.error("D not defined") |
258 | return | 253 | return |
259 | 254 | ||
260 | kernelver = bb.data.getVar('KERNEL_RELEASE', d, 1) | 255 | kernelver = bb.data.getVar('KERNEL_VERSION', d, 1) |
261 | kernelver_stripped = kernelver | 256 | kernelver_stripped = kernelver |
262 | m = re.match('^(.*-hh.*)[\.\+].*$', kernelver) | 257 | m = re.match('^(.*-hh.*)[\.\+].*$', kernelver) |
263 | if m: | 258 | if m: |