diff --git a/packages/linux-firmware/kernel-firmware/firmwares/any.dat b/packages/linux-firmware/kernel-firmware/firmwares/any.dat new file mode 100644 index 0000000000..053916a0b4 --- /dev/null +++ b/packages/linux-firmware/kernel-firmware/firmwares/any.dat @@ -0,0 +1,13 @@ +ar3k/* +ath3k-1.fw +rtl_bt/*_fw.bin + +# WLAN firmwares +ath10k/* +ath6k/* +brcm/* +libertas/* +mrvl/* +mwl8k/* +mwlwifi/* +rtlwifi/* diff --git a/packages/linux-firmware/kernel-firmware/firmwares/x86_64.dat b/packages/linux-firmware/kernel-firmware/firmwares/x86_64.dat new file mode 100644 index 0000000000..0ddb835b28 --- /dev/null +++ b/packages/linux-firmware/kernel-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/kernel-firmware/package.mk similarity index 52% rename from packages/linux-firmware/x86-firmware/package.mk rename to packages/linux-firmware/kernel-firmware/package.mk index 6397853532..eced7683c7 100644 --- a/packages/linux-firmware/x86-firmware/package.mk +++ b/packages/linux-firmware/kernel-firmware/package.mk @@ -16,17 +16,17 @@ # along with LibreELEC. If not, see . ################################################################################ -PKG_NAME="x86-firmware" -PKG_VERSION="c4c07a8" -PKG_ARCH="x86_64" +PKG_NAME="kernel-firmware" +PKG_VERSION="df40d15" +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" PKG_SOURCE_DIR="$PKG_VERSION" PKG_DEPENDS_TARGET="toolchain" PKG_SECTION="linux-firmware" -PKG_SHORTDESC="x86-firmware: x86 related firmware" -PKG_LONGDESC="x86-firmware: x86 related firmware" +PKG_SHORTDESC="kernel-firmware: kernel related firmware" +PKG_LONGDESC="kernel-firmware: kernel related firmware" PKG_IS_ADDON="no" PKG_AUTORECONF="no" @@ -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 } diff --git a/packages/linux-firmware/misc-firmware/package.mk b/packages/linux-firmware/misc-firmware/package.mk index b51f83a6ec..077205454b 100644 --- a/packages/linux-firmware/misc-firmware/package.mk +++ b/packages/linux-firmware/misc-firmware/package.mk @@ -1,28 +1,28 @@ ################################################################################ -# 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" -PKG_VERSION="0ed3d22" +PKG_VERSION="9dd2a25" 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 kernel-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/wlan-firmware/package.mk b/packages/linux-firmware/wlan-firmware/package.mk index 297854808f..9db1a4591f 100644 --- a/packages/linux-firmware/wlan-firmware/package.mk +++ b/packages/linux-firmware/wlan-firmware/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="wlan-firmware" -PKG_VERSION="0.0.32" +PKG_VERSION="25d0c93" PKG_ARCH="any" PKG_LICENSE="Free-to-use" PKG_SITE="https://github.com/LibreELEC/wlan-firmware" diff --git a/packages/linux/package.mk b/packages/linux/package.mk index 4a3b329285..a16a958442 100644 --- a/packages/linux/package.mk +++ b/packages/linux/package.mk @@ -71,7 +71,7 @@ PKG_AUTORECONF="no" PKG_MAKE_OPTS_HOST="ARCH=$TARGET_KERNEL_ARCH headers_check" if [ "$TARGET_ARCH" = "x86_64" ]; then - PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET intel-ucode x86-firmware" + PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET intel-ucode kernel-firmware" fi if [ "$BUILD_ANDROID_BOOTIMG" = "yes" ]; then @@ -142,7 +142,7 @@ pre_make_target() { if [ "$TARGET_ARCH" = "x86_64" ]; then # copy some extra firmware to linux tree mkdir -p $PKG_BUILD/external-firmware - cp -a $(get_build_dir x86-firmware)/{amdgpu,amd-ucode,i915,radeon,rtl_nic} $PKG_BUILD/external-firmware + cp -a $(get_build_dir kernel-firmware)/{amdgpu,amd-ucode,i915,radeon,rtl_nic} $PKG_BUILD/external-firmware mkdir -p $PKG_BUILD/external-firmware/intel-ucode cp -a $(get_build_dir intel-ucode)/microcode.bin $PKG_BUILD/external-firmware/intel-ucode