clean up a bit and use plain xorg.conf-files as long as the uci x11 parser is not finished

git-svn-id: svn://svn.openwrt.org/openwrt/packages@15584 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mirko 2009-05-04 13:04:57 +00:00
parent 29f6b33743
commit 3fd564903a
9 changed files with 78 additions and 68 deletions

View File

@ -111,15 +111,20 @@ define Build/Configure
endef
define Package/xserver-common/install
$(INSTALL_DIR) $(1)/etc/{init.d,config}
$(INSTALL_DIR) $(1)/etc/{init.d,config,X11}
$(INSTALL_BIN) \
./files/x.init \
$(1)/etc/init.d/x11
$(if $(X_CONFIG), \
$(INSTALL_DATA) ./files/tmp/x11.uci \
$(1)/etc/config/x11
test -f ./files/config.xorg/$(X_CONFIG) && \
$(INSTALL_DATA) \
./files/config/$(X_CONFIG) \
$(1)/etc/config/x11 \
)
./files/config.xorg/$(X_CONFIG) \
$(1)/etc/X11/xorg.conf
# test -f ./files/config.uci/$(X_CONFIG) && \
# $(INSTALL_DATA) \
# ./files/config.uci/$(X_CONFIG) \
# $(1)/etc/config/x11
endef
define Package/xserver-xorg/install

View File

@ -4,13 +4,10 @@ Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
FontPath "/usr/lib/X11/fonts/misc"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
@ -24,19 +21,20 @@ EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "PS/2"
# Option "Protocol" "IMPS/2"
Option "Device" "/dev/psaux"
# Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
EndSection
Section "Monitor"
@ -56,38 +54,11 @@ EndSection
Section "Device"
Identifier "FBDev"
Driver "fbdev"
#Option "shadowfb" "off"
VideoRam 4096
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
# DefaultDepth 8
DefaultDepth 16
# DefaultDepth 24
SubSection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
EndSubsection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubsection
SubSection "Display"
Depth 24
FbBpp 32
Modes "1024x768" "800x600" "640x480"
EndSubsection
EndSection
Section "DRI"
Group 0
Mode 0666
EndSection

View File

@ -0,0 +1,34 @@
# xorg configuration
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "tslib"
Option "Device" "/dev/event1"
Option "Width" "480"
Option "Height" "640"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "OWRT"
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "glamo"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 16
EndSection

View File

@ -4,28 +4,28 @@ START=99
ARGS=""
screen() {
local cfg="$1"
config_get resolution $cfg resolution
config_get dpi $cfg dpi
[ -n "$resolution" ] && ARGS="$ARGS -screen $resolution"
[ -n "$dpi" ] && ARGS="$ARGS -dpi $dpi"
}
graphic() {
local cfg="$1"
config_get device $cfg device
[ -n "$device" ] && ARGS="$ARGS -fb $device"
}
input() {
local cfg="$1"
config_get device $cfg device
config_get driver $cfg driver
#[ -n "$device" ] || return 0
[ -n "$driver" ] || return 0
ARGS="$ARGS -$cfg $driver,,device=$device"
}
#screen() {
# local cfg="$1"
# config_get resolution $cfg resolution
# config_get dpi $cfg dpi
# [ -n "$resolution" ] && ARGS="$ARGS -screen $resolution"
# [ -n "$dpi" ] && ARGS="$ARGS -dpi $dpi"
#}
#
#graphic() {
# local cfg="$1"
# config_get device $cfg device
# [ -n "$device" ] && ARGS="$ARGS -fb $device"
#}
#
#input() {
# local cfg="$1"
# config_get device $cfg device
# config_get driver $cfg driver
# #[ -n "$device" ] || return 0
# [ -n "$driver" ] || return 0
# ARGS="$ARGS -$cfg $driver,,device=$device"
#}
desktop() {
local cfg="$1"
@ -38,14 +38,14 @@ desktop() {
start() {
export DISPLAY=":0"
config_load x11
config_foreach screen screen
config_foreach graphic graphic
config_foreach input input
# config_foreach screen screen
# config_foreach graphic graphic
# config_foreach input input
Xorg $ARGS &
sleep 1 # give the xserver some time get initialized
config_foreach desktop desktop
test -d /etc/xdg/autostart || exit
sleep 1 # give the first x11 application some time to get present - afterwars we'll start the x11 autostart applications
sleep 1 # give the first x11 application some time to get present - afterwards we'll start the x11 autostart applications
for elem in `ls /etc/xdg/autostart/`; do
if grep "^Hidden=true" "/etc/xdg/autostart/$elem" > /dev/null; then
continue