From d2ecacf5a6d11c5b2af714e307300a0167fd5f8c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 3 Aug 2010 10:52:09 -0700 Subject: Find firmware in /lib/firmware/ Update hook-functions to search for kernel firmware based on version. This is copied from Ubuntu version of initramfs-tools. (cherry picked from commit 1236df3c797a0404f7050ed5201118e6fa4841e0) --- hook-functions | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hook-functions b/hook-functions index 90b2ca3..e86f5f2 100644 --- a/hook-functions +++ b/hook-functions @@ -62,13 +62,15 @@ manual_add_modules() continue fi for firmware in $firmwares; do - if [ -e "${DESTDIR}/lib/firmware/${firmware}" ]; then + if [ -e "${DESTDIR}/lib/firmware/${firmware}" ] \ + || [ -e "${DESTDIR}/lib/firmware/${version}/${firmware}" ]; then continue fi # Only print warning for missing fw of loaded module # or forced loaded module - if [ ! -e "/lib/firmware/${firmware}" ]; then + if [ ! -e "/lib/firmware/${firmware}" ] \ + && [ ! -e "/lib/firmware/${version}/${firmware}" ]; then if grep -q "^$(basename "${mam_x}" .ko)" \ /proc/modules \ || grep -q "^$(basename "${mam_x}" .ko)" \ @@ -83,7 +85,11 @@ manual_add_modules() copy_exec /lib/udev/firmware.agent fi - copy_exec "/lib/firmware/${firmware}" + if [ -e "/lib/firmware/${version}/${firmware}" ]; then + copy_exec "/lib/firmware/${version}/${firmware}" + else + copy_exec "/lib/firmware/${firmware}" + fi if [ "${verbose}" = "y" ]; then echo "Adding firmware ${firmware}" fi -- cgit v1.2.3