move ukify to function

This commit is contained in:
Tobias Powalowski 2024-09-07 13:56:31 +02:00
parent 5f7a9014ee
commit 263d1e6b2e
3 changed files with 8 additions and 6 deletions

View file

@ -373,6 +373,12 @@ _create_cpio() {
echo "Build complete."
}
_run_ukify() {
/usr/lib/systemd/ukify build --linux="${_KERNEL}" \
${_INTEL_UCODE} ${_AMD_UCODE} --initrd="${initrd}" --cmdline="${_CMDLINE}" \
--os-release=@"${_OSREL}" --splash="${_SPLASH}" --output="${_UKI}" &>"${_NO_LOG}"
}
_reproducibility() {
# Reproducibility: set all timestamps to 0
fd . "${1}" -u --min-depth 1 -X touch -hcd "@0"

View file

@ -130,9 +130,7 @@ _create_iso() {
[[ "${initrd}" == "${_INITRD_LATEST}" ]] && _UKI="boot/${_NAME}-latest-${_ARCH}.efi"
[[ "${initrd}" == "${_INITRD_LOCAL}" ]] && _UKI="boot/${_NAME}-local-${_ARCH}.efi"
#shellcheck disable=SC2086
${_NSPAWN} "${_W_DIR}" /usr/lib/systemd/ukify build --linux="${_KERNEL}" \
${_INTEL_UCODE} ${_AMD_UCODE} --initrd="${initrd}" --cmdline="${_CMDLINE}" \
--os-release=@"${_OSREL}" --splash="${_SPLASH}" --output="${_UKI}" &>"${_NO_LOG}" || exit 1
${_NSPAWN} "${_W_DIR}" _run_ukify
done
# fix permission and timestamp
mv "${_W_DIR}"/boot ./

View file

@ -62,9 +62,7 @@ _systemd_ukify() {
[[ -n "/${_INTEL_UCODE}" ]] && _INTEL_UCODE="--initrd=/${_INTEL_UCODE}"
_AMD_UCODE="--initrd=/${_AMD_UCODE}"
#shellcheck disable=SC2086
/usr/lib/systemd/ukify build --linux="${_KERNEL}" \
${_INTEL_UCODE} ${_AMD_UCODE} --initrd="${_INITRD}" --cmdline="${_CMDLINE}" \
--os-release=@"${_OSREL}" --splash="${_SPLASH}" --output="${_UKI}" &>"${_NO_LOG}" || exit 1
_run_ukify || exit 1
}
_create_cksum() {