diff --git a/arch/arm64/configs/tart_defconfig b/arch/arm64/configs/tart_defconfig index 5ab5b3a4d..b6b326d8a 100644 --- a/arch/arm64/configs/tart_defconfig +++ b/arch/arm64/configs/tart_defconfig @@ -2114,17 +2114,15 @@ CONFIG_FW_LOADER=y CONFIG_FW_LOADER_DEBUG=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y -# Firmware loaded by Android from vendor partition at runtime, not embedded. -# Android's ueventd serves firmware from its firmware_directories (which include -# /vendor/firmware) via the kernel's sysfs userspace-helper fallback. This is -# required because the kernel's built-in fw_path[] only covers /lib/firmware* -# (absent on Android) and because built-in drivers (e.g. brcmfmac) request -# firmware before /vendor is mounted -- the fallback's blocking wait bridges -# that gap. Do NOT embed firmware (EXTRA_FIRMWARE) on Android. +# Firmware loaded by Android from the vendor/odm partitions at runtime, not +# embedded. The kernel's fw_path[] is patched (drivers/base/firmware_loader/ +# main.c) to search /vendor/firmware et al. directly, so the userspace-helper +# fallback is intentionally left OFF: enabling it makes firmware requested +# before those partitions are mounted (e.g. GPU/WiFi during early kernel init) +# stall on the 60s loading_timeout instead of failing fast. # CONFIG_EXTRA_FIRMWARE is not set # CONFIG_EXTRA_FIRMWARE_DIR is not set -CONFIG_FW_LOADER_USER_HELPER=y -CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y +# CONFIG_FW_LOADER_USER_HELPER is not set # CONFIG_FW_LOADER_COMPRESS is not set # CONFIG_FW_CACHE is not set CONFIG_FW_UPLOAD=y diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c index cb0912ea3..76135ab7d 100644 --- a/drivers/base/firmware_loader/main.c +++ b/drivers/base/firmware_loader/main.c @@ -474,7 +474,19 @@ static const char * const fw_path[] = { "/lib/firmware/updates/" UTS_RELEASE, "/lib/firmware/updates", "/lib/firmware/" UTS_RELEASE, - "/lib/firmware" + "/lib/firmware", + /* + * Android keeps firmware on the vendor/odm partitions rather than in + * /lib/firmware. Search those directly so the direct firmware loader + * finds them at runtime (once the partitions are mounted) without + * relying on the userspace-helper fallback. Requests issued before + * these partitions are mounted (early kernel init) simply fail fast + * here instead of stalling on the fallback's loading_timeout. + */ + "/vendor/firmware", + "/vendor/etc/firmware", + "/odm/firmware", + "/system/etc/firmware" }; /*