drm/radeon: Bring in new firmware
[dragonfly.git] / sys / dev / drm / radeonfw / gen-makefiles
CommitLineData
0dace59e 1#!/bin/sh
0dace59e
FT
2
3set -e
4
5scriptdir=$(cd $(dirname $0) && pwd)
b29f78b5 6fwdir=$scriptdir/../../../contrib/dev/drm/radeonfw
0dace59e
FT
7
8for dir in $scriptdir/*; do
9 if [ ! -d $dir ]; then
10 continue
11 fi
12 rm -rf $dir
13done
14
15for file in $fwdir/*.uu; do
16 img=$(basename $file)
17 img=${img%.bin.uu}
18 echo "Image: $img"
19
20 mkdir -p $scriptdir/$img
21 cat > $scriptdir/$img/Makefile <<EOF
b29f78b5 22# \$FreeBSD: head/sys/modules/drm2/radeonkmsfw/$img/Makefile 254885 2013-08-25 19:37:15Z dumbbell $
0dace59e
FT
23
24KMOD= radeonkmsfw_$img
25IMG= $img
26
27.include <bsd.kmod.mk>
28EOF
29done
b29f78b5
MN
30
31rm $scriptdir/Makefile
32echo "SUBDIR=\t\t\t\t\t\t\t\t\t\\" >> $scriptdir/Makefile
33
34for dir in $scriptdir/*; do
35 if [ ! -d $dir ]; then
36 continue
37 fi
38 img=$(basename $dir)
39 img=${img%.bin.uu}
40 echo "\t$img\t\t\t\t\t\t\t\\" >> $scriptdir/Makefile
41done
42
43echo >> $scriptdir/Makefile
44echo ".include <bsd.subdir.mk>" >> $scriptdir/Makefile