Skip to content

[lib][uefi] merge platform FDT and add Cuttlefish bootconfig properties - #550

Merged
zhangxp1998 merged 1 commit into
littlekernel:masterfrom
zhangxp1998:uefi-gbl-dt-bootconfig-fixup
Nov 11, 2026
Merged

zhangxp1998 merged 1 commit into
littlekernel:masterfrom
zhangxp1998:uefi-gbl-dt-bootconfig-fixup

Conversation

@zhangxp1998

@zhangxp1998 zhangxp1998 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Recent GBL mainline dropped reading DEVICE_TREE_GUID from the UEFI configuration table and instead passes the base DTB from vendor_boot to EfiDtFixupProtocol.fixup (which on Cuttlefish is an empty dummy FDT). When get_fdt() is present, open the platform FDT into the fixup buffer and copy GBL's /chosen properties into it, and move the console and earlycon kernel commandline addition to fixup_kernel_commandline().

Also append androidboot.modem_simulator_ports and the Cuttlefish vendor APEX selection properties in fixup_bootconfig() so vendor.ril-daemon and apexd-bootstrap start cleanly.

Copilot AI balanced review requested due to automatic review settings November 10, 2026 03:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The DTB fixup mishandles insufficient buffer capacity and ignores property-copy failures, preventing resize retries and potentially reporting success with an incomplete tree.

2 open issues
What changed in this PR

Updates LK’s UEFI fixups to combine the platform device tree with GBL’s /chosen properties, addressing Cuttlefish’s placeholder DTB, and adds vendor APEX selections required by current Cuttlefish images.

Changes:

  • Uses the platform FDT as the base while preserving GBL’s /chosen properties.
  • Packs the resulting device tree after updating bootargs.
  • Adds bootconfig selections for gatekeeper, graphics composer, keymint, and camera vendor APEX packages.
File Description
lib/​uefi/​uefi_platform.cpp Merges platform and GBL device-tree data and adds Cuttlefish vendor APEX bootconfig properties.

Review effort: Balanced

Comment thread lib/uefi/uefi_platform.cpp Resolved
Comment thread lib/uefi/uefi_platform.cpp Resolved
@zhangxp1998 zhangxp1998 changed the title [lib][uefi] merge platform FDT and add Cuttlefish vendor APEX bootconfig [lib][uefi] merge platform FDT and add Cuttlefish bootconfig properties Nov 10, 2026
@zhangxp1998
zhangxp1998 force-pushed the uefi-gbl-dt-bootconfig-fixup branch 2 times, most recently from 7310e73 to 167ae8f Compare November 10, 2026 03:38
Recent GBL mainline dropped reading DEVICE_TREE_GUID from the UEFI
configuration table and instead passes the base DTB from vendor_boot
to EfiDtFixupProtocol.fixup (which on Cuttlefish is an empty dummy
FDT). When get_fdt() is present, open the platform FDT into the fixup
buffer and copy GBL's /chosen properties into it, and move the console
and earlycon kernel commandline addition to fixup_kernel_commandline().

Also append androidboot.modem_simulator_ports and the Cuttlefish vendor
APEX selection properties in fixup_bootconfig() so vendor.ril-daemon and
apexd-bootstrap start cleanly.
@zhangxp1998
zhangxp1998 force-pushed the uefi-gbl-dt-bootconfig-fixup branch from 167ae8f to 62e3a86 Compare November 10, 2026 05:21
@zhangxp1998
zhangxp1998 merged commit 0d9e2ca into littlekernel:master Nov 11, 2026
112 of 119 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants