summaryrefslogtreecommitdiff
path: root/UbuntuTips.mdwn
blob: 89d07208f349e67a5c1b772544fea2bf295384a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<meta name="google-translate-customization" content="38b387022ed0f4d4-a4eb7ef5c10c8ae0-g2870fab75904ce51-18"></meta>
<div id="google_translate_element"></div>
<script type="text/javascript" src="/wiki/translate.js"></script>

# UbuntuTips


## Natty Narwhal (11.04)

Feel free to edit this page if there's something missing. 

To compile Nouveau DDX from Git, at least these packages are necessary: 
[[!format txt """
libudev-dev xserver-xorg-dev x11proto-fonts-dev x11proto-video-dev x11proto-xf86dri-dev
"""]]
To compile the Gallium 3D driver from Git, these packages are necessary: 
[[!format txt """
xutils-dev x11proto-gl-dev x11proto-dri2-dev libdrm-dev libxext-dev libxdamage-dev libxfixes-dev libexpat1-dev libxt-dev libxmu-dev libxi-dev libegl1-mesa-dev flex bison libxvmc-dev
"""]]
You will also need to pull some packages in from oneiric.  To do this, first add oneiric to your sources (such as by making a file in /etc/apt/sources.list.d or using system software sources selection).  Then, in order to make sure that you don't upgrade wholesale to this unreleased version, pin its priority in /etc/apt/preferences: 


[[!format txt """
# You will need to remove this (or change oneiric to psychedelic or
# whatever Ubuntu 12.04 gets named) when you want to dist-upgrade to
# oneiric; the do-release-upgrade script won't change it for you (or
# know what went wrong)
Explanation: Don't install oneiric packages by default
Package: *
Pin: release a=oneiric
Pin-Priority: 99
"""]]
You might also need to increase a limit in APT to handle multiple releases: 


[[!format txt """
echo 'APT::Cache-Limit "125165824";' > /etc/apt/apt.conf.d/massive 
"""]]
Then, you can pull in selected packages from oneiric only, using the '-t' flag to apt-get: 


[[!format txt """
sudo apt-get -t oneiric install libdrm2 x11proto-gl-dev x11proto-dri2-dev
"""]]
Be sure to install the natty versions first, otherwise dependencies could unnecessarily come from oneiric instead of natty. 

To compile 32-bit on a 64-bit system: 
[[!format txt """
libc6-dev-i386
"""]]
This package may be needed when you get errors about R300 and R600 drivers: 
[[!format txt """
llvm llvm-dev llvm2.8-dev
"""]]
Compiling libdrm needs this package: 
[[!format txt """
dh-autoreconf
"""]]
Most things here also apply to Maverick Meerkat (10.10). 


## Intrepid Ibex (8.10)

To compile latest 2D driver from git repository in Ubuntu 8.10, these dependencies should be installed: 
[[!format txt """
git-core libpthread-stubs0-dev autoconf libtool xorg-dev mesa-common-dev 
"""]]
 And for Gallium 3D driver in addition to those listed above, these packages should be installed: 
[[!format txt """
xutils-dev build-essential
"""]]
 Also, dri2proto headers from git repository are needed for 3D driver: 
[[!format txt """
git clone git://anongit.freedesktop.org/xorg/proto/dri2proto
cd dri2proto; ./autogen.sh
sudo make install
"""]]
 If 3D driver doesn't load this section should be added to the end of /etc/X11/xorg.conf: 
[[!format txt """
Section "DRI"
    mode 0666
EndSection
"""]]
 


## Gutsy Gibbon (development branch) (7.10)

As of 07/Jul/2007 on `2.6.22-7-generic` it is not necessary to comment out `vm_insert_pfn`. 


## Feisty Fawn (7.04)

When making nouveau.ko and drm.ko make will complain when compiling `linux-core/drm_compat.c`. 

It appears that this is because the kernel which shipped with Feisty is not really 2.6.20 but 2.6.20 + some bits from 2.6.21 including `vm_insert_pfn`, the drm needs `vm_insert_pfn` so when not present supplies its own copy, Ubuntu already supplies `vm_insert_pfn` but advertises itself as 2.6.20 conflicting with the drm build assumptions. 

The end result of this is the Ubuntu kernel headers already have a definition for `vm_insert_pfn` and this drm supplied function in `linux-core/drm_compat.c` can be commented out to read something like; 


[[!format txt """
/*static int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
          unsigned long pfn)
{
    int ret;
    if (!drm_pte_is_clear(vma, addr))
        return -EBUSY;
    ret = io_remap_pfn_range(vma, addr, pfn, PAGE_SIZE, vma->vm_page_prot);
    return ret;
}*/
"""]]
Barring other problems make should complete. 

As of 28/Apr/2007 works for me on `2.6.20-15-generic`. 


## Unresolved / Undefined Symbols

If you are experiencing problems building nouveau, make sure that anything matching nvidia-glx is _completely_ removed.  Open Synaptic and make sure that anything related to nVidia isn't laying around in Residual Config. 


## Resources

[[HOWTO: Nouveau - Open source 3d drivers for nvidia graphic cards|http://ubuntuforums.org/showthread.php?p=6592005]]