Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94807 - Unichrome driver support as a USE flag
Summary: Unichrome driver support as a USE flag
Status: RESOLVED DUPLICATE of bug 54079
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: X11 External Driver Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 96527
  Show dependency tree
 
Reported: 2005-06-02 03:11 UTC by Anonymous bin ich
Modified: 2006-12-29 10:44 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xorg-unichrome-6.8.2-r1.ebuild (xorg-unichrome-6.8.2-r1.ebuild,59.25 KB, text/plain)
2005-06-21 03:09 UTC, Michal Slonina
Details
xorg-x11-6.8.2-r1.ebuild ( unichrome update ) (xorg-x11-6.8.2-r1.ebuild,58.96 KB, text/plain)
2005-06-21 04:15 UTC, Michal Slonina
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anonymous bin ich 2005-06-02 03:11:33 UTC
Is it possible to have a USE flag as unichrome which will add support of
Unichomre drivers in X, kernel (drm), and possibly Mplayer.

There is a unichrome USE flag already available but it works only for MythTV.

1. If it is possible, having unichrome as a USE flag should patch the kernel (?)
to make DRM available only as a module and not as a part of the monolithic
kernel. (I know this is very impossible since different flavors of kernel would
require different patches, but this could be done only for gentoo-sources)

2. X should be compiled, and then via directory should be replaced with
unichrome directory and so do other steps....

3. Unichrome - 3D drivers should be copied.

4. MPlayer should be patched with
http://sourceforge.net/project/showfiles.php?group_id=102048&package_id=130199

Unichrome documentation Link:
http://sourceforge.net/docman/display_doc.php?docid=26963&group_id=102048

There are more patchsets in the Files section of Unichrome.sourcefirge.net. But
only above mentioned should be enough to start with. This will bring down the
unichrome-driver installation to only setting Xorg.conf

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Michal Slonina 2005-06-21 03:09:06 UTC
Created attachment 61618 [details]
xorg-unichrome-6.8.2-r1.ebuild

Check this out, it is modified ebuild based on original xorg-x11-6.8.2-r1, that

