sync with OpenBSD -current
This commit is contained in:
parent
2c72e27ed2
commit
a34e492c6b
5 changed files with 78 additions and 87 deletions
|
@ -1,73 +1,68 @@
|
||||||
|
# Notes on building Xenocara for SecBSD X hackers
|
||||||
Notes on building Xenocara for SecBSD X hackers
|
|
||||||
|
|
||||||
This document presents some techniques that can be useful for people
|
This document presents some techniques that can be useful for people
|
||||||
wanting to hack the xenocara tree. It assumes some basic knowledge of
|
wanting to hack the xenocara tree. It assumes some basic knowledge of
|
||||||
the SecBSD build system, as described in the release(8) manual page.
|
the SecBSD build system, as described in the release(8) manual page.
|
||||||
|
|
||||||
o About Xenocara
|
## About Xenocara
|
||||||
--------------
|
|
||||||
Xenocara is the name chosen for OpenBSD's version of X. It's
|
Xenocara is the name chosen for OpenBSD's version of X. It's
|
||||||
currently based on X.Org 7.7 and its dependencies. The goal of
|
currently based on X.Org 7.7 and its dependencies. The goal of
|
||||||
Xenocara is to provide a framework to host local modifications and to
|
Xenocara is to provide a framework to host local modifications and to
|
||||||
automate the build of the modular X.Org components, including 3rd
|
automate the build of the modular X.Org components, including 3rd
|
||||||
party packages and some software maintained by OpenBSD developers.
|
party packages and some software maintained by OpenBSD developers.
|
||||||
|
|
||||||
o Source tree
|
## Source tree
|
||||||
-----------
|
|
||||||
|
|
||||||
The organisation of the xenocara directory follows the general
|
The organisation of the xenocara directory follows the general
|
||||||
organisation used in X.Org:
|
organisation used in X.Org:
|
||||||
|
|
||||||
- app: X applications and utilities
|
- app: X applications and utilities
|
||||||
- data: various data files (keyboard mappings and bitmaps)
|
- data: various data files (keyboard mappings and bitmaps)
|
||||||
- doc: documentation
|
- doc: documentation
|
||||||
- driver: input and video drivers
|
- driver: input and video drivers
|
||||||
- font: fonts
|
- font: fonts
|
||||||
- lib: libraries
|
- lib: libraries
|
||||||
- proto: X protocol headers
|
- proto: X protocol headers
|
||||||
- util: utilities that don't fit anywhere else
|
- util: utilities that don't fit anywhere else
|
||||||
- xserver: the source for the X servers
|
- xserver: the source for the X servers
|
||||||
|
|
||||||
In addition Xenocara uses the following directories:
|
In addition Xenocara uses the following directories:
|
||||||
|
|
||||||
- dist: contains some of the 3rd party sources, when keeping them
|
- dist: contains some of the 3rd party sources, when keeping them separate
|
||||||
separate helps the build system (fontconfig, xcb and
|
helps the build system (fontconfig, xcb and xkeyboard-config)
|
||||||
xkeyboard-config)
|
- distrib: all binary distribution related tools and data
|
||||||
- distrib: all binary distribution related tools and data
|
- etc: some default config files
|
||||||
- etc: some default config files
|
- share: make(1) configuration for Xenocara
|
||||||
- share: make(1) configuration for Xenocara
|
|
||||||
|
|
||||||
At the top-level directory two files describe the individual
|
At the top-level directory two files describe the individual
|
||||||
components of Xenocara:
|
components of Xenocara:
|
||||||
|
|
||||||
- MODULES lists all X.Org components (imported from the X.Org
|
- MODULES: lists all X.Org components (imported from the X.Org distribution
|
||||||
distribution at http://xorg.freedesktop.org/archive/)
|
at http://xorg.freedesktop.org/archive/)
|
||||||
- 3RDPARTY lists all 3rd party software components provided in Xenocara,
|
- 3RDPARTY: lists all 3rd party software components provided in Xenocara,
|
||||||
either as dependencies of the X.Org software, or as
|
either as dependencies of the X.Org software, or as complements
|
||||||
complements to it to provide a more useable default
|
to it to provide a more useable default environment.
|
||||||
environment.
|
|
||||||
|
|
||||||
o Compiling and installing
|
## Compiling and installing
|
||||||
------------------------
|
|
||||||
|
|
||||||
Xenocara is made up of almost three hundred different independent
|
Xenocara is made up of almost three hundred different independent
|
||||||
packages that need to be built and installed in the right order,
|
packages that need to be built and installed in the right order,
|
||||||
especially while bootstrapping (while /usr/X11R6 is still empty). The
|
especially while bootstrapping (while /usr/X11R6 is still empty). The
|
||||||
Xenocara Makefiles take care of that using the 'build' target.
|
Xenocara Makefiles take care of that using the 'build' target.
|
||||||
|
|
||||||
Quick startup guide
|
### Quick startup guide
|
||||||
|
|
||||||
The following steps will build and install everything for the first time.
|
The following steps will build and install everything for the first time.
|
||||||
|
|
||||||
cd /usr/xenocara
|
cd /usr/xenocara
|
||||||
doas make bootstrap
|
doas make bootstrap
|
||||||
doas make obj
|
doas make obj
|
||||||
doas make build
|
doas make build
|
||||||
|
|
||||||
If you want to use another obj directory see below.
|
If you want to use another obj directory see below.
|
||||||
|
|
||||||
Requirements
|
### Requirements
|
||||||
|
|
||||||
A freshly checked out xenocara tree is buildable without any external
|
A freshly checked out xenocara tree is buildable without any external
|
||||||
tool. Only the xenocara and the src (currently only the
|
tool. Only the xenocara and the src (currently only the
|
||||||
|
@ -77,17 +72,17 @@ However if you start modifying things in the automake build
|
||||||
system used by many packages, you will need to have the following
|
system used by many packages, you will need to have the following
|
||||||
GNU autotools packages installed:
|
GNU autotools packages installed:
|
||||||
|
|
||||||
- automake 1.12 (devel/automake/1.12)
|
- automake 1.12 (devel/automake/1.12)
|
||||||
- autoconf 2.71 (devel/autoconf/2.71)
|
- autoconf 2.71 (devel/autoconf/2.71)
|
||||||
- metaauto (devel/metaauto)
|
- metaauto (devel/metaauto)
|
||||||
- libtool (devel/libtool)
|
- libtool (devel/libtool)
|
||||||
- gettext-tools (devel/gettext)
|
- gettext-tools (devel/gettext)
|
||||||
|
|
||||||
If you have your source tree on an NFS partition, make sure the clocks
|
If you have your source tree on an NFS partition, make sure the clocks
|
||||||
of your server and client are properly synchronised. Any significant
|
of your server and client are properly synchronised. Any significant
|
||||||
drift will cause various problems during builds.
|
drift will cause various problems during builds.
|
||||||
|
|
||||||
Path
|
### Path
|
||||||
|
|
||||||
To build Xenocara, you need to have /usr/X11R6/bin in your PATH.
|
To build Xenocara, you need to have /usr/X11R6/bin in your PATH.
|
||||||
|
|
||||||
|
@ -95,32 +90,30 @@ If you have installed the full Xenocara X sets on your system, you
|
||||||
don't need to build all of Xenocara to patch one element. You can go
|
don't need to build all of Xenocara to patch one element. You can go
|
||||||
to any module sub-directory and run 'make build' from there.
|
to any module sub-directory and run 'make build' from there.
|
||||||
|
|
||||||
Source directory
|
#### Source directory
|
||||||
|
|
||||||
The variable XSRCDIR can be set either in the environment or in
|
The variable XSRCDIR can be set either in the environment or in
|
||||||
/etc/mk.conf to point to the xenocara source tree, in case you keep it
|
/etc/mk.conf to point to the xenocara source tree, in case you keep it
|
||||||
in a non-standard directory (the default is /usr/xenocara).
|
in a non-standard directory (the default is /usr/xenocara).
|
||||||
|
|
||||||
Objdirs
|
#### Objdirs
|
||||||
|
|
||||||
Xenocara requires objdirs. Just run 'make obj' as root at any level
|
Xenocara requires objdirs. Just run 'make obj' as root at any level
|
||||||
before 'make build' to make sure that the object directories are
|
before 'make build' to make sure that the object directories are
|
||||||
created. XOBJDIR defines the obj directory that is used (defaults to
|
created. XOBJDIR defines the obj directory that is used (defaults to
|
||||||
/usr/xobj). It should be created before running 'make obj'.
|
/usr/xobj). It should be created before running 'make obj'.
|
||||||
|
|
||||||
o Regenerating configure scripts
|
## Regenerating configure scripts
|
||||||
------------------------------
|
|
||||||
|
|
||||||
Whenever you touched an import file for GNU autotools (Makefile.am,
|
Whenever you touched an import file for GNU autotools (Makefile.am,
|
||||||
configure.ac mostly), you need to rebuild the configure script and
|
configure.ac mostly), you need to rebuild the configure script and
|
||||||
makefiles skeletons. For that use the following command in the
|
makefiles skeletons. For that use the following command in the
|
||||||
directory where you edited the autotools source files:
|
directory where you edited the autotools source files:
|
||||||
|
|
||||||
make -f Makefile.bsd-wrapper autoreconf
|
make -f Makefile.bsd-wrapper autoreconf
|
||||||
doas make -f Makefile.bsd-wrapper build
|
doas make -f Makefile.bsd-wrapper build
|
||||||
|
|
||||||
o Cleaning in packages managed by autotools
|
# Cleaning in packages managed by autotools
|
||||||
-----------------------------------------
|
|
||||||
|
|
||||||
One common problem when building xenocara is the case where the obj
|
One common problem when building xenocara is the case where the obj
|
||||||
directory didn't exist (or the symbolic link pointed to a non-existent
|
directory didn't exist (or the symbolic link pointed to a non-existent
|
||||||
|
@ -130,27 +123,26 @@ is already configured.
|
||||||
|
|
||||||
To recover from this in one package:
|
To recover from this in one package:
|
||||||
|
|
||||||
rm -f obj
|
rm -f obj
|
||||||
make -f Makefile.bsd-wrapper cleandir
|
make -f Makefile.bsd-wrapper cleandir
|
||||||
mkdir XOBJDIR
|
mkdir XOBJDIR
|
||||||
make -f Makefile.bsd-wrapper obj
|
make -f Makefile.bsd-wrapper obj
|
||||||
doas make -f Makefile.bsd-wrapper build
|
doas make -f Makefile.bsd-wrapper build
|
||||||
|
|
||||||
or from the root of the xenocara tree:
|
or from the root of the xenocara tree:
|
||||||
|
|
||||||
find . -type l -name obj | xargs rm -f
|
find . -type l -name obj | xargs rm -f
|
||||||
make cleandir
|
make cleandir
|
||||||
mkdir XOBJDIR
|
mkdir XOBJDIR
|
||||||
make obj
|
make obj
|
||||||
doas make build
|
doas make build
|
||||||
|
|
||||||
for more desperate cases, remove all files from XSRCDIR not in CVS:
|
for more desperate cases, remove all files from XSRCDIR not in CVS:
|
||||||
|
|
||||||
cd XSRCDIR
|
cd XSRCDIR
|
||||||
cvs -q update -PAd -I - | awk '$1=="?" {print $2}' | xargs rm -f
|
cvs -q update -PAd -I - | awk '$1=="?" {print $2}' | xargs rm -f
|
||||||
|
|
||||||
o Updating XCB to a new release
|
# Updating XCB to a new release
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
libxcb uses C source files that are generated from the XML protocol
|
libxcb uses C source files that are generated from the XML protocol
|
||||||
specification using xcbgen, written in Python. On OpenBSD those files
|
specification using xcbgen, written in Python. On OpenBSD those files
|
||||||
|
@ -159,35 +151,32 @@ in the base system. So the generated version are checked in CVS
|
||||||
(in lib/libxcb/src/). Here is the receipt to update them when updating
|
(in lib/libxcb/src/). Here is the receipt to update them when updating
|
||||||
to a new release of XCB:
|
to a new release of XCB:
|
||||||
|
|
||||||
1) Update proto/xcb-proto.
|
1. Update proto/xcb-proto.
|
||||||
2) Update the x11/py-xcbgen port to the same version and install the
|
2. Update the x11/py-xcbgen port to the same version and install the
|
||||||
python3 package.
|
python3 package.
|
||||||
3) Update dist/libxcb.
|
3. Update dist/libxcb.
|
||||||
4) Check lib/libxcb/src/Makefile if new files need to be generated.
|
4. Check lib/libxcb/src/Makefile if new files need to be generated.
|
||||||
5) Run 'make' in lib/xcb/src to generate the files for the new version.
|
5. Run `make` in lib/xcb/src to generate the files for the new version.
|
||||||
6) Check lib/libxcb/ for other files needing updates.
|
6. Check lib/libxcb/ for other files needing updates.
|
||||||
7) Commit the result.
|
7. Commit the result.
|
||||||
|
|
||||||
o How to build something with debug information?
|
## How to build something with debug information?
|
||||||
----------------------------------------------
|
|
||||||
|
|
||||||
You can use "env CFLAGS=-g make -f Makefile.bsd-wrapper build" to
|
You can use `env CFLAGS=-g make -f Makefile.bsd-wrapper build` to
|
||||||
build any module with debugging information, but you'll need to remove
|
build any module with debugging information, but you'll need to remove
|
||||||
XOBJDIR/xorg-config.cache.${MACHINE} before doing that because
|
`XOBJDIR/xorg-config.cache.${MACHINE}` before doing that because
|
||||||
autoconf caches the value of CFLAGS in its cache.
|
autoconf caches the value of CFLAGS in its cache.
|
||||||
|
|
||||||
o How to get a core file out of the X server?
|
## How to get a core file out of the X server?
|
||||||
-------------------------------------------
|
|
||||||
|
|
||||||
Several things are needed:
|
Several things are needed:
|
||||||
|
|
||||||
1) set kern.nosuidcoredump=3 in /etc/sysctl.conf
|
1. set kern.nosuidcoredump=3 in /etc/sysctl.conf
|
||||||
|
2. start the X server as root, with the -keepPriv option. If you use
|
||||||
2) start the X server as root, with the -keepPriv option. If you use
|
|
||||||
xenodm, you can add the option in /etc/X11/xenodm/Xservers. If you
|
xenodm, you can add the option in /etc/X11/xenodm/Xservers. If you
|
||||||
want to use startx, you need to run it as root, like this:
|
want to use startx, you need to run it as root, like this:
|
||||||
|
|
||||||
startx -- /usr/X11R6/bin/X -keepPriv
|
`startx -- /usr/X11R6/bin/X -keepPriv`
|
||||||
|
|
||||||
Now the X server should dump core when catching a fatal signal and the
|
Now the X server should dump core when catching a fatal signal and the
|
||||||
core dump should be in /var/crash/Xorg/<pid>.core.
|
core dump should be in /var/crash/Xorg/<pid>.core.
|
||||||
|
@ -197,7 +186,7 @@ Alternatively, if the X server is using the modesetting(4) driver
|
||||||
as a regular user, without setting kern.nosuidcoredump=3, and the core
|
as a regular user, without setting kern.nosuidcoredump=3, and the core
|
||||||
dump will be in the current directory where startx was executed.
|
dump will be in the current directory where startx was executed.
|
||||||
|
|
||||||
See also <http://xorg.freedesktop.org/wiki/Development/Documentation/ServerDebugging>
|
See also http://xorg.freedesktop.org/wiki/Development/Documentation/ServerDebugging
|
||||||
|
|
||||||
--
|
--
|
||||||
$OpenBSD: README,v 1.49 2024/04/27 18:34:23 matthieu Exp $
|
$OpenBSD: README.md,v 1.1 2024/07/20 19:56:40 matthieu Exp $
|
|
@ -93,6 +93,8 @@ AC_CONFIG_SRCDIR([Makefile.am])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AM_INIT_AUTOMAKE([dist-bzip2 foreign -Wno-portability])
|
AM_INIT_AUTOMAKE([dist-bzip2 foreign -Wno-portability])
|
||||||
|
|
||||||
|
AM_MAINTAINER_MODE
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: Makefile,v 1.9 2024/07/19 14:42:33 rsadowski Exp $
|
# $OpenBSD: Makefile,v 1.10 2024/07/21 13:30:50 jsg Exp $
|
||||||
|
|
||||||
.include "config.mk"
|
.include "config.mk"
|
||||||
|
|
||||||
|
@ -102,6 +102,8 @@ SUBDIR+= libglapi libgbm libEGL libGL libGLESv1_CM libGLESv2 libOSMesa
|
||||||
|
|
||||||
SUBDIR+= libgallium_dri
|
SUBDIR+= libgallium_dri
|
||||||
|
|
||||||
|
.if ${WITH_VAAPI} == "yes" || make(obj)
|
||||||
SUBDIR+= libgallium_drv_video
|
SUBDIR+= libgallium_drv_video
|
||||||
|
.endif
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
.include <bsd.subdir.mk>
|
||||||
|
|
|
@ -197,6 +197,7 @@ WITH_GALLIUM_IRIS=no
|
||||||
WITH_AMD_VK=no
|
WITH_AMD_VK=no
|
||||||
WITH_INTEL_VK=no
|
WITH_INTEL_VK=no
|
||||||
WITH_SSE41=no
|
WITH_SSE41=no
|
||||||
|
WITH_VAAPI=no
|
||||||
|
|
||||||
WITH_DRI=yes
|
WITH_DRI=yes
|
||||||
WITH_GALLIUM_DRISW_KMS=yes
|
WITH_GALLIUM_DRISW_KMS=yes
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $OpenBSD: Makefile,v 1.1 2024/07/19 14:40:46 rsadowski Exp $
|
# $OpenBSD: Makefile,v 1.2 2024/07/21 13:30:50 jsg Exp $
|
||||||
|
|
||||||
LIB= gallium_drv_video
|
LIB= gallium_drv_video
|
||||||
|
|
||||||
|
@ -81,10 +81,7 @@ SLIBS+= libradeonwinsys
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
LDADD+= -Wl,--as-needed -Wl,--allow-shlib-undefined -Wl,--whole-archive -Wl,--start-group
|
LDADD+= -Wl,--as-needed -Wl,--allow-shlib-undefined -Wl,--whole-archive -Wl,--start-group
|
||||||
|
|
||||||
.if ${WITH_VAAPI} == "yes"
|
|
||||||
LDADD+= ${.CURDIR}/../libva_st/${__objdir}/libva_st.a -Wl,--no-whole-archive -Wl,-z,origin
|
LDADD+= ${.CURDIR}/../libva_st/${__objdir}/libva_st.a -Wl,--no-whole-archive -Wl,-z,origin
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ${WITH_GALLIUM_R600} == "yes"
|
.if ${WITH_GALLIUM_R600} == "yes"
|
||||||
SLIBS+= libr600
|
SLIBS+= libr600
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue