mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Use extension for Lima X.Org serverflags
* Remove create_desktop_package.sh for rk3318 board from config/optional, clearing the whole directory tree * Add an extension to implement serverflags workaround for X.Org and Lima driver not being autodetected * Fix rk3318-box and rk322x family to use extension in place of 40-serverflags.conf bsp file
This commit is contained in:
@@ -10,6 +10,8 @@ BOOT_SCENARIO="tpl-blob-atf-mainline"
|
|||||||
DDR_BLOB="rk33/rk3318_ddr_333Mhz_v1.16.bin"
|
DDR_BLOB="rk33/rk3318_ddr_333Mhz_v1.16.bin"
|
||||||
BOOT_SOC="rk3328"
|
BOOT_SOC="rk3328"
|
||||||
|
|
||||||
|
enable_extension xorg-lima-serverflags
|
||||||
|
|
||||||
function post_family_tweaks_bsp__rk3318-box() {
|
function post_family_tweaks_bsp__rk3318-box() {
|
||||||
display_alert "Installing BSP firmware and fixups"
|
display_alert "Installing BSP firmware and fixups"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
# Fix for bad device detection for x.org when lima driver is in use
|
|
||||||
if [[ "$BRANCH" != "legacy" ]]; then
|
|
||||||
mkdir -p $destination/etc/X11/xorg.conf.d
|
|
||||||
cp $SRC/packages/bsp/rk3328/40-serverflags.conf $destination/etc/X11/xorg.conf.d
|
|
||||||
fi
|
|
||||||
|
|
||||||
# @TODO: @paolosabatino: this is no longer included in aggregation; it will have to be handled in some kind of extension
|
|
||||||
@@ -16,6 +16,10 @@ BOOTPATCHDIR='v2022.04'
|
|||||||
ARCH=armhf
|
ARCH=armhf
|
||||||
SERIALCON=ttyS2
|
SERIALCON=ttyS2
|
||||||
|
|
||||||
|
# enable extension to fix autodetection for Lima driver and x.org
|
||||||
|
# on non-legacy kernels
|
||||||
|
enable_extension xorg-lima-serverflags
|
||||||
|
|
||||||
case $BRANCH in
|
case $BRANCH in
|
||||||
|
|
||||||
legacy)
|
legacy)
|
||||||
@@ -173,10 +177,4 @@ family_tweaks_bsp() {
|
|||||||
# Board selection script
|
# Board selection script
|
||||||
install -m 755 $SRC/packages/bsp/rk322x/rk322x-config $destination/usr/sbin
|
install -m 755 $SRC/packages/bsp/rk322x/rk322x-config $destination/usr/sbin
|
||||||
|
|
||||||
# Fix for bad device detection for x.org when lima driver is in use
|
|
||||||
if [[ "$BRANCH" != "legacy" ]]; then
|
|
||||||
mkdir -p $destination/etc/X11/xorg.conf.d
|
|
||||||
cp $SRC/packages/bsp/rk322x/40-serverflags.conf $destination/etc/X11/xorg.conf.d
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
34
extensions/xorg-lima-serverflags.sh
Normal file
34
extensions/xorg-lima-serverflags.sh
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
# Copyright (c) 2023 Armbian
|
||||||
|
# This file is a part of the Armbian Build Framework https://github.com/armbian/build/
|
||||||
|
#
|
||||||
|
|
||||||
|
# Install 40-serverflags.conf in xorg.conf.d directory because autodetection
|
||||||
|
# may be faulty on some x.org revisions.
|
||||||
|
function post_family_tweaks_bsp__install_lima_serverflags() {
|
||||||
|
|
||||||
|
display_alert "${EXTENSION} ${BOARD}" "adding lima x.org serverflags workaround to BSP" "info"
|
||||||
|
|
||||||
|
declare xorg_conf_dir="/etc/X11/xorg.conf.d"
|
||||||
|
declare conf_lima_file="40-serverflags.conf"
|
||||||
|
run_host_command_logged mkdir -pv "${destination}${xorg_conf_dir}"
|
||||||
|
|
||||||
|
cat <<- LIMA_SERVERFLAGS > "${destination}${xorg_conf_dir}/${conf_lima_file}"
|
||||||
|
Section "ServerFlags"
|
||||||
|
Option "AutoAddGPU" "off"
|
||||||
|
Option "Debug" "dmabuf_capable"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "OutputClass"
|
||||||
|
Identifier "Lima"
|
||||||
|
Driver "modesetting"
|
||||||
|
MatchDriver "rockchip"
|
||||||
|
Option "AccelMethod" "glamor"
|
||||||
|
Option "PrimaryGPU" "true"
|
||||||
|
EndSection
|
||||||
|
LIMA_SERVERFLAGS
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
Section "ServerFlags"
|
|
||||||
Option "AutoAddGPU" "off"
|
|
||||||
Option "Debug" "dmabuf_capable"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "OutputClass"
|
|
||||||
Identifier "Lima"
|
|
||||||
Driver "modesetting"
|
|
||||||
MatchDriver "rockchip"
|
|
||||||
Option "AccelMethod" "glamor"
|
|
||||||
Option "PrimaryGPU" "true"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
Section "ServerFlags"
|
|
||||||
Option "AutoAddGPU" "off"
|
|
||||||
Option "Debug" "dmabuf_capable"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Section "OutputClass"
|
|
||||||
Identifier "Lima"
|
|
||||||
Driver "modesetting"
|
|
||||||
MatchDriver "rockchip"
|
|
||||||
Option "AccelMethod" "glamor"
|
|
||||||
Option "PrimaryGPU" "true"
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user