summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-01-08 21:05:18 +0000
committerRichard Purdie <richard@openedhand.com>2007-01-08 21:05:18 +0000
commitfb61dc1430f81ae2ee59766ffab8404fd79ff1b1 (patch)
tree50693c739a63db8e9e1793bb08050a71ceba51a7
parent3a8695033f23888b76e413eae3c7096a01a9ab84 (diff)
downloadpoky-fb61dc1430f81ae2ee59766ffab8404fd79ff1b1.tar.gz
kernel.bbclass: Drop KERNEL_RELEASE variable
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1123 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/classes/kernel.bbclass35
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
15KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}" 15KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}"
16 16
17# [jbowler 20051109] ${PV}${KERNEL_LOCALVERSION} is used throughout this 17KERNEL_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:
22KERNEL_RELEASE ?= "${PV}${KERNEL_LOCALVERSION}"
23 18
24KERNEL_CCSUFFIX ?= "" 19KERNEL_CCSUFFIX ?= ""
25KERNEL_LDSUFFIX ?= "" 20KERNEL_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
165pkg_postinst_kernel () { 160pkg_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
169pkg_postrm_kernel () { 164pkg_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
173inherit cml1 168inherit cml1
@@ -184,11 +179,11 @@ ALLOW_EMPTY_kernel = "1"
184ALLOW_EMPTY_kernel-image = "1" 179ALLOW_EMPTY_kernel-image = "1"
185 180
186pkg_postinst_kernel-image () { 181pkg_postinst_kernel-image () {
187if [ ! -e "$D/lib/modules/${KERNEL_RELEASE}" ]; then 182if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then
188 mkdir -p $D/lib/modules/${KERNEL_RELEASE} 183 mkdir -p $D/lib/modules/${KERNEL_VERSION}
189fi 184fi
190if [ -n "$D" ]; then 185if [ -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}
192else 187else
193 depmod -a 188 depmod -a
194fi 189fi
@@ -196,7 +191,7 @@ fi
196 191
197pkg_postinst_modules () { 192pkg_postinst_modules () {
198if [ -n "$D" ]; then 193if [ -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}
200else 195else
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: