Home | History | Annotate | Line # | Download | only in amdgpu
amdgpu2netbsd revision 1.1
      1 #!/bin/sh
      2 
      3 #	$NetBSD: amdgpu2netbsd,v 1.1 2018/08/27 14:02:32 riastradh Exp $
      4 #
      5 # $ /path/to/amdgpu2netbsd > /path/to/files.amdgpu.new
      6 #
      7 # Run from the top-level amd/amdgpu source directory.
      8 
      9 set -Ceu
     10 
     11 # Location of the amdgpu sources relative to $NETBSDSRCDIR.
     12 amdgpu_top=external/bsd/drm2/dist/drm/amd/amdgpu
     13 
     14 # config(5) flag for the amdgpu driver.
     15 amdgpu_flag=amdgpu
     16 
     17 env CONFIG_ACPI=y \
     18 env src=. \
     19 make -f Makefile -V '$(amdgpu-y)' \
     20 | tr ' ' '\n' \
     21 | grep -v '^$' \
     22 | sed -e 's,\.o$,.c,' \
     23 | sort -u \
     24 | while read f; do
     25 	printf 'file\t%s\t%s\n' "$amdgpu_top/$f" "$amdgpu_flag"
     26 done
     27