summaryrefslogtreecommitdiff
path: root/recipes/trdx-config
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2012-06-03 10:07:58 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2012-06-03 10:07:58 +0200
commit075e33ca803378fa42187ecf5fd44a57e061a84a (patch)
tree3e27a24788e2ca698eecca8eda99978c4239ecc0 /recipes/trdx-config
Initial commit
Diffstat (limited to 'recipes/trdx-config')
-rw-r--r--recipes/trdx-config/angstrom-feed-configs.bb79
-rw-r--r--recipes/trdx-config/angstrom-feed-configs.bb~89
-rw-r--r--recipes/trdx-config/files/COPYING5
-rw-r--r--recipes/trdx-config/files/base-feed.conf5
-rw-r--r--recipes/trdx-config/files/inittab42
-rw-r--r--recipes/trdx-config/files/noarch-feed.conf2
-rwxr-xr-xrecipes/trdx-config/files/nvrm_daemon37
-rw-r--r--recipes/trdx-config/trdx-config.bb30
-rw-r--r--recipes/trdx-config/trdx-config.bb~30
9 files changed, 319 insertions, 0 deletions
diff --git a/recipes/trdx-config/angstrom-feed-configs.bb b/recipes/trdx-config/angstrom-feed-configs.bb
new file mode 100644
index 0000000..2e2e58c
--- /dev/null
+++ b/recipes/trdx-config/angstrom-feed-configs.bb
@@ -0,0 +1,79 @@
+DESCRIPTION = "Configuration files for online package repositories aka feeds"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+
+#PV = "${DISTRO_VERSION}"
+PR = "r17"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FEED_BASEPATH ?= "unstable/feed/"
+
+IWMMXT_FEED = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '',d)}"
+
+do_compile() {
+ mkdir -p ${S}/${sysconfdir}/opkg
+
+ for feed in base debug perl python gstreamer ; do
+ echo "src/gz ${feed} ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/${feed}" > ${S}/${sysconfdir}/opkg/${feed}-feed.conf
+ done
+
+ #trdx: make available the feeds of other, but compatible arm architectures and of the unstable feeds
+ echo "src/gz base2 ${ANGSTROM_URI}/feeds/next/ipk/eglibc/armv6/base" >> ${S}/${sysconfdir}/opkg/base-feed.conf
+ echo "src/gz base3 ${ANGSTROM_URI}/feeds/next/ipk/eglibc/armv5te/base" >> ${S}/${sysconfdir}/opkg/base-feed.conf
+ echo "src/gz base4 ${ANGSTROM_URI}/feeds/unstable/ipk/glibc/armv6/base" >> ${S}/${sysconfdir}/opkg/base-feed.conf
+ echo "src/gz base5 ${ANGSTROM_URI}/feeds/unstable/ipk/glibc/armv5te/base" >> ${S}/${sysconfdir}/opkg/base-feed.conf
+
+ echo "src/gz ${MACHINE_ARCH} ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/machine/${MACHINE_ARCH}" > ${S}/${sysconfdir}/opkg/${MACHINE_ARCH}-feed.conf
+ echo "#src/gz sdk ${ANGSTROM_URI}/${FEED_BASEPATH}sdk" > ${S}/${sysconfdir}/opkg/sdk-feed.conf
+ echo "src/gz no-arch ${ANGSTROM_URI}/${FEED_BASEPATH}all" > ${S}/${sysconfdir}/opkg/noarch-feed.conf
+
+ # iwmmxt is a special case, add the iwmmxt feed for machine that have 'iwmmxt' in MACHINE_FEATURES
+ if [ "${IWMMXT_FEED}" = "iwmmxt" ] ; then
+ echo "src/gz iwmmxt ${ANGSTROM_URI}/${FEED_BASEPATH}iwmmxt/base" > ${S}/${sysconfdir}/opkg/iwmmxt-feed.conf
+ fi
+
+
+ for localepkg in a af am an ang ar as ast ay az be bg bn br bs byn ca co crh cs csb cy da de dv dz el en eo es et eu fa ff fi fo fr fur fy ga gd gez gl gn gu gv ha haw he hi hr hsb ht hu hy ia id ig io is it iu iw ja ka kk kl km kn ko kok ks ku kw ky la lg li lo locale lt lv mai mg mi mk ml mn mr ms mt mvo my nb ne nl nn no nr nso oc om or pa pap pis pl ps pt qu ro ru rw sa sd se si sid sk sl so sp sq sr ss st sv sw syr ta te tet tg th ti tig tk tl tn tpi tr ts tt ug uk ur uz ve vi wa wal wo xh yi yo zh zu ; do
+ echo "src/gz locale-${localepkg}-feed ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/locales/${localepkg}" > ${S}/${sysconfdir}/opkg/locale-${localepkg}-feed.conf
+ done
+}
+
+
+do_install () {
+ install -d ${D}${sysconfdir}/opkg
+ install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
+}
+
+FILES_${PN} = "${sysconfdir}/opkg/base-feed.conf \
+ ${sysconfdir}/opkg/debug-feed.conf \
+ ${sysconfdir}/opkg/perl-feed.conf \
+ ${sysconfdir}/opkg/python-feed.conf \
+ ${sysconfdir}/opkg/gstreamer-feed.conf \
+ ${sysconfdir}/opkg/${MACHINE_ARCH}-feed.conf \
+ ${sysconfdir}/opkg/noarch-feed.conf \
+ ${sysconfdir}/opkg/iwmmxt-feed.conf \
+ ${sysconfdir}/opkg/sdk-feed.conf \
+ "
+
+CONFFILES_${PN} += "${sysconfdir}/opkg/base-feed.conf \
+ ${sysconfdir}/opkg/debug-feed.conf \
+ ${sysconfdir}/opkg/perl-feed.conf \
+ ${sysconfdir}/opkg/python-feed.conf \
+ ${sysconfdir}/opkg/gstreamer-feed.conf \
+ ${sysconfdir}/opkg/${MACHINE_ARCH}-feed.conf \
+ ${sysconfdir}/opkg/noarch-feed.conf \
+ ${sysconfdir}/opkg/sdk-feed.conf \
+ "
+
+# Get rid of opkg-collateral
+RCONFLICTS_${PN} = "opkg-collateral"
+RREPLACES_${PN} = "opkg-collateral"
+RPROVIDES_${PN} = "opkg-collateral"
+
+RRECOMMENDS_${PN} += "opkg"
+
+python populate_packages_prepend () {
+ etcdir = bb.data.expand('${sysconfdir}/opkg', d)
+ do_split_packages(d, etcdir, '^locale-(.*)\.conf$', 'angstrom-locale-%s-config', 'Angstrom feed config for the %s locale', extra_depends='', allow_links=True)
+}
+
diff --git a/recipes/trdx-config/angstrom-feed-configs.bb~ b/recipes/trdx-config/angstrom-feed-configs.bb~
new file mode 100644
index 0000000..fabc334
--- /dev/null
+++ b/recipes/trdx-config/angstrom-feed-configs.bb~
@@ -0,0 +1,89 @@
+DESCRIPTION = "Configuration files for online package repositories aka feeds"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=aabb"
+
+RRECOMMENDS_${PN} += "opkg"
+
+#PV = "${DISTRO_VERSION}"
+PR = "r15"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FEED_BASEPATH ?= "unstable/feed/"
+
+IWMMXT_FEED = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '',d)}"
+
+do_fetch () {
+ echo "MIT" > ${S}/COPYING
+}
+
+do_compile() {
+ mkdir -p ${S}/${sysconfdir}/opkg
+
+ rm ${S}/${sysconfdir}/opkg/arch.conf || true
+ ipkgarchs="${PACKAGE_ARCHS}"
+ priority=1
+ for arch in $ipkgarchs; do
+ echo "arch $arch $priority" >> ${S}/${sysconfdir}/opkg/arch.conf
+ priority=$(expr $priority + 5)
+ done
+
+ for feed in base debug perl python gstreamer ; do
+ echo "src/gz ${feed} ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/${feed}" > ${S}/${sysconfdir}/opkg/${feed}-feed.conf
+ done
+
+ #trdx: make available the feeds of other, but compatible arm architectures and of the unstable feeds
+ echo "src/gz base2 ${ANGSTROM_URI}/feeds/next/ipk/eglibc/armv6/base" >> ${S}/${sysconfdir}/opkg/base-feed.conf
+ echo "src/gz base3 ${ANGSTROM_URI}/feeds/next/ipk/eglibc/armv5te/base" >> ${S}/${sysconfdir}/opkg/base-feed.conf
+ echo "src/gz base4 ${ANGSTROM_URI}/feeds/unstable/ipk/glibc/armv6/base" >> ${S}/${sysconfdir}/opkg/base-feed.conf
+ echo "src/gz base5 ${ANGSTROM_URI}/feeds/unstable/ipk/glibc/armv5te/base" >> ${S}/${sysconfdir}/opkg/base-feed.conf
+
+ echo "src/gz ${MACHINE_ARCH} ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/machine/${MACHINE_ARCH}" > ${S}/${sysconfdir}/opkg/${MACHINE_ARCH}-feed.conf
+ echo "#src/gz sdk ${ANGSTROM_URI}/${FEED_BASEPATH}sdk" > ${S}/${sysconfdir}/opkg/sdk-feed.conf
+ echo "src/gz no-arch ${ANGSTROM_URI}/${FEED_BASEPATH}all" > ${S}/${sysconfdir}/opkg/noarch-feed.conf
+
+ # iwmmxt is a special case, add the iwmmxt feed for machine that have 'iwmmxt' in MACHINE_FEATURES
+ if [ "${IWMMXT_FEED}" = "iwmmxt" ] ; then
+ echo "src/gz iwmmxt ${ANGSTROM_URI}/${FEED_BASEPATH}iwmmxt/base" > ${S}/${sysconfdir}/opkg/iwmmxt-feed.conf
+ fi
+
+
+ for localepkg in a af am an ang ar as ast ay az be bg bn br bs byn ca co crh cs csb cy da de dv dz el en eo es et eu fa ff fi fo fr fur fy ga gd gez gl gn gu gv ha haw he hi hr hsb ht hu hy ia id ig io is it iu iw ja ka kk kl km kn ko kok ks ku kw ky la lg li lo locale lt lv mai mg mi mk ml mn mr ms mt mvo my nb ne nl nn no nr nso oc om or pa pap pis pl ps pt qu ro ru rw sa sd se si sid sk sl so sp sq sr ss st sv sw syr ta te tet tg th ti tig tk tl tn tpi tr ts tt ug uk ur uz ve vi wa wal wo xh yi yo zh zu ; do
+ echo "src/gz locale-${localepkg}-feed ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/locales/${localepkg}" > ${S}/${sysconfdir}/opkg/locale-${localepkg}-feed.conf
+ done
+}
+
+
+do_install () {
+ install -d ${D}${sysconfdir}/opkg
+ install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
+}
+
+FILES_${PN} = "${sysconfdir}/opkg/base-feed.conf \
+ ${sysconfdir}/opkg/debug-feed.conf \
+ ${sysconfdir}/opkg/perl-feed.conf \
+ ${sysconfdir}/opkg/python-feed.conf \
+ ${sysconfdir}/opkg/gstreamer-feed.conf \
+ ${sysconfdir}/opkg/${MACHINE_ARCH}-feed.conf \
+ ${sysconfdir}/opkg/noarch-feed.conf \
+ ${sysconfdir}/opkg/iwmmxt-feed.conf \
+ ${sysconfdir}/opkg/sdk-feed.conf \
+ ${sysconfdir}/opkg/arch.conf \
+ "
+
+
+CONFFILES_${PN} += "${sysconfdir}/opkg/base-feed.conf \
+ ${sysconfdir}/opkg/debug-feed.conf \
+ ${sysconfdir}/opkg/perl-feed.conf \
+ ${sysconfdir}/opkg/python-feed.conf \
+ ${sysconfdir}/opkg/gstreamer-feed.conf \
+ ${sysconfdir}/opkg/${MACHINE_ARCH}-feed.conf \
+ ${sysconfdir}/opkg/noarch-feed.conf \
+ ${sysconfdir}/opkg/sdk-feed.conf \
+ ${sysconfdir}/opkg/arch.conf \
+ "
+
+python populate_packages_prepend () {
+ etcdir = bb.data.expand('${sysconfdir}/opkg', d)
+ do_split_packages(d, etcdir, '^locale-(.*)\.conf$', 'angstrom-locale-%s-config', 'Angstrom feed config for the %s locale', extra_depends='', allow_links=True)
+}
+
diff --git a/recipes/trdx-config/files/COPYING b/recipes/trdx-config/files/COPYING
new file mode 100644
index 0000000..040e990
--- /dev/null
+++ b/recipes/trdx-config/files/COPYING
@@ -0,0 +1,5 @@
+This piece is software is provided by Toradex AG as sample code.
+There is no warranty for the program.
+Toradex AG put this program in public domain, uncopyrighted.
+
+Renens, Swizterland, 2008-10-23
diff --git a/recipes/trdx-config/files/base-feed.conf b/recipes/trdx-config/files/base-feed.conf
new file mode 100644
index 0000000..6fd2130
--- /dev/null
+++ b/recipes/trdx-config/files/base-feed.conf
@@ -0,0 +1,5 @@
+src/gz base http://www.angstrom-distribution.org/feeds/next/ipk/eglibc/armv7a-vfp/base
+src/gz base2 http://www.angstrom-distribution.org/feeds/next/ipk/eglibc/armv6/base
+src/gz base3 http://www.angstrom-distribution.org/feeds/next/ipk/eglibc/armv5te/base
+src/gz base4 http://www.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv6/base
+src/gz base5 http://www.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv5te/base \ No newline at end of file
diff --git a/recipes/trdx-config/files/inittab b/recipes/trdx-config/files/inittab
new file mode 100644
index 0000000..a43057d
--- /dev/null
+++ b/recipes/trdx-config/files/inittab
@@ -0,0 +1,42 @@
+# /etc/inittab: init(8) configuration.
+# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
+
+# The default runlevel.
+id:5:initdefault:
+
+# Boot-time system configuration/initialization script.
+# This is run first except when booting in emergency (-b) mode.
+si::sysinit:/etc/init.d/rcS
+
+# What to do in single-user mode.
+~~:S:wait:/sbin/sulogin
+
+# /etc/init.d executes the S and K scripts upon change
+# of runlevel.
+#
+# Runlevel 0 is halt.
+# Runlevel 1 is single-user.
+# Runlevels 2-5 are multi-user.
+# Runlevel 6 is reboot.
+
+l0:0:wait:/etc/init.d/rc 0
+l1:1:wait:/etc/init.d/rc 1
+l2:2:wait:/etc/init.d/rc 2
+l3:3:wait:/etc/init.d/rc 3
+l4:4:wait:/etc/init.d/rc 4
+l5:5:wait:/etc/init.d/rc 5
+l6:6:wait:/etc/init.d/rc 6
+# Normally not reached, but fallthrough in case of emergency.
+z6:6:respawn:/sbin/sulogin
+S:2345:respawn:/sbin/getty 115200 ttyS0
+# /sbin/getty invocations for the runlevels.
+#
+# The "id" field MUST be the same as the last
+# characters of the device (after "tty").
+#
+# Format:
+# <id>:<runlevels>:<action>:<process>
+#
+
+1:2345:respawn:/sbin/getty 115200 tty1
+
diff --git a/recipes/trdx-config/files/noarch-feed.conf b/recipes/trdx-config/files/noarch-feed.conf
new file mode 100644
index 0000000..d2b1835
--- /dev/null
+++ b/recipes/trdx-config/files/noarch-feed.conf
@@ -0,0 +1,2 @@
+src/gz no-arch http://www.angstrom-distribution.org/feeds/next/ipk/eglibc/all
+src/gz no-arch2 http://www.angstrom-distribution.org/feeds/unstable/ipk/glibc/all
diff --git a/recipes/trdx-config/files/nvrm_daemon b/recipes/trdx-config/files/nvrm_daemon
new file mode 100755
index 0000000..c3a9268
--- /dev/null
+++ b/recipes/trdx-config/files/nvrm_daemon
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Start or stop the Nvidia Ressource Manager Daemon.
+#
+# Based on debian apmd scripts
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+case "$1" in
+ start)
+ echo -n "Nvidia Ressource Manager Daemon: "
+ start-stop-daemon -S -x /bin/nvrm_daemon -- --daemon &
+ if [ $? = 0 ]; then
+ echo "nvrm_daemon."
+ else
+ echo "(failed.)"
+ fi
+ ;;
+ stop)
+ echo -n "Nvidia Ressource Manager Daemon: "
+ start-stop-daemon -K -x /bin/nvrm_daemon
+ echo "nvrm_daemon."
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ exit
+ ;;
+ *)
+ echo "Usage: /etc/init.d/nvrm_daemon {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/recipes/trdx-config/trdx-config.bb b/recipes/trdx-config/trdx-config.bb
new file mode 100644
index 0000000..81c0191
--- /dev/null
+++ b/recipes/trdx-config/trdx-config.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "setup files"
+LICENSE = "Public Domain"
+PR = "r2"
+
+inherit update-rc.d
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI = " file://inittab \
+ file://nvrm_daemon \
+ file://COPYING \
+ "
+LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING;md5=1c3a7fb45253c11c74434676d84fe7dd"
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "/etc/* ${sysconfdir}"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+DEPENDS_${PN} += "update-rc.d"
+RDEPENDS_${PN} += "update-rc.d"
+
+do_install () {
+ install -d ${D}/etc/init.d
+ install -m 0644 ${WORKDIR}/inittab ${D}/etc/
+ install -m 0755 ${WORKDIR}/nvrm_daemon ${D}/etc/init.d
+}
+
+INITSCRIPT_NAME = "nvrm_daemon"
+INITSCRIPT_PARAMS = "defaults 91" \ No newline at end of file
diff --git a/recipes/trdx-config/trdx-config.bb~ b/recipes/trdx-config/trdx-config.bb~
new file mode 100644
index 0000000..ce6e1b9
--- /dev/null
+++ b/recipes/trdx-config/trdx-config.bb~
@@ -0,0 +1,30 @@
+DESCRIPTION = "setup files"
+LICENSE = "Public Domain"
+PR = "r2"
+
+inherit update-rc.d
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI = " file://inittab \
+ file://nvrm_daemon \
+ file://COPYING \
+ "
+LIC_FILES_CHKSUM = "file://COPYING;md5=1c3a7fb45253c11c74434676d84fe7dd"
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "/etc/* ${sysconfdir}"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+DEPENDS_${PN} += "update-rc.d"
+RDEPENDS_${PN} += "update-rc.d"
+
+do_install () {
+ install -d ${D}/etc/init.d
+ install -m 0644 ${WORKDIR}/inittab ${D}/etc/
+ install -m 0755 ${WORKDIR}/nvrm_daemon ${D}/etc/init.d
+}
+
+INITSCRIPT_NAME = "nvrm_daemon"
+INITSCRIPT_PARAMS = "defaults 91" \ No newline at end of file