marrying u boot uefi and grub about me
play

Marrying U-Boot, UEFI and grub About Me Alexander Graf KVM and - PowerPoint PPT Presentation

Marrying U-Boot, UEFI and grub About Me Alexander Graf KVM and QEMU developer for SUSE Server class PowerPC KVM port Nested SVM Founding member of SUSE ARM team Booting on ARM Booting on ARM Boot ROM Booting on ARM Boot


  1. Marrying U-Boot, UEFI and grub

  2. About Me • Alexander Graf • KVM and QEMU developer for SUSE • Server class PowerPC KVM port • Nested SVM • Founding member of SUSE ARM team

  3. Booting on ARM

  4. Booting on ARM Boot ROM

  5. Booting on ARM Boot ROM Firmware Flash

  6. Booting on ARM Boot ROM Firmware Flash SD / USB / etc custom extlinux vboot UEFI

  7. Ideal Distro boot flow Firmware, do not care Boot ROM Firmware Flash SD / USB / etc custom extlinux vboot UEFI

  8. Ideal Distro boot flow Firmware, do not care Boot ROM Firmware Flash SD / USB / etc One protocol to 
 rule them all

  9. UEFI boot flow

  10. UEFI boot flow UEFI

  11. UEFI boot flow UEFI NVRAM

  12. UEFI boot flow sda2/foo.efi UEFI NVRAM mmc0/bar.efi eth0/dhcp4

  13. UEFI boot flow sda2/foo.efi UEFI NVRAM mmc0/bar.efi eth0/dhcp4

  14. UEFI boot flow ✗ sda2/foo.efi UEFI NVRAM mmc0/bar.efi eth0/dhcp4

  15. UEFI boot flow ✗ sda2/foo.efi UEFI NVRAM ✗ mmc0/bar.efi eth0/dhcp4

  16. UEFI boot flow ✗ sda2/foo.efi UEFI NVRAM ✗ mmc0/bar.efi ✗ eth0/dhcp4

  17. UEFI boot flow UEFI NVRAM Removable

  18. UEFI boot flow sda/ESP/efi/ 
 boot/bootaa64.efi UEFI NVRAM mmc0/ESP/efi/ 
 boot/bootaa64.efi Removable cd0/eltorito/efi/ 
 boot/bootaa64.efi

  19. UEFI boot flow sda/ESP/efi/ 
 boot/bootaa64.efi UEFI NVRAM mmc0/ESP/efi/ 
 boot/bootaa64.efi Removable cd0/eltorito/efi/ 
 boot/bootaa64.efi

  20. UEFI boot flow ✗ sda/ESP/efi/ 
 boot/bootaa64.efi UEFI NVRAM mmc0/ESP/efi/ 
 boot/bootaa64.efi Removable cd0/eltorito/efi/ 
 boot/bootaa64.efi

  21. UEFI boot flow ✗ sda/ESP/efi/ 
 boot/bootaa64.efi UEFI NVRAM ✗ mmc0/ESP/efi/ 
 boot/bootaa64.efi Removable cd0/eltorito/efi/ 
 boot/bootaa64.efi

  22. UEFI boot flow ✗ sda/ESP/efi/ 
 boot/bootaa64.efi UEFI NVRAM ✗ mmc0/ESP/efi/ 
 boot/bootaa64.efi Removable cd0/eltorito/efi/ 
 ✔ boot/bootaa64.efi

  23. UEFI boot flow ✗ sda/ESP/efi/ 
 boot/bootaa64.efi UEFI NVRAM ✗ mmc0/ESP/efi/ 
 boot/bootaa64.efi Removable cd0/eltorito/efi/ 
 ✔ bootaa64.efi boot/bootaa64.efi

  24. UEFI boot flow UEFI bootaa64.efi

  25. UEFI boot flow UEFI bootaa64.efi EFI Runtime Data Console Boot Services Runtime Services Tables

  26. UEFI boot flow UEFI bootaa64.efi EFI Runtime Data Console Boot Services Runtime Services Tables

  27. UEFI boot flow Boot Services UEFI bootaa64.efi

  28. UEFI boot flow Boot Services UEFI bootaa64.efi btrfs

  29. UEFI boot flow Boot Services UEFI bootaa64.efi btrfs

  30. UEFI boot flow Boot Services UEFI bootaa64.efi btrfs

  31. UEFI boot flow ✗ Boot Services ✗ ✗ UEFI bootaa64.efi btrfs

  32. UEFI boot flow Runtime Services NVRAM UEFI

  33. UEFI boot flow advantages

  34. UEFI boot flow advantages UEFI

  35. UEFI boot flow advantages Firmware, do not care UEFI

  36. UEFI boot flow advantages Firmware, do not care UEFI

  37. UEFI boot flow advantages Firmware, do not care UEFI btrfs

  38. UEFI boot flow advantages Firmware, do not care UEFI btrfs zfs

  39. UEFI boot flow advantages Firmware, do not care UEFI btrfs zfs ext4 extension 593

  40. UEFI boot flow advantages Firmware, do not care UEFI btrfs zfs ext4 extension 593

  41. UEFI boot flow advantages Firmware, do not care UEFI

  42. UEFI boot flow advantages

  43. U-Boot

  44. U EFI_STATUS EFIAPI GetNextMonotonicCount ( OUT UINT64 *Count ) { if (Count == NULL) { return EFI_INVALID_PARAMETER; } *Count = gCurrentMonotonicCount++; return EFI_SUCCESS; }

  45. U-Boot static efi_status_t EFIAPI efi_get_next_monotonic_count(uint64_t *count) { static uint64_t mono = 0; EFI_ENTRY("%p", count); *count = mono++; return EFI_EXIT(EFI_SUCCESS); }

  46. U

  47. U UEFI

  48. U

  49. U Black Boxes

  50. U-Boot

  51. U-Boot Monolithic

  52. U-Boot

  53. U-Boot core

  54. U-Boot core BBB

  55. U-Boot core BBB Open 
 Platform

  56. U-Boot core BBB $ grep -R ARM configs/ | wc -l 
 Open 
 684 Platform

  57. U-Boot Foundation for black box modules Monolithic, GPL Windows coding style Linux coding style Built to fork Built to include

  58. UEFI interfaces

  59. UEFI interfaces

  60. UEFI interfaces

  61. UEFI interfaces

  62. UEFI interfaces u32 block_size u64 last_block char read_only read_blocks() write_blocks()

  63. UEFI interfaces u8 mac_address[32] u8 ip_address[16] u8 media_present transmit() receive()

  64. U-Boot interfaces

  65. 
 
 
 U-Boot interfaces ulong blksz u64 lba char removable blk_dread() eth_get_ethaddr() blk_dwrite() net_send_packet() eth_rx()

  66. UEFI interfaces

  67. UEFI interfaces

  68. UEFI interfaces efi_loader

  69. efi_loader

  70. efi_loader bootefi

  71. bootefi

  72. bootefi

  73. bootefi

  74. bootefi U-Boot> load mmc 0:1 $kernel_addr_r Image

  75. bootefi U-Boot> load mmc 0:1 $kernel_addr_r Image reading Image 568320 bytes read in 165 ms (3.3 MiB/s)

  76. bootefi U-Boot> bootefi $kernel_addr_r $fdt_addr_r

  77. bootefi U-Boot> bootefi $kernel_addr_r $fdt_addr_r ## Starting EFI application at 0x01000000 … EFI stub: Booting Linux Kernel... EFI stub: UEFI Secure Boot is enabled. EFI stub: Using DTB from configuration table EFI stub: Exiting boot services and installing virtual address map...

  78. bootefi U-Boot> bootefi $kernel_addr_r $fdt_addr_r ## Starting EFI application at 0x01000000 … EFI stub: Booting Linux Kernel... EFI stub: UEFI Secure Boot is enabled. EFI stub: Using DTB from configuration table EFI stub: Exiting boot services and installing virtual address map...

  79. bootefi

  80. bootefi

  81. bootefi KASLR

  82. efi_loader bootefi

  83. efi_loader bootefi distro boot

  84. distro boot

  85. distro boot boot_targets=mmc0 usb0 pxe dhcp

  86. distro boot boot_targets=mmc0 usb0 pxe dhcp extlinux

  87. distro boot boot_targets=mmc0 usb0 pxe dhcp extlinux boot.script

  88. distro boot boot_targets=mmc0 usb0 pxe dhcp extlinux boot.script EFI

  89. distro boot EFI

  90. distro boot EFI

  91. distro boot EFI Partition Table ESP

  92. distro boot EFI $fdtfile ESP

  93. distro boot EFI / ESP /dtb/ /dtb/current/ $fdtfile /boot/ /boot/dtb/ /boot/dtb/current/

  94. distro boot EFI $fdtfile ESP efi/boot/bootaa64.efi

  95. distro boot EFI $fdtfile ESP

  96. distro boot EFI $fdtfile ESP

  97. distro boot EFI $fdtfile ESP

  98. distro boot EFI ✔

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend