kernel.bbclass: Pull in kernel.bbclass from oe-core master
PATCH v2 1/2 kernel.bbclass: Pull in kernel.bbclass from oe-core master
* Pull in kernel.bbclass from oe-core master to allow patching of the local version of kernel.bbclass until upstream patch is accepted and pulled into oe-core master.
---
Version 2 changes:
Fix commit message that mentioned dylan instead of master
classes/kernel.bbclass | 389 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 389 insertions(+), 0 deletions(-) create mode 100644 classes/kernel.bbclass
classes/kernel.bbclass new file +389 -0
@@ -0,0 +1,389 @@ +inherit linux-kernel-base module_strip kernel-module-split + +PROVIDES += "virtual/kernel" +DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross" + +# we include gcc above, we dont need virtual/libc +INHIBIT_DEFAULT_DEPS = "1" + +KERNEL_IMAGETYPE ?= "zImage" +INITRAMFS_IMAGE ?= "" +INITRAMFS_TASK ?= "" + +python __anonymous () { + kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or '' + if kerneltype == 'uImage': + depends = d.getVar("DEPENDS", True) + depends = "%s u-boot-mkimage-native" % depends + d.setVar("DEPENDS", depends) + + image = d.getVar('INITRAMFS_IMAGE', True) + if image: + d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs') +} + +inherit kernel-arch deploy + +PACKAGES_DYNAMIC += "^kernel-module-.*" +PACKAGES_DYNAMIC += "^kernel-image-.*" +PACKAGES_DYNAMIC += "^kernel-firmware-.*" + +export OS = "${TARGET_OS}" +export CROSS_COMPILE = "${TARGET_PREFIX}" + +KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \ + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + \ + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}" + +KERNEL_RELEASE ?= "${KERNEL_VERSION}" + +# Where built kernel lies in the kernel tree +KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" +KERNEL_IMAGEDEST = "boot" + +# +# configuration +# +export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}" + +KERNEL_VERSION = "${@get_kernelversion('${B}')}" + +KERNEL_LOCALVERSION ?= "" + +# kernels are generally machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# U-Boot support +UBOOT_ENTRYPOINT ?= "20008000" +UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" + +# Some Linux kernel configurations need additional parameters on the command line +KERNEL_EXTRA_ARGS ?= "" + +# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. +# We don't want to override kernel Makefile variables from the environment +EXTRA_OEMAKE = "" + +KERNEL_ALT_IMAGETYPE ??= "" + +# Define where the kernel headers are installed on the target as well as where +# they are staged. +KERNEL_SRC_PATH = "/usr/src/kernel" + +KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}" + +kernel_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} + if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then + gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}" + fi +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} + else + bbnote "no modules to compile" + fi +} +addtask compile_kernelmodules after do_compile before do_strip + +kernel_do_install() { + # + # First install the modules + # + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install + rm "${D}/lib/modules/${KERNEL_VERSION}/build" + rm "${D}/lib/modules/${KERNEL_VERSION}/source" + else + bbnote "no modules to install" + fi + + # + # Install various kernel output (zImage, map file, config, module support files) + # + install -d ${D}/${KERNEL_IMAGEDEST} + install -d ${D}/boot + install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} + install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} + install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} + install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} + [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} + install -d ${D}${sysconfdir}/modules-load.d + install -d ${D}${sysconfdir}/modprobe.d + + # + # Support for external module building - create a minimal copy of the + # kernel source tree. + # + kerneldir=${D}${KERNEL_SRC_PATH} + install -d $kerneldir + + # + # Store the kernel version in sysroots for module-base.bbclass + # + + echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion + + # + # Store kernel image name to allow use during image generation + # + + echo "${KERNEL_IMAGE_BASE_NAME}" >$kerneldir/kernel-image-name + + # + # Copy the entire source tree. In case an external build directory is + # used, copy the build directory over first, then copy over the source + # dir. This ensures the original Makefiles are used and not the + # redirecting Makefiles in the build directory. + # + # work and sysroots can be on different partitions, so we can't rely on + # hardlinking, unfortunately. + # + find . -depth -not -name "*.cmd" -not -name "*.o" -not -path "./.*" -print0 | cpio --null -pdu $kerneldir + cp .config $kerneldir + if [ "${S}" != "${B}" ]; then + pwd="$PWD" + cd "${S}" + find . -depth -not -path "./.*" -print0 | cpio --null -pdu $kerneldir + cd "$pwd" + fi + install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE} + install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION} + + # + # Clean and remove files not needed for building modules. + # Some distributions go through a lot more trouble to strip out + # unecessary headers, for now, we just prune the obvious bits. + # + # We don't want to leave host-arch binaries in /sysroots, so + # we clean the scripts dir while leaving the generated config + # and include files. + # + oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean + make -C $kerneldir _mrproper_scripts + find $kerneldir -path $kerneldir/lib -prune -o -path $kerneldir/tools -prune -o -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \; + find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \; + + # As of Linux kernel version 3.0.1, the clean target removes + # arch/powerpc/lib/crtsavres.o which is present in + # KBUILD_LDFLAGS_MODULE, making it required to build external modules. + if [ ${ARCH} = "powerpc" ]; then + cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o + fi + + # Necessary for building modules like compat-wireless. + if [ -f include/generated/bounds.h ]; then + cp include/generated/bounds.h $kerneldir/include/generated/bounds.h + fi + 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 + + # Remove the following binaries which cause strip or arch QA errors + # during do_package for cross-compiled platforms + bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \ + arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \ + scripts/kconfig/conf.o scripts/kconfig/kxgettext.o" + for entry in $bin_files; do + rm -f $kerneldir/$entry + done + + # kernels <2.6.30 don't have $kerneldir/tools directory so we check if it exists before calling sed + if [ -f $kerneldir/tools/perf/Makefile ]; then + # Fix SLANG_INC for slang.h + sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g' $kerneldir/tools/perf/Makefile + fi +} +do_install[prefuncs] += "package_get_auto_pr" + +sysroot_stage_all_append() { + sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH} +} + +kernel_do_configure() { + # fixes extra + in /lib/modules/2.6.37+ + # $ scripts/setlocalversion . => + + # $ make kernelversion => 2.6.37 + # $ make kernelrelease => 2.6.37+ + touch ${B}/.scmversion ${S}/.scmversion + + # Copy defconfig to .config if .config does not exist. This allows + # recipes to manage the .config themselves in do_configure_prepend(). + if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then + cp "${WORKDIR}/defconfig" "${B}/.config" + fi + yes '' | oe_runmake oldconfig + + if [ ! -z "${INITRAMFS_IMAGE}" ]; then + for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do + if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then + cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img + fi + done + fi +} + +do_configure[depends] += "${INITRAMFS_TASK}" + +do_savedefconfig() { + oe_runmake savedefconfig +} +do_savedefconfig[nostamp] = "1" +addtask savedefconfig after do_configure + +inherit cml1 + +EXPORT_FUNCTIONS do_compile do_install do_configure + +# kernel-base becomes kernel-${KERNEL_VERSION} +# kernel-image becomes kernel-image-${KERNEL_VERISON} +PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-modules" +FILES_${PN} = "" +FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order /lib/modules/${KERNEL_VERSION}/modules.builtin" +FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" +FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}" +FILES_kernel-vmlinux = "/boot/vmlinux*" +FILES_kernel-modules = "" +RDEPENDS_kernel = "kernel-base" +# Allow machines to override this dependency if kernel image files are +# not wanted in images as standard +RDEPENDS_kernel-base ?= "kernel-image" +PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}" +PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}" +RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}" +ALLOW_EMPTY_kernel = "1" +ALLOW_EMPTY_kernel-base = "1" +ALLOW_EMPTY_kernel-image = "1" +ALLOW_EMPTY_kernel-modules = "1" +DESCRIPTION_kernel-modules = "Kernel modules meta package" + +pkg_postinst_kernel-image () { + update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true + if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then + mkdir -p $D/lib/modules/${KERNEL_VERSION} + fi + if [ -n "$D" ]; then + depmodwrapper -a -b $D ${KERNEL_VERSION} + else + depmod -a ${KERNEL_VERSION} + fi +} + +pkg_postrm_kernel-image () { + update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true +} + +PACKAGESPLITFUNCS_prepend = "split_kernel_packages " + +python split_kernel_packages () { + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') +} + +do_strip() { + if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then + if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then + bbwarn "image type will not be stripped (not supported): ${KERNEL_IMAGETYPE}" + return + fi + + cd ${B} + headers=`"$CROSS_COMPILE"readelf -S ${KERNEL_OUTPUT} | \ + grep "^ \{1,\}\[[0-9 ]\{1,\}\] [^ ]" | \ + sed "s/^ \{1,\}\[[0-9 ]\{1,\}\] //" | \ + gawk '{print $1}'` + + for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { + if [[ "$headers" != *"$str"* ]]; then + bbwarn "Section not found: $str"; + fi + + "$CROSS_COMPILE"strip -s -R $str ${KERNEL_OUTPUT} + }; done + + bbnote "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping sections:" \ + "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" + fi; +} +do_strip[dirs] = "${B}" + +addtask do_strip before do_sizecheck after do_kernel_link_vmlinux + +# 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 +do_sizecheck() { + if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then + cd ${B} + size=`ls -lL ${KERNEL_OUTPUT} | awk '{ print $5}'` + if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then + die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular." + fi + fi +} +do_sizecheck[dirs] = "${B}" + +addtask sizecheck before do_install after do_strip + +KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +# Don't include the DATETIME variable in the sstate package signatures +KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" +MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz" +# Don't include the DATETIME variable in the sstate package signatures +MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" +MODULE_TARBALL_DEPLOY ?= "1" + +do_uboot_mkimage() { + if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then + if test "x${KEEPUIMAGE}" != "xyes" ; then + ENTRYPOINT=${UBOOT_ENTRYPOINT} + if test -n "${UBOOT_ENTRYSYMBOL}"; then + ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ + awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'` + fi + if test -e arch/${ARCH}/boot/compressed/vmlinux ; then + ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage + rm -f linux.bin + else + ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin + rm -f linux.bin.gz + gzip -9 linux.bin + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage + rm -f linux.bin.gz + fi + fi + fi +} + +addtask uboot_mkimage before do_install after do_compile + +kernel_do_deploy() { + install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin + if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + mkdir -p ${D}/lib + tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib + ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME} + fi + + ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.bin + ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGETYPE} + + cp ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt +} +do_deploy[dirs] = "${DEPLOYDIR} ${B}" +do_deploy[prefuncs] += "package_get_auto_pr" + +addtask deploy before do_build after do_install + +EXPORT_FUNCTIONS do_deploy +
Signature · 1 line
1.7.0.4
Why meta-ti and not meta-arago where we've overlayed kernel.bbclass several times in the past?
Signature · 1 line
Denys
Quoted 415 lines · Franklin S. Cooper Jr
* Pull in kernel.bbclass from oe-core master to allow patching of the local version of kernel.bbclass until upstream patch is accepted and pulled into oe-core master.
Signed-off-by Franklin S. Cooper Jr <[email protected]>---
Version 2 changes:
Fix commit message that mentioned dylan instead of masterclasses/kernel.bbclass | 389 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 389 insertions(+), 0 deletions(-) create mode 100644 classes/kernel.bbclassclasses/kernel.bbclass new file +389
-0@@ -0,0 +1,389 @@ +inherit linux-kernel-base module_strip kernel-module-split + +PROVIDES += "virtual/kernel" +DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross" + +# we include gcc above, we dont need virtual/libc +INHIBIT_DEFAULT_DEPS = "1" + +KERNEL_IMAGETYPE ?= "zImage" +INITRAMFS_IMAGE ?= "" +INITRAMFS_TASK ?= "" + +python __anonymous () { + kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or '' + if kerneltype == 'uImage': + depends = d.getVar("DEPENDS", True) + depends = "%s u-boot-mkimage-native" % depends + d.setVar("DEPENDS", depends) + + image = d.getVar('INITRAMFS_IMAGE', True) + if image: + d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs') +} + +inherit kernel-arch deploy + +PACKAGES_DYNAMIC += "^kernel-module-.*" +PACKAGES_DYNAMIC += "^kernel-image-.*" +PACKAGES_DYNAMIC += "^kernel-firmware-.*" + +export OS = "${TARGET_OS}" +export CROSS_COMPILE = "${TARGET_PREFIX}" + +KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \ + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + \ + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}" + +KERNEL_RELEASE ?= "${KERNEL_VERSION}" + +# Where built kernel lies in the kernel tree +KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" +KERNEL_IMAGEDEST = "boot" + +# +# configuration +# +export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1) or "ttyS0"}" + +KERNEL_VERSION = "${@get_kernelversion('${B}')}" + +KERNEL_LOCALVERSION ?= "" + +# kernels are generally machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# U-Boot support +UBOOT_ENTRYPOINT ?= "20008000" +UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" + +# Some Linux kernel configurations need additional parameters on the command line +KERNEL_EXTRA_ARGS ?= "" + +# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. +# We don't want to override kernel Makefile variables from the environment +EXTRA_OEMAKE = "" + +KERNEL_ALT_IMAGETYPE ??= "" + +# Define where the kernel headers are installed on the target as well as where +# they are staged. +KERNEL_SRC_PATH = "/usr/src/kernel" + +KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}" + +kernel_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} + if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then + gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}" + fi +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} + else + bbnote "no modules to compile" + fi +} +addtask compile_kernelmodules after do_compile before do_strip + +kernel_do_install() { + # + # First install the modules + # + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install + rm "${D}/lib/modules/${KERNEL_VERSION}/build" + rm "${D}/lib/modules/${KERNEL_VERSION}/source" + else + bbnote "no modules to install" + fi + + # + # Install various kernel output (zImage, map file, config, module support files) + # + install -d ${D}/${KERNEL_IMAGEDEST} + install -d ${D}/boot + install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION} + install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} + install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} + install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} + [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} + install -d ${D}${sysconfdir}/modules-load.d + install -d ${D}${sysconfdir}/modprobe.d + + # + # Support for external module building - create a minimal copy of the + # kernel source tree. + # + kerneldir=${D}${KERNEL_SRC_PATH} + install -d $kerneldir + + # + # Store the kernel version in sysroots for module-base.bbclass + # + + echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion + + # + # Store kernel image name to allow use during image generation + # + + echo "${KERNEL_IMAGE_BASE_NAME}" >$kerneldir/kernel-image-name + + # + # Copy the entire source tree. In case an external build directory is + # used, copy the build directory over first, then copy over the source + # dir. This ensures the original Makefiles are used and not the + # redirecting Makefiles in the build directory. + # + # work and sysroots can be on different partitions, so we can't rely on + # hardlinking, unfortunately. + # + find . -depth -not -name "*.cmd" -not -name "*.o" -not -path "./.*" -print0 | cpio --null -pdu $kerneldir + cp .config $kerneldir + if [ "${S}" != "${B}" ]; then + pwd="$PWD" + cd "${S}" + find . -depth -not -path "./.*" -print0 | cpio --null -pdu $kerneldir + cd "$pwd" + fi + install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE} + install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION} + + # + # Clean and remove files not needed for building modules. + # Some distributions go through a lot more trouble to strip out + # unecessary headers, for now, we just prune the obvious bits. + # + # We don't want to leave host-arch binaries in /sysroots, so + # we clean the scripts dir while leaving the generated config + # and include files. + # + oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean + make -C $kerneldir _mrproper_scripts + find $kerneldir -path $kerneldir/lib -prune -o -path $kerneldir/tools -prune -o -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \; + find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \; + + # As of Linux kernel version 3.0.1, the clean target removes + # arch/powerpc/lib/crtsavres.o which is present in + # KBUILD_LDFLAGS_MODULE, making it required to build external modules. + if [ ${ARCH} = "powerpc" ]; then + cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o + fi + + # Necessary for building modules like compat-wireless. + if [ -f include/generated/bounds.h ]; then + cp include/generated/bounds.h $kerneldir/include/generated/bounds.h + fi + 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 + + # Remove the following binaries which cause strip or arch QA errors + # during do_package for cross-compiled platforms + bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \ + arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \ + scripts/kconfig/conf.o scripts/kconfig/kxgettext.o" + for entry in $bin_files; do + rm -f $kerneldir/$entry + done + + # kernels <2.6.30 don't have $kerneldir/tools directory so we check if it exists before calling sed + if [ -f $kerneldir/tools/perf/Makefile ]; then + # Fix SLANG_INC for slang.h + sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g' $kerneldir/tools/perf/Makefile + fi +} +do_install[prefuncs] += "package_get_auto_pr" + +sysroot_stage_all_append() { + sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH} +} + +kernel_do_configure() { + # fixes extra + in /lib/modules/2.6.37+ + # $ scripts/setlocalversion . => + + # $ make kernelversion => 2.6.37 + # $ make kernelrelease => 2.6.37+ + touch ${B}/.scmversion ${S}/.scmversion + + # Copy defconfig to .config if .config does not exist. This allows + # recipes to manage the .config themselves in do_configure_prepend(). + if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then + cp "${WORKDIR}/defconfig" "${B}/.config" + fi + yes '' | oe_runmake oldconfig + + if [ ! -z "${INITRAMFS_IMAGE}" ]; then + for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do + if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then + cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img + fi + done + fi +} + +do_configure[depends] += "${INITRAMFS_TASK}" + +do_savedefconfig() { + oe_runmake savedefconfig +} +do_savedefconfig[nostamp] = "1" +addtask savedefconfig after do_configure + +inherit cml1 + +EXPORT_FUNCTIONS do_compile do_install do_configure + +# kernel-base becomes kernel-${KERNEL_VERSION} +# kernel-image becomes kernel-image-${KERNEL_VERISON} +PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev kernel-modules" +FILES_${PN} = "" +FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order /lib/modules/${KERNEL_VERSION}/modules.builtin" +FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" +FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}" +FILES_kernel-vmlinux = "/boot/vmlinux*" +FILES_kernel-modules = "" +RDEPENDS_kernel = "kernel-base" +# Allow machines to override this dependency if kernel image files are +# not wanted in images as standard +RDEPENDS_kernel-base ?= "kernel-image" +PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}" +PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}" +RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}" +ALLOW_EMPTY_kernel = "1" +ALLOW_EMPTY_kernel-base = "1" +ALLOW_EMPTY_kernel-image = "1" +ALLOW_EMPTY_kernel-modules = "1" +DESCRIPTION_kernel-modules = "Kernel modules meta package" + +pkg_postinst_kernel-image () { + update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true + if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then + mkdir -p $D/lib/modules/${KERNEL_VERSION} + fi + if [ -n "$D" ]; then + depmodwrapper -a -b $D ${KERNEL_VERSION} + else + depmod -a ${KERNEL_VERSION} + fi +} + +pkg_postrm_kernel-image () { + update-alternatives --remove ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true +} + +PACKAGESPLITFUNCS_prepend = "split_kernel_packages " + +python split_kernel_packages () { + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='') +} + +do_strip() { + if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then + if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then + bbwarn "image type will not be stripped (not supported): ${KERNEL_IMAGETYPE}" + return + fi + + cd ${B} + headers=`"$CROSS_COMPILE"readelf -S ${KERNEL_OUTPUT} | \ + grep "^ \{1,\}\[[0-9 ]\{1,\}\] [^ ]" | \ + sed "s/^ \{1,\}\[[0-9 ]\{1,\}\] //" | \ + gawk '{print $1}'` + + for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { + if [[ "$headers" != *"$str"* ]]; then + bbwarn "Section not found: $str"; + fi + + "$CROSS_COMPILE"strip -s -R $str ${KERNEL_OUTPUT} + }; done + + bbnote "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set, stripping sections:" \ + "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" + fi; +} +do_strip[dirs] = "${B}" + +addtask do_strip before do_sizecheck after do_kernel_link_vmlinux + +# 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 +do_sizecheck() { + if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then + cd ${B} + size=`ls -lL ${KERNEL_OUTPUT} | awk '{ print $5}'` + if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then + die "This kernel (size=$size > ${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular." + fi + fi +} +do_sizecheck[dirs] = "${B}" + +addtask sizecheck before do_install after do_strip + +KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +# Don't include the DATETIME variable in the sstate package signatures +KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" +MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" +MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz" +# Don't include the DATETIME variable in the sstate package signatures +MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" +MODULE_TARBALL_DEPLOY ?= "1" + +do_uboot_mkimage() { + if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then + if test "x${KEEPUIMAGE}" != "xyes" ; then + ENTRYPOINT=${UBOOT_ENTRYPOINT} + if test -n "${UBOOT_ENTRYSYMBOL}"; then + ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \ + awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'` + fi + if test -e arch/${ARCH}/boot/compressed/vmlinux ; then + ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin arch/${ARCH}/boot/uImage + rm -f linux.bin + else + ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin + rm -f linux.bin.gz + gzip -9 linux.bin + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage + rm -f linux.bin.gz + fi + fi + fi +} + +addtask uboot_mkimage before do_install after do_compile + +kernel_do_deploy() { + install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin + if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + mkdir -p ${D}/lib + tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib + ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME} + fi + + ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.bin + ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGETYPE} + + cp ${COREBASE}/meta/files/deploydir_readme.txt ${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt +} +do_deploy[dirs] = "${DEPLOYDIR} ${B}" +do_deploy[prefuncs] += "package_get_auto_pr" + +addtask deploy before do_build after do_install + +EXPORT_FUNCTIONS do_deploy +Signature · 6 lines
1.7.0.4 _______________________________________________ meta-ti mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-ti
The issue this patch set is fixing isn't an Arago distro only problem but rather a problem faced by anyone using a newer version of u-boot.
Quoted 504 lines
-----Original Message-----
From: Dmytriyenko, Denys
Sent: Tuesday, August 20, 2013 2:42 PM
To: Cooper Jr., Franklin
Cc: [email protected]
Subject: Re: [meta-ti] [master][PATCH 1/2 v2] kernel.bbclass: Pull in kernel.bbclass from oe-core masterWhy meta-ti and not meta-arago where we've overlayed kernel.bbclass several times in the past?
--
DenysQuoted 10 lines · Franklin S. Cooper Jr
* Pull in kernel.bbclass from oe-core master to allow patching of the local version of kernel.bbclass until upstream patch is accepted and pulled into oe-core master.
Signed-off-by Franklin S. Cooper Jr <[email protected]>---
Version 2 changes:
Fix commit message that mentioned dylan instead of masterclasses/kernel.bbclass | 389++++++++++++++++++++++++++++++++++++++++++++++++
classes/kernel.bbclass line 4
Quoted 13 lines
1 files changed, 389 insertions(+), 0 deletions(-) create mode 100644 classes/kernel.bbclassclasses/kernel.bbclass new file +4
-0@@ -0,0 +1,389 @@ +inherit linux-kernel-base module_strip kernel-module-split + +PROVIDES += "virtual/kernel" +DEPENDS += "virtual/${TARGET_PREFIX}binutilsvirtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross"
Quoted 20 lines
classes/kernel.bbclass new file +20
-0+ +# we include gcc above, we dont need virtual/libc +INHIBIT_DEFAULT_DEPS = "1" + +KERNEL_IMAGETYPE ?= "zImage" +INITRAMFS_IMAGE ?= "" +INITRAMFS_TASK ?= "" + +python __anonymous () { + kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or '' + if kerneltype == 'uImage': + depends = d.getVar("DEPENDS", True) + depends = "%s u-boot-mkimage-native" % depends + d.setVar("DEPENDS", depends) + + image = d.getVar('INITRAMFS_IMAGE', True) + if image: + d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs') +} +classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+inherit kernel-arch deploy + +PACKAGES_DYNAMIC += "^kernel-module-.*" +PACKAGES_DYNAMIC += "^kernel-image-.*" +PACKAGES_DYNAMIC += "^kernel-firmware-.*" + +export OS = "${TARGET_OS}" +export CROSS_COMPILE = "${TARGET_PREFIX}" + +KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + \ + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}" + +KERNEL_RELEASE ?= "${KERNEL_VERSION}" + +# Where built kernel lies in the kernel tree +KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" +KERNEL_IMAGEDEST = "boot" + +# +# configuration +# +export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1)or "ttyS0"}"
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ +KERNEL_VERSION = "${@get_kernelversion('${B}')}" + +KERNEL_LOCALVERSION ?= "" + +# kernels are generally machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# U-Boot support +UBOOT_ENTRYPOINT ?= "20008000" +UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" + +# Some Linux kernel configurations need additional parameters on thecommand line
classes/kernel.bbclass
Quoted 9 lines
classes/kernel.bbclass new file +9
-0+KERNEL_EXTRA_ARGS ?= "" + +# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. +# We don't want to override kernel Makefile variables from the environment +EXTRA_OEMAKE = "" + +KERNEL_ALT_IMAGETYPE ??= "" + +# Define where the kernel headers are installed on the target as well aswhere
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+# they are staged. +KERNEL_SRC_PATH = "/usr/src/kernel" + +KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz"else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ +kernel_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE}${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
classes/kernel.bbclass line 78
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" ="${KERNEL_IMAGETYPE}"; then
classes/kernel.bbclass line 79
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" >"${KERNEL_OUTPUT}"
classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+ fi +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}"LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ else + bbnote "no modules to compile" + fi +} +addtask compile_kernelmodules after do_compile before do_strip + +kernel_do_install() { + # + # First install the modules + # + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}"
modules_installclasses/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+ rm "${D}/lib/modules/${KERNEL_VERSION}/build" + rm "${D}/lib/modules/${KERNEL_VERSION}/source" + else + bbnote "no modules to install" + fi + + # + # Install various kernel output (zImage, map file, config, module supportfiles)
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ # + install -d ${D}/${KERNEL_IMAGEDEST} + install -d ${D}/boot + install -m 0644 ${KERNEL_OUTPUT}${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
classes/kernel.bbclass line 112
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} + install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} + [ -e Module.symvers ] && install -m 0644 Module.symvers${D}/boot/Module.symvers-${KERNEL_VERSION}
Quoted 11 lines
classes/kernel.bbclass new file +11
-0+ install -d ${D}${sysconfdir}/modules-load.d + install -d ${D}${sysconfdir}/modprobe.d + + # + # Support for external module building - create a minimal copy of the + # kernel source tree. + # + kerneldir=${D}${KERNEL_SRC_PATH} + install -d $kerneldir + + #classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ # Store the kernel version in sysroots for module-base.bbclass + # + + echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion + + # + # Store kernel image name to allow use during image generation + # + + echo "${KERNEL_IMAGE_BASE_NAME}" >$kerneldir/kernel-image-name
classes/kernel.bbclass
Quoted 11 lines
classes/kernel.bbclass new file +11
-0+ + # + # Copy the entire source tree. In case an external build directory is + # used, copy the build directory over first, then copy over the source + # dir. This ensures the original Makefiles are used and not the + # redirecting Makefiles in the build directory. + # + # work and sysroots can be on different partitions, so we can't rely on + # hardlinking, unfortunately. + # + find . -depth -not -name "*.cmd" -not -name "*.o" -not -path "./.*" -print0 | cpio --null -pdu $kerneldir
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ cp .config $kerneldir + if [ "${S}" != "${B}" ]; then + pwd="$PWD" + cd "${S}" + find . -depth -not -path "./.*" -print0 | cpio --null -pdu$kerneldir
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ cd "$pwd" + fi + install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE} + install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION}
classes/kernel.bbclass
Quoted 11 lines
classes/kernel.bbclass new file +11
-0+ + # + # Clean and remove files not needed for building modules. + # Some distributions go through a lot more trouble to strip out + # unecessary headers, for now, we just prune the obvious bits. + # + # We don't want to leave host-arch binaries in /sysroots, so + # we clean the scripts dir while leaving the generated config + # and include files. + # + oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}"clean
classes/kernel.bbclass line 169
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ make -C $kerneldir _mrproper_scripts + find $kerneldir -path $kerneldir/lib -prune -o -path $kerneldir/tools -prune -o -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \;
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \; + + # As of Linux kernel version 3.0.1, the clean target removes + # arch/powerpc/lib/crtsavres.o which is present in + # KBUILD_LDFLAGS_MODULE, making it required to build externalmodules.
classes/kernel.bbclass line 176
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ if [ ${ARCH} = "powerpc" ]; then + cp arch/powerpc/lib/crtsavres.o
$kerneldir/arch/powerpc/lib/crtsavres.oclasses/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ fi + + # Necessary for building modules like compat-wireless. + if [ -f include/generated/bounds.h ]; then + cp include/generated/bounds.h
$kerneldir/include/generated/bounds.hclasses/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ fi + 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/
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ fi + + # Remove the following binaries which cause strip or arch QA errors + # during do_package for cross-compiled platforms + bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff\
classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+ arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \ + scripts/kconfig/conf.o scripts/kconfig/kxgettext.o" + for entry in $bin_files; do + rm -f $kerneldir/$entry + done + + # kernels <2.6.30 don't have $kerneldir/tools directory so we check if itexists before calling sed
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ if [ -f $kerneldir/tools/perf/Makefile ]; then + # Fix SLANG_INC for slang.h + sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g'$kerneldir/tools/perf/Makefile
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+ fi +} +do_install[prefuncs] += "package_get_auto_pr" + +sysroot_stage_all_append() { + sysroot_stage_dir ${D}${KERNEL_SRC_PATH}${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
Quoted 9 lines
classes/kernel.bbclass new file +9
-0+} + +kernel_do_configure() { + # fixes extra + in /lib/modules/2.6.37+ + # $ scripts/setlocalversion . => + + # $ make kernelversion => 2.6.37 + # $ make kernelrelease => 2.6.37+ + touch ${B}/.scmversion ${S}/.scmversion +classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ # Copy defconfig to .config if .config does not exist. This allows + # recipes to manage the .config themselves in do_configure_prepend(). + if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then + cp "${WORKDIR}/defconfig" "${B}/.config" + fi + yes '' | oe_runmake oldconfig + + if [ ! -z "${INITRAMFS_IMAGE}" ]; then + for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do + if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
classes/kernel.bbclass line 226
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ fi + done + fi +} + +do_configure[depends] += "${INITRAMFS_TASK}" + +do_savedefconfig() { + oe_runmake savedefconfig +}classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+do_savedefconfig[nostamp] = "1" +addtask savedefconfig after do_configure + +inherit cml1 + +EXPORT_FUNCTIONS do_compile do_install do_configure + +# kernel-base becomes kernel-${KERNEL_VERSION} +# kernel-image becomes kernel-image-${KERNEL_VERISON} +PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-devkernel-modules"
classes/kernel.bbclass line 248
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+FILES_${PN} = "" +FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order
/lib/modules/${KERNEL_VERSION}/modules.builtin"classes/kernel.bbclass line 250
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" +FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers*
/boot/config*${KERNEL_SRC_PATH}"classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+FILES_kernel-vmlinux = "/boot/vmlinux*" +FILES_kernel-modules = "" +RDEPENDS_kernel = "kernel-base" +# Allow machines to override this dependency if kernel image files are +# not wanted in images as standard +RDEPENDS_kernel-base ?= "kernel-image" +PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
classes/kernel.bbclass line 258
Quoted 1 line
classes/kernel.bbclass new file +1
-0+PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
classes/kernel.bbclass
Quoted 9 lines
classes/kernel.bbclass new file +9
-0+RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}" +ALLOW_EMPTY_kernel = "1" +ALLOW_EMPTY_kernel-base = "1" +ALLOW_EMPTY_kernel-image = "1" +ALLOW_EMPTY_kernel-modules = "1" +DESCRIPTION_kernel-modules = "Kernel modules meta package" + +pkg_postinst_kernel-image () { + update-alternatives --install/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
classes/kernel.bbclass
Quoted 12 lines
classes/kernel.bbclass new file +12
-0+ if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then + mkdir -p $D/lib/modules/${KERNEL_VERSION} + fi + if [ -n "$D" ]; then + depmodwrapper -a -b $D ${KERNEL_VERSION} + else + depmod -a ${KERNEL_VERSION} + fi +} + +pkg_postrm_kernel-image () { + update-alternatives --remove ${KERNEL_IMAGETYPE}${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+} + +PACKAGESPLITFUNCS_prepend = "split_kernel_packages " + +python split_kernel_packages () { + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$',output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
classes/kernel.bbclass line 286
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$',output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
classes/kernel.bbclass line 287
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$',output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+} + +do_strip() { + if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then + if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then + bbwarn "image type will not be stripped (notsupported): ${KERNEL_IMAGETYPE}"
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ return + fi + + cd ${B} + headers=`"$CROSS_COMPILE"readelf -S ${KERNEL_OUTPUT} |\
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ grep "^ \{1,\}\[[0-9 ]\{1,\}\] [^ ]" | \ + sed "s/^ \{1,\}\[[0-9 ]\{1,\}\] //" | \ + gawk '{print $1}'` + + for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { + if [[ "$headers" != *"$str"* ]]; then + bbwarn "Section not found: $str"; + fi + + "$CROSS_COMPILE"strip -s -R $str ${KERNEL_OUTPUT} + }; done + + bbnote "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set,stripping sections:" \
classes/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+ "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" + fi; +} +do_strip[dirs] = "${B}" + +addtask do_strip before do_sizecheck after do_kernel_link_vmlinux + +# Support checking the kernel size since some kernels need to reside inpartitions
classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+# with a fixed length or there is a limit in transferring the kernel to memory +do_sizecheck() { + if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then + cd ${B} + size=`ls -lL ${KERNEL_OUTPUT} | awk '{ print $5}'` + if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then + die "This kernel (size=$size >${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular."
classes/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+ fi + fi +} +do_sizecheck[dirs] = "${B}" + +addtask sizecheck before do_install after do_strip + +KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+# Don't include the DATETIME variable in the sstate package signatures +KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" +MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
classes/kernel.bbclass
Quoted 12 lines
classes/kernel.bbclass new file +12
-0+MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz" +# Don't include the DATETIME variable in the sstate package signatures +MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" +MODULE_TARBALL_DEPLOY ?= "1" + +do_uboot_mkimage() { + if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then + if test "x${KEEPUIMAGE}" != "xyes" ; then + ENTRYPOINT=${UBOOT_ENTRYPOINT} + if test -n "${UBOOT_ENTRYSYMBOL}"; then + ENTRYPOINT=`${HOST_PREFIX}nm${S}/vmlinux | \
classes/kernel.bbclass line 351
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ awk'$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
classes/kernel.bbclass line 353
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ fi + if test -e arch/${ARCH}/boot/compressed/vmlinux ;then
classes/kernel.bbclass line 354
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ ${OBJCOPY} -O binary -R .note -R .comment -S
arch/${ARCH}/boot/compressed/vmlinuxlinux.binclasses/kernel.bbclass line 355
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin
arch/${ARCH}/boot/uImageclasses/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ rm -f linux.bin + else + ${OBJCOPY} -O binary -R .note -R .comment -Svmlinux linux.bin
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ rm -f linux.bin.gz + gzip -9 linux.bin + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz
arch/${ARCH}/boot/uImageclasses/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ rm -f linux.bin.gz + fi + fi + fi +} + +addtask uboot_mkimage before do_install after do_compile + +kernel_do_deploy() { + install -m 0644 ${KERNEL_OUTPUT}${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
classes/kernel.bbclass line 372
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e'^CONFIG_MODULES=y$' .config); then
classes/kernel.bbclass line 374
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ mkdir -p ${D}/lib + tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C${D} lib
classes/kernel.bbclass line 375
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ ln -sf ${MODULE_TARBALL_BASE_NAME}${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ fi + + ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.bin
classes/kernel.bbclass line 379
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin${DEPLOYDIR}/${KERNEL_IMAGETYPE}
classes/kernel.bbclass line 381
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ + cp ${COREBASE}/meta/files/deploydir_readme.txt
${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txtQuoted 15 lines
classes/kernel.bbclass new file +8
-1+} +do_deploy[dirs] = "${DEPLOYDIR} ${B}" +do_deploy[prefuncs] += "package_get_auto_pr" + +addtask deploy before do_build after do_install + +EXPORT_FUNCTIONS do_deploy + --1.7.0.4
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
Quoted 2 lines · Franklin
The issue this patch set is fixing isn't an Arago distro only problem but rather a problem faced by anyone using a newer version of u-boot.
Yes, I understand that. But at the same time meta-ti is used much wider and overlaying a core class is very risky and not recommended. Previously we also had rather generic fixes applied to kernel.bbclass and still kept it in meta-arago...
Signature · 1 line
Denys
Quoted 504 lines
Quoted 504 lines
-----Original Message-----
From: Dmytriyenko, Denys
Sent: Tuesday, August 20, 2013 2:42 PM
To: Cooper Jr., Franklin
Cc: [email protected]
Subject: Re: [meta-ti] [master][PATCH 1/2 v2] kernel.bbclass: Pull in kernel.bbclass from oe-core masterWhy meta-ti and not meta-arago where we've overlayed kernel.bbclass several times in the past?
--
DenysQuoted 10 lines · Franklin S. Cooper Jr
* Pull in kernel.bbclass from oe-core master to allow patching of the local version of kernel.bbclass until upstream patch is accepted and pulled into oe-core master.
Signed-off-by Franklin S. Cooper Jr <[email protected]>---
Version 2 changes:
Fix commit message that mentioned dylan instead of masterclasses/kernel.bbclass | 389++++++++++++++++++++++++++++++++++++++++++++++++
classes/kernel.bbclass line 4
Quoted 13 lines
1 files changed, 389 insertions(+), 0 deletions(-) create mode 100644 classes/kernel.bbclassclasses/kernel.bbclass new file +4
-0@@ -0,0 +1,389 @@ +inherit linux-kernel-base module_strip kernel-module-split + +PROVIDES += "virtual/kernel" +DEPENDS += "virtual/${TARGET_PREFIX}binutilsvirtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross"
Quoted 20 lines
classes/kernel.bbclass new file +20
-0+ +# we include gcc above, we dont need virtual/libc +INHIBIT_DEFAULT_DEPS = "1" + +KERNEL_IMAGETYPE ?= "zImage" +INITRAMFS_IMAGE ?= "" +INITRAMFS_TASK ?= "" + +python __anonymous () { + kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or '' + if kerneltype == 'uImage': + depends = d.getVar("DEPENDS", True) + depends = "%s u-boot-mkimage-native" % depends + d.setVar("DEPENDS", depends) + + image = d.getVar('INITRAMFS_IMAGE', True) + if image: + d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs') +} +classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+inherit kernel-arch deploy + +PACKAGES_DYNAMIC += "^kernel-module-.*" +PACKAGES_DYNAMIC += "^kernel-image-.*" +PACKAGES_DYNAMIC += "^kernel-firmware-.*" + +export OS = "${TARGET_OS}" +export CROSS_COMPILE = "${TARGET_PREFIX}" + +KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100 + \ + int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}" + +KERNEL_RELEASE ?= "${KERNEL_VERSION}" + +# Where built kernel lies in the kernel tree +KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" +KERNEL_IMAGEDEST = "boot" + +# +# configuration +# +export CMDLINE_CONSOLE = "console=${@d.getVar("KERNEL_CONSOLE",1)or "ttyS0"}"
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ +KERNEL_VERSION = "${@get_kernelversion('${B}')}" + +KERNEL_LOCALVERSION ?= "" + +# kernels are generally machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# U-Boot support +UBOOT_ENTRYPOINT ?= "20008000" +UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" + +# Some Linux kernel configurations need additional parameters on thecommand line
classes/kernel.bbclass
Quoted 9 lines
classes/kernel.bbclass new file +9
-0+KERNEL_EXTRA_ARGS ?= "" + +# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. +# We don't want to override kernel Makefile variables from the environment +EXTRA_OEMAKE = "" + +KERNEL_ALT_IMAGETYPE ??= "" + +# Define where the kernel headers are installed on the target as well aswhere
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+# they are staged. +KERNEL_SRC_PATH = "/usr/src/kernel" + +KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz"else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ +kernel_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE}${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
classes/kernel.bbclass line 78
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" ="${KERNEL_IMAGETYPE}"; then
classes/kernel.bbclass line 79
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" >"${KERNEL_OUTPUT}"
classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+ fi +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}"LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ else + bbnote "no modules to compile" + fi +} +addtask compile_kernelmodules after do_compile before do_strip + +kernel_do_install() { + # + # First install the modules + # + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}"
modules_installclasses/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+ rm "${D}/lib/modules/${KERNEL_VERSION}/build" + rm "${D}/lib/modules/${KERNEL_VERSION}/source" + else + bbnote "no modules to install" + fi + + # + # Install various kernel output (zImage, map file, config, module supportfiles)
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ # + install -d ${D}/${KERNEL_IMAGEDEST} + install -d ${D}/boot + install -m 0644 ${KERNEL_OUTPUT}${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
classes/kernel.bbclass line 112
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} + install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} + [ -e Module.symvers ] && install -m 0644 Module.symvers${D}/boot/Module.symvers-${KERNEL_VERSION}
Quoted 11 lines
classes/kernel.bbclass new file +11
-0+ install -d ${D}${sysconfdir}/modules-load.d + install -d ${D}${sysconfdir}/modprobe.d + + # + # Support for external module building - create a minimal copy of the + # kernel source tree. + # + kerneldir=${D}${KERNEL_SRC_PATH} + install -d $kerneldir + + #classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ # Store the kernel version in sysroots for module-base.bbclass + # + + echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion + + # + # Store kernel image name to allow use during image generation + # + + echo "${KERNEL_IMAGE_BASE_NAME}" >$kerneldir/kernel-image-name
classes/kernel.bbclass
Quoted 11 lines
classes/kernel.bbclass new file +11
-0+ + # + # Copy the entire source tree. In case an external build directory is + # used, copy the build directory over first, then copy over the source + # dir. This ensures the original Makefiles are used and not the + # redirecting Makefiles in the build directory. + # + # work and sysroots can be on different partitions, so we can't rely on + # hardlinking, unfortunately. + # + find . -depth -not -name "*.cmd" -not -name "*.o" -not -path "./.*" -print0 | cpio --null -pdu $kerneldir
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ cp .config $kerneldir + if [ "${S}" != "${B}" ]; then + pwd="$PWD" + cd "${S}" + find . -depth -not -path "./.*" -print0 | cpio --null -pdu$kerneldir
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ cd "$pwd" + fi + install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE} + install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION}
classes/kernel.bbclass
Quoted 11 lines
classes/kernel.bbclass new file +11
-0+ + # + # Clean and remove files not needed for building modules. + # Some distributions go through a lot more trouble to strip out + # unecessary headers, for now, we just prune the obvious bits. + # + # We don't want to leave host-arch binaries in /sysroots, so + # we clean the scripts dir while leaving the generated config + # and include files. + # + oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}"clean
classes/kernel.bbclass line 169
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ make -C $kerneldir _mrproper_scripts + find $kerneldir -path $kerneldir/lib -prune -o -path $kerneldir/tools -prune -o -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \;
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \; + + # As of Linux kernel version 3.0.1, the clean target removes + # arch/powerpc/lib/crtsavres.o which is present in + # KBUILD_LDFLAGS_MODULE, making it required to build externalmodules.
classes/kernel.bbclass line 176
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ if [ ${ARCH} = "powerpc" ]; then + cp arch/powerpc/lib/crtsavres.o
$kerneldir/arch/powerpc/lib/crtsavres.oclasses/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ fi + + # Necessary for building modules like compat-wireless. + if [ -f include/generated/bounds.h ]; then + cp include/generated/bounds.h
$kerneldir/include/generated/bounds.hclasses/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ fi + 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/
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ fi + + # Remove the following binaries which cause strip or arch QA errors + # during do_package for cross-compiled platforms + bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff\
classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+ arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \ + scripts/kconfig/conf.o scripts/kconfig/kxgettext.o" + for entry in $bin_files; do + rm -f $kerneldir/$entry + done + + # kernels <2.6.30 don't have $kerneldir/tools directory so we check if itexists before calling sed
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ if [ -f $kerneldir/tools/perf/Makefile ]; then + # Fix SLANG_INC for slang.h + sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g'$kerneldir/tools/perf/Makefile
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+ fi +} +do_install[prefuncs] += "package_get_auto_pr" + +sysroot_stage_all_append() { + sysroot_stage_dir ${D}${KERNEL_SRC_PATH}${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
Quoted 9 lines
classes/kernel.bbclass new file +9
-0+} + +kernel_do_configure() { + # fixes extra + in /lib/modules/2.6.37+ + # $ scripts/setlocalversion . => + + # $ make kernelversion => 2.6.37 + # $ make kernelrelease => 2.6.37+ + touch ${B}/.scmversion ${S}/.scmversion +classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ # Copy defconfig to .config if .config does not exist. This allows + # recipes to manage the .config themselves in do_configure_prepend(). + if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then + cp "${WORKDIR}/defconfig" "${B}/.config" + fi + yes '' | oe_runmake oldconfig + + if [ ! -z "${INITRAMFS_IMAGE}" ]; then + for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do + if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
classes/kernel.bbclass line 226
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ fi + done + fi +} + +do_configure[depends] += "${INITRAMFS_TASK}" + +do_savedefconfig() { + oe_runmake savedefconfig +}classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+do_savedefconfig[nostamp] = "1" +addtask savedefconfig after do_configure + +inherit cml1 + +EXPORT_FUNCTIONS do_compile do_install do_configure + +# kernel-base becomes kernel-${KERNEL_VERSION} +# kernel-image becomes kernel-image-${KERNEL_VERISON} +PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-devkernel-modules"
classes/kernel.bbclass line 248
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+FILES_${PN} = "" +FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order
/lib/modules/${KERNEL_VERSION}/modules.builtin"classes/kernel.bbclass line 250
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" +FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers*
/boot/config*${KERNEL_SRC_PATH}"classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+FILES_kernel-vmlinux = "/boot/vmlinux*" +FILES_kernel-modules = "" +RDEPENDS_kernel = "kernel-base" +# Allow machines to override this dependency if kernel image files are +# not wanted in images as standard +RDEPENDS_kernel-base ?= "kernel-image" +PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
classes/kernel.bbclass line 258
Quoted 1 line
classes/kernel.bbclass new file +1
-0+PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
classes/kernel.bbclass
Quoted 9 lines
classes/kernel.bbclass new file +9
-0+RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}" +ALLOW_EMPTY_kernel = "1" +ALLOW_EMPTY_kernel-base = "1" +ALLOW_EMPTY_kernel-image = "1" +ALLOW_EMPTY_kernel-modules = "1" +DESCRIPTION_kernel-modules = "Kernel modules meta package" + +pkg_postinst_kernel-image () { + update-alternatives --install/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
classes/kernel.bbclass
Quoted 12 lines
classes/kernel.bbclass new file +12
-0+ if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then + mkdir -p $D/lib/modules/${KERNEL_VERSION} + fi + if [ -n "$D" ]; then + depmodwrapper -a -b $D ${KERNEL_VERSION} + else + depmod -a ${KERNEL_VERSION} + fi +} + +pkg_postrm_kernel-image () { + update-alternatives --remove ${KERNEL_IMAGETYPE}${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+} + +PACKAGESPLITFUNCS_prepend = "split_kernel_packages " + +python split_kernel_packages () { + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$',output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
classes/kernel.bbclass line 286
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$',output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
classes/kernel.bbclass line 287
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$',output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+} + +do_strip() { + if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then + if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then + bbwarn "image type will not be stripped (notsupported): ${KERNEL_IMAGETYPE}"
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ return + fi + + cd ${B} + headers=`"$CROSS_COMPILE"readelf -S ${KERNEL_OUTPUT} |\
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ grep "^ \{1,\}\[[0-9 ]\{1,\}\] [^ ]" | \ + sed "s/^ \{1,\}\[[0-9 ]\{1,\}\] //" | \ + gawk '{print $1}'` + + for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { + if [[ "$headers" != *"$str"* ]]; then + bbwarn "Section not found: $str"; + fi + + "$CROSS_COMPILE"strip -s -R $str ${KERNEL_OUTPUT} + }; done + + bbnote "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set,stripping sections:" \
classes/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+ "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" + fi; +} +do_strip[dirs] = "${B}" + +addtask do_strip before do_sizecheck after do_kernel_link_vmlinux + +# Support checking the kernel size since some kernels need to reside inpartitions
classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+# with a fixed length or there is a limit in transferring the kernel to memory +do_sizecheck() { + if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then + cd ${B} + size=`ls -lL ${KERNEL_OUTPUT} | awk '{ print $5}'` + if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then + die "This kernel (size=$size >${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the size of the kernel by making more of it modular."
classes/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+ fi + fi +} +do_sizecheck[dirs] = "${B}" + +addtask sizecheck before do_install after do_strip + +KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+# Don't include the DATETIME variable in the sstate package signatures +KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}" +MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
classes/kernel.bbclass
Quoted 12 lines
classes/kernel.bbclass new file +12
-0+MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +MODULE_TARBALL_BASE_NAME ?= "${MODULE_IMAGE_BASE_NAME}.tgz" +# Don't include the DATETIME variable in the sstate package signatures +MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" +MODULE_TARBALL_DEPLOY ?= "1" + +do_uboot_mkimage() { + if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then + if test "x${KEEPUIMAGE}" != "xyes" ; then + ENTRYPOINT=${UBOOT_ENTRYPOINT} + if test -n "${UBOOT_ENTRYSYMBOL}"; then + ENTRYPOINT=`${HOST_PREFIX}nm${S}/vmlinux | \
classes/kernel.bbclass line 351
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ awk'$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
classes/kernel.bbclass line 353
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ fi + if test -e arch/${ARCH}/boot/compressed/vmlinux ;then
classes/kernel.bbclass line 354
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ ${OBJCOPY} -O binary -R .note -R .comment -S
arch/${ARCH}/boot/compressed/vmlinuxlinux.binclasses/kernel.bbclass line 355
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin
arch/${ARCH}/boot/uImageclasses/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ rm -f linux.bin + else + ${OBJCOPY} -O binary -R .note -R .comment -Svmlinux linux.bin
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ rm -f linux.bin.gz + gzip -9 linux.bin + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz
arch/${ARCH}/boot/uImageclasses/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ rm -f linux.bin.gz + fi + fi + fi +} + +addtask uboot_mkimage before do_install after do_compile + +kernel_do_deploy() { + install -m 0644 ${KERNEL_OUTPUT}${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
classes/kernel.bbclass line 372
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e'^CONFIG_MODULES=y$' .config); then
classes/kernel.bbclass line 374
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ mkdir -p ${D}/lib + tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C${D} lib
classes/kernel.bbclass line 375
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ ln -sf ${MODULE_TARBALL_BASE_NAME}${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ fi + + ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.bin
classes/kernel.bbclass line 379
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin${DEPLOYDIR}/${KERNEL_IMAGETYPE}
classes/kernel.bbclass line 381
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ + cp ${COREBASE}/meta/files/deploydir_readme.txt
${DEPLOYDIR}/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txtQuoted 15 lines
classes/kernel.bbclass new file +8
-1+} +do_deploy[dirs] = "${DEPLOYDIR} ${B}" +do_deploy[prefuncs] += "package_get_auto_pr" + +addtask deploy before do_build after do_install + +EXPORT_FUNCTIONS do_deploy + --1.7.0.4
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
Quoted 10 lines
-----Original Message-----
From: Dmytriyenko, Denys
Sent: Tuesday, August 20, 2013 5:18 PM
To: Cooper Jr., Franklin
Cc: [email protected]
Subject: Re: [meta-ti] [master][PATCH 1/2 v2] kernel.bbclass: Pull in kernel.bbclass from oe-core master
Quoted 7 lines
Quoted 2 lines · Franklin
The issue this patch set is fixing isn't an Arago distro only problem but rather a problem faced by anyone using a newer version of u-boot.
Yes, I understand that. But at the same time meta-ti is used much wider and overlaying a core class is very risky and not recommended. Previously we also had rather generic fixes applied to kernel.bbclass and still kept it in meta-arago...
[Franklin] Ok I'll submit these to meta-arago. Makes my life easier not having to submit patches for two different branches anyway :)
Quoted 519 lines
--
DenysQuoted 9 lines
Quoted 9 lines
-----Original Message-----
From: Dmytriyenko, Denys
Sent: Tuesday, August 20, 2013 2:42 PM
To: Cooper Jr., Franklin
Cc: [email protected]
Subject: Re: [meta-ti] [master][PATCH 1/2 v2] kernel.bbclass: Pull in kernel.bbclass from oe-core masterWhy meta-ti and not meta-arago where we've overlayed kernel.bbclass
several
Quoted 63 lines
Quoted 63 lines
times in the past?
--
DenysQuoted 10 lines · Franklin S. Cooper Jr
* Pull in kernel.bbclass from oe-core master to allow patching of the local version of kernel.bbclass until upstream patch is accepted and pulled into oe-core master.
Signed-off-by Franklin S. Cooper Jr <[email protected]>---
Version 2 changes:
Fix commit message that mentioned dylan instead of masterclasses/kernel.bbclass | 389++++++++++++++++++++++++++++++++++++++++++++++++
classes/kernel.bbclass line 4
Quoted 13 lines
1 files changed, 389 insertions(+), 0 deletions(-) create mode 100644 classes/kernel.bbclassclasses/kernel.bbclass new file +4
-0@@ -0,0 +1,389 @@ +inherit linux-kernel-base module_strip kernel-module-split + +PROVIDES += "virtual/kernel" +DEPENDS += "virtual/${TARGET_PREFIX}binutilsvirtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross"
Quoted 20 lines
classes/kernel.bbclass new file +20
-0+ +# we include gcc above, we dont need virtual/libc +INHIBIT_DEFAULT_DEPS = "1" + +KERNEL_IMAGETYPE ?= "zImage" +INITRAMFS_IMAGE ?= "" +INITRAMFS_TASK ?= "" + +python __anonymous () { + kerneltype = d.getVar('KERNEL_IMAGETYPE', True) or '' + if kerneltype == 'uImage': + depends = d.getVar("DEPENDS", True) + depends = "%s u-boot-mkimage-native" % depends + d.setVar("DEPENDS", depends) + + image = d.getVar('INITRAMFS_IMAGE', True) + if image: + d.setVar('INITRAMFS_TASK', '${INITRAMFS_IMAGE}:do_rootfs') +} +classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+inherit kernel-arch deploy + +PACKAGES_DYNAMIC += "^kernel-module-.*" +PACKAGES_DYNAMIC += "^kernel-image-.*" +PACKAGES_DYNAMIC += "^kernel-firmware-.*" + +export OS = "${TARGET_OS}" +export CROSS_COMPILE = "${TARGET_PREFIX}" + +KERNEL_PRIORITY ?= "${@int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[0]) * 10000 + \
Quoted 1 line
Quoted 1 line
classes/kernel.bbclass line 35
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[1]) * 100+ \
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ int(d.getVar('PV',1).split('-')[0].split('+')[0].split('.')[-1])}" + +KERNEL_RELEASE ?= "${KERNEL_VERSION}" +Quoted 8 lines
Quoted 8 lines
classes/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+# Where built kernel lies in the kernel tree +KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}" +KERNEL_IMAGEDEST = "boot" + +# +# configuration +# +export CMDLINE_CONSOLE ="console=${@d.getVar("KERNEL_CONSOLE",1)
Quoted 15 lines
Quoted 15 lines
or "ttyS0"}"
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ +KERNEL_VERSION = "${@get_kernelversion('${B}')}" + +KERNEL_LOCALVERSION ?= "" + +# kernels are generally machine specific +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# U-Boot support +UBOOT_ENTRYPOINT ?= "20008000" +UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" + +# Some Linux kernel configurations need additional parameters on thecommand line
Quoted 4 lines
Quoted 4 lines
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+KERNEL_EXTRA_ARGS ?= "" + +# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE. +# We don't want to override kernel Makefile variables from theenvironment
Quoted 10 lines
Quoted 10 lines
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+EXTRA_OEMAKE = "" + +KERNEL_ALT_IMAGETYPE ??= "" + +# Define where the kernel headers are installed on the target as well aswhere
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+# they are staged. +KERNEL_SRC_PATH = "/usr/src/kernel" + +KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] ==".gz"
Quoted 291 lines
Quoted 291 lines
else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ +kernel_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE}${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
classes/kernel.bbclass line 78
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" ="${KERNEL_IMAGETYPE}"; then
classes/kernel.bbclass line 79
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" >"${KERNEL_OUTPUT}"
classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+ fi +} + +do_compile_kernelmodules() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake ${PARALLEL_MAKE} modules CC="${KERNEL_CC}"LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ else + bbnote "no modules to compile" + fi +} +addtask compile_kernelmodules after do_compile before do_strip + +kernel_do_install() { + # + # First install the modules + # + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then + oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}"
modules_installclasses/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+ rm "${D}/lib/modules/${KERNEL_VERSION}/build" + rm "${D}/lib/modules/${KERNEL_VERSION}/source" + else + bbnote "no modules to install" + fi + + # + # Install various kernel output (zImage, map file, config, module supportfiles)
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ # + install -d ${D}/${KERNEL_IMAGEDEST} + install -d ${D}/boot + install -m 0644 ${KERNEL_OUTPUT}${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${KERNEL_VERSION}
classes/kernel.bbclass line 112
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} + install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION} + [ -e Module.symvers ] && install -m 0644 Module.symvers${D}/boot/Module.symvers-${KERNEL_VERSION}
Quoted 11 lines
classes/kernel.bbclass new file +11
-0+ install -d ${D}${sysconfdir}/modules-load.d + install -d ${D}${sysconfdir}/modprobe.d + + # + # Support for external module building - create a minimal copy of the + # kernel source tree. + # + kerneldir=${D}${KERNEL_SRC_PATH} + install -d $kerneldir + + #classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ # Store the kernel version in sysroots for module-base.bbclass + # + + echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion + + # + # Store kernel image name to allow use during image generation + # + + echo "${KERNEL_IMAGE_BASE_NAME}" >$kerneldir/kernel-image-name
classes/kernel.bbclass
Quoted 11 lines
classes/kernel.bbclass new file +11
-0+ + # + # Copy the entire source tree. In case an external build directory is + # used, copy the build directory over first, then copy over the source + # dir. This ensures the original Makefiles are used and not the + # redirecting Makefiles in the build directory. + # + # work and sysroots can be on different partitions, so we can't rely on + # hardlinking, unfortunately. + # + find . -depth -not -name "*.cmd" -not -name "*.o" -not -path "./.*" -print0 | cpio --null -pdu $kerneldir
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ cp .config $kerneldir + if [ "${S}" != "${B}" ]; then + pwd="$PWD" + cd "${S}" + find . -depth -not -path "./.*" -print0 | cpio --null -pdu$kerneldir
classes/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ cd "$pwd" + fi + install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE} + install -m 0644 System.map $kerneldir/System.map-${KERNEL_VERSION}
classes/kernel.bbclass
Quoted 11 lines
classes/kernel.bbclass new file +11
-0+ + # + # Clean and remove files not needed for building modules. + # Some distributions go through a lot more trouble to strip out + # unecessary headers, for now, we just prune the obvious bits. + # + # We don't want to leave host-arch binaries in /sysroots, so + # we clean the scripts dir while leaving the generated config + # and include files. + # + oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}"clean
classes/kernel.bbclass line 169
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ make -C $kerneldir _mrproper_scripts + find $kerneldir -path $kerneldir/lib -prune -o -path $kerneldir/tools -prune -o -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \;
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \; + + # As of Linux kernel version 3.0.1, the clean target removes + # arch/powerpc/lib/crtsavres.o which is present in + # KBUILD_LDFLAGS_MODULE, making it required to build externalmodules.
classes/kernel.bbclass line 176
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ if [ ${ARCH} = "powerpc" ]; then + cp arch/powerpc/lib/crtsavres.o
$kerneldir/arch/powerpc/lib/crtsavres.oclasses/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ fi + + # Necessary for building modules like compat-wireless. + if [ -f include/generated/bounds.h ]; then + cp include/generated/bounds.h
$kerneldir/include/generated/bounds.hclasses/kernel.bbclass
Quoted 4 lines
classes/kernel.bbclass new file +4
-0+ fi + 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/
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ fi + + # Remove the following binaries which cause strip or arch QA errors + # during do_package for cross-compiled platforms + bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff\
classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+ arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \ + scripts/kconfig/conf.o scripts/kconfig/kxgettext.o" + for entry in $bin_files; do + rm -f $kerneldir/$entry + done + + # kernels <2.6.30 don't have $kerneldir/tools directory so we check if itexists before calling sed
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ if [ -f $kerneldir/tools/perf/Makefile ]; then + # Fix SLANG_INC for slang.h + sed -i 's#-I/usr/include/slang#-I=/usr/include/slang#g'$kerneldir/tools/perf/Makefile
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+ fi +} +do_install[prefuncs] += "package_get_auto_pr" + +sysroot_stage_all_append() { + sysroot_stage_dir ${D}${KERNEL_SRC_PATH}${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
Quoted 9 lines
classes/kernel.bbclass new file +9
-0+} + +kernel_do_configure() { + # fixes extra + in /lib/modules/2.6.37+ + # $ scripts/setlocalversion . => + + # $ make kernelversion => 2.6.37 + # $ make kernelrelease => 2.6.37+ + touch ${B}/.scmversion ${S}/.scmversion +classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ # Copy defconfig to .config if .config does not exist. This allows + # recipes to manage the .config themselves in do_configure_prepend(). + if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then + cp "${WORKDIR}/defconfig" "${B}/.config" + fi + yes '' | oe_runmake oldconfig + + if [ ! -z "${INITRAMFS_IMAGE}" ]; then + for img in cpio.gz cpio.lzo cpio.lzma cpio.xz; do + if [ -e "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" ]; then
classes/kernel.bbclass line 226
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ cp "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.$img" initramfs.$img
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ fi + done + fi +} + +do_configure[depends] += "${INITRAMFS_TASK}" + +do_savedefconfig() { + oe_runmake savedefconfig +}classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+do_savedefconfig[nostamp] = "1" +addtask savedefconfig after do_configure + +inherit cml1 + +EXPORT_FUNCTIONS do_compile do_install do_configure + +# kernel-base becomes kernel-${KERNEL_VERSION} +# kernel-image becomes kernel-image-${KERNEL_VERISON} +PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-devkernel-modules"
classes/kernel.bbclass line 248
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+FILES_${PN} = "" +FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order
/lib/modules/${KERNEL_VERSION}/modules.builtin"classes/kernel.bbclass line 250
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" +FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers*
/boot/config*${KERNEL_SRC_PATH}"classes/kernel.bbclass
Quoted 7 lines
classes/kernel.bbclass new file +7
-0+FILES_kernel-vmlinux = "/boot/vmlinux*" +FILES_kernel-modules = "" +RDEPENDS_kernel = "kernel-base" +# Allow machines to override this dependency if kernel image files are +# not wanted in images as standard +RDEPENDS_kernel-base ?= "kernel-image" +PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
classes/kernel.bbclass line 258
Quoted 1 line
classes/kernel.bbclass new file +1
-0+PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
classes/kernel.bbclass
Quoted 9 lines
classes/kernel.bbclass new file +9
-0+RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}" +ALLOW_EMPTY_kernel = "1" +ALLOW_EMPTY_kernel-base = "1" +ALLOW_EMPTY_kernel-image = "1" +ALLOW_EMPTY_kernel-modules = "1" +DESCRIPTION_kernel-modules = "Kernel modules meta package" + +pkg_postinst_kernel-image () { + update-alternatives --install/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
classes/kernel.bbclass
Quoted 12 lines
classes/kernel.bbclass new file +12
-0+ if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then + mkdir -p $D/lib/modules/${KERNEL_VERSION} + fi + if [ -n "$D" ]; then + depmodwrapper -a -b $D ${KERNEL_VERSION} + else + depmod -a ${KERNEL_VERSION} + fi +} + +pkg_postrm_kernel-image () { + update-alternatives --remove ${KERNEL_IMAGETYPE}${KERNEL_IMAGETYPE}-${KERNEL_VERSION} || true
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+} + +PACKAGESPLITFUNCS_prepend = "split_kernel_packages " + +python split_kernel_packages () { + do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.bin$',output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
classes/kernel.bbclass line 286
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.fw$',output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
classes/kernel.bbclass line 287
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.cis$',output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+} + +do_strip() { + if [ -n "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" ]; then + if [[ "${KERNEL_IMAGETYPE}" != "vmlinux" ]]; then + bbwarn "image type will not be stripped (notsupported): ${KERNEL_IMAGETYPE}"
classes/kernel.bbclass
Quoted 5 lines
classes/kernel.bbclass new file +5
-0+ return + fi + + cd ${B} + headers=`"$CROSS_COMPILE"readelf -S ${KERNEL_OUTPUT} |\
classes/kernel.bbclass
Quoted 13 lines
classes/kernel.bbclass new file +13
-0+ grep "^ \{1,\}\[[0-9 ]\{1,\}\] [^ ]" | \ + sed "s/^ \{1,\}\[[0-9 ]\{1,\}\] //" | \ + gawk '{print $1}'` + + for str in ${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}; do { + if [[ "$headers" != *"$str"* ]]; then + bbwarn "Section not found: $str"; + fi + + "$CROSS_COMPILE"strip -s -R $str ${KERNEL_OUTPUT} + }; done + + bbnote "KERNEL_IMAGE_STRIP_EXTRA_SECTIONS is set,stripping sections:" \
classes/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+ "${KERNEL_IMAGE_STRIP_EXTRA_SECTIONS}" + fi; +} +do_strip[dirs] = "${B}" + +addtask do_strip before do_sizecheck after do_kernel_link_vmlinux + +# Support checking the kernel size since some kernels need to reside inpartitions
Quoted 1 line
Quoted 1 line
classes/kernel.bbclass line 320
Quoted 1 line
classes/kernel.bbclass new file +1
-0+# with a fixed length or there is a limit in transferring the kernel tomemory
Quoted 7 lines
Quoted 7 lines
classes/kernel.bbclass
Quoted 6 lines
classes/kernel.bbclass new file +6
-0+do_sizecheck() { + if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then + cd ${B} + size=`ls -lL ${KERNEL_OUTPUT} | awk '{ print $5}'` + if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then + die "This kernel (size=$size >${KERNEL_IMAGE_MAXSIZE}) is too big for your device. Please reduce the
size
Quoted 10 lines
Quoted 10 lines
of the kernel by making more of it modular."
classes/kernel.bbclass
Quoted 8 lines
classes/kernel.bbclass new file +8
-0+ fi + fi +} +do_sizecheck[dirs] = "${B}" + +addtask sizecheck before do_install after do_strip + +KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
Quoted 3 lines
Quoted 3 lines
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+# Don't include the DATETIME variable in the sstate package signatures +KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
Quoted 4 lines
Quoted 4 lines
classes/kernel.bbclass line 338
Quoted 1 line
classes/kernel.bbclass new file +1
-0+MODULE_IMAGE_BASE_NAME ?= "modules-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
classes/kernel.bbclass line 340
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME" +MODULE_TARBALL_BASE_NAME ?="${MODULE_IMAGE_BASE_NAME}.tgz"
Quoted 54 lines
Quoted 54 lines
classes/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+# Don't include the DATETIME variable in the sstate package signatures +MODULE_TARBALL_SYMLINK_NAME ?= "modules-${MACHINE}.tgz" +MODULE_TARBALL_DEPLOY ?= "1" + +do_uboot_mkimage() { + if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then + if test "x${KEEPUIMAGE}" != "xyes" ; then + ENTRYPOINT=${UBOOT_ENTRYPOINT} + if test -n "${UBOOT_ENTRYSYMBOL}"; then + ENTRYPOINT=`${HOST_PREFIX}nm${S}/vmlinux | \
classes/kernel.bbclass line 351
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ awk'$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
classes/kernel.bbclass line 353
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ fi + if test -e arch/${ARCH}/boot/compressed/vmlinux ;then
classes/kernel.bbclass line 354
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ ${OBJCOPY} -O binary -R .note -R .comment -S
arch/${ARCH}/boot/compressed/vmlinuxlinux.binclasses/kernel.bbclass line 355
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin
arch/${ARCH}/boot/uImageclasses/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ rm -f linux.bin + else + ${OBJCOPY} -O binary -R .note -R .comment -Svmlinux linux.bin
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ rm -f linux.bin.gz + gzip -9 linux.bin + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz
arch/${ARCH}/boot/uImageclasses/kernel.bbclass
Quoted 10 lines
classes/kernel.bbclass new file +10
-0+ rm -f linux.bin.gz + fi + fi + fi +} + +addtask uboot_mkimage before do_install after do_compile + +kernel_do_deploy() { + install -m 0644 ${KERNEL_OUTPUT}${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
classes/kernel.bbclass line 372
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e'^CONFIG_MODULES=y$' .config); then
classes/kernel.bbclass line 374
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ mkdir -p ${D}/lib + tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C${D} lib
classes/kernel.bbclass line 375
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ ln -sf ${MODULE_TARBALL_BASE_NAME}${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
classes/kernel.bbclass
Quoted 3 lines
classes/kernel.bbclass new file +3
-0+ fi + + ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.bin
Quoted 5 lines
Quoted 5 lines
classes/kernel.bbclass line 379
Quoted 1 line
classes/kernel.bbclass new file +1
-0+ ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin${DEPLOYDIR}/${KERNEL_IMAGETYPE}
classes/kernel.bbclass line 381
Quoted 2 lines
classes/kernel.bbclass new file +2
-0+ + cp ${COREBASE}/meta/files/deploydir_readme.txt${DEPLOYDIR}/README_-
_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
classes/kernel.bbclass new file +8
-1+} +do_deploy[dirs] = "${DEPLOYDIR} ${B}" +do_deploy[prefuncs] += "package_get_auto_pr" + +addtask deploy before do_build after do_install + +EXPORT_FUNCTIONS do_deploy + --1.7.0.4
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti