diff options
Diffstat (limited to 'yocto-poky/meta/classes/kernel.bbclass')
-rw-r--r-- | yocto-poky/meta/classes/kernel.bbclass | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/yocto-poky/meta/classes/kernel.bbclass b/yocto-poky/meta/classes/kernel.bbclass index ee3e9a0d9..6e3e81e93 100644 --- a/yocto-poky/meta/classes/kernel.bbclass +++ b/yocto-poky/meta/classes/kernel.bbclass @@ -25,7 +25,7 @@ python __anonymous () { image = d.getVar('INITRAMFS_IMAGE', True) if image: - d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_rootfs') + d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') # NOTE: setting INITRAMFS_TASK is for backward compatibility # The preferred method is to set INITRAMFS_IMAGE, because @@ -217,6 +217,14 @@ do_compile_kernelmodules() { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then oe_runmake -C ${B} ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} + + # Module.symvers gets updated during the + # building of the kernel modules. We need to + # update this in the shared workdir since some + # external kernel modules has a dependency on + # other kernel modules and will look at this + # file to do symbol lookups + cp Module.symvers ${STAGING_KERNEL_BUILDDIR}/ else bbnote "no modules to compile" fi @@ -309,18 +317,9 @@ do_shared_workdir () { cp -fR include/generated/* $kerneldir/include/generated/ fi - # When ARCH is set to i386 or x86_64, we need to map ARCH to the real name of src - # dir (x86) under arch/ of kenrel tree, so that we can find correct source to copy. - - if [ "${ARCH}" = "i386" ] || [ "${ARCH}" = "x86_64" ]; then - KERNEL_SRCARCH=x86 - else - KERNEL_SRCARCH=${ARCH} - fi - - if [ -d arch/${KERNEL_SRCARCH}/include/generated ]; then - mkdir -p $kerneldir/arch/${KERNEL_SRCARCH}/include/generated/ - cp -fR arch/${KERNEL_SRCARCH}/include/generated/* $kerneldir/arch/${KERNEL_SRCARCH}/include/generated/ + if [ -d arch/${ARCH}/include/generated ]; then + mkdir -p $kerneldir/arch/${ARCH}/include/generated/ + cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/ fi } @@ -347,7 +346,8 @@ kernel_do_configure() { if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then cp "${WORKDIR}/defconfig" "${B}/.config" fi - eval ${KERNEL_CONFIG_COMMAND} + + ${KERNEL_CONFIG_COMMAND} } do_savedefconfig() { @@ -405,7 +405,19 @@ pkg_postrm_kernel-image () { PACKAGESPLITFUNCS_prepend = "split_kernel_packages " python split_kernel_packages () { - do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.(bin|fw|cis|dsp)$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') +} + +# 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() { + if [ ! -d "${B}/arch/${ARCH}/boot" ]; then + mkdir ${B}/arch/${ARCH}/boot + fi + cd ${B}/arch/${ARCH}/boot + ln -sf ../../../vmlinux } do_strip() { @@ -490,6 +502,7 @@ kernel_do_deploy() { ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin fi } +do_deploy[cleandirs] = "${DEPLOYDIR}" do_deploy[dirs] = "${DEPLOYDIR} ${B}" do_deploy[prefuncs] += "package_get_auto_pr" |