€• ;Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”(hhŒparent”hubaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ(/translations/zh_CN/admin-guide/efi-stub”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”(hhhh2ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/zh_TW/admin-guide/efi-stub”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”(hhhhFubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/it_IT/admin-guide/efi-stub”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”(hhhhZubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/ja_JP/admin-guide/efi-stub”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”(hhhhnubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/ko_KR/admin-guide/efi-stub”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”(hhhh‚ubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/sp_SP/admin-guide/efi-stub”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒThe EFI Boot Stub”h]”hŒThe EFI Boot Stub”…””}”(hhªhh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒB/var/lib/git/docbuild/linux/Documentation/admin-guide/efi-stub.rst”h KubhŒ paragraph”“”)”}”(hXvOn the x86 and ARM platforms, a kernel zImage/bzImage can masquerade as a PE/COFF image, thereby convincing EFI firmware loaders to load it as an EFI executable. The code that modifies the bzImage header, along with the EFI-specific entry point that the firmware loader jumps to are collectively known as the "EFI boot stub", and live in arch/x86/boot/header.S and drivers/firmware/efi/libstub/x86-stub.c, respectively. For ARM the EFI stub is implemented in arch/arm/boot/compressed/efi-header.S and drivers/firmware/efi/libstub/arm32-stub.c. EFI stub code that is shared between architectures is in drivers/firmware/efi/libstub.”h]”hXzOn the x86 and ARM platforms, a kernel zImage/bzImage can masquerade as a PE/COFF image, thereby convincing EFI firmware loaders to load it as an EFI executable. The code that modifies the bzImage header, along with the EFI-specific entry point that the firmware loader jumps to are collectively known as the “EFI boot stubâ€, and live in arch/x86/boot/header.S and drivers/firmware/efi/libstub/x86-stub.c, respectively. For ARM the EFI stub is implemented in arch/arm/boot/compressed/efi-header.S and drivers/firmware/efi/libstub/arm32-stub.c. EFI stub code that is shared between architectures is in drivers/firmware/efi/libstub.”…””}”(hh»hh¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hXFor arm64, there is no compressed kernel support, so the Image itself masquerades as a PE/COFF image and the EFI stub is linked into the kernel. The arm64 EFI stub lives in drivers/firmware/efi/libstub/arm64.c and drivers/firmware/efi/libstub/arm64-stub.c.”h]”hXFor arm64, there is no compressed kernel support, so the Image itself masquerades as a PE/COFF image and the EFI stub is linked into the kernel. The arm64 EFI stub lives in drivers/firmware/efi/libstub/arm64.c and drivers/firmware/efi/libstub/arm64-stub.c.”…””}”(hhÉhhÇhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒñBy using the EFI boot stub it's possible to boot a Linux kernel without the use of a conventional EFI boot loader, such as grub or elilo. Since the EFI boot stub performs the jobs of a boot loader, in a certain sense it *IS* the boot loader.”h]”(hŒÞBy using the EFI boot stub it’s possible to boot a Linux kernel without the use of a conventional EFI boot loader, such as grub or elilo. Since the EFI boot stub performs the jobs of a boot loader, in a certain sense it ”…””}”(hŒÜBy using the EFI boot stub it's possible to boot a Linux kernel without the use of a conventional EFI boot loader, such as grub or elilo. Since the EFI boot stub performs the jobs of a boot loader, in a certain sense it ”hhÕhžhhŸNh NubhŒemphasis”“”)”}”(hŒ*IS*”h]”hŒIS”…””}”(hhhhàhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÞhhÕubhŒ the boot loader.”…””}”(hŒ the boot loader.”hhÕhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¸)”}”(hŒDThe EFI boot stub is enabled with the CONFIG_EFI_STUB kernel option.”h]”hŒDThe EFI boot stub is enabled with the CONFIG_EFI_STUB kernel option.”…””}”(hhûhhùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubh¢)”}”(hhh]”(h§)”}”(hŒHow to install bzImage.efi”h]”hŒHow to install bzImage.efi”…””}”(hj hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h Kubh¸)”}”(hXThe bzImage located in arch/x86/boot/bzImage must be copied to the EFI System Partition (ESP) and renamed with the extension ".efi". Without the extension the EFI firmware loader will refuse to execute it. It's not possible to execute bzImage.efi from the usual Linux file systems because EFI firmware doesn't have support for them. For ARM the arch/arm/boot/zImage should be copied to the system partition, and it may not need to be renamed. Similarly for arm64, arch/arm64/boot/Image should be copied but not necessarily renamed.”h]”hXThe bzImage located in arch/x86/boot/bzImage must be copied to the EFI System Partition (ESP) and renamed with the extension “.efiâ€. Without the extension the EFI firmware loader will refuse to execute it. It’s not possible to execute bzImage.efi from the usual Linux file systems because EFI firmware doesn’t have support for them. For ARM the arch/arm/boot/zImage should be copied to the system partition, and it may not need to be renamed. Similarly for arm64, arch/arm64/boot/Image should be copied but not necessarily renamed.”…””}”(hjhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hjhžhubeh}”(h]”Œhow-to-install-bzimage-efi”ah ]”h"]”Œhow to install bzimage.efi”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ,Passing kernel parameters from the EFI shell”h]”hŒ,Passing kernel parameters from the EFI shell”…””}”(hj3hj1hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj.hžhhŸh¶h K+ubh¸)”}”(hŒ?Arguments to the kernel can be passed after bzImage.efi, e.g.::”h]”hŒ>Arguments to the kernel can be passed after bzImage.efi, e.g.:”…””}”(hŒ>Arguments to the kernel can be passed after bzImage.efi, e.g.:”hj?hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K-hj.hžhubhŒ literal_block”“”)”}”(hŒ.fs0:> bzImage.efi console=ttyS0 root=/dev/sda4”h]”hŒ.fs0:> bzImage.efi console=ttyS0 root=/dev/sda4”…””}”(hhhjPubah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jNhŸh¶h K/hj.hžhubeh}”(h]”Œ,passing-kernel-parameters-from-the-efi-shell”ah ]”h"]”Œ,passing kernel parameters from the efi shell”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K+ubh¢)”}”(hhh]”(h§)”}”(hŒThe "initrd=" option”h]”hŒThe “initrd=†option”…””}”(hjmhjkhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhhžhhŸh¶h K3ubh¸)”}”(hŒãLike most boot loaders, the EFI stub allows the user to specify multiple initrd files using the "initrd=" option. This is the only EFI stub-specific command line parameter, everything else is passed to the kernel when it boots.”h]”hŒçLike most boot loaders, the EFI stub allows the user to specify multiple initrd files using the “initrd=†option. This is the only EFI stub-specific command line parameter, everything else is passed to the kernel when it boots.”…””}”(hj{hjyhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K5hjhhžhubh¸)”}”(hX The path to the initrd file must be an absolute path from the beginning of the ESP, relative path names do not work. Also, the path is an EFI-style path and directory elements must be separated with backslashes (\). For example, given the following directory layout::”h]”hX The path to the initrd file must be an absolute path from the beginning of the ESP, relative path names do not work. Also, the path is an EFI-style path and directory elements must be separated with backslashes (). For example, given the following directory layout:”…””}”(hX The path to the initrd file must be an absolute path from the beginning of the ESP, relative path names do not work. Also, the path is an EFI-style path and directory elements must be separated with backslashes (\). For example, given the following directory layout:”hj‡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K:hjhhžhubjO)”}”(hŒ½fs0:> Kernels\ bzImage.efi initrd-large.img Ramdisks\ initrd-small.img initrd-medium.img”h]”hŒ½fs0:> Kernels\ bzImage.efi initrd-large.img Ramdisks\ initrd-small.img initrd-medium.img”…””}”(hhhj–ubah}”(h]”h ]”h"]”h$]”h&]”j^j_uh1jNhŸh¶h K?hjhhžhubh¸)”}”(hŒ}to boot with the initrd-large.img file if the current working directory is fs0:\Kernels, the following command must be used::”h]”hŒ|to boot with the initrd-large.img file if the current working directory is fs0:Kernels, the following command must be used:”…””}”(hŒ|to boot with the initrd-large.img file if the current working directory is fs0:\Kernels, the following command must be used:”hj¤hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KHhjhhžhubjO)”}”(hŒ:fs0:\Kernels> bzImage.efi initrd=\Kernels\initrd-large.img”h]”hŒ:fs0:\Kernels> bzImage.efi initrd=\Kernels\initrd-large.img”…””}”(hhhj³ubah}”(h]”h ]”h"]”h$]”h&]”j^j_uh1jNhŸh¶h KKhjhhžhubh¸)”}”(hŒèNotice how bzImage.efi can be specified with a relative path. That's because the image we're executing is interpreted by the EFI shell, which understands relative paths, whereas the rest of the command line is passed to bzImage.efi.”h]”hŒìNotice how bzImage.efi can be specified with a relative path. That’s because the image we’re executing is interpreted by the EFI shell, which understands relative paths, whereas the rest of the command line is passed to bzImage.efi.”…””}”(hjÃhjÁhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KMhjhhžhubeh}”(h]”Œthe-initrd-option”ah ]”h"]”Œthe "initrd=" option”ah$]”h&]”uh1h¡hh£hžhhŸh¶h K3ubh¢)”}”(hhh]”(h§)”}”(hŒThe "dtb=" option”h]”hŒThe “dtb=†option”…””}”(hjÜhjÚhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj×hžhhŸh¶h KTubh¸)”}”(hX2For the ARM and arm64 architectures, a device tree must be provided to the kernel. Normally firmware shall supply the device tree via the EFI CONFIGURATION TABLE. However, the "dtb=" command line option can be used to override the firmware supplied device tree, or to supply one when firmware is unable to.”h]”hX6For the ARM and arm64 architectures, a device tree must be provided to the kernel. Normally firmware shall supply the device tree via the EFI CONFIGURATION TABLE. However, the “dtb=†command line option can be used to override the firmware supplied device tree, or to supply one when firmware is unable to.”…””}”(hjêhjèhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h KVhj×hžhubh¸)”}”(hXcPlease note: Firmware adds runtime configuration information to the device tree before booting the kernel. If dtb= is used to override the device tree, then any runtime data provided by firmware will be lost. The dtb= option should only be used either as a debug tool, or as a last resort when a device tree is not provided in the EFI CONFIGURATION TABLE.”h]”hXcPlease note: Firmware adds runtime configuration information to the device tree before booting the kernel. If dtb= is used to override the device tree, then any runtime data provided by firmware will be lost. The dtb= option should only be used either as a debug tool, or as a last resort when a device tree is not provided in the EFI CONFIGURATION TABLE.”…””}”(hjøhjöhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K\hj×hžhubh¸)”}”(hŒW"dtb=" is processed in the same manner as the "initrd=" option that is described above.”h]”hŒ_“dtb=†is processed in the same manner as the “initrd=†option that is described above.”…””}”(hjhjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Kchj×hžhubeh}”(h]”Œthe-dtb-option”ah ]”h"]”Œthe "dtb=" option”ah$]”h&]”uh1h¡hh£hžhhŸh¶h KTubeh}”(h]”Œthe-efi-boot-stub”ah ]”h"]”Œthe efi boot stub”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jEŒerror_encoding”ŒUTF-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œ embed_images”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjj+j(jejbjÔjÑjjuŒ nametypes”}”(jNj+NjeNjÔNjNuh}”(jh£j(jjbj.jÑjhjj×uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.