diff --git a/packages/linux-firmware/misc-firmware/package.mk b/packages/linux-firmware/misc-firmware/package.mk index b51f83a6ec..b979b72072 100644 --- a/packages/linux-firmware/misc-firmware/package.mk +++ b/packages/linux-firmware/misc-firmware/package.mk @@ -1,19 +1,19 @@ ################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2017-present Team LibreELEC # -# OpenELEC is free software: you can redistribute it and/or modify +# LibreELEC is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # -# OpenELEC is distributed in the hope that it will be useful, +# LibreELEC is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with OpenELEC. If not, see . +# along with LibreELEC. If not, see . ################################################################################ PKG_NAME="misc-firmware" @@ -22,7 +22,7 @@ PKG_ARCH="any" PKG_LICENSE="Free-to-use" PKG_SITE="https://github.com/LibreELEC/misc-firmware" PKG_URL="https://github.com/LibreELEC/misc-firmware/archive/$PKG_VERSION.tar.gz" -PKG_DEPENDS_TARGET="toolchain" +PKG_DEPENDS_TARGET="toolchain x86-firmware" PKG_SECTION="firmware" PKG_SHORTDESC="misc-firmware: firmwares for various drivers" PKG_LONGDESC="misc-firmware: firmwares for various drivers" diff --git a/packages/linux-firmware/x86-firmware/firmwares/any.dat b/packages/linux-firmware/x86-firmware/firmwares/any.dat new file mode 100644 index 0000000000..40303e369f --- /dev/null +++ b/packages/linux-firmware/x86-firmware/firmwares/any.dat @@ -0,0 +1,3 @@ +ar3k/* +ath3k-1.fw +rtl_bt/*_fw.bin diff --git a/packages/linux-firmware/x86-firmware/firmwares/x86_64.dat b/packages/linux-firmware/x86-firmware/firmwares/x86_64.dat new file mode 100644 index 0000000000..0ddb835b28 --- /dev/null +++ b/packages/linux-firmware/x86-firmware/firmwares/x86_64.dat @@ -0,0 +1,6 @@ +e100/*_ucode.bin +intel/dsp_fw_{bxtn,glk,kbl,release}.bin +intel/fw_sst_*.bin* +intel/ibt-*.{ddc,sfi,bseq} +intel/IntcSST2.bin +rtl_nic/*.fw diff --git a/packages/linux-firmware/x86-firmware/package.mk b/packages/linux-firmware/x86-firmware/package.mk index 6397853532..027dbce42d 100644 --- a/packages/linux-firmware/x86-firmware/package.mk +++ b/packages/linux-firmware/x86-firmware/package.mk @@ -17,8 +17,8 @@ ################################################################################ PKG_NAME="x86-firmware" -PKG_VERSION="c4c07a8" -PKG_ARCH="x86_64" +PKG_VERSION="b141345" +PKG_ARCH="any" PKG_LICENSE="other" PKG_SITE="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/" PKG_URL="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/$PKG_VERSION.tar.gz" @@ -39,6 +39,32 @@ make_target() { : } +# Install additional miscellaneous drivers makeinstall_target() { - : + FW_TARGET_DIR=$INSTALL/usr/lib/firmware + + FW_LISTS="${PKG_DIR}/firmwares/any.dat ${PKG_DIR}/firmwares/${TARGET_ARCH}.dat" + FW_LISTS+=" ${PROJECT_DIR}/${PROJECT}/${PKG_NAME}/firmwares/any.dat" + [ -n "${DEVICE}" ] && FW_LISTS+=" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/${PKG_NAME}/firmwares/any.dat" + + for fwlist in ${FW_LISTS}; do + [ -f ${fwlist} ] || continue + while read -r fwline; do + [ -z "${fwline}" ] && continue + [[ ${fwline} =~ ^#.* ]] && continue + [[ ${fwline} =~ ^[[:space:]] ]] && continue + + for fwfile in $(cd ${PKG_BUILD} && eval "find ${fwline}"); do + [ -d ${PKG_BUILD}/${fwfile} ] && continue + + if [ -f ${PKG_BUILD}/${fwfile} ]; then + mkdir -p $(dirname ${FW_TARGET_DIR}/${fwfile}) + cp -Lv ${PKG_BUILD}/${fwfile} ${FW_TARGET_DIR}/${fwfile} + else + echo "ERROR: Firmware file ${fwfile} does not exist - aborting" + exit 1 + fi + done + done < ${fwlist} + done }