summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/kernel-devsrc.bb
AgeCommit message (Collapse)Author
2021-08-25kernel-devsrc: fix 5.14+ objtool compilationBruce Ashfield
In v5.14+, x86 requires not just elfutils, but the elf headers on the target to build objtool (required for 'scripts parepare'), so we tweak our RDEPENDS to ensure that the right headers are on the target. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 03ccc234386f753e1b0129ec557e67bcd04cc69e) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-08-25kernel-devsrc: 5.14+ updatesBruce Ashfield
commit 6218d0f6b8dec [x86/syscalls: Switch to generic syscalltbl.sh] means that x86 no longer has a syscall script to copy, which causes a build error. We already copy the generic syscall script (in scripts), so we just catch errors for the copies to support older and 5.14+ kernels in the same devsrc recipe. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 5debc9bc25110b836b76927c61b2455e5e235a84) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-13kernel-devsrc: fix scripts prepare for powerpcBruce Ashfield
5.13 introduces some new tweaks required to get on target scripts and prepare working for powerpc: - 'nm' is detected as 'nm --synthetic', so we adjust our replacement - more vdso is required on target, so we copy those files (like arm64 does) - grep is required during processing, so we add it to the redpends Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit c43baf3a0e41b41a64f450fd03810306c8ddd314) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-13kernel-devsrc: fix scripts/prepare for ARM64Bruce Ashfield
There are two new tools in 5.13+ required for on target recreation of the build environment. We conditionally add them to the devsrc recipe to support both 5.13 and older kernels. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit cb1b7e76f20dc7f11a667fa00958ab56e680c632) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-07-02kernel-devsrc: adjust NM and OBJTOOL variables for targetBruce Ashfield
v5.13 has started storting the values for NM and OBJTOOL in auto.conf.cmd Just as we've done for other tools, we need to adjust NM and OBJTOOL to the names of the on-target executables. With this adjustment, 'make scripts prepare' continues to work without user intervention on the target. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e749b81ece1f94f99ca26028a2f6f891aa14bda9) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2021-03-20kernel-devsrc: fix on-target scripts/prepare for v5.12+Bruce Ashfield
AR is now captured are part of the build environment. If we don't subtitute our on-target variant for the cross version, we'll end up getting a prompted configure when preparing to build modules. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30kernel-devsrc: fix 32bit ARM devsrc buildsBruce Ashfield
As a follow up to commit: 0fc66a0b64953 [kernel: provide module.lds for out of tree builds in v5.10+], we must not only copy module.lds from its new location, we have to not error when it isn't found in the old location. With this tweak, we have coverage on all supported arches for the new location of module.lds, and backwards compatibility through kernel versions. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24kernel-devsrc: improve reproducibility for arm64INC@Cisco)
.vdso-offsets.h.cmd contains command that was used to produce vdso-offsets.h. It breaks reproducibility because it has an absolute path in it. There is no any value to package such files so it can be dropped. Signed-off-by: Denys Zagorui <dzagorui@cisco.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-16kernel: provide module.lds for out of tree builds in v5.10+Bruce Ashfield
The upstream commit 596b0474d3d [kbuild: preprocess module linker script], adds a dependency on module.lds for external module building. Since module.lds is generated as part of 'modules_prepare', we must make it available with the other kernel artifacts in the kernel shared workdir, otherwise out of tree builds fail. This fixes errors like: | make[4]: *** No rule to make target 'scripts/module.lds', needed by 'build/tmp/work/qemuarm64-poky-linux/cryptodev-module/1.11-r0/git/cryptodev.ko'. Stop. | make[4]: *** Waiting for unfinished jobs.... We also ensure that kernel-devsrc has a copy to support on target module builds that are often prepared with 'make scripts prepare'. Those targets won't regenerate it, so the build fails. If 'make modules_prepare' is used, the file will be regenerated and overwrite our copy (as expected). Signed-off-by: Pan, Kris <kris.pan@intel.com> Signed-off-by: Lili Li <lili.li@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-11kernel-devsrc: account for HOSTCC and HOSTCXXBruce Ashfield
Since commit 740d87766cb87f75c477 [kernel.bbclass: Configuration for environment with HOSTCXX], both HOSTCC and HOSTCXX are pickedup by the kernel build system as triggers to reconfigure if changed. As with previous changes to devsrc, we replace the cross build variant, with what will be on target, so operations such as 'make scripts prepare' won't trigger a reconfiguration. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13kernel-devsrc: 5.8 + gcc10 require gcc-plugins + libmpc-devBruce Ashfield
In order to execute 'make scripts prepare' on target with the 5.8 kernel and gcc 10, we need to have the gcc-plugins and libmpc-dev on target. Although not strictly required for all kernel versions, they don't do any harm when included. We add them to the RDEPENDS of devsrc to avoid the errors: scripts/gcc-plugins/gcc-common.h:5:10: fatal error: bversion.h: No such file or directory | #include "bversion.h" and /usr/lib/gcc/arm-poky-linux-gnueabi/10.1.0/plugin/include/builtins.h:23:10: fatal error: mpc.h: No such file or directory Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13kernel-devsrc: fix on target modules prepare for ARMBruce Ashfield
The arm compiler and linker weren't matching the replacement regex's in devsrc. We make the expressions a bit more generic to catch the triplets for ARM. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-06kernel-devsrc: fix x86 (32bit) on target module buildBruce Ashfield
The previous devsrc v5.8 on target build fixup [532ae127c kernel-devsrc: fix on-target module build for v5.8+], missed on condition: the defconfig On 32bit x86 the arch can be queried differently on the host and target. We aren't building against the defconfig, so we remove it from auto.conf.cmd and we can again prepare to build modules on target. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-20kernel-devsrc: fix on-target module build for v5.8+Bruce Ashfield
The kernel build is now more sensitive to changing build inputs, like the compiler, linker, source tree location, versions, file timestamps, etc. When a difference is detected, the kernel build invokes a syncconfig to update/regenerate files as required. That process may prompt, and hence breaks automated tested and other workflows. By default, we don't want this to happen so we make sure that auto* timestamps are newer or equal to the .config timestap, we ensure that autoconf.h is in the filesystem and that we've substituted the cross tools used to build the kernel with the names that will be on the target. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-03kernel-devsrc: support 4.4+ ARM/ARM64 kernelsRuslan Bilovol
Linux Kernel 4.4 is an LTS kernel so people may still build it with OE. Thus make copying of some files optional: - arm64 module.lds file first appeared with kernel v4.6 commit fd045f6cd98e arm64: add support for module PLTs" - arm32 *.tbl files first appeared in kernel v4.10 in commit 96a8fae0fe09 "ARM: convert to generated system call tables" Signed-off-by: Ruslan Bilovol <rbilovol@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-22devsrc: fix objtool generation for v5.4+Bruce Ashfield
commit 6ec14aa7a58a1c2fb303692f8cb1ff82d9abd10a [objtool: Silence build output] was added to -stable in v5.4.19. This change was meant to ensure that build output was truly silent when required. But the trailing "cd -" in the tools script was ensuring that a success return code was always returned from the sync script. As such, some missing files for x86 were being masked. We add those files to ensure that objtool can be regenerated as required Signed-off-by: Bruce Ashfield <bruce.ashfield@xilinx.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-03kernel-devsrc: update to v5.4+Bruce Ashfield
To support on-target module building, we need to include syscall.tbl for ARM64 (just like we do for other architectures). We also copy .config with -a to ensure that we don't trigger extra processing and regen configs. Signed-off-by: Bruce Ashfield <bruce.ashfield@xilinx.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-28kernel-devsrc: fix error with old (<4.2) x86 kernelsPeter Bergin
When using kernel-devsrc for older kernels do_install fails with: | cp: failed to get attributes of 'arch/x86/entry': No such file or directory In the Linux kernel commit 1f57d5d85 "x86/asm/entry: Move the arch/x86/syscalls/ definitions to arch/x86/entry/syscalls/" moved some files copied in the kernel-devsrc recipe. Commit 1f57d5d85 was added in v4.2. To be able to use kernel-devsrc for kernels older than v4.2 this commit make use of find for the files that shall be copied. Signed-off-by: Peter Bergin <peter@berginkonsult.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-08-30devsrc: update arm64 scripts/prepare for kernels 5.3+Bruce Ashfield
We need to include a few more small files for on target module builds for 5.3+ kernels. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-30kernel-devsrc: remove python2 dependencyBruce Ashfield
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. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-14kernel-devsrc: tweak for v5.3+Bruce Ashfield
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. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11kernel-devsrc: check for localversion files in the kernel source treeBeniamin Sandu
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! Signed-off-by: Beniamin Sandu <beniamin.sandu@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-01kernel-devsrc: fix /usr/src/kernel symlink to also work for SDKHenrik Nymann Jensen (HNJE)
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. Signed-off-by: Henrik Nymann Jensen <hnje@triax.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-09kernel-devsrc: make mips devsrc files backward compatbileBruce Ashfield
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. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-07kernel-devsrc: add files required for on-target build with 5.xBruce Ashfield
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. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-06kernel-devsrc: restore compatibility with kernel < v4.10S. Lockwood-Childs
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. Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-18kernel-devsrc: fix usrmerge install pathAllen Wild
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] Signed-off-by: Allen Wild <allenwild93@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-25kernel-devsrc: add selinux include files needed by scripts/selinux buildVictor Kamensky via Openembedded-core
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. Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-27kernel-devsrc: fix searching for non-existing manifest filesAndrej Valek
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 '')? Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04kernel-devsrc: fix arm/arm64 target module buildBruce Ashfield
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! Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-19kernel-devsrc: restructure for out of tree (and on target) module buildsBruce Ashfield
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. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-03-30make-mod-scripts/kernel-devsrc: Fix objtool issuesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27kernel-devsrc: Remove .kernel-meta from packagesweeaun
[YOCTO #11730] Include .kernel-meta directory in the prune list of the find to prevent .kernel-meta directory included into installable package. Signed-off-by: sweeaun <swee.aun.khor@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01kernel-devsrc: remove symlink sourceRobert Yang
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. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-28Remove LIC_FILES_CHKSUM from recipes without SRC_URIOlaf Mandel
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> Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19kernel: moves KERNEL_SRC_PATH to bitbake.confMing Liu
"/usr/src/kernel" is being hard-coded in multiple recipes so far, move its definition to bitbake.conf. Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-28kernel-devsrc: depends on virtual/kernel:do_installRobert Yang
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16kernel-devsrc: fix file ownershipJonathan Liu
The file ownership needs to be explicitly set otherwise it inherits the user and group id of the build user. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-01-16kernel-devsrc: Depend on virtual/kernel:do_compileDarren Hart
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. 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>
2015-01-16kernel: move source and build output to work-sharedBruce Ashfield
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. 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>
2014-12-21kernel-devsrc: Ensure we have a dependency on the actual sourceRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21kernel-devsrc: Ensure we don't race against do_make_scripts from ↵Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21kernel-devsrc: Handle ppc crtsaves.o explictly for nowRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-20kernel-devsrc: Inherit module-baseRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-20kerneldev: create kernel-devsrc packagingBruce Ashfield
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 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>