#!/bin/sh set -e #set -x printf "Script expects to run from src/\n" test -e sys/conf/NOTES NOW="20210904" case "${NOW}" in "") NOW=`date +%s` ;; esac BURL="https://people.freebsd.org/~bz/wireless" LINUXKPITAR=linuxkpi-latest.tar IWLWIFITAR=iwlwifi-latest.tar RTW88TAR=rtw88-latest.tar NET80211PATCH=net80211-latest.diff BUILDPATCH=build-latest.diff printf "Fetching patches and tarballs ...\n" for f in ${LINUXKPITAR} ${IWLWIFITAR} ${RTW88TAR} ${NET80211PATCH} ${BUILDPATCH}; do if test ! -f ${NOW}-${f}; then fetch -o ${NOW}-${f} ${BURL}/${f} fi done printf "Applying changes related to net80211 ...\n" patch -C -s -p0 < ${NOW}-${NET80211PATCH} patch -s -p0 < ${NOW}-${NET80211PATCH} printf "Applying changes to the build system ...\n" patch -C -s -p0 < ${NOW}-${BUILDPATCH} patch -s -p0 < ${NOW}-${BUILDPATCH} # Extract the tarball with new files (also overwriting some). printf "Extracting iwlwifi tarball with driver and firmware ...\n" tar -xpf ${NOW}-${IWLWIFITAR} printf "Extracting rtw88 tarball with driver and firmware ...\n" tar -xpf ${NOW}-${RTW88TAR} printf "Extracting linuxkpi tarball with new files (possibly overwriting) ...\n" tar -xpf ${NOW}-${LINUXKPITAR} # end