216 Commits

Author SHA1 Message Date
Xiong Zhang
012be880fc build: add libtsm to bbulk and gltex
text_bbulk.c and text_gltex.c contain text.h which depend on
libtsm. Without adding tsm flags to compile option, bbulk and
gltex can't be compiled.

Signed-off-by: Xiong Zhang <panda0626@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-05-16 10:52:34 +02:00
David Herrmann
e507a14113 build: don't build shl_gl if GLES is disabled
We required GL headers for shl_gl.h. Even though the linker strips all the
GL dependencies if it's disabled during compilation, we still require it
as build-time dependency. Avoid that by not including shl_gl in any non-GL
builds.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2014-04-22 08:36:50 +02:00
David Herrmann
7083e7dbc5 build: strip \r from shaders
\r is rarely used and probably always escaped in strings so we can safely
erase it together with \n to reduce its size.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-03 12:23:02 +01:00
David Herrmann
8050a28beb uterm: input: add built-in keymap fallback
This adds a small US-keymap to the uterm library which is loaded if we
cannot find a suitable system default keymap. This allows using the keymap
if no XKB keymaps are installed.

Thanks to Ran Benita for the minimal US keymap.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-03 12:22:08 +01:00
David Herrmann
1893b8b90c build: mark binary data as read-only with objcopy
Check for objcopy in configure.ac and then mark binary data as read-only
by renaming .data to .rodata and setting the correct flags.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-03 12:18:08 +01:00
David Herrmann
6f14e5905d build: replace genshader by binary linker
Instead of generating C source files, we now use our binary-linker make
target which can link in any arbitrary binary file.

This way, we can delete genshader and instead link the files directly.
This speeds up compilation and makes the code more consistent.
We also strip the shaders from useless comments and whitespaces to reduce
memory consumption.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-03 12:15:35 +01:00
David Herrmann
924a732e7c shl: move static_gl_* to shl_gl_*
No need to keep these static helpers outside of SHL. Instead, include them
in SHL to avoid any external linking.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-11-03 12:12:07 +01:00
David Herrmann
fc627a94e4 build: enable kmscon unconditionally
We removed all additional libraries/applications so we can now always
enable building kmscon. This also means we can remove a bunch of old now
unused options and flags.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-29 10:36:07 +01:00
David Herrmann
35fbe621e4 build: link eloop statically
We don't want to export libeloop so link it statically. Avoid installing
into into the system.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-29 10:24:31 +01:00
David Herrmann
6ef8db0790 build: link libuterm statically
We shouldn't export libraries which we don't really allow linkink
externally. Link libuterm statically and avoid installing it into /lib.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-29 10:19:05 +01:00
David Herrmann
1e94fc361e Remove cairo text-renderer
The cairo text-renderer is _way_ too slow. There's no reason to keep it
around, anymore.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-29 10:07:46 +01:00
David Herrmann
9f2f11d2a5 Remove libuvt
uvt is not used inside of kmscon. Moved into a separate library if
some-one is interested.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-29 10:01:13 +01:00
David Herrmann
761434ecac Remove freetype2 font backend
The freetype2 font backend lacks support for proper combining marks and I
do not intend to ever implement that. Use pango!

If you don't want heavy dependencies, you can use the unifont or 8x16
backends.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-29 09:31:03 +01:00
David Herrmann
96b28e953d tsm: remove and depend on libtsm
TSM was extracted from kmscon sources so it can more easily be used by
other emulators. It is available at:
  http://cgit.freedesktop.org/~dvdhrm/libtsm

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-23 16:55:59 +02:00
David Herrmann
972ec107cf kmscon: remove cdev sessions
cdev sessions are outdated. Use libuvt instead. Remove all references to
cdev-sessions and clean up the build chain.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-23 15:22:28 +02:00
David Herrmann
bcfb1d2ab5 uvtd: remove
Remove uvtd. The idea is outdated and not really needed. With recent
systemd-logind changes, all we need is a shim between legacy-programs
(like XServer) and logind. We can easily do that via libuvt without
requiring a huge daemon like uvtd.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-23 15:15:50 +02:00
David Herrmann
695c855da3 wlterm: remove
Remove all wlterm sources. I never intended to maintain it longer than any
major terminal-emulator needs to get ported over to wayland. Hence, remove
it. It was buggy, anyway.

If anyone is interested, a GTK+ based wlterm is available on:
  http://cgit.freedesktop.org/~dvdhrm/wlterm

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-23 15:11:21 +02:00
Thierry Reding
2d191bd876 build: allow kmscon to be cross-compiled
The genshader and genunifont utilities are run during the build process
to generate source files. In order for that to work when cross-compiling
the files need to be built using the native compiler instead of the
cross-compiler.

Add the AX_PROG_CC_FOR_BUILD m4 macro which defines various *_FOR_BUILD
variables that are the native equivalents of CC, CFLAGS, LDFLAGS, etc.
Override CC, CFLAGS and LDFLAGS for genshader and genunifont and their
object files so that they will be built natively and can be executed
during the build.

Signed-off-by: Thierry Reding <treding@nvidia.com>
(added TODO marker)
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-09-12 13:38:04 +02:00
David Herrmann
aeddc5b552 build: fix binary-link with ld.gold linker
The ld.gold linker doesn't provide --format=default but needs --format=elf
instead. However, this doesn't work with ld.bfd. To avoid any linker
detection, we now link any binary file via partial-linking into a proper
object file itself and then link this object file in the final linking
step.
This also produces a fake libtool *.lo file so the libtool linking command
doesn't complain about PIC/non-PIC problems.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-08 17:04:05 +01:00
David Herrmann
e28da46b05 uvtd: add VT subsystem
The VT subsystem manages the virtual VTs and registers them with the
seat/session-scheduler. They manage control and legacy nodes as they are
mostly the same.

The different contexts create these VTs and assign them to cdev clients.
This allows us to split the VT and cdev logic apart so they can be
assigned freely to different clients.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-05 18:03:18 +01:00
David Herrmann
c56f5fcb4d uvtd: add ctx subsystem
The ctx subsystem manages the CDEV devices for each seat. It currently
allocates one manager device and a given number of legacy devices that can
be accessed via subdirectories.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-05 01:32:45 +01:00
David Herrmann
62a16d13b7 build: add shl_flagset to build-system
We need the shl_flagset as part of SHL to make use of it.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-05 01:28:36 +01:00
David Herrmann
616a275605 build: add --enable-all
This flag enables all other options that extend the build. It is used for
debugging only and should never be used by distributions to control what
is built. Hence, we don't document it and never advertise it.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-04 15:45:47 +01:00
David Herrmann
2871e94bf0 tests: use new shl_log.h
log.h was moved to shl so use it in all tests.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-04 15:29:48 +01:00
David Herrmann
176a0e8be5 uvtd: add new Virtual Terminal daemon
This introduces uvtd which replaces kmscon sessions as an external helper
program. It's still a dummy program but it will get extended soon. After
that, kmscon sessions will get removed and limited to a single seat. This
will simplify kmscon itself heavily and move rarely used features out of
kmscon into helpers.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-04 15:11:30 +01:00
David Herrmann
9c2375b6d4 shl: move githead into a source file
This moves githead.h to shl_githead.c so we can skip recompilations on
GIT-HEAD changes. We only need to relink now (which we cannot skip).

This speeds up build-processes considerably on slower machines.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-04 15:05:17 +01:00
David Herrmann
0249b2cb0b shl: move log.[ch] to shl_log.[ch]
We want to avoid any static files that are shared between multiple
programs but are not part of SHL. These make the build-process just more
complex.
Move log.[ch] to SHL so we have a known context.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-04 14:40:36 +01:00
David Herrmann
87e1cf03f2 build: mark font-unifont as noexecstack
ld automatically assumes that any binary input file requires an executable
stack. There's no way to tell it that it doesn't so we simply mark all
inputs as noexecstack.

Reported-by: Etam
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-03-04 12:15:27 +01:00
David Herrmann
068119a6c3 uvt: new library implementing VTs in user-space
UVT is based heavily on the old cdev-sessions. It uses CUSE/FUSE to
implement virtual terminals in user-space.

This move into a library allows to use it in other projects, too. There is
no reason to limit it to kmscon sessions. In fact, we will remove the
cdev-sessions, soon and make kmscon a stand-alone terminal emulator
without any session capability.
Instead, the uvtd program will provide the VT emulation.

This library is not finished, nor ready for use. However, feel free to
contribute patches so we can eventually release a stable API.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-02-27 19:44:55 +01:00
David Herrmann
36f9d2d0b1 build: add --enable-wlterm to distcheck flags
We should test wlterm when running distcheck so make in mandatory.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-02-06 18:30:13 +01:00
David Herrmann
fc4865ed03 font: unifont: compress binary data and link via ld directly
Instead of using the blown up UTERM_FORMAT_GREY binary data, we now use an
A1 1bit alpha channel and extract the data during runtime. This guarantees
that only used characters will be extracted into the full alpha channel.

We should add support for A1 formats in uterm to avoid this problem
entirely.

We also now link the binary file directly into the module via ld. This
avoids the long compile times for the huge C-array that we previously
generated. As a side effect, you no longer run out of memory linking this
file on small machines.

With this change we could even start making unifont a default font-backend
as it now works pretty well.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-02-06 15:16:09 +01:00
David Herrmann
aad2715cf4 build: major cleanup
Major overhaul of the build system. This introduces symbol-versioning for
all exported libraries. Please note that none of these libraries is
stable, yet!

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-02-06 01:22:10 +01:00
David Herrmann
4f8edb38c8 wlt: link font library statically
We need the font layer to build wlterm. However, the font layer depends on
kmscon internal module handling so we cannot do this. To avoid this, we
simply provide dummy handlers for the kmscon_module_* layer and link it
anyway. This is kind of ugly but works, yey!

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24 20:32:40 +01:00
David Herrmann
0f206cc5b5 uterm: drm: rename to drm3d
This renames the video-drm backend to drm3d (which was already used
internally). This is a pure rename, the code-logic stays the same.

This also puts the drm3d backend into a module so we can more easily
load it during runtime.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24 16:42:03 +01:00
David Herrmann
f289349ef9 uterm: rename drm-dumb backend into drm2d module
This moves all the drm-dumb code into a new module that is now called
drm2d (which was already used internally before).

No conceptual changes, just renames and moves.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24 14:42:54 +01:00
David Herrmann
79c5ba7185 kmscon: add pixman renderer
This is an experimental renderer based on pixman. It is only available for
testing-purposes and should not be used in production, yet. The bbulk
renderer is still the faster alternative and should be used instead.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24 12:13:29 +01:00
David Herrmann
0a3c34ca0e kmscon: add cairo-renderer module
The cairo text renderer uses the cairo blitting functions to blit all
glyphs into the cairo-surface. This is only for testing-purposes. Cairo is
not really suited for blending/blitting of large surfaces. Hence, this
backend is horribly slow compared to bblit/bbulk.

This backend is disabled by default.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-15 16:30:49 +01:00
David Herrmann
5604a0a325 uterm: drm: share mode-setting between dumb+drm
The modesetting code of both DRM backends is almost the same so share it.
This also works around several race-conditions in some DRM drivers. In
particular, we cannot call drmModeSetCrtc while a drmModePageFlip is still
pending. Therefore, we wait for page-flips to complete before performing
an immediate mode-set.

This requires us to handle page-flip events synchronously so we can wait
for kernel page-flip events but the user-space bottom-half is executed in
an idle-handler.

Note that the chance that we have to wait for a page-flip to complete is
pretty small. In fact, without hacking the code to do fast page-flips, I
couldn't get kmscon to run into this condition.

Last but not least, this patch also makes the dumb-backend support
immediate page-flips like the DRM backend did all the time.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-13 15:26:56 +01:00
David Herrmann
b6087af25e uterm: share drm_mode between dumb and drm backend
The dumb and drm backends use the same mode structure so share the code as
drm_shared module.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-11 17:28:29 +01:00
David Herrmann
cad0d410d7 uterm: split fbdev module into different files
This is the first step towards a uterm-fbdev module. It splits the huge
video file into a video backend and a render backend. A monitor backend
will follow later when a full uterm module infrastructure is available.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-11 16:24:37 +01:00
David Herrmann
81b691b742 build: link with -ldl
We use dlopen() and friends so link with libdl.so to be sure that they are
available.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-08 17:54:53 +01:00
David Herrmann
cadb3e0899 uterm: move uterm.h to uterm_monitor.h
uterm.h contains only uterm-monitor related APIs so rename it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-07 19:37:44 +01:00
David Herrmann
407a5fc158 uterm: move uterm-vt into uterm_vt.h
This splits off uterm-vt from the main header to reduce the dependencies
on uterm.h.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-07 19:31:27 +01:00
David Herrmann
2047b56c80 uterm: move input related API to uterm_input.h
This splits off the uterm-input API from uterm.h to avoid depending on
uterm.h everywhere.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-07 19:22:38 +01:00
David Herrmann
50cfef008b uterm: move video API into uterm_video.h
Split the main header to avoid having it as dependency in so many places.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-07 18:03:45 +01:00
David Herrmann
67ac019dec uterm: remove unused pciaccess helpers
We now detect primary GPUs via udev so the pciaccess helpers are no longer
needed.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-07 13:40:26 +01:00
David Herrmann
790254766e uterm: move uterm_systemd.h to uterm_systemd_internal.h
Same as uterm_input.h, we want internal headers to have the *_internal
suffix.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-07 13:24:50 +01:00
David Herrmann
0c008631d7 uterm: move uterm_video.h to uterm_video_internal.h
Same as uterm_input.h, we want internal headers to have the *_internal
suffix.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-07 13:24:09 +01:00
David Herrmann
9ad1438d55 uterm: move uterm_input.h to uterm_input_internal.h
We will split the public uterm header soon to avoid big headers. Hence,
rename internal headers to *_internal.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-07 13:18:06 +01:00
David Herrmann
77b67694d2 build: fix build without libfont.la
We still have dead dependencies on libfont.la but don't build it anymore.
Remove the dependency as it is directly linked now.

Reported-by: Vladimir Kravets
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-06 00:50:12 +01:00