Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

#!/bin/sh

#	$NetBSD: drm2netbsd,v 1.5 2021/12/19 10:46:17 riastradh Exp $
#
# $ /path/to/drm2netbsd > /path/to/files.drm.new
#
# Run from the directory that came from drivers/gpu/drm.

set -Ceu

# Location of the DRMKMS sources relative to $NETBSDSRCDIR.
drmkms_top=external/bsd/drm2/dist/drm

# config(5) flag for the DRMKMS driver.
drmkms_flag=drmkms

env CONFIG_PCI=y \
env CONFIG_AGP=y \
env CONFIG_DRM_FBDEV_EMULATION=y \
env CONFIG_DRM_GEM_CMA_HELPER=y \
env CONFIG_DRM_PANEL=y \
env CONFIG_DRM_VM=y \
make -f Makefile -V '$(drm-y)' -V '$(drm_kms_helper-y)' \
| tr ' ' '\n' \
| grep -v '^$' \
| {
	sed -e 's,\.o$,.c,'
	# Separate objects.
	echo drm_panel_orientation_quirks.c
} | sort -u \
| while read f; do
	printf 'file\t%s\t%s\n' "$drmkms_top/$f" "$drmkms_flag"
done