[Nouveau] Building rawhide+darktama on 2.6.24 (Re: DRM changes)

Pekka Paalanen pq at iki.fi
Fri Mar 20 16:48:12 PDT 2009


On Mon, 9 Mar 2009 22:49:32 +0100
Stephane Marchesin <marchesin at icps.u-strasbg.fr> wrote:

> As we discussed on irc, there would be multiple changes related to this:
> - we move to a linux kernel-like tree, that should make it easier when
> upstreaming the code.
> - this new tree is hosted in freedekstop.org in the nouveau/ git so we
> don't need additional accounts for everyone all around and people can
> keep pushing things (even better, all nouveau people can push to the
> drm, which used to require mesa rights before)
> - we keep a(some) branch(es) in the tree for backwards compat with
> older kernels. Either in the form of separate kernel versions
> including nouveau, or in the form of an out-of-tree-compilable
> drm/nouveau module.

Hi,

I took airlied's drm-rawhide kernel tree, applied darktama's patch
that adds Nouveau, wrote/copied my own compat-patches on top of that,
and compiled the DRM modules (drm.ko and nouveau.ko) against my
currently running kernel 2.6.24.

It works, with the caveat that I needed a tiny patch to 2.6.24 in
addition to reconfiguring it. The details will follow. I've been
running Nouveau for two hours now without any hickups.

I'm CC'ing also dri-devel@ just in case people working on other
drivers might be interested in offering a "drm.git-like" version
of their drivers for people with older, custom or otherwise
not-this-driver's-development-tree kernels. And because my
compat patches probably suck.

Feel free to drop the dri-devel@ CC when you discuss Nouveau-only
matters.


This raises some questions for Nouveau:
- like marcheu proposed, shall Nouveau DRM move into a kernel tree?
- do we abandon drm.git kernel directories completely?
- is the out-of-tree DRM build sketched below feasible for users?
- how do we maintain and distribute the compat patches and DRM code?

I'd expect the compat patches would be maintained by whoever happens
to run older kernels. Developers do not consider compat patching.


Building DRM out-of-tree for 2.6.24:

Prepare the "upstream" DRM and Nouveau code:

- Get airlied's linux kernel tree, the drm-rawhide branch:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=shortlog;h=drm-rawhide
(the version I used is probably a week old now)

- Get darktama's nouveau patch and apply it on drm-rawhide:
http://cvs.fedoraproject.org/viewvc/rpms/kernel/devel/drm-nouveau.patch?revision=1.25&view=markup
(this is probably outdated by now)

- apply the included nouveau-drm-compat-24.patch
This patch is combined from the individual patches listed in its
description, diffstat is included.

- run 'make clean' unless your tree is already clean.


Prepare your 2.6.24 kernel:

- apply the included kernel-compat-24.patch to export shmem_file_setup()

- configure the following as modules:
	CONFIG_DRM
	CONFIG_FB
	CONFIG_BACKLIGHT_CLASS_DEVICE
	CONFIG_FB_SAVAGE
The savage driver is abused to get FB_CFB_FILLRECT, FB_CFB_COPYAREA and
FB_CFB_IMAGEBLIT enabled, since they do not have menuconfig entries.
If you actually have a Savage card in your computer, maybe you should
pick another fb driver.

- build and install as usual, remove the drm.ko generated.


Building the DRM and Nouveau modules as external modules
using the 2.6.24 kernel tree:

- save the included mkbuild-nouveau.bash script

- edit the script, and fix the paths to the 2.6.24 and the
drm-rawhide kernel trees

- create a new empty directory and cd into it

- run '../mkbuild-nouveau.bash init', it should not whine
about anything, just print good stuff.

- run '../mkbuild-nouveau.bash build', it should build drm.ko and
nouveau.ko. These are probably created in the drm-rawhide kernel
tree.

- find the kernel modules, and load these:
	fb.ko
	drm.ko
	backlight.ko
	cfbcopyarea.ko
	cfbfillrect.ko
	cfbimgblt.ko
	nouveau.ko
Now the Nouveau DDX should run just fine using the new DRM modules.


Ben, I still don't see any comment from you on this thread :-)

-- 
Pekka Paalanen
http://www.iki.fi/pq/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mkbuild-nouveau.bash
Url: http://lists.freedesktop.org/archives/nouveau/attachments/20090321/c4643f0c/attachment-0001.asc 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nouveau-drm-compat-24.patch
Url: http://lists.freedesktop.org/archives/nouveau/attachments/20090321/c4643f0c/attachment-0001.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kernel-compat-24.patch
Url: http://lists.freedesktop.org/archives/nouveau/attachments/20090321/c4643f0c/attachment-0002.asc 


More information about the Nouveau mailing list