Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ming Liu <liu.ming50@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: bruce.ashfield@windriver.com, darren@dvhart.com,
	Ming Liu <peter.x.liu@external.atlascopco.com>,
	yue.tao@windriver.com
Subject: [PATCH] kernel-devsrc: add 'make scripts' postinstall
Date: Sun, 22 Nov 2015 23:40:11 +0100	[thread overview]
Message-ID: <1448232011-30195-1-git-send-email-liu.ming50@gmail.com> (raw)

From: Ming Liu <peter.x.liu@external.atlascopco.com>

Run 'make scripts' inside qemu in order to create script binaries that
needed by external modules build on the target.

This 'make scripts' might fail in some cases, for instance, if toolchain or
make command is not installed on the target, but the postinstall should
always succeed, it will not break the package installation so the behaviour
is consistent.

[YOCTO #6630]

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 196c8c7..8b366c3 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425
 inherit linux-kernel-base
 
 # Whilst not a module, this ensures we don't get multilib extended (which would make no sense)
-inherit module-base
+inherit module-base qemu
 
 # We need the kernel to be staged (unpacked, patched and configured) before
 # we can grab the source and make the source package. We also need the bits from
@@ -71,6 +71,17 @@ do_install() {
 # Ensure we don't race against "make scripts" during cpio
 do_install[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
 
+pkg_postinst_${PN} () {
+	if [ -n "$D" ]; then
+		${@qemu_run_binary(d, '$D', '${bindir}/make')} \
+			-C $D${KERNEL_SRC_PATH} O=$D${KERNEL_SRC_PATH} scripts
+	else
+		make -C ${KERNEL_SRC_PATH} O=${KERNEL_SRC_PATH} scripts \
+			>/dev/null 2>&1 || true
+	fi
+}
+
 PACKAGES = "kernel-devsrc"
 FILES_${PN} = "${KERNEL_SRC_PATH}"
+DEPENDS = "qemu-native"
 RDEPENDS_${PN} = "bc"
-- 
1.9.1



             reply	other threads:[~2015-11-22 22:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-22 22:40 Ming Liu [this message]
2015-11-23 13:46 ` [PATCH] kernel-devsrc: add 'make scripts' postinstall Bruce Ashfield
2015-11-23 20:56   ` Ming Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448232011-30195-1-git-send-email-liu.ming50@gmail.com \
    --to=liu.ming50@gmail.com \
    --cc=bruce.ashfield@windriver.com \
    --cc=darren@dvhart.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peter.x.liu@external.atlascopco.com \
    --cc=yue.tao@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox