implement video autoconfig script
This commit is contained in:
74
internal/rootfs/opt/retrodebian/xorg/autoconfig.sh
Normal file
74
internal/rootfs/opt/retrodebian/xorg/autoconfig.sh
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
# autoconfig.sh
|
||||
# search and map pci gpu deviced to xorg modules
|
||||
|
||||
set -eu
|
||||
|
||||
DEST_XORG_CONF="$1"
|
||||
|
||||
[ -n "$DEST_XORG_CONF" ] || exit 2
|
||||
|
||||
pci_line="$(lspci -nnm | grep -F '[0300]' -m 1)" || exit 1
|
||||
|
||||
PCI_ADDR="$(echo "$pci_line" | awk '{print $1}')"
|
||||
PCI_VENDOR_ID="$(echo "$pci_line" | awk -F'[][]' '{print $4}')"
|
||||
PCI_DEVICE_ID="$(echo "$pci_line" | awk -F'[][]' '{print $6}')"
|
||||
|
||||
PCI_VENDOR_NAME="$(echo "$pci_line" | awk -F'"' '{print $4}' | sed 's/ \[[^]]*\]$//')"
|
||||
PCI_DEVICE_NAME="$(echo "$pci_line" | awk -F'"' '{print $6}' | sed 's/ \[[^]]*\]$//')"
|
||||
|
||||
PCI_BUS="$(echo "$PCI_ADDR" | awk -F'[:.]' '{print $1}')"
|
||||
PCI_DEV="$(echo "$PCI_ADDR" | awk -F'[:.]' '{print $2}')"
|
||||
PCI_FUNC="$(echo "$PCI_ADDR" | awk -F'[:.]' '{print $3}')"
|
||||
|
||||
XORG_BUSID="PCI:$((16#$PCI_BUS)):$((16#$PCI_DEV)):$PCI_FUNC"
|
||||
|
||||
echo "GPU detected !"
|
||||
echo " Address : $PCI_ADDR"
|
||||
echo " Vendor : $PCI_VENDOR_NAME [$PCI_VENDOR_ID]"
|
||||
echo " Device : $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
echo " BusID : $XORG_BUSID"
|
||||
|
||||
MATCHED=0
|
||||
|
||||
ROOT_DIR="/opt/retrodebian/xorg"
|
||||
XORG_FILE_BASENAME="xorg.conf"
|
||||
TEMPLATE_XORG_FILE="${XORG_FILE_BASENAME}.template"
|
||||
TMP_XORG_FILE_PATH="$(mktemp)"
|
||||
|
||||
cp "${ROOT_DIR}/${TEMPLATE_XORG_FILE}" "${TMP_XORG_FILE_PATH}"
|
||||
|
||||
for module in "${ROOT_DIR}/video-detect.d/"*.sh; do
|
||||
[ -f "$module" ] || continue
|
||||
|
||||
echo "Trying module: $module"
|
||||
|
||||
if PCI_ADDR="$PCI_ADDR" \
|
||||
PCI_VENDOR_ID="$PCI_VENDOR_ID" \
|
||||
PCI_DEVICE_ID="$PCI_DEVICE_ID" \
|
||||
PCI_VENDOR_NAME="$PCI_VENDOR_NAME" \
|
||||
PCI_DEVICE_NAME="$PCI_DEVICE_NAME" \
|
||||
XORG_BUSID="$XORG_BUSID" \
|
||||
"$module" "${TMP_XORG_FILE_PATH}"
|
||||
then
|
||||
echo "Matched module: $module"
|
||||
MATCHED=1
|
||||
break
|
||||
else
|
||||
rc=$?
|
||||
if [ "$rc" -ne 1 ]; then
|
||||
echo "ERROR: module failed: $module" >&2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceBusID}|$XORG_BUSID|g" \
|
||||
"${TMP_XORG_FILE_PATH}" || exit 2
|
||||
|
||||
[ "$MATCHED" -eq 1 ] || exit 2
|
||||
|
||||
cp -f "${TMP_XORG_FILE_PATH}" "$DEST_XORG_CONF"
|
||||
rm -f "${TMP_XORG_FILE_PATH}"
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# 01000-i810.sh
|
||||
# Intel i810/i815/830M/845G/852GM/855GM/865G family
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "8086" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
7121|7123|7125|1132|3577|3582|358e|2562|2572)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Configuring Intel i810-family for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|i810|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# 01050-i740.sh
|
||||
# Intel i740
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "8086" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
7800)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Configuring Intel i740 for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|i740|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# 1100-3dfx-banshee-voodoo345.sh
|
||||
# match 3dfx cards supported by Xorg tdfx driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "121a" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
0003|0004|0005|0009)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Configuring 3dfx tdfx for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|tdfx|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# 2000-nvidia-generic.sh
|
||||
# match old NVIDIA cards supported by Xorg nv driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "10de" ] || exit 1
|
||||
|
||||
echo "Configuring NVIDIA nv for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|nv|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# 3000-ati-generic.sh
|
||||
# match ATI cards through Xorg ati wrapper
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1002" ] || exit 1
|
||||
|
||||
echo "Configuring ATI ati for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|ati|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# 4000-s3-trio.sh
|
||||
# match S3 Trio family
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "5333" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
8810|8811|8812|8813|8814)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Configuring S3 Trio s3 for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|s3|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# 4100-s3-virge.sh
|
||||
# match S3 ViRGE family
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "5333" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
5631|883d|8a01)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Configuring S3 ViRGE s3virge for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|s3virge|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# 5000-sis-generic.sh
|
||||
# match common SiS families supported by Xorg sis driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1039" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
0200|0300|0310|0325|0330|6306|6325|6326)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Configuring SiS sis for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|sis|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# 6000-matrox-generic.sh
|
||||
# match Matrox cards through Xorg mga driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "102b" ] || exit 1
|
||||
|
||||
echo "Configuring Matrox mga for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|mga|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# 7000-s3-savage-generic.sh
|
||||
# match S3 Savage family through Xorg savage driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "5333" ] || exit 1
|
||||
|
||||
case "$PCI_DEVICE_ID" in
|
||||
8a20|8a21|8a22|8a23|8c10|8c11|8c12|8c13|9102|9104|9105|9106|9107|9110|9111|9112|9113|9120|9121|9122|9123|8d01|8d02|8d03|8d04)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Configuring S3 Savage savage for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|savage|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# 8000-via-generic.sh
|
||||
# match VIA integrated graphics through Xorg via driver
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1106" ] || exit 1
|
||||
|
||||
echo "Configuring VIA via for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|via|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# 9000-rendition-generic.sh
|
||||
# match Rendition cards
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1163" ] || exit 1
|
||||
|
||||
echo "Configuring Rendition rendition for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|rendition|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09050-trident-generic.sh
|
||||
# Trident generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1023" ] || exit 1
|
||||
|
||||
echo "Configuring Trident trident for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|trident|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09100-tseng-generic.sh
|
||||
# Tseng Labs generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "100c" ] || exit 1
|
||||
|
||||
echo "Configuring Tseng tseng for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|tseng|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09200-rendition-generic.sh
|
||||
# Rendition generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1163" ] || exit 1
|
||||
|
||||
echo "Configuring Rendition rendition for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|rendition|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09300-cirrus-generic.sh
|
||||
# Cirrus Logic generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1013" ] || exit 1
|
||||
|
||||
echo "Configuring Cirrus cirrus for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|cirrus|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09400-chips-generic.sh
|
||||
# Chips and Technologies generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "102c" ] || exit 1
|
||||
|
||||
echo "Configuring Chips chips for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|chips|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09500-siliconmotion-generic.sh
|
||||
# Silicon Motion generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "126f" ] || exit 1
|
||||
|
||||
echo "Configuring Silicon Motion siliconmotion for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|siliconmotion|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09600-neomagic-generic.sh
|
||||
# NeoMagic generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "10c8" ] || exit 1
|
||||
|
||||
echo "Configuring NeoMagic neomagic for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|neomagic|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09700-apm-generic.sh
|
||||
# Alliance ProMotion generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1142" ] || exit 1
|
||||
|
||||
echo "Configuring APM apm for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|apm|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09710-ark-generic.sh
|
||||
# ARK Logic generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "edd8" ] || exit 1
|
||||
|
||||
echo "Configuring ARK ark for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|ark|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# 09720-glint-generic.sh
|
||||
# 3Dlabs / GLINT / Permedia generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
case "$PCI_VENDOR_ID" in
|
||||
3d3d|104c)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Configuring GLINT glint for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|glint|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09730-i128-generic.sh
|
||||
# Number Nine Imagine 128 generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "105d" ] || exit 1
|
||||
|
||||
echo "Configuring i128 for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|i128|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09740-cyrix-generic.sh
|
||||
# Cyrix / MediaGX / GXm generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "1078" ] || exit 1
|
||||
|
||||
echo "Configuring Cyrix cyrix for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|cyrix|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# 09750-nsc-generic.sh
|
||||
# National Semiconductor / Geode generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
case "$PCI_VENDOR_ID" in
|
||||
100b|1078)
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Configuring NSC nsc for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|nsc|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 09800-vmware-generic.sh
|
||||
# VMware SVGA generic
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
[ "$PCI_VENDOR_ID" = "15ad" ] || exit 1
|
||||
|
||||
echo "Configuring VMware vmware for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i -e 's|{DeviceDriver}|vmware|g' "$XORG_CONF" || exit 2
|
||||
exit 0
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
# 09980-fbdev-fallback.sh
|
||||
# framebuffer fallback, only if a Linux framebuffer is actually available
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
# Need a real framebuffer device
|
||||
[ -c /dev/fb0 ] || exit 1
|
||||
[ -r /proc/fb ] || exit 1
|
||||
grep -q . /proc/fb || exit 1
|
||||
|
||||
echo "Configuring fbdev fallback for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e 's|{DeviceDriver}|fbdev|g' \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# 9999-vesa-fallback.sh
|
||||
# generic fallback, always matches
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
echo "Configuring generic vesa fallback for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|vesa|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# 99999-vga-fallback.sh
|
||||
# ultimate fallback
|
||||
|
||||
XORG_CONF="$1"
|
||||
|
||||
[ -n "$XORG_CONF" ] || exit 2
|
||||
[ -f "$XORG_CONF" ] || exit 2
|
||||
|
||||
echo "Configuring ultimate VGA fallback for $PCI_DEVICE_NAME [$PCI_DEVICE_ID]"
|
||||
|
||||
sed -i \
|
||||
-e "s|{DeviceDriver}|vga|g" \
|
||||
"$XORG_CONF" || exit 2
|
||||
|
||||
exit 0
|
||||
119
internal/rootfs/opt/retrodebian/xorg/xorg.conf.template
Normal file
119
internal/rootfs/opt/retrodebian/xorg/xorg.conf.template
Normal file
@@ -0,0 +1,119 @@
|
||||
Section "Files"
|
||||
#__TAG__AUTOCONFIG_FILES__START__
|
||||
FontPath "/usr/share/fonts/X11/misc"
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/misc"
|
||||
FontPath "/usr/share/fonts/X11/cyrillic"
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/cyrillic"
|
||||
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
|
||||
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
|
||||
FontPath "/usr/share/fonts/X11/Type1"
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/Type1"
|
||||
FontPath "/usr/share/fonts/X11/100dpi"
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/100dpi"
|
||||
FontPath "/usr/share/fonts/X11/75dpi"
|
||||
FontPath "/usr/X11R6/lib/X11/fonts/75dpi"
|
||||
# path to defoma fonts
|
||||
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
|
||||
#__TAG__AUTOCONFIG_FILES__END__
|
||||
EndSection
|
||||
|
||||
Section "Module"
|
||||
#__TAG__AUTOCONFIG_MODULE__START__
|
||||
Load "i2c"
|
||||
Load "bitmap"
|
||||
Load "ddc"
|
||||
Load "dri"
|
||||
Load "extmod"
|
||||
Load "freetype"
|
||||
Load "glx"
|
||||
Load "int10"
|
||||
Load "vbe"
|
||||
#__TAG__AUTOCONFIG_MODULE__END__
|
||||
EndSection
|
||||
|
||||
Section "InputDevice"
|
||||
#__TAG__AUTOCONFIG_INPUTDEVICE_KEYB__START__
|
||||
Identifier "Generic Keyboard"
|
||||
Driver "kbd"
|
||||
Option "CoreKeyboard"
|
||||
Option "XkbRules" "xorg"
|
||||
Option "XkbModel" "pc105"
|
||||
Option "XkbLayout" "us"
|
||||
#__TAG__AUTOCONFIG_INPUTDEVICE_KEYB__END__
|
||||
EndSection
|
||||
|
||||
Section "InputDevice"
|
||||
#__TAG__AUTOCONFIG_INPUTDEVICE_MOUSE__START__
|
||||
Identifier "Configured Mouse"
|
||||
Driver "mouse"
|
||||
Option "CorePointer"
|
||||
Option "Device" "/dev/input/mice"
|
||||
Option "Protocol" "ImPS/2"
|
||||
Option "Emulate3Buttons" "true"
|
||||
#__TAG__AUTOCONFIG_INPUTDEVICE_MOUSE__END__
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
#__TAG__AUTOCONFIG_DEVICE__START__
|
||||
Identifier "Generic Video Card"
|
||||
Driver "{DeviceDriver}"
|
||||
BusID "{DeviceBusID}"
|
||||
#__TAG__AUTOCONFIG_DEVICE__END__
|
||||
EndSection
|
||||
|
||||
Section "Monitor"
|
||||
#__TAG__AUTOCONFIG_MONITOR__START__
|
||||
Identifier "Generic Monitor"
|
||||
Option "DPMS"
|
||||
HorizSync 28-51
|
||||
VertRefresh 43-60
|
||||
#__TAG__AUTOCONFIG_MONITOR__END__
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
#__TAG__AUTOCONFIG_SCREEN__START__
|
||||
Identifier "Default Screen"
|
||||
Device "Generic Video Card"
|
||||
Monitor "Generic Monitor"
|
||||
DefaultDepth 24
|
||||
SubSection "Display"
|
||||
Depth 1
|
||||
Modes "1024x768" "800x600" "640x480"
|
||||
EndSubSection
|
||||
SubSection "Display"
|
||||
Depth 4
|
||||
Modes "1024x768" "800x600" "640x480"
|
||||
EndSubSection
|
||||
SubSection "Display"
|
||||
Depth 8
|
||||
Modes "1024x768" "800x600" "640x480"
|
||||
EndSubSection
|
||||
SubSection "Display"
|
||||
Depth 15
|
||||
Modes "1024x768" "800x600" "640x480"
|
||||
EndSubSection
|
||||
SubSection "Display"
|
||||
Depth 16
|
||||
Modes "1024x768" "800x600" "640x480"
|
||||
EndSubSection
|
||||
SubSection "Display"
|
||||
Depth 24
|
||||
Modes "1024x768" "800x600" "640x480"
|
||||
EndSubSection
|
||||
#__TAG__AUTOCONFIG_SCREEN__END__
|
||||
EndSection
|
||||
|
||||
Section "ServerLayout"
|
||||
#__TAG__AUTOCONFIG_SERVERLAYOUT__START__
|
||||
Identifier "Default Layout"
|
||||
Screen "Default Screen"
|
||||
InputDevice "Generic Keyboard"
|
||||
InputDevice "Configured Mouse"
|
||||
#__TAG__AUTOCONFIG_SERVERLAYOUT__END__
|
||||
EndSection
|
||||
|
||||
Section "DRI"
|
||||
Mode 0666
|
||||
EndSection
|
||||
Reference in New Issue
Block a user