1 #!/bin/sh 2 3 # $NetBSD: drm2netbsd,v 1.3 2021/12/19 00:25:13 riastradh Exp $ 4 # 5 # $ /path/to/drm2netbsd > /path/to/files.drm.new 6 # 7 # Run from the directory that came from drivers/gpu/drm. 8 9 set -Ceu 10 11 # Location of the DRMKMS sources relative to $NETBSDSRCDIR. 12 drmkms_top=external/bsd/drm2/dist/drm 13 14 # config(5) flag for the DRMKMS driver. 15 drmkms_flag=drmkms 16 17 env CONFIG_PCI=y \ 18 env CONFIG_AGP=y \ 19 env CONFIG_DRM_FBDEV_EMULATION=y \ 20 env CONFIG_DRM_VM=y \ 21 make -f Makefile -V '$(drm-y)' -V '$(drm_kms_helper-y)' \ 22 | tr ' ' '\n' \ 23 | grep -v '^$' \ 24 | sed -e 's,\.o$,.c,' \ 25 | sort -u \ 26 | while read f; do 27 printf 'file\t%s\t%s\n' "$drmkms_top/$f" "$drmkms_flag" 28 done 29