amdgpu2netbsd revision 1.1
11.1Sriastrad#!/bin/sh
21.1Sriastrad
31.1Sriastrad#	$NetBSD: amdgpu2netbsd,v 1.1 2018/08/27 14:02:32 riastradh Exp $
41.1Sriastrad#
51.1Sriastrad# $ /path/to/amdgpu2netbsd > /path/to/files.amdgpu.new
61.1Sriastrad#
71.1Sriastrad# Run from the top-level amd/amdgpu source directory.
81.1Sriastrad
91.1Sriastradset -Ceu
101.1Sriastrad
111.1Sriastrad# Location of the amdgpu sources relative to $NETBSDSRCDIR.
121.1Sriastradamdgpu_top=external/bsd/drm2/dist/drm/amd/amdgpu
131.1Sriastrad
141.1Sriastrad# config(5) flag for the amdgpu driver.
151.1Sriastradamdgpu_flag=amdgpu
161.1Sriastrad
171.1Sriastradenv CONFIG_ACPI=y \
181.1Sriastradenv src=. \
191.1Sriastradmake -f Makefile -V '$(amdgpu-y)' \
201.1Sriastrad| tr ' ' '\n' \
211.1Sriastrad| grep -v '^$' \
221.1Sriastrad| sed -e 's,\.o$,.c,' \
231.1Sriastrad| sort -u \
241.1Sriastrad| while read f; do
251.1Sriastrad	printf 'file\t%s\t%s\n' "$amdgpu_top/$f" "$amdgpu_flag"
261.1Sriastraddone
27