From 075e33ca803378fa42187ecf5fd44a57e061a84a Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sun, 3 Jun 2012 10:07:58 +0200 Subject: Initial commit --- recipes/base-files/base-files/colibri-t20/fstab | 14 + recipes/base-files/base-files/colibri-t30/fstab | 14 + recipes/base-files/base-files_3.0.14.bbappend | 5 + recipes/gpioconfig/files/GPIOConfig.desktop | 11 + recipes/gpioconfig/files/GPIOConfig.desktop~ | 11 + recipes/gpioconfig/files/GPIOConfig.png | Bin 0 -> 340 bytes recipes/gpioconfig/files/Makefile | 31 + recipes/gpioconfig/gpioconfig.bb | 44 + recipes/gpioconfig/gpioconfig.bb~ | 44 + recipes/images/angstrom-lxde-image.bb | 102 +++ recipes/images/angstrom-lxde-image.bb~ | 103 +++ recipes/images/console-trdx-image.bb | 43 + recipes/images/console-trdx-image.bb~ | 44 + recipes/images/lx.inc | 39 + recipes/images/lx.inc~ | 39 + recipes/images/trdx-extra.inc | 56 ++ recipes/images/trdx-extra.inc.orig | 52 ++ recipes/images/trdx-extra.inc~ | 55 ++ recipes/joe/joe_3.1.bb | 15 + recipes/joe/joe_3.1.bb~ | 15 + recipes/stress/stress_1.0.0.bb | 14 + recipes/stress/stress_1.0.4.bb | 15 + recipes/stress/stress_1.0.4.bb~ | 15 + recipes/tegrastats-gtk/files/Makefile | 17 + recipes/tegrastats-gtk/files/main.c | 975 +++++++++++++++++++++ recipes/tegrastats-gtk/files/stats.c | 42 + recipes/tegrastats-gtk/tegrastats-gtk.bb | 17 + recipes/tegrastats-gtk/tegrastats-gtk.bb~ | 16 + recipes/trdx-config/angstrom-feed-configs.bb | 79 ++ recipes/trdx-config/angstrom-feed-configs.bb~ | 89 ++ recipes/trdx-config/files/COPYING | 5 + recipes/trdx-config/files/base-feed.conf | 5 + recipes/trdx-config/files/inittab | 42 + recipes/trdx-config/files/noarch-feed.conf | 2 + recipes/trdx-config/files/nvrm_daemon | 37 + recipes/trdx-config/trdx-config.bb | 30 + recipes/trdx-config/trdx-config.bb~ | 30 + recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb | 15 + recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb~ | 15 + 39 files changed, 2197 insertions(+) create mode 100644 recipes/base-files/base-files/colibri-t20/fstab create mode 100644 recipes/base-files/base-files/colibri-t30/fstab create mode 100644 recipes/base-files/base-files_3.0.14.bbappend create mode 100755 recipes/gpioconfig/files/GPIOConfig.desktop create mode 100755 recipes/gpioconfig/files/GPIOConfig.desktop~ create mode 100644 recipes/gpioconfig/files/GPIOConfig.png create mode 100755 recipes/gpioconfig/files/Makefile create mode 100644 recipes/gpioconfig/gpioconfig.bb create mode 100644 recipes/gpioconfig/gpioconfig.bb~ create mode 100644 recipes/images/angstrom-lxde-image.bb create mode 100644 recipes/images/angstrom-lxde-image.bb~ create mode 100644 recipes/images/console-trdx-image.bb create mode 100644 recipes/images/console-trdx-image.bb~ create mode 100644 recipes/images/lx.inc create mode 100644 recipes/images/lx.inc~ create mode 100644 recipes/images/trdx-extra.inc create mode 100644 recipes/images/trdx-extra.inc.orig create mode 100644 recipes/images/trdx-extra.inc~ create mode 100644 recipes/joe/joe_3.1.bb create mode 100644 recipes/joe/joe_3.1.bb~ create mode 100644 recipes/stress/stress_1.0.0.bb create mode 100644 recipes/stress/stress_1.0.4.bb create mode 100644 recipes/stress/stress_1.0.4.bb~ create mode 100644 recipes/tegrastats-gtk/files/Makefile create mode 100644 recipes/tegrastats-gtk/files/main.c create mode 100644 recipes/tegrastats-gtk/files/stats.c create mode 100644 recipes/tegrastats-gtk/tegrastats-gtk.bb create mode 100644 recipes/tegrastats-gtk/tegrastats-gtk.bb~ create mode 100644 recipes/trdx-config/angstrom-feed-configs.bb create mode 100644 recipes/trdx-config/angstrom-feed-configs.bb~ create mode 100644 recipes/trdx-config/files/COPYING create mode 100644 recipes/trdx-config/files/base-feed.conf create mode 100644 recipes/trdx-config/files/inittab create mode 100644 recipes/trdx-config/files/noarch-feed.conf create mode 100755 recipes/trdx-config/files/nvrm_daemon create mode 100644 recipes/trdx-config/trdx-config.bb create mode 100644 recipes/trdx-config/trdx-config.bb~ create mode 100644 recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb create mode 100644 recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb~ (limited to 'recipes') diff --git a/recipes/base-files/base-files/colibri-t20/fstab b/recipes/base-files/base-files/colibri-t20/fstab new file mode 100644 index 0000000..fea4501 --- /dev/null +++ b/recipes/base-files/base-files/colibri-t20/fstab @@ -0,0 +1,14 @@ +# stock fstab - you probably want to override this with a machine specific one + +rootfs / auto defaults 1 1 +proc /proc proc defaults 0 0 +debugfs /sys/kernel/debug debugfs defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbfs /proc/bus/usb usbfs defaults 0 0 +tmpfs /var/volatile tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +tmpfs /media/ram tmpfs defaults 0 0 + +# uncomment this if your device has a SD/MMC/Transflash slot +#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 + diff --git a/recipes/base-files/base-files/colibri-t30/fstab b/recipes/base-files/base-files/colibri-t30/fstab new file mode 100644 index 0000000..fea4501 --- /dev/null +++ b/recipes/base-files/base-files/colibri-t30/fstab @@ -0,0 +1,14 @@ +# stock fstab - you probably want to override this with a machine specific one + +rootfs / auto defaults 1 1 +proc /proc proc defaults 0 0 +debugfs /sys/kernel/debug debugfs defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbfs /proc/bus/usb usbfs defaults 0 0 +tmpfs /var/volatile tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +tmpfs /media/ram tmpfs defaults 0 0 + +# uncomment this if your device has a SD/MMC/Transflash slot +#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 + diff --git a/recipes/base-files/base-files_3.0.14.bbappend b/recipes/base-files/base-files_3.0.14.bbappend new file mode 100644 index 0000000..1615df3 --- /dev/null +++ b/recipes/base-files/base-files_3.0.14.bbappend @@ -0,0 +1,5 @@ +PRINC = "2" + +THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}" +FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}"], d)}:" + diff --git a/recipes/gpioconfig/files/GPIOConfig.desktop b/recipes/gpioconfig/files/GPIOConfig.desktop new file mode 100755 index 0000000..18467ab --- /dev/null +++ b/recipes/gpioconfig/files/GPIOConfig.desktop @@ -0,0 +1,11 @@ +#!/usr/bin/env xdg-open + +[Desktop Entry] +Version=1.0 +Type=Application +Terminal=false +Icon[C]=GPIOConfig.png +Exec=/usr/bin/GPIOConfig +Name[C]=GPIOConfig +Name=GPIOConfig +Icon=GPIOConfig.png diff --git a/recipes/gpioconfig/files/GPIOConfig.desktop~ b/recipes/gpioconfig/files/GPIOConfig.desktop~ new file mode 100755 index 0000000..4a0e9ac --- /dev/null +++ b/recipes/gpioconfig/files/GPIOConfig.desktop~ @@ -0,0 +1,11 @@ +#!/usr/bin/env xdg-open + +[Desktop Entry] +Version=1.0 +Type=Application +Terminal=false +Icon[C]=gnome-panel-launcher +Exec=/usr/bin/GPIOConfig +Name[C]=GPIOConfig +Name=GPIOConfig +Icon=/usr/share/pixmaps/GPIOConfig.png diff --git a/recipes/gpioconfig/files/GPIOConfig.png b/recipes/gpioconfig/files/GPIOConfig.png new file mode 100644 index 0000000..2227e81 Binary files /dev/null and b/recipes/gpioconfig/files/GPIOConfig.png differ diff --git a/recipes/gpioconfig/files/Makefile b/recipes/gpioconfig/files/Makefile new file mode 100755 index 0000000..2b0143d --- /dev/null +++ b/recipes/gpioconfig/files/Makefile @@ -0,0 +1,31 @@ +CROSS_COMPILE ?= /vibrante/toolchains/tegra2-4.4.1-nv/bin/arm-none-linux-gnueabi- +CC ?= $(CROSS_COMPILE)gcc +STRIP ?= $(CROSS_COMPILE)strip + +SYSROOT_DIR=/srv/nfs/rootfs-include-lib-gtk +prefix = "" +bindir = $(prefix)/usr/bin + +CFLAGS ?= -Wall -g -O2 `pkg-config --cflags gtk+-2.0` + +#DRV = gpio_usr_drv + +PROG = GPIOConfig + +OBJS = gpio_gtk.o custom-list.o gpio_usr_drv.o + +all: $(OBJS) +# $(CC) -o $(DRV) $(DRV).c + $(CC) -o $(PROG) $(OBJS) $(LDFLAGS) `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` -L $(SYSROOT_DIR)/usr/lib -Wl,--allow-shlib-undefined + $(STRIP) $(PROG) + +%o: %c + $(CC) $(CFLAGS) $(CPPFLAGS) `pkg-config --cflags gtk+-2.0` -c $< + +clean: + rm -f $(DRV) $(PROG) $(OBJS) *.o~ *.h~ 2>/dev/null + +install: + install -d $(bindir) + install $(PROG) $(bindir) + diff --git a/recipes/gpioconfig/gpioconfig.bb b/recipes/gpioconfig/gpioconfig.bb new file mode 100644 index 0000000..2c27a46 --- /dev/null +++ b/recipes/gpioconfig/gpioconfig.bb @@ -0,0 +1,44 @@ +DESCRIPTION = "GPIOConfig tool for Colibri T20" +SECTION = "base" +LICENSE = "propriatry" +PR = "r3" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +DEPENDS = "gtk+" +RDEPENDS = "gtk+" + +S = "${WORKDIR}/target-utils/GPIOConfig" + +SVN_REV = "190" +SRC_URI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/trunk;module=target-utils/GPIOConfig;rev=${SVN_REV};proto=http" +#SRC_URI += "file://Makefile" +SRC_URI += "file://GPIOConfig.desktop" +SRC_URI += "file://GPIOConfig.png" + +PACKAGES = "${PN}" + +# just don't do any configuring +do_configure() { +} + +do_install() { + install -d ${D}/${bindir} + install -d ${D}/${datadir}/applications + install -d ${D}/${datadir}/pixmaps + install ${S}/GPIOConfig ${D}/${bindir} + install ${WORKDIR}/GPIOConfig.desktop ${D}/${datadir}/applications + install ${WORKDIR}/GPIOConfig.png ${D}/${datadir}/pixmaps/GPIOConfig.png +} + +pkg_postinst_${PN}() { + mkdir -p ${base_prefix}/home/root/Desktop + cp ${datadir}/applications/GPIOConfig.desktop ${base_prefix}/home/root/Desktop/ +} + +pkg_postremove_${PN}() { + rm -f ${base_prefix}/home/Desktop/GPIOConfig.desktop +} + + + diff --git a/recipes/gpioconfig/gpioconfig.bb~ b/recipes/gpioconfig/gpioconfig.bb~ new file mode 100644 index 0000000..e5e6435 --- /dev/null +++ b/recipes/gpioconfig/gpioconfig.bb~ @@ -0,0 +1,44 @@ +DESCRIPTION = "GPIOConfig tool for Colibri T20" +SECTION = "base" +LICENSE = "propriatry" +PR = "r3" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +DEPENDS = "gtk+" +RDEPENDS = "gtk+" + +S = "${WORKDIR}/target-utils/GPIOConfig" + +SVN_REV = "230" +SRC_URI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/trunk;module=target-utils/GPIOConfig;rev=${SVN_REV};proto=http" +#SRC_URI += "file://Makefile" +SRC_URI += "file://GPIOConfig.desktop" +SRC_URI += "file://GPIOConfig.png" + +PACKAGES = "${PN}" + +# just don't do any configuring +do_configure() { +} + +do_install() { + install -d ${D}/${bindir} + install -d ${D}/${datadir}/applications + install -d ${D}/${datadir}/pixmaps + install ${S}/GPIOConfig ${D}/${bindir} + install ${WORKDIR}/GPIOConfig.desktop ${D}/${datadir}/applications + install ${WORKDIR}/GPIOConfig.png ${D}/${datadir}/pixmaps/GPIOConfig.png +} + +pkg_postinst_${PN}() { + mkdir -p ${base_prefix}/home/root/Desktop + cp ${datadir}/applications/GPIOConfig.desktop ${base_prefix}/home/root/Desktop/ +} + +pkg_postremove_${PN}() { + rm -f ${base_prefix}/home/Desktop/GPIOConfig.desktop +} + + + diff --git a/recipes/images/angstrom-lxde-image.bb b/recipes/images/angstrom-lxde-image.bb new file mode 100644 index 0000000..1b7b314 --- /dev/null +++ b/recipes/images/angstrom-lxde-image.bb @@ -0,0 +1,102 @@ +#Angstrom image +DESCRIPTION = "Image based on the LXDE desktop" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" + +#create the file /etc/timestamp +IMAGE_PREPROCESS_COMMAND = "rootfs_update_timestamp" + +#IMAGE_LINGUAS = "" +#IMAGE_LINGUAS = "en-us" +#IMAGE_LINGUAS = "de-de fr-fr en-gb en-us pt-br es-es kn-in ml-in ta-in" +#ROOTFS_POSTPROCESS_COMMAND += 'install_linguas; ' + +#MAYBE WE WILL NEED THESE ALSO: +# xorg-minimal-fonts xserver-xorg-multimedia-modules xerver-xorg-utils xrandr + +IMAGE_SPLASH = "psplash-angstrom" + +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 connman-systemd" +CONMANPKGS_libc-uclibc = "" + +DEPENDS += "gst-plugins-good gst-plugins-bad gst-plugins-ugly" + +# Additional X libs not pulled in by any package \ +# xtrans libxdamage libxvmc libxinerama libxevie \ + +# Required for starting X but not RDEPEND by the using package \ +# libxcursor \ + +# glib-2.0 has some additional packages which are not pulled in, let's do this here \ +# gobject-2.0 gmodule-2.0 gthread-2.0 gio-2.0 \ + +# 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 \ + +IMAGE_INSTALL += " \ + angstrom-task-boot \ + task-basic \ + ${CONMANPKGS} \ + ${ROOTFS_PKGMANAGE_PKGS} \ + task-base-extended \ + ${IMAGE_SPLASH} \ + ${XSERVER} \ + \ + 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-matroska \ + gst-plugins-good-rtp \ + gst-plugins-good-udp \ + gst-plugins-good-avi \ + gst-plugins-good-wavenc \ + gst-plugins-good-wavparse \ + gst-plugins-ugly-asf \ + libpcre \ + libxcomposite \ + firefox \ + flash-plugins \ +" +#libxevie +# gst-plugin-qtdemux \ +# gst-plugin-mpegdemux \ + +include lx.inc +include trdx-extra.inc + +IMAGE_DEV_MANAGER = "udev" +IMAGE_INIT_MANAGER = "sysvinit sysvinit-pidof" +IMAGE_INITSCRIPTS = "initscripts" +IMAGE_LOGIN_MANAGER = "tinylogin shadow" + +export IMAGE_BASENAME = "LXDE-image" + +inherit image diff --git a/recipes/images/angstrom-lxde-image.bb~ b/recipes/images/angstrom-lxde-image.bb~ new file mode 100644 index 0000000..8e39f51 --- /dev/null +++ b/recipes/images/angstrom-lxde-image.bb~ @@ -0,0 +1,103 @@ +#Angstrom image +DESCRIPTION = "Image based on the LXDE desktop" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" + +#create the file /etc/timestamp +IMAGE_PREPROCESS_COMMAND = "rootfs_update_timestamp" + +#IMAGE_LINGUAS = "" +#IMAGE_LINGUAS = "en-us" +#IMAGE_LINGUAS = "de-de fr-fr en-gb en-us pt-br es-es kn-in ml-in ta-in" +#ROOTFS_POSTPROCESS_COMMAND += 'install_linguas; ' + +#MAYBE WE WILL NEED THESE ALSO: +# xorg-minimal-fonts xserver-xorg-multimedia-modules xerver-xorg-utils xrandr + +IMAGE_SPLASH = "psplash-angstrom" + +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 connman-systemd" +CONMANPKGS_libc-uclibc = "" + +DEPENDS += "gst-plugins-good gst-plugins-bad gst-plugins-ugly" + +# Additional X libs not pulled in by any package \ +# xtrans libxdamage libxvmc libxinerama libxevie \ + +# Required for starting X but not RDEPEND by the using package \ +# libxcursor \ + +# glib-2.0 has some additional packages which are not pulled in, let's do this here \ +# gobject-2.0 gmodule-2.0 gthread-2.0 gio-2.0 \ + +# 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 \ + +IMAGE_INSTALL += " \ + angstrom-task-boot \ + task-basic \ + ${CONMANPKGS} \ + ${ROOTFS_PKGMANAGE_PKGS} \ + task-base-extended \ + ${IMAGE_SPLASH} \ + ${XSERVER} \ + \ + libxdamage libxvmc libxinerama \ + libxcursor \ + xtrans \ + \ + 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-matroska \ + gst-plugins-good-rtp \ + gst-plugins-good-udp \ + gst-plugins-good-avi \ + gst-plugins-good-wavenc \ + gst-plugins-good-wavparse \ + gst-plugins-ugly-asf \ + libpcre \ + libxcomposite \ + firefox \ + flash-plugins \ +" +#libxevie +# gst-plugin-qtdemux \ +# gst-plugin-mpegdemux \ + +include lx.inc +include trdx-extra.inc + +IMAGE_DEV_MANAGER = "udev" +IMAGE_INIT_MANAGER = "sysvinit sysvinit-pidof" +IMAGE_INITSCRIPTS = "initscripts" +IMAGE_LOGIN_MANAGER = "tinylogin shadow" + +export IMAGE_BASENAME = "LXDE-image" + +inherit image diff --git a/recipes/images/console-trdx-image.bb b/recipes/images/console-trdx-image.bb new file mode 100644 index 0000000..5531579 --- /dev/null +++ b/recipes/images/console-trdx-image.bb @@ -0,0 +1,43 @@ +#Angstrom image +DESCRIPTION = "Image booting to a console" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" + +#create the file /etc/timestamp +IMAGE_PREPROCESS_COMMAND = "rootfs_update_timestamp" + +#IMAGE_LINGUAS = "" +#IMAGE_LINGUAS = "en-us" +#IMAGE_LINGUAS = "de-de fr-fr en-gb en-us pt-br es-es kn-in ml-in ta-in" +#ROOTFS_POSTPROCESS_COMMAND += 'install_linguas; ' + +ZZAPSPLASH = ' ${@base_contains("MACHINE_FEATURES", "screen", "psplash-zap", "",d)}' + +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 connman-systemd" +CONMANPKGS_libc-uclibc = "" + + +IMAGE_INSTALL += " \ + angstrom-task-boot \ + task-basic \ + ${CONMANPKGS} \ + ${ROOTFS_PKGMANAGE_PKGS} \ + task-base-extended \ + ${SPLASH} \ + ${ZZAPSPLASH} \ +" + +include trdx-extra.inc + +IMAGE_DEV_MANAGER = "udev" +IMAGE_INIT_MANAGER = "sysvinit sysvinit-pidof" +IMAGE_INITSCRIPTS = "initscripts" +IMAGE_LOGIN_MANAGER = "tinylogin shadow" + +export IMAGE_BASENAME = "console-trdx-image" + +inherit image diff --git a/recipes/images/console-trdx-image.bb~ b/recipes/images/console-trdx-image.bb~ new file mode 100644 index 0000000..8d56094 --- /dev/null +++ b/recipes/images/console-trdx-image.bb~ @@ -0,0 +1,44 @@ +#Angstrom image +DESCRIPTION = "Image booting to a console" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" + +#create the file /etc/timestamp +IMAGE_PREPROCESS_COMMAND = "rootfs_update_timestamp" + +#IMAGE_LINGUAS = "" +#IMAGE_LINGUAS = "en-us" +#IMAGE_LINGUAS = "de-de fr-fr en-gb en-us pt-br es-es kn-in ml-in ta-in" +#ROOTFS_POSTPROCESS_COMMAND += 'install_linguas; ' + +ZZAPSPLASH = ' ${@base_contains("MACHINE_FEATURES", "screen", "psplash-zap", "",d)}' + +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 connman-systemd" +CONMANPKGS_libc-uclibc = "" + + +IMAGE_INSTALL += " \ + angstrom-task-boot \ + task-basic \ + ${CONMANPKGS} \ + ${ROOTFS_PKGMANAGE_PKGS} \ + task-base-extended \ + ${ANGSTROM_EXTRA_INSTALL} \ + ${SPLASH} \ + ${ZZAPSPLASH} \ +" + +include trdx-extra.inc + +IMAGE_DEV_MANAGER = "udev" +IMAGE_INIT_MANAGER = "sysvinit sysvinit-pidof" +IMAGE_INITSCRIPTS = "initscripts" +IMAGE_LOGIN_MANAGER = "tinylogin shadow" + +export IMAGE_BASENAME = "console-trdx-image" + +inherit image diff --git a/recipes/images/lx.inc b/recipes/images/lx.inc new file mode 100644 index 0000000..9716522 --- /dev/null +++ b/recipes/images/lx.inc @@ -0,0 +1,39 @@ +IMAGE_INSTALL += " \ + task-lxde-extended \ + \ + xinput-calibrator \ + \ + lxde-common \ + openbox \ + openbox-theme-clearlooks \ + openbox-theme-onyx \ + lxde-icon-theme \ + hicolor-icon-theme \ + lxdm \ + lxsession \ + lxmenu-data \ + menu-cache \ + lxappearance \ + obconf \ + lxrandr \ + lxpanel \ + \ + lxtask \ + lxpolkit \ + lxsession-edit \ + \ + lxshortcut \ + lxlauncher \ + pcmanfm \ + leafpad \ + gpicview \ + lxterminal \ + lxinput \ +" +# angstrom-task-lxde \ +# task-lxde-xserver \ +# task-lxde-xserver-base \ +# lxappearance-obconf \ +# xkbd \ +# xcursor-themes \ +# policykit-gnome \ diff --git a/recipes/images/lx.inc~ b/recipes/images/lx.inc~ new file mode 100644 index 0000000..1d9cfad --- /dev/null +++ b/recipes/images/lx.inc~ @@ -0,0 +1,39 @@ +IMAGE_INSTALL += " \ + task-lxde-extended \ + \ + xinput-calibrator \ + \ + lxde-common \ + openbox \ + openbox-theme-clearlooks \ + openbox-theme-onyx \ + lxde-icon-theme \ + hicolor-icon-theme \ + lxdm \ + lxsession \ + lxmenu-data \ + menu-cache \ + lxappearance \ + obconf \ + lxpanel \ + \ + lxtask \ + lxpolkit \ + lxsession-edit \ + \ + lxshortcut \ + lxlauncher \ + pcmanfm \ + leafpad \ + gpicview \ + lxterminal \ + lxinput \ +" +# angstrom-task-lxde \ +# task-lxde-xserver \ +# task-lxde-xserver-base \ +# xkbd \ +# xcursor-themes \ +# lxappearance-obconf \ +# lxrandr \ +# policykit-gnome \ diff --git a/recipes/images/trdx-extra.inc b/recipes/images/trdx-extra.inc new file mode 100644 index 0000000..145e6f5 --- /dev/null +++ b/recipes/images/trdx-extra.inc @@ -0,0 +1,56 @@ +#additional packages to include in our Toradex images + +#the following builds cross gdb +DEPENDS += "gdb-cross" + +#the gdb recipe provides gdbserver +DEPENDS += "gdb" + +IMAGE_INSTALL_MACHINE_colibri-t20 += " \ + trdx-odm \ +" +IMAGE_INSTALL_MACHINE += " \ +" + +IMAGE-INSTALL += " \ + alsa-utils \ + alsa-utils-aplay \ + alsa-utils-amixer \ + \ + \ + aspell \ + consolekit \ + sqlite3 \ + \ + curl \ + ntp \ + nfs-utils-client \ + openssh-scp \ + openssh-sftp \ + pam-plugin-ck-connector \ + \ + bzip2 \ + gdbserver \ + grep \ + joe \ + ldd \ + mtd-utils \ + update-modules \ + \ + hdparm \ + iperf \ + memtester \ + stress \ + lmbench \ + nbench-byte \ + \ + trdx-nv-binaries \ + ${IMAGE_INSTALL_MACHINE} \ + trdx-config \ + \ + trdx-oak-sensors \ +" +# tegrastats \ +# gpioconfig \ +# openssl-conf \ +# ntpclient \ diff --git a/recipes/images/trdx-extra.inc.orig b/recipes/images/trdx-extra.inc.orig new file mode 100644 index 0000000..09d7d09 --- /dev/null +++ b/recipes/images/trdx-extra.inc.orig @@ -0,0 +1,52 @@ +#additional packages to include in our Toradex images + +#the following would build cross gdb +#DEPENDS += "gdb-cross" + +#the gdb recipe provides gdbserver +DEPENDS += "gdb" + +IMAGE_INSTALL += " alsa-utils \ + alsa-utils-aplay \ + alsa-utils-amixer \ + \ + \ + aspell \ + consolekit \ + sqlite3 \ + \ + curl \ + nfs-utils-client \ + openssh-scp \ + openssh-sftp \ + openssl-conf \ + ntpclient \ + pam-plugin-ck-connector \ + \ + bzip2 \ + gdbserver \ + grep \ + joe \ + ldd \ + mtd-utils \ + update-modules \ + \ + hdparm \ + iperf \ + memtester \ + stress \ + lmbench \ + nbench-byte \ + \ + tegrastats \ + trdx-nv-binaries \ + trdx-config \ + gpioconfig \ + \ + trdx-oak-sensors \ + " + +IMAGE_INSTALL_colibri-t20 += " \ + trdx-odm \ + " + diff --git a/recipes/images/trdx-extra.inc~ b/recipes/images/trdx-extra.inc~ new file mode 100644 index 0000000..df14875 --- /dev/null +++ b/recipes/images/trdx-extra.inc~ @@ -0,0 +1,55 @@ +#additional packages to include in our Toradex images + +#the following builds cross gdb +DEPENDS += "gdb-cross" + +#the gdb recipe provides gdbserver +DEPENDS += "gdb" + +IMAGE_INSTALL_MACHINE_colibri-t20 += " \ + trdx-odm \ +" +IMAGE_INSTALL_MACHINE += " \ +" + +IMAGE-INSTALL += " \ + alsa-utils \ + alsa-utils-aplay \ + alsa-utils-amixer \ + \ + \ + aspell \ + consolekit \ + sqlite3 \ + \ + curl \ + nfs-utils-client \ + openssh-scp \ + openssh-sftp \ + pam-plugin-ck-connector \ + \ + bzip2 \ + gdbserver \ + grep \ +# joe \ + ldd \ + mtd-utils \ + update-modules \ + \ + hdparm \ + iperf \ + memtester \ + stress \ + lmbench \ + nbench-byte \ + \ + trdx-nv-binaries \ + ${IMAGE_INSTALL_MACHINE} \ + trdx-config \ + \ + trdx-oak-sensors \ +" +# tegrastats \ +# gpioconfig \ +# openssl-conf \ +# ntpclient \ diff --git a/recipes/joe/joe_3.1.bb b/recipes/joe/joe_3.1.bb new file mode 100644 index 0000000..9c2a2b2 --- /dev/null +++ b/recipes/joe/joe_3.1.bb @@ -0,0 +1,15 @@ +SECTION = "console/utils" +DESCRIPTION = "Console text editor with good functionality, good choice for vi-haters." +HOMEPAGE = "http://joe-editor.sourceforge.net/" +LICENSE ="GPL" +RDEPENDS_${PN} = "ncurses-terminfo" + +SRC_URI = "${SOURCEFORGE_MIRROR}/joe-editor/joe-${PV}.tar.gz" +LIC_FILES_CHKSUM = "file://COPYING;md5=da10ed7cf8038981c580e11c1d3e8fb6" + +PR = "r3" + +inherit autotools + +SRC_URI[md5sum] = "2a6ef018870fca9b7df85401994fb0e0" +SRC_URI[sha256sum] = "252390e4bc687957f09f334095904c8cc53b39c7b663ed47861ae1d11aef5946" diff --git a/recipes/joe/joe_3.1.bb~ b/recipes/joe/joe_3.1.bb~ new file mode 100644 index 0000000..75eb049 --- /dev/null +++ b/recipes/joe/joe_3.1.bb~ @@ -0,0 +1,15 @@ +SECTION = "console/utils" +DESCRIPTION = "Console text editor with good functionality, good choice for vi-haters." +HOMEPAGE = "http://joe-editor.sourceforge.net/" +LICENSE ="GPLv1" +RDEPENDS_${PN} = "ncurses-terminfo" + +SRC_URI = "${SOURCEFORGE_MIRROR}/joe-editor/joe-${PV}.tar.gz" +LIC_FILES_CHKSUM = "file://COPYING;md5=da10ed7cf8038981c580e11c1d3e8fb6" + +PR = "r3" + +inherit autotools + +SRC_URI[md5sum] = "2a6ef018870fca9b7df85401994fb0e0" +SRC_URI[sha256sum] = "252390e4bc687957f09f334095904c8cc53b39c7b663ed47861ae1d11aef5946" diff --git a/recipes/stress/stress_1.0.0.bb b/recipes/stress/stress_1.0.0.bb new file mode 100644 index 0000000..9614ab1 --- /dev/null +++ b/recipes/stress/stress_1.0.0.bb @@ -0,0 +1,14 @@ +# stress .bb build file +# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved +# Released under the MIT license (see /COPYING) + +HOMEPAGE="http://weather.ou.edu/~apw/projects/stress/" +DESCRIPTION = "a simple tool that imposes certain types of compute stress on UNIX-like operating systems." +LICENSE = "GPL" + +inherit autotools + +SRC_URI="http://weather.ou.edu/~apw/projects/stress/stress-${PV}.tar.gz" + +SRC_URI[md5sum] = "d693ff044ac7d34f8aaea202cd96f679" +SRC_URI[sha256sum] = "778126fdcc3ecb54d4a8dad6164001603bcc3b79ba64b3c2c5285275bc0cbedf" diff --git a/recipes/stress/stress_1.0.4.bb b/recipes/stress/stress_1.0.4.bb new file mode 100644 index 0000000..8b8fd9f --- /dev/null +++ b/recipes/stress/stress_1.0.4.bb @@ -0,0 +1,15 @@ +# stress .bb build file +# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved +# Released under the MIT license (see /COPYING) + +HOMEPAGE="http://weather.ou.edu/~apw/projects/stress/" +DESCRIPTION = "a simple tool that imposes certain types of compute stress on UNIX-like operating systems." +LICENSE = "GPL" + +inherit autotools + +SRC_URI="http://weather.ou.edu/~apw/projects/stress/stress-${PV}.tar.gz" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI[md5sum] = "a607afa695a511765b40993a64c6e2f4" +SRC_URI[sha256sum] = "369c997f65e8426ae8b318d4fdc8e6f07a311cfa77cc4b25dace465c582163c0" \ No newline at end of file diff --git a/recipes/stress/stress_1.0.4.bb~ b/recipes/stress/stress_1.0.4.bb~ new file mode 100644 index 0000000..5c2da31 --- /dev/null +++ b/recipes/stress/stress_1.0.4.bb~ @@ -0,0 +1,15 @@ +# stress .bb build file +# Copyright (C) 2006, Advanced Micro Devices, Inc. All Rights Reserved +# Released under the MIT license (see /COPYING) + +HOMEPAGE="http://weather.ou.edu/~apw/projects/stress/" +DESCRIPTION = "a simple tool that imposes certain types of compute stress on UNIX-like operating systems." +LICENSE = "GPL" + +inherit autotools + +SRC_URI="http://weather.ou.edu/~apw/projects/stress/stress-${PV}.tar.gz" +LIC_FILES_CHKSUM = "file://COPYING;md5=dd6c0b07c871f890801cda80e9ab8e4a" + +SRC_URI[md5sum] = "a607afa695a511765b40993a64c6e2f4" +SRC_URI[sha256sum] = "369c997f65e8426ae8b318d4fdc8e6f07a311cfa77cc4b25dace465c582163c0" \ No newline at end of file diff --git a/recipes/tegrastats-gtk/files/Makefile b/recipes/tegrastats-gtk/files/Makefile new file mode 100644 index 0000000..bed9164 --- /dev/null +++ b/recipes/tegrastats-gtk/files/Makefile @@ -0,0 +1,17 @@ +CFLAGS_LOC = -Wall `pkg-config --cflags gtk+-2.0` +LDFLAGS_LOC = `pkg-config --libs gtk+-2.0` + +CC = gcc + +OBJS = main.o stats.o + +all: tegrastats-gtk + +.c.o : + $(CC) $(CFLAGS) $(CFLAGS_LOC) -c $< + +tegrastats-gtk: $(OBJS) + $(CC) $(GTK_LIB) $(X11_LIB) $(OBJS) -o $@ $(LDFLAGS) $(LDFLAGS_LOC) + +clean: + rm -f *.o *~ helloworld diff --git a/recipes/tegrastats-gtk/files/main.c b/recipes/tegrastats-gtk/files/main.c new file mode 100644 index 0000000..973bd47 --- /dev/null +++ b/recipes/tegrastats-gtk/files/main.c @@ -0,0 +1,975 @@ +/* + * Copyright (c) 2009-2011 NVIDIA Corporation. All Rights Reserved. + * + * NVIDIA Corporation and its licensors retain all intellectual property and + * proprietary rights in and to this software and related documentation. Any + * use, reproduction, disclosure or distribution of this software and related + * documentation without an express license agreement from NVIDIA Corporation + * is strictly prohibited. + */ + +#define GTK_OUTPUT + +#ifndef _GNU_SOURCE + #define _GNU_SOURCE +#endif +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#ifndef GTK_OUTPUT +#if !NV_IS_LDK + #include + #undef LOG_TAG + #define LOG_TAG "TegraStats" +#else + #include + #define LOGE(...) \ + do { \ + printf(__VA_ARGS__); \ + printf("\n"); \ + } while (0) + + #define LOGI(...) \ + do { \ + printf(__VA_ARGS__); \ + printf("\n"); \ + } while (0) +#endif + +#define PRINTE(toLog, logFile, ...) \ +do{ \ + if (toLog && (logFile != NULL)) \ + { \ + fprintf(logFile, __VA_ARGS__); \ + fprintf(logFile, "\n"); \ + } \ + else \ + { \ + LOGE(__VA_ARGS__); \ + } \ +}while(0) +#endif +#define NVMAP_BASE_PATH "/sys/devices/platform/tegra-nvmap/misc/nvmap/" +#define CARVEOUT(x) NVMAP_BASE_PATH "heap-generic-0/" # x +#define IRAM(x) NVMAP_BASE_PATH "heap-iram/" # x + +#define EDP_LIMIT_DEBUGFS_PATH "/sys/kernel/debug/edp_limit" +#define DVFS_CLOCKS_BASE_PATH "/sys/kernel/debug/clock/" +#define EMCCLK DVFS_CLOCKS_BASE_PATH "emc/rate" +#define AVPCLK DVFS_CLOCKS_BASE_PATH "avp.sclk/rate" +#define VDECLK DVFS_CLOCKS_BASE_PATH "vde/rate" + +#define READ_VALUE(bToLog, logFile, path, pvalue) { \ + f = fopen(path, "r"); \ + if (f) { \ + (void) fscanf(f, "%d", pvalue); \ + fclose(f); \ + } else { \ + PRINTE(bToLog, logFile, "Failed to open %s", path); \ + } \ +} + +#define NUM_SLOTS 11 +#define PAGE_SIZE 4096 +#define FREQUENCY_CONVERT 1000 +#define AP20_CHIPID 20 +#define T30_CHIPID 30 +#define ALLOC_BUFFER_SIZE 1024 + +/* Prototypes. */ + +#ifndef GTK_OUTPUT +int main(int argc, char *argv[]); +#endif + +static void logFlush(void); +static int B2MB(int bytes); +static int kB2MB(int kiloBytes); +static int B2kB(int bytes); +static int SmartB2Str(char* str, size_t size, int bytes); +#ifndef GTK_OUTPUT +static void setFreq(int setMax); +static long processdir(const struct dirent *dir); +static void signal_handler(int signal); +static int filter(const struct dirent *dir); +#endif +static int getChipId(void); + +/* Store clk values to restore later */ +// Assuming clk frequencies are same for both CPUs +unsigned int cpuclk[2]; + +FILE *f = NULL; +FILE *logFile = NULL; + +/* Functions. */ + +static void logFlush(void) +{ +#if NV_IS_LDK + // need to fflush on LDK to make output redirectable + fflush(stdout); +#endif + if ((logFile != NULL) && (fileno(logFile) != -1)) + { + fflush(logFile); + } +} + +static int B2MB(int bytes) +{ + bytes += (1<<19)-1; // rounding + return bytes >> 20; +} + +static int kB2MB(int kiloBytes) +{ + kiloBytes += (1<<9)-1; // rounding + return kiloBytes >> 10; +} + +static int B2kB(int bytes) +{ + bytes += (1<<9)-1; // rounding + return bytes >> 10; +} + +static int SmartB2Str(char* str, size_t size, int bytes) +{ + if (bytes < 1024) + { + return snprintf(str, size, "%dB", bytes); + } + else if (bytes < 1024*1024) + { + return snprintf(str, size, "%dkB", B2kB(bytes)); + } + else + { + return snprintf(str, size, "%dMB", B2MB(bytes)); + } +} +#ifndef GTK_OUTPUT + +static void setFreq(int setMax) +{ + FILE* f; + LOGI("setFreq %d", setMax); + + if (!cpuclk[0]) { + f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies", "r"); + if (f) + { + fscanf(f, "%u", &cpuclk[0]); + while(fscanf(f, "%u", &cpuclk[1]) != EOF); + + LOGI("cpuclk: minfreq = %u maxfreq = %u\n", cpuclk[0], cpuclk[1]); + fclose(f); + } + else + { + LOGE("Error opening file scaling_available_frequencies"); + } + } + if (setMax) + { + // set CPU frequency to highest value + f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq", "w"); + if (f) + { + fprintf(f, "%u", cpuclk[1]); + fclose(f); + } + else + { + LOGE("Error opening file scaling_min_freq\n"); + } + } + else + { + // set default + f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq", "w"); + if (f) + { + fprintf(f, "%u", cpuclk[0]); + fclose(f); + } + else + { + LOGE("Error opening file scaling_min_freq\n"); + } + } +} + +static long processdir(const struct dirent *dir) +{ + char path[256]; + char linkinfo[256]; + + memset(path, 0, sizeof path); + memset(linkinfo, 0, sizeof linkinfo); + + strcpy(path, "/proc/"); + strcat(path, dir->d_name); + strcat(path, "/exe"); + readlink(path, linkinfo, sizeof linkinfo); + if (strstr(linkinfo, "tegrastats") != NULL) + { + return strtol(dir->d_name, (char **) NULL, 10); + } + return 0; +} + +static void signal_handler(int signal) +{ + if ((f != NULL) && (fileno(f) != -1)) + { + fclose(f); + } + logFlush(); + if ((logFile != NULL) && (fileno(logFile) != -1)) + { + fclose(logFile); + } + exit(0); +} + +static int filter(const struct dirent *dir) +{ + return !fnmatch("[1-9]*", dir->d_name, 0); +} +#endif + +static int getChipId(void) +{ + char *contents = NULL; + char *tegraid = NULL; + int count = 0; + int chipid = 0; + + /* open file */ + int fd = open("/proc/cmdline", O_RDONLY); + if (fd < 0) + { + printf("Couldn't open %s\n", "/proc/cmdline"); + goto failout; + } + + /* allocate enough memory */ + contents = malloc(ALLOC_BUFFER_SIZE); + if (!contents) + { + printf("Couldn't allocate mem %d bytes\n", ALLOC_BUFFER_SIZE); + goto failout; + } + + /* read the contents of the file */ + count = read(fd, contents, ALLOC_BUFFER_SIZE-1); + if (count < 0) + { + printf("Couldn't read the file %s\n", "/proc/cmdline"); + goto failout; + } + + /* add zero to make it a string */ + contents[count] = '\0'; + + tegraid = strstr(contents, "tegraid="); + if (tegraid) + { + tegraid += strlen("tegraid="); + chipid = atoi(tegraid); + } + +failout: + if (fd >= 0) + { + close(fd); + } + free(contents); + return chipid; +} +#ifndef GTK_OUTPUT + +int main (int argc, char *argv[]) +{ + int i; + unsigned int sleepMS = 1000; + int isCpu0Active; + int isCpu1Active; + int cpuLoadPrev[4*10]; + int cpu0Load = 0; + int cpu1Load = 0; + int cpu2Load = 0; + int cpu3Load = 0; + int isCpu2Active; + int isCpu3Active; + int debug = 0; + int bStart = 0; + int bStop = 0; + int bToLog = 0; + int chipId = 0; + int pid = 0; + char logName[256] = {0}; + + memset(cpuLoadPrev, 0, 4*10*sizeof(int)); + + for (i = 1; i < argc; i++) + { + if (argv && argv[i]) + { + LOGE("argv[%d] = %s\n", i, argv[i]); + + if (argv[i][0] == '-') + { + if (!strcmp(argv[i], "-max")) + { + setFreq(1); + LOGI("Set all components to max frequency"); + return 0; + } + else if (!strcmp(argv[i], "-default")) + { + setFreq( 0); + return 0; + } + else if (!strcmp(argv[i], "-debug")) + { + debug = 1; + } + else if (!strcmp(argv[i], "--start")) + { + bStart = 1; + } + else if (!strcmp(argv[i], "--stop")) + { + bStop = 1; + } + else if (!strcmp(argv[i], "--logfile")) + { + if ((i+1) 0) + { + // parent exit now.. + exit(0); + } + else if (pid == 0) + { + setpgrp(); + signal(SIGINT, signal_handler); + signal(SIGTERM, signal_handler); + } + else + { + // print warning, but do not exit.. + LOGE("failed to fork a child process \n"); + } + } + + if (strlen(logName)) + { + if ((logFile = fopen(logName, "a")) == NULL) + { + LOGE("failed to open %s \n", logName); + bToLog = 0; + } + } +#else + +#define PRINTE(toLog, logFile, ...) \ +do{ \ + (void) toLog; \ + (void)logFile; \ + sprintf(str, __VA_ARGS__); \ + \ +}while(0) + +int GetStats(char * str) +{ + int isCpu0Active; + int isCpu1Active; + static int cpuLoadPrev[4*10]; + int cpu0Load = 0; + int cpu1Load = 0; + int cpu2Load = 0; + int cpu3Load = 0; + int isCpu2Active; + int isCpu3Active; + int bToLog = 0; + int chipId = 0; + +#endif + chipId = getChipId(); + +#ifndef GTK_OUTPUT + for (;;) +#endif + { + int totalRAMkB = -1; + int freeRAMkB = -1; + int largestFreeRAMBlockB = -1; + int numLargestRAMBlock = -1; + int buffersRAMkB = -1; + int cachedRAMkB = -1; + int totalCarveoutB = -1; + int freeCarveoutB = -1; + int largestFreeCarveoutBlockB = -1; + int totalGARTkB = -1; + int freeGARTkB = -1; + int largestFreeGARTBlockkB = -1; + int totalIRAMB = -1; + int freeIRAMB = -1; + int largestFreeIRAMBlockB = -1; + int currCpuFreq = -1; + int emcClk = -1; + int avpClk = -1; + int vdeClk = -1; + int no_cpus = 4; + int edp_limit = -1; + + // RAM + f = fopen("/proc/meminfo", "r"); + if (f) + { + (void) fscanf(f, "MemTotal: %d kB\n", &totalRAMkB); + (void) fscanf(f, "MemFree: %d kB\n", &freeRAMkB); + (void) fscanf(f, "Buffers: %d kB\n", &buffersRAMkB); + (void) fscanf(f, "Cached: %d kB\n", &cachedRAMkB); + + fclose(f); + } + else + { + PRINTE(bToLog, logFile, "Failed to open /proc/meminfo"); + } + + f = fopen("/proc/buddyinfo", "r"); + if (f) + { + char line[256]; + int lineNum = 0; + int slots[NUM_SLOTS]; + int i; + + // + // Get the number of free blocks for each size. + // Separation into nodes and zones is not kept. + // + while (fgets(line, sizeof(line), f)) + { + int j = 0; + int n; + int tmpSlots[NUM_SLOTS]; + char* buf = line; + + (void) sscanf(buf, "Node %*d, zone %*s%n", &n); + buf += n; + + while (sscanf(buf, "%d%n", &tmpSlots[j], &n) == 1) + { + buf += n; + slots[j] = lineNum ? slots[j] + tmpSlots[j] : tmpSlots[j]; + j++; + } + + lineNum++; + } + + fclose(f); + + // Extract info about the largest available blocks + i = NUM_SLOTS - 1; + while (slots[i] == 0 && i > 0) + i--; + numLargestRAMBlock = slots[i]; + largestFreeRAMBlockB = (1 << i) * PAGE_SIZE; + } + else + { + PRINTE(bToLog, logFile, "Failed to open /proc/buddyinfo"); + } + + // CPU 0/1 On/Off + f = fopen("/sys/devices/system/cpu/cpu0/online", "r"); + if (f) + { + (void) fscanf(f, "%d", &isCpu0Active); + fclose(f); + } + else + { + PRINTE(bToLog, logFile, "/sys/devices/system/cpu/cpu0/online"); + } + + f = fopen("/sys/devices/system/cpu/cpu1/online", "r"); + if (f) + { + (void) fscanf(f, "%d", &isCpu1Active); + fclose(f); + } + else + { + PRINTE(bToLog, logFile, "/sys/devices/system/cpu/cpu1/online"); + } + + // CPU 2/3 On/Off + f = fopen("/sys/devices/system/cpu/cpu2/online", "r"); + if (f) + { + (void) fscanf(f, "%d", &isCpu2Active); + fclose(f); + } + else + { + no_cpus = 2; + } + + if (no_cpus == 4) + { + f = fopen("/sys/devices/system/cpu/cpu3/online", "r"); + if (f) + { + (void) fscanf(f, "%d", &isCpu3Active); + fclose(f); + } + } + + // EDP limit + f = fopen(EDP_LIMIT_DEBUGFS_PATH, "r"); + if (f) + { + (void) fscanf(f, "%d", &edp_limit); + fclose(f); + } + + // CPU load + f = fopen("/proc/stat", "r"); + if (f) + { + int c[40]; + int l[40]; + int i; + + // + // from http://www.mjmwired.net/kernel/Documentation/filesystems/proc.txt + // Various pieces of information about kernel activity are available + // in the /proc/stat file. All of the numbers reported in this file + // are aggregates since the system first booted. The very first + // "cpu" line aggregates the numbers in all of the other "cpuN" + // lines. These numbers identify the amount of time the CPU has spent + // performing different kinds of work. Time units are in USER_HZ + // (typically hundredths of a second). The meanings of the columns + // are as follows, from left to right: + // - user: normal processes executing in user mode + // - nice: niced processes executing in user mode + // - system: processes executing in kernel mode + // - idle: twiddling thumbs + // - iowait: waiting for I/O to complete + // - irq: servicing interrupts + // - softirq: servicing softirqs + // - steal: involuntary wait + // - guest: running a normal guest + // - guest_nice: running a niced guest + // + + memset(c, 0, sizeof(c)); + + for (;;) + { + int *p; + int r; + char cpunum; + + r = fscanf(f, "cpu%c", &cpunum); + + if (r != 1) + break; + if (cpunum < '0' || cpunum > '3') + { + (void) fscanf(f, "%*[^\n]\n"); + continue; + } + + p = c + (cpunum - '0') * 10; + + r = fscanf(f, "%d %d %d %d %d %d %d %d %d %d\n", + p, p+1, p+2, p+3, p+4, p+5, p+6, p+7, p+8, p+9); + + if (r != 10) + memset(p, 0, 10 * sizeof(int)); + + } + + fclose(f); + + // + // cpu load = (time spent on something else but idle since the last + // update) / (total time spent since the last update) + // + cpu0Load = 0; + cpu1Load = 0; + cpu2Load = 0; + cpu3Load = 0; + for (i = 0;i < (no_cpus*10); i++) + { + l[i] = c[i] - cpuLoadPrev[i]; + if (i < 10) + cpu0Load += l[i]; + else if (i < 20) + cpu1Load += l[i]; + else if (i < 30) + cpu2Load += l[i]; + else + cpu3Load += l[i]; + cpuLoadPrev[i] = c[i]; + } + /* if (debug) + LOGE("total0 %d idle0 %d | total1 %d idle1 %d", cpu0Load, + l[3+9], cpu1Load, l[3+18]); */ + if (cpu0Load) + cpu0Load = 100*(cpu0Load-l[3])/cpu0Load; + if (cpu1Load) + cpu1Load = 100*(cpu1Load-l[3+10])/cpu1Load; + if (no_cpus == 4) + { + if (cpu2Load) + cpu2Load = 100*(cpu2Load-l[3+20])/cpu2Load; + if (cpu3Load) + cpu3Load = 100*(cpu3Load-l[3+30])/cpu3Load; + } + } + else + { + PRINTE(bToLog, logFile, "Failed to open /proc/stat"); + } + + // Carveout + switch (chipId) + { + case T30_CHIPID: + break; + case AP20_CHIPID: + default: + READ_VALUE(bToLog, logFile, CARVEOUT(total_size), + &totalCarveoutB); + READ_VALUE(bToLog, logFile, CARVEOUT(free_size), + &freeCarveoutB); + READ_VALUE(bToLog, logFile, CARVEOUT(free_max), + &largestFreeCarveoutBlockB); + break; + } + + // GART + f = fopen("/proc/iovmminfo", "r"); + if (f) + { + char tmp[4]; + // add if (blah) {} to get around compiler warning + if(fscanf(f, "\ngroups\n\t (device: iovmm-%4c)\n\t\tsize: " + "%dKiB free: %dKiB largest: %dKiB", + &tmp[0], &totalGARTkB, &freeGARTkB, + &largestFreeGARTBlockkB)) {} + fclose(f); + } + else + { + PRINTE(bToLog, logFile, "Failed to open /proc/iovmminfo"); + } + + // If the largest free GART block is -1, change it to 0. + if (largestFreeGARTBlockkB == -1) + largestFreeGARTBlockkB = 0; + + // IRAM + READ_VALUE(bToLog, logFile, IRAM(total_size), &totalIRAMB); + READ_VALUE(bToLog, logFile, IRAM(free_size), &freeIRAMB); + READ_VALUE(bToLog, logFile, IRAM(free_max), &largestFreeIRAMBlockB); + + // CPU + f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq", "r"); + if (f) + { + (void) fscanf(f, "%d", &currCpuFreq); + fclose(f); + } + // DFS + READ_VALUE(bToLog, logFile, EMCCLK, &emcClk); + READ_VALUE(bToLog, logFile, AVPCLK, &avpClk); + READ_VALUE(bToLog, logFile, VDECLK, &vdeClk); + + { + char cpu0String[5], cpu1String[5]; + char cpu2String[5], cpu3String[5]; + char lfbRAM[10], lfbCarveout[10], lfbGART[10], lfbIRAM[10]; + if (isCpu0Active) + { + snprintf(cpu0String, 5, "%d%%", cpu0Load); + } + else + { + snprintf(cpu0String, 5, "off"); + } + + if (isCpu1Active) + { + snprintf(cpu1String, 5, "%d%%", cpu1Load); + } + else + { + snprintf(cpu1String, 5, "off"); + } + + if (no_cpus == 4) + { + if (isCpu2Active) + { + snprintf(cpu2String, 5, "%d%%", cpu2Load); + } + else + { + snprintf(cpu2String, 5, "off"); + } + + if (isCpu3Active) + { + snprintf(cpu3String, 5, "%d%%", cpu3Load); + } + else + { + snprintf(cpu3String, 5, "off"); + } + } + SmartB2Str(lfbRAM, 10, largestFreeRAMBlockB); + SmartB2Str(lfbCarveout, 10, largestFreeCarveoutBlockB); + SmartB2Str(lfbGART, 10, largestFreeGARTBlockkB * 1024); + SmartB2Str(lfbIRAM, 10, largestFreeIRAMBlockB); + if (no_cpus == 2) + { + switch (chipId) + { + case T30_CHIPID: + PRINTE(bToLog, logFile, "RAM %d/%dMB (lfb %dx%s) IRAM " + "%d/%dkB(lfb %s) cpu [%s,%s]@%d EMC %d AVP %d " + "VDE %d EDP limit %d", + kB2MB(totalRAMkB-freeRAMkB-buffersRAMkB-cachedRAMkB), + kB2MB(totalRAMkB), numLargestRAMBlock, lfbRAM, + B2kB(totalIRAMB-freeIRAMB), + B2kB(totalIRAMB), lfbIRAM, cpu0String, cpu1String, + currCpuFreq/FREQUENCY_CONVERT, + emcClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + avpClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + vdeClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + edp_limit); + break; + + case AP20_CHIPID: + // intentionally fall through + default: + PRINTE(bToLog, logFile, "RAM %d/%dMB (lfb %dx%s) " + "Carveout %d/%dMB (lfb %s) GART %d/%dMB (lfb %s)" + " IRAM %d/%dkB(lfb %s) cpu [%s,%s]@%d EMC %d AVP" + " %d VDE %d EDP limit %d", + kB2MB(totalRAMkB-freeRAMkB-buffersRAMkB-cachedRAMkB), + kB2MB(totalRAMkB), numLargestRAMBlock, lfbRAM, + B2MB(totalCarveoutB-freeCarveoutB), + B2MB(totalCarveoutB), lfbCarveout, + kB2MB(totalGARTkB-freeGARTkB), kB2MB(totalGARTkB), + lfbGART, B2kB(totalIRAMB-freeIRAMB), B2kB(totalIRAMB), + lfbIRAM, cpu0String, cpu1String, + currCpuFreq/FREQUENCY_CONVERT, + emcClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + avpClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + vdeClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + edp_limit); + break; + } + + } + else + { + switch (chipId) + { + case T30_CHIPID: + PRINTE(bToLog, logFile, "RAM %d/%dMB (lfb %dx%s) IRAM " + "%d/%dkB(lfb %s) cpu [%s,%s,%s,%s]@%d EMC %d AVP" + " %d VDE %d EDP limit %d", + kB2MB(totalRAMkB-freeRAMkB-buffersRAMkB-cachedRAMkB), + kB2MB(totalRAMkB), numLargestRAMBlock, lfbRAM, + B2kB(totalIRAMB-freeIRAMB), B2kB(totalIRAMB), + lfbIRAM, cpu0String, cpu1String, cpu2String, + cpu3String, currCpuFreq/FREQUENCY_CONVERT, + emcClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + avpClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + vdeClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + edp_limit); + break; + + case AP20_CHIPID: + // intentionally fall through + default: + PRINTE(bToLog, logFile, "RAM %d/%dMB (lfb %dx%s) " + "Carveout %d/%dMB (lfb %s) GART %d/%dMB (lfb %s)" + " IRAM %d/%dkB(lfb %s) cpu [%s,%s,%s,%s]@%d " + "EMC %d AVP %d VDE %d EDP limit %d", + kB2MB(totalRAMkB-freeRAMkB-buffersRAMkB-cachedRAMkB), + kB2MB(totalRAMkB), numLargestRAMBlock, lfbRAM, + B2MB(totalCarveoutB-freeCarveoutB), + B2MB(totalCarveoutB), lfbCarveout, + kB2MB(totalGARTkB-freeGARTkB), kB2MB(totalGARTkB), + lfbGART, B2kB(totalIRAMB-freeIRAMB), + B2kB(totalIRAMB), lfbIRAM, cpu0String, cpu1String, + cpu2String, cpu3String, currCpuFreq/FREQUENCY_CONVERT, + emcClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + avpClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + vdeClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT), + edp_limit); + break; + } + } + } + + // fflush stdout (on LDK) to make the output redirectable. + logFlush(); +#ifndef GTK_OUTPUT + usleep(sleepMS*1000); +#endif + } + + return 0; +} + +/* example contents of /proc/meminfo +MemTotal: 450164 kB +MemFree: 269628 kB +Buffers: 2320 kB +Cached: 69008 kB +SwapCached: 0 kB +Active: 89476 kB +Inactive: 63612 kB +Active(anon): 82272 kB +Inactive(anon): 0 kB +Active(file): 7204 kB +Inactive(file): 63612 kB +Unevictable: 0 kB +Mlocked: 0 kB +SwapTotal: 0 kB +SwapFree: 0 kB +Dirty: 0 kB +Writeback: 0 kB +AnonPages: 81764 kB +Mapped: 35148 kB +Slab: 5204 kB +SReclaimable: 1760 kB +SUnreclaim: 3444 kB +PageTables: 4316 kB +NFS_Unstable: 0 kB +Bounce: 0 kB +WritebackTmp: 0 kB +CommitLimit: 225080 kB +Committed_AS: 1054316 kB +VmallocTotal: 450560 kB +VmallocUsed: 45964 kB +VmallocChunk: 340056 kB + +http://www.linuxweblog.com/meminfo + * MemTotal: Total usable ram (i.e. physical ram minus a few reserved bits + and the kernel binary code) + * MemFree: Is sum of LowFree+HighFree (overall stat) + * MemShared: 0 is here for compat reasons but always zero. + * Buffers: Memory in buffer cache. mostly useless as metric nowadays + * Cached: Memory in the pagecache (diskcache) minus SwapCache + * SwapCache: Memory that once was swapped out, is swapped back in but still + also is in the swapfile (if memory is needed it doesn't need to be swapped + out AGAIN because it is already in the swapfile. This saves I/O) + +VM splits the cache pages into "active" and "inactive" memory. The idea is that +if you need memory and some cache needs to be sacrificed for that, you take it +from inactive since that's expected to be not used. The vm checks what is used +on a regular basis and moves stuff around. When you use memory, the CPU sets a +bit in the pagetable and the VM checks that bit occasionally, and based on that, +it can move pages back to active. And within active there's an order of "longest +ago not used" (roughly, it's a little more complex in reality). + * Active: Memory that has been used more recently and usually not reclaimed + unless absolutely necessary. + * Inact_dirty: Dirty means "might need writing to disk or swap." Takes more + work to free. Examples might be files that have not been written to yet. + They aren't written to memory too soon in order to keep the I/O down. For + instance, if you're writing logs, it might be better to wait until you have + a complete log ready before sending it to disk. + * Inact_clean: Assumed to be easily freeable. The kernel will try to keep + some clean stuff around always to have a bit of breathing room. + * Inact_target: Just a goal metric the kernel uses for making sure there are + enough inactive pages around. When exceeded, the kernel will not do work to + move pages from active to inactive. A page can also get inactive in a few + other ways, e.g. if you do a long sequential I/O, the kernel assumes you're + not going to use that memory and makes it inactive preventively. So you can + get more inactive pages than the target because the kernel marks some cache + as "more likely to be never used" and lets it cheat in the "last used" + order. + * HighTotal: is the total amount of memory in the high region. Highmem is all + memory above (approx) 860MB of physical RAM. Kernel uses indirect tricks to + access the high memory region. Data cache can go in this memory region. + * LowTotal: The total amount of non-highmem memory. + * LowFree: The amount of free memory of the low memory region. This is the + memory the kernel can address directly. All kernel datastructures need to go + into low memory. + * SwapTotal: Total amount of physical swap memory. + * SwapFree: Total amount of swap memory free. + * Committed_AS: An estimate of how much RAM you would need to make a 99.99% + guarantee that there never is OOM (out of memory) for this workload. Normally + the kernel will overcommit memory. The Committed_AS is a guesstimate of how + much RAM/swap you would need worst-case. +*/ diff --git a/recipes/tegrastats-gtk/files/stats.c b/recipes/tegrastats-gtk/files/stats.c new file mode 100644 index 0000000..a02bf68 --- /dev/null +++ b/recipes/tegrastats-gtk/files/stats.c @@ -0,0 +1,42 @@ +#include +void GetStats(char * str); +gboolean +UpdateTitle (gpointer user_data) +{ + gchar title[255]; + + (void)GetStats(title); + gtk_window_set_title ((GtkWindow*)user_data, title); + //we want to start a new intervall + return 1; +} + +void +destroy (void) +{ + gtk_main_quit (); +} + +int +main (int argc, char *argv[]) +{ + GtkWidget *window; + + gtk_init (&argc, &argv); + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_signal_connect (GTK_OBJECT (window), "destroy", + GTK_SIGNAL_FUNC (destroy), NULL); + gtk_container_border_width (GTK_CONTAINER (window), 10); + gtk_window_set_default_size ((GtkWindow*)window, 1200, 0); + + (void)UpdateTitle(GTK_CONTAINER (window)); + + //update title every 2 seconds + g_timeout_add_seconds (1, UpdateTitle, window); + gtk_widget_show (window); + + gtk_main (); + + return 0; +} diff --git a/recipes/tegrastats-gtk/tegrastats-gtk.bb b/recipes/tegrastats-gtk/tegrastats-gtk.bb new file mode 100644 index 0000000..9f6f8d5 --- /dev/null +++ b/recipes/tegrastats-gtk/tegrastats-gtk.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "NVIDIAS tegrastats output in a gtk title bar" +LICENSE = "NVIDIA Propriatry" + +DEPENDS = "gtk+" +PR = "r1" + +S = "${WORKDIR}" + +SRC_URI="file://stats.c file://main.c file://Makefile" +LIC_FILES_CHKSUM = "file://main.c;endline=9;md5=2fa47532d931bff0348b6d6835bf86ed" + +do_install () { + install -d ${D}${bindir}/ + install -m 0755 ${S}/tegrastats-gtk ${D}${bindir}/ +} + +FILES_${PN} = "${bindir}/tegrastats-gtk" \ No newline at end of file diff --git a/recipes/tegrastats-gtk/tegrastats-gtk.bb~ b/recipes/tegrastats-gtk/tegrastats-gtk.bb~ new file mode 100644 index 0000000..00746d2 --- /dev/null +++ b/recipes/tegrastats-gtk/tegrastats-gtk.bb~ @@ -0,0 +1,16 @@ +DESCRIPTION = "NVIDIAS tegrastats output in a gtk title bar" +LICENSE = "NVIDIA Propriatry" + +PR = "r1" + +S = "${WORKDIR}" + +SRC_URI="file://stats.c file://main.c file://Makefile" +LIC_FILES_CHKSUM = "file://main.c;endline=9;md5=yyyy " + +do_install () { + install -d ${D}${bindir}/ + install -m 0755 ${S}/tegrastats-gtk ${D}${bindir}/ +} + +FILES_${PN} = "${bindir}/tegrastats-gtk" \ No newline at end of file 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: +# ::: +# + +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 diff --git a/recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb b/recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb new file mode 100644 index 0000000..7fa3323 --- /dev/null +++ b/recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "sample code to access the toradex oak sensors" +LICENSE = "PublicDomain" + +S="${WORKDIR}/OakLinux_${PV}" + +SRC_URI = "http://files.toradex.com/Oak/Linux/OakLinux_${PV}.tar.bz2" + +SRC_URI[md5sum] = "cedc87c056f961c15751ee899fb719d5" +SRC_URI[sha256sum] = "69836dfa746422a64f6518cc9e785a7a64ca67d82f5fae0421515a59f4394929" +LIC_FILES_CHKSUM = "file://COPYING;md5=1c3a7fb45253c11c74434676d84fe7dd" + +inherit autotools + +FILES_${PN} += "" + diff --git a/recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb~ b/recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb~ new file mode 100644 index 0000000..2f83bba --- /dev/null +++ b/recipes/trdx-oak-sensors/trdx-oak-sensors_0082.bb~ @@ -0,0 +1,15 @@ +DESCRIPTION = "sample code to access the toradex oak sensors" +LICENSE = "PublicDomain" + +S="${WORKDIR}/OakLinux_${PV}" + +SRC_URI = "http://files.toradex.com/Oak/Linux/OakLinux_${PV}.tar.bz2" + +SRC_URI[md5sum] = "cedc87c056f961c15751ee899fb719d5" +SRC_URI[sha256sum] = "69836dfa746422a64f6518cc9e785a7a64ca67d82f5fae0421515a59f4394929" +LIC_FILES_CHKSUM = "file://COPYING;md5="1c3a7fb45253c11c74434676d84fe7dd" + +inherit autotools + +FILES_${PN} += "" + -- cgit v1.2.3