[OE-core] [PATCH v2 2/2] kernel: Make symbol link to vmlinuz in boot directory
zhe.he at windriver.com
zhe.he at windriver.com
Fri Feb 19 09:56:52 UTC 2016
From: He Zhe <zhe.he at windriver.com>
Rename do_kernel_link_vmlinux to do_kernel_link_images and make a
symbol link to vmlinuz(if exists) for reference in arch/$arch/boot
directory.
Signed-off-by: He Zhe <zhe.he at windriver.com>
---
documentation/ref-manual/ref-tasks.xml | 8 ++++----
meta/classes/kernel.bbclass | 13 ++++++++-----
meta/conf/documentation.conf | 2 +-
meta/recipes-kernel/linux/linux-yocto.inc | 2 +-
4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/documentation/ref-manual/ref-tasks.xml b/documentation/ref-manual/ref-tasks.xml
index 8ac37a0..517663b 100644
--- a/documentation/ref-manual/ref-tasks.xml
+++ b/documentation/ref-manual/ref-tasks.xml
@@ -663,13 +663,13 @@
</para>
</section>
- <section id='ref-tasks-kernel_link_vmlinux'>
- <title><filename>do_kernel_link_vmlinux</filename></title>
+ <section id='ref-tasks-kernel_link_images'>
+ <title><filename>do_kernel_link_images</filename></title>
<para>
Creates a symbolic link in
- <filename>arch/$arch/boot</filename> for vmlinux kernel
- images.
+ <filename>arch/$arch/boot</filename> for vmlinux and vmlinuz
+ kernel images.
</para>
</section>
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 6db2e2e..19b5132 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -467,15 +467,18 @@ python split_kernel_packages () {
}
# Many scripts want to look in arch/$arch/boot for the bootable
-# image. This poses a problem for vmlinux based booting. This
-# task arranges to have vmlinux appear in the normalized directory
-# location.
-do_kernel_link_vmlinux() {
+# image. This poses a problem for vmlinux and vmlinuz based
+# booting. This task arranges to have vmlinux and vmlinuz appear
+# in the normalized directory location.
+do_kernel_link_images() {
if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
mkdir ${B}/arch/${ARCH}/boot
fi
cd ${B}/arch/${ARCH}/boot
ln -sf ../../../vmlinux
+ if [ -f ../../../vmlinuz ]; then
+ ln -sf ../../../vmlinuz
+ fi
}
do_strip() {
@@ -505,7 +508,7 @@ do_strip() {
}
do_strip[dirs] = "${B}"
-addtask do_strip before do_sizecheck after do_kernel_link_vmlinux
+addtask do_strip before do_sizecheck after do_kernel_link_images
# Support checking the kernel size since some kernels need to reside in partitions
# with a fixed length or there is a limit in transferring the kernel to memory
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index b3969b0..f0c2399 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -28,7 +28,7 @@ do_install_ptest_base[doc] = "Copies the runtime test suite files from the compi
do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto style kernel"
do_kernel_configcheck[doc] = "Validates the kernel configuration for a linux-yocto style kernel"
do_kernel_configme[doc] = "Assembles the kernel configuration for a linux-yocto style kernel"
-do_kernel_link_vmlinux[doc] = "Creates a symbolic link in arch/$arch/boot for vmlinux kernel images"
+do_kernel_link_images[doc] = "Creates a symbolic link in arch/$arch/boot for vmlinux and vmlinuz kernel images"
do_listtasks[doc] = "Lists all defined tasks for a target"
do_menuconfig[doc] = "Runs 'make menuconfig' for the kernel"
do_package[doc] = "Analyzes the content of the holding area and splits it into subsets based on available packages and files"
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 6b161fc..fd68786 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -52,6 +52,6 @@ do_install_append(){
}
# extra tasks
-addtask kernel_link_vmlinux after do_compile before do_install
+addtask kernel_link_images after do_compile before do_install
addtask validate_branches before do_patch after do_kernel_checkout
addtask kernel_configcheck after do_configure before do_compile
--
1.9.1
More information about the Openembedded-core
mailing list