Skip to content

Conversation

@jackadam1981
Copy link

## Summary

Add a Kconfig option `CONFIG_EDK2_RTKUNDI_DRIVER` so that boards using EDK2 UEFI payload can choose whether to include the Realtek UNDI driver (RtkUndiDxe) for RTL8168/8111 PXE boot. When enabled, the build passes `-D RTKUNDI_ENABLE=TRUE` to the EDK2 build; the EDK2 fork must have the FDF block for RtkUndiDxe wrapped in `!if $(RTKUNDI_ENABLE) == TRUE` for this to take effect.

This is needed for devices like **Acer CXI4** (Google Kaisa/Puff) that use RTL8168 and need PXE from the EDK2 payload.

## Changes

- **payloads/external/edk2/Kconfig**: New option `EDK2_RTKUNDI_DRIVER` (bool, depends on `EDK2_NETWORK_PXE_SUPPORT`, default y). Help text explains the requirement for the EDK2 fork (RtkUndiDxe.efi and FDF conditional).
- **payloads/external/edk2/Makefile**: When `CONFIG_EDK2_RTKUNDI_DRIVER=y`, append `-D RTKUNDI_ENABLE=TRUE` to `BUILD_STR` so EDK2 FDF can conditionally include RtkUndiDxe.
- **configs/cml/config.kaisa.uefi**: Enable `CONFIG_EDK2_RTKUNDI_DRIVER=y` for Kaisa (Acer CXI4).

## Testing

- Build with `CONFIG_EDK2_RTKUNDI_DRIVER=y`: EDK2 build receives `RTKUNDI_ENABLE=TRUE`; with an EDK2 fork that has the conditional FDF, RtkUndiDxe.efi is included in the payload.
- Build with `CONFIG_EDK2_RTKUNDI_DRIVER=n`: No `RTKUNDI_ENABLE` passed; RtkUndiDxe is not included (when EDK2 FDF uses the conditional).

Tested on Google Kaisa (Acer CXI4) with EDK2 payload and RTL8168 PXE.

jackadam1981 and others added 4 commits February 1, 2026 15:20
- Kconfig: add EDK2_RTKUNDI_DRIVER, pass -D RTKUNDI_ENABLE=TRUE when enabled
- Makefile: add RTKUNDI_ENABLE to BUILD_STR when CONFIG_EDK2_RTKUNDI_DRIVER=y
- config.kaisa.uefi: enable CONFIG_EDK2_RTKUNDI_DRIVER for Kaisa (RTL8168 PXE)

Co-authored-by: Cursor <cursoragent@cursor.com>
- CONFIG_EC_FOR_CHROMEBOX: on MINIPC hide AC adapter, battery, Chromebook EC Bus,
  keyboard and vbtn (_STA returns 0) to reduce clutter in device manager
- CONFIG_SOC_INTEL_HIDE_EMMC: on MINIPC hide eMMC (ACPI _STA=0 + FSP ScsEmmcEnabled=0)
  so Windows/Linux show only one SD host controller (TF slot SDXC)
- config.kaisa.uefi enables both options

Co-authored-by: Cursor <cursoragent@cursor.com>
outl(0x8000f0f4, io_base + ERIAR);
break;
case 9:
case 21:
Copy link
Owner

Choose a reason for hiding this comment

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

what's this about?

select RT8168_GEN_ACPI_POWER_RESOURCE
select RT8168_GET_MAC_FROM_VPD
select RT8168_SET_LED_MODE
select RT8168_PUT_MAC_TO_ERI
Copy link
Owner

Choose a reason for hiding this comment

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

why is this needed?

This will enable a workaround in ASL _PS3 and _PS0 methods to force
SD_PWR_ENABLE to stay low in D3.

config SOC_INTEL_HIDE_EMMC
Copy link
Owner

Choose a reason for hiding this comment

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

this seems like a suboptimal way to hide unused devices. A better way is to detect presence at runtime and set the ACPI _STA accordingly.

is the extra controller in Device Manager really problematic? Most Puff-based Chromeboxes have SKUs with eMMC or NVMe, so you'd have to build this per device.

config EC_FOR_CHROMEBOX
depends on SYSTEM_TYPE_MINIPC
bool "Hide AC adapter, battery, Chromebook EC Bus and keyboard/vbtn ACPI devices on mini PC"
default y
Copy link
Owner

Choose a reason for hiding this comment

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

default Y means selected unless specifically un-set - we definitely don't want this

Enable EDK2's built-in PXE network boot support. This uses EDK2's native
Simple Network Protocol (SNP) implementation for network booting.

When enabled, EDK2_LOAD_OPTION_ROMS, EDK2_BOOT_TIMEOUT, EDK2_BOOT_MANAGER_ESCAPE
Copy link
Owner

Choose a reason for hiding this comment

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

what do these have do do with network support?


config EDK2_CUSTOM_BUILD_PARAMS
string "edk2 additional custom build parameters"
default "-D NETWORK_DRIVER_ENABLE=TRUE -D NETWORK_ENABLE=TRUE -D NETWORK_IP4_ENABLE=TRUE -D NETWORK_IP6_ENABLE=FALSE -D NETWORK_PXE_BOOT_ENABLE=TRUE -D NETWORK_HTTP_BOOT_ENABLE=FALSE -D NETWORK_SNP_ENABLE=TRUE -D NETWORK_TLS_ENABLE=FALSE -D NETWORK_ISCSI_ENABLE=FALSE" if EDK2_NETWORK_PXE_SUPPORT
Copy link
Owner

Choose a reason for hiding this comment

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

I don't know why you'd set all these here rather than conditionally in the edk2 makefile.

this option is really for ad-hoc testing, not for selectable options

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