Discussion:
git: build - refactor rescue and initrd handling
Matthew Dillon
2018-10-27 01:40:35 UTC
Permalink
commit 9b724c0dcb2b9548a82d28d97e34375f64668669
Author: Matthew Dillon <***@apollo.backplane.com>
Date: Fri Oct 26 18:33:57 2018 -0700

build - refactor rescue and initrd handling

* buildworld now builds the rescue directory tree and initrd
image in /usr/obj.

* installworld will install the rescue and initrd stuff if it
does not exist on the destination. If rescue or initrd stuff
is already installed, it is not overwritten.

* Add 'installrescue' and 'installinitrd' targets. These will
copy the rescue and initrd image built by buildworld.

* The normal 'rescue' and 'initrd' targets are unchanged and
should build (from scratch) and install the rescue and initrd
stuff.

* NOTE: crunchgen is currently hacked to add system paths when
WORLDBUILD is defined, in order to access native binaries
for 'uniq' and a few others, instead of building them in
cross-tools.

In particular, we have to use the native 'vnconfig' binary
as building one in crosstools might not be compatible with
the currently running system. buildworld now uses 'vn' to
create the initrd image.

Possibly needs some work.

Summary of changes:
Makefile | 19 +++++++--------
Makefile.inc1 | 67 ++++++++++++++++++++++++++++++++++++++++++-----------
initrd/Makefile | 9 +++----
initrd/Makefile.inc | 8 +++++++
initrd/mkinitrd.sh | 5 ++++
5 files changed, 80 insertions(+), 28 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9b724c0dcb2b9548a82d28d97e34375f64668669
--
DragonFly BSD source repository
Gennady Proskurin
2018-10-31 10:55:26 UTC
Permalink
This breaks buildworld for ordinary non-root user due to vnconfig
calls.
Post by Matthew Dillon
commit 9b724c0dcb2b9548a82d28d97e34375f64668669
Date: Fri Oct 26 18:33:57 2018 -0700
build - refactor rescue and initrd handling
* buildworld now builds the rescue directory tree and initrd
image in /usr/obj.
* installworld will install the rescue and initrd stuff if it
does not exist on the destination. If rescue or initrd stuff
is already installed, it is not overwritten.
* Add 'installrescue' and 'installinitrd' targets. These will
copy the rescue and initrd image built by buildworld.
* The normal 'rescue' and 'initrd' targets are unchanged and
should build (from scratch) and install the rescue and initrd
stuff.
* NOTE: crunchgen is currently hacked to add system paths when
WORLDBUILD is defined, in order to access native binaries
for 'uniq' and a few others, instead of building them in
cross-tools.
In particular, we have to use the native 'vnconfig' binary
as building one in crosstools might not be compatible with
the currently running system. buildworld now uses 'vn' to
create the initrd image.
Possibly needs some work.
Makefile | 19 +++++++--------
Makefile.inc1 | 67 ++++++++++++++++++++++++++++++++++++++++++-----------
initrd/Makefile | 9 +++----
initrd/Makefile.inc | 8 +++++++
initrd/mkinitrd.sh | 5 ++++
5 files changed, 80 insertions(+), 28 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9b724c0dcb2b9548a82d28d97e34375f64668669
--
DragonFly BSD source repository
Aaron LI
2018-10-31 12:01:33 UTC
Permalink
On Wed, 31 Oct 2018 13:55:26 +0300
Post by Gennady Proskurin
This breaks buildworld for ordinary non-root user due to vnconfig
calls.
Yes, someone has already mentioned this issue in IRC, and I have thought
a bit about it. I'll fix it in the following days. Basically, need to
adjust 'buildinitrd' to build the initrd stuffs, and postpone the
invocation of 'mkinitrd.sh' to 'installinitrd' to generate the initrd.img and
install it.


Cheers,
--
Aaron
Loading...