diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2013-09-27 21:32:00 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-30 22:11:58 +0100 |
commit | 072c4e123f878d57fb7f767d3888b38461f91a27 (patch) | |
tree | 78f0580480b2bea987d6c5055ac71a8a6b431b64 /meta/classes | |
parent | d2736102f3b32306e3d0edb9584548ad9a967881 (diff) | |
download | poky-072c4e123f878d57fb7f767d3888b38461f91a27.tar.gz |
kernel.bbclass: Allow INITRAMFS_TASK to trigger copy initramfs code
Activating the INITRAMFS_TASK can cause circular dependencies, but
that is up to the end user to resolve in recipes. The INITRAMFS_TASK
should also trigger immediate linking of the cpio task in the first
compile pass. This was a subtle regression introduced by: 609d5a9ab
(kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency
and bundling).
This patch restores the previous behavior and only affects the
INITRAMFS_TASK which is not set by any of the default build profiles
in oe-core.
Reviewed-by: Andrea Adami <andrea.adami@gmail.com>
(From OE-Core rev: 36faac868e086e9c23537b107cdd973d7fd980bd)
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/kernel.bbclass | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 8cf66ce7dc..4acfb7e2b6 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -83,6 +83,8 @@ KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.g | |||
83 | 83 | ||
84 | copy_initramfs() { | 84 | copy_initramfs() { |
85 | echo "Copying initramfs into ./usr ..." | 85 | echo "Copying initramfs into ./usr ..." |
86 | # In case the directory is not created yet from the first pass compile: | ||
87 | mkdir -p ${B}/usr | ||
86 | # Find and use the first initramfs image archive type we find | 88 | # Find and use the first initramfs image archive type we find |
87 | rm -f ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio | 89 | rm -f ${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio |
88 | for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do | 90 | for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do |
@@ -156,6 +158,12 @@ kernel_do_compile() { | |||
156 | # different initramfs image. The way to do that in the kernel | 158 | # different initramfs image. The way to do that in the kernel |
157 | # is to specify: | 159 | # is to specify: |
158 | # make ...args... CONFIG_INITRAMFS_SOURCE=some_other_initramfs.cpio | 160 | # make ...args... CONFIG_INITRAMFS_SOURCE=some_other_initramfs.cpio |
161 | if [ "$use_alternate_initrd" = "" ] && [ "${INITRAMFS_TASK}" != "" ] ; then | ||
162 | # The old style way of copying an prebuilt image and building it | ||
163 | # is turned on via INTIRAMFS_TASK != "" | ||
164 | copy_initramfs | ||
165 | use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio | ||
166 | fi | ||
159 | oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd | 167 | oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd |
160 | if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then | 168 | if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then |
161 | gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}" | 169 | gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}" |