public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* make O="<dir>" install; output not relocated; 2.6.16.11(kbuild)
@ 2006-04-28  6:34 Linda Walsh
  2006-04-28  7:58 ` Jan-Benedict Glaw
  0 siblings, 1 reply; 5+ messages in thread
From: Linda Walsh @ 2006-04-28  6:34 UTC (permalink / raw)
  To: Linux-Kernel

 From "make help", the "O=" param to make is said to
  'Locate all output files in "dir", including .config'

I first did:
    "make O=$PWD/root bzImage modules"   # (Note: PWD=/usr/src/ast-261611)

That worked w/no apparent problems.

I wanted the output of "make install modules_install" placed
in a working directory (for transfer to the target system).

Instead, it appears the "O=" parameter is _partially_ ignored.

It is used for the "input" to the "make install" and the
"make modules_install", but seems to be ignored for "output":

ishtar:/usr/src/ast-261611> make V=1 O=$PWD/root modules_install
  make -C /usr/src/ast-261611/root \
    KBUILD_SRC=/usr/src/ast-261611 \
    KBUILD_EXTMOD="" -f /usr/src/ast-261611/Makefile modules_install
  mkdir: cannot create directory `/lib/modules/2.6.16.11-astarte': 
Permission denied
  make[1]: *** [_modinst_] Error 1
  make: *** [modules_install] Error 2

ishtar:/usr/src/ast-261611> make V=1 O=$PWD/root install       
  make -C /usr/src/ast-261611/root \
    KBUILD_SRC=/usr/src/ast-261611 \
    KBUILD_EXTMOD="" -f /usr/src/ast-261611/Makefile install
    make -f /usr/src/ast-261611/scripts/Makefile.build 
obj=arch/i386/boot BOOTIMAGE=arch/i386/boot/bzImage install
      sh /usr/src/ast-261611/arch/i386/boot/install.sh 2.6.16.11-astarte 
arch/i386/boot/bzImage System.map "/boot"
      ln: cannot remove `/boot/vmlinuz': Permission denied
      rm: cannot remove `/boot/System.map': Permission denied
      cp: cannot create regular file `/boot/vmlinuz-2.6.16.11-astarte': 
Permission denied
      cp: cannot create regular file 
`/boot/System.map-2.6.16.11-astarte': Permission denied
      ln: cannot remove `/boot/vmlinuz': Permission denied
      You may need to create an initial ramdisk now.
----

    Is this a bug or a feature?  I.e. is the "make help" misleading in
saying "O=<dir>" can be used to specify the output directory of a
make run?  Or should this be working?

Thanks,
Linda'




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: make O="<dir>" install; output not relocated; 2.6.16.11(kbuild)
  2006-04-28  6:34 make O="<dir>" install; output not relocated; 2.6.16.11(kbuild) Linda Walsh
@ 2006-04-28  7:58 ` Jan-Benedict Glaw
  2006-04-28 17:00   ` Linda Walsh
  0 siblings, 1 reply; 5+ messages in thread
From: Jan-Benedict Glaw @ 2006-04-28  7:58 UTC (permalink / raw)
  To: Linda Walsh; +Cc: Linux-Kernel

[-- Attachment #1: Type: text/plain, Size: 1769 bytes --]

On Thu, 2006-04-27 23:34:37 -0700, Linda Walsh <lkml@tlinx.org> wrote:
> From "make help", the "O=" param to make is said to
>  'Locate all output files in "dir", including .config'
> 
> I first did:
>    "make O=$PWD/root bzImage modules"   # (Note: PWD=/usr/src/ast-261611)
[...]
> Instead, it appears the "O=" parameter is _partially_ ignored.

> ishtar:/usr/src/ast-261611> make V=1 O=$PWD/root modules_install

The  modules_install  target uses O= for its _input_ files (that is,
for the readily compiled modules) and outputs to
$(INSTALL_MOD_PATH)/lib/modules/$VERSION/ .  So you may want to set
$(INSTALL_MOD_PATH) in the same way as you've set V= or O= before.

If you're trying to prepare something to be copied over to a target
system, the tar-pkg, targz-pkg and tarbz2-pkg targets may be exactly
what you're searching for.

>    Is this a bug or a feature?  I.e. is the "make help" misleading in

Feature. Modules won't ever be searched inside some kernel source
directory, modprobe expects them to be in /lib/modules/.

> saying "O=<dir>" can be used to specify the output directory of a
> make run?  Or should this be working?

It's maybe a bit misleading, but `modules_install' isn't a compilation
run, it's an installation run. O= was ment to hold all
compiled/generated objects, but to have a working installation, you
need to break out of that (or have INSTALL_MOD_PATH set.)

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: make O="<dir>" install; output not relocated; 2.6.16.11(kbuild)
  2006-04-28  7:58 ` Jan-Benedict Glaw
@ 2006-04-28 17:00   ` Linda Walsh
  2006-04-29  7:08     ` Jan-Benedict Glaw
  0 siblings, 1 reply; 5+ messages in thread
From: Linda Walsh @ 2006-04-28 17:00 UTC (permalink / raw)
  To: Linux-Kernel

Jan-Benedict Glaw wrote:
> The  modules_install  target uses O= for its _input_ files (that is,
> for the readily compiled modules) and outputs to
> $(INSTALL_MOD_PATH)/lib/modules/$VERSION/ .  So you may want to set
> $(INSTALL_MOD_PATH) in the same way as you've set V= or O= before.
>
> If you're trying to prepare something to be copied over to a target
> system, the tar-pkg, targz-pkg and tarbz2-pkg targets may be exactly
> what you're searching for.
>   
Quite possibly. What about an installed kernel (apart from the
modules)?  Will the kernel image and map, etc, get installed into
the "INSTALL_MOD_PATH" as well?  It doesn't sound, intuitively,
to be so from the environment variable name.
> It's maybe a bit misleading, but `modules_install' isn't a compilation
> run, it's an installation run. O= was ment to hold all
> compiled/generated objects, but to have a working installation, you
> need to break out of that (or have INSTALL_MOD_PATH set.)
>   
---
    Fair enough, but I'm more interested in where to specify
