[PATCH 1/4] chipsec: make chipsec recipe depend on make_scripts

Ricardo Neri <[email protected]> Wed, 15 Mar 2017 12:42:00 -0700
Newsgroups dev.linux.lists.oe-chipsec
Message-ID <[email protected]>
--===============7565139705328558863==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

In order to out-of-tree build modules properly, it is necessary to invoke
make prepare && make scripts in the Linux source tree. Otherwise, the
module will not know all the appropriate kernel configurations. The task
make_scripts, inherited from module-base.bbclass, takes care of it.

CHIPSEC includes an out-of-tree module. Thus, make_scripts should run
before our do_compile task. Since in Yocto the Linux build artifacts are
put in a separate directory, controlled by the kernel's do_shared_workdir
task, such task must run before make_scripts.

Lastly, we hold a lock to the kernel-scripts task.

The issue of not running make_scripts before do_compile manifests itself
as:

ERROR: Kernel configuration is invalid.
      include/generated/autoconf.h or include/config/auto.conf are missing.
      Run 'make oldconfig && make prepare' on kernel src to fix it.

Cc: Megha Dey <[email protected]>
Signed-off-by: Ricardo Neri <[email protected]>
---
 meta-luv/recipes-core/chipsec/chipsec_git.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta-luv/recipes-core/chipsec/chipsec_git.bb b/meta-luv/recipe=
s-core/chipsec/chipsec_git.bb
index d6c1bef..6c29231 100644
--- a/meta-luv/recipes-core/chipsec/chipsec_git.bb
+++ b/meta-luv/recipes-core/chipsec/chipsec_git.bb
@@ -28,6 +28,10 @@ inherit python-dir
 inherit distutils
 inherit luv-test
 =

+addtask make_scripts after do_patch before do_compile
+do_make_scripts[lockfiles] =3D "${TMPDIR}/kernel-scripts.lock"
+do_make_scripts[depends] +=3D "virtual/kernel:do_shared_workdir"
+
 S =3D "${WORKDIR}/git"
 =

 export INC =3D "-I${STAGING_INCDIR}/${PYTHON_DIR}"
-- =

2.9.3


--===============7565139705328558863==--