Hello

as requested sending the patch to pull the experimental nouveau driver.

Tested on a PC with ION based mainboard (not EeePC).

If the PCI id of the EeePC board differs it should be added in the
xdriver script.

Thanks

Michal
diff --git a/config/chroot_apt/preferences b/config/chroot_apt/preferences
index e83169e..0293044 100644
--- a/config/chroot_apt/preferences
+++ b/config/chroot_apt/preferences
@@ -6,3 +6,6 @@ Package: *
 Pin: release a=unstable
 Pin-Priority: 800
 
+Package: *
+Pin: release a=experimental
+Pin-Priority: 110
diff --git a/config/chroot_local-hooks/nouveau.sh b/config/chroot_local-hooks/nouveau.sh
new file mode 100755
index 0000000..cc13f59
--- /dev/null
+++ b/config/chroot_local-hooks/nouveau.sh
@@ -0,0 +1,19 @@
+mkdir -p nouveau/DEBIAN
+mkdir -p  nouveau/usr/share/doc/linux-nouveau-modules
+echo Empty package to satisfy xserver-xorg-video-nouveau dependencies > nouveau/usr/share/doc/linux-nouveau-modules/dummy.txt
+cat > nouveau/DEBIAN/control <<EOF
+Package: linux-nouveau-modules
+Source: none
+Version: 0
+Maintainer: none
+Architecture: all
+Section: x11
+Priority: extra
+Description: Dummy package
+ Empty package to satisfy xserver-xorg-video-nouveau dependencies.
+EOF
+dpkg-deb -b nouveau
+dpkg -i nouveau.deb
+rm -r nouveau nouveau.deb
+apt-get -yu --no-install-recommends install xserver-xorg-video-nouveau
+update-rc.d  xdriver defaults
diff --git a/config/chroot_local-includes/etc/init.d/xdriver b/config/chroot_local-includes/etc/init.d/xdriver
new file mode 100755
index 0000000..a6035ec
--- /dev/null
+++ b/config/chroot_local-includes/etc/init.d/xdriver
@@ -0,0 +1,90 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: x11-driver-setup
+# Required-Start:    $local_fs $remote_fs
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:
+# Short-Description: Force a particualr X driver
+# Description: Write a xorg.conf with device section
+### END INIT INFO
+
+# Author: Michal Suchanek <[email protected]>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="X11 video driver setup"
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ -z "${lspci}" ] && lspci="/usr/bin/lspci"
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	for arg in $(cat /proc/cmdline) ; do
+	    case "${arg}" in
+		xdriver=*) 
+		xdriver="${arg#xdriver=}"
+		;;
+		# shortcuts for common cases
+		vesa) xdriver="vesa"
+		;;
+		fbdev) xdriver="fbdev"
+		;;
+		nouveau) xdriver="nouveau"
+		;;
+	    esac
+	done
+	# not specified in kernel commandline nor config
+	if [ -z "${xdriver}" ] && [ -x "${lspci}" ] ; then
+	    # try to guess from display devices available
+	    cards="$( "${lspci}" -n | grep "^..:.... 03..:")"
+	    case "${cards}" in
+		# nVidia ION onboard video
+		*10de:087d*)
+		  #xdriver="vesa"
+		  xdriver="nouveau"
+		  ;;
+	      esac
+	fi
+	# TODO Perhaps it would be nice to check that there is no xorg.conf
+	# or a xorg.conf that looks like it was created by this script.
+	if [ -n "${xdriver}" ] && [ "${xdriver}" != "auto" ] ; then echo "
+Section \"Device\"
+      Identifier \"Selected Device\"
+      Driver \"${xdriver}\"
+EndSection
+" > /etc/X11/xorg.conf
+	fi
+}
+
+case "$1" in
+  start|restart|reload)
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+	do_start
+	case "$?" in
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+	;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|restart|reload}" >&2
+	exit 3
+	;;
+esac
+
+:
diff --git a/scripts/config b/scripts/config
index 8bbf799..d28fa89 100755
--- a/scripts/config
+++ b/scripts/config
@@ -19,5 +19,10 @@ lh config noautoconfig \
 	--binary-indices none \
 	--packages-lists "standard" \
 	$...@}
-echo -e "deb $MIRROR_DEBIAN sid main\ndeb-src $MIRROR_DEBIAN sid main" >config/chroot_sources/sid.chroot
+echo "
+deb $MIRROR_DEBIAN sid main
+deb-src $MIRROR_DEBIAN sid main
+deb $MIRROR_DEBIAN experimental main
+deb-src $MIRROR_DEBIAN experimental main
+" >config/chroot_sources/sid.chroot
 
_______________________________________________
Debian-eeepc-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel

Reply via email to