summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* kernel.bbclass: Complete fix for modules symlinkdylanPaul Barker2015-05-291-1/+1
| | | | | | | | | | | | The fix backported in commit aa9fc551 of oe-core does not completely fix the issue (Yocto #4595) as intended. The modules symlink is still created in the working directory instead of in the deploy directory. To fix this, we just need to use an absolute path to ${DEPLOYDIR} when creating the symlink. (From OE-Core rev: f07a4e0d80f5e0dd94514f6aae11a7bd56034f30) Signed-off-by: Paul Barker <paul.barker@commagility.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Fix link for modules-${MACHINE}.tgzYi Zhao2015-01-121-1/+1
| | | | | | | | | | | | | | The modules-${MACHINE}.tgz should link to ${MODULE_TARBALL_BASE_NAME}. But now it links to an invalid file ${MODULE_TARBALL_BASE_NAME}.bin. Remove the extra .bin suffix. [YOCTO #4595] (From OE-Core rev: aa9fc551a8df9ead287c0ddc18bc60a7aded1d3c) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Correct post(inst|rm) package associationDarren Hart2013-10-101-16/+13
| | | | | | | | | | | | | | | | | | Fixes [YOCTO #4991] The kernel image is installed as part of the kernel-image package, but the symlink creation/removal via alternatives is being done in pkg_post(inst|rm)_kernel-base. Move the postinst alternatives logic into the kernel-image functions. (From OE-Core rev: 35f538b117e3387354d2dab1f22c3de28ab1322b) (From OE-Core rev: d5478e188561c2fee788ee326e3f7cdea7cf5a24) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: make FILES package-specificTom Zanussi2013-05-221-1/+1
| | | | | | | | | | | | | | Fix QA warnings seen when using 'traditional' kernel recipes e.g.: WARNING: QA Issue: .../recipes-kernel/linux/linux_3.0.18.bb: Variable FILES is set as not being package specific, please fix this. (From OE-Core master rev: 799c16ed317aed7638e264ee2f92e4b722f1b011) (From OE-Core rev: a5ccdfec3989176e6f82597c32e8acd2ea30e3a6) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Ensure we have correct version information in deploy dataRichard Purdie2013-04-151-2/+4
| | | | | | | | | | | | | Currently the names used for the kernel in deploy will contain "AUTOINC" instead of the final incremental numbering. This fixes the problem by ensuring data is obtained from the PR service and using the PKG* variables instead of PE/PV/PR directly. [YOCTO #4293] (From OE-Core rev: 1392f959cb8cd50b5a4492899e54f3ed68ef56d7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Optionally create lib dir during deployKhem Raj2013-04-121-0/+1
| | | | | | | | | | | | | | | | | | | when we have multilib and a 64bit machine and initramfs then image/lib directory will not be created and it will end up with errors like | DEBUG: Executing python function sstate_task_prefunc | DEBUG: Python function sstate_task_prefunc finished | DEBUG: Executing shell function do_deploy | tar: lib: Cannot stat: No such file or directory | tar: Exiting with failure status due to previous errors So in order to overcome this shortcoming lets mkdir -p the lib directory so the modules can be happily installed. (From OE-Core rev: 3f501204f375cc40a14597a25cb09faaba9ff802) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: do_strip: allow recipes to strip the kernelMichel Thebeau2013-04-111-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow recipes to specify sections to be stripped from the kernel output using KERNEL_IMAGE_STRIP_EXTRA_SECTIONS. For example: KERNEL_IMAGE_STRIP_EXTRA_SECTIONS = ".comment .unwanted" The kernel output is stripped in place. Since the toolchain does not give indication when the specified sections are absent, we read the sections first and make this report by issuing a warning to the developer. The toolchain by default strips the image with the -s option (even when -s is not specified): -s --strip-all Remove all symbol and relocation information For example, these sections are always removed: .debug_aranges .debug_info .debug_abbrev .debug_line .debug_frame .debug_str .debug_loc .debug_ranges .symtab .strtab In addition to these, the sections listed in KERNEL_IMAGE_STRIP_EXTRA_SECTIONS will also be removed. Only stripping of vmlinux (elf) is supported at this time. A warning will be given if the image type is not vmlinux. Stripping the image could also be done in the kernel, but that would only work for linux-yocto based kernels, so it's not the route we decided to go. [YOCTO 3515] (From OE-Core rev: 5f6d33b05b4e7883f2728ca812cb5386d1e36989) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: do_sizecheck: update path to build image and do not deleteMichel Thebeau2013-04-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | do_sizecheck has a few issues especially with vmlinux image type. It breaks because KERNEL_OUTPUT is a path relative to ${B}. When do_sizecheck runs it does not find the file (because the working directory is elsewhere) and does not fail. Also, the image file referenced by KERNEL_OUTPUT may be a link. Finally, when do_sizecheck deletes the oversized kernel image it leaves the previously run do_compile task with inaccurate status. So, do the following: - specify that the working directory should be ${B} - use ls -L to reference to the real file, and ensure that the link file is created - keep the oversized image file so the status of do_compile is valid [YOCTO #3514] (From OE-Core rev: f0b19ddce3c92c5d06976cf73d4c4c480e053dff) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel bbclass: return to original directory in do_deployChase Maupin2013-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * During the base kernel_do_deploy function the directory is changed to DEPLOYDIR in order to do some cleanup and symlinking. However, the directory is not changed back to the original starting directory ${S} at the end. For append functions this means that the starting directory is not ${S} as expected but instead ${DEPLOYDIR}. For functions like the do_deploy_append in recipes-kernel/linux/linux-dtb.inc there is an assumption that you are still in the source directory and not the DEPLOYDIR. Without this change the .dtb files are not copied because the check for the existence of ${DTS_FILE} which is a relative path from the ${S} directory fails. This means that the .dtb files are not copied into the deploy directory and subsequently the deploy/images directory. In the log.do_deploy file you will see lines like: Warning: arch/arm/boot/dts/xxxxx.dts is not available! (From OE-Core rev: fd5d80ab1a405cb4ef94f2cde25f8c251da490f0) Signed-off-by: Chase Maupin <Chase.Maupin@ti.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: extract functions for kernel modules to separate bbclassMartin Jansa2013-03-051-179/+1
| | | | | | | | | | | | | | | | * this way we can reuse the same functionality also for external modules including module_autoload_foo and module_conf_foo functionality * MODULE_PACKAGES variable was removed (splited modules are now returned by do_split_packages * KERNEL_MODULES_META_PACKAGE is used to append all splitted packages to RDEPENDS. In kernel.bbclass it's old "kernel-modules" in module.bbclass it defaults to ${PN} for upgrade path from single PN with all modules to PN depending on all new kernel-module-* (From OE-Core rev: 51928b6b5ca0a46a9dcd754483a19af58b95fa18) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add KERNEL_EXTRA_ARGS parameterWolfgang Denk2013-03-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | With recent kernel versions, some ARM configurations need may fail to build with errors like this: multiple load addresses: 0x80008000 0x80008000 This is incompatible with uImages Specify LOADADDR on the commandline to build an uImage We cannot pass this information in EXTRA_OEMAKE, as "meta/classes/kernel.bbclass" explicitly ignores all EXTRA_OEMAKE settings. So add KERNEL_EXTRA_ARGS parameter so affected boards can add for example KERNEL_EXTRA_ARGS = "LOADADDR=0x80008000" to their configuration. We make this general enough so other needed command line options can be passed as well when compiling the kernel. (From OE-Core rev: e3cdd0aafb9081cd7f1f98490087c1157a3d7403) Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* module.bbclass: Create a new depmodwrapper to assist cross-installsMark Hatle2013-03-011-4/+4
| | | | | | | | | | | | | | | | | Previously the build path to STAGING_KERNEL_DIR was being embedded into the package post install scripts. We avoid this behavior by generating a special depmodwrapper script. This script contains that hard-coded path, ensuring that re-use of the sstate-cache (and/or packages) will always run through the wrapper generated by the current build with a checksum that includes STAGING_KERNEL_DIR. [ YOCTO #3962 ] (From OE-Core rev: b18c61bae4d7161c087a004bba3c696006f7a2f6) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Add missing modules.order and modules.builtinsMark Hatle2013-03-011-2/+1
| | | | | | | | | | | | | | | | | | When running depmod, from kmod, warnings about missing modules.order and modules.builtins occur. Looking back it is not clear why these files were being ignored, other then nobody knew what to do with them. Add the files into the kernel-base package, if they exist, ensuring they will always get installed if at least one module is installed. [ YOCTO #3963 ] (From OE-Core rev: bff4bda1fe86ddd218a192a14605924205a5300b) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Add PACKAGESPLITFUNCS variableRichard Purdie2013-02-061-1/+3
| | | | | | | | | | | | | | Prepending to populate_packages is rather ugly and means its hard to trace errors and also profiling informaiton is summed together in one function. This patch starts to split out the prepends to become separate functions to avoid these issues. This is generally a neater way to write functions than prepending to where there can sometimes be variable scope issues and we've been bitten by whitespace issues in the past. (From OE-Core rev: 4f9963d1d82ee896fe9491d6a8b32be42cd06f14) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Improve populate_packages_prependRichard Purdie2013-02-061-27/+21
| | | | | | | | | | | | | Small performance tweaks for populate_packages_prepend: * Compile the regexps once at the start * Don't keep importing a module which is already imported * No need to check PKG is set, we'd have failed long before now if it wasn't * Don't export PATH, bitbake takes care of this at the task level (From OE-Core rev: e9d43d7b4d2cfb22b21f3814c2401a699c78b025) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: avoid copying unnecessary files during do_installMark Asselstine2013-02-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel_do_install() populates $kerneldir with files needed to build external modules. To accomplish this there are several copy commands to get source from the kernel source tree and build trees after which a 'clean' is performed. Since we are copying from the build tree we get about 1G of .o and .cmd files copied over only to have them removed when we clean. This adds additional IO overhead as well as overhead caused by pseudo. By avoiding copying these files in the first place we get multiple gains: * avoid initial copy * avoid file deletes during clean * reduce pseudo overhead Additionally we are making use of cpio vs cp which tends to be significantly faster at performing copies. With these changes I observe a 15-30% decrease in the time to complete the do_install() operation on the kernel. [YOCTO #3517] (From OE-Core rev: c753f9d59f4d0a5af4ea5deb6e2b9609e05314e2) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass, module-base.bbclass: Use CC to form KERNEL_CCKhem Raj2013-01-201-15/+1
| | | | | | | | | | | | | | | | | | | kernel compiler is not special and we currently have it so we want to pass -march and -mtune options as CFLAGS to kernel build so that compiler picks the right subarch flags when compiling assembly files in particular. Otherwise defaults are chosen which may not be right in many case e.g. when compiling kernel for collie machine we should use arch=armv4 but it uses toolchain/as defaults which is armv5te in some case e.g. thumb1 we know that kernel can not be compiled in thumb1 mode so we can provide that information e.g. -marm option through KERNEL_HOST_CC_ARCH variable as we do now (From OE-Core rev: c49f967384ccbfe131bbb33ee518014f3fc4b38f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: remove references to update-modulesLaurentiu Palcu2013-01-181-19/+17
| | | | | | | | | | | Since update-modules is now obsolete, remove it from the bbclass. [YOCTO #3598] (From OE-Core rev: 323146c7fdf1c47241f3fd5adab2cb3c6d24b56c) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: don't depend on DATETIMEMartin Jansa2013-01-171-1/+1
| | | | | | | | | | | * http://cgit.openembedded.org/openembedded-core/commit/?id=67e77cd948c69798695d5d5f34163ef89339b35a moved DATETIME dependency from MODULE_TARBALL_BASE_NAME to MODULE_IMAGE_BASE_NAME but without copying that vardepsexclude (From OE-Core rev: 9a93866067253746a889bfe444b6036cf85944b4) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Define MODULE_IMAGE_BASE_NAME for layer convenience.Robert P. J. Day2013-01-101-1/+2
| | | | | | | | | | | | | Define the additional variable MODULE_IMAGE_BASE_NAME since some layers (like meta-ti) would find it handy for multi-kernel definitions in that they wouldn't have to define their own variable representing exactly the same thing. (From OE-Core rev: 67e77cd948c69798695d5d5f34163ef89339b35a) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: kernel_do_install fails with kernel <2.6.30Marco Cavallini2013-01-101-2/+5
| | | | | | | | | | | | | * kernels <2.6.30 don't have $kerneldir/tools directory * so we got this error: * sed: can't read ...SNIP...linux/2.6.30-r0/image/usr/src/kernel/tools/perf/Makefile: No such file or directory * ERROR: Function failed: do_install (From OE-Core rev: 4dd39a23dfe069ad34a925e00407b4dde978cb01) Signed-off-by: Marco Cavallini <m.cavallini@koansoftware.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: include PE in KERNEL_IMAGE_BASE_NAMEMartin Jansa2013-01-071-1/+1
| | | | | | | | | | | | | * without this you it's harder to see which kernel is newer version e.g. after branch change LOCALCOUNT in SRCPV is reset to 0, so it needs PE bump for upgrade path but then it's clear why gitr1+HASH has newer DATETIME then gitrN+HASH, so include PE in name * it will sort alphabetically wrong in deploy dir for a while until old images are removed (From OE-Core rev: 3b5fe6d2cd58b5db70c3d319ffc66b1cbff1f43a) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Allow modules*.tar.gz generation to be inhibitedPhil Blundell2012-12-191-1/+2
| | | | | | | | | | | | | | | | The modules.tar.gz archive is sometimes of no value and it can take a noticeable time to build if many modules were enabled in the kernel configuration. The extraneous file also contributes to deploy/ clutter and is a waste of disk space. Allow it to be suppressed by setting MODULE_TARBALL_DEPLOY="0". (From OE-Core rev: 262bfde1c5c51cc902b50bf0dda543434f12010c) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: use the same versioning schema for modules.tgz and provide ↵Martin Jansa2012-12-191-1/+6
| | | | | | | | | | | | | | link to latest * so it will work look KERNEL_IMAGE * also we were recreating modules.tgz with every kernel build, but overwritting the same output file (From OE-Core rev: 73f242a61f913a0b0cd88265cd9ff6bcf3924623) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Do not chdir to /boot before running update-alternativesHolger Hans Peter Freyther2012-10-221-2/+2
| | | | | | | | | | | The symlink from uImage-3... to uImage is not created at image creation time and not properly update on kernel upgrades. This is fixed by removing the chdir. The other users of update-alternative do not change the directory before calling it. (From OE-Core rev: c77ca9ee901468c93570b5264b226f7d17a41c16) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: add kernel-modules to PACKAGESMartin Jansa2012-10-191-6/+4
| | | | | | | | | | | | | | | | * kernel-modules is always added to PACKAGES later in python code and needed to be defined as PACKAGES_DYNAMIC * add it to PACKAGES directly and set ALLOW_EMPTY_kernel-modules FILES_kernel-modules DESCRIPTION_kernel-modules outside populate_packages_prepend like for other packages and set only RDEPENDS_kernel-modules from python code (From OE-Core rev: 0884bdbbf39f2b3a8a342918812f29ddcd3b1e6f) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* PACKAGES_DYNAMIC: use regexp not globMartin Jansa2012-10-191-3/+3
| | | | | | | | | | | * bitbake uses PACKAGES_DYNAMIC as regexp ^ could make matching faster (and it will be more clear that we're expecting regexp not glob) * made all those last '-' optional, use .* (or nothing) (From OE-Core rev: 2f3ebdfa5f42dae51063b043cc4b0fbe20b40064) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: remove explicit version.h targetBruce Ashfield2012-10-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compilation routine for the kernel has an explicit call to build version.h, which works fine for most kernels, but the location of it has recently changes. commit d183e6f5 [UAPI: Move linux/version.h] commit 10b63956 [UAPI: Plumb the UAPI Kbuilds into the user header installation and checking] moves the file to include/generated/linux/version.h and then to include/generated/uapi/linux/version.h. As a result kernel builds of 3.7 or bisection builds of intermediate kernel commits will fail with: make[2]: *** No rule to make target `include/linux/version.h'. Stop. Making the explicit version.h build conditional on the version, or via a file test would fix the problem, but it introduces some complexity to the build. Even without an explicit call to build version.h, it is always produced by the kernel build, so it can simply be removed. This extra make line was originally so that the kernel version could be determined, so that then different instructions could be executed depending on whether it was a 2.4 or 2.6 kernel. Since we no longer support 2.4, this code is no longer needed. [YOCTO: #3293] (From OE-Core rev: 4cb20fa89e571ffbc448c579a758db0b9074acf4) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass, module.bbclass: Make update-modules optionalPhil Blundell2012-10-181-8/+16
| | | | | | | | | | | | | | | | | | The update-modules mechanism is something of a historical relic and it isn't entirely clear that it has a great deal of value nowadays. Also, it causes a problem when building a read-only rootfs since update-modules itself refuses to configure offline. Allow DISTROs to circumvent this whole thing by declaring (via DISTRO_FEATURES) that they don't wish to use update-modules. This is backfilled for existing distributions and will have to be marked as CONSIDERED by those who actually don't want it. (From OE-Core rev: 14bf8ed115453077b4d4042b4b70ed6b3bca2a9f) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update to use corrected bb.utils.explode_dep_versions2 APIRichard Purdie2012-10-021-7/+5
| | | | | | | | | | | | | | | | | The bb.utils.explode_dep_versions function has issues where dependency information can be lost. The API doesn't support maintaining the correct information so this changes to use a new function which correctly handles the data. This patch also fixes various points in the code to ensure that we do not have any duplicates in things that use explode_dep_versions. A new sanity test to test the contents of the R* variables is also added. [Some changes from Mark Hatle <mark.hatle@windriver.com>] (From OE-Core rev: 16a892431d0c0d03f8b561b92909cf2f11af4918) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: fix INC directory for SLANGLiang Li2012-08-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the kernel's tools/perf/Makefile CFLAGS was previously hard coded to contain "-I/usr/include/slang" to work with hosts that have "/usr/include/slang/slang.h" as well as hosts that have "/usr/include/slang.h". This path can cause compile warnings like: cc1: warning: '/usr/include/slang' doesn't exists. or cc1: warning: include location "/usr/include/slang" is unsafe for cross-compilation [-Wpoison-system-directories] Then in some cases warnings become errors if WERROR is enabled hence build errors. In coordination with a kernel fix, we can fix this error for all kernels by modifying the perf Makefile within the staged kernel source. (From OE-Core rev: 4e0daf05ed04e9fb4343032c6290a379f53b89f3) Signed-off-by: Liang Li <liang.li@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Preserve generated headers only if they existMartin Jansa2012-08-201-2/+4
| | | | | | | | | | * I have 2.6.37 kernel without this directory and do_install now fails after 813256bf7bb6e26d542d5f769e2802564116ebe5 (From OE-Core rev: 9a83afe0794e96590aee374555efea91b3085b91) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Preserve generated headersKhem Raj2012-08-191-0/+2
| | | | | | | | | | | | | | | | | | | asm/unistd.h includes asm/unistd_64.h on x86_64 and asm/unistd_32.h on i386 but these files are generated files in 3.4 and when we do 'make clean' they get deleted and it shows up as an error when building external modules. May be its a 3.4 kernel bug may be not but make clean should have left the tree in a shape to build modules but it does not. Probably we should run make modules_prepare after having run make clean. (From OE-Core rev: 813256bf7bb6e26d542d5f769e2802564116ebe5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: remove default module_autoload and module_conf valuesBruce Ashfield2012-08-151-19/+0
| | | | | | | | | | | | | | | kernel.bbclass is a common class for many different kernel versions, and as such the default module_autoload and module_conf values that it contains are not relevant, or out of date for most builds. Individual kernel recipes or distros can better specify these values to meet their needs. (From OE-Core rev: a134efa7743edc3b7ca8abb651add6d2045c3b44) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Revert ${base_libdir} changeRichard Purdie2012-08-071-4/+4
| | | | | | | | | | The base_libdir change in 5b8a4798ea2ea7df66bb53c26448251ea7da3dd9 breaks the kernel build for 64 bit machines. Revert this part of the change. (From OE-Core rev: 351bdc59f8af915ae203af7799eedc0ce42785f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: use ${base_libdir} and ${sysconfdir} instead of /lib and /etcJavier Martinez Canillas2012-08-061-6/+6
| | | | | | | | | | It is considered good practice to use the build system provided variables instead of directly specify hardcoded paths. (From OE-Core rev: c859717f522098e7c68df578d59011f68122dc2c) Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Copy bounds.h only if it exists, needed for 2.6.x.Leon Woestenberg2012-07-311-1/+3
| | | | | | | | | | Linux 2.6.x kernels did not (all) have the bounds.h file, so copy only iff exists. (From OE-Core rev: 02ac0d1b65389e1779d5f95047f761d7a82ef7a4) Signed-off-by: Leon Woestenberg <leon@sidebranch.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel bbclass: Recreate uImage only when KEEPUIMAGE != "yes"Koen Kooi2012-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | The intent of the uImage code in this class includes the following 1) be able to specify custom load addresses without needing to patch the kernel 2) add better information to the uImage description field The current state is a NOP anyway, the kernel will always build a uImage when you tell it to 'make uImage'. weakly Set KEEPUIMAGE to 'yes' in default-distrovars.inc which preserve the current OE-Core behavior. Machines which are being ported from oe.dev and need to regenerate uImage can set this to be empty (From OE-Core rev: 72a7049526ee107005bd39c7bdd814ed71345829) Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: fix external module buildingDenis Carikli2012-07-261-0/+3
| | | | | | | | | | | | | | | | | Without that fix we have the following while compiling compat-wireless. include/linux/mmzone.h:18:30: fatal error: generated/bounds.h: No such file or directory Note that the compat-wireless recipe will be added in another commit. make -C $kerneldir _mrproper_scripts deleted this file along with other things so we resurrect it with this patch. (From OE-Core rev: 2d114fd0cdf7486f18e53f2bf41c4f559e4b4a8d) Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert tab indentation in python functions into four-spaceRichard Purdie2012-07-191-171/+171
| | | | | | (From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Dont package kxgettext.oKhem Raj2012-07-171-1/+1
| | | | | | | | | | | | | | kxgettext.o is generated when building ppc kernels so we end up with packaging errors like > ERROR: QA Issue: Architecture did not match (20 to 62) on > /work/virtex5-poky-linux/linux-xilinx-2.6.38-r00/packages-split/kernel-dev/usr/src/kernel/scripts/kconfig/kxgettext.o (From OE-Core rev: 77278bd23617834c7f90b3b24a9945ec081dbb38) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: add non-santized kernel providesBruce Ashfield2012-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the kernel version string uses characters or symbols that need to be santized for the package name, we can end up with a mismatch between module requirements and what the kernel provides. The kernel version is pulled from utsrelease.h, which contains the exact string that was passed to the kernel build, not one that is santized, this can result in: echo "CONFIG_LOCALVERSION="\"MYVER+snapshot_standard\" >> ${B}/.config <build> % rpm -qp kernel-module-uvesafb-3.4-r0.qemux86.rpm --requires update-modules kernel-3.4.3-MYVER+snapshot_standard % rpm -qp kernel-3.4.3-myver+snapshot-standard-3.4-r0.qemux86.rpm --provides kernel-3.4.3-myver+snapshot-standard = 3.4-r0 At rootfs assembly time, we'll have a dependency issue with the kernel providing the santizied string and the modules requiring the utsrelease.h string. To not break existing use cases, we can add a second provides to the kernel packaging with the unsantized version string, and allowing the kernel module packaging to be unchanged. RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}" % rpm -qp kernel-3.4.3-myver+snapshot-standard-3.4-r0.qemux86.rpm --provides kernel-3.4.3-MYVER+snapshot_standard kernel-3.4.3-myver+snapshot-standard = 3.4-r0 (From OE-Core rev: 7be043178f5b9d16d9a06696bc0b96689f202a8d) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Add kernel headers to kernel-dev packageDarren Hart2012-07-041-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [YOCTO #1614] Add the kernel headers to the kernel-dev package. This packages what was already built and kept in sysroots for building modules with bitbake. Making this available on the target requires removing some additional host binaries. Move the location to /usr/src/kernel Before use on the target, the user will need to: # cd /usr/src/kernel # make scripts This renders the kernel-misc recipe empty, so remove it. As we use /usr/src/kernel in several places (and I missed one in the previous version), add a KERNEL_SRC_DIR variable and use that throughout the class to avoid update errors in the future. Now that we package the kernel headers, drop the kernel_package_preprocess function which removed them from PKGD. All *-sdk image recipes include dev-pkgs, so the kernel-dev package will be installed by default on all such images. (From OE-Core rev: 6125ea40d4483965f793bd847b3ce14b668a5b1e) Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Bruce Ashfield <bruce.ashfield@windriver.com> CC: Tom Zanussi <tom.zanussi@intel.com> CC: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* recipes-kernel: make perf a standalone packageLiang Li2012-06-211-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | perf has been coupled to the kernel packages via kernel.bbclass. While maintaining the build of perf out of the kernel source tree is desired the package coupling has proved to be awkward in several situations such as: - when a kernel recipe doesn't want to build/provide perf - when licensing of dependencies would prohibit perf and hence the kernel from being built. To solve some of these problems, this recipe is the extraction of the linux-tools.inc provided perf compilation into a standalone perf recipe that builds out of the kernel source, but is otherwise independent. No new functionality is provided above what the linux-tools.inc variant provided, but the separate recipe provides baseline for adding new functionality. (From OE-Core rev: ab883d0c1a05bd99e97e5d71bc7bed05cb1ae8c8) Signed-off-by: Liang Li <liang.li@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: save $kerndir/tools and $kerndir/lib from pruningBruce Ashfield2012-06-211-1/+1
| | | | | | | | | | | | | | | | | | | The kernel source tree in the sysroot has all unecessary source code removed. The existing use case is to support module building out of the sysroot, but as more toolsa are moved into the kernel tree itself there are new use cases for the kernel sysroot source. To avoid putting dependencies on the kernel, and to be able to individually build and package these tools out of the source tree, we can save $kerndir/tools and $kernddir/lib from being removed. This enables tools like perf to be built our of the kernel source in the sysroot, without significantly increasing the amount of source in the sysroot. (From OE-Core rev: e6cadd9074b18798f2df7c3f89dc35a98c29b6e5) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: pass KERNEL_VERSION to depmod calls in postinstMartin Jansa2012-06-211-2/+2
| | | | | | | | | | | | * without this, kernel upgrades where KERNEL_VERSION is changed e.g. 3.4.2 -> 3.4.3 generate .dep for running 3.4.2 and after reboot user ends up without any module loaded to make it worse after reboot nothing is upgraded to trigger another kernel(-module) postinst to generate .dep for now running 3.4.3 (From OE-Core rev: 4bd5c17f55bc96ce6bbaccf6559aa4ea123ff4cb) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "meta: replace os.popen with subprocess.Popen"Richard Purdie2012-05-301-1/+1
| | | | | | | | | This reverts commit e83d8e58a6b107eea87df0ec233a1bc932b2c6e as the conversion is not correct. Its replacing readlines() calls which generate an array with what are effectively strings. There are split("\n") calls missing in many cases so this needs to be reverted until it gets fixed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: replace os.popen with subprocess.PopenRobert Yang2012-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Replace os.popen with subprocess.Popen since the older function would fail (more or less) silently if the executed program cannot be found There are both bb.process.run() and bb.process.Popen() which wraps the subprocess module, use it for simplifying the code. Note: We don't need the "2>/dev/null" or "2>&1" since bb.process.run() can handle it, it will raise exception when error occurs, we should handle the exception ourselves if we want to ignore the error. More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] (From OE-Core rev: e83d8e58a6b107eea87df0ec233a1bc932b2c6ea) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: replace os.system with subprocess.callRobert Yang2012-05-301-2/+2
| | | | | | | | | | | | | | | Replace os.system with subprocess.call since the older function would fail (more or less) silently if the executed program cannot be found More info: http://docs.python.org/library/subprocess.html#subprocess-replacements [YOCTO #2454] (From OE-Core rev: a07d03cc6f67c88feb9813ae7deb6e4a93552dfe) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: add deploy link to KERNEL_IMAGETYPEChristopher Larson2012-05-171-0/+1
| | | | | | | | | | It's common to provide a non-machine-suffixed link in DEPLOY_DIR_IMAGE, so let's be consistent and do so here as well. (From OE-Core rev: c1c8d2f3cffc540380c0a5fcdda48d64cbec333a) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>