Subject: Re: installing the same file twice using bsd.*.mk
To: None <tech-misc@netbsd.org>
From: Klaus Heinz <klaus.heinz@onlinehome.de>
List: tech-misc
Date: 04/14/2002 16:41:54
[ Klaus Heinz asks about how to install $DESTDIR/boot.amiga with the mechanisms
  bsd.*.mk provides ]

Luke Mewburn wrote:

> Todd Vierling wrote:
>   | Most platforms do this copy as part of "installboot", by passing *two*
>   | arguments to installboot (first stage short bootblock and second stage
>   | boot
>   | program file), not during rolling up of the base sets.  (Part of the
>   | reason
>   | for this is so that doing a build with DESTDIR=/ won't hose bootability if
>   | there's bootblock problems unless "installboot" is explicitly run.)

Sounds reasonable to me, although I would avoid doing such a kind of
'live-upgrade' if possible.

> Actually, with /usr/sbin/installboot, the second stage bootstrap
> (/boot or /boot.${MACHINE}) is expected to be in-place beforehand.
> I.e, it doesn't have the ability (nor should it) to write files
> to a file system; only to frob bootblocks at the start of a file
> system or file system image.

I have not much experience with other ports (so far amiga, i386 and bebox)
Is this the current situation of /usr/sbin/installboot on most ports, or
does this refer to some future plan about a unified treatment of bootblocks ? 

>   | : Is there a way to install the same file twice in different locations?
>   | 
>   | Basically use ${INSTALL_FILE} directly.  <sigh>
> 
> What's the issue? We use ${INSTALL_FILE} in many other places.

That's why I said, I _could_ use that. I found it by looking at the .mk files
but I didn't have the feeling it was a part of the bsd.*.mk interface
intentionally. I also had to look up all the variables (for user, group, etc.)
and the syntax the use of INSTALL_FILE requires.

In contrast to that, FILES is mentioned in bsd.README, even the variables
FILES<VAR>_* for special treatment of specific files.

> I'm curious to as why the base set on the amiga provides /boot;
> I don't think any other port does that.  "Whatever" :-)

Ah, this is a question I did not think about. As far as I know Michael Hitch
has worked at the new boot blocks for NetBSD/Amiga and has probably added
it to the set list for base.tgz.

Where else should the second stage bootloader come from if not provided by
the base set or installed by installboot, as Todd proposed?

ciao
     Klaus