forked from gsutre/netbsd-drmgem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
116 lines (72 loc) · 4.02 KB
/
README
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
+------------------------------------------------------------------------------+
| Porting DRM/GEM from OpenBSD to NetBSD (Intel only) |
+------------------------------------------------------------------------------+
The X.org intel driver included in NetBSD -current does not support the recent
integrated GPUs found in Core i3/i5/i7 platforms. However, OpenBSD 4.8 supports
them (kudos to OpenBSD developers!). This support involves three components of
the system:
1. Kernel DRM driver (with GEM support)
2. Userland DRM library
3. X.org video driver
This project ports these three components from OpenBSD to NetBSD. Support for
(embedded) display port has been, in addition, ported directly from Linux. The
port focusses on Intel GPUs and removes support for other graphics hardware.
Note: This port is for NetBSD's native X.org. It's not compatible with pkgsrc's
X.org. ^^^^^^
***** Use at your own risk ****** Work in progress *****
There are several ways to build and install this port. The safest option is to
(cross-)build a new release from scratch. But this may take time, so, instead,
one may choose to use the automated build script that is provided with the port.
Last, it is possible to manually build the required components. Let us present
in detail these three alternatives.
Automated build script
--------------------------------------------------------------------------------
Download the script autobuild.sh, create a directory with enough free space for
the build (750 MiB), and then run the script from this directory:
$ /path/to/autobuild.sh -mv <time stamp>
This builds a new kernel as well as intel-specific X.org modules and libraries.
WARNING: this script modifies the local X11R7 installation!
The <time stamp> specifies the date of NetBSD -current sources. You may use any
date compatible with the CVS date format. But, obviously, it is safer to choose
a date that is close to the sources of the running NetBSD system.
Manual build
--------------------------------------------------------------------------------
1. Patch NetBSD source tree (/usr/src and /usr/xsrc)
$ git clone https://github.com/gsutre/netbsd-drmgem.git
Replace files in /usr/src and /usr/xsrc by the ones provided in the src and xsrc
sub-directories of this project. This can be achieved for instance as follows:
(WARNING: this overwrites your local source tree.)
$ cd netbsd-drmgem
$ cp -av src xsrc /usr
Alternatively, for /usr/src, you can generate a patch to apply to your source
tree with the following command, run from within the cloned git repository:
$ git diff remotes/origin/netbsd-current remotes/origin/master -- src
However, the generated patch only concerns /usr/src. It is still necessary to
overwrite /usr/xsrc with files in the xsrc sub-directory of this project.
2. Build and install new kernel
See for instance http://www.netbsd.org/docs/guide/en/part-compile.html.
3. Build and install OpenBSD Xenocara's libdrm and Xorg intel driver
Refer to the above link for details. In most cases, the following should work:
$ export USETOOLS=no
$ cd /usr/src/external/mit/xorg/lib/libdrm
$ su root -c "make includes"
$ make
$ su root -c "make install"
$ cd /usr/src/external/mit/xorg/lib/libdrm_intel
$ su root -c "make includes"
$ make
$ su root -c "make install"
$ cd /usr/src/external/mit/xorg/server/drivers/xf86-video-intel
$ make
$ su root -c "make install"
However, this only builds the X.org intel(4) driver as well as its dependencies.
See the autobuild.sh script to build Mesa DRI modules and XvMC libraries.
Full (cross-)build
--------------------------------------------------------------------------------
Fetch a clean NetBSD -current source tree, as explained here:
http://www.netbsd.org/docs/guide/en/chap-fetch.html
Next, do step 1 of the Manual build section to patch the source tree, and, then,
perform a full (cross-)build of the patched release using the build.sh script.
For instance:
$ ./build.sh -U -m amd64 -x release
Install the release as usual.