1#!/bin/sh 2 3# $NetBSD: drm2netbsd,v 1.5 2021/12/19 10:46:17 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 \ 20env CONFIG_DRM_GEM_CMA_HELPER=y \ 21env CONFIG_DRM_PANEL=y \ 22env CONFIG_DRM_VM=y \ 23make -f Makefile -V '$(drm-y)' -V '$(drm_kms_helper-y)' \ 24| tr ' ' '\n' \ 25| grep -v '^$' \ 26| { 27 sed -e 's,\.o$,.c,' 28 # Separate objects. 29 echo drm_panel_orientation_quirks.c 30} | sort -u \ 31| while read f; do 32 printf 'file\t%s\t%s\n' "$drmkms_top/$f" "$drmkms_flag" 33done 34