18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ci===================================== 48c2ecf20Sopenharmony_ciGeneral note on [U]EFI x86_64 support 58c2ecf20Sopenharmony_ci===================================== 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciThe nomenclature EFI and UEFI are used interchangeably in this document. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciAlthough the tools below are _not_ needed for building the kernel, 108c2ecf20Sopenharmony_cithe needed bootloader support and associated tools for x86_64 platforms 118c2ecf20Sopenharmony_ciwith EFI firmware and specifications are listed below. 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci1. UEFI specification: http://www.uefi.org 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci2. Booting Linux kernel on UEFI x86_64 platform requires bootloader 168c2ecf20Sopenharmony_ci support. Elilo with x86_64 support can be used. 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci3. x86_64 platform with EFI/UEFI firmware. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciMechanics 218c2ecf20Sopenharmony_ci--------- 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci- Build the kernel with the following configuration:: 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci CONFIG_FB_EFI=y 268c2ecf20Sopenharmony_ci CONFIG_FRAMEBUFFER_CONSOLE=y 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci If EFI runtime services are expected, the following configuration should 298c2ecf20Sopenharmony_ci be selected:: 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci CONFIG_EFI=y 328c2ecf20Sopenharmony_ci CONFIG_EFI_VARS=y or m # optional 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci- Create a VFAT partition on the disk 358c2ecf20Sopenharmony_ci- Copy the following to the VFAT partition: 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci elilo bootloader with x86_64 support, elilo configuration file, 388c2ecf20Sopenharmony_ci kernel image built in first step and corresponding 398c2ecf20Sopenharmony_ci initrd. Instructions on building elilo and its dependencies 408c2ecf20Sopenharmony_ci can be found in the elilo sourceforge project. 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci- Boot to EFI shell and invoke elilo choosing the kernel image built 438c2ecf20Sopenharmony_ci in first step. 448c2ecf20Sopenharmony_ci- If some or all EFI runtime services don't work, you can try following 458c2ecf20Sopenharmony_ci kernel command line parameters to turn off some or all EFI runtime 468c2ecf20Sopenharmony_ci services. 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci noefi 498c2ecf20Sopenharmony_ci turn off all EFI runtime services 508c2ecf20Sopenharmony_ci reboot_type=k 518c2ecf20Sopenharmony_ci turn off EFI reboot runtime service 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci- If the EFI memory map has additional entries not in the E820 map, 548c2ecf20Sopenharmony_ci you can include those entries in the kernels memory map of available 558c2ecf20Sopenharmony_ci physical RAM by using the following kernel command line parameter. 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci add_efi_memmap 588c2ecf20Sopenharmony_ci include EFI memory map of available physical RAM 59