diff options
Diffstat (limited to 'meta/classes/kernel.bbclass')
| -rw-r--r-- | meta/classes/kernel.bbclass | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 3cc0432fcf..02a5e961cb 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
| @@ -2,7 +2,7 @@ inherit linux-kernel-base kernel-module-split | |||
| 2 | 2 | ||
| 3 | PROVIDES += "virtual/kernel" | 3 | PROVIDES += "virtual/kernel" |
| 4 | DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native" | 4 | DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native" |
| 5 | PACKAGE_WRITE_DEPS += "depmodwrapper-cross virtual/update-alternatives-native" | 5 | PACKAGE_WRITE_DEPS += "depmodwrapper-cross" |
| 6 | 6 | ||
| 7 | do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot" | 7 | do_deploy[depends] += "depmodwrapper-cross:do_populate_sysroot" |
| 8 | 8 | ||
| @@ -57,7 +57,7 @@ python __anonymous () { | |||
| 57 | 57 | ||
| 58 | d.appendVar('PACKAGES', ' ' + 'kernel-image-' + typelower) | 58 | d.appendVar('PACKAGES', ' ' + 'kernel-image-' + typelower) |
| 59 | 59 | ||
| 60 | d.setVar('FILES_kernel-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}') | 60 | d.setVar('FILES_kernel-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}' + ' /' + imagedest + '/' + type) |
| 61 | 61 | ||
| 62 | d.appendVar('RDEPENDS_kernel-image', ' ' + 'kernel-image-' + typelower) | 62 | d.appendVar('RDEPENDS_kernel-image', ' ' + 'kernel-image-' + typelower) |
| 63 | 63 | ||
| @@ -65,13 +65,6 @@ python __anonymous () { | |||
| 65 | 65 | ||
| 66 | d.setVar('ALLOW_EMPTY_kernel-image-' + typelower, '1') | 66 | d.setVar('ALLOW_EMPTY_kernel-image-' + typelower, '1') |
| 67 | 67 | ||
| 68 | priority = d.getVar('KERNEL_PRIORITY') | ||
| 69 | postinst = '#!/bin/sh\n' + 'update-alternatives --install /' + imagedest + '/' + type + ' ' + type + ' ' + type + '-${KERNEL_VERSION_NAME} ' + priority + ' || true' + '\n' | ||
| 70 | d.setVar('pkg_postinst_kernel-image-' + typelower, postinst) | ||
| 71 | |||
| 72 | postrm = '#!/bin/sh\n' + 'update-alternatives --remove' + ' ' + type + ' ' + type + '-${KERNEL_VERSION_NAME} || true' + '\n' | ||
| 73 | d.setVar('pkg_postrm_kernel-image-' + typelower, postrm) | ||
| 74 | |||
| 75 | image = d.getVar('INITRAMFS_IMAGE') | 68 | image = d.getVar('INITRAMFS_IMAGE') |
| 76 | if image: | 69 | if image: |
| 77 | d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') | 70 | d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') |
| @@ -137,10 +130,6 @@ export CROSS_COMPILE = "${TARGET_PREFIX}" | |||
| 137 | export KBUILD_BUILD_USER = "oe-user" | 130 | export KBUILD_BUILD_USER = "oe-user" |
| 138 | export KBUILD_BUILD_HOST = "oe-host" | 131 | export KBUILD_BUILD_HOST = "oe-host" |
| 139 | 132 | ||
| 140 | KERNEL_PRIORITY ?= "${@int(d.getVar('PV').split('-')[0].split('+')[0].split('.')[0]) * 10000 + \ | ||
| 141 | int(d.getVar('PV').split('-')[0].split('+')[0].split('.')[1]) * 100 + \ | ||
| 142 | int(d.getVar('PV').split('-')[0].split('+')[0].split('.')[-1])}" | ||
| 143 | |||
| 144 | KERNEL_RELEASE ?= "${KERNEL_VERSION}" | 133 | KERNEL_RELEASE ?= "${KERNEL_VERSION}" |
| 145 | 134 | ||
| 146 | # The directory where built kernel lies in the kernel tree | 135 | # The directory where built kernel lies in the kernel tree |
| @@ -350,6 +339,7 @@ kernel_do_install() { | |||
| 350 | install -d ${D}/boot | 339 | install -d ${D}/boot |
| 351 | for type in ${KERNEL_IMAGETYPES} ; do | 340 | for type in ${KERNEL_IMAGETYPES} ; do |
| 352 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} ${D}/${KERNEL_IMAGEDEST}/${type}-${KERNEL_VERSION} | 341 | install -m 0644 ${KERNEL_OUTPUT_DIR}/${type} ${D}/${KERNEL_IMAGEDEST}/${type}-${KERNEL_VERSION} |
| 342 | ln -sf ${type}-${KERNEL_VERSION} ${D}/${KERNEL_IMAGEDEST}/${type} | ||
| 353 | done | 343 | done |
| 354 | install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} | 344 | install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} |
| 355 | install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} | 345 | install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} |
