summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorHolger Schurig <schurig@mn-solutions.de>2005-04-04 10:23:38 +0000
committerHolger Schurig <schurig@mn-solutions.de>2005-04-04 10:23:38 +0000
commitc7e0ba4b4fc9a39ae28becf546cf7bc1f07187f0 (patch)
tree5066fb8d2adef1b07b1487da8dc57ad722086091 /classes
parent76cebf9b22dedfdab1ff579bf38c794b7133f71b (diff)
more from Murray to classes/kernel.bbclass: add KERNEL_LOCALVERSION variable
BKrev: 425115aaSClZtELd2Lv_dzf69AFerA
Diffstat (limited to 'classes')
-rw-r--r--classes/kernel.bbclass24
1 files changed, 13 insertions, 11 deletions
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index 77c2fb2452..39e91873c9 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -43,6 +43,8 @@ def get_kernelversion(p):
KERNEL_VERSION = "${@get_kernelversion('${S}/include/linux/version.h')}"
+KERNEL_LOCALVERSION ?= ""
+
# kernels are generally machine specific
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -67,9 +69,9 @@ kernel_do_stage() {
cp -fR include/asm-generic/* ${STAGING_KERNEL_DIR}/include/asm-generic/
cp -fR include/net/* ${STAGING_KERNEL_DIR}/include/net/
cp -fR include/pcmcia/* ${STAGING_KERNEL_DIR}/include/pcmcia/
- install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${PV}
- ln -sf config-${PV} ${STAGING_KERNEL_DIR}/.config
- ln -sf config-${PV} ${STAGING_KERNEL_DIR}/kernel-config
+ install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${PV}${KERNEL_LOCALVERSION}
+ ln -sf config-${PV}${KERNEL_LOCALVERSION} ${STAGING_KERNEL_DIR}/.config
+ ln -sf config-${PV}${KERNEL_LOCALVERSION} ${STAGING_KERNEL_DIR}/kernel-config
echo "${KERNEL_VERSION}" >${STAGING_KERNEL_DIR}/kernel-abiversion
echo "${S}" >${STAGING_KERNEL_DIR}/kernel-source
echo "${KERNEL_CCSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ccsuffix
@@ -84,7 +86,7 @@ kernel_do_stage() {
fi
cp -fR include/config* ${STAGING_KERNEL_DIR}/include/
install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE}
- install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${PV}
+ install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${PV}${KERNEL_LOCALVERSION}
cp -fR scripts ${STAGING_KERNEL_DIR}/
}
@@ -99,9 +101,9 @@ kernel_do_install() {
install -d ${D}/${KERNEL_IMAGEDEST}
install -d ${D}/boot
- install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}
- install -m 0644 System.map ${D}/boot/System.map-${PV}
- install -m 0644 .config ${D}/boot/config-${PV}
+ install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION}
+ install -m 0644 System.map ${D}/boot/System.map-${PV}${KERNEL_LOCALVERSION}
+ install -m 0644 .config ${D}/boot/config-${PV}${KERNEL_LOCALVERSION}
install -d ${D}/etc/modutils
# Check if scripts/genksyms exists and if so, build it
@@ -117,11 +119,11 @@ kernel_do_configure() {
}
pkg_postinst_kernel () {
- update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV} ${KERNEL_PRIORITY} || true
+ update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} ${KERNEL_PRIORITY} || true
}
pkg_postrm_kernel () {
- update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV} || true
+ update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} || true
}
inherit cml1
@@ -138,7 +140,7 @@ ALLOW_EMPTY_kernel = "1"
pkg_postinst_modules () {
if [ -n "$D" ]; then
- ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${PV} ${KERNEL_VERSION}
+ ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${PV}${KERNEL_LOCALVERSION} ${KERNEL_VERSION}
else
depmod -A
update-modules || true
@@ -195,7 +197,7 @@ python populate_packages_prepend () {
bb.error("D not defined")
return
- kernelver = bb.data.getVar('PV', d, 1)
+ kernelver = bb.data.getVar('PV', d, 1) + bb.data.getVar('KERNEL_LOCALVERSION', d, 1)
kernelver_stripped = kernelver
m = re.match('^(.*-hh.*)\..*$', kernelver)
if m: