summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2013-03-27 16:58:42 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2013-03-27 16:58:42 +0100
commitbc5f5a67a5850d2a68527d37de6b512854a72f93 (patch)
treeb4017f97c090a33fddc7e74458759dae60ce5ea7
parent45be656793b6def38c70b2db61eada176b4d6e90 (diff)
images: added a QT4 X11 image
- bbappends to the base qt4-x11-free recipe to use OpenGL ES2 - script which starts X plus qtdemo, including a systemd service to activate script
-rw-r--r--recipes-qt/qt4/qt4-x11-free-systemd.bb24
-rw-r--r--recipes-qt/qt4/qt4-x11-free-systemd/qtdemo-init60
-rw-r--r--recipes-qt/qt4/qt4-x11-free-systemd/qtdemo.service10
-rw-r--r--recipes-qt/qt4/qt4-x11-free_4.8.1.bbappend7
-rw-r--r--recipes-qt/qt4/qt4-x11-free_4.8.3.bbappend7
-rw-r--r--recipes/images/angstrom-qt-x11-image.bb175
6 files changed, 283 insertions, 0 deletions
diff --git a/recipes-qt/qt4/qt4-x11-free-systemd.bb b/recipes-qt/qt4/qt4-x11-free-systemd.bb
new file mode 100644
index 0000000..2c8227c
--- /dev/null
+++ b/recipes-qt/qt4/qt4-x11-free-systemd.bb
@@ -0,0 +1,24 @@
+SECTION = "x11/libs"
+DESCRIPTION = "qtdemo autostart"
+RDEPENDS_${PN} = ""
+# The license is meant for this recipe and the files it installs.
+# RNDIS is part of the kernel, udhcpd is part of busybox
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+PR = "r1"
+
+inherit allarch systemd
+
+SRC_URI = "file://qtdemo.service \
+ file://qtdemo-init "
+
+FILES_${PN} += " ${sysconfdir}/init.d "
+do_install () {
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/qtdemo-init ${D}/${sysconfdir}/init.d/
+}
+
+NATIVE_SYSTEMD_SUPPORT = "1"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "qtdemo.service"
diff --git a/recipes-qt/qt4/qt4-x11-free-systemd/qtdemo-init b/recipes-qt/qt4/qt4-x11-free-systemd/qtdemo-init
new file mode 100644
index 0000000..e9ed869
--- /dev/null
+++ b/recipes-qt/qt4/qt4-x11-free-systemd/qtdemo-init
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+set -e
+
+if [ -f /usr/bin/qtdemo ]; then
+ QTVARIANT="X11"
+ QTDEMO="qtdemo > /var/log/Xsession.log 2>&1"
+else
+ QTVARIANT=""
+ QTDEMO="qtdemoE -qws"
+fi
+
+case "$1" in
+ start)
+ echo "Starting qtdemo"
+ if [ -f /etc/profile.d/tslib.sh ]; then
+ source /etc/profile.d/tslib.sh
+ fi
+ if [ -e "$TSLIB_TSDEVICE" ]; then
+ if [ ! -f /etc/pointercal ]; then
+ /usr/bin/ts_calibrate
+ fi
+ if [ "$QTVARIANT" == X11 ]; then
+ Xorg &
+ export DISPLAY=:0
+ eval $QTDEMO &
+ else
+ QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
+ fi
+ else
+ if [ -e "/usr/bin/xinput_calibrator_once.sh" ]; then
+ xinput_calibrator_once.sh
+ fi
+ if [ "$QTVARIANT" == X11 ]; then
+ Xorg &
+ export DISPLAY=:0
+ fi
+ eval $QTDEMO &
+ fi
+ ;;
+ stop)
+ echo "Stopping qtdemo"
+ if [ "$QTVARIANT" == X11 ]; then
+ killall Xorg
+ killall qtdemo
+ else
+ killall qtdemoE
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 { start | stop | restart }" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/recipes-qt/qt4/qt4-x11-free-systemd/qtdemo.service b/recipes-qt/qt4/qt4-x11-free-systemd/qtdemo.service
new file mode 100644
index 0000000..22ed75d
--- /dev/null
+++ b/recipes-qt/qt4/qt4-x11-free-systemd/qtdemo.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=start X and qtdemo
+
+[Service]
+Type=forking
+ExecStart=/etc/init.d/qtdemo-init start
+ExecStop=/etc/init.d/qtdemo-init stop
+
+[Install]
+WantedBy=graphical.target
diff --git a/recipes-qt/qt4/qt4-x11-free_4.8.1.bbappend b/recipes-qt/qt4/qt4-x11-free_4.8.1.bbappend
new file mode 100644
index 0000000..d1aa300
--- /dev/null
+++ b/recipes-qt/qt4/qt4-x11-free_4.8.1.bbappend
@@ -0,0 +1,7 @@
+PRINC = "1"
+
+# Build OpenGL/ES support if available
+
+QT_GLFLAGS_colibri-t20 = " -opengl es2 -no-neon "
+QT_GLFLAGS_colibri-t30 = " -opengl es2 -no-neon "
+QT_GLFLAGS_apalis-t30 = " -opengl es2 -no-neon "
diff --git a/recipes-qt/qt4/qt4-x11-free_4.8.3.bbappend b/recipes-qt/qt4/qt4-x11-free_4.8.3.bbappend
new file mode 100644
index 0000000..c996471
--- /dev/null
+++ b/recipes-qt/qt4/qt4-x11-free_4.8.3.bbappend
@@ -0,0 +1,7 @@
+PRINC = "1"
+
+# Build OpenGL/ES support if available
+
+QT_GLFLAGS_colibri-t20 = "-opengl es2 "
+QT_GLFLAGS_colibri-t30 = "-opengl es2 "
+QT_GLFLAGS_apalis-t30 = "-opengl es2 "
diff --git a/recipes/images/angstrom-qt-x11-image.bb b/recipes/images/angstrom-qt-x11-image.bb
new file mode 100644
index 0000000..6774ca6
--- /dev/null
+++ b/recipes/images/angstrom-qt-x11-image.bb
@@ -0,0 +1,175 @@
+#Angstrom image
+DESCRIPTION = "Image based on qt4-x11-free"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+PV = "V2.0"
+PR = "r3"
+
+#start of the resulting deployable tarball name
+IMAGE_NAME_colibri-t20 = "T20_LinuxImage-qt"
+IMAGE_NAME_colibri-t30 = "T30_LinuxImage-qt"
+IMAGE_NAME_apalis-t30 = "ApalisT30_LinuxImage-qt"
+IMAGE_NAME_colibri-pxa = "PXA_LinuxImage-qt"
+
+#create the deployment directory-tree
+require trdx-image-fstype.inc
+
+#create the file /etc/timestamp
+IMAGE_PREPROCESS_COMMAND = "rootfs_update_timestamp"
+
+#remove interfering sysv scripts, connman systemd service
+ROOTFS_POSTINSTALL_COMMAND = "for i in ${IMAGE_ROOTFS}/etc/rc0.d ${IMAGE_ROOTFS}/etc/rc1.d ${IMAGE_ROOTFS}/etc/rc2.d ${IMAGE_ROOTFS}/etc/rc3.d ${IMAGE_ROOTFS}/etc/rc4.d ${IMAGE_ROOTFS}/etc/rc5.d ${IMAGE_ROOTFS}/etc/rc6.d ${IMAGE_ROOTFS}/etc/rcS.d ; do rm -f $i/*dropbear $i/*avahi-daemon $i/*dbus-1 $i/*lxdm $i/*ntpd $i/*syslog $i/*ofono $i/*alsa-state $i/*networking $i/*udev-late-mount $i/*sendsigs $i/*save-rtc.sh $i/*umountnfs.sh $i/*portmap $i/*umountfs $i/*halt $i/*rmnologin.sh $i/*reboot; rm -f $i/*banner.sh $i/*sysfs.sh $i/*checkroot.sh $i/*alignment.sh $i/*mountall.sh $i/*populate-volatile.sh $i/*devpts.sh $i/*hostname.sh $i/*portmap $i/*mountnfs.sh $i/*bootmisc.sh ; done"
+
+#IMAGE_LINGUAS = ""
+IMAGE_LINGUAS = "en-us"
+
+DISTRO_UPDATE_ALTERNATIVES ??= ""
+ROOTFS_PKGMANAGE_PKGS ?= '${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "${ROOTFS_PKGMANAGE} ${DISTRO_UPDATE_ALTERNATIVES}", d)}'
+
+CONMANPKGS ?= "connman connman-plugin-loopback connman-plugin-ethernet connman-plugin-wifi"
+CONMANPKGS_libc-uclibc = ""
+
+DEPENDS += "gst-plugins-good gst-plugins-bad gst-plugins-ugly"
+
+#deploy the OpenGL ES headers to the sysroot
+DEPENDS += "nvsamples"
+
+#build some ipk which are needed together with CAN, but do not yet install them
+DEPENDS += "canutils libsocketcan iproute2"
+
+# this would pull in a large amount of gst-plugins, we only add a selected few
+# gst-plugins-base-meta
+# gst-plugins-good-meta
+# gst-plugins-bad-meta
+# gst-ffmpeg
+
+# needed by nvidia commandline player
+# libpcre
+
+# these were in the oe classic image
+IMAGE_INSTALL_CLASSIC = " \
+xdg-utils \
+xvinfo \
+\
+file \
+initscripts \
+libgsf \
+polkit-gnome \
+libwnck \
+libxres \
+makedevs \
+mime-support \
+zeroconf \
+"
+
+IMAGE_INSTALL_QT4 = " \
+ qt4-x11-free \
+ qt4-xmlpatterns \
+ libqt3support4 \
+ libqtclucene4 \
+ libqtcore4 \
+ libqtdbus4 \
+ libqtgui4 \
+ libqthelp4 \
+ libqtmultimedia4 \
+ libqtnetwork4 \
+ libqtscript4 \
+ libqtscripttools4 \
+ libqtsql4 \
+ libqtsvg4 \
+ libqttest4 \
+ libqtwebkit4 \
+ libqtxml4 \
+ qt4-plugin-iconengine-svgicon \
+ qt4-plugin-imageformat-gif \
+ qt4-plugin-imageformat-ico \
+ qt4-plugin-imageformat-jpeg \
+ qt4-plugin-imageformat-mng \
+ qt4-plugin-imageformat-svg \
+ qt4-plugin-imageformat-tga \
+ qt4-plugin-imageformat-tiff \
+ qt4-plugin-phonon-backend-gstreamer \
+ qt4-plugin-script-dbus \
+ qt4-plugin-sqldriver-sqlite \
+ qt4-demos \
+ qt4-x11-free-systemd \
+ qt4-examples \
+ qt4-assistant \
+ icu \
+"
+
+IMAGE_INSTALL += " \
+ ${IMAGE_INSTALL_QT4} \
+ ${IMAGE_INSTALL_CLASSIC} \
+ angstrom-packagegroup-boot \
+ task-basic \
+ udev-extra-rules \
+ ${CONMANPKGS} \
+ ${ROOTFS_PKGMANAGE_PKGS} \
+ timestamp-service \
+ task-base-extended \
+ ${XSERVER} \
+ xserver-common \
+ xserver-xorg-extension-dbe \
+ xserver-xorg-extension-extmod \
+ xserver-xorg-extension-extmod \
+ xauth \
+ xhost \
+ xset \
+ setxkbmap \
+ \
+ xrandr \
+ xrdb \
+ xorg-minimal-fonts xserver-xorg-multimedia-modules xserver-xorg-utils \
+ \
+ libxdamage libxvmc libxinerama \
+ libxcursor \
+ \
+ bash \
+ tinylogin \
+ \
+ gstreamer \
+ gst-plugins-base \
+ gst-plugins-base-alsa \
+ gst-plugins-base-audioconvert \
+ gst-plugins-base-audioresample \
+ gst-plugins-base-audiotestsrc \
+ gst-plugins-base-decodebin \
+ gst-plugins-base-decodebin2 \
+ gst-plugins-base-playbin \
+ gst-plugins-base-typefindfunctions \
+ gst-plugins-base-ivorbisdec \
+ gst-plugins-base-ogg \
+ gst-plugins-base-theora \
+ gst-plugins-base-videotestsrc \
+ gst-plugins-base-vorbis \
+ gst-plugins-good-audioparsers \
+ gst-plugins-good-autodetect \
+ gst-plugins-good-avi \
+ gst-plugins-good-id3demux \
+ gst-plugins-good-isomp4 \
+ gst-plugins-good-matroska \
+ gst-plugins-good-rtp \
+ gst-plugins-good-udp \
+ gst-plugins-good-video4linux2 \
+ gst-plugins-good-wavenc \
+ gst-plugins-good-wavparse \
+ gst-plugins-ugly-asf \
+ libpcre \
+ libpcreposix \
+ libxcomposite \
+ alsa-states \
+"
+
+require trdx-extra.inc
+
+IMAGE_DEV_MANAGER = "udev"
+IMAGE_INIT_MANAGER = "systemd"
+IMAGE_INITSCRIPTS = " "
+IMAGE_LOGIN_MANAGER = "tinylogin shadow"
+
+export IMAGE_BASENAME = "qt-image"
+
+inherit core-image