1
0
mirror of https://github.com/rancher/os-kernel.git synced 2025-09-01 04:46:52 +00:00

Package more kernel firmware

This commit is contained in:
Darren Shepherd
2015-10-01 08:43:09 -07:00
parent 7a43669aed
commit 05b74c7c8d
3 changed files with 97 additions and 4 deletions

View File

@@ -117,3 +117,35 @@ list_build_files() {
find ./arch/${SRCARCH} -name module.lds -o -name Kbuild.platforms -o -name Platform
find . -name Module.symvers -type f
}
create_firmware_tar() {
local list=$1
local temp=firmware-temp
rm -rf $temp
mkdir -p $temp
tar xf linux*.tar -C $temp
if [ ! -e linux-firmware ]; then
git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
fi
(
cd linux-firmware
git rev-parse HEAD > .git-commit
)
echo .git-commit > files
for i in $(<$list); do
if [ ! -e $temp/lib/firmware/$i ]; then
if [ -e linux-firmware/$i ]; then
echo Found $i
echo $i >> files
else
echo Not found $i
fi
fi
done
tar cf firmware.tar --transform 's,^,lib/firmware/,' -C linux-firmware $(<files)
}