* initrd binaries are specially tailored versions and don't necessarily
work in the same way as regular ones
* In fact, regular binaries from newer DragonFly systems are expected to
use dynamic libraries and won't work at all in the fully static environment
of the ramdisk
# Default configuration for mkinitrd(8)
#
-BIN_TOOLS="mkdir rm sh kill"
BOOT_DIR="/boot"
CONTENT_DIRS="/usr/share/initrd"
INITRD_DIRS="bin boot dev etc mnt proc sbin tmp var new_root"
INITRD_SIZE="15m"
-SBIN_TOOLS="mount mount_devfs mount_hammer mount_nfs mount_null mount_procfs \
- mount_tmpfs umount iscontrol cryptsetup lvm sysctl udevd tcplay"
TMP_DIR="/tmp"
.Bd -literal -offset indent
BUILD_DIR
INITRD_SIZE
-BIN_TOOLS
-SBIN_TOOLS
INITRD_DIRS
CONTENT_DIRS
.Ed
echo "Created directory structure"
}
-copy_tools()
-{
- for tool in ${BIN_TOOLS}; do
- objcopy -S /bin/${tool} ${BUILD_DIR}/bin/${tool}
- done
-
- for tool in ${SBIN_TOOLS}; do
- objcopy -S /sbin/${tool} ${BUILD_DIR}/sbin/${tool}
- done
-
- echo "Copied essential tools"
-}
-
copy_content()
{
for dir in ${CONTENT_DIRS}; do
create_vn
copy_content
make_hier
-copy_tools
print_info
destroy_vn
mv ${TMP_DIR}/initrd.img ${BOOT_DIR}/kernel/initrd.img