the target location of the installed kernel and System.map as
I don't always have modules for a generated kernel, but usually
(near 100% :-)) have an installable kernel image.  For development,
I could see it being useful to mount the target system's root in
a local directory (like /mnt), then have the kernel build install
to a target root of "/mnt".

Tnx,
Linda




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: make O="<dir>" install; output not relocated; 2.6.16.11(kbuild)
  2006-04-28 17:00   ` Linda Walsh
@ 2006-04-29  7:08     ` Jan-Benedict Glaw
  2006-04-29 14:30       ` Alistair John Strachan
  0 siblings, 1 reply; 5+ messages in thread
From: Jan-Benedict Glaw @ 2006-04-29  7:08 UTC (permalink / raw)
  To: Linda Walsh; +Cc: Linux-Kernel

[-- Attachment #1: Type: text/plain, Size: 2401 bytes --]

On Fri, 2006-04-28 10:00:47 -0700, Linda Walsh <lkml@tlinx.org> wrote:
> Jan-Benedict Glaw wrote:
> > The  modules_install  target uses O= for its _input_ files (that is,
> > for the readily compiled modules) and outputs to
> > $(INSTALL_MOD_PATH)/lib/modules/$VERSION/ .  So you may want to set
> > $(INSTALL_MOD_PATH) in the same way as you've set V= or O= before.
> >
> > If you're trying to prepare something to be copied over to a target
> > system, the tar-pkg, targz-pkg and tarbz2-pkg targets may be exactly
> > what you're searching for.
> >  
> Quite possibly. What about an installed kernel (apart from the
> modules)?  Will the kernel image and map, etc, get installed into
> the "INSTALL_MOD_PATH" as well?  It doesn't sound, intuitively,

`make modules_install' will never ever end up installing the kernel
image or the System.map or any other architecture-specific boot
images. It'll install the modules, nothing more.

The packaging scripts OTOH will of course also take that stuff.

> to be so from the environment variable name.
> > It's maybe a bit misleading, but `modules_install' isn't a compilation
> > run, it's an installation run. O= was ment to hold all
> > compiled/generated objects, but to have a working installation, you
> > need to break out of that (or have INSTALL_MOD_PATH set.)
>
>    Fair enough, but I'm more interested in where to specify
> the target location of the installed kernel and System.map as
> I don't always have modules for a generated kernel, but usually
> (near 100% :-)) have an installable kernel image.  For development,
> I could see it being useful to mount the target system's root in
> a local directory (like /mnt), then have the kernel build install
> to a target root of "/mnt".

Installing the kernel image is quite architecture specific; most
architectures use $(INSTALL_PATH), so this could be something like
/path/to/target_system/boot .  Though they may also re-run lilo or
something like that, so it's possibly not what you actually want to
use.

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: make O="<dir>" install; output not relocated; 2.6.16.11(kbuild)
  2006-04-29  7:08     ` Jan-Benedict Glaw
@ 2006-04-29 14:30       ` Alistair John Strachan
  0 siblings, 0 replies; 5+ messages in thread
From: Alistair John Strachan @ 2006-04-29 14:30 UTC (permalink / raw)
  To: Jan-Benedict Glaw; +Cc: Linda Walsh, Linux-Kernel

On Saturday 29 April 2006 08:08, Jan-Benedict Glaw wrote:
[snip]
> >    Fair enough, but I'm more interested in where to specify
> > the target location of the installed kernel and System.map as
> > I don't always have modules for a generated kernel, but usually
> > (near 100% :-)) have an installable kernel image.  For development,
> > I could see it being useful to mount the target system's root in
> > a local directory (like /mnt), then have the kernel build install
> > to a target root of "/mnt".
>
> Installing the kernel image is quite architecture specific; most
> architectures use $(INSTALL_PATH), so this could be something like
> /path/to/target_system/boot .  Though they may also re-run lilo or
> something like that, so it's possibly not what you actually want to
> use.

I'm fairly sure modern 2.6 kernels do the following with "make install":

1)	Try to run ~/bin/installkernel script.
2)	Try to run /sbin/installkernel (distributions)
3)	Guess an install path and run LILO.

If you hack together an "installkernel" I'm sure you could get it to do what 
you want. It certainly works here (I have it generate a menu.lst update for 
grub and copy my images to /boot/vmlinuz-version 
and /boot/System.map-version, and run make modules_install).

-- 
Cheers,
Alistair.

Third year Computer Science undergraduate.
1F2 55 South Clerk Street, Edinburgh, UK.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-04-29 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-28  6:34 make O="<dir>" install; output not relocated; 2.6.16.11(kbuild) Linda Walsh
2006-04-28  7:58 ` Jan-Benedict Glaw
2006-04-28 17:00   ` Linda Walsh
2006-04-29  7:08     ` Jan-Benedict Glaw
2006-04-29 14:30       ` Alistair John Strachan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox