1#!/bin/sh 2 3# $NetBSD: drm2netbsd,v 1.2 2018/08/27 07:54:28 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 9set -Ceu 10 11# Location of the DRMKMS sources relative to $NETBSDSRCDIR. 12drmkms_top=external/bsd/drm2/dist/drm 13 14# config(5) flag for the DRMKMS driver. 15drmkms_flag=drmkms 16 17env CONFIG_PCI=y \ 18env CONFIG_AGP=y \ 19env CONFIG_DRM_FBDEV_EMULATION=y \ 20make -f Makefile -V '$(drm-y)' -V '$(drm_kms_helper-y)' \ 21| tr ' ' '\n' \ 22| grep -v '^$' \ 23| sed -e 's,\.o$,.c,' \ 24| sort -u \ 25| while read f; do 26 printf 'file\t%s\t%s\n' "$drmkms_top/$f" "$drmkms_flag" 27done 28