2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

webOS Open Source Edition の観察(3)

Last updated at Posted at 2018-04-19

waylandについて少々。
waylandでXサーバに相当するプロセスはどれかを探してみる。

waylandのライブラリ

/usr/lib/libwayland-* でシンボリックリンクのものを除くと以下のようなものがある。

# ls -l /usr/lib/libwayland-* |grep -v -- '->'
-rwxr-xr-x    1 root     root         31060 Apr  3  2018 /usr/lib/libwayland-client.so.0.3.0
-rwxr-xr-x    1 root     root         26392 Apr  3  2018 /usr/lib/libwayland-cursor.so.0.0.0
-rwxr-xr-x    1 root     root          5676 Apr  3  2018 /usr/lib/libwayland-egl.so.1.0.0
-rwxr-xr-x    1 root     root         39412 Apr  3  2018 /usr/lib/libwayland-server.so.0.1.0
-rwxr-xr-x    1 root     root         14192 Apr  3  2018 /usr/lib/libwayland-webos-client.so.1.0.0
-rwxr-xr-x    1 root     root         14192 Apr  3  2018 /usr/lib/libwayland-webos-server.so.1.0.0

名前から推測して、Xサーバーに相当する実行ファイルはlibwayland-server.so かlibwayland-webos-server をリンクしているだろう。
これらをリンクしている実行ファイルを探してみる。

webOSにはlddコマンドが入っていないが、/lib/ld-linux-armhf.so.3 --list で代用できる。

surface-manager

YouTubeの動画を再生しているときのtop を見ると、WebAppMgr か surface-manager のどちらかがそれらしい。

# /lib/ld-linux-armhf.so.3 --list /usr/bin/surface-manager |grep wayland
	libwayland-webos-server.so.1 => /usr/lib/libwayland-webos-server.so.1 (0x7617f000)
	libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0x76174000)

surface-manager がXサーバーに相当するプロセスだと判明。

# /lib/ld-linux-armhf.so.3 --list /usr/bin/surface-manager 
	linux-vdso.so.1 (0x7eec0000)
	/lib/libSegFault.so (0x76fd2000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x76f06000)
	libWebOSCoreCompositor.so.0 => /usr/lib/libWebOSCoreCompositor.so.0 (0x76e9b000)
	libQt5Quick.so.5 => /usr/lib/libQt5Quick.so.5 (0x76c45000)
	libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0x768f5000)
	libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x7654a000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x76447000)
	libc.so.6 => /lib/libc.so.6 (0x7630c000)
	libunwind-arm.so.8 => /usr/lib/libunwind-arm.so.8 (0x762d9000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x762bd000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x76288000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x7625f000)
	libPmLogLib.so.3 => /usr/lib/libPmLogLib.so.3 (0x76253000)
	libwayland-webos-server.so.1 => /usr/lib/libwayland-webos-server.so.1 (0x7624e000)
	libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0x76243000)
	libWebOSCoreCompositorExtension.so.0 => /usr/lib/libWebOSCoreCompositorExtension.so.0 (0x7623d000)
	libQt5Compositor.so.5 => /usr/lib/libQt5Compositor.so.5 (0x761d0000)
	libQt5Qml.so.5 => /usr/lib/libQt5Qml.so.5 (0x75f55000)
	libGLESv2.so.2 => /usr/lib/libGLESv2.so.2 (0x75f4b000)
	libQt5Network.so.5 => /usr/lib/libQt5Network.so.5 (0x75e51000)
	libm.so.6 => /lib/libm.so.6 (0x75dd1000)
	libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x75d74000)
	libz.so.1 => /lib/libz.so.1 (0x75d64000)
	libpng16.so.16 => /usr/lib/libpng16.so.16 (0x75d44000)
	libicui18n.so.57 => /usr/lib/libicui18n.so.57 (0x75bb4000)
	libicuuc.so.57 => /usr/lib/libicuuc.so.57 (0x75aa2000)
	libdl.so.2 => /lib/libdl.so.2 (0x75a8f000)
	librt.so.1 => /lib/librt.so.1 (0x75a78000)
	/lib/ld-linux-armhf.so.3 (0x54b51000)
	libunwind.so.8 => /usr/lib/libunwind.so.8 (0x75a49000)
	libpbnjson_c.so.2 => /usr/lib/libpbnjson_c.so.2 (0x75a23000)
	libffi.so.6 => /usr/lib/libffi.so.6 (0x75a1c000)
	libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x759ea000)
	libdrm.so.2 => /usr/lib/libdrm.so.2 (0x759df000)
	libglapi.so.0 => /usr/lib/libglapi.so.0 (0x759ba000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7595f000)
	libicudata.so.57 => /usr/lib/libicudata.so.57 (0x740e1000)
	libyajl.so.2 => /usr/lib/libyajl.so.2 (0x740da000)
	liburiparser.so.1 => /usr/lib/liburiparser.so.1 (0x740ca000)
	libgmp.so.10 => /usr/lib/libgmp.so.10 (0x74084000)

surface-manager が開いているデバイスファイル

# ls -l /proc/`pidof surface-manager`/fd |grep dev
lr-x------    1 root     root            64 Apr  3 09:11 0 -> /dev/null
lrwx------    1 root     root            64 Apr  3 09:11 10 -> /dev/dri/card0
lr-x------    1 root     root            64 Apr  3 09:11 14 -> /dev/input/event0
lr-x------    1 root     root            64 Apr  3 09:11 15 -> /dev/input/event2
lr-x------    1 root     root            64 Apr  3 09:11 16 -> /dev/input/event3
lr-x------    1 root     root            64 Apr  3 09:11 18 -> /dev/input/event1
lrwx------    1 root     root            64 Apr  3 09:11 3 -> /dev/shm/pmloglib.lock
lrwx------    1 root     root            64 Apr  3 09:11 7 -> /dev/dri/card0
lrwx------    1 root     root            64 Apr  3 09:11 8 -> /dev/dri/card0
lrwx------    1 root     root            64 Apr  3 09:11 9 -> /dev/dri/card0

/dev/input/event* を見ている。これはマウスやキーボードなどの入力デバイス。
描画には /dev/dri/card0 を使っているようだ。
dri は "Direct Rendering Infrastructure" のことらしい。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?