History log of /dflybsd-src/initrd/Makefile (Results 1 – 11 of 11)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, v6.2.1, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0
# 9560d18c 26-Nov-2018 Aaron LI <aly@aaronly.me>

initrd: Explicitly say the status when build completes

Before this change, the 'all' target that builds the rescue and initrd
will end with a '--- obj ---' line, which may cause an illusion that the

initrd: Explicitly say the status when build completes

Before this change, the 'all' target that builds the rescue and initrd
will end with a '--- obj ---' line, which may cause an illusion that the
build hasn't finished. Now, explicitly say that the build has finished.

Suggested-by: swildner

show more ...


# bc897c50 24-Nov-2018 Aaron LI <aly@aaronly.me>

initrd: Rework build and install stages

* Rewrite the Makefile to provide only the 'all' and 'install' targets.
Do not separate the handling of the rescue tools and initrd image.
Thus greatly si

initrd: Rework build and install stages

* Rewrite the Makefile to provide only the 'all' and 'install' targets.
Do not separate the handling of the rescue tools and initrd image.
Thus greatly simplify the whole logic.

The 'all' target will build the rescue tools and initrd contents, and
does not require root priviledge, while the 'install' target will
install the rescue tools to the system, create the initrd image and
install it.

* Update the top-level makefiles to call the new 'all' and 'install'.
The 'buildworld' target now doesn't require root priviledge, same as
before the refactoring in 9b724c0dcb2b9548a82d28d97e34375f64668669.

* Only provide the 'initrd' top-level target to keep it simple. This
target will install the rescue tools and initrd image built by the
'buildworld', overwriting the existing ones.

* Clean up the nrelease/Makefile a bit, since 'installworld' will also
install the rescue tools and initrd image in such a case.

* Update the mkinitrd.sh script a bit.

* Update the build(7) man page and clean up a bit.

Reviewed-by: swildner

show more ...


Revision tags: v5.5.0, v5.4.0rc1
# 9b724c0d 27-Oct-2018 Matthew Dillon <dillon@apollo.backplane.com>

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 no

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.

show more ...


# 4cdf70c7 04-Jul-2018 Aaron LI <aly@aaronly.me>

initrd: Refactor Makefile and introduce quick{rescue,initrd}

Refactor the Makefile by splitting the original targets into smaller
ones.

Introduce targets quick{rescue,initrd} which skip the clean s

initrd: Refactor Makefile and introduce quick{rescue,initrd}

Refactor the Makefile by splitting the original targets into smaller
ones.

Introduce targets quick{rescue,initrd} which skip the clean step.
Such similar behavior was achieved by passing '-DNO_CLEAN' to make.
(suggested-by: swildner)

show more ...


# 4e60e668 27-Jun-2018 Aaron LI <aly@aaronly.me>

initrd: Handle ${DESTDIR} when building rescue tools

When building rescue tools for a target system (e.g., create release
build), use tools (e.g., crunchide, crunchgen, cc), headers and libraries
fr

initrd: Handle ${DESTDIR} when building rescue tools

When building rescue tools for a target system (e.g., create release
build), use tools (e.g., crunchide, crunchgen, cc), headers and libraries
from the target root (${DESTDIR}).

NOTE:
GCC is more tolerant (e.g., doesn't warn about unused variables) to
system headers than user headers, so we have to use "-isystem <inc_dir>"
instead of "-I<dir>", but the former (option syntax) causes difficulty
for <bsd.dep.mk> to filter the options to call mkdep(1). Therefore, we
use "--sysroot=${DESTDIR}" and it's simpler than specifying headers paths
with "-I<dir>" and library paths with "-L<dir>".

Meanwhile, improve the commands logic in Makefile, and set LC_ALL=C.

show more ...


Revision tags: v5.2.2
# c91442e9 10-Jun-2018 Aaron LI <aly@aaronly.me>

initrd: Reorganize and crunch 70 more rescue tools

* Merge "rescue.sbin" into "rescue" to save space (avoid duplicated
libraries to be linked).

* Move "lvm" out of "rescue.libcrypto" since lvm(8)

initrd: Reorganize and crunch 70 more rescue tools

* Merge "rescue.sbin" into "rescue" to save space (avoid duplicated
libraries to be linked).

* Move "lvm" out of "rescue.libcrypto" since lvm(8) doesn't need libcrypto.

* Crunch 70 more tools (aliases not counted):

awk, basename, bc, bzip2, cap_mkdb, chflags, chown, cmp, cpio, cut,
date, dirname, dmsetup, dump, ed, env, expr, false, find, fstyp, gzip,
head, hexdump, hostname, id, join, kcollect, kdump, kenv, ktrace,
ldconfig, lsvfs, mount_devfs, nc, paste, patch, pax, pkill, printf,
pw, pwd_mkdb, rcorder, realpath, relpath, restore, rtsold, savecore,
sed, sort, stat, stty, tail, tar, tee, touch, tput, tr, traceroute,
traceroute6, true, truss, uname, uniq, varsym, vi, vipw, vnconfig, wc,
xz, yes

Highlights:
awk, bzip2, chown, cpio, find, gzip, nc, pw, sed, tar, vi, xz

Now the total number of crunched rescue tools more than 230 (including
aliases), but the total size remains almost the same :-)

