diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-10-21 21:05:30 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-21 12:37:53 +0000 |
commit | 86893e4ea5896199a6f02f8475f4f17aa1124c37 (patch) | |
tree | 8991c2825bdf69b41c8b30ff00db68663566209e /meta/recipes-kernel | |
parent | 1ff64a7e848dcdd540e1c60acec1d0ad80a642bb (diff) | |
download | poky-86893e4ea5896199a6f02f8475f4f17aa1124c37.tar.gz |
kernel: Rearrange for 1.8
In 1.8 we want to streamline the kernel build process. Basically we
currently have multiple copies of the kernel source floating around
and the copying/compression/decompression is painful.
Lets assume we have a kernel source per machine since in most cases
this is true (and we have a sysroot per machine anyway). Basically,
instead of extracting a source into WORKDIR, then copying to a sysroot,
we now set S to point straight at STAGING_DIR_KERNEL.
Anything using kernel source can then just point at it and use:
do_configure[depends] += "virtual/kernel:do_patch"
to depend on the kernel source being present. Note this is different
behaviour to DEPENDS += "virtual/kernel" which equates to
do_configure[depends] += "virtual/kernel:do_populate_sysroot".
Once we do this, we no longer need the copy operation in
do_populate_sysroot, in fact there is nothing to do there (yay).
The remaining part of the challenge is to kill off the horrible
do_install. This patch splits it off to a different class, the idea here
is to have a separate recipe which depends on the virtual/kernel:do_patch
and just installs and packages the source needed to build modules on
target into a specific package.
Right now this code is proof of concept. It builds kernels and kernel
modules. perf blows up in do_package with issues on finding the kernel
version which can probably be fixed by adding back the right bit of do_install,
and adding a dependency of do_package[depends] += "virtual/kernel:do_install"
to perf. The whole thing needs a good write up, the corner cases testing
and probably a good dose of cleanup to the remaining code.
(From OE-Core rev: 3b3f7e785e27990ba21bc7cd97289c826a9a95d1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 3771cdb3e9..d375e246ce 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -22,7 +22,7 @@ TUI_DEPENDS = "${@perf_feature_enabled('perf-tui', 'libnewt slang', '',d)}" | |||
22 | SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}" | 22 | SCRIPTING_DEPENDS = "${@perf_feature_enabled('perf-scripting', 'perl python', '',d)}" |
23 | LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}" | 23 | LIBUNWIND_DEPENDS = "${@perf_feature_enabled('perf-libunwind', 'libunwind', '',d)}" |
24 | 24 | ||
25 | DEPENDS = "virtual/kernel \ | 25 | DEPENDS = " \ |
26 | virtual/${MLPREFIX}libc \ | 26 | virtual/${MLPREFIX}libc \ |
27 | ${MLPREFIX}elfutils \ | 27 | ${MLPREFIX}elfutils \ |
28 | ${MLPREFIX}binutils \ | 28 | ${MLPREFIX}binutils \ |
@@ -32,6 +32,8 @@ DEPENDS = "virtual/kernel \ | |||
32 | bison flex \ | 32 | bison flex \ |
33 | " | 33 | " |
34 | 34 | ||
35 | do_configure[depends] += "virtual/kernel:do_patch" | ||
36 | |||
35 | PROVIDES = "virtual/perf" | 37 | PROVIDES = "virtual/perf" |
36 | 38 | ||
37 | inherit linux-kernel-base kernel-arch pythonnative | 39 | inherit linux-kernel-base kernel-arch pythonnative |
@@ -46,7 +48,7 @@ export HOST_SYS | |||
46 | #kernel 3.1+ supports WERROR to disable warnings as errors | 48 | #kernel 3.1+ supports WERROR to disable warnings as errors |
47 | export WERROR = "0" | 49 | export WERROR = "0" |
48 | 50 | ||
49 | do_populate_lic[depends] += "virtual/kernel:do_populate_sysroot" | 51 | do_populate_lic[depends] += "virtual/kernel:do_patch" |
50 | 52 | ||
51 | # needed for building the tools/perf Perl binding | 53 | # needed for building the tools/perf Perl binding |
52 | inherit perlnative cpan-base | 54 | inherit perlnative cpan-base |
@@ -56,9 +58,7 @@ export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)} | |||
56 | export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" | 58 | export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" |
57 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" | 59 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" |
58 | 60 | ||
59 | S = "${STAGING_KERNEL_DIR}" | 61 | inherit kernelsrc |
60 | # The source should be ready after the do_unpack | ||
61 | do_unpack[depends] += "virtual/kernel:do_populate_sysroot" | ||
62 | 62 | ||
63 | B = "${WORKDIR}/${BPN}-${PV}" | 63 | B = "${WORKDIR}/${BPN}-${PV}" |
64 | 64 | ||
@@ -157,7 +157,7 @@ do_configure_prepend () { | |||
157 | } | 157 | } |
158 | 158 | ||
159 | python do_package_prepend() { | 159 | python do_package_prepend() { |
160 | bb.data.setVar('PKGV', get_kernelversion('${S}').split("-")[0], d) | 160 | d.setVar('PKGV', d.getVar("KERNEL_VERSION", True).split("-")[0]) |
161 | } | 161 | } |
162 | 162 | ||
163 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 163 | PACKAGE_ARCH = "${MACHINE_ARCH}" |