Load vendor firmware via direct search path instead of userspace fallback
This commit is contained in:
parent
8367f92800
commit
fe33823572
2 changed files with 20 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue