#!/bin/bash # SPDX-License-Identifier: Unlicense cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" source creator_exports.sh source creator_functions.sh mkdir -p build cd build echo_cyan "Installing build dependencies..." install_build_deps echo_cyan "Starting installation at $ROOT." create_dirs echo_cyan "Installing binaries and libs..." install_binary $(which switch_root) install_binary $(which bash) install_binary $(which mount) install_binary $(which openssl) && cp -r /etc/ssl "${ROOT}/etc/" install_binary $(which cryptsetup) install_binary $(which blkid) install_binary $(which fdisk) install_binary $(which sysctl) install_binary $(which mkfs.ext4) install_binary $(which ssh-keygen) install_binary $(which fsarchiver) install_kmod install_busybox install_dtrfs_api echo_cyan "Installing scripts..." install_init_script echo_cyan "Installing base modules required to boot" install_module virtio_net install_module ext4 install_module virtio_blk install_module sev-guest install_module dm_crypt install_module dm-integrity install_guest_mods [[ "$GRAB_LOCAL_MODS" == "YES" ]] && { scan_modules backup_active_modules } echo_cyan "Building module dependency tree..." cp /lib/modules/${KERNEL}/modules.{order,builtin,builtin.modinfo} "${ROOT}/lib/modules/${KERNEL}/" depmod -b "$ROOT" "$KERNEL" create_archive