* Improve the makefiles to be much cleaner.

show more ...


# 7279052e 02-Jul-2018 Aaron LI <aly@aaronly.me>

initrd: Fix parallel build

Add explicit target orders to oinit/Makefile, because such orders are
set in <bsd.subdir.mk> but not in <bsd.prog.mk>.

Since the make targets (e.g., depend, all, install,

initrd: Fix parallel build

Add explicit target orders to oinit/Makefile, because such orders are
set in <bsd.subdir.mk> but not in <bsd.prog.mk>.

Since the make targets (e.g., depend, all, install, clean) are now
ordered, so remove 'clean cleandepend' from the same command as
'depend all install'.

Also allow defining the 'NO_CLEAN" variable to not clean previous builds.

show more ...


# 8692d139 09-Jun-2018 Aaron LI <aly@aaronly.me>

initrd: Crunch lvm(8) with sbin.libcrypto

Do not build lvm(8) alone since it can be crunched together with
sbin.libcrypto which contains cryptsetup(8). This also saves about
400KB space.

Tidy up t

initrd: Crunch lvm(8) with sbin.libcrypto

Do not build lvm(8) alone since it can be crunched together with
sbin.libcrypto which contains cryptsetup(8). This also saves about
400KB space.

Tidy up the sbin.libcrypto Makefile in the meantime.

show more ...


# 57179abe 09-Jun-2018 Aaron LI <aly@aaronly.me>

initrd: Tell make to use makefiles from the source tree

Otherwise, make uses makefiles from the system installed ones at
/usr/share/mk, therefore, the updated bsd.prog.mk has no effect until
being i

initrd: Tell make to use makefiles from the source tree

Otherwise, make uses makefiles from the system installed ones at
/usr/share/mk, therefore, the updated bsd.prog.mk has no effect until
being installed to the system.

Note that the variables assigned by make (i.e., make ... var=value)
will override the shell enviroment variables (e.g., var=value shell
command). So make sure the make variable assignments (e.g., DESTDIR)
are put after the make.

Also fix mkinitrd.sh to remove the used temporary initrd image file.

show more ...


# a5df2615 15-Jun-2018 Matthew Dillon <dillon@apollo.backplane.com>

initrd - Add hammer2, fix obj dir

* Include the hammer2 binary in the initrd image.

* Properly make the obj hierarchy so make initrd does not
put temporary object files in /usr/src.


# e79a303f 02-Jun-2018 Aaron LI <aly@aaronly.me>

initrd: Detach from the world and build on the fly

Why
---
Currently, the files for initrd image creation are built and installed at
/usr/share/initrd by "buildworld" and "installworld", respectivel

initrd: Detach from the world and build on the fly

Why
---
Currently, the files for initrd image creation are built and installed at
/usr/share/initrd by "buildworld" and "installworld", respectively, and then
mkinitrd(8) simply packs them to create the initrd.img.gz.

For normal users, the shipped /usr/share/initrd and mkinitrd(8) don't make
much sense, since they don't need to modify the initrd contents and create
a modified initrd image.

From a developer's perspective, the required steps (buildworld, installworld
and mkinitrd) to create and test a new initrd image can be annoying.

How
---
Detach the build and installation of the initrd contents from the world.
Build the (rescue/initrd) tools on-the-fly when creating the initrd image.

As per ftigeot's suggestion, these statically linked tools can be useful when
dealing with a broken system, so install them under /rescue to be more
intuitive and easier to use (similar to FreeBSD and maybe other BSDs).

What
----
* Move "share/initrd" to be top-level, and detach it from world.

+ Update the patch in bsd.crunchgen.mk accordingly.
+ Add Makefile.inc to simplify subdir's makefiles.
+ Rewrite the Makefile with targets:
- rescue: build and install the rescue tools into /rescue.
- initrd: further packs the etc and rescue staffs to create the initrd
image.

* Move "sbin/mkinitrd/mkinitrd.sh" under the new "initrd" directory and adapt
it to work with the "initrd" make target. Remove the other parts of
mkinitrd(8).

* Export the above "rescue" and "initrd" targets to be top-level.

* Update nrelease framework to use the new "make initrd".

* Update build.7 man page accordingly.

* Print the message about updating the initrd image and 3rd-party packages
after "make upgrade" instead of "make installworld".

* Document this change in UPDATING.

* Other small updates and style cleanups.

TODO
----
* Add initrd.7 man page
* Crunch more useful tools
* Crunch bin/sbin/etc. into a bundle to save space (??)

Reviewed-by: swildner
Thanks-to: dillon, swildner, ftigeot

show more ...