`最近试着搞搞远程桌面,需要配置conf文件。
- # i.MX DISTRO for X11 with no wayland
- include conf/distro/include/myir-imx-base.inc
- include conf/distro/include/myir-imx-preferred-env.inc
- DISTRO = "myir-imx-x11"
- # Remove conflicting backends.
- DISTRO_FEATURES_remove = "wayland"
- # These are X11 specific
- DISTRO_FEATURES_append = " x11"
保存为myir-imx-x11.conf 存放在sourcesmeta-myir-imx6ulxconfdistro文件夹下。
然后
DISTRO=myir-imx-x11 MACHINE=mys6ull14x14 source fsl-setup-release.sh
接下来修改local.conf文件
- MACHINE ??= 'mys6ull14x14'
- DISTRO ?= 'myir-imx-x11'
- PACKAGE_CLASSES ?= "package_rpm"
- EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
- USER_CLASSES ?= "buildstats image-mklibs"
- PATCHRESOLVE = "noop"
- BB_DISKMON_DIRS = "
- STOPTASKS,${TMPDIR},1G,100K
- STOPTASKS,${DL_DIR},1G,100K
- STOPTASKS,${SSTATE_DIR},1G,100K
- STOPTASKS,/tmp,100M,100K
- ABORT,${TMPDIR},100M,1K
- ABORT,${DL_DIR},100M,1K
- ABORT,${SSTATE_DIR},100M,1K
- ABORT,/tmp,10M,1K"
- PACKAGECONFIG_append_pn-qemu-native = " sdl"
- PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
- CONF_VERSION = "1"
- DL_DIR ?= "${BSPDIR}/downloads/"
- ACCEPT_FSL_EULA = "1"
- CORE_IMAGE_EXTRA_INSTALL += "openssh
- x11vnc"
添加x11vnc。
截下来要添加一个补丁文件“remove-redundant-RPATH.patch”。
- From 7be055c13c7d0d640941830a3291af3b404928c1 Mon Sep 17 00:00:00 2001
- From: Hongxu Jia
- Date: Mon, 27 Jun 2016 04:44:14 -0400
- Subject: [PATCH] configure.ac: remove redundant RPATH
- It caused oe QA issue:
- ...
- |ERROR: QA Issue: x11vnc: work/i586-poky-linux/x11vnc/0.9.13-r0/packages-split/
- x11vnc/usr/bin/x11vnc contains probably-redundant RPATH /usr/lib [useless-rpaths]
- ...
- Upstream-Status: Inappropriate [oe specific]
- Signed-off-by: Hongxu Jia
- ---
- configure.ac | 21 +++++----------------
- 1 file changed, 5 insertions(+), 16 deletions(-)
- diff --git a/configure.ac b/configure.ac
- index 6f664d0..f986686 100644
- --- a/configure.ac
- +++ b/configure.ac
- [url=home.php?mod=space&uid=1999721]@@[/url] -330,10 +330,8 @@ if test "x$with_crypto" != "xno" -a "x$with_ssl" != "xno"; then
- saved_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$CPPFLAGS -I$with_ssl/include"
- LDFLAGS="$LDFLAGS -L$with_ssl/lib"
- - if test "x$ld_minus_R" = "xno"; then
- + if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
- :
- - elif test "x$GCC" = "xyes"; then
- - LDFLAGS="$LDFLAGS -Xlinker -R$with_ssl/lib"
- else
- LDFLAGS="$LDFLAGS -R$with_ssl/lib"
- fi
- @@ -447,10 +445,8 @@ if test ! -z "$with_system_libvncserver" -a "x$with_system_libvncserver" != "xno
- fi
- if test "x$with_system_libvncserver" != "xyes"; then
- rflag=""
- - if test "x$ld_minus_R" = "xno"; then
- + if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
- :
- - elif test "x$GCC" = "xyes"; then
- - rflag="-Xlinker -R$with_system_libvncserver/lib"
- else
- rflag="-R$with_system_libvncserver/lib"
- fi
- @@ -484,10 +480,8 @@ new enough.
- elif libvncserver-config --version 1>/dev/null 2>&1; then
- rflag=""
- rprefix=`libvncserver-config --prefix`
- - if test "x$ld_minus_R" = "xno"; then
- + if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
- :
- - elif test "x$GCC" = "xyes"; then
- - rflag=" -Xlinker -R$rprefix/lib "
- else
- rflag=" -R$rprefix/lib "
- fi
- @@ -541,11 +535,8 @@ if test "x$with_jpeg" != "xno"; then
- saved_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$CPPFLAGS -I$with_jpeg/include"
- LDFLAGS="$LDFLAGS -L$with_jpeg/lib"
- - if test "x$ld_minus_R" = "xno"; then
- + if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
- :
- - elif test "x$GCC" = "xyes"; then
- - # this is not complete... in general a rat's nest.
- - LDFLAGS="$LDFLAGS -Xlinker -R$with_jpeg/lib"
- else
- LDFLAGS="$LDFLAGS -R$with_jpeg/lib"
- fi
- @@ -590,10 +581,8 @@ if test "x$with_zlib" != "xno" -a "x$with_libz" != "xno"; then
- saved_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$CPPFLAGS -I$with_zlib/include"
- LDFLAGS="$LDFLAGS -L$with_zlib/lib"
- - if test "x$ld_minus_R" = "xno"; then
- + if test "x$ld_minus_R" = "xno" -o "x$GCC" = "xyes"; then
- :
- - elif test "x$GCC" = "xyes"; then
- - LDFLAGS="$LDFLAGS -Xlinker -R$with_zlib/lib"
- else
- LDFLAGS="$LDFLAGS -R$with_zlib/lib"
- fi
- --
- 2.8.1
然后存放在sourcesmeta-openembeddedmeta-oe
ecipes-graphicsx11vncfiles
修改x11vnc_0.9.13.bb文件
- SUMMARY = "Exports your X session on-the-fly via VNC"
- HOMEPAGE = "http://www.karlrunge.com/x11vnc/"
- SECTION = "x11/utils"
- AUTHOR = "Karl Runge"
- LICENSE = "GPLv2+"
- LIC_FILES_CHKSUM = "file://COPYING;md5=361b6b837cad26c6900a926b62aada5f
- file://x11vnc/x11vnc.h;endline=33;md5=6f95dc6535467d7ee1563fd434fb372e"
- SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/x11vnc/${PV}/x11vnc-${PV}.tar.gz
- file://starting-fix.patch
- file://endian-fix.patch
- file://remove-redundant-RPATH.patch "
- SRC_URI[md5sum] = "a372ec4fe8211221547b1c108cf56e4c"
- SRC_URI[sha256sum] = "f6829f2e629667a5284de62b080b13126a0736499fe47cdb447aedb07a59f13b"
- DEPENDS = "openssl virtual/libx11 libxext jpeg zlib libxfixes libxrandr libxdamage libxtst libtasn1 p11-kit"
- inherit autotools-brokensep distro_features_check
- # depends on virtual/libx11
- REQUIRED_DISTRO_FEATURES = "x11"
- PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} libvncserver"
- PACKAGECONFIG[avahi] = "--with-avahi,--without-avahi,avahi"
- PACKAGECONFIG[xinerama] = "--with-xinerama,--without-xinerama,libxinerama"
- PACKAGECONFIG[libvncserver] = "--with-system-libvncserver,--without-system-libvncserver,libvncserver"
- do_prepare_sources () {
- # Remove old libtool macros from acinclude.m4
- sed -i -e '/^# libtool.m4/q' ${S}/acinclude.m4
- }
- do_patch[postfuncs] += "do_prepare_sources"
修改如下:
SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/x11vnc/${PV}/x11vnc-${PV}.tar.gz
file://starting-fix.patch
file://endian-fix.patch
file://remove-redundant-RPATH.patch "
添加:file://remove-redundant-RPATH.patch
接下来就可以正常编译了!!
最后说说如何启动vnc
设置密码:x11vnc -storepasswd
启动:x11vnc -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth .vnc/passwd -rfbport 5900
启动.vnc/passwd是设置密码时生成的文件。
最后附上效果图:
`