drm2netbsd revision 1.2
11.1Sriastrad#!/bin/sh
21.1Sriastrad
31.1Sriastrad#	$NetBSD: drm2netbsd,v 1.2 2018/08/27 07:54:28 riastradh Exp $
41.1Sriastrad#
51.1Sriastrad# $ /path/to/drm2netbsd > /path/to/files.drm.new
61.1Sriastrad#
71.1Sriastrad# Run from the directory that came from drivers/gpu/drm.
81.1Sriastrad
91.1Sriastradset -Ceu
101.1Sriastrad
111.1Sriastrad# Location of the DRMKMS sources relative to $NETBSDSRCDIR.
121.1Sriastraddrmkms_top=external/bsd/drm2/dist/drm
131.1Sriastrad
141.1Sriastrad# config(5) flag for the DRMKMS driver.
151.1Sriastraddrmkms_flag=drmkms
161.1Sriastrad
171.1Sriastradenv CONFIG_PCI=y \
181.1Sriastradenv CONFIG_AGP=y \
191.2Sriastradenv CONFIG_DRM_FBDEV_EMULATION=y \
201.1Sriastradmake -f Makefile -V '$(drm-y)' -V '$(drm_kms_helper-y)' \
211.1Sriastrad| tr ' ' '\n' \
221.1Sriastrad| grep -v '^$' \
231.1Sriastrad| sed -e 's,\.o$,.c,' \
241.1Sriastrad| sort -u \
251.1Sriastrad| while read f; do
261.1Sriastrad	printf 'file\t%s\t%s\n' "$drmkms_top/$f" "$drmkms_flag"
271.1Sriastraddone
28