mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
reformat messages
This commit is contained in:
parent
e60829b471
commit
0278ea94f8
1 changed files with 18 additions and 14 deletions
|
@ -52,31 +52,35 @@ _config() {
|
|||
# https://sourceware.org/bugzilla/show_bug.cgi?id=29009
|
||||
# - only left option is extlinux support in u-boot loader
|
||||
_prepare_kernel_initramfs_files() {
|
||||
echo "Preparing kernel and initramfs..."
|
||||
#shellcheck disable=SC1090
|
||||
source "${_PRESET}"
|
||||
mkdir -p "${_ISODIR}"/EFI/{BOOT,TOOLS}
|
||||
mkdir -p "${_ISODIR}/boot"
|
||||
if [[ -f "./init-${_ARCH}.img" ]]; then
|
||||
echo "Using existing ./init-${_ARCH}.img initramfs..."
|
||||
cp ./init-${_ARCH}.img ${_ISODIR}/boot/
|
||||
else
|
||||
echo "Creating init-${_ARCH}.img initramfs..."
|
||||
archboot-cpio.sh -c "/etc/archboot/${_ARCH}-init.conf" -k "${ALL_kver}" -g "${_ISODIR}/boot/init-${_ARCH}.img" || exit 1
|
||||
# save init ramdisk for further images
|
||||
cp ${_ISODIR}/boot/init-${_ARCH}.img ./
|
||||
fi
|
||||
#shellcheck disable=SC2154
|
||||
archboot-cpio.sh -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs-${_ARCH}.img" || exit 1
|
||||
# delete cachedir on archboot environment
|
||||
[[ "$(cat /etc/hostname)" == "archboot" ]] && rm -rf /var/cache/pacman/pkg
|
||||
# needed to hash the kernel for secureboot enabled systems
|
||||
echo "Preparing kernel..."
|
||||
if [[ "${_ARCH}" == "x86_64" || "${_ARCH}" == "riscv64" ]]; then
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/boot/vmlinuz-${_ARCH}"
|
||||
fi
|
||||
if [[ "${_ARCH}" == "aarch64" ]]; then
|
||||
install -m644 "${ALL_kver}" "${_ISODIR}/boot/Image-${_ARCH}.gz"
|
||||
fi
|
||||
if [[ -f "./init-${_ARCH}.img" ]]; then
|
||||
echo "Using existing init-${_ARCH}.img..."
|
||||
cp ./init-${_ARCH}.img ${_ISODIR}/boot/
|
||||
else
|
||||
echo "Preparing init-${_ARCH}.img..."
|
||||
archboot-cpio.sh -c "/etc/archboot/${_ARCH}-init.conf" -k "${ALL_kver}" -g "${_ISODIR}/boot/init-${_ARCH}.img" || exit 1
|
||||
# save init ramdisk for further images
|
||||
cp ${_ISODIR}/boot/init-${_ARCH}.img ./
|
||||
fi
|
||||
echo "Preparing initramfs-${_ARCH}.img..."
|
||||
#shellcheck disable=SC2154
|
||||
archboot-cpio.sh -c "${MKINITCPIO_CONFIG}" -k "${ALL_kver}" -g "${_ISODIR}/boot/initramfs-${_ARCH}.img" || exit 1
|
||||
# delete cachedir on archboot environment
|
||||
if grep -qw 'archboot' /etc/hostname; then
|
||||
echo "Removing /var/cache/pacman/pkg..."
|
||||
rm -rf /var/cache/pacman/pkg
|
||||
fi
|
||||
}
|
||||
|
||||
_prepare_ucode() {
|
||||
|
|
Loading…
Reference in a new issue