edk2-sdm845/sdm845Pkg/Drivers/Op6tSlotDxe
2021-12-16 19:00:10 +08:00
..
crc32.c Standarized code styles (clang-format) 2021-12-16 19:00:10 +08:00
crc32.h Standarized code styles (clang-format) 2021-12-16 19:00:10 +08:00
LICENSE sdm845Pkg: add new driver Op6tSlotDxe 2021-07-02 16:30:14 +08:00
Op6tSlotDxe.inf sdm845Pkg: add new driver Op6tSlotDxe 2021-07-02 16:30:14 +08:00
README.md Op6tSlotDex: update README.md 2021-07-02 16:30:14 +08:00
slot.c Standarized code styles (clang-format) 2021-12-16 19:00:10 +08:00
slot.h Standarized code styles (clang-format) 2021-12-16 19:00:10 +08:00

Op6TSlot

Add A/B slot support for OnePlus 6T EFI-EDK2 firmware.

Introduction

The OnePlus 6T device uses the A/B slot mode proposed by AOSP. Each time it is started, the bootloader checks if the current slot is available or switches if not. Therefore, when we use a non-Android system, bootloader will assume that the current slot used is damaged and switch between the slots, since the slot status cannot be updated. When the same thing happens in another slot, bootloader forces it into fastboot.
This UEFI Application module is designed to automatically update the slot state after entering UEFI firmware, without requiring an OS level solution to this problem.
Implementing A/B Updates
About GPT

Current Status

  • Find the disk with the flag.
  • Write Slot flag(Active/Bootable/Unbootable) to the disk
  • Read GPT partition entry
  • Generating CRC32 code for GPT partition entry
  • Write the CRC32 code of GPT partition entry to the specified position
  • Read the first 92 bytes of the GPT header
  • Generating CRC32 code of GPT header
  • Write the CRC32 code of GPT header to the specified position
  • Has the problem been solved?

License

The software is distributed under GPL v3 with additional terms.