Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:guide-developer:uefi-bootable-image [2018/12/26 04:19] – [Status] Remove unbootable warning when resulting gpt image is booted on bios / UEFI CSM alive4everdocs:guide-developer:uefi-bootable-image [2021/06/28 13:50] (current) – [Status] replace git commit ID with actual link to the commit fiouz
Line 2: Line 2:
  
 ===== Introduction ===== ===== Introduction =====
-UEFI based systems are becoming more common and it's expected at some time that newer UEFI based system doesn't contain CSM to support legacy bios mode at all ((http://www.uefi.org/sites/default/files/resources/Brian_Richardson_Intel_Final.pdf)). 
  
-To accommodate this, it's necessary for OpenWrt build system to generate UEFI bootable images.+UEFI boot has been required for years now, boards that only support UEFI are common, and Intel has stated back in 2017 that "legacy" BIOS will no longer be supported after 2020.
  
-===== Status =====+https://www.anandtech.com/show/12068/intel-to-remove-bios-support-from-uefi-by-2020
  
-There are pending commits related to add UEFI bootable OpenWrt under +http://www.uefi.org/sites/default/files/resources/Brian_Richardson_Intel_Final.pdf.
-[[https://git.openwrt.org/?p=openwrt/staging/jow.git;a=summary|Jow staging repository]].+
  
-===== Building UEFI bootable OpenWrt image =====+To accommodate this, it's necessary for OpenWrt build system to generate UEFI bootable images.
  
-The commits necessary to build uefi bootable OpenWrt image are as follows.+===== Status =====
  
-<code>+As of OpenWrt ''[[commit>?p=openwrt/openwrt.git;a=commit;h=a6b7c3e672764858fd294998406ae791f5964b4a|a6b7c3e672764858fd294998406ae791f5964b4a]]'', EFI-compatible images are available on the x86-64 [[https://downloads.openwrt.org/snapshots/targets/x86/64/|snapshots]] downloads page.
  
  
 +===== Building UEFI bootable OpenWrt image =====
  
-a63d85882e825159268191cf1fe066c1fba0e9b1 tools: add libopt host build +To build an EFI-compatible OpenWrt image:
-76cccd168c5c5bed2e7a641b1ca86e7b28895984 toolsadd sgdisk host build +
-39979789c0549f9f774c323e54ed82248976a31c Generate EFI grub images for x86 platforms+
  
-</code>+    * Run ''make menuconfig''.
  
-To build the image, cherry pick those commits, i.e. +    * Go to **Target Images** and make sure that the option **Build GRUB EFI images (Linux x86 or x86_64 host only)** is checked.
- +
-<code bash> +
-$ git remote add jow-staging https://git.openwrt.org/openwrt/staging/jow.git +
-$ git fetch jow-staging +
-$ git checkout -b uefi-capable --track origin/master # so that you can rebase easily +
-$ for commit in \ +
-  a63d85882e825159268191cf1fe066c1fba0e9b1 \ +
-  76cccd168c5c5bed2e7a641b1ca86e7b28895984 \ +
-  39979789c0549f9f774c323e54ed82248976a31c \ +
-  ; do \ +
-      git cherry-pick $commmit ; done +
-</code> +
- +
-Optionally, integrate pending changes (see footnote) to make resulting gpt images bootable on bios based systems. +
- +
-<code bash> +
-$ curl -L -o patch-0001.patch "https://patchwork.ozlabs.org/patch/881131/mbox/" +
-$ curl -L -o patch-0002.patch "https://patchwork.ozlabs.org/patch/881132/mbox/" +
-$ git am ./patch-0001.patch ./patch-0002.patch +
-</code> +
- +
-After cherry-picking those commits and integrating pending patches, run ''make menuconfig''+
- +
-Go to **Target Images** and make sure that **Build EFI grub images** option is checked.+
  
 Select additional packages as necessary and finally save changes and exit menuconfig. Select additional packages as necessary and finally save changes and exit menuconfig.
Line 55: Line 28:
 Run ''make'' as usual to build the image. Run ''make'' as usual to build the image.
  
-The resulting image will be available as ''bin/targets/x86/64/openwrt-x86-64-uefi-gpt-ext4.img.gz'', which can be written to disk after decompression.+The resulting image(s) will be available in ''./bin/targets/x86/64/'' (depending on the image format(s) you chose), which can be written to disk after decompression
 + 
 +Note that these are **disk images**, not partition images, which must be written to a block device directly e.g. ''/dev/sdb''.
  
 ===== UEFI Secure Boot ===== ===== UEFI Secure Boot =====
  • Last modified: 2018/12/26 04:19
  • by alive4ever