diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-07-26 14:22:32 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-07-26 14:24:40 +0200 |
commit | 09eedb0dccf6879e2104e16b9f4f30e05eb65b4e (patch) | |
tree | e79a6a43fcd6f3d896dcfb72400faeb0d381b998 /packages/linux-kernel/build-linux-firmware.sh | |
parent | 987584e751b9d18f6b112d8d2609ca49f790cfea (diff) | |
download | vyos-build-09eedb0dccf6879e2104e16b9f4f30e05eb65b4e.tar.gz vyos-build-09eedb0dccf6879e2104e16b9f4f30e05eb65b4e.zip |
linux-firmware: T2594: upgrade firmware extraction script
The logic of generating the required firmware file name has been moved from
build-linux-firmware.sh directly into list-required-firmware.py which makes
much more sense. That move was made by Daniil Baturin - I only did the
integration part. Thanks!
Diffstat (limited to 'packages/linux-kernel/build-linux-firmware.sh')
-rwxr-xr-x | packages/linux-kernel/build-linux-firmware.sh | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/packages/linux-kernel/build-linux-firmware.sh b/packages/linux-kernel/build-linux-firmware.sh index 3194aa2c..37a3768a 100755 --- a/packages/linux-kernel/build-linux-firmware.sh +++ b/packages/linux-kernel/build-linux-firmware.sh @@ -30,15 +30,8 @@ fi result=() # Retrieve firmware blobs from source files -for FILE in $(${CWD}/list-required-firmware.py -k ${LINUX_SRC} -c ${CWD}/x86_64_vyos_defconfig -s drivers/net -s drivers/usb); do - cd ${CWD}/${LINUX_SRC} - echo "I: determine required firmware blobs for: ${FILE}" - make LOCALVERSION=${KERNEL_SUFFIX} ${FILE/.c/.i} > /dev/null 2>&1 - - if [ "$?" == "0" ]; then - result+=( $(grep UNIQUE_ID_firmware ${FILE/.c/.i} | cut -d" " -f12- | xargs printf "%s" | sed -e "s/;/ /g") ) - fi -done +cd ${LINUX_SRC} +FW_FILES=$(../list-required-firmware.py -c ../x86_64_vyos_defconfig -s drivers/net 2>/dev/null) # Debian package will use the descriptive Git commit as version GIT_COMMIT=$(cd ${CWD}/${LINUX_FIRMWARE}; git describe --always) @@ -53,11 +46,10 @@ mkdir -p ${VYOS_FIRMWARE_DIR} # Copy firmware file from linux firmware repository into # assembly folder for the vyos-firmware package SED_REPLACE="s@${CWD}/${LINUX_FIRMWARE}/@@" -for FW in ${result[@]}; do - FW_FILE=$(basename $FW) - +for FW_PATH in ${FW_FILES}; do + FW_FILE=$(basename $FW_PATH) res=() - for tmp in $(find ${CWD}/linux-firmware -type f -name ${FW_FILE} | sed -e ${SED_REPLACE} ) + for tmp in $(find ${CWD}/linux-firmware -type f -name ${FW_FILE} | sed -e ${SED_REPLACE}) do res+=( "$tmp" ) done |