From: Phil Blundell <philb@gnu.org>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH 2/2] kernel.bbclass: pass AR, NM and OBJCOPY to make
Date: Mon, 16 May 2011 12:44:03 +0100 [thread overview]
Message-ID: <1305546243.2429.1.camel@phil-desktop> (raw)
In-Reply-To: <4DD10D32.30609@opendreambox.org>
I'm mildly curious as to what Montavista can have done that requires a
custom version of ar. But the patch looks fine to me anyway.
Acked-by: Phil Blundell <philb@gnu.org>
p.
On Mon, 2011-05-16 at 13:40 +0200, Andreas Oberritter wrote:
> Ping
>
> On 04/15/2011 02:03 AM, Andreas Oberritter wrote:
> > - Fixes build with certain vendor-supplied Montavista kernels.
> > - Pass the same set of variables to every invocation of make.
> > - Create KERNEL_*SUFFIX, TARGET_*_KERNEL_ARCH and HOST_*_KERNEL_ARCH
> > for the three variables, analogue to LD.
> >
> > Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> > ---
> > classes/kernel.bbclass | 28 ++++++++++++++++++++++++----
> > 1 files changed, 24 insertions(+), 4 deletions(-)
> >
> > diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
> > index bded15d..b97b725 100644
> > --- a/classes/kernel.bbclass
> > +++ b/classes/kernel.bbclass
> > @@ -41,19 +41,39 @@ KERNEL_PRIORITY = "${@bb.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}"
> >
> > KERNEL_RELEASE ?= "${KERNEL_VERSION}"
> >
> > +KERNEL_ARSUFFIX ?= ""
> > KERNEL_CCSUFFIX ?= ""
> > KERNEL_LDSUFFIX ?= ""
> > +KERNEL_NMSUFFIX ?= ""
> > +KERNEL_OBJCOPYSUFFIX ?= ""
> >
> > # Set TARGET_??_KERNEL_ARCH in the machine .conf to set architecture
> > # specific options necessary for building the kernel and modules.
> > #FIXME: should be this: TARGET_CC_KERNEL_ARCH ?= "${TARGET_CC_ARCH}"
> > +TARGET_AR_KERNEL_ARCH ?= ""
> > +HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
> > TARGET_CC_KERNEL_ARCH ?= ""
> > HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
> > TARGET_LD_KERNEL_ARCH ?= ""
> > HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
> > +TARGET_NM_KERNEL_ARCH ?= ""
> > +HOST_NM_KERNEL_ARCH ?= "${TARGET_NM_KERNEL_ARCH}"
> > +TARGET_OBJCOPY_KERNEL_ARCH ?= ""
> > +HOST_OBJCOPY_KERNEL_ARCH ?= "${TARGET_OBJCOPY_KERNEL_ARCH}"
> >
> > +KERNEL_AR = "${AR}${KERNEL_ARSUFFIX} ${HOST_AR_KERNEL_ARCH}"
> > KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}"
> > KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
> > +KERNEL_NM = "${NM}${KERNEL_NMSUFFIX} ${HOST_NM_KERNEL_ARCH}"
> > +KERNEL_OBJCOPY = "${OBJCOPY}${KERNEL_OBJCOPYSUFFIX} ${HOST_OBJCOPY_KERNEL_ARCH}"
> > +
> > +KERNEL_EXTRA_OEMAKE = " \
> > + AR='${KERNEL_AR}' \
> > + CC='${KERNEL_CC}' \
> > + LD='${KERNEL_LD}' \
> > + NM='${KERNEL_NM}' \
> > + OBJCOPY='${KERNEL_OBJCOPY}' \
> > +"
> >
> > # Where built kernel lies in the kernel tree
> > KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
> > @@ -82,17 +102,17 @@ EXTRA_OEMAKE = ""
> >
> > kernel_do_compile() {
> > unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
> > - oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> > + oe_runmake include/linux/version.h ${KERNEL_EXTRA_OEMAKE}
> > if [ "${KERNEL_MAJOR_VERSION}" != "2.6" ]; then
> > - oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> > + oe_runmake dep ${KERNEL_EXTRA_OEMAKE}
> > fi
> > - oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> > + oe_runmake ${KERNEL_IMAGETYPE} ${KERNEL_EXTRA_OEMAKE}
> > }
> >
> > do_compile_kernelmodules() {
> > unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
> > if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> > - oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}"
> > + oe_runmake modules ${KERNEL_EXTRA_OEMAKE}
> > else
> > oenote "no modules to compile"
> > fi
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
next prev parent reply other threads:[~2011-05-16 11:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 0:03 [PATCH 1/2] kernel.bbclass: pass KERNEL_VERSION through legitimize_package_name Andreas Oberritter
2011-04-15 0:03 ` [PATCH 2/2] kernel.bbclass: pass AR, NM and OBJCOPY to make Andreas Oberritter
2011-05-16 11:40 ` Andreas Oberritter
2011-05-16 11:44 ` Phil Blundell [this message]
2011-05-16 12:14 ` Andreas Oberritter
2011-05-16 11:40 ` [PATCH 1/2] kernel.bbclass: pass KERNEL_VERSION through legitimize_package_name Andreas Oberritter
2011-05-16 11:45 ` Phil Blundell
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=1305546243.2429.1.camel@phil-desktop \
--to=philb@gnu.org \
--cc=openembedded-devel@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.