From: Darren Hart <dvhart@linux.intel.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: kernel: building target-arch scripts/* to include in kernel-headers package
Date: Tue, 26 Jun 2012 09:15:26 -0700 [thread overview]
Message-ID: <4FE9E01E.3060802@linux.intel.com> (raw)
In-Reply-To: <CAMKF1spnZCKBQTkF6cqi0LxRa=rN_Fuyi9S5o4DVSfg+ka80rw@mail.gmail.com>
On 06/25/2012 10:53 PM, Khem Raj wrote:
> On Mon, Jun 25, 2012 at 10:19 PM, Khem Raj <raj.khem@gmail.com> wrote:
>> On Mon, Jun 25, 2012 at 4:33 PM, Darren Hart <dvhart@linux.intel.com> wrote:
>>> I'm working on a patch series to provide a kernel-headers package which
>>> allows for the compilation of Linux kernel modules on the target. I
>>> currently have something working, but it requires that I first build the
>>> scripts/* binaries on the target, prior to trying to build a module.
>>>
>>> # cd /usr/src/kernel-headers
>>> # make scripts
>>>
>>> Then I can build modules:
>>>
>>> # cd /home/root/hello-mod/files
>>> # export KERNEL_SRC=/usr/src/kernel-headers
>>> # make
>>>
>>> And test:
>>>
>>> # insmod hello.ko
>>> # rmmod hello.ko
>>> # dmesg | tail -n2
>>> Hello World!
>>> Goodbye Cruel World!
>>>
>>> I would like to package the target-arch scripts binaries with the
>>> kernel-headers package, but I'm not sure how to go about building both
>>> the native and the target binaries as part of the kernel building
>>> process. Does it make sense to build these as part of the do_install()
>>> task after I've moved the files from the linux recipe's workdir and
>>> removed the host-arch binaries from scripts?
>>>
>>
>> the hostprogs there are a bit hairy. you could set HOSTCC to point to
>> cross compiler and build scripts dir in some O=foo after copying
>> .config into it but the problem would be that build system expects the
>> hosttools in build tree at exact same location
>> e.g. fixdep would be needed even to build other hosttools e.g.
>> recordmcount etc. and thats where you have to patch kbuild such that
>> it could reference another fixdep tool which then will be built for
>> the host you are compiling kernel on.
>
>
> another option is to add a completely new makefile to build
> the necessary tools the way we want them and not use make scripts target at all
While tempting, it sounds like a fragile mechanism with the potential
for maintenance issues.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2012-06-26 16:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 23:33 kernel: building target-arch scripts/* to include in kernel-headers package Darren Hart
2012-06-26 5:19 ` Khem Raj
2012-06-26 5:53 ` Khem Raj
2012-06-26 16:15 ` Darren Hart [this message]
2012-06-26 15:58 ` Darren Hart
2012-06-26 16:27 ` Koen Kooi
2012-06-26 17:12 ` Darren Hart
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=4FE9E01E.3060802@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.