diff options
author | Simon Rettberg | 2018-09-12 16:04:54 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-09-12 16:04:54 +0200 |
commit | 4beee53195a65839f4d8f269bbba959783933cf4 (patch) | |
tree | 0f88497796976dd66a3da7c4aab4855a08a8571b /core/rootfs/rootfs-stage31/module.build | |
parent | [rfs32] setup_partitons: More agressive udev-settle timeout (diff) | |
download | mltk-4beee53195a65839f4d8f269bbba959783933cf4.tar.gz mltk-4beee53195a65839f4d8f269bbba959783933cf4.tar.xz mltk-4beee53195a65839f4d8f269bbba959783933cf4.zip |
[rfs31/nvidia] Use drm.cfg.d machanism
Diffstat (limited to 'core/rootfs/rootfs-stage31/module.build')
-rw-r--r-- | core/rootfs/rootfs-stage31/module.build | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/rootfs/rootfs-stage31/module.build b/core/rootfs/rootfs-stage31/module.build index e9e9a979..49377a90 100644 --- a/core/rootfs/rootfs-stage31/module.build +++ b/core/rootfs/rootfs-stage31/module.build @@ -22,16 +22,17 @@ build() { # generate drm module loading database pinfo "Generating PCI ID database for DRM drivers" local DRM_MODULES="$KERNEL_BASE_DIR/lib/modules/$TARGET_KERNEL_LONG/kernel/drivers/gpu/drm" - local PCI_FILE="$MODULE_BUILD_DIR/drm.cfg" + mkdir -p "$MODULE_BUILD_DIR/drm.cfg.d" + local PCI_FILE="$MODULE_BUILD_DIR/drm.cfg.d/99-modinfo" + rm -f -- "$PCI_FILE" [ -d "$DRM_MODULES" ] || perror "DRM dir not found at $DRM_MODULES" - cp "$MODULE_DIR/templates/drm.cfg" "$PCI_FILE" || perror "Could not copy drm.cfg from templates dir" echo "# -- generated from kernel $TARGET_KERNEL_LONG modules:" >> "$PCI_FILE" - for FILE in $(find "$DRM_MODULES" -name "*.ko"); do + for FILE in $(find "$DRM_MODULES" -name "*.ko" | sort -u); do # sort -u is an ugly hack to get amdgpu to take precedence over radeon local MODNAME=$(basename "$FILE") MODNAME=${MODNAME%.ko} [ -z "$MODNAME" ] && perror "$FILE equals empty modname" echo "# $MODNAME" >> "$PCI_FILE" - for ALIAS in $(modinfo "$FILE" | grep '^alias:' | grep -o 'pci:v.*' | tr '[A-F]' '[a-f]'); do + for ALIAS in $(modinfo "$FILE" | grep '^alias:' | grep -o 'pci:v.*' | tr 'A-F' 'a-f'); do VENDOR=$(echo $ALIAS | cut -c 10-13) if [ "x$(echo $ALIAS | cut -c 15)" == "x*" ]; then # device wildcard |