summaryrefslogtreecommitdiff
path: root/sys-kernel/dracut
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-20 07:07:08 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-20 07:07:08 +0100
commitaaa44376d7162304219748a3b6771d9a26fc80fe (patch)
tree62d3e3eea5cc8134a92a731a756d15bfd8fe0177 /sys-kernel/dracut
parent6f97f3b697516aeae25033ec37234739fff23fbc (diff)
gentoo auto-resync : 20:07:2023 - 07:07:07
Diffstat (limited to 'sys-kernel/dracut')
-rw-r--r--sys-kernel/dracut/Manifest3
-rw-r--r--sys-kernel/dracut/dracut-059-r3.ebuild184
-rw-r--r--sys-kernel/dracut/files/059-gawk.patch35
-rw-r--r--sys-kernel/dracut/files/059-uki-systemd-254.patch134
4 files changed, 356 insertions, 0 deletions
diff --git a/sys-kernel/dracut/Manifest b/sys-kernel/dracut/Manifest
index f571f0316ddd..72ff9c5537a8 100644
--- a/sys-kernel/dracut/Manifest
+++ b/sys-kernel/dracut/Manifest
@@ -1,11 +1,14 @@
AUX 057-i18n-keymaps.patch 1364 BLAKE2B 6805d459d7c6327b8f421a6853c6d1d91d29729231ff60a8dfc9a4fae1860cb385aec3c860079ad2e53af6c8d773be2e152422b1883a1e6be574c580cc9733e5 SHA512 818e59e7d2173b63c0b30eeeadcfb3f92409c8697d5581c77b9e5ba9669b585fc0cdad416dcc511da52ca0149a3abe7763d2654198763a6d08a1fbfce38295a9
AUX 057-virtiofs-split-usr.patch 1556 BLAKE2B 292293bce43e899491001664c21d9fc2795d8e8221187c557fb9d74ab3fb7f91aa72d1bcd7c6750a834e7d8ebace27483f2c799353c9857adef2144fe7a5384a SHA512 a61cdfebcfaa9320af669c20589bb5c260c31c8d1cfd330751dbad6bea8e5b07f384ae43b4b9ab3390d233091872f38bbb11f23ec44e2c3fc6b263268d2ae56a
+AUX 059-gawk.patch 1349 BLAKE2B a4c778afb4bded425fd578a4b5b93f4a83924148e64b7ef3c68967626eaa1072b322b3c6ee87dcfcae013ecb12869f3d51977926357cab83cb3404dcecba5787 SHA512 a50e1b74186450fafb3f396c11744b964d67923740627c88d381b0041e3b870a5fea6df8c2119d67ecfdd560d8ea26bf72fea7e7ab70b4fae9e8d035d72d0fe0
AUX 059-uefi-split-usr.patch 1567 BLAKE2B 6abde1671c49e6314e181747ff504f50b7d6d1c9268f5f93a859edfdbbe823f48e33287dfa426b33f2dc967f1895d5499460e9bb865731e784a658d350ba7a3f SHA512 d1b27993003e5da1634a7e287a42ee0c4b8789a411024472e1b8b5a9923d94788dfe0bc4b48da9071bf62bb857aedbb18a5be7324e6d4c0919b329d85cc6b160
+AUX 059-uki-systemd-254.patch 6162 BLAKE2B 60d7fdb8189d26d30fa92c8964e0b6a26b7cfab3d07f006fdad60582fcfbad4a7e9aed91eb9443eafd2f325be59224896ef7dbfa83170c8968aeccf290eeb093 SHA512 83462ef22148ce75b2a94f72c89af6a135d6f8b41fc64fe7d6db3553b409105f1a65eba84727e23c44e3cd61cbc66c132ca5a0f5c103ad974747145fac8c3070
AUX gentoo-ldconfig-paths-r1.patch 1423 BLAKE2B e8bce9ee4b1b2546d4dbaa22a6167f9e3520df4f5f3b67509e430e4a6dd89d9fd18e53328c4bd6ee817e6b27ffcccf29fbdd922707c98f4fe67f6d44d76de2ff SHA512 fd44643e671d59ca51822d0f68b7ce7756035faca780ec784e64950770944f0aefd00a1dd2424f07568d5d97d46c0080c8e740856e0bff79bcf6a7e14b08ab8f
AUX gentoo-network-r1.patch 1002 BLAKE2B 719ff76c315e29c2a40f0a485e315622d6678ef0a325681af22ca060189649119ce08024b1b81be02b28cf532d33165918f5707742bb9927abd08ce49ee0565d SHA512 694f493384e2c0b6a46508f2290efca78d1b6f742fe8441f970837280558d160a711e36ba835ca767cfd158bf191856017af146ae19c5aa1aecbd10a69be38a1
DIST dracut-057.tar.gz 481345 BLAKE2B dcf663a1955753256866e9dfa318b0b46a132ea39223ab634d72af1611f7db394c23c1bb4326979a5ee919df6ce3b107c955c9c77ce1ec4f99de835352932901 SHA512 8acdc8db2233a9abbaeea218cc5b1be68c4985088995f42624750783f8d40ecbb7fa97ab4f6468f67c079c8418590ace317c143a92d9305640b48c7c0edd4089
DIST dracut-059.tar.gz 486487 BLAKE2B 86bbe18875cd3507e187b724cab212dc82e1daca7cedf79aeef13c34601adfff72bf2c0ba4c652e715b43c9a16f7be6a4a2b29dc75bef014640e1ec07c8d455b SHA512 196bc8bf18703c72bffb51a7e0493719c58173ad2da7d121eb42f9a8de47e953af36d109214dc4a10b2dc2d3bd19e844f7f51c2bdec087e064ea11f75124032d
EBUILD dracut-057-r3.ebuild 5275 BLAKE2B 0da03f0b9e67e9ace504f94715ba230b984334da1328c83c799dcbe86dfdddd0b8c15dab4f7e7699e443c0b0285733edb44b39dce499fbec519b729b6a0bcd79 SHA512 fc6fd0f6cdfffcffa8517299302899db9552069c09b180a0d464b4d09c35ea8effad941703e3df196b93fc14ba0c8f82c677526d2153c4ace1adfb3c71799245
EBUILD dracut-059-r2.ebuild 5241 BLAKE2B 682e0269cdce580d59112d6dc05389ecbe8bfcada5572d483fc13ca5d721eea372f505a2604ff48be216e66471d0a12ae57ff73099eed80a64dd946ce64960e4 SHA512 206a4742194f396b5fdcbec95dac1a05531e7d8efd21327d1bdccb23699dc7ed9b096724b189e9977d473fa2ac3d64858085cbc654036304923bf68222ff77ae
+EBUILD dracut-059-r3.ebuild 5312 BLAKE2B f1ef805d5aaf6c217085cc6b66dffc6862c5cc087e0d33cbe11232c27343226daac0a5bab5b03c599ed2930b93e2a3ac7ed8e0a117d6389c1f70e020d8e79625 SHA512 74f49a0ba788f3222086a992acb19630fc195322f98b4617b81d6b24f41bd25031dae49ad5ae8547ea0800722c903b989bdddf0412dc4e27dc759f7d941a7060
EBUILD dracut-9999.ebuild 5202 BLAKE2B 45650bf0f211116e52ad39e6c5f326147215eb7988d29e30407c3e7244a9a7a39383d5a79432b785376f6fda808ae05195af03c8d4d8857dcbf6639e3d4e26ea SHA512 6a41c4c347dc38c86797903245d2a0b173dab9e12a849597120ee9b864f10bc8bd5a4624d75f156200a30990e5161513b0dbb9ef299adcc2c0c6b514b97490f5
MISC metadata.xml 561 BLAKE2B da4ebae5f448d555a01dde8ca36f029ac41f2e740fc7872faa1f0c1dc5a7b13ee989533667c8f4fecbdb324a01a73970790c6f040dbb28a5f13e3a68e1fbfe7a SHA512 c228259a0235119d69c437caa4209598d1e40c8e4974de5a66f272c48acc049d7f24f3f38fc7498aa0b21c7b417253f2a5b649daf0d01543e950a027d2e3cf9b
diff --git a/sys-kernel/dracut/dracut-059-r3.ebuild b/sys-kernel/dracut/dracut-059-r3.ebuild
new file mode 100644
index 000000000000..6d27123ec55b
--- /dev/null
+++ b/sys-kernel/dracut/dracut-059-r3.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 linux-info optfeature systemd toolchain-funcs
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/dracutdevs/dracut"
+else
+ if [[ "${PV}" != *_rc* ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ fi
+ SRC_URI="https://github.com/dracutdevs/dracut/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+DESCRIPTION="Generic initramfs generation tool"
+HOMEPAGE="https://github.com/dracutdevs/dracut/wiki"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="selinux test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ app-arch/cpio
+ >=app-shells/bash-4.0:0
+ sys-apps/coreutils[xattr(-)]
+ >=sys-apps/kmod-23[tools]
+ || (
+ >=sys-apps/sysvinit-2.87-r3
+ sys-apps/openrc[sysv-utils(-),selinux?]
+ sys-apps/systemd[sysv-utils]
+ sys-apps/s6-linux-init[sysv-utils(-)]
+ )
+ >=sys-apps/util-linux-2.21
+ virtual/pkgconfig
+ virtual/udev
+
+ elibc_musl? ( sys-libs/fts-standalone )
+ selinux? (
+ sec-policy/selinux-dracut
+ sys-libs/libselinux
+ sys-libs/libsepol
+ )
+"
+DEPEND="
+ >=sys-apps/kmod-23
+ elibc_musl? ( sys-libs/fts-standalone )
+"
+
+BDEPEND="
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ >=app-text/docbook-xsl-stylesheets-1.75.2
+ >=dev-libs/libxslt-1.1.26
+ virtual/pkgconfig
+"
+
+QA_MULTILIB_PATHS="usr/lib/dracut/.*"
+
+PATCHES=(
+ "${FILESDIR}"/gentoo-ldconfig-paths-r1.patch
+ "${FILESDIR}"/gentoo-network-r1.patch
+ "${FILESDIR}"/059-uefi-split-usr.patch
+ "${FILESDIR}"/059-uki-systemd-254.patch
+ "${FILESDIR}"/059-gawk.patch
+)
+
+src_configure() {
+ local myconf=(
+ --prefix="${EPREFIX}/usr"
+ --sysconfdir="${EPREFIX}/etc"
+ --bashcompletiondir="$(get_bashcompdir)"
+ --systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ )
+
+ tc-export CC PKG_CONFIG
+
+ echo ./configure "${myconf[@]}"
+ ./configure "${myconf[@]}" || die
+
+ if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then
+ # Source tarball from github doesn't include this file
+ echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die
+ fi
+}
+
+src_test() {
+ if [[ ${EUID} != 0 ]]; then
+ # Tests need root privileges, bug #298014
+ ewarn "Skipping tests: Not running as root."
+ elif [[ ! -w /dev/kvm ]]; then
+ ewarn "Skipping tests: Unable to access /dev/kvm."
+ else
+ emake -C test check
+ fi
+}
+
+src_install() {
+ local DOCS=(
+ AUTHORS
+ NEWS.md
+ README.md
+ docs/README.cross
+ docs/README.generic
+ docs/README.kernel
+ docs/SECURITY.md
+ )
+
+ default
+
+ docinto html
+ dodoc dracut.html
+}
+
+pkg_postinst() {
+ if linux-info_get_any_version && linux_config_exists; then
+ ewarn ""
+ ewarn "If the following test report contains a missing kernel"
+ ewarn "configuration option, you should reconfigure and rebuild your"
+ ewarn "kernel before booting image generated with this Dracut version."
+ ewarn ""
+
+ local CONFIG_CHECK="~BLK_DEV_INITRD ~DEVTMPFS"
+
+ # Kernel configuration options descriptions:
+ local ERROR_DEVTMPFS='CONFIG_DEVTMPFS: "Maintain a devtmpfs filesystem to mount at /dev" '
+ ERROR_DEVTMPFS+='is missing and REQUIRED'
+ local ERROR_BLK_DEV_INITRD='CONFIG_BLK_DEV_INITRD: "Initial RAM filesystem and RAM disk '
+ ERROR_BLK_DEV_INITRD+='(initramfs/initrd) support" is missing and REQUIRED'
+
+ check_extra_config
+ echo
+ else
+ ewarn ""
+ ewarn "Your kernel configuration couldn't be checked."
+ ewarn "Please check manually if following options are enabled:"
+ ewarn ""
+ ewarn " CONFIG_BLK_DEV_INITRD"
+ ewarn " CONFIG_DEVTMPFS"
+ ewarn ""
+ fi
+
+ optfeature "Networking support" net-misc/networkmanager
+ optfeature "Legacy networking support" net-misc/curl "net-misc/dhcp[client]" \
+ sys-apps/iproute2 "net-misc/iputils[arping]"
+ optfeature "Scan for Btrfs on block devices" sys-fs/btrfs-progs
+ optfeature "Load kernel modules and drop this privilege for real init" \
+ sys-libs/libcap
+ optfeature "Support CIFS" net-fs/cifs-utils
+ optfeature "Decrypt devices encrypted with cryptsetup/LUKS" \
+ "sys-fs/cryptsetup[-static-libs]"
+ optfeature "Support for GPG-encrypted keys for crypt module" \
+ app-crypt/gnupg
+ optfeature \
+ "Allows use of dash instead of default bash (on your own risk)" \
+ app-shells/dash
+ optfeature \
+ "Allows use of busybox instead of default bash (on your own risk)" \
+ sys-apps/busybox
+ optfeature "Support iSCSI" sys-block/open-iscsi
+ optfeature "Support Logical Volume Manager" sys-fs/lvm2[lvm]
+ optfeature "Support MD devices, also known as software RAID devices" \
+ sys-fs/mdadm sys-fs/dmraid
+ optfeature "Support Device Mapper multipathing" sys-fs/multipath-tools
+ optfeature "Plymouth boot splash" '>=sys-boot/plymouth-0.8.5-r5'
+ optfeature "Support network block devices" sys-block/nbd
+ optfeature "Support NFS" net-fs/nfs-utils net-nds/rpcbind
+ optfeature \
+ "Install ssh and scp along with config files and specified keys" \
+ virtual/openssh
+ optfeature "Enable logging with rsyslog" app-admin/rsyslog
+ optfeature "Support Squashfs" sys-fs/squashfs-tools
+ optfeature "Support TPM 2.0 TSS" app-crypt/tpm2-tools
+ optfeature "Support Bluetooth (experimental)" net-wireless/bluez
+ optfeature "Support BIOS-given device names" sys-apps/biosdevname
+ optfeature "Support network NVMe" sys-apps/nvme-cli
+ optfeature \
+ "Enable rngd service to help generating entropy early during boot" \
+ sys-apps/rng-tools
+}
diff --git a/sys-kernel/dracut/files/059-gawk.patch b/sys-kernel/dracut/files/059-gawk.patch
new file mode 100644
index 000000000000..5f1da79bb24a
--- /dev/null
+++ b/sys-kernel/dracut/files/059-gawk.patch
@@ -0,0 +1,35 @@
+https://github.com/dracutdevs/dracut/pull/2436
+
+From 77214c229dadd1441f0d6243221ceed0708cbfcf Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 20 Jul 2023 04:36:01 +0100
+Subject: [PATCH] fix(dracut.sh): use gawk for strtonum
+
+strtonum is a gawkism and is not available in all awks, e.g. mawk. Use gawk
+to avoid failure.
+
+Fixes: f32e95bcadbc5158843530407adc1e7b700561b1
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/dracut-functions.sh
++++ b/dracut-functions.sh
+@@ -1047,7 +1047,7 @@ pe_file_format() {
+ if [[ $# -eq 1 ]]; then
+ local magic
+ magic=$(objdump -p "$1" \
+- | awk '{if ($1 == "Magic"){print strtonum("0x"$2)}}')
++ | gawk '{if ($1 == "Magic"){print strtonum("0x"$2)}}')
+ magic=$(printf "0x%x" "$magic")
+ # 0x10b (PE32), 0x20b (PE32+)
+ [[ $magic == 0x20b || $magic == 0x10b ]] && return 0
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -2467,7 +2467,7 @@ if [[ $uefi == yes ]]; then
+ fi
+ fi
+
+- offs=$(objdump -h "$uefi_stub" 2> /dev/null | awk 'NF==7 {size=strtonum("0x"$3);\
++ offs=$(objdump -h "$uefi_stub" 2> /dev/null | gawk 'NF==7 {size=strtonum("0x"$3);\
+ offset=strtonum("0x"$4)} END {print size + offset}')
+ if [[ $offs -eq 0 ]]; then
+ dfatal "Failed to get the size of $uefi_stub to create UEFI image file"
+
diff --git a/sys-kernel/dracut/files/059-uki-systemd-254.patch b/sys-kernel/dracut/files/059-uki-systemd-254.patch
new file mode 100644
index 000000000000..e8b52480d030
--- /dev/null
+++ b/sys-kernel/dracut/files/059-uki-systemd-254.patch
@@ -0,0 +1,134 @@
+https://github.com/dracutdevs/dracut/issues/2431
+https://github.com/dracutdevs/dracut/commit/f32e95bcadbc5158843530407adc1e7b700561b1
+
+From f32e95bcadbc5158843530407adc1e7b700561b1 Mon Sep 17 00:00:00 2001
+From: Valentin Lefebvre <valentin.lefebvre@suse.com>
+Date: Mon, 13 Mar 2023 12:06:13 +0100
+Subject: [PATCH] fix(dracut.sh): use dynamically uefi's sections offset
+
+* Uefi section are creating by `objcopy` with hardcoded sections
+offset. This commit allow to have the correct offset between
+each part of the efi file, needed to create an UKI. Offsets
+are simply calculated so no sections overlap, as recommended
+in https://wiki.archlinux.org/title/Unified_kernel_image#Manually
+Moreover, efi stub file's header is parsed to apply the correct
+offsets according the section alignment factor.
+* Remove EFI_SECTION_VMA_INITRD, no need anymore as initrd
+section offset dynamically calculated
+
+Fixes dracutdevs#2275
+
+Signed-off-by: Valentin Lefebvre <valentin.lefebvre@suse.com>
+--- a/dracut-functions.sh
++++ b/dracut-functions.sh
+@@ -1023,3 +1023,26 @@ get_dev_module() {
+ fi
+ echo "$dev_drivers"
+ }
++
++# Check if file is in PE format
++pe_file_format() {
++ if [[ $# -eq 1 ]]; then
++ local magic
++ magic=$(objdump -p "$1" \
++ | awk '{if ($1 == "Magic"){print strtonum("0x"$2)}}')
++ magic=$(printf "0x%x" "$magic")
++ # 0x10b (PE32), 0x20b (PE32+)
++ [[ $magic == 0x20b || $magic == 0x10b ]] && return 0
++ fi
++ return 1
++}
++
++# Get the sectionAlignment data from the PE header
++pe_get_section_align() {
++ local align_hex
++ [[ $# -ne "1" ]] && return 1
++ [[ $(pe_file_format "$1") -eq 1 ]] && return 1
++ align_hex=$(objdump -p "$1" \
++ | awk '{if ($1 == "SectionAlignment"){print $2}}')
++ echo "$((16#$align_hex))"
++}
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -1506,7 +1506,6 @@ if [[ ! $print_cmdline ]]; then
+ exit 1
+ fi
+ unset EFI_MACHINE_TYPE_NAME
+- EFI_SECTION_VMA_INITRD=0x3000000
+ case "${DRACUT_ARCH:-$(uname -m)}" in
+ x86_64)
+ EFI_MACHINE_TYPE_NAME=x64
+@@ -1516,8 +1515,6 @@ if [[ ! $print_cmdline ]]; then
+ ;;
+ aarch64)
+ EFI_MACHINE_TYPE_NAME=aa64
+- # aarch64 kernels are uncompressed and thus larger, so we need a bigger gap between vma sections
+- EFI_SECTION_VMA_INITRD=0x4000000
+ ;;
+ *)
+ dfatal "Architecture '${DRACUT_ARCH:-$(uname -m)}' not supported to create a UEFI executable"
+@@ -2467,29 +2464,57 @@ if [[ $uefi == yes ]]; then
+ fi
+ fi
+
++ offs=$(objdump -h "$uefi_stub" 2> /dev/null | awk 'NF==7 {size=strtonum("0x"$3);\
++ offset=strtonum("0x"$4)} END {print size + offset}')
++ if [[ $offs -eq 0 ]]; then
++ dfatal "Failed to get the size of $uefi_stub to create UEFI image file"
++ exit 1
++ fi
++ align=$(pe_get_section_align "$uefi_stub")
++ if [[ $? -eq 1 ]]; then
++ dfatal "Failed to get the sectionAlignment of the stub PE header to create the UEFI image file"
++ exit 1
++ fi
++ offs=$((offs + "$align" - offs % "$align"))
++ [[ -s $dracutsysrootdir/usr/lib/os-release ]] && uefi_osrelease="$dracutsysrootdir/usr/lib/os-release"
++ [[ -s $dracutsysrootdir/etc/os-release ]] && uefi_osrelease="$dracutsysrootdir/etc/os-release"
++ [[ -s $uefi_osrelease ]] \
++ && uefi_osrelease_offs=${offs} \
++ && offs=$((offs + $(stat -Lc%s "$uefi_osrelease"))) \
++ && offs=$((offs + "$align" - offs % "$align"))
++
+ if [[ $kernel_cmdline ]] || [[ $hostonly_cmdline == yes && -e "${uefi_outdir}/cmdline.txt" ]]; then
+ echo -ne "\x00" >> "$uefi_outdir/cmdline.txt"
+ dinfo "Using UEFI kernel cmdline:"
+ dinfo "$(tr -d '\000' < "$uefi_outdir/cmdline.txt")"
+ uefi_cmdline="${uefi_outdir}/cmdline.txt"
++ uefi_cmdline_offs=${offs}
++ offs=$((offs + $(stat -Lc%s "$uefi_cmdline")))
++ offs=$((offs + "$align" - offs % "$align"))
+ else
+ unset uefi_cmdline
+ fi
+
+- [[ -s $dracutsysrootdir/usr/lib/os-release ]] && uefi_osrelease="$dracutsysrootdir/usr/lib/os-release"
+- [[ -s $dracutsysrootdir/etc/os-release ]] && uefi_osrelease="$dracutsysrootdir/etc/os-release"
+ if [[ -s ${dracutsysrootdir}${uefi_splash_image} ]]; then
+ uefi_splash_image="${dracutsysrootdir}${uefi_splash_image}"
++ uefi_splash_offs=${offs}
++ offs=$((offs + $(stat -Lc%s "$uefi_splash_image")))
++ offs=$((offs + "$align" - offs % "$align"))
+ else
+ unset uefi_splash_image
+ fi
+
++ uefi_linux_offs="${offs}"
++ offs=$((offs + $(stat -Lc%s "$kernel_image")))
++ offs=$((offs + "$align" - offs % "$align"))
++ uefi_initrd_offs="${offs}"
++
+ if objcopy \
+- ${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=0x20000} \
+- ${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=0x30000} \
+- ${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=0x40000} \
+- --add-section .linux="$kernel_image" --change-section-vma .linux=0x2000000 \
+- --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="${EFI_SECTION_VMA_INITRD}" \
++ ${uefi_osrelease:+--add-section .osrel="$uefi_osrelease" --change-section-vma .osrel=$(printf 0x%x "$uefi_osrelease_offs")} \
++ ${uefi_cmdline:+--add-section .cmdline="$uefi_cmdline" --change-section-vma .cmdline=$(printf 0x%x "$uefi_cmdline_offs")} \
++ ${uefi_splash_image:+--add-section .splash="$uefi_splash_image" --change-section-vma .splash=$(printf 0x%x "$uefi_splash_offs")} \
++ --add-section .linux="$kernel_image" --change-section-vma .linux="$(printf 0x%x "$uefi_linux_offs")" \
++ --add-section .initrd="${DRACUT_TMPDIR}/initramfs.img" --change-section-vma .initrd="$(printf 0x%x "$uefi_initrd_offs")" \
+ "$uefi_stub" "${uefi_outdir}/linux.efi"; then
+ if [[ -n ${uefi_secureboot_key} && -n ${uefi_secureboot_cert} ]]; then
+ if sbsign \