public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Mohan Kumar M <mohan@in.ibm.com>
Cc: linux-kbuild@vger.kernel.org
Subject: Re: Integrating relocatable kernel build with kernel build
Date: Wed, 9 Jul 2008 22:27:40 +0200	[thread overview]
Message-ID: <20080709202740.GA2655@uranus.ravnborg.org> (raw)
In-Reply-To: <4875040A.7020306@in.ibm.com>

Hi Mohan.

On Thu, Jul 10, 2008 at 12:01:38AM +0530, Mohan Kumar M wrote:
> Hi,
> 
> I am developing relocatable kernel for PPC64 and as part of it I need to 
> integrate the build process with the kernel build itself. As of now I am 
> using a separate makefile to build the relocatable kernel after building 
> the kernel.
> 
> I have updated the Makefile(s) in arch/powerpc and arch/powerpc/boot to 
> build the relocatable kernel image as part of kernel build.
> 
> With this approach I have two problems:
> 1. I need to explicitly specify the relocatable vmlinux target to build 
> it. ie
> 	make vmlinux.reloc

Add the relevant target to the all: rule in arch/powerpc/Makefile

# Default to zImage, override when needed
all: zImage

And include support for the target in same file.


> 2. During build process, build is not able to build the 
> vmlinux.reloc.lds linker script from the vmlinux.reloc.lds.S source file.

If you just add:
extra-y += vmlinux.reloc.lds 

then it should happen automatically.
ee how all archs does it in arch/$ARCH/kernel/Makefile for vmlinx.lds

> I am attaching the separate makefile to build the relocatable vmlinux, 
> makefile diffs diff.Makefile (diff between original 
> arch/powerpc/Makefile and arch/powerpc/Makefile for relocatable 
> support), diff.Makefile.boot (diff between original 
> arch/powerpc/boot/Makefile and arch/powerpc/boot/Makefile for 
> relocatable support)

I did not look at it this time - lacking time.
But tr to provide a single unified diff next time - that i
at least remotely readable.

> Another feature I am looking is to generate the "relocatable vmlinux" 
> image in the top directory of kernel source and the intermediate vmlinux 
> file either in arch/powerpc/kernel or arch/powerpc/boot.
We no longer build arch specific targets in the top-level directory
of the kernel src. We print out where to locate the build file.

See x86 as an example.

> I have not subscribed to the kbuild mailing list, so please include me 
> in to/cc while replying to this thread.
[We always do so here].

	Sam

  reply	other threads:[~2008-07-09 20:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 18:31 Integrating relocatable kernel build with kernel build Mohan Kumar M
2008-07-09 20:27 ` Sam Ravnborg [this message]
2008-07-10 14:10   ` Mohan Kumar M
2008-07-10 19:44     ` Sam Ravnborg

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=20080709202740.GA2655@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mohan@in.ibm.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