adds support for getting opensource unichrome drivers (
http://unichrome.sourceforge.net/ ) from cvs.
just put it into your PORT_OVERLAY and pass USE="unichrome libviaxvmc
unichrome-cvs" as use options.

The CVS version is needed on my laptop (Actina) based on km400 chipset.
The unichrome-X-r30 displays only black screen.

This ebuild is just for user conviniance. I will submit another ebuild for
possible inclusion in portage.
Comment 2 Michal Slonina 2005-06-21 04:15:27 UTC
Created attachment 61622 [details]
xorg-x11-6.8.2-r1.ebuild ( unichrome update )

This ebuild is aimed for inclusion, if it doesn't meet some requestment, please
contact me. ( i never recived any feedback why my ebuilds aren't included into
portage tree )

Here comes the diff:
diff -ur /usr/portage/x11-base/xorg-x11/xorg-x11-6.8.2-r1.ebuild
org-x11-6.8.2-r1.ebuild

--- /usr/portage/x11-base/xorg-x11/xorg-x11-6.8.2-r1.ebuild	2005-06-01
12:35:57.000000000 +0200
+++ xorg-x11-6.8.2-r1.ebuild	2005-05-21 12:36:06.000000000 +0200
@@ -47,13 +47,15 @@
 # IUSE="gatos" disabled because gatos is broken on ~4.4 now (31 Jan 2004)
 IUSE="3dfx 3dnow bitmap-fonts cjk debug dlloader dmx doc font-server hardened
	insecure-drivers ipv6 minimal mmx nls opengl pam sdk sse static
-	truetype-fonts type1-fonts uclibc xprint xv"
+	truetype-fonts type1-fonts uclibc unichrome xprint xv"
 # IUSE_INPUT_DEVICES="synaptics wacom"

 FILES_VER="0.1"
 PATCH_VER="0.1.2"
 XCUR_VER="0.3.1"
 XFSFT_ENC_VER="0.1"
+UNICHROME_VER="r30"
+UNICHROME_LIBVIAXVMC_VER="0.13.3"

 S=${WORKDIR}/xc

@@ -64,6 +66,10 @@
       
http://dev.gentoo.org/~cyfred/distfiles/${P}-patches-${PATCH_VER}.tar.bz2
	mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2"

+
+UNICHROME_PATCHES="unichrome? (
mirror://sourceforge/unichrome/unichrome-X-${UNICHROME_VER}.tar.gz )
+	unichrome? (
mirror://sourceforge/unichrome/XFree86-4.4-libviaXvMC-${UNICHROME_LIBVIAXVMC_VER}-patch.bz2
)"
+

GENTOO_FILES="http://dev.gentoo.org/~spyderous/${PN}/patchsets/${PV}/${P}-files-${FILES_VER}.tar.bz2

	http://dev.gentoo.org/~cyfred/distfiles/${P}-files-${FILES_VER}.tar.bz2

	mirror://gentoo/${P}-files-${FILES_VER}.tar.bz2"
@@ -74,6 +80,7 @@
	nls? ( mirror://gentoo/gemini-koi8-u.tar.bz2 )
	${GENTOO_FILES}
	${X_PATCHES}
+	${UNICHROME_PATCHES}
	http://xorg.freedesktop.org/X11R${PV}/src-single/X11R${PV}-src.tar.bz2"

 #	http://xorg.freedesktop.org/X11R${PV}/src/X11R${PV}-src1.tar.gz
 #	http://xorg.freedesktop.org/X11R${PV}/src//X11R${PV}-src2.tar.gz
@@ -106,7 +113,9 @@
	media-libs/libpng
	!<=app-emulation/emul-linux-x86-xlibs-1.2-r3
	!virtual/xft
-	!virtual/x11"
+	!virtual/x11
+	unichrome? ( >=x11-base/x11-drm-20050502 )"
+
 # x11-libs/xft -- blocked because of interference with xorg's

 RDEPEND="
@@ -485,6 +494,14 @@
		fi
	eend 0

+	# Unpacking the unichrome driver tarball and libXvMC patches for via
support
+	if use unichrome; then
+		ebegin "Unpacking unichrome driver update for via chipset"
+		unpack	unichrome-X-${UNICHROME_VER}.tar.gz
+		unpack
XFree86-4.4-libviaXvMC-${UNICHROME_LIBVIAXVMC_VER}-patch.bz2
+		eend 0
+	fi
+
	# Remove bum encoding
	rm -f ${WORKDIR}/usr/share/fonts/encodings/urdunaqsh-0.enc
 }
@@ -496,6 +513,17 @@
	EPATCH_SUFFIX="patch" \
	epatch ${PATCHDIR}
	cd ${S}
+
+	# Unichrome driver update
+	if use unichrome; then
+		ebegin "Applying unichrome driver update for via chipset"
+		rm -rf ${WORKDIR}/xc/programs/Xserver/hw/xfree86/drivers/via
+		mv ${WORKDIR}/unichrome-X-${UNICHROME_VER}  \
+			${WORKDIR}/xc/programs/Xserver/hw/xfree86/drivers/via
+		cd ${WORKDIR}/xc
+		epatch
${WORKDIR}/XFree86-4.4-libviaXvMC-${UNICHROME_LIBVIAXVMC_VER}-patch
+		eend 0
+	fi
 }

 host_def_setup() {
Comment 3 Abraham Smith 2005-06-27 11:45:03 UTC
Just a "me too" here.  I will try this ebuild tonight and give feedback when I
have time to test it. 

In general, please push these patches forward -- they are of great use to many
people.
Comment 4 Abraham Smith 2005-06-27 19:25:48 UTC
quick update:  the above ebuild worked fine, except that it did not seem to
provide unichroms_dri.so, for direct rendering support.  In my mind, this is the
whole point. 

I found this other ebuild which appears to provide DRI support quite nicely (to
wit, 500 fps in glxgears versus 150 in the previous case):
http://boom.kalf.org/epia/xorg-x11-6.8.2-r3002.ebuild

obviosuly, it's too early for claims of stability, but no catastrophic failures yet.
Comment 5 Kamil Gornik 2005-07-02 00:01:26 UTC
My addition: (having VIA/S3 Unichrome KN400) while using 2.6.x-gentoo-x I have
to DISABLE kernel-side DRM driver (nor built-in neither module). Well, in fact
it may be build as a module but has to be replaced with one provided by
unichrome anyway.
In reply to #4 - pkg_postinstall() - print_info should be printed only if
unichrome flag is presenf, not always, consider replacing via directory in
do_patch function and unpack patches at right places - unpack_all() :) I know
those are details but let's stick to ebuild's ordering of world
Anyway: thanks for those ebuilds - all of you
Comment 6 Anonymous bin ich 2006-04-18 15:40:03 UTC
Since the advent of new modular Xorg 7, the feature for driver request has become quite simple. There is already VIDEO_CARDS="via" option.

So, we can just have another VIDEO_CARDS="unichrome" which will pull the unichrome code from their Git repository and install it just the way other drivers are installed.

Btw, is there a chance/idea that the current unichrome code will be committed to original branch of Xorg as a replacement of current via?
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-12-29 10:44:32 UTC

*** This bug has been marked as a duplicate of 54079 ***