Browse Source

visionfive2: x11-common: Change the LD_LIBRARY_PATH & binary location
This is needed only for Xorg specific DDK, lws-generic DDK should use the default config/service files.
These files will replace the default files before do_install.

Signed-off-by: weiheng.cheng <weiheng.cheng@starfivetech.com>

weiheng.cheng 11 months ago
parent
commit
f762b5f994

+ 8 - 0
recipes-graphics/x11-common/files/xserver-nodm-local.conf.in

@@ -0,0 +1,8 @@
+# common environment file for sysvinit and systemd
+
+XSERVER=/usr/local/bin/Xorg
+LD_LIBRARY_PATH=/usr/local/lib/
+DISPLAY=:0
+ARGS=" -br -pn "
+HOME=@HOME@
+USER=@USER@

+ 12 - 0
recipes-graphics/x11-common/files/xserver-nodm-local.service.in

@@ -0,0 +1,12 @@
+[Unit]
+Description=Xserver startup without a display manager
+
+[Service]
+EnvironmentFile=/etc/default/xserver-nodm
+Environment="LD_LIBRARY_PATH=/usr/local/lib/"
+User=@USER@
+ExecStart=/etc/xserver-nodm/Xserver
+Restart=always
+
+[Install]
+Alias=display-manager.service

+ 12 - 0
recipes-graphics/x11-common/xserver-nodm-init_%.bbappend

@@ -0,0 +1,12 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI += " \
+	file://xserver-nodm-local.conf.in \
+	file://xserver-nodm-local.service.in \
+	"
+
+do_install:prepend() {
+	# Replace the systemd service & config to change the LD_LIBRARY_PATH & binary location
+	cp xserver-nodm-local.conf.in ${THISDIR}/${PN}/xserver-nodm.conf.in
+	cp xserver-nodm-local.service.in ${THISDIR}/${PN}/xserver-nodm.service.in
+}