summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/kernel-devsrc.bb
Commit message (Collapse)AuthorAgeFilesLines
* devsrc: update arm64 scripts/prepare for kernels 5.3+Bruce Ashfield2019-08-301-1/+3
| | | | | | | | | | We need to include a few more small files for on target module builds for 5.3+ kernels. (From OE-Core rev: 9b3134995cf054679d573f28f916a629332ce126) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: remove python2 dependencyBruce Ashfield2019-08-301-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Witht the approaching EOL of python2, the kernel packages need to be updated to depend on python3. The core kernel scripts are now python3 safe, making the RDEPENDS change relatively simple. but There are some scripts that are captured in the devsrc files that are not used, but reference /usr/bin/python. The python3 package does not provide /usr/bin/python so any package managers with automatic dependency detection will fail to assemble a rootfs due to the missing intepreter. We could drop the scripts from the source capture, but that risks dropping something that we need in certain operations and we'd miss when they are updated in tree to explicitly call python3 (since they won't be revisited often). Light testing shows that the scripts do run with python3, so rather than removing them, we change the interpreter once they are copied, and automatic dependency detection won't cause us rootfs assembly issues. (From OE-Core rev: 6745088b6c9e5c70df59d667347ede470df9a91d) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: tweak for v5.3+Bruce Ashfield2019-08-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | The 5.3 kernel has two changes that require tweaks to the minimal kernel-devsrc package. - 4ce97317f [x86/purgatory: Do not use __builtin_memcpy and __builtin_memset] This change removes the need for arch/x86/purgatory/string.c and instead reuses a copy in arch/x86/boot/compressed/, so we can't copy the file anymore. To support older kernels, we make the copy survive the non-existence of the file. - b1663d7e [docs: Kbuild/Makefile: allow check for missing docs at build time] This change adds the sourceing of Documentation/Kbuild to the top level Kbuild file. So we now leave the copy of Documention/'s Kbuild in the devsrc. (From OE-Core rev: 53e975c18a14ddb8ad7eab23c8e18e05517953cd) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: check for localversion files in the kernel source treeBeniamin Sandu2019-04-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The kernel-devsrc rework doesn't take into account localversion files in the kernel source tree. This might result in modules with an incomplete version magic when building out-of-tree using the SDK. Before: root@qemux86:~# insmod hello.ko [ 42.000212] hello: version magic '5.0.3-yocto-standard SMP preempt mod_unload PENTIUMM ' should be '5.0.3-my-custom-release-yocto-standard SMP preempt mod_unload PENTIUMM ' [ 42.008200] hello: version magic '5.0.3-yocto-standard SMP preempt mod_unload PENTIUMM ' should be '5.0.3-my-custom-release-yocto-standard SMP preempt mod_unload PENTIUMM ' insmod: can't insert 'hello.ko': invalid module format After: root@qemux86:~# insmod hello.ko [ 39.094288] hello: loading out-of-tree module taints kernel. [ 39.108044] Hello World! (From OE-Core rev: 68b9243729ac1982c9f1d30980cf979267bbc7c3) Signed-off-by: Beniamin Sandu <beniamin.sandu@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: fix /usr/src/kernel symlink to also work for SDKHenrik Nymann Jensen (HNJE)2019-04-021-1/+1
| | | | | | | | | | | | | | If kernel-devsrc is used in a SDK context, the symlink from usr/src/kernel points to an absolute path '/lib/modules/${KERNEL_VERSION}/build', which ends up pointing to the local machine's build directory. To address this issue change the symlink to be realtive to ${D}/lib/modules/${KERNEL_VERSION}/build. (From OE-Core rev: 95bc738e7f10d492f5db33fc581e9796e52a9d3f) Signed-off-by: Henrik Nymann Jensen <hnje@triax.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: make mips devsrc files backward compatbileBruce Ashfield2019-03-091-2/+2
| | | | | | | | | | | The additions done to devsrc to support the 5.0 kernel should have had a graceful failure mode, since the files/directories won't be present on older (or different) kernel versions. (From OE-Core rev: 3f0cada40a9f70704a3dc78daddb4a8cbd7dee80) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: add files required for on-target build with 5.xBruce Ashfield2019-03-071-0/+10
| | | | | | | | | | | | Both powerpc and mips require a few new files for the scripts and prepare targets to work with a 5.0 kernel. We add the required files to the architecture specific blocks, with appropriate backwards compatibility considerations. (From OE-Core rev: 124c6bf5a0a5cc20d2ebbf04dc7b577cb4f5153a) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: restore compatibility with kernel < v4.10S. Lockwood-Childs2019-02-061-1/+6
| | | | | | | | | | | | | | | | | | | The kernel commit that added the syscall table generation tools for ARM platform (ARM: convert to generated system call tables) wasn't merged until kernel release v4.10. Current assumption in kernel-devsrc recipe is that these syscall scripts exist, which breaks the build for external board layers that are still using 4.9.x kernels: cp: cannot stat ‘arch/arm/tools/syscall*’: No such file or directory so only try to install the scripts when they actually exist. (From OE-Core rev: 7b4d77d7f909c0ae27553fd9c480f069f12e468f) Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: fix usrmerge install pathAllen Wild2018-12-181-1/+1
| | | | | | | | | | | | | | Update /lib to $nonarch_base_libdir to fix package QA errors when usermerge is enabled in DISTRO_FEATURES. ERROR: kernel-devsrc-1.0-r0 do_package_qa: QA Issue: kernel-devsrc package is not obeying usrmerge distro feature. /lib should be relocated to /usr. [usrmerge] (From OE-Core rev: a62085b5047e7943bdcc9d4ce3480d100618eeb1) Signed-off-by: Allen Wild <allenwild93@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: add selinux include files needed by scripts/selinux buildVictor Kamensky via Openembedded-core2018-10-251-0/+3
| | | | | | | | | | | | | | | | | | If CONFIG_SECURITY_SELINUX=y is enabled in kernel configuration, then 'make scripts' command in /usr/src/kernel fails to build utilities under scripts/selinux that would be pulled in by this config: HOSTCC scripts/selinux/genheaders/genheaders scripts/selinux/genheaders/genheaders.c:19:10: fatal error: classmap.h: No such file or directory #include "classmap.h" To address this issue add security/selinux/include files into kernel-devsrc. (From OE-Core rev: 8dce789ae1a2c11521ebe895fd3bd636cff64261) Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: fix searching for non-existing manifest filesAndrej Valek2018-09-271-1/+1
| | | | | | | | | | | | | | | | | | | Even if the do_populate_sysroot have had set-up noexec flag, populate_sdk's tasks were trying to find .populate_sysroot manifest file. Change noexec flag settings to delete appreciated task. WARNING: core-image-minimal-1.0-r0 do_sdk_depends: Manifest build/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-kernel-devsrc.populate_sysroot not found in qemuarm armv5te armv5e armv5t armv5 armv4t armv4 arm allarch x86_64_x86_64-nativesdk (variant '')? WARNING: core-image-minimal-1.0-r0 do_populate_sdk_ext: Manifest build/tmp/sstate-control/manifest-x86_64_x86_64-nativesdk-kernel-devsrc.populate_sysroot not found in qemuarm armv5te armv5e armv5t armv5 armv4t armv4 arm allarch x86_64_x86_64-nativesdk (variant '')? (From OE-Core rev: fd74848c3c06901a77057ca03f7c01aff08ee34a) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: fix arm/arm64 target module buildBruce Ashfield2018-09-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | module.lds is required for arch/arm* to build modules out of tree, but isn't required for scripts/prepare, so it was missed in the initial devsrc rework: root@qemuarm64:/tmp# make -C /usr/src/kernel M=/tmp modules make: Entering directory '/lib/modules/4.18.3-yocto-standard/build' CC [M] /tmp/hellomod.o Building modules, stage 2. MODPOST 1 modules CC /tmp/hellomod.mod.o LD [M] /tmp/hellomod.ko make: Leaving directory '/lib/modules/4.18.3-yocto-standard/build' root@qemuarm64:/tmp# insmod hellomod.ko [ 675.743628] hellomod: loading out-of-tree module taints kernel. [ 675.794959] Hello world! (From OE-Core rev: a37979a19ee16dc1e01243175fce24683f6ced83) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: restructure for out of tree (and on target) module buildsBruce Ashfield2018-08-191-47/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required. This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package. This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel. The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel. The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel. Along with the changes to the copying of the infrascture, we also have the following changes: - a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make modules_prepare" - The kernel source is installed into /lib/modules/<version>/build and a symlink created from /usr/src/kernel to the new location. This aligns with the standard location for module support code - There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update. (From OE-Core rev: 007ef1f468110b2698a27ea9a6d43fed5a0a9fc2) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* make-mod-scripts/kernel-devsrc: Fix objtool issuesRichard Purdie2018-03-301-0/+7
| | | | | | | | | | | | | | | | | | | Kernels which use tools/objtool can now fail when building external modules due to objtool being missing, the generated files can also cause problems for kernel-devsrc. Ensure objtool is generated in make-mod-scripts by also calling "make prepare". For devsrc, delete the generated binaries since they'd be native binaries and unsuitable for the target. The oeqa kernel module tests also need to have the additional "make prepare" step added. (From OE-Core rev: 52fd2993784b4218f5df4f343e7da45d964df305) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: Remove .kernel-meta from packagesweeaun2017-07-271-1/+1
| | | | | | | | | | | | [YOCTO #11730] Include .kernel-meta directory in the prune list of the find to prevent .kernel-meta directory included into installable package. (From OE-Core rev: 3bcf227dc68f215b2d4d7b58aeea71d237ac719e) Signed-off-by: sweeaun <swee.aun.khor@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: remove symlink sourceRobert Yang2017-03-011-0/+7
| | | | | | | | | | | | | | | | Fixed: $ rpm -qplv tmp/deploy/rpm/qemuppc/kernel-devsrc-1.0-r0.qemuppc.rpm | grep kernel/source /usr/src/kernel/source -> /buildarea/lyang1/test_yocto/tmp/work/qemuppc-poky-linux/kernel-devsrc/1.0-r0/image/usr/src/kernel It is generated by kernel's "make clean _mrproper_scripts", the kernel-devsrc includeds full sources, this symlink is not needed, and the path is invalid on target, so remove it. (From OE-Core rev: 65804d1239e626bbe1a4b5772f2464db21163713) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Remove LIC_FILES_CHKSUM from recipes without SRC_URIOlaf Mandel2016-10-281-1/+0
| | | | | | | | | | | | | | | | LICENSE and LIC_FILES_CHKSUM apply to the sources specified by SRC_URI, not to the recipe itself. As such a license declaration for a source-less recipe makes little sense. The LICENSE declaration is mandatory, but LIC_FILES_CHKSUM can be removed in such cases. Remove the LIC_FILES_CHKSUM declarations from all recipes that do not need it. CC: Paul Eggleton <paul.eggleton@linux.intel.com> (From OE-Core rev: b18fa5f2f2f46afc6fdc58f4d29679dea9c36c43) Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: moves KERNEL_SRC_PATH to bitbake.confMing Liu2016-05-191-3/+0
| | | | | | | | | | "/usr/src/kernel" is being hard-coded in multiple recipes so far, move its definition to bitbake.conf. (From OE-Core rev: eb9f900527e02ca08a1de14b4ac773f513bb1ee4) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: depends on virtual/kernel:do_installRobert Yang2015-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The linux-yocto.inc may remove the meta dir: do_install_append(){ if [ -n "${KMETA}" ]; then rm -rf ${STAGING_KERNEL_DIR}/${KMETA} fi } Which may cause the error: [snip] find: `./meta/cfg/kernel-cache/bsp/altera-socfpga/0073-FogBugz-116676-Align-clk.c-with-kernel.org.patch': No such file or directory find: `./meta/cfg/kernel-cache/bsp/altera-socfpga/0047-FogBugz-90657-Fix-SD-MMC-driver-for-VT.patch': No such file or directory find: `./meta/cfg/kernel-cache/bsp/altera-socfpga/0006-spi-qspi-cadence-Add-spi-and-qspi-driver.patch': No such file or directory [snip] cpio: ./meta/scripts/kgit-config-cleaner: Cannot stat: No such file or directory cpio: ./meta/scripts/kgit-s2q: Cannot stat: No such file or directory cpio: ./meta/scripts/kgit-clean: Cannot stat: No such file or directory [snip] (From OE-Core rev: 0866086c6a9d9f518388f2962db784ab15d49330) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: fix file ownershipJonathan Liu2015-03-161-0/+2
| | | | | | | | | | | The file ownership needs to be explicitly set otherwise it inherits the user and group id of the build user. (From OE-Core rev: 9ce5b600cb1663f8c2a625c7f7c08ab3e61b58c8) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: Depend on virtual/kernel:do_compileDarren Hart2015-01-161-3/+4
| | | | | | | | | | | | | | | | | Since virtual/kernel do_compile modifies ${B}, we need to wait for do_compile to copy everything across in order to ensure a deterministic file set. Currently, we race against the build and can see .debug directories, and the do_compile dependency we will always see them. Add .debug to the find path pruning. (From OE-Core rev: 20dd877d36e85911b57bec079cf978a577fba866) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: move source and build output to work-sharedBruce Ashfield2015-01-161-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 3b3f7e785e279 [kernel: Rearrange for 1.8] began the process of moving the kernel source and build artefacts out of sstate control and into a shared location. This changed triggered some workflow issues, as well as bugs related to the kernel source containing build output, and hence being dirty and breaking kernel rebuilds. To solve these issues, and to make it clear that the kernel is not under sstate control, we move the source and build outputs to: work-shared/MACHINE/kernel-source work-shared/MACHINE/kernel-build-artifacts Where kernel-build-artifacts is the kernel build output and kernel-source is kept "pristine". The build-artifacts contain everything that is required to build external modules against the kernel source, and includes the defconfig, the kernel-abiversion, System.map files and output from "make scripts". External module builds should either pass O= on the command line, or set KBUILD_OUTPUT to point to the build-artifacts. module-base.bbclass takes care of setting KBUILD_OUTPUT, so most existing external module recipes are transparently adapted to the new source/build layout. recipes that depend on the kernel source must have a depedency on the do_shared_workdir task: do_configure[depends] += "virtual/kernel:do_shared_workdir" With this dependency added, the STAGING_KERNEL_DIR will be populated and available to the rest of the build. (From OE-Core rev: 6a1ff0e7eacef595738f2fed086986fd622ec32a) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: Ensure we have a dependency on the actual sourceRichard Purdie2014-12-211-0/+2
| | | | | | | | | | Tthe kernel populate_sysroot can come from sstate, we need the full source here. We therefore depend on the configure task which isn't covered by sstate to ensure we get the right set of files. (From OE-Core rev: c3598cf720e04ab27ab5d2817c09f2496b677560) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: Ensure we don't race against do_make_scripts from ↵Richard Purdie2014-12-211-0/+2
| | | | | | | | | | | | | | | module-base.bbclass do_install for kernel-devsrc can race against do_make_scripts from module-base.bbclass. Since there is a lock there to guard against concurrency already, we can just use it here to avoid a race. Ultimately, this can all likely be much more streamlined but this resolves the immediate build failures. (From OE-Core rev: 17fb28156737e803b36d7b3fd59d092fe152d126) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: Handle ppc crtsaves.o explictly for nowRichard Purdie2014-12-211-0/+8
| | | | | | | | | | | | Resolve kernel module build failures for qemuppc by including crtsaves.o. I'm not particularly happy to be doing this, it should perhaps be contained in the kernel-dev package. Until the overlap between kernel-devsrc and kernel-dev is resolved, this at least removed the regressions. (From OE-Core rev: 5fa888894384eff18df77d0a5aaa007eba1406c8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-devsrc: Inherit module-baseRichard Purdie2014-12-211-0/+3
| | | | | | | | | | As a "normal" recipe, mulitlib would try and extend it for multilibs. By inheriting module-base, we can avoid this since we now look more 'kernel' like. (From OE-Core rev: 59f08c9144e6f81906154cb306db6fee14dc42ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kerneldev: create kernel-devsrc packagingBruce Ashfield2014-12-211-0/+50
kernel-devsrc is responsible for creating and a packaging an environment appropriate for kernel development (on or off target). To create this support, we only need to copy/install the results of the virtual/kernel providers build in the staging dir ... with some minor manipulations to the source tree (.git removal and a clean up). This produces a source tree that is capable of rebuilding the kernel on the target. Installing the kernel-devsrc package on a target (along with a toolchain) is all that remains to be done. $ cd /usr/src/kernel $ make oldconfig $ make -j2 bzImage (From OE-Core rev: 6412dc1df434f774c434ec08bf9b3706edb756f2) Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>