| Summary: | linux-yocto: externsrc is broken | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Darren Hart <dvhart> | ||||
| Component: | kernel | Assignee: | Bruce Ashfield <bruce.ashfield> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Andra Necula <andrax.g.necula> | ||||
| Severity: | major | ||||||
| Priority: | High | CC: | alexandru.c.georgescu, andrax.g.necula, bruce.ashfield, fabien.chereau, richard.purdie, tom.zanussi | ||||
| Version: | 1.6 | ||||||
| Target Milestone: | 1.6 M5 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
|
Description
Darren Hart
2014-03-17 20:17:46 UTC
I tried a build here, creating an external checkout of linux yocto, adding a defconfig and then changing the recipe to add: inherit externalsrc EXTERNALSRC = "/media/build1/poky/linux-rp" EXTERNALSRC_BUILD = "/media/build1/poky/linux-rp" PV = "3.14" which then build fine. The report is odd since it says it fails in do_kernel_configme yet in linux-yocto.bbclass has: SRCTREECOVEREDTASKS += "do_kernel_link_vmlinux do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_patch" i.e. do_kernel_configme shouldn't get run, its marked as a covered task. Since there would likely be concern I didn't do exactly what the manual says, I also tried: INHERIT += "externalsrc" EXTERNALSRC_pn-linux-yocto = "/media/build1/poky/linux-rp" EXTERNALSRC_BUILD_pn-linux-yocto = "/media/build1/poky/linux-rp" PV_pn-linux-yocto = "3.14" in local.conf and this also works... We're unable to reproduce the failure as it was reported to us, and the steps in the manual result in a successful build. Closing as WORKSFORME. If you feel this is still an error and wish to reopen, please provide a specific failure reproduction scenario. Created attachment 1973 [details]
Fix kernel build issue in externalsrc and B != S
Hi Darren and Richard,
the main problem here come from the fact that when using external sources, we can also define a custom build directory (B != S)
In this case some build / install problems occurs.
I used a patch originally given by Bruce Ashfield and modified it a bit to allow my recipe to work (attached).
My custom recipe also defines the KBUILD_OUTPUT variable to tell the kernel where to put build outputs.
Here is an extract:
--------------
inherit externalsrc
EXTERNALSRC_pn-linux-externalsrc = "${S}"
EXTERNALSRC_BUILD_pn-linux-externalsrc = "${B}"
LINUX_VERSION ?= "3.10"
LINUX_VERSION_EXTENSION = "-edison-${LINUX_KERNEL_TYPE}"
S = "my/custom/linux-kernel"
B = "${WORKDIR}/${BP}"
# This is required for kernel to do the build out-of-tree.
# If this is not set, most of the kernel make targets won't work properly
# as they'll be executed in the sources
export KBUILD_OUTPUT="${B}"
# The previous line should not be necessary when those 2 are added
# but it doesn't work..
KBUILD_OUTPUT = "${B}"
OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT"
The patch applies on the last yocto-1.6 release (tag). Hi, I re-tested the issue on my Ubuntu 14.04, commit a44006262cf3b810ec78b4cccd8076102a7a0f3e On my system I couldn't reproduce the bug. Hi, I re-tested the issue on my Ubuntu 14.04, commit a44006262cf3b810ec78b4cccd8076102a7a0f3e On my system I couldn't reproduce the bug. |