summaryrefslogtreecommitdiff
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorDavid Vincent <freesilicon@gmail.com>2016-12-20 10:53:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-22 08:46:36 +0000
commitc7bc46b9bc29dd0953ab8d63b50fa105bb66892e (patch)
treeef8d2d32bc3aee6babfbe7f874c045b11096ff41 /meta/classes/kernel.bbclass
parent8a024cb82b1718be51bd3a625364539ba50ae4ae (diff)
downloadopenembedded-core-c7bc46b9bc29dd0953ab8d63b50fa105bb66892e.tar.gz
openembedded-core-c7bc46b9bc29dd0953ab8d63b50fa105bb66892e.tar.bz2
openembedded-core-c7bc46b9bc29dd0953ab8d63b50fa105bb66892e.zip
kernel: Fix symlinks
When installing a kernel package, the symlinks created by update-alternatives should point to a path relative to KERNEL_IMAGEDEST and not an absolute path to '/boot'. Failing to do so causes problems when resolving the symlink inside some bootloaders which mount the boot partition elsewhere. Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index fa598cff7f..3630042dbd 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -45,10 +45,11 @@ python __anonymous () {
for type in types.split():
typelower = type.lower()
+ imagedest = d.getVar('KERNEL_IMAGEDEST')
d.appendVar('PACKAGES', ' ' + 'kernel-image-' + typelower)
- d.setVar('FILES_kernel-image-' + typelower, '/boot/' + type + '-${KERNEL_VERSION_NAME}')
+ d.setVar('FILES_kernel-image-' + typelower, '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME}')
d.appendVar('RDEPENDS_kernel-image', ' ' + 'kernel-image-' + typelower)
@@ -56,9 +57,8 @@ python __anonymous () {
d.setVar('ALLOW_EMPTY_kernel-image-' + typelower, '1')
- imagedest = d.getVar('KERNEL_IMAGEDEST')
priority = d.getVar('KERNEL_PRIORITY')
- postinst = '#!/bin/sh\n' + 'update-alternatives --install /' + imagedest + '/' + type + ' ' + type + ' ' + '/' + imagedest + '/' + type + '-${KERNEL_VERSION_NAME} ' + priority + ' || true' + '\n'
+ postinst = '#!/bin/sh\n' + 'update-alternatives --install /' + imagedest + '/' + type + ' ' + type + ' ' + type + '-${KERNEL_VERSION_NAME} ' + priority + ' || true' + '\n'
d.setVar('pkg_postinst_kernel-image-' + typelower, postinst)
postrm = '#!/bin/sh\n' + 'update-alternatives --remove' + ' ' + type + ' ' + type + '-${KERNEL_VERSION_NAME} || true' + '\n'