initrd: Fix parallel buildAdd explicit target orders to oinit/Makefile, because such orders areset in <bsd.subdir.mk> but not in <bsd.prog.mk>.Since the make targets (e.g., depend, all, install,
initrd: Fix parallel buildAdd explicit target orders to oinit/Makefile, because such orders areset in <bsd.subdir.mk> but not in <bsd.prog.mk>.Since the make targets (e.g., depend, all, install, clean) are nowordered, 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 ...
initrd: Detach from the world and build on the flyWhy---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 flyWhy---Currently, the files for initrd image creation are built and installed at/usr/share/initrd by "buildworld" and "installworld", respectively, and thenmkinitrd(8) simply packs them to create the initrd.img.gz.For normal users, the shipped /usr/share/initrd and mkinitrd(8) don't makemuch sense, since they don't need to modify the initrd contents and createa modified initrd image.From a developer's perspective, the required steps (buildworld, installworldand 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 whendealing with a broken system, so install them under /rescue to be moreintuitive 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: swildnerThanks-to: dillon, swildner, ftigeot