From: Rene Wagner Date: Sun, 23 Jul 2006 20:15:45 +0000 (+0200) Subject: kernel.bbclass: fix bad assumptions about PV. KERNEL_VERSION is always right. get... X-Git-Tag: familiar-v0.8.4-rc3~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=23b41116d529ef1af719d1ada60559f0215d6364;p=familiar-h63xx-build.git kernel.bbclass: fix bad assumptions about PV. KERNEL_VERSION is always right. get rid of KERNEL_LOCALVERSION. Signed-off-by: Rene Wagner --- diff --git a/org.handhelds.familiar/classes/kernel.bbclass b/org.handhelds.familiar/classes/kernel.bbclass index e663643..009f185 100644 --- a/org.handhelds.familiar/classes/kernel.bbclass +++ b/org.handhelds.familiar/classes/kernel.bbclass @@ -52,8 +52,6 @@ def get_kernelmajorversion(p): KERNEL_VERSION = "${@get_kernelversion('${S}/include/linux/version.h')}" KERNEL_MAJOR_VERSION = "${@get_kernelmajorversion('${KERNEL_VERSION}')}" -KERNEL_LOCALVERSION ?= "" - # kernels are generally machine specific PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -94,9 +92,9 @@ kernel_do_stage() { cp -fR drivers/sound/*.h ${STAGING_KERNEL_DIR}/include/drivers/sound/ fi - 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 + install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${KERNEL_VERSION} + ln -sf config-${KERNEL_VERSION} ${STAGING_KERNEL_DIR}/.config + ln -sf config-${KERNEL_VERSION} ${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 @@ -111,7 +109,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}${KERNEL_LOCALVERSION} + install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} [ -e Module.symvers ] && install -m 0644 Module.symvers ${STAGING_KERNEL_DIR}/ cp -fR scripts ${STAGING_KERNEL_DIR}/ @@ -127,9 +125,9 @@ kernel_do_install() { install -d ${D}/${KERNEL_IMAGEDEST} install -d ${D}/boot - 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 -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} + install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} + install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} install -d ${D}/etc/modutils # Check if scripts/genksyms exists and if so, build it @@ -145,11 +143,11 @@ kernel_do_configure() { } pkg_postinst_kernel () { - update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} ${KERNEL_PRIORITY} || true + update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true } pkg_postrm_kernel () { - update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}${KERNEL_LOCALVERSION} || true + update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true } inherit cml1 @@ -167,7 +165,7 @@ ALLOW_EMPTY_kernel-image = "1" pkg_postinst_modules () { if [ -n "$D" ]; then - ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${PV}${KERNEL_LOCALVERSION} ${KERNEL_VERSION} + ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION} else depmod -A update-modules || true @@ -229,7 +227,7 @@ python populate_packages_prepend () { bb.error("D not defined") return - kernelver = bb.data.getVar('PV', d, 1) + bb.data.getVar('KERNEL_LOCALVERSION', d, 1) + kernelver = bb.data.getVar('KERNEL_VERSION', d, 1) kernelver_stripped = kernelver m = re.match('^(.*-hh.*)[\.\+].*$', kernelver) if m and not bb.data.getVar('KERNEL_PRESERVE_HH_MINOR_VER', d, 1):