供給された中国および英国のRockchipの源に基づくArmSoMのプラットホームの参照。 実際のボード、SOC、SDK/BSP、カーネル、周辺機器を個別にマッチさせる。これは、ArmSoMボードの全てのサポートを要求しません。 ソース例と測定はArmSoMテストではありません。 コマンドやハードウェアテストは実行されません。
Rockchip Buildroot SDK でカスタマイズしたWeston を適用します。これらの拡張変数は、上流ウェストンでは保証されません。
オリジナルのV1.4.5と、すべての設定は§2.16で保持されます。 スタンドアローンの技術的な数字はありません。 コマンドでPDFをラップするだけで、数学やコメントが修復され、パラメータ値が変更されない。 同じ変数の繰り返しエクスポートは、卸売を実行するための非修飾スクリプトではなく代替手段を実証します。 楕円を含む関数は不完全な例です。
CN/EN の違い: §2.16 は、中国語と > /tmp/.weston_drm.conf (上書き) で >> /tmp/.weston_drm.conf (上書き) を使用します。 それぞれが保持されます。RU/DEは英語に従う。 実際のSDKの動的設定パーサを確認してください。
1. . 導入事例 {#1-introduction}
1.1 概要 {#11-overview}
WestonはWaylandのオープンソース表示プロトコルの公式実装リファレンスで、WestonのdrumバックエンドはデフォルトではRockchip Buildroot SDKで使用されます。 GitHubから最新のカスタム・ウェストンコードを取得:https://github.com/JeffyCN/weston
1.2 設定方法 {#12-configuration-methods}
Rockchip Buildroot SDK Weston: a を構成する方法は複数あります。 コマンドラインオプションは、Weston –tty=2 などの西尾起動時にコマンドのオプションです。 SDK コードのロケーションに対応する /etc/init.d/S49weston にあります。 b. weston.ini 設定ファイル /etc/xdg/weston/weston.ini と /etc/xdg/weston/weston.ini.d/ に、SDK コードの位置に対応する: buildroot/board/rockchip/common/base/etc/xdg/weston/weston.ini. 参照して下さい: https://fossies.org/linux/weston/man/weston.ini.man. c. 一般的には、これらの環境変数は、SDKコードの位置に対応する /etc/profile.d/weston.sh で設定されます。 buildroot/package/weston/weston.sh. d. 動的設定ファイル drmバックエンドの場合、Buildroot SDK Westonは動的設定サポートを提供しています。デフォルトパスは/tmp/.weston_drm.confで、環境変数WESTON_DRM_CONFIGで指定できます。例えばudevルール udevルール udevルールで、入力デバイスの構成の一部をudevルールで設定する必要があります。
2. . 設定 {#2-configuration}
2.1 画面を識別する {#21-identify-screens}
Westonは出力(ヘッド)の名前を使用して画面を識別します。 名称は、ウェストンの起動ログから確認できます。
# weston&
[02:11:29.746] DRM: head 'DSI-1' found ...
2.2 カーソルの構成 {#22-cursor-configuration}
Westonは、weston.ini設定ファイルのシェルセクションでカーソルのテーマとサイズを設定しています。例えば:
# /etc/xdg/weston/weston.ini
[shell]
cursor-theme=whiteglass # Buildroot SDK supports comix/obsidian/xcursor/xcursor-transparent cursor theme packages.
cursor-size=24
2.3 ステータスバーの構成 {#23-status-bar-configuration}
Westonは、weston.ini設定ファイルのシェルセクションにあるステータスバーの背景色、位置、スケールを設定し、ランチャーセクションでクイックスタートプログラムを設定するようサポートしています。
# /etc/xdg/weston/weston.ini
[shell]
panel-color=0x90ff0000
# the color format is ARGB8888
panel-position=bottom
# top|bottom|left|right|none,none is disable
panel-scale=4
# scale up by 4
[launcher]
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
# icon path
path=/usr/bin/gnome-terminal
# quick start command
2.4 背景構成 {#24-background-configuration}
Westonは、weston.ini設定ファイルのシェルセクションで背景パターンと色を設定し、デスクトップランチャーセクションでクイックスタートプログラムを設定することができます。
# /etc/xdg/weston/weston.ini
[shell]
background-image=/usr/share/backgrounds/gnome/Aqua.jpg
# Background pattern (wallpaper) absolute path
background-type=tile
# scale|scale-crop|tile
background-color=0xff002244
# The color format is ARGB8888, effective when no background pattern is set
[desktop-launcher]
icon=/usr/share/icons/hicolor/256x256/apps/chromium.png
# icon path
path=/usr/bin/chromium www.baidu.com
# quick start command
displayname=chromium
# display name
2.5 のひしゃくの時間およびロック スクリーン構成 {#25-idle-time-and-lock-screen-configuration}
Westonのアイドルタイムアウトは、コマンドオプションやweston.iniのコアセクションで設定できます。
# /etc/init.d/S49weston
start_weston()
{
/usr/bin/weston --idle-time=0& # 0 means idle mode is disabled, in seconds
}
または
# /etc/xdg/weston/weston.ini
[core]
idle-time=10
ウェストンのロック画面は、次のようなweston.iniのシェルセクションで設定できます。
# /etc/xdg/weston/weston.ini
[shell]
locking=false
# lock screen is disabled
lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png
# unlock button icon
lockscreen=/usr/share/backgrounds/gnome/Garden.jpg
# background of lock screen
2.6 カラーフォーマット構成 {#26-color-format-configuration}
ビルドルートSDKのウェストンのデフォルト表示形式はARGB8888です。 いくつかの低パフォーマンスプラットフォームでは、weston.iniのコアセクションでRGB565を設定することができます。
# /etc/xdg/weston/weston.ini
[core]
gbm-format=rgb565
# xrgb8888|argb8888|rgb565|xrgb2101010
また、次のようなweston.iniの出力セクションで各画面のディスプレイ形式を個別に設定することもできます。
# /etc/xdg/weston/weston.ini
[output]
name=LVDS-1
gbm-format=rgb565
# xrgb8888|argb8888|rgb565|xrgb2101010
2.7 表示方向構成 {#27-display-orientation-configuration}
画面の表示のオリエンテーションは、weston.iniの出力セクションで形成することができます。
# /etc/xdg/weston/weston.ini
[output]
name=LVDS-1
transform=rotate-90
# normal|rotate-90|rotate-180|rotate-270|flipped|flipped-90|flipped-180|flipped-270
オリエンテーションを動的に設定したい場合、以下のような動的設定ファイルを使うことができます。
echo "output:all:rotate90" > /tmp/.weston_drm.conf # All screens rotate 90 degrees
echo "output:eDP-1:rotate180" > /tmp/.weston_drm.conf # eDP-1 rotates 180 degrees
2.8 決断およびスケールの構成 {#28-resolution-and-scale-configuration}
画面の解像度とWeekonのスケールは、次のようなweston.iniの出力セクションで設定できます。
# /etc/xdg/weston/weston.ini
[output]
name=LVDS-1
mode=1280x800
# should be an effective resolution supported by the screen
scale=2
# value must be an integer, support application level scaling
特定の解像度(物理的解像度を変更することなく)にスケールしたいなら、WESTON_DRM_VIRTUAL_SIZE環境変数を介してすべての画面で設定できます。
# /etc/profile.d/weston.sh
export WESTON_DRM_VIRTUAL_SIZE=1024x768
解像度とスケーリングを動的に設定したい場合、例えば、動的設定ファイルを使うことができます。
echo "output:HDMI-A-1:mode=800x600" > /tmp/.weston_drm.conf # change the resolution of HDMI-A-1 to 800x600
echo "output:eDP-1:rect=<10,20,410,620>" > /tmp/.weston_drm.conf # eDP-1 display to the position of (10,20), the size is scaled to 400x600
echo "output:HDMI-A-1:size=1920x1080" > /tmp/.weston_drm.conf # HDMI-A-1 scale to 1080p, the physical resolution is unchanged.
VOPハードウェアがスケーリングをサポートしていない場合、これらのスケールはRockchipのRGA 2D加速が必要です。
2.9 スクリーンを凍結する {#29-freeze-the-screen}
Westonが起動すると、ブートロゴとUIディスプレイを一時的に切り替える黒い画面があります。 この黒い画面を防止したい場合は、次の方法で一時的にWeston画面コンテンツを凍結することができます。 Westonのコマンドオプションに–warm-upを追加
# /etc/init.d/S49weston
start_weston()
{
/usr/bin/weston --warm-up&
}
または
# /etc/init.d/S49weston
start_weston()
{
export WESTON_FREEZE_DISPLAY=/tmp/.weston_freeze # Set a special configuration file path
touch /tmp/.weston_freeze # Freeze the display
/usr/bin/weston&
sleep 1 && rm /tmp/.weston_freeze& # unfreeze after 1 second
}
または
# /etc/init.d/S49weston
start_weston()
{
echo "output:all:freeze" > /tmp/.weston_drm.conf # Freeze the display
/usr/bin/weston&
...
sleep 1 && \
echo "output:all:unfreeze" > /tmp/.weston_drm.conf& # unfreeze after 1 second
}
2.10 スクリーンの状態の構成 {#210-screen-status-configuration}
DRMフレームワークは、画面の強制ステータスの設定をサポートしています。
echo on > /sys/class/drm/card0-HDMI-A-1/status # Force HDMI-A-1 connected
#on|off|detect, detect means hot-plug
より特定の画面の状態設定では、例えば動的設定ファイルを使うことができます。
echo "output:DSI-1:off" > /tmp/.weston_drm.conf # Turn off screen
echo "output:HDMI-A-1:freeze" > /tmp/.weston_drm.conf # Freeze screen
echo "output:eDP-1:on" > /tmp/.weston_drm.conf # Turn on screen
echo "output:HDMI-A-1:state=on" > /tmp/.weston_drm.conf #Force connected(should set screen mode on in weston.ini)
echo "output:DSI-1:state=off" > /tmp/.weston_drm.conf #Force disconnected
echo "output:DSI-1:state=detect" > /tmp/.weston_drm.conf #Use hot-plug
echo "compositor:state:off" > /tmp/.weston_drm.conf # Turn off display
echo "compositor:state:freeze" > /tmp/.weston_drm.conf # Freeze display
echo "compositor:state:sleep" > /tmp/.weston_drm.conf # Turn off display and touch to wake
echo "compositor:state:on" > /tmp/.weston_drm.conf # Turn on display
2.11 多スクリーン構成 {#211-multi-screen-configuration}
Buildroot SDK Westonは、ミラーディスプレイ、拡張ディスプレイ、画面位置設定、ホットプラグ機能をサポートしています。 ミラーリング表示では、VOPハードウェアがスケーリングや回転をサポートしていないときにRockchipのRGA 2Dアクセラレーションを使用するようにします。 これらの設定は、環境変数で設定できます。例えば:
# /etc/profile.d/weston.sh
export WESTON_DRM_PRIMARY=HDMI-A-1 # Specify HDMI-A-1 as primary monitor
export WESTON_DRM_SINGLE_HEAD=1 # Force using single monitor
export WESTON_DRM_MIRROR=1 # In mirror mode (multi-screen with the same display), without setting this environment variable will be with different display
export WESTON_DRM_KEEP_RATIO=1 # In mirror mode, scaling maintains the aspect ratio, without setting this variable will be full screen by force
export WESTON_DRM_HEAD_MODE=primary # Only enable primary monitor
export WESTON_DRM_HEAD_MODE=internal # Only enable internal monitors
export WESTON_DRM_HEAD_MODE=external # Only enable external monitors
export WESTON_DRM_HEAD_MODE=external-dual # Enable all monitors, and prefer the external ones
export WESTON_DRM_HEAD_FALLBACK=1 # Fallback to any available monitor when none matched
export WESTON_DRM_MASTER=1 # Allow disabling unused monitors
export WESTON_OUTPUT_FLOW=horizontal # Laying outputs horizontally by default
export WESTON_OUTPUT_FLOW=vertical # Laying outputs vertically by default
export WESTON_OUTPUT_FLOW=same-as # Laying outputs at (0,0) by default
また、weston.iniの出力セクションで、指定した画面を個別に無効化することもできます。
# /etc/xdg/weston/weston.ini
[output]
name=LVDS-1
mode=off
# off|current|preferred|<WIDTHxHEIGHT@RATE>
動的設定ファイルは次のようになります。
echo "output:HDMI-A-1:pos=100,200" > /tmp/.weston_drm.conf # Set HDMI's position
echo "output:HDMI-A-1:prefer" > /tmp/.weston_drm.conf # Show apps on HDMI by default
echo "output:HDMI-A-1:primary" > /tmp/.weston_drm.conf # Specify HDMI as primary
echo "output:HDMI-A-1:pin" > /tmp/.weston_drm.conf # Try to pin later views to the screen
入力デバイスの2.12構成 {#212-configuration-of-input-devices}
Westonサービスはデフォルトで少なくとも1つの入力デバイスが必要です。 入力デバイスがない場合、weston.iniのコアセクションの特別な設定が必要です。
# /etc/xdg/weston/weston.ini
[core]
require-input=false
Westonに複数の画面がある場合、udevルールのWL_OUTPUT envを経由して、入力デバイスを画面に結合することができます。
# /lib/udev/rules.d/99-goodix-ts.rules
ATTRS{name}=="goodix-ts", ENV{WL_OUTPUT}="HDMI-A-1"
または WL_SEAT の env、のような:
# /lib/udev/rules.d/99-goodix-ts.rules
ATTRS{name}=="goodix-ts", ENV{WL_SEAT}="seat1"
# /etc/xdg/weston/weston.ini
[output]
name=LVDS-1
seat=seat1
または、例えば動的設定ファイルを使用します。
echo "output:HDMI-A-1:input=*" > /tmp/.weston_drm.conf # Match all devices
echo "output:HDMI-A-1:input=" > /tmp/.weston_drm.conf # Disallow all devices
echo "output:HDMI-A-1:input=event6" > /tmp/.weston_drm.conf
echo "output:HDMI-A-1:input=goodix*" > /tmp/.weston_drm.conf
echo "output:HDMI-A-1:input=goodix-ts" > /tmp/.weston_drm.conf
入力デバイスのベンダーID、製品ID、デバイス名は、evtestツールで取得できます。
# evtest /dev/input/event8 | head -3
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0xdead product 0xbeef version 0x28bb
Input device name: "goodix-ts"
2.13 入力デバイスの校正 {#213-calibration-of-input-devices}
タッチ画面を校正する必要がある場合は、次のようなWESTON_TOUCH_CALIBRATION環境を使用できます。
# /etc/profile.d/weston.sh
export WESTON_TOUCH_CALIBRATION="1.013788 0.0 -0.061495 0.0 1.332709 -0.276154"
または、udev ルールで設定する:
# /lib/udev/rules.d/99-goodix-ts.rules
ATTRS{name}=="goodix-ts", ENV{LIBINPUT_CALIBRATION_MATRIX}="1.013788 0.0 -0.061495 0.0 1.332709 -0.276154"
または、例えば動的設定ファイルを使用します。
echo "calibration:event9:-1 0 1 0 -1 1" > /tmp/.weston_drm.conf
echo "calibration:goodix-ts:1 0 0 0 -1 1" > /tmp/.weston_drm.conf
echo "calibration:event9:restore" > /tmp/.weston_drm.conf # Restore the previous setting
echo "calibration:goodix-ts:clear" > /tmp/.weston_drm.conf # Clear all settings
校正パラメータは、ウェストンキャリブレーションツール:Weston-calibratorで取得できます。 このツールを実行した後、ランダムポイントの数が生成され、次のようなキャリブレーションパラメータを出力するためにシーケンスでクリックします。: 最終的なキャリブレーション値: 1.013788 0.0 -0.061495 0.0 1.332709 -0.276154
または、新しいWestonタッチキャリブレータを使用できます。Weston-touch-calibratorは、次の機能を使用します。
# /etc/xdg/weston/weston.ini
[libinput]
touchscreen_calibrator=true
calibration_helper=/bin/weston-calibration-helper.sh
GPUなしでプラットフォーム上の2.14構成 {#214-configuration-on-the-platform-without-gpu}
SDK の Weston は、デフォルトでレンダリングアクセラレーションに GPU を使用します。 GPUやGPUのないプラットフォームでは、十分な強力ではありません。代わりにRockchipRGA 2Dアクセラレーションも使用できます。 詳細な設定では、ビルドルートSDKでBR2_PACKAGE_LINUX_RGAとBR2_PACKAGE_WESTON_DEFAULT_PIXMANを有効にする必要があります。
2.15 ARM AFBC修飾子 {#215-arm-afbc-modifier}
AFBCをサポートするチップは、GPUベースのARM AFBC圧縮フォーマットを使用したSDKサポートのWestonです。
# /etc/profile.d/weston.sh
# export WESTON_DISABLE_ATOMIC=1
export WESTON_ALLOW_GBM_MODIFIERS=1
2.16 UIの解像度を下げる {#216-lower-ui-resolution}
UI のパフォーマンスや DDR のバグを報告するときは、UI の解像度を下げることが可能になります。
echo "output:HDMI-A-1:down-scale=0.5" > /tmp/.weston_drm.conf
