[PATCH] drm, plymouth, stage2, x11: initial feature drm
Anton Midyukov
antohami at altlinux.org
Tue Sep 8 12:04:55 MSK 2020
The drm feature solves the problem of creating a common entry
point for adding kernel drm modules for different package lists.
The need for allocation into a separate feature arose from one
parties to the need to make a switch between free and proprietary
NVIDIA driver, on the other, because of the need to add only drm
modules kernels for purposes such as use/stage2 /kms and use/plymouth.
Also no more switch needed for RADEON, as only the free video driver
remains.
---
features.in/drm/README | 7 ++++++
features.in/drm/config.mk | 43 ++++++++++++++++++++++++++++++++++
features.in/plymouth/config.mk | 4 ++--
features.in/stage2/config.mk | 3 +--
features.in/x11/config.mk | 25 +++++++++-----------
5 files changed, 64 insertions(+), 18 deletions(-)
create mode 100644 features.in/drm/README
create mode 100644 features.in/drm/config.mk
diff --git a/features.in/drm/README b/features.in/drm/README
new file mode 100644
index 000000000..e365536fd
--- /dev/null
+++ b/features.in/drm/README
@@ -0,0 +1,7 @@
+ФиÑа drm ÑеÑÐ°ÐµÑ Ð·Ð°Ð´Ð°ÑÑ ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð¾Ð±Ñей ÑоÑки вÑ
ода длÑ
+Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ drm-модÑлей ÑдÑа Ð´Ð»Ñ ÑазнÑÑ
ÑпиÑков пакеÑов.
+ÐоÑÑебноÑÑÑ Ð²ÑÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ð² оÑделÑнÑÑ ÑиÑÑ Ð²Ð¾Ð·Ð½Ð¸ÐºÐ»Ð° Ñ Ð¾Ð´Ð½Ð¾Ð¹
+ÑÑоÑÐ¾Ð½Ñ Ð² ÑвÑзи Ñ Ð½ÐµÐ¾Ð±Ñ
одимоÑÑÑÑ ÑделаÑÑ Ð¿ÐµÑеклÑÑаÑелÑ
+Ð¼ÐµÐ¶Ð´Ñ ÑвободнÑм и пÑопÑиеÑаÑнÑм дÑайвеÑом NVIDIA,
+Ñ Ð´ÑÑгой из-за необÑ
одимоÑÑи добавлÑÑÑ ÑолÑко drm-модÑли
+ÑдÑа в ÑакиÑ
ÑелÑÑ
, как use/stage2/kms и use/plymouth.
diff --git a/features.in/drm/config.mk b/features.in/drm/config.mk
new file mode 100644
index 000000000..ade61a006
--- /dev/null
+++ b/features.in/drm/config.mk
@@ -0,0 +1,43 @@
+DRM_KMODULES := drm drm-radeon drm-ancient
+
+use/drm:
+ @$(call add_feature)
+ @$(call add,THE_KMODULES,$$(THE_DRM_KMODULES))
+ @$(call add,THE_KMODULES,$$(THE_NVIDIA_KMODULES))
+ @$(call add,BASE_KMODULES,$$(BASE_DRM_KMODULES))
+ @$(call add,BASE_KMODULES,$$(BASE_NVIDIA_KMODULES))
+ @$(call add,STAGE1_KMODULES,$$(STAGE1_DRM_KMODULES))
+ @$(call add,STAGE1_KMODULES,$$(STAGE1_NVIDIA_KMODULES))
+
+use/drm/nvidia: use/drm
+ @$(call set,THE_NVIDIA_KMODULES,nvidia)
+
+use/drm/nouveau: use/drm
+ @$(call set,THE_NVIDIA_KMODULES,nouveau)
+
+use/drm/free: use/drm/nouveau
+ @$(call add,THE_DRM_KMODULES,$(DRM_KMODULES))
+
+use/drm/non-free: use/drm/free use/drm/nvidia; @:
+
+use/drm/stage2/nvidia: use/drm
+ @$(call set,STAGE1_NVIDIA_KMODULES,nvidia)
+
+use/drm/stage2/nouveau: use/drm
+ @$(call set,STAGE1_NVIDIA_KMODULES,nouveau)
+
+use/drm/stage2/free: use/drm/stage2/nouveau
+ @$(call add,STAGE1_DRM_KMODULES,$(DRM_KMODULES))
+
+use/drm/stage2/non-free: use/drm/stage2/free use/drm/stage2/nvidia; @:
+
+use/drm/base/nvidia: use/drm
+ @$(call set,BASE_NVIDIA_KMODULES,nvidia)
+
+use/drm/base/nouveau: use/drm
+ @$(call set,BASE_NVIDIA_KMODULES,nouveau)
+
+use/drm/base/free: use/drm/base/nouveau
+ @$(call add,BASE_DRM_KMODULES,$(DRM_KMODULES))
+
+use/drm/base/non-free: use/drm/base/free use/drm/base/nvidia; @:
diff --git a/features.in/plymouth/config.mk b/features.in/plymouth/config.mk
index ea6e541b0..3c2cc4ed1 100644
--- a/features.in/plymouth/config.mk
+++ b/features.in/plymouth/config.mk
@@ -36,12 +36,12 @@ else
use/plymouth/vm: use/plymouth; @:
endif
-use/plymouth/base: use/plymouth/stage2 use/plymouth/vm
+use/plymouth/base: use/plymouth/stage2 use/plymouth/vm \
+ use/drm/base/free; @:
ifeq (distro,$(IMAGE_CLASS))
@$(call add,INSTALL2_PACKAGES,installer-feature-setup-plymouth)
endif
@$(call add,BASE_PACKAGES_REGEXP,make-initrd-plymouth cpio)
- @$(call add,BASE_KMODULES_REGEXP,drm.*)
@$(call add,THE_BRANDING,bootsplash)
@$(call add,THE_PACKAGES,make-initrd-plymouth)
diff --git a/features.in/stage2/config.mk b/features.in/stage2/config.mk
index e5d958e68..1e18baa0b 100644
--- a/features.in/stage2/config.mk
+++ b/features.in/stage2/config.mk
@@ -21,8 +21,7 @@ ifeq (,$(filter-out aarch64,$(ARCH)))
endif
@:
-use/stage2/kms: use/stage2/drm
- @$(call add,STAGE1_KMODULES_REGEXP,drm.*)
+use/stage2/kms: use/stage2/drm use/drm/stage2/free; @:
# install mount.cifs to stage1
# NB: there's builtin nfsmount there, no reason for nfs-utils
diff --git a/features.in/x11/config.mk b/features.in/x11/config.mk
index 379121e0a..2d4f6f0b7 100644
--- a/features.in/x11/config.mk
+++ b/features.in/x11/config.mk
@@ -5,19 +5,18 @@
## hardware support
# the very minimal driver set
-use/x11:
+use/x11: use/drm
@$(call add_feature)
@$(call add,THE_LISTS,$(call tags,base xorg))
- @$(call add,THE_KMODULES,drm) # required by recent nvidia.ko as well
- @$(call add,THE_KMODULES,$$(NVIDIA_KMODULES) $$(RADEON_KMODULES))
- @$(call add,THE_PACKAGES,$$(NVIDIA_PACKAGES) $$(RADEON_PACKAGES))
+ @$(call add,THE_DRM_KMODULES,drm) # required by recent nvidia.ko as well
+ @$(call add,THE_PACKAGES,$$(NVIDIA_PACKAGES))
-use/x11/xorg:: use/x11 use/x11/armsoc; @:
+use/x11/xorg:: use/x11 use/x11/armsoc use/drm/free; @:
# x86: free drivers for various hardware (might lack acceleration)
ifeq (,$(filter-out i586 x86_64 aarch64,$(ARCH)))
use/x11/xorg:: use/x11/intel use/x11/nouveau use/x11/radeon use/x11/amdgpu \
- use/x11/armsoc
+ use/x11/armsoc use/drm/free
@$(call add,THE_LISTS,$(call tags,desktop xorg))
endif
@@ -38,7 +37,7 @@ endif
ifeq (,$(filter-out e2k%,$(ARCH)))
# e2k: mostly radeon, 101 got mga2/vivante
-use/x11/xorg:: use/x11/radeon use/x11/amdgpu use/x11/nouveau
+use/x11/xorg:: use/x11/radeon use/x11/amdgpu use/x11/nouveau use/drm/free
ifeq (,$(filter-out e2kv4,$(ARCH)))
use/x11/mga2: use/x11
@@ -59,18 +58,17 @@ endif
use/x11/3d: use/x11/intel use/x11/nvidia/optimus use/x11/radeon; @:
# somewhat lacking compared to radeon but still
-use/x11/nouveau: use/x11 use/firmware
- @$(call set,NVIDIA_KMODULES,drm-nouveau)
+use/x11/nouveau: use/x11 use/firmware use/drm/nouveau
@$(call set,NVIDIA_PACKAGES,xorg-drv-nouveau)
# has performance problems but is getting better, just not there yet
use/x11/radeon: use/x11 use/firmware
- @$(call set,RADEON_KMODULES,drm-radeon)
- @$(call add,RADEON_PACKAGES,xorg-drv-ati xorg-drv-radeon)
+ @$(call add,THE_DRM_KMODULES,drm-radeon)
+ @$(call add,THE_PACKAGES,xorg-drv-ati xorg-drv-radeon)
# here's the future
use/x11/amdgpu: use/x11 use/firmware
- @$(call add,RADEON_PACKAGES,xorg-drv-amdgpu)
+ @$(call add,THE_PACKAGES,xorg-drv-amdgpu)
# Vulkan is new and bleeding edge, only intel and amgpu(pro?)
use/x11/vulkan: use/x11/intel use/x11/amdgpu
@@ -82,8 +80,7 @@ use/x11/glvnd: use/x11
@$(call add,THE_PACKAGES,libglvnd-glx,libglvnd-egl)
# sometimes broken with current xorg-server
-use/x11/nvidia: use/x11
- @$(call set,NVIDIA_KMODULES,nvidia)
+use/x11/nvidia: use/x11 use/drm/nvidia
@$(call set,NVIDIA_PACKAGES,nvidia-settings nvidia-xconfig)
use/x11/nvidia/optimus: use/x11/nvidia
--
2.25.4
--------------7E43CAC1D4AC33277648D1F4--
More information about the devel-distro
mailing list