archboot/usr/lib/initcpio/install/archboot_firmware
Tobias Powalowski b0c6a6acd0 cleanup firmware
2023-05-03 07:19:30 +02:00

21 lines
612 B
Bash

#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-only
# Created by Tobias Powalowski <tpowa@archlinux.org>
build ()
{
# add firmware files and licenses
map add_full_dir "/lib/firmware" "/usr/share/licenses/linux-firmware"
# remove not used firmware
rm -rf ${BUILDROOT}/lib/firmware/{v4l*,dvb*,bnx2,cxgb*,sb16,yamaha}
find ${BUILDROOT}/lib/firmware -type f -name "*txt*" -exec rm {} \;
find ${BUILDROOT}/lib/firmware -type f -name "*README*" -exec rm {} \;
}
help ()
{
cat<<HELPEOF
This hook includes linux-firmware on an archboot image.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et: