Kernel is build out of tree in r64 and causing problem for kernel module ebuilds
Reported by
kr...@flintos.io,
Jan 12 2018
|
||
Issue descriptionChrome Version: 64.0.3282.85 Chrome OS Version: 10176.44.0 Chrome OS Platform: N/A Network info: N/A When building the r64 source, I noticed that chromeos-kernel-4_4 (and other version of kernel ebuilds too) was built with source code cloned to portage build root instead of directly from src/third_party/kernel. Like the log said: >>> Emerging (1 of 1) sys-kernel/chromeos-kernel-4_4-4.4.96-r1258::chromiumos for /build/amd64-flint/ * chromeos-kernel-4_4-R64-10176.22-1515410340.gcov.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * Running stacked hooks for pre_pkg_setup * sysroot_build_bin_dir ... [ ok ] * Determining the location of the kernel source code * Unable to find kernel sources at /build/amd64-flint/usr/src/linux * Please ensure that the KERNEL_DIR environment variable points at full Linux sources of the kernel you wish to compile against. * Unable to calculate Linux Kernel version for build, attempting to use running version * Running stacked hooks for post_pkg_setup * python_eclass_hack ... [ ok ] * Running stacked hooks for pre_src_unpack * python_multilib_setup ... [ ok ] >>> Unpacking source... Cloning into '/build/amd64-flint/tmp/portage/sys-kernel/chromeos-kernel-4_4-4.4.96-r1258/work/chromeos-kernel-4_4-4.4.96'... done. >>> Unpacking chromeos-kernel-4_4-R64-10176.22-1515410340.gcov.xz to /build/amd64-flint/tmp/portage/sys-kernel/chromeos-kernel-4_4-4.4.96-r1258/work >>> Source unpacked in /build/amd64-flint/tmp/portage/sys-kernel/chromeos-kernel-4_4-4.4.96-r1258/work * Running stacked hooks for post_src_unpack * asan_init ... [ ok ] >>> Preparing source in /build/amd64-flint/tmp/portage/sys-kernel/chromeos-kernel-4_4-4.4.96-r1258/work/chromeos-kernel-4_4-4.4.96 ... >>> Source prepared. Then I found out this is related to the change in eclass/cros-kernel2.eclass in r64. It now force setting CROS_WORKON_OUTOFTREE_BUILD=0 for non-9999 kernel ebuilds: # Since line 93: # Force in-tree builds if private patches may have to be applied. if [[ "${PV}" != "9999" ]] || use apply_patches; then CROS_WORKON_OUTOFTREE_BUILD=0 fi I'm not quite sure why the change was done in such way but I believe the CROS_WORKON_OUTOFTREE_BUILD should be set to 0 when PV==9999 not !=. And this caused problem for our out-of-tree kernel module ebuilds, because after the kernel ebuild was finished, the kernel sources were cleaned, the "source" symlink in the object dir is broken now, thus our ebuilds are not able to find the source. Steps To Reproduce: (1) emerge-$BOARD chromeos-kernel-4_4 (2) Check the output. (3) Expected Result: Kernel is built from src/third_party/v4.4 Actual Result: Kernel was cloned from server to portage build directory and built from there. How frequently does this problem reproduce? (Always, sometimes, hard to reproduce?) Always in r64. What is the impact to the user, and is there a workaround? If so, what is it? Caused out of tree kernel module ebuilds unable to build because the kernel source was cleaned after kernel build finished. Please provide any additional information below. Attach a screen shot or log if possible. For graphics-related bugs, please copy/paste the contents of the about:gpu page at the end of this report.
,
Aug 17
USE=kernel_sources is the only way out-of-tree modules are supported and we don't enable that by default |
||
►
Sign in to add a comment |
||
Comment 1 by vsu...@chromium.org
, Jan 16 2018