diff options
Diffstat (limited to 'meta/recipes-kernel')
73 files changed, 3758 insertions, 0 deletions
diff --git a/meta/recipes-kernel/blktrace/blktrace/blktrace-makefile.patch b/meta/recipes-kernel/blktrace/blktrace/blktrace-makefile.patch new file mode 100644 index 000000000..c0f5fb0b3 --- /dev/null +++ b/meta/recipes-kernel/blktrace/blktrace/blktrace-makefile.patch @@ -0,0 +1,55 @@ +Upstream-Status: Inappropriate [configuration] + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile 2010-11-22 11:20:14.303472770 -0600 ++++ git/Makefile 2010-11-22 14:11:19.152635423 -0600 +@@ -1,5 +1,3 @@ +-CC = gcc +-CFLAGS = -Wall -O2 -g -W + ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 + PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon + LIBS = -lpthread +@@ -11,13 +9,13 @@ + all: $(ALL) + + btt/btt: +- $(MAKE) -C btt ++ CC="${CC}" CFLAGS="${CFLAGS}" $(MAKE) -C btt CC="${CC}" CFLAGS="${CFLAGS}" + + btreplay/btrecord: +- $(MAKE) -C btreplay ++ CC="${CC}" CFLAGS="${CFLAGS}" $(MAKE) -C btreplay CC="${CC}" CFLAGS="${CFLAGS}" btrecord + + btreplay/btreplay: +- $(MAKE) -C btreplay ++ CC="${CC}" CFLAGS="${CFLAGS}" $(MAKE) -C btreplay CC="${CC}" CFLAGS="${CFLAGS}" btreplay + + %.o: %.c + $(CC) -o $*.o -c $(ALL_CFLAGS) $< +Index: git/btreplay/Makefile +=================================================================== +--- git.orig/btreplay/Makefile 2010-11-22 11:21:12.972679035 -0600 ++++ git/btreplay/Makefile 2010-11-22 14:07:01.492839945 -0600 +@@ -5,8 +5,6 @@ + # NDEBUG - Defined: no asserts, Undefined: asserts + # + +-CC = gcc +-CFLAGS = -Wall -W -O2 -g + INCS = -I. -I.. -I../btt + OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG + XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Index: git/btt/Makefile +=================================================================== +--- git.orig/btt/Makefile 2010-11-22 11:21:01.833758370 -0600 ++++ git/btt/Makefile 2010-11-22 14:07:15.783258253 -0600 +@@ -5,8 +5,6 @@ + # NDEBUG - Defined: no asserts, Undefined: asserts + # + +-CC = gcc +-CFLAGS = -Wall -W -O2 -g + INCS = -I. -I.. + XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 + override CFLAGS += $(INCS) $(XCFLAGS) diff --git a/meta/recipes-kernel/blktrace/blktrace_git.bb b/meta/recipes-kernel/blktrace/blktrace_git.bb new file mode 100644 index 000000000..dbc07c5a9 --- /dev/null +++ b/meta/recipes-kernel/blktrace/blktrace_git.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "blktrace - generate traces of the I/O traffic on block devices" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" + +DEPENDS = "libaio" + +SRCREV = "d6918c8832793b4205ed3bfede78c2f915c23385" + +PR = "r4" +PV = "1.0.5+git${SRCPV}" + +SRC_URI = "git://git.kernel.dk/blktrace.git;protocol=git \ + file://blktrace-makefile.patch" + +S = "${WORKDIR}/git" + +do_compile() { + oe_runmake ARCH="${ARCH}" CC="${CC}" LD="${LD}" prefix=${prefix} +} + +do_install() { + oe_runmake ARCH="${ARCH}" CC="${CC}" LD="${LD}" \ + prefix=${prefix} DESTDIR=${D} install +} diff --git a/meta/recipes-kernel/dtc/dtc.inc b/meta/recipes-kernel/dtc/dtc.inc new file mode 100644 index 000000000..fab91dca9 --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc.inc @@ -0,0 +1,19 @@ +SUMMARY = "Device Tree Compiler" +DESCRIPTION = "The Device Tree Compiler is a tool used to manipulate the Open-Firmware-like device tree used by PowerPC kernels." +SECTION = "bootloader" +LICENSE = "GPLv2 | BSD" +DEPENDS = "flex-native bison-native" + +inherit autotools + +SRC_URI = "git://www.jdl.com/software/dtc.git;protocol=git \ + file://make_install.patch \ + " + +EXTRA_OEMAKE='PREFIX="${prefix}"' +INC_PR = "r2" + +S = "${WORKDIR}/git" + +PACKAGES =+ "${PN}-misc" +FILES_${PN}-misc = "${bindir}/convert-dtsv0 ${bindir}/ftdump ${bindir}/dtdiff" diff --git a/meta/recipes-kernel/dtc/dtc/make_install.patch b/meta/recipes-kernel/dtc/dtc/make_install.patch new file mode 100644 index 000000000..1120617e7 --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc/make_install.patch @@ -0,0 +1,17 @@ +Upstream-Status: Inappropriate [configuration] + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile 2011-11-02 14:52:17.243104779 -0700 ++++ git/Makefile 2011-11-02 15:06:01.555104982 -0700 +@@ -161,8 +161,8 @@ + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR) + $(INSTALL) -d $(DESTDIR)$(LIBDIR) +- $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR) +- ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) ++ $(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname) ++ ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/$(notdir $(LIBFDT_lib)) + ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT) + $(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR) + $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR) diff --git a/meta/recipes-kernel/dtc/dtc_git.bb b/meta/recipes-kernel/dtc/dtc_git.bb new file mode 100644 index 000000000..c205de702 --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc_git.bb @@ -0,0 +1,12 @@ +require dtc.inc + +LIC_FILES_CHKSUM = "file://GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://libfdt/libfdt.h;beginline=3;endline=52;md5=fb360963151f8ec2d6c06b055bcbb68c" + +SRCREV = "033089f29099bdfd5c2d6986cdb9fd07b16cfde0" +PV = "1.3.0+git${SRCPV}" +PR = "${INC_PR}.1" + +S = "${WORKDIR}/git" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb new file mode 100644 index 000000000..9ef1a2039 --- /dev/null +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Scripts and utilities for managing Yocto branched kernels." +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://git/tools/kgit;beginline=5;endline=9;md5=e2bf4415f3d843f43d2e22b0d91a6fee" + +DEPENDS = "git-native guilt-native" + +SRCREV = "de3649840e8e3ca25bc79d2444f04a1b158a1769" +PR = "r12" +PV = "0.1+git${SRCPV}" + +inherit native + +SRC_URI = "git://git.yoctoproject.org/yocto-kernel-tools.git;protocol=git" +S = "${WORKDIR}" + +do_compile() { + : +} + +do_install() { + cd ${S}/git + make DESTDIR=${D}${bindir} install +} diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc new file mode 100644 index 000000000..278ce341d --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools.inc @@ -0,0 +1,17 @@ +SUMMARY = "Kexec fast reboot tools" +DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" +AUTHOR = "Eric Biederman" +HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" +SECTION = "kernel/userland" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ + file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" +DEPENDS = "zlib" + +SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz" + +inherit autotools + +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*)-(linux|freebsd.*)' + +INSANE_SKIP_${PN} = "arch" diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.3.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.3.bb new file mode 100644 index 000000000..3cc826560 --- /dev/null +++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.3.bb @@ -0,0 +1,13 @@ +require kexec-tools.inc +export LDFLAGS = "-L${STAGING_LIBDIR}" +EXTRA_OECONF = " --with-zlib=yes" + +PR = "r0" + +SRC_URI[md5sum] = "1b362abd2e8669171a5ba50a9cc26183" +SRC_URI[sha256sum] = "36a50fad961e24c9cdaa7c01b74d3cdd2b1bebf9bf0f0f3740dd1f21bd1b8ba6" + +PACKAGES =+ "kexec kdump" + +FILES_kexec = "${sbindir}/kexec" +FILES_kdump = "${sbindir}/kdump" diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb new file mode 100644 index 000000000..96de8b8ef --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod-native_git.bb @@ -0,0 +1,14 @@ +# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +require kmod.inc +inherit native + +PR = "${INC_PR}.0" + +do_install_append (){ + for tool in depmod insmod lsmod modinfo modprobe rmmod + do + ln -s kmod ${D}${bindir}/$tool + done +} diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc new file mode 100644 index 000000000..5f655fd83 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod.inc @@ -0,0 +1,32 @@ +# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "kmod is a set of tools to handle common tasks with Linux kernel modules like \ + insert, remove, list, check properties, resolve dependencies and aliases." +HOMEPAGE = "http://packages.profusion.mobi/kmod/" +LICENSE = "GPL-2.0+ & LGPL-2.1+" +LICENSE_libkmod = "LGPL-2.1+" +SECTION = "base" +PV = "8" +INC_PR = "r0" +DEPENDS += "gnome-doc-utils-native" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://libkmod/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + " +inherit autotools + +SRC_URI = "git://git.profusion.mobi/kmod.git;protocol=git;branch=master \ + file://depmod-search.conf \ + file://0001-man-disable-man-page-generation-because-we-don-t-hav.patch \ + " + +SRCREV = "819f79a24d58e3c8429f1631df2f8f85a2f95d4a" + +S = "${WORKDIR}/git" + +EXTRA_AUTORECONF += "--install --symlink" +EXTRA_OECONF +="--enable-debug --enable-logging --enable-tools" + +do_configure_prepend () { + gtkdocize --docdir ${S}/libkmod/docs || touch ${S}/libkmod/docs/gtk-doc.make +} diff --git a/meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch b/meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch new file mode 100644 index 000000000..5361b847c --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/0001-man-disable-man-page-generation-because-we-don-t-hav.patch @@ -0,0 +1,26 @@ +From ce6f0cabb65e67dd4d31e1e555db8bc6eaf435d3 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Fri, 24 Feb 2012 07:35:38 +0100 +Subject: [PATCH] man: disable man page generation because we don't have + working xsltproc + +Upstream-Status: Inappropriate [build system specific change] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 141c102..a8bdfd1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = . libkmod/docs man ++SUBDIRS = . libkmod/docs + + DISTCLEAN_LOCAL_HOOKS = + EXTRA_DIST = +-- +1.7.8.4 + diff --git a/meta/recipes-kernel/kmod/kmod/depmod-search.conf b/meta/recipes-kernel/kmod/kmod/depmod-search.conf new file mode 100644 index 000000000..527c0bb6e --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod/depmod-search.conf @@ -0,0 +1,6 @@ +# +# /etc/depmod.d/depmod.conf +# + +search updates extramodules built-in + diff --git a/meta/recipes-kernel/kmod/kmod_git.bb b/meta/recipes-kernel/kmod/kmod_git.bb new file mode 100644 index 000000000..fd38d8797 --- /dev/null +++ b/meta/recipes-kernel/kmod/kmod_git.bb @@ -0,0 +1,62 @@ +# Copyright (C) 2012 Khem Raj <raj.khem@gmail.com> +# Released under the MIT license (see COPYING.MIT for the terms) + +require kmod.inc + +PR = "${INC_PR}.2" + +PROVIDES += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RPROVIDES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RCONFLICTS_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" +RREPLACES_${PN} += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# to force user to remove old module-init-tools and replace them with kmod variants +RCONFLICTS_libkmod2 += "module-init-tools-insmod-static module-init-tools-depmod module-init-tools" + +# autotools set prefix to /usr, however we want them in /bin and /sbin +bindir = "${base_bindir}" +sbindir = "${base_sbindir}" +# libdir = "${base_libdir}" + +do_install_append () { + install -dm755 ${D}${base_bindir} + install -dm755 ${D}${base_sbindir} + # add symlinks to kmod + ln -s ..${base_bindir}/kmod ${D}${base_bindir}/lsmod.kmod + for tool in {ins,rm,dep}mod mod{info,probe}; do + ln -s ..${base_bindir}/kmod ${D}${base_sbindir}/${tool}.kmod + done + # configuration directories + install -dm755 ${D}${base_libdir}/depmod.d + install -dm755 ${D}${base_libdir}/modprobe.d + install -dm755 ${D}${sysconfdir}/depmod.d + install -dm755 ${D}${sysconfdir}/modprobe.d + + # install depmod.d file for search/ dir + install -Dm644 "${WORKDIR}/depmod-search.conf" "${D}${base_libdir}/depmod.d/search.conf" +} + +pkg_postinst_kmod() { + for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do + bn=`basename $f` + update-alternatives --install /$f $bn /$f.kmod 60 + done + update-alternatives --install /bin/lsmod bin-lsmod /bin/lsmod.kmod 60 + update-alternatives --install /sbin/lsmod lsmod /bin/lsmod.kmod 60 + update-alternatives --install /sbin/depmod depmod /sbin/depmod.kmod 60 +} + +pkg_prerm_kmod() { + for f in sbin/insmod sbin/modprobe sbin/rmmod sbin/modinfo; do + bn=`basename $f` + update-alternatives --remove $bn /$f.kmod + done + update-alternatives --remove bin-lsmod /bin/lsmod.kmod + update-alternatives --remove lsmod /bin/lsmod.kmod + update-alternatives --remove depmod /sbin/depmod.kmod +} + +PACKAGES =+ "libkmod" + +FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}" +FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d" diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch new file mode 100644 index 000000000..59a0b1f6d --- /dev/null +++ b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch @@ -0,0 +1,34 @@ +Upstream-Status: Inappropriate [configuration] + +--- a/Makefile 2010-07-20 18:51:32.000000000 +0800 ++++ b/Makefile 2010-07-20 18:54:54.000000000 +0800 +@@ -4,7 +4,8 @@ + DESTDIR = + SBINDIR = /usr/sbin + XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare +-LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw ++LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses ++CC ?= gcc + + OBJS= latencytop.o text_display.o translate.o fsync.o + +@@ -26,16 +27,17 @@ + + # We write explicity this "implicit rule" + %.o : %.c +- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@ ++ $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@ + + latencytop: $(OBJS) latencytop.h Makefile +- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop ++ $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop + + clean: + rm -f *~ latencytop DEADJOE *.o + + install: latencytop + mkdir -p $(DESTDIR)/usr/share/latencytop ++ mkdir -p $(DESTDIR)/$(SBINDIR) + install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans + install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/ + install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/ diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb new file mode 100644 index 000000000..15f366707 --- /dev/null +++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "LatencyTOP, a Linux tool measuring and fixing latency" +HOMEPAGE = "http://www.latencytop.org/" +BUGTRACKER = "n/a" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa" + +DEPENDS = "virtual/libintl ncurses glib-2.0 gtk+" + +PR = "r2" + +SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \ + file://latencytop-makefile.patch" + +SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c" +SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef" + +CFLAGS += "${LDFLAGS}" + +do_install() { + oe_runmake install DESTDIR=${D} +} diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb new file mode 100644 index 000000000..367597806 --- /dev/null +++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb @@ -0,0 +1,83 @@ +DESCRIPTION = "Firmware files for use with Linux kernel" +SECTION = "kernel" +# Notes: +# This is kind of a mess. Each bit of firmware has their own license. Some free +# some not. Leaving this as Proprietary for now, but this recipe should be probably +# be rethought out a bit more around how it deals with licenses. + +LICENSE = "Proprietary" + +LIC_FILES_CHKSUM = "file://LICENSE.radeon_rlc;md5=4c243f7854d2884b483abda991adef43 \ + file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \ + file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \ + file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \ + file://LICENCE.qla2xxx;md5=4005328a134054f0fa077bdc37aa64f2 \ + file://LICENCE.iwlwifi_firmware;md5=311cc823df5b1be4f00fbf0f17d96a6b \ + file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \ + file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \ + file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \ + file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \ + " + +SRCREV = "15888a2eab052ac3d3f49334e4f6f05f347a516e" +PV = "0.0+git${SRCPV}" +PR = "r1" + +SRC_URI = "git://git.infradead.org/users/dwmw2/linux-firmware.git;protocol=git" + +S = "${WORKDIR}/git" + +inherit allarch + +do_compile() { + : +} + +do_install() { + install -d ${D}/lib/firmware/ + cp -r * ${D}/lib/firmware/ + + # Libertas sd8686 + ln -sf libertas/sd8686_v9.bin ${D}/lib/firmware/sd8686.bin + ln -sf libertas/sd8686_v9_helper.bin ${D}/lib/firmware/sd8686_helper.bin + + # Realtek rtl8192* + install -m 0644 LICENCE.rtlwifi_firmware.txt ${D}/lib/firmware/rtlwifi/LICENCE.rtlwifi_firmware.txt + + # fixup wl12xx location, after 2.6.37 the kernel searches a different location for it + ( cd ${D}/lib/firmware ; ln -sf ti-connectivity/* . ) +} + +PACKAGES =+ "${PN}-sd8686 ${PN}-rtl8192cu linux-firmware-rtl8192ce linux-firmware-rtl8192su ${PN}-wl12xx" + +LICENSE_${PN}-sd8686 = "Firmware:LICENSE.libertas" +FILES_${PN}-sd8686 = " \ + /lib/firmware/libertas/sd8686_v9* \ + /lib/firmware/sd8686* \ + /lib/firmware/LICENCE.libertas \ +" + +LICENSE_${PN}-rtl8192cu = "Firmware:LICENCE.rtlwifi_firmware" +FILES_${PN}-rtl8192cu = " \ + /lib/firmware/rtlwifi/rtl8192cufw.bin \ + /lib/firmware/rtlwifi/LICENCE.rtlwifi_firmware.txt \ +" + +LICENSE_${PN}-rtl8192ce = "Firmware:LICENCE.rtlwifi_firmware" +FILES_${PN}-rtl8192ce = " \ + /lib/firmware/rtlwifi/rtl8192cfw.bin \ +" + +LICENSE_${PN}-rtl8192su = "Firmware:LICENCE.rtlwifi_firmware" +FILES_${PN}-rtl8192su = " \ + /lib/firmware/rtlwifi/rtl8712u.bin \ +" + +FILES_${PN}-wl12xx = " \ + /lib/firmware/wl12* \ + /lib/firmware/TI* \ + /lib/firmware/ti-connectivity \ +" + +FILES_${PN} += "/lib/firmware/*" + diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc new file mode 100644 index 000000000..4137be1a4 --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc @@ -0,0 +1,66 @@ +DESCRIPTION = "Sanitized set of kernel headers for the C library's use." +SECTION = "devel" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +python __anonymous () { + major = d.getVar("PV",True).split('.')[0] + if major == "3": + d.setVar("HEADER_FETCH_VER", "3.0") + else: + d.setVar("HEADER_FETCH_VER", "2.6") +} + +SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.bz2" + +S = "${WORKDIR}/linux-${PV}" + +set_arch() { + case ${TARGET_ARCH} in + alpha*) ARCH=alpha ;; + arm*) ARCH=arm ;; + cris*) ARCH=cris ;; + hppa*) ARCH=parisc ;; + i*86*) ARCH=i386 ;; + ia64*) ARCH=ia64 ;; + mips*) ARCH=mips ;; + m68k*) ARCH=m68k ;; + powerpc*) ARCH=powerpc ;; + s390*) ARCH=s390 ;; + sh*) ARCH=sh ;; + sparc64*) ARCH=sparc64 ;; + sparc*) ARCH=sparc ;; + x86_64*) ARCH=x86_64 ;; + avr32*) ARCH=avr32 ;; + bfin*) ARCH=blackfin ;; + microblaze*) ARCH=microblaze ;; + esac +} + +do_configure() { + set_arch + oe_runmake allnoconfig ARCH=$ARCH +} + +do_compile () { +} + +do_install() { + set_arch + oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix} ARCH=$ARCH + # Kernel should not be exporting this header + rm -f ${D}${exec_prefix}/include/scsi/scsi.h + + # The ..install.cmd conflicts between various configure runs + find ${D}${includedir} -name ..install.cmd | xargs rm -f +} + +BBCLASSEXTEND = "nativesdk" + +#DEPENDS = "cross-linkage" +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS += "unifdef-native" diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/connector-msg-size-fix.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/connector-msg-size-fix.patch new file mode 100644 index 000000000..5d531d65e --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/connector-msg-size-fix.patch @@ -0,0 +1,29 @@ +Upstream-Status: Inappropriate [embedded specific] + +Currently default header is linux-libc-header, which leads the dismatch +with wrs kernel. + +The different headers for same file cause trouble between kerenl module and +user level binary. E.g. segfault in v86d due to different +CONNECTOR_MAX_MSG_SIZE in connector.h from the one used by uvesafb. + +This fix is work around to sync with wrs kernel headers, and should be removed +after switching to linux-libc-headers-wrs. + +[BUGID #279] fixed by this. + +Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> + +Index: linux-2.6.34/include/linux/connector.h +=================================================================== +--- linux-2.6.34.orig/include/linux/connector.h 2010-09-30 14:15:25.000000000 +0800 ++++ linux-2.6.34/include/linux/connector.h 2010-09-30 14:15:43.000000000 +0800 +@@ -48,7 +48,7 @@ + /* + * Maximum connector's message size. + */ +-#define CONNECTOR_MAX_MSG_SIZE 16384 ++#define CONNECTOR_MAX_MSG_SIZE 65536 + + /* + * idx and val are unique identifiers which diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.0.8.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.0.8.bb new file mode 100644 index 000000000..7bb589550 --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.0.8.bb @@ -0,0 +1,7 @@ +require linux-libc-headers.inc + +PR = "r1" + +SRC_URI += " file://connector-msg-size-fix.patch" +SRC_URI[md5sum] = "eac4d398a0ecd98214487cd47a228998" +SRC_URI[sha256sum] = "4ed16da319848f681f711dbda2ac2cf1b306a280ec22f90bae190cf23b533add" diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.2.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.2.bb new file mode 100644 index 000000000..9bee02bbf --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_3.2.bb @@ -0,0 +1,6 @@ +require linux-libc-headers.inc + +PR = "r1" + +SRC_URI[md5sum] = "7ceb61f87c097fc17509844b71268935" +SRC_URI[sha256sum] = "c881fc2b53cf0da7ca4538aa44623a7de043a41f76fd5d0f51a31f6ed699d463" diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc new file mode 100644 index 000000000..9188cee1e --- /dev/null +++ b/meta/recipes-kernel/linux/linux-dtb.inc @@ -0,0 +1,27 @@ +# Support for device tree generation +FILES_kernel-devicetree = "/boot/devicetree*" +KERNEL_DEVICETREE_FLAGS = "-R 8 -p 0x3000" + +python __anonymous () { + import bb + + devicetree = d.getVar("KERNEL_DEVICETREE", True) or '' + if devicetree: + depends = d.getVar("DEPENDS", True) + d.setVar("DEPENDS", "%s dtc-native" % depends) + packages = d.getVar("PACKAGES", True) + d.setVar("PACKAGES", "%s kernel-devicetree" % packages) +} + +do_install_append() { + if test -n "${KERNEL_DEVICETREE}"; then + dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE} + install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION} + install -d ${DEPLOYDIR} + install -m 0644 devicetree ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.dtb + cd ${DEPLOYDIR} + rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb + ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb + fi +} + diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb new file mode 100644 index 000000000..518c74b31 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-dummy.bb @@ -0,0 +1,29 @@ +SECTION = "kernel" +DESCRIPTION = "Dummy Linux kernel" +LICENSE = "GPL" + +LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" + +PROVIDES += "virtual/kernel" + +PACKAGES_DYNAMIC += "kernel-module-*" +PACKAGES_DYNAMIC += "kernel-image-*" + +#COMPATIBLE_MACHINE = "your_machine" + +PR = "r1" + +SRC_URI = "file://COPYING.GPL" +S = "${WORKDIR}" + +do_configure() { + : +} + +do_compile () { + : +} + +do_install() { + : +} diff --git a/meta/recipes-kernel/linux/linux-dummy/COPYING.GPL b/meta/recipes-kernel/linux/linux-dummy/COPYING.GPL new file mode 100644 index 000000000..d511905c1 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-dummy/COPYING.GPL @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/meta/recipes-kernel/linux/linux-tools.inc b/meta/recipes-kernel/linux/linux-tools.inc new file mode 100644 index 000000000..3b03c0516 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-tools.inc @@ -0,0 +1,41 @@ +# included by kernel recipes if they want to build/provide +# perf functionality from their tree. + +BUILDPERF = "yes" +BUILDPERF_libc-uclibc = "no" +# perf requires binutils which is GPLv3 licensed, don't prevent the entire kernel +# being built if GPLv3 is in INCOMPATIBLE_LICENSE +python () { + if ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1): + # GPLv3, drop perf + d.setVar("BUILDPERF", "no") + d.setVar("PERFDEPENDS", "") +} + +do_compile_perf () { + if [ "${BUILDPERF}" = "yes" ]; then + oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} NO_NEWT=1 NO_DWARF=1 + fi +} + +fakeroot do_install_perf () { + if [ "${BUILDPERF}" = "yes" ]; then + oe_runmake -C ${S}/tools/perf CC="${CC}" LD="${LD}" prefix=${prefix} DESTDIR=${D} install NO_NEWT=1 NO_DWARF=1 + fi +} + + +# perf tasks +addtask compile_perf after do_compile before do_install +addtask install_perf after do_install before do_package + +do_compile_perf[umask] = "022" +do_install_perf[umask] = "022" + +PERFDEPENDS = "virtual/${MLPREFIX}libc:do_populate_sysroot ${MLPREFIX}elfutils:do_populate_sysroot ${MLPREFIX}binutils:do_populate_sysroot" +PERFDEPENDS_libc-uclibc = "" +PERFRDEPENDS = "python perl elfutils" +PERFRDEPENDS_libc-uclibc = "" + +do_compile_perf[depends] = "${PERFDEPENDS}" +RDEPENDS_perf += "${PERFRDEPENDS}" diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb new file mode 100644 index 000000000..14af91dc3 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb @@ -0,0 +1,38 @@ +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +KMACHINE = "common-pc" +KMACHINE_qemux86 = "common-pc" +KMACHINE_qemux86-64 = "common-pc-64" +KMACHINE_qemuarm = "arm-versatile-926ejs" +KMACHINE_qemuppc = "qemu-ppc32" +KMACHINE_qemumips = "mti-malta32-be" + +KBRANCH = "yocto/standard/preempt-rt/base" +KBRANCH_qemuppc = "yocto/standard/preempt-rt/qemu-ppc32" + +LINUX_VERSION ?= "3.0.24" +LINUX_KERNEL_TYPE = "preempt-rt" +KMETA = "meta" + +SRCREV_machine ?= "cf280f1dc5877d4ca43d21307222326efa68bb27" +SRCREV_machine_qemuppc ?= "afaa5baa6a9ca9c8a03a9a3eee2ba9fba089f416" +SRCREV_meta ?= "34e0d2b4b4e9778b31f9ea99ca43f0dc71a7ee23" + +PR = "r2" +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.0.git;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +# Omit broken machines from COMPATIBLE_MACHINE +# qemuppc hangs at boot +# qemumips panics at boot +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm)" + +# Functionality flags +KERNEL_FEATURES = "features/netfilter" +KERNEL_FEATURES_append = " features/taskstats" +KERNEL_FEATURES_append_qemux86 = " cfg/sound" +KERNEL_FEATURES_append_qemux86-64 = " cfg/sound" + +require recipes-kernel/linux/linux-tools.inc diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb b/meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb new file mode 100644 index 000000000..b275ad483 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-rt_3.2.bb @@ -0,0 +1,39 @@ +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +KMACHINE = "common-pc" +KMACHINE_qemux86 = "common-pc" +KMACHINE_qemux86-64 = "common-pc-64" +KMACHINE_qemuarm = "arm-versatile-926ejs" +KMACHINE_qemuppc = "qemu-ppc32" +KMACHINE_qemumips = "mti-malta32-be" + +KBRANCH = "standard/preempt-rt/base" +KBRANCH_qemuppc = "standard/preempt-rt/qemu-ppc32" + +LINUX_VERSION ?= "3.2.11" +LINUX_KERNEL_TYPE = "preempt-rt" + +KMETA = "meta" + +SRCREV_machine ?= "3ebf4d172cf4a41d2abf09e4036f0850e08064e7" +SRCREV_machine_qemuppc ?= "7cebfe717987f4ffa9ae90558c28f45049847c1c" +SRCREV_meta ?= "49f931bc294d5b6be60502bbd448cff5aa766235" + +PR = "r1" +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.2.git;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +# Omit broken machines from COMPATIBLE_MACHINE +# qemuppc hangs at boot +# qemumips panics at boot +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm)" + +# Functionality flags +KERNEL_FEATURES = "features/netfilter" +KERNEL_FEATURES_append = " features/taskstats" +KERNEL_FEATURES_append_qemux86 = " cfg/sound" +KERNEL_FEATURES_append_qemux86-64 = " cfg/sound" + +require recipes-kernel/linux/linux-tools.inc diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.2.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.2.bb new file mode 100644 index 000000000..f50e12e49 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.2.bb @@ -0,0 +1,25 @@ +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +# We need lzma (as CONFIG_KERNEL_LZMA=y) +DEPENDS += "xz-native" + +KMACHINE = "common-pc" +KBRANCH = "standard/tiny" +LINUX_KERNEL_TYPE = "tiny" +KCONFIG_MODE = "--allnoconfig" + +LINUX_VERSION ?= "3.2.11" + +SRCREV_machine ?= "61960ba8e910d54b5525d5e9b6a7469bc399c246" +SRCREV_meta ?= "49f931bc294d5b6be60502bbd448cff5aa766235" + +PR = "r0" +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.2;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +COMPATIBLE_MACHINE = "(qemux86)" + +# Functionality flags +KERNEL_FEATURES = "" diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc new file mode 100644 index 000000000..0912beef5 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto.inc @@ -0,0 +1,40 @@ +DESCRIPTION = "Yocto Kernel" +SECTION = "kernel" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +# A KMACHINE is the mapping of a yocto $MACHINE to what is built +# by the kernel. This is typically the branch that should be built, +# and it can be specific to the machine or shared +# KMACHINE = "UNDEFINED" + +LINUX_KERNEL_TYPE ?= "standard" + +# KMETA ?= "" +KBRANCH ?= "master" +KMACHINE ?= "${MACHINE}" +SRCREV_FORMAT ?= "meta_machine" + +LINUX_VERSION_EXTENSION ?= "-yocto-${LINUX_KERNEL_TYPE}" + +do_patch[depends] = "kern-tools-native:do_populate_sysroot" + +addtask kernel_configme before do_configure after do_patch + +# Pick up shared functions +inherit kernel-yocto +require linux-dtb.inc + +B = "${WORKDIR}/linux-${MACHINE}-${LINUX_KERNEL_TYPE}-build" + +do_install_append(){ + if [ -n "${KMETA}" ]; then + rm -rf ${STAGING_KERNEL_DIR}/${KMETA} + fi +} + +# extra tasks +addtask kernel_link_vmlinux after do_compile before do_install +addtask validate_branches before do_patch after do_kernel_checkout +addtask kernel_configcheck after do_configure before do_compile diff --git a/meta/recipes-kernel/linux/linux-yocto/tools-perf-no-scripting.patch b/meta/recipes-kernel/linux/linux-yocto/tools-perf-no-scripting.patch new file mode 100644 index 000000000..d07335a5f --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto/tools-perf-no-scripting.patch @@ -0,0 +1,52 @@ + +Upstream-Status: Inappropriate [configuration] + +Index: tools/perf/Makefile +=================================================================== +--- a/tools/perf/Makefile 2011-01-14 14:17:33.127008554 -0600 ++++ b/tools/perf/Makefile 2011-01-14 14:18:14.227008548 -0600 +@@ -588,42 +588,8 @@ + endif + endif + +-ifdef NO_LIBPERL +- BASIC_CFLAGS += -DNO_LIBPERL +-else +- PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) +- PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) +- PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) +- PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null` +- FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) +- +- ifneq ($(call try-cc,$(SOURCE_PERL_EMBED),$(FLAGS_PERL_EMBED)),y) +- BASIC_CFLAGS += -DNO_LIBPERL +- else +- ALL_LDFLAGS += $(PERL_EMBED_LDFLAGS) +- EXTLIBS += $(PERL_EMBED_LIBADD) +- LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-perl.o +- LIB_OBJS += $(OUTPUT)scripts/perl/Perf-Trace-Util/Context.o +- endif +-endif +- +-ifdef NO_LIBPYTHON +- BASIC_CFLAGS += -DNO_LIBPYTHON +-else +- PYTHON_EMBED_LDOPTS = $(shell python-config --ldflags 2>/dev/null) +- PYTHON_EMBED_LDFLAGS = $(call strip-libs,$(PYTHON_EMBED_LDOPTS)) +- PYTHON_EMBED_LIBADD = $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) +- PYTHON_EMBED_CCOPTS = `python-config --cflags 2>/dev/null` +- FLAGS_PYTHON_EMBED=$(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS) +- ifneq ($(call try-cc,$(SOURCE_PYTHON_EMBED),$(FLAGS_PYTHON_EMBED)),y) +- BASIC_CFLAGS += -DNO_LIBPYTHON +- else +- ALL_LDFLAGS += $(PYTHON_EMBED_LDFLAGS) +- EXTLIBS += $(PYTHON_EMBED_LIBADD) +- LIB_OBJS += $(OUTPUT)util/scripting-engines/trace-event-python.o +- LIB_OBJS += $(OUTPUT)scripts/python/Perf-Trace-Util/Context.o +- endif +-endif ++BASIC_CFLAGS += -DNO_LIBPERL ++BASIC_CFLAGS += -DNO_LIBPYTHON + + ifdef NO_DEMANGLE + BASIC_CFLAGS += -DNO_DEMANGLE diff --git a/meta/recipes-kernel/linux/linux-yocto_2.6.37.bb b/meta/recipes-kernel/linux/linux-yocto_2.6.37.bb new file mode 100644 index 000000000..3968c62f3 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto_2.6.37.bb @@ -0,0 +1,38 @@ +inherit kernel +require linux-yocto.inc + +KMACHINE = "yocto/standard/base" +KMACHINE_qemux86 = "yocto/standard/common-pc/base" +KMACHINE_qemux86-64 = "yocto/standard/common-pc-64/base" +KMACHINE_qemuppc = "yocto/standard/qemu-ppc32" +KMACHINE_qemumips = "yocto/standard/mti-malta32-be" +KMACHINE_qemuarm = "yocto/standard/arm-versatile-926ejs" + +KBRANCH = "${KMACHINE}" + +KMETA = "meta" + +LINUX_VERSION ?= "2.6.37" + +SRCREV_machine_qemuarm = "b3e53a090eaa23aa82e64fa0a563a93a2b4dbb5d" +SRCREV_machine_qemumips = "91f2eb4a3b447476b36aac8e6e198d08c98e0680" +SRCREV_machine_qemuppc = "862faf3666b3a4e4bc1d469ff5fb3fb90c25f621" +SRCREV_machine_qemux86 = "27ad78e1f6378da554775a7d6760730c92f8c5a7" +SRCREV_machine_qemux86-64 = "af2bfbe5f757361b5b027a24d67a93bfdfaaf33c" +SRCREV_machine = "4ae8f8605c81c39b959948e23f7123294a5dfb3f" +SRCREV_meta = "aeea99683c7283f1f3320bf2ee7085ee252d4e7e" + +PR = "r23" +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-2.6.37;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64)" + +# Functionality flags +KERNEL_FEATURES = "features/netfilter" +KERNEL_FEATURES_append = " features/taskstats" +KERNEL_FEATURES_append_qemux86 = " cfg/sound" +KERNEL_FEATURES_append_qemux86-64 = " cfg/sound" + +require linux-tools.inc diff --git a/meta/recipes-kernel/linux/linux-yocto_3.0.bb b/meta/recipes-kernel/linux/linux-yocto_3.0.bb new file mode 100644 index 000000000..82a722425 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto_3.0.bb @@ -0,0 +1,43 @@ +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +KBRANCH = "yocto/standard/base" +KBRANCH_qemux86 = "yocto/standard/common-pc/base" +KBRANCH_qemux86-64 = "yocto/standard/common-pc-64/base" +KBRANCH_qemuppc = "yocto/standard/qemu-ppc32" +KBRANCH_qemumips = "yocto/standard/mti-malta32-be" +KBRANCH_qemuarm = "yocto/standard/arm-versatile-926ejs" + +# Temporary until 3.0 kernel tree is updated with machine mappings +KMACHINE_qemux86 = "common-pc" +KMACHINE_qemux86-64 = "common-pc-64" +KMACHINE_qemuppc = "qemu-ppc32" +KMACHINE_qemumips = "mti-malta32-be" +KMACHINE_qemuarm = "arm-versatile-926ejs" + +KMETA = "meta" + +LINUX_VERSION ?= "3.0.24" + +SRCREV_machine_qemuarm ?= "62bbe1d7a0e5c1200a99dabca889a52c9417b96b" +SRCREV_machine_qemumips ?= "66de88919f24f1e590a48dae6de752a68fed2353" +SRCREV_machine_qemuppc ?= "7528f1d06ef5665eed8c1498f62d5403b82bbbd6" +SRCREV_machine_qemux86 ?= "f153b0eb8264dc1e69f59d4c9173619feb4d5bd9" +SRCREV_machine_qemux86-64 ?= "aac580659dc0ce083f250fb05abf82e58d7f4531" +SRCREV_machine ?= "da7c40006b08916ff3a3db104def82aaf9ac2716" +SRCREV_meta ?= "34e0d2b4b4e9778b31f9ea99ca43f0dc71a7ee23" + +PR = "r4" +PV = "${LINUX_VERSION}+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.0;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64)" + +# Functionality flags +KERNEL_FEATURES = "features/netfilter" +KERNEL_FEATURES_append = " features/taskstats" +KERNEL_FEATURES_append_qemux86 = " cfg/sound" +KERNEL_FEATURES_append_qemux86-64 = " cfg/sound" + +require linux-tools.inc diff --git a/meta/recipes-kernel/linux/linux-yocto_3.2.bb b/meta/recipes-kernel/linux/linux-yocto_3.2.bb new file mode 100644 index 000000000..14de6f4f4 --- /dev/null +++ b/meta/recipes-kernel/linux/linux-yocto_3.2.bb @@ -0,0 +1,43 @@ +inherit kernel +require recipes-kernel/linux/linux-yocto.inc + +KMACHINE = "common-pc" +KMACHINE_qemux86 = "common-pc" +KMACHINE_qemux86-64 = "common-pc-64" +KMACHINE_qemuppc = "qemu-ppc32" +KMACHINE_qemumips = "mti-malta32-be" +KMACHINE_qemuarm = "arm-versatile-926ejs" + +KBRANCH = "standard/default/base" +KBRANCH_qemux86 = "standard/default/common-pc/base" +KBRANCH_qemux86-64 = "standard/default/common-pc-64/base" +KBRANCH_qemuppc = "standard/default/qemu-ppc32" +KBRANCH_qemumips = "standard/default/mti-malta32-be" +KBRANCH_qemuarm = "standard/default/arm-versatile-926ejs" + +LINUX_VERSION ?= "3.2.11" + +SRCREV_machine_qemuarm ?= "ba47a1cc9bb6ad576b2ac7adb3036bcfa569fe2e" +SRCREV_machine_qemumips ?= "3b2fd654392a2f33aed12748548c04e9b169591b" +SRCREV_machine_qemuppc ?= "cf3e188cf2a18c48a0e6f9ca54c36e6ac39512ec" +SRCREV_machine_qemux86 ?= "46f1007ad22b6790224c66a8dc4e80fdbd21eea1" +SRCREV_machine_qemux86-64 ?= "00e5ec2393bada6723bd9a07ded3d001c02fa727" +SRCREV_machine ?= "f4f8ba730e7783e09413872414d0a17c142c816d" +SRCREV_meta ?= "49f931bc294d5b6be60502bbd448cff5aa766235" + +PR = "r1" +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "meta" + +SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.2;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta" + +COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64)" + +# Functionality flags +KERNEL_FEATURES="features/netfilter" +KERNEL_FEATURES_append=" features/taskstats" +KERNEL_FEATURES_append_qemux86=" cfg/sound" +KERNEL_FEATURES_append_qemux86-64=" cfg/sound" + +require linux-tools.inc diff --git a/meta/recipes-kernel/lttng-2.0/babeltrace_0.8.bb b/meta/recipes-kernel/lttng-2.0/babeltrace_0.8.bb new file mode 100644 index 000000000..0b4a1226c --- /dev/null +++ b/meta/recipes-kernel/lttng-2.0/babeltrace_0.8.bb @@ -0,0 +1,28 @@ +SUMMARY = "Babeltrace - Trace Format Babel Tower" +DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log." +HOMEPAGE = "http://www.efficios.com/babeltrace/" +BUGTRACKER = "n/a" + +LICENSE = "MIT & GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8d1a03b3c17bdd158b3cbb34813b1423" + +inherit autotools + +DEPENDS = "gtk+ util-linux" + +SRCREV = "efc5077568403009493d1d72e94f292838825e51" +PV = "0.8+git${SRCPV}" +PR = "r0" + +SRC_URI = "git://git.efficios.com/babeltrace.git;protocol=git" + +S = "${WORKDIR}/git" + +do_configure_prepend () { + ${S}/bootstrap +} + +# Due to liburcu not building for MIPS currently this recipe needs to +# be limited also. +# So here let us first suppport x86/arm/powerpc platforms now. +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*)-linux' diff --git a/meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch b/meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch new file mode 100644 index 000000000..aa24171f3 --- /dev/null +++ b/meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch @@ -0,0 +1,41 @@ +Upstream-Status: Inappropriate [embedded specific] + +lttng-modules: replace KERNELDIR with KERNEL_SRC + +Since lttng-modules uses the default way of module.bbclass to +build and install lttng-modules, we do this replacement for +it as-is. + +Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com> +--- + Makefile | 7 +++---- + 1 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 5ac13d7..25caad5 100644 +--- a/Makefile ++++ b/Makefile +@@ -38,17 +38,16 @@ obj-m += lib/ + endif + + else +- KERNELDIR ?= /lib/modules/$(shell uname -r)/build + PWD := $(shell pwd) + CFLAGS = $(EXTCFLAGS) + + default: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules + + modules_install: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules_install + + clean: +- $(MAKE) -C $(KERNELDIR) M=$(PWD) clean ++ $(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean + + endif +-- +1.7.5.4 + diff --git a/meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-sycalls-protect-is_compat_task-from-redefiniti.patch b/meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-sycalls-protect-is_compat_task-from-redefiniti.patch new file mode 100644 index 000000000..005663380 --- /dev/null +++ b/meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-sycalls-protect-is_compat_task-from-redefiniti.patch @@ -0,0 +1,41 @@ +From 415a1a678cb2fcf603f9777f2c7b71c1e38f8101 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <bruce.ashfield@windriver.com> +Date: Mon, 19 Mar 2012 13:30:31 -0400 +Subject: [PATCH] lttng-sycalls: protect is_compat_task from redefinition + +recent -stable kernels have their own fallback definition of is_compat_task + + #define is_compat_task() (0) + +To protect against this double definition of is_compat_task we can check +to see if it is already defined, and skip the lttng variant. + +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> +--- + lttng-syscalls.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/lttng-syscalls.c b/lttng-syscalls.c +index 9de3c07..80d0f05 100644 +--- a/lttng-syscalls.c ++++ b/lttng-syscalls.c +@@ -17,12 +17,16 @@ + #include "ltt-events.h" + + #ifndef CONFIG_COMPAT ++ ++#ifndef is_compat_task + static inline int is_compat_task(void) + { + return 0; + } + #endif + ++#endif ++ + static + void syscall_entry_probe(void *__data, struct pt_regs *regs, long id); + +-- +1.7.5.4 + diff --git a/meta/recipes-kernel/lttng-2.0/lttng-modules_2.0.pre11.bb b/meta/recipes-kernel/lttng-2.0/lttng-modules_2.0.pre11.bb new file mode 100644 index 000000000..4c78f36ba --- /dev/null +++ b/meta/recipes-kernel/lttng-2.0/lttng-modules_2.0.pre11.bb @@ -0,0 +1,30 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit KERNEL MODULE" +DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" +LICENSE = "LGPLv2.1 & GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1eb086682a7c65a45acd9bcdf6877b3e \ + file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \ + file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad" + +DEPENDS = "virtual/kernel" + +inherit module + +SRCREV = "4d3e89e379fc66480d729abe8daa5c86eb585400" +PV = "2.0.pre11+git${SRCREV}" +PR = "r0" + +SRC_URI = "git://git.lttng.org/lttng-modules.git;protocol=git \ + file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \ + file://lttng-sycalls-protect-is_compat_task-from-redefiniti.patch" + +export INSTALL_MOD_DIR="kernel/lttng-modules" +export KERNEL_SRC="${STAGING_KERNEL_DIR}" + + +S = "${WORKDIR}/git" + +# Due to liburcu not building for MIPS currently this recipe needs to +# be limited also. +# So here let us first suppport x86/arm/powerpc platforms now. +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*)-linux' diff --git a/meta/recipes-kernel/lttng-2.0/lttng-tools/lttng-tools-fix-compiling-error-for-powerpc-arm.patch b/meta/recipes-kernel/lttng-2.0/lttng-tools/lttng-tools-fix-compiling-error-for-powerpc-arm.patch new file mode 100644 index 000000000..73253d1a6 --- /dev/null +++ b/meta/recipes-kernel/lttng-2.0/lttng-tools/lttng-tools-fix-compiling-error-for-powerpc-arm.patch @@ -0,0 +1,27 @@ +Upstream-Status: Pending + +Fix compiling error on powerpc and arm + +For powerpc and arm, some MAP_ are defined asm/mman.h, +so including it in header. + +Signed-off-by: Zumeng Chen <zumeng.chen@windriver.com> +--- + common/runas.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/common/runas.c b/common/runas.c +index f612ccc..62a2791 100644 +--- a/common/runas.c ++++ b/common/runas.c +@@ -29,6 +29,7 @@ + #include <fcntl.h> + #include <sched.h> + #include <sys/mman.h> ++#include <asm/mman.h> + + #include <lttngerr.h> + +-- +1.7.5.4 + diff --git a/meta/recipes-kernel/lttng-2.0/lttng-tools_2.0-pre16.bb b/meta/recipes-kernel/lttng-2.0/lttng-tools_2.0-pre16.bb new file mode 100644 index 000000000..d3a6a3070 --- /dev/null +++ b/meta/recipes-kernel/lttng-2.0/lttng-tools_2.0-pre16.bb @@ -0,0 +1,30 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit Control" +DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \ +to extract program execution details from the Linux operating system \ +and interpret them." + +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=ab682a4729389c3f11913d758affe98e \ + file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca" + +DEPENDS = "liburcu popt lttng2-ust" + +SRCREV = "9beed4cb465347c778e4f982c330cef78f2628b7" +PV = "v2.0.pre16+git${SRCREV}" +PR = "r0" + +SRC_URI = "git://git.lttng.org/lttng-tools.git;protocol=git\ + file://lttng-tools-fix-compiling-error-for-powerpc-arm.patch" + +S = "${WORKDIR}/git" + +inherit autotools + +export KERNELDIR="${STAGING_KERNEL_DIR}" + +# Due to liburcu not building for MIPS currently this recipe needs to +# be limited also. +# So here let us first suppport x86/arm/powerpc platforms now. +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*)-linux' diff --git a/meta/recipes-kernel/lttng-2.0/lttng2-ust_1.9.4.bb b/meta/recipes-kernel/lttng-2.0/lttng2-ust_1.9.4.bb new file mode 100644 index 000000000..87d866e00 --- /dev/null +++ b/meta/recipes-kernel/lttng-2.0/lttng2-ust_1.9.4.bb @@ -0,0 +1,30 @@ +SUMMARY = "Linux Trace Toolkit Userspace Tracer 2.0" +DESCRIPTION = "The LTTng UST 2.0 package contains the userspace tracer library to trace userspace codes." +HOMEPAGE = "http://lttng.org/lttng2.0" +BUGTRACKER = "n/a" + +LICENSE = "LGPLv2.1+ & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=e647752e045a8c45b6f583771bd561ef \ + file://snprintf/snprintf.c;endline=32;md5=d3d544959d8a3782b2e07451be0a903c \ + file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44" + +inherit autotools + +DEPENDS = "liburcu util-linux" + +SRCREV = "eeee05f35f014a8c068e0d29b18629cafbfdfc1d" +PV = "1.9.4+git${SRCPV}" +PR = "r0" + +SRC_URI = "git://git.lttng.org/lttng-ust.git;protocol=git" + +S = "${WORKDIR}/git" + +do_configure_prepend () { + ${S}/bootstrap +} + +# Due to liburcu not building for MIPS currently this recipe needs to +# be limited also. +# So here let us first suppport x86/arm/powerpc platforms now. +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*)-linux' diff --git a/meta/recipes-kernel/lttng/lttng-control_0.89.bb b/meta/recipes-kernel/lttng/lttng-control_0.89.bb new file mode 100644 index 000000000..77314c89a --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-control_0.89.bb @@ -0,0 +1,23 @@ +SECTION = "devel" +SUMMARY = "Linux Trace Toolkit Control" +DESCRIPTION = "The Linux trace toolkit is a suite of tools designed to \ +extract program execution details from the Linux operating system and \ +interpret them." +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +PR = "r0" + +LTTDATE = "05122011" + +SRC_URI = "http://lttng.org/files/lttng/ltt-control-${PV}-${LTTDATE}.tar.gz" + +SRC_URI[md5sum] = "2e5a531bf5cab88eef5282b45271789f" +SRC_URI[sha256sum] = "feb120e0bedd9ef8917dd14ee96cc94941f517826a4c2035d1c4aa33e4e808ab" + +S = "${WORKDIR}/ltt-control-${PV}-${LTTDATE}" + +inherit autotools + +export KERNELDIR="${STAGING_KERNEL_DIR}" + +FILES_${PN} += "${datadir}/ltt-control/facilities/*" diff --git a/meta/recipes-kernel/lttng/lttng-ust_0.16.bb b/meta/recipes-kernel/lttng/lttng-ust_0.16.bb new file mode 100644 index 000000000..e9540837c --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-ust_0.16.bb @@ -0,0 +1,32 @@ +SUMMARY = "Linux Trace Toolkit Userspace Tracer" +DESCRIPTION = "The LTTng Userspace Tracer (UST) is a library accompanied by a set of tools to trace userspace code" +HOMEPAGE = "http://lttng.org/ust" +BUGTRACKER = "http://lttng.org/project/issues" + +LICENSE = "LGPLv2.1+ & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=e647752e045a8c45b6f583771bd561ef \ + file://ustctl/ustctl.c;endline=16;md5=b50c6fa0307175bb1ce0db49d752c03b \ + file://snprintf/various.h;endline=31;md5=89f2509b6b4682c4fc95255eec4abe44" + +DEPENDS = "liburcu" + +PR = "r0" +PE = "1" + +SRC_URI = "http://lttng.org/files/ust/releases/ust-${PV}.tar.gz" + +SRC_URI[md5sum] = "8e5d5de47bfff29f50439d192ad1e478" +SRC_URI[sha256sum] = "88167741b1fbf335e006f0208d8c41784705e28adac84df71d3d9f6c58191dab" + + +S = "${WORKDIR}/ust-${PV}" + +inherit autotools + +#EXTRA_OECONF = "ac_cv_lib_urcu_bp_synchronize_rcu_bp=no" + +# Due to liburcu not building on MIPS currently this recipe needs to +# be limited also. +# So here let us first suppport x86/arm/powerpc platforms now. +COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*)-linux' + diff --git a/meta/recipes-kernel/lttng/lttng-viewer/add_linkage_to_lttvwindow.patch b/meta/recipes-kernel/lttng/lttng-viewer/add_linkage_to_lttvwindow.patch new file mode 100644 index 000000000..4a135dff2 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-viewer/add_linkage_to_lttvwindow.patch @@ -0,0 +1,42 @@ +Upstream-Status: Inappropriate [configuration] + +Explicitly add linkage to lttvwindow. + +Without the fix, lttv-gui inside target can't run, complaining +"undefined symbol: LTTV_VIEWER_CONSTRUCTORS". + +Tue May 3 21:39:37 CST 2011 + +Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> + +diff --git a/lttv/modules/gui/common.am b/lttv/modules/gui/common.am +index ce50113..89083aa 100644 +--- a/lttv/modules/gui/common.am ++++ b/lttv/modules/gui/common.am +@@ -21,3 +21,4 @@ AM_LDFLAGS = $(MODULE_LDFLAGS) + + libdir = ${lttvplugindir} + ++LIBS += $(GTK_LIBS) -L${top_builddir}/lttv/modules/gui/lttvwindow/lttvwindow -llttvwindow +diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am b/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am +index c953fc9..489d640 100644 +--- a/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am ++++ b/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am +@@ -1,13 +1,14 @@ + ## Process this file with automake to produce Makefile.in + +-include ../../common.am +- + INCLUDES = \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ + -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ + $(DEFAULT_INCLUDES) + +-#libdir = ${lttvplugindir} ++AM_CFLAGS = $(MODULE_CFLAGS) ++AM_LDFLAGS = $(MODULE_LDFLAGS) ++ ++libdir = ${lttvplugindir} + + lib_LTLIBRARIES = liblttvwindow.la + diff --git a/meta/recipes-kernel/lttng/lttng-viewer_0.12.38.bb b/meta/recipes-kernel/lttng/lttng-viewer_0.12.38.bb new file mode 100644 index 000000000..233d836c3 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-viewer_0.12.38.bb @@ -0,0 +1,39 @@ +SUMMARY = "Linux Trace Toolkit Viewer" +DESCRIPTION = "The Linux trace toolkit is a suite of tools designed to \ +extract program execution details from the Linux operating system and \ +interpret them." +HOMEPAGE = "http://lttng.org/content/download" +BUGTRACKER = "n/a" + +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=f650d5f5af1e9648fe0b40e290d3adbb \ + file://ltt/ltt.h;beginline=2;endline=18;md5=8b7da9190028c50396d97fc85bad0da9 \ + file://lttv/lttv/traceset.c;beginline=2;endline=17;md5=bcab42863b64b41d153bf81bbe2490a6" +PR = "r2" + +DEPENDS = "gtk+ pango popt" + +SECTION = "devel" + +ALTNAME = "lttv-${PV}-21032011" + +SRC_URI = "http://lttng.org/files/packages/${ALTNAME}.tar.gz \ + file://add_linkage_to_lttvwindow.patch" + +SRC_URI[md5sum] = "071bf3dd13e7562c08ee8f8971cfc76d" +SRC_URI[sha256sum] = "cf87ffcf5d266b18979418e610a180a0b4214de41677f0be867885e15b2f7647" +S = "${WORKDIR}/${ALTNAME}" + +inherit autotools + +LEAD_SONAME = "liblttvtraceread*" + +FILES_${PN} += "\ + ${libdir}/liblttvtraceread*.so \ + ${libdir}/lttv/plugins/*.so \ + ${datadir}/lttv/facilities/* \ + ${datadir}/lttv/pixmaps/* " +FILES_${PN}-dbg += "${libdir}/lttv/plugins/.debug/" +FILES_${PN}-dev += "${libdir}/lttv/plugins/*.la" +FILES_${PN}-staticdev += "${libdir}/lttv/plugins/*.a" +INSANE_SKIP_${PN} = "dev-so" diff --git a/meta/recipes-kernel/modutils-initscripts/files/PD.patch b/meta/recipes-kernel/modutils-initscripts/files/PD.patch new file mode 100644 index 000000000..21ac49cbd --- /dev/null +++ b/meta/recipes-kernel/modutils-initscripts/files/PD.patch @@ -0,0 +1,8 @@ +Upstream-Status: Inappropriate [licensing] + +Index: modutils-initscripts-1.0/LICENSE +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ modutils-initscripts-1.0/LICENSE 2010-12-06 14:26:03.570339002 -0800 +@@ -0,0 +1 @@ ++Public Domain diff --git a/meta/recipes-kernel/modutils-initscripts/files/modutils.sh b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh new file mode 100755 index 000000000..9049bbb8a --- /dev/null +++ b/meta/recipes-kernel/modutils-initscripts/files/modutils.sh @@ -0,0 +1,36 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: module-init-tools +# Required-Start: +# Required-Stop: +# Should-Start: checkroot +# Should-stop: +# Default-Start: S +# Default-Stop: +# Short-Description: Process /etc/modules. +# Description: Load the modules listed in /etc/modules. +### END INIT INFO + +LOAD_MODULE=modprobe +[ -f /proc/modules ] || exit 0 +[ -f /etc/modules ] || exit 0 +[ -e /sbin/modprobe ] || LOAD_MODULE=insmod + +if [ ! -f /lib/modules/`uname -r`/modules.dep ]; then + [ "$VERBOSE" != no ] && echo "Calculating module dependencies ..." + depmod -Ae +fi + +[ "$VERBOSE" != no ] && echo -n "Loading modules: " +(cat /etc/modules; echo; ) | +while read module args +do + case "$module" in + \#*|"") continue ;; + esac + [ "$VERBOSE" != no ] && echo -n "$module " + eval "$LOAD_MODULE $module $args >/dev/null 2>&1" +done +[ "$VERBOSE" != no ] && echo + +exit 0 diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb new file mode 100644 index 000000000..89d38cff4 --- /dev/null +++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb @@ -0,0 +1,20 @@ +SECTION = "base" +DESCRIPTION = "modutils configuration files" +LICENSE = "PD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098" +SRC_URI = "file://modutils.sh \ + file://PD.patch" +PR = "r6" + +INITSCRIPT_NAME = "modutils.sh" +INITSCRIPT_PARAMS = "start 4 S ." + +inherit update-rc.d + +do_compile () { +} + +do_install () { + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/ +} diff --git a/meta/recipes-kernel/oprofile/oprofile.inc b/meta/recipes-kernel/oprofile/oprofile.inc new file mode 100644 index 000000000..73a5a07d1 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile.inc @@ -0,0 +1,35 @@ +SUMMARY = "System-Wide Profiler" +DESCRIPTION = "OProfile is a system-wide profiler for Linux systems, capable \ +of profiling all running code at low overhead." +HOMEPAGE = "http://oprofile.sourceforge.net/news/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=16191&atid=116191" + +LICENSE = "LGPLv2.1+ & GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://libopagent/opagent.h;beginline=5;endline=26;md5=4f16f72c7a493d8a4704aa18d03d15c6 \ + file://daemon/liblegacy/p_module.h;beginline=2;endline=20;md5=fc23a43455edf185307274a99730b6e4" + +SECTION = "devel" + +DEPENDS = "popt binutils" +RDEPENDS_${PN} = "binutils-symlinks" +RRECOMMENDS_${PN} = "kernel-vmlinux" + +FILES_${PN} = "${bindir} ${libdir}/${BPN}/lib*${SOLIBS} ${datadir}/${BPN}" +FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la" +FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a" + +INC_PR = "r0" + +SRC_URI = "file://opstart.patch \ + file://oprofile-no-query-modules.patch \ + file://acinclude.m4" + +inherit autotools + +EXTRA_OECONF = "--with-kernel-support --without-x" + +do_configure () { + cp ${WORKDIR}/acinclude.m4 ${S}/ + autotools_do_configure +} diff --git a/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 b/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 new file mode 100644 index 000000000..ffaa8288d --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/acinclude.m4 @@ -0,0 +1,600 @@ +dnl AX_KERNEL_OPTION(option, action-if-found, action-if-not-found) +dnl see if autoconf.h defines the option +AC_DEFUN([AX_KERNEL_OPTION], [ +SAVE_CFLAGS=$CFLAGS +CFLAGS="-I$KINC -O2 -D__KERNEL__" +AC_TRY_COMPILE( [#include <linux/config.h>], +[ +#ifndef $1 +break_me_hard(\\\); +#endif +],[$2],[$3],) +CFLAGS=$SAVE_CFLAGS +]) + +dnl Handle the 2.4 module inside module/ +AC_DEFUN([AX_CONFIG_MODULE], +[ +if test ! -f $KINC/linux/autoconf.h; then + AC_MSG_ERROR([no suitably configured kernel include tree found]) +fi + +dnl --- Get Linux kernel version and compile parameters --- + +AC_SUBST(KVERS) +AC_MSG_CHECKING([for kernel version]) +dnl it's like this to handle mandrake's fubar version.h - bug #471448 +eval KVERS=`gcc -I$KINC -E -dM $KINC/linux/version.h | grep -w UTS_RELEASE | awk '{print $[]3}'` +AC_MSG_RESULT([$KVERS]) +case "$KVERS" in +2.2.*|2.4.*) ;; +*) AC_MSG_ERROR([Unsupported kernel version]) +esac + +dnl Check for the minimal kernel version supported +AC_MSG_CHECKING([kernel version]) +AX_KERNEL_VERSION(2, 2, 10, <=, AC_MSG_RESULT([ok]), AC_MSG_ERROR([check html documentation install section])) + +dnl linux/spinlock.h added at some point in past +AC_MSG_CHECKING([for $KINC/linux/spinlock.h]) +if test -f $KINC/linux/spinlock.h; then + EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DHAVE_LINUX_SPINLOCK_HEADER" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([for rtc_lock]) +gcc -I$KINC -E $KINC/linux/mc146818rtc.h | grep rtc_lock >/dev/null +if test "$?" -eq 0; then + EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DRTC_LOCK" + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +arch="unknown" +AC_MSG_CHECKING(for x86-64 architecture) +AX_KERNEL_OPTION(CONFIG_X86_64, x8664=1, x8664=0) +AX_MSG_RESULT_YN($x8664) +BUILD_HAMMER=no +if test "$x8664" -eq 1; then + arch="x86" + BUILD_HAMMER=yes +else + AC_MSG_CHECKING(for x86 architecture) + AX_KERNEL_OPTION(CONFIG_X86, x86=1, x86=0) + AX_KERNEL_OPTION(CONFIG_X86_WP_WORKS_OK, x86=1, x86=$x86) + AX_MSG_RESULT_YN($x86) + test "$x86" = 1 && arch="x86" + + if test "$arch" = "unknown"; then + AC_MSG_CHECKING(for ia64 architecture) + AX_KERNEL_OPTION(CONFIG_IA64, ia64=1, ia64=0) + AX_MSG_RESULT_YN($ia64) + test "$ia64" = 1 && arch="ia64" + fi + +fi +AC_SUBST(BUILD_HAMMER) + +test "$arch" = "unknown" && AC_MSG_ERROR(Unsupported architecture) + +dnl check to see if kernel verion appropriate for arch +AC_MSG_CHECKING(arch/kernel version combination) +case "$arch" in +ia64) + AX_KERNEL_VERSION(2, 4, 18, <, AC_MSG_RESULT([ok]), + AC_MSG_ERROR([unsupported arch/kernel])) ;; +*) AC_MSG_RESULT([ok]) +esac + +dnl for now we do not support PREEMPT patch +AC_MSG_CHECKING([for preempt patch]) +AX_KERNEL_OPTION(CONFIG_PREEMPT,preempt=1,preempt=0) +AX_MSG_RESULT_YN([$preempt]) +test "$preempt" = 0 || AC_MSG_ERROR([unsupported kernel configuration : CONFIG_PREEMPT]) + +AC_SUBST(KINC) + +MODINSTALLDIR=/lib/modules/$KVERS + +OPROFILE_MODULE_ARCH=$arch +AC_SUBST(OPROFILE_MODULE_ARCH) +] +) + +dnl AX_KERNEL_VERSION(major, minor, level, comparison, action-if-true, action-if-false) +AC_DEFUN([AX_KERNEL_VERSION], [ +SAVE_CFLAGS=$CFLAGS +CFLAGS="-I$KINC -D__KERNEL__ -Werror" +AC_TRY_COMPILE( + [ + #include <linux/version.h> + #include <linux/config.h> + ], + [ + #if LINUX_VERSION_CODE $4 KERNEL_VERSION($1, $2, $3) + break_me_hard(\\\); + #endif + ], +[$5],[$6],) +CFLAGS=$SAVE_CFLAGS +]) + + +dnl AX_MSG_RESULT_YN(a) +dnl results "yes" iff a==1, "no" else +AC_DEFUN([AX_MSG_RESULT_YN], [x=no +test "x$1" = "x1" && x=yes +AC_MSG_RESULT($x)]) + +dnl AX_MALLOC_ATTRIBUTE - see if gcc will take __attribute__((malloc)) +AC_DEFUN([AX_MALLOC_ATTRIBUTE], +[ +AC_MSG_CHECKING([whether malloc attribute is understood]) +SAVE_CFLAGS=$CFLAGS +CFLAGS="-Werror $CFLAGS" +AC_TRY_COMPILE(,[ +void monkey() __attribute__((malloc)); +],AC_MSG_RESULT([yes]); AC_DEFINE(MALLOC_ATTRIBUTE_OK, 1, [whether malloc attribute is understood]), AC_MSG_RESULT([no])) +CFLAGS=$SAVE_CFLAGS +] +) + +dnl builtin_expect is used in module we can't add that in config.h +AC_DEFUN([AX_BUILTIN_EXPECT], +[ +AC_MSG_CHECKING([whether __builtin_expect is understood]) +SAVE_CFLAGS=$CFLAGS +CFLAGS="-Werror $CFLAGS" +AC_TRY_LINK(,[ +int i; +if (__builtin_expect(i, 0)) { } +], +AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK", +AC_MSG_RESULT([no]);) +CFLAGS=$SAVE_CFLAGS +] +) + +dnl AX_EXTRA_DIRS - Let user specify extra dirs for include/libs +AC_DEFUN([AX_EXTRA_DIRS], +[ +AC_ARG_WITH(extra-includes, +[ --with-extra-includes=DIR add extra include paths], + use_extra_includes="$withval", + use_extra_includes=NO +) +if test -n "$use_extra_includes" && \ + test "$use_extra_includes" != "NO"; then + ac_save_ifs=$IFS + IFS=':' + for dir in $use_extra_includes; do + extra_includes="$extra_includes -I$dir" + done + IFS=$ac_save_ifs + CPPFLAGS="$CPPFLAGS $extra_includes" +fi + +AC_ARG_WITH(extra-libs, +[ --with-extra-libs=DIR add extra library paths], + use_extra_libs=$withval, + use_extra_libs=NO +) +if test -n "$use_extra_libs" && \ + test "$use_extra_libs" != "NO"; then + ac_save_ifs=$IFS + IFS=':' + for dir in $use_extra_libs; do + extra_libraries="$extra_libraries -L$dir" + done + IFS=$ac_save_ifs + LDFLAGS="$LDFLAGS $extra_libraries" +fi +] +) + +dnl AX_POPT_CONST - check popt prototype +AC_DEFUN([AX_POPT_CONST], +[ +AC_MSG_CHECKING([popt prototype]) +SAVE_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-Werror $CXXFLAGS" +AC_TRY_COMPILE([#include <popt.h>], +[ +int c; char **v; +poptGetContext(0, c, v, 0, 0); +], +AC_MSG_RESULT([takes char **]);, +AC_MSG_RESULT([takes const char **]); AC_DEFINE(CONST_POPT, 1, [whether popt prototype takes a const char **])) +CXXFLAGS="$SAVE_CXXFLAGS" +] +) + +dnl AX_CHECK_SSTREAM - check if local sstream is needed to compile OK +AC_DEFUN([AX_CHECK_SSTREAM], +[ +AC_MSG_CHECKING([whether to use included sstream]) +AC_TRY_COMPILE([#include <sstream>], [], +AC_MSG_RESULT([no]);, +AC_MSG_RESULT([yes]); OP_CXXFLAGS="$OP_CXXFLAGS -I\${top_srcdir}/include") +] +) + +dnl AX_CHECK_TYPEDEF(typedef_name, type, action-if-true, action-if-false) +dnl exec action-if-true if typedef_name is a typedef to type else exec +dnl action-if-false +dnl currently work only with type typedef'ed in stddef.h +AC_DEFUN([AX_CHECK_TYPEDEF], [ +dnl AC_LANG_PUSH(C) not in autoconf 2.13 +AC_LANG_SAVE +AC_LANG_C +SAVE_CFLAGS=$CFLAGS +CFLAGS="-Werror $CFLAGS" + +AC_TRY_COMPILE( + [ + #include <stddef.h> + ], + [ + typedef void (*fct1)($1); + typedef void (*fct2)($2); + fct1 f1 = 0; + fct2 f2 = 0; + if (f1 == f2) {} + ], +[$3],[$4]) + +CFLAGS=$SAVE_CFLAGS +AC_LANG_RESTORE +]) + + +dnl AX_TYPEDEFED_NAME(typedef_name, candidate_list, var_name) +dnl set var_name to the typedef name of $1 which must be in canditate_list +dnl else produce a fatal error +AC_DEFUN([AX_TYPEDEFED_NAME], [ + AC_MSG_CHECKING([type of $1]) + for f in $2; do + AX_CHECK_TYPEDEF($1, $f, $3="$f", $3="") + if test -n "${$3}"; then + break + fi + done + if test -n "${$3}"; then + AC_MSG_RESULT([${$3}]) + else + AC_MSG_ERROR([not found]) + fi +]) + +dnl find a binary in the path +AC_DEFUN([QT_FIND_PATH], +[ + AC_MSG_CHECKING([for $1]) + AC_CACHE_VAL(qt_cv_path_$1, + [ + qt_cv_path_$1="NONE" + if test -n "$$2"; then + qt_cv_path_$1="$$2"; + else + dirs="$3" + qt_save_IFS=$IFS + IFS=':' + for dir in $PATH; do + dirs="$dirs $dir" + done + IFS=$qt_save_IFS + + for dir in $dirs; do + if test -x "$dir/$1"; then + if test -n "$5"; then + evalstr="$dir/$1 $5 2>&1 " + if eval $evalstr; then + qt_cv_path_$1="$dir/$1" + break + fi + else + qt_cv_path_$1="$dir/$1" + break + fi + fi + done + fi + ]) + + if test -z "$qt_cv_path_$1" || test "$qt_cv_path_$1" = "NONE"; then + AC_MSG_RESULT(not found) + $4 + else + AC_MSG_RESULT($qt_cv_path_$1) + $2=$qt_cv_path_$1 + fi +]) + +dnl Find the uic compiler on the path or in qt_cv_dir +AC_DEFUN([QT_FIND_UIC], +[ + QT_FIND_PATH(uic, ac_uic, $qt_cv_dir/bin) + if test -z "$ac_uic" -a "$FATAL" = 1; then + AC_MSG_ERROR([uic binary not found in \$PATH or $qt_cv_dir/bin !]) + fi +]) + +dnl Find the right moc in path/qt_cv_dir +AC_DEFUN([QT_FIND_MOC], +[ + QT_FIND_PATH(moc2, ac_moc2, $qt_cv_dir/bin) + QT_FIND_PATH(moc, ac_moc1, $qt_cv_dir/bin) + + if test -n "$ac_moc1" -a -n "$ac_moc2"; then + dnl found both. Prefer Qt3's if it exists else moc2 + $ac_moc1 -v 2>&1 | grep "Qt 3" >/dev/null + if test "$?" = 0; then + ac_moc=$ac_moc1; + else + ac_moc=$ac_moc2; + fi + else + if test -n "$ac_moc1"; then + ac_moc=$ac_moc1; + else + ac_moc=$ac_moc2; + fi + fi + + if test -z "$ac_moc" -a "$FATAL" = 1; then + AC_MSG_ERROR([moc binary not found in \$PATH or $qt_cv_dir/bin !]) + fi +]) + +dnl check a particular libname +AC_DEFUN([QT_TRY_LINK], +[ + SAVE_LIBS="$LIBS" + LIBS="$LIBS $1" + AC_TRY_LINK([ + #include <qglobal.h> + #include <qstring.h> + ], + [ + QString s("mangle_failure"); + #if (QT_VERSION < 221) + break_me_(\\\); + #endif + ], + qt_cv_libname=$1, + ) + LIBS="$SAVE_LIBS" +]) + +dnl check we can do a compile +AC_DEFUN([QT_CHECK_COMPILE], +[ + AC_MSG_CHECKING([for Qt library name]) + + AC_CACHE_VAL(qt_cv_libname, + [ + AC_LANG_CPLUSPLUS + SAVE_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $QT_INCLUDES $QT_LDFLAGS" + + for libname in -lqt-mt -lqt3 -lqt2 -lqt; + do + QT_TRY_LINK($libname) + if test -n "$qt_cv_libname"; then + break; + fi + done + + CXXFLAGS=$SAVE_CXXFLAGS + ]) + + if test -z "$qt_cv_libname"; then + AC_MSG_RESULT([failed]) + if test "$FATAL" = 1 ; then + AC_MSG_ERROR([Cannot compile a simple Qt executable. Check you have the right \$QTDIR !]) + fi + else + AC_MSG_RESULT([$qt_cv_libname]) + fi +]) + +dnl get Qt version we're using +AC_DEFUN([QT_GET_VERSION], +[ + AC_CACHE_CHECK([Qt version],lyx_cv_qtversion, + [ + AC_LANG_CPLUSPLUS + SAVE_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $QT_INCLUDES" + + cat > conftest.$ac_ext <<EOF +#line __oline__ "configure" +#include "confdefs.h" +#include <qglobal.h> +"%%%"QT_VERSION_STR"%%%" +EOF + lyx_cv_qtversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \ + grep '^"%%%"' 2>/dev/null | \ + sed -e 's/"%%%"//g' -e 's/"//g'` + rm -f conftest.$ac_ext + CPPFLAGS=$SAVE_CPPFLAGS + ]) + + QT_VERSION=$lyx_cv_qtversion + AC_SUBST(QT_VERSION) +]) + +dnl start here +AC_DEFUN([QT_DO_IT_ALL], +[ + dnl Please leave this alone. I use this file in + dnl oprofile. + FATAL=0 + + AC_ARG_WITH(qt-dir, [ --with-qt-dir where the root of Qt is installed ], + [ qt_cv_dir=`eval echo "$withval"/` ]) + + AC_ARG_WITH(qt-includes, [ --with-qt-includes where the Qt includes are. ], + [ qt_cv_includes=`eval echo "$withval"` ]) + + AC_ARG_WITH(qt-libraries, [ --with-qt-libraries where the Qt library is installed.], + [ qt_cv_libraries=`eval echo "$withval"` ]) + + dnl pay attention to $QTDIR unless overridden + if test -z "$qt_cv_dir"; then + qt_cv_dir=$QTDIR + fi + + dnl derive inc/lib if needed + if test -n "$qt_cv_dir"; then + if test -z "$qt_cv_includes"; then + qt_cv_includes=$qt_cv_dir/include + fi + if test -z "$qt_cv_libraries"; then + qt_cv_libraries=$qt_cv_dir/lib + fi + fi + + dnl flags for compilation + QT_INCLUDES= + QT_LDFLAGS= + if test -n "$qt_cv_includes"; then + QT_INCLUDES="-I$qt_cv_includes" + fi + if test -n "$qt_cv_libraries"; then + QT_LDFLAGS="-L$qt_cv_libraries" + fi + AC_SUBST(QT_INCLUDES) + AC_SUBST(QT_LDFLAGS) + + QT_FIND_MOC + MOC=$ac_moc + AC_SUBST(MOC) + QT_FIND_UIC + UIC=$ac_uic + AC_SUBST(UIC) + + QT_CHECK_COMPILE + + QT_LIB=$qt_cv_libname; + AC_SUBST(QT_LIB) + + if test -n "$qt_cv_libname"; then + QT_GET_VERSION + fi +]) + +dnl AX_CXXFLAGS_OPTIONS(var-name, option) +dnl add option to var-name if $CXX support it. +AC_DEFUN([AX_CHECK_PRECOMPILED_HEADER], [ +AC_MSG_CHECKING([whether ${CXX} support precompiled header]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +SAVE_CXXFLAGS=$CXXFLAGS +dnl we consider than if -Winvalid-pch is accepted pch will works ... +CXXFLAGS=-Winvalid-pch +dnl but we don't want -Winvalid-pch else compilation will fail due -Werror and +dnl the fact than some pch will be invalid for the given compilation option +AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} -include bits/stdc++.h", AC_MSG_RESULT([no])) +CXXFLAGS=$SAVE_CXXFLAGS +AC_LANG_RESTORE +]) + +dnl AX_CHECK_DOCBOOK +AC_DEFUN([AX_CHECK_DOCBOOK], [ +# It's just rude to go over the net to build +XSLTPROC_FLAGS=--nonet +DOCBOOK_ROOT= +if test ! -f /etc/xml/catalog; then + for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/; + do + if test -d "$i"; then + DOCBOOK_ROOT=$i + fi + done + + # Last resort - try net + if test -z "$DOCBOOK_ROOT"; then + XSLTPROC_FLAGS= + fi +else + XML_CATALOG=/etc/xml/catalog + CAT_ENTRY_START='<!--' + CAT_ENTRY_END='-->' +fi + +AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,) +XSLTPROC_WORKS=no +if test -n "$XSLTPROC"; then + AC_MSG_CHECKING([whether xsltproc works]) + + if test -n "$XML_CATALOG"; then + DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" + else + DB_FILE="$DOCBOOK_ROOT/docbook.xsl" + fi + + $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END +<?xml version="1.0" encoding='ISO-8859-1'?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> +<book id="test"> +</book> +END + if test "$?" = 0; then + XSLTPROC_WORKS=yes + fi + AC_MSG_RESULT($XSLTPROC_WORKS) +fi +AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes") + +AC_SUBST(XML_CATALOG) +AC_SUBST(XSLTPROC_FLAGS) +AC_SUBST(DOCBOOK_ROOT) +AC_SUBST(CAT_ENTRY_START) +AC_SUBST(CAT_ENTRY_END) +]) + +dnl AX_CFLAGS_OPTIONS(var-name, option) +dnl add option to var-name if $CC support it. +AC_DEFUN([AX_CFLAGS_OPTION], [ +AC_MSG_CHECKING([whether ${CC} $2 is understood]) +AC_LANG_SAVE +AC_LANG_C +SAVE_CFLAGS=$CFLAGS +CFLAGS=$2 +AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no])) +CFLAGS=$SAVE_CFLAGS +AC_LANG_RESTORE +]) + + +dnl AX_CXXFLAGS_OPTIONS(var-name, option) +dnl add option to var-name if $CXX support it. +AC_DEFUN([AX_CXXFLAGS_OPTION], [ +AC_MSG_CHECKING([whether ${CXX} $2 is understood]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +SAVE_CXXFLAGS=$CXXFLAGS +CXXFLAGS=$2 +AC_TRY_COMPILE(,[;],AC_MSG_RESULT([yes]); $1="${$1} $2",AC_MSG_RESULT([no])) +CXXFLAGS=$SAVE_CXXFLAGS +AC_LANG_RESTORE +]) + +dnl AX_COPY_IF_CHANGE(source, dest) +dnl copy source to dest if they don't compare equally or if dest doesn't exist +AC_DEFUN([AX_COPY_IF_CHANGE], [ +if test -r $2; then + if cmp $1 $2 > /dev/null; then + echo $2 is unchanged + else + cp -f $1 $2 + fi +else + cp -f $1 $2 +fi +]) + diff --git a/meta/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch b/meta/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch new file mode 100644 index 000000000..c9d7cd63e --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/oprofile-no-query-modules.patch @@ -0,0 +1,29 @@ +disable portions which use query_module on 2.6 kernel this is not available +in OE we dont support 2.4 anyway + + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: oprofile-0.9.6/daemon/liblegacy/opd_kernel.c +=================================================================== +--- oprofile-0.9.6.orig/daemon/liblegacy/opd_kernel.c 2009-11-24 07:25:17.000000000 -0800 ++++ oprofile-0.9.6/daemon/liblegacy/opd_kernel.c 2011-07-18 10:08:39.863798825 -0700 +@@ -270,6 +270,9 @@ + */ + static void opd_drop_module_sample(unsigned long eip) + { ++ verbprintf(vmodule, "query_module not available on linux-2.6: %s\n", strerror(EPERM)); ++ ++#if 0 + char * module_names; + char * name; + size_t size = 1024; +@@ -307,6 +310,7 @@ + + if (module_names) + free(module_names); ++#endif + } + + diff --git a/meta/recipes-kernel/oprofile/oprofile/opstart.patch b/meta/recipes-kernel/oprofile/oprofile/opstart.patch new file mode 100644 index 000000000..c588deb33 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/opstart.patch @@ -0,0 +1,237 @@ +Upstream-Status: Pending + +Index: oprofile/utils/Makefile.am +=================================================================== +--- oprofile.orig/utils/Makefile.am 2005-03-31 18:20:41.000000000 +0100 ++++ oprofile/utils/Makefile.am 2008-07-02 15:14:07.000000000 +0100 +@@ -3,8 +3,15 @@ + + LIBS=@POPT_LIBS@ @LIBERTY_LIBS@ + +-bin_PROGRAMS = ophelp ++bin_PROGRAMS = ophelp opstart + dist_bin_SCRIPTS = opcontrol + + ophelp_SOURCES = ophelp.c + ophelp_LDADD = ../libop/libop.a ../libutil/libutil.a ++ ++opstart_SOURCES = opstart.c ++ ++install-exec-local: ++ cd $(DESTDIR)/$(bindir) && \ ++ rm -f opstop && \ ++ $(LN_S) opstart opstop +Index: oprofile/utils/opstart.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ oprofile/utils/opstart.c 2008-07-02 15:14:07.000000000 +0100 +@@ -0,0 +1,110 @@ ++/** ++ * @file opstart.c ++ * Start/Stop oprofile ++ * ++ * @remark Copyright 2007 Openedhand Ltd. ++ * @remark Read the file COPYING ++ * ++ * @author Richard Purdie ++ */ ++ ++#include <signal.h> ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <unistd.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++ ++int main(const int argc, const char* argv[]) ++{ ++ const char *enable = "/dev/oprofile/enable"; ++ const char *lockfile; ++ unsigned long dpid; ++ struct stat sbuf; ++ FILE *lfile, *efile; ++ int sig, enb, err; ++ ++ if (argc >= 2) { ++ printf("Error: Invalid options.\n"); ++ return 1; ++ } ++ ++ lockfile = getenv("LOCK_FILE"); ++ if (!lockfile) ++ lockfile = "/var/lib/oprofile/lock"; ++ ++ /* Add SESSION_DIR support? */ ++ ++ if (geteuid()) { ++ printf("Error: This program must be run as root.\n"); ++ return 1; ++ } ++ ++ if (stat(enable, &sbuf)) { ++ printf("Error: Could not find /dev/oprofile/enable, the" ++ " kernel module probably isn't loaded.\n"); ++ printf("This binary only works with 2.6 kernels and oprofile" ++ " must have been initialised with 'opcontrol --start-daemon'.\n"); ++ return 1; ++ } ++ ++ if (stat(lockfile, &sbuf)) { ++ printf("Error: Could not find lockfile %s.\n", lockfile); ++ printf("The oprofile daemon must be running (oprofile must" ++ " have been initialised with 'opcontrol --start-daemon').\n"); ++ return 1; ++ } ++ ++ lfile = fopen(lockfile, "r"); ++ if (!lfile) { ++ printf("Error opening lockfile %s.\n", lockfile); ++ return 1; ++ } ++ ++ err = fscanf(lfile, "%lud", (unsigned long *) &dpid); ++ if (err != 1) { ++ printf("Error reading pid from lockfile %s.\n", lockfile); ++ return 1; ++ } ++ fclose(lfile); ++ ++ efile = fopen(enable, "r"); ++ if (!efile) { ++ printf("Error opening %s.\n", enable); ++ return 1; ++ } ++ ++ if (strstr(argv[0], "opstart")) { ++ printf("Starting Profiler\n"); ++ sig = SIGUSR1; ++ enb = 1; ++ } else if (strstr(argv[0], "opstop")) { ++ printf("Stopping Oprofile.\n"); ++ printf("You need to run 'opcontrol --dump' when the session" ++ " is finished.\n"); ++ sig = SIGUSR2; ++ enb = 0; ++ } else { ++ printf("Error: Please call as 'opstart' or 'opstop'\n"); ++ return 1; ++ } ++ ++ err = kill(dpid, 0); ++ if (err) { ++ printf("Error sending signal to oprofiled. Stale lockfile" ++ " (%s) ?\n", lockfile); ++ return 1; ++ } ++ ++ fprintf(efile, "%d\n", enb); ++ err = kill(dpid, sig); ++ if (err) { ++ printf("Error sending signal to oprofiled. Stale lockfile" ++ " (%s) ?\n", lockfile); ++ return 1; ++ } ++ ++ return 0; ++} ++ +Index: oprofile/configure.in +=================================================================== +--- oprofile.orig/configure.in 2008-07-02 15:13:58.000000000 +0100 ++++ oprofile/configure.in 2008-07-02 15:17:37.000000000 +0100 +@@ -16,6 +16,7 @@ + AM_CONFIG_HEADER(config.h) + + AC_PROG_RANLIB ++AC_PROG_LN_S + AC_PROG_LIBTOOL + + dnl for the man page +@@ -241,6 +242,8 @@ + doc/xsl/catalog-1.xml \ + doc/oprofile.1 \ + doc/opcontrol.1 \ ++ doc/opstart.1 \ ++ doc/opstop.1 \ + doc/ophelp.1 \ + doc/opreport.1 \ + doc/opannotate.1 \ +Index: oprofile/doc/Makefile.am +=================================================================== +--- oprofile.orig/doc/Makefile.am 2008-07-02 15:13:59.000000000 +0100 ++++ oprofile/doc/Makefile.am 2008-07-02 15:14:07.000000000 +0100 +@@ -11,6 +11,8 @@ + man_MANS = \ + oprofile.1 \ + opcontrol.1 \ ++ opstart.1 \ ++ opstop.1 \ + opreport.1 \ + opannotate.1 \ + opgprof.1 \ +Index: oprofile/doc/opstart.1.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ oprofile/doc/opstart.1.in 2008-07-02 15:14:07.000000000 +0100 +@@ -0,0 +1,27 @@ ++.TH OPSTART 1 "@DATE@" "oprofile @VERSION@" ++.UC 4 ++.SH NAME ++opstart \- start OProfile profiling ++.SH SYNOPSIS ++.br ++.B opstart ++.SH DESCRIPTION ++.B opstart ++is a simple optimised command to start profiling with 2.6 Linux kernels. ++OProfile should have already been initialised by calling "opcontrol --start-daemon". ++ ++.SH ENVIRONMENT ++No special environment variables are recognised by opstart. ++ ++.SH FILES ++.TP ++.I /var/lib/oprofile/samples/ ++The location of the generated sample files. ++ ++.SH VERSION ++.TP ++This man page is current for @PACKAGE@-@VERSION@. ++ ++.SH SEE ALSO ++.BR @OP_DOCDIR@, ++.BR oprofile(1) +Index: oprofile/doc/opstop.1.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ oprofile/doc/opstop.1.in 2008-07-02 15:14:07.000000000 +0100 +@@ -0,0 +1,28 @@ ++.TH OPSTOP 1 "@DATE@" "oprofile @VERSION@" ++.UC 4 ++.SH NAME ++opstop \- stop OProfile profiling ++.SH SYNOPSIS ++.br ++.B opstop ++.SH DESCRIPTION ++.B opstop ++is a simple optimsed command to stop profiling with 2.6 Linux kernels. ++You need to run "opcontrol --dump" before being able to view a profile ++with opreport. ++ ++.SH ENVIRONMENT ++No special environment variables are recognised by opstop. ++ ++.SH FILES ++.TP ++.I /var/lib/oprofile/samples/ ++The location of the generated sample files. ++ ++.SH VERSION ++.TP ++This man page is current for @PACKAGE@-@VERSION@. ++ ++.SH SEE ALSO ++.BR @OP_DOCDIR@, ++.BR oprofile(1) diff --git a/meta/recipes-kernel/oprofile/oprofile_0.9.7.bb b/meta/recipes-kernel/oprofile/oprofile_0.9.7.bb new file mode 100644 index 000000000..d7e151134 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile_0.9.7.bb @@ -0,0 +1,11 @@ +require oprofile.inc + +PR = "${INC_PR}.0" + +SRC_URI += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" + +SRC_URI[md5sum] = "8b5d1d9b65f84420bcc3234777ad3be3" +SRC_URI[sha256sum] = "cb5b507d5dea058d223fcad3cec8ff9638a4163106afd66d176798bbd973d527" + +S = "${WORKDIR}/oprofile-${PV}" + diff --git a/meta/recipes-kernel/oprofile/oprofile_git.bb b/meta/recipes-kernel/oprofile/oprofile_git.bb new file mode 100644 index 000000000..c34554801 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile_git.bb @@ -0,0 +1,11 @@ +require oprofile.inc + +SRCREV = "88f43190d412d28ebf5c75a76ba20343d0fe4c41" +PV = "0.9.7+git${SRCPV}" +PR = "${INC_PR}.0" + +SRC_URI += "git://oprofile.git.sourceforge.net/gitroot/${BPN}/${BPN};protocol=git" + +S = "${WORKDIR}/git" + +DEFAULT_PREFERENCE = "-1" diff --git a/meta/recipes-kernel/oprofile/oprofileui.inc b/meta/recipes-kernel/oprofile/oprofileui.inc new file mode 100644 index 000000000..ab14c38e3 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofileui.inc @@ -0,0 +1,23 @@ +SUMMARY = "User Interface for the System-Wide Profiler" +DESCRIPTION = "User interface for the OProfile tool" +HOMEPAGE = "http://labs.o-hand.com/oprofileui/" +BUGTRACKER = "http://bugzilla.o-hand.com/" + +SECTION = "x11" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "glib-2.0 gtk+ libglade libxml2 avahi-ui gconf" + +inherit autotools pkgconfig gtk-icon-cache + +PACKAGES =+ "oprofileui-server oprofileui-viewer" + +EXTRA_OECONF = "--with-avahi" + +FILES_oprofileui-viewer = "${bindir}/oparchconv ${bindir}/oprofile-viewer ${datadir}/applications/ ${datadir}/oprofileui/" +RDEPENDS_oprofile-viewer = "oprofile" + +FILES_oprofileui-server = "${bindir}/oprofile-server" +RDEPENDS_oprofile-server = "oprofile" diff --git a/meta/recipes-kernel/oprofile/oprofileui_git.bb b/meta/recipes-kernel/oprofile/oprofileui_git.bb new file mode 100644 index 000000000..3fe9bb4e6 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofileui_git.bb @@ -0,0 +1,10 @@ +require oprofileui.inc + +SRCREV = "82ecf8c6b53b84f80682a8312f9defa83a95f2a3" +PV = "0.0+git${SRCPV}" +PR = "r0" + +S = "${WORKDIR}/git" + +# Oprofileui at http://labs.o-hand.com/oprofileui/ is not maintained now. +SRC_URI = "git://git.yoctoproject.org/oprofileui;protocol=git" diff --git a/meta/recipes-kernel/powertop/powertop-1.13/stub_out_the_ncurses_calls_in_dump_mode.patch b/meta/recipes-kernel/powertop/powertop-1.13/stub_out_the_ncurses_calls_in_dump_mode.patch new file mode 100644 index 000000000..ae4cf5d8f --- /dev/null +++ b/meta/recipes-kernel/powertop/powertop-1.13/stub_out_the_ncurses_calls_in_dump_mode.patch @@ -0,0 +1,33 @@ +Upstream-Status: Inappropriate [this patch is 1.13 specific and 2.0 will be coming.] + +Running PowerTop in Poky in dump mode (with --dump) always ends with a +segmentation fault. + +The cause is: in dump mode, setup_windows() is not invoked so the +*_window variables, like cstate_window, are still NULL; later in +main() -> show_cstates(), the functions, like wrefresh(), will trigger +segfault. + +After discussing in PowerTop mailling list, I think the right solution is +we should stub out the ncurses calls in dump mode. + +(The patch was also sent to upstream PowerTop mailling list.) + +Signed-off-by Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20 +(this patch is licensed under GPLv2) + +--- a/display.c ++++ b/display.c +@@ -44,6 +44,12 @@ + static WINDOW *status_bar_window; + + #define print(win, y, x, fmt, args...) do { if (dump) printf(fmt, ## args); else mvwprintw(win, y, x, fmt, ## args); } while (0) ++#define wattrset(win, c) do { if (!dump ) wattrset(win, c); } while (0) ++#define wbkgd(win, c) do { if (!dump ) wbkgd(win, c); } while (0) ++#define werase(win) do { if (!dump ) werase(win); } while (0) ++#define wrefresh(win) do { if (!dump ) wrefresh(win); } while (0) ++#define wattron(win, a) do { if (!dump ) wattron(win, a); } while (0) ++#define wattroff(win, a) do { if (!dump ) wattroff(win, a); } while (0) + + char status_bar_slots[10][40]; + diff --git a/meta/recipes-kernel/powertop/powertop_1.13.bb b/meta/recipes-kernel/powertop/powertop_1.13.bb new file mode 100644 index 000000000..b4f45ddbb --- /dev/null +++ b/meta/recipes-kernel/powertop/powertop_1.13.bb @@ -0,0 +1,42 @@ +SUMMARY = "Power usage tool" +DESCRIPTION = "PowerTOP, a tool that helps you find what software is using the most power." +HOMEPAGE = "http://www.lesswatts.org/" +BUGTRACKER = "http://bugzilla.lesswatts.org/" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "virtual/libintl ncurses" + +# powertop 1.13 needs lspci +RDEPENDS_${PN} = "pciutils" + +PR = "r3" + +SRC_URI = "http://www.lesswatts.org/projects/powertop/download/powertop-${PV}.tar.gz \ + file://stub_out_the_ncurses_calls_in_dump_mode.patch \ + " + +SRC_URI[md5sum] = "78aa17c8f55178004223bf236654298e" +SRC_URI[sha256sum] = "2bc866089496877dd26d2d316ad5763ab8ecb5e28aefba44bc5d355dcdc58d98" + +CFLAGS += "${LDFLAGS}" +EXTRA_OEMAKE = "VERSION=\"${PV}\" EXTRA_LIBS=${EXTRA_LIBS}" + +EXTRA_LIBS_libc-uclibc = "-lintl" + +inherit update-alternatives +ALTERNATIVE_NAME = "powertop" +ALTERNATIVE_PATH = "${bindir}/powertop" +ALTERNATIVE_LINK = "${base_bindir}/powertop" +ALTERNATIVE_PRIORITY = "100" + +do_configure() { + # We do not build ncurses with wide char support + sed -i -e 's:lncursesw:lncurses ${EXTRA_LIBS}:g' ${S}/Makefile +} + +do_install() { + oe_runmake install DESTDIR=${D} +} + diff --git a/meta/recipes-kernel/sysprof/files/0001-Fix-PowerPC-checks-for-__NR_perf_counter_open.patch b/meta/recipes-kernel/sysprof/files/0001-Fix-PowerPC-checks-for-__NR_perf_counter_open.patch new file mode 100644 index 000000000..041054e6e --- /dev/null +++ b/meta/recipes-kernel/sysprof/files/0001-Fix-PowerPC-checks-for-__NR_perf_counter_open.patch @@ -0,0 +1,35 @@ +Upstream-Status: Backport + +From 4708a509aa9d65ae93e9824e42ddbc6e8d42d90c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel@daenzer.net> +Date: Sat, 27 Aug 2011 20:04:44 +0200 +Subject: [PATCH] Fix PowerPC checks for __NR_perf_counter_open. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +__ppc__ isn't defined here on Debian powerpc. Grepping through the headers +installed in /usr/include, there are a few references to __ppc__ and +__ppc64__, but I suspect they're for other OSs. + +Signed-off-by: Michel Dänzer <michel@daenzer.net> +--- + collector.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/collector.c b/collector.c +index b28964f..fe16967 100644 +--- a/collector.c ++++ b/collector.c +@@ -175,7 +175,7 @@ sysprof_perf_counter_open (struct perf_counter_attr *attr, + #define __NR_perf_counter_open 337 + #elif defined(__hppa__) + #define __NR_perf_counter_open 318 +-#elif defined(__ppc__) || defined(__ppc64__) ++#elif defined(__powerpc__) || defined(__powerpc64__) + #define __NR_perf_counter_open 319 + #elif defined(__s390__) + #define __NR_perf_counter_open 331 +-- +1.7.6.1 + diff --git a/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch b/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch new file mode 100644 index 000000000..dcc2cbe67 --- /dev/null +++ b/meta/recipes-kernel/sysprof/files/define-NT_GNU_BUILD_ID.patch @@ -0,0 +1,22 @@ +On uclibc elf.h does not have GNU extentions but we need this define +so we define it locally if its not getting it from elf.h + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Upstream-Status: Pending + +Index: git/elfparser.h +=================================================================== +--- git.orig/elfparser.h 2011-07-16 18:57:41.000000000 -0700 ++++ git/elfparser.h 2011-07-16 20:28:54.733829895 -0700 +@@ -17,6 +17,10 @@ + */ + #include <glib.h> + ++#ifndef NT_GNU_BUILD_ID ++#define NT_GNU_BUILD_ID 3 ++#endif ++ + typedef struct ElfSym ElfSym; + typedef struct ElfParser ElfParser; + diff --git a/meta/recipes-kernel/sysprof/files/rmb-arm.patch b/meta/recipes-kernel/sysprof/files/rmb-arm.patch new file mode 100644 index 000000000..c53ac6427 --- /dev/null +++ b/meta/recipes-kernel/sysprof/files/rmb-arm.patch @@ -0,0 +1,21 @@ + +Upstream-Status: Pending + +Index: git/util.h +=================================================================== +--- git.orig/util.h 2010-12-07 22:41:57.156243001 -0600 ++++ git/util.h 2010-12-07 22:43:47.616243002 -0600 +@@ -37,4 +37,13 @@ + #define cpu_relax() asm volatile("" ::: "memory"); + #endif + ++#ifdef __arm__ ++/* ++ * Use the __kuser_memory_barrier helper in the CPU helper page. See ++ * arch/arm/kernel/entry-armv.S in the kernel source for details. ++ */ ++#define rmb() ((void(*)(void))0xffff0fa0)() ++#define cpu_relax() asm volatile("":::"memory") ++#endif ++ + #endif diff --git a/meta/recipes-kernel/sysprof/files/rmb-mips.patch b/meta/recipes-kernel/sysprof/files/rmb-mips.patch new file mode 100644 index 000000000..e055b8ad8 --- /dev/null +++ b/meta/recipes-kernel/sysprof/files/rmb-mips.patch @@ -0,0 +1,22 @@ +Upstream-Status: Pending + +Index: git/util.h +=================================================================== +--- git.orig/util.h 2010-12-08 01:22:44.486243001 -0600 ++++ git/util.h 2010-12-08 01:23:27.836243001 -0600 +@@ -37,4 +37,15 @@ + #define cpu_relax() asm volatile("" ::: "memory"); + #endif + ++#ifdef __mips__ ++#define rmb() asm volatile( \ ++ ".set mips2\n\t" \ ++ "sync\n\t" \ ++ ".set mips0" \ ++ : /* no output */ \ ++ : /* no input */ \ ++ : "memory") ++#define cpu_relax() asm volatile("" ::: "memory") ++#endif ++ + #endif diff --git a/meta/recipes-kernel/sysprof/sysprof_git.bb b/meta/recipes-kernel/sysprof/sysprof_git.bb new file mode 100644 index 000000000..bd34f005d --- /dev/null +++ b/meta/recipes-kernel/sysprof/sysprof_git.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "sysprof - System-wide Performance Profiler for Linux" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +DEPENDS = "gtk+ libglade" + +SRCREV = "4692f85f625f4fd969cef4ab5dc47cc4655c87f9" +PR = "r2" +PV = "1.1.8+git${SRCPV}" + +SRC_URI = "git://git.gnome.org/sysprof;protocol=git \ + file://define-NT_GNU_BUILD_ID.patch \ + file://0001-Fix-PowerPC-checks-for-__NR_perf_counter_open.patch \ + " + +SRC_URI_append_arm = " file://rmb-arm.patch" +SRC_URI_append_mips = " file://rmb-mips.patch" + +S = "${WORKDIR}/git" + +inherit autotools diff --git a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb new file mode 100644 index 000000000..b328e6bac --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb @@ -0,0 +1,42 @@ +DESCRIPTION = "UProbes kernel module for SystemTap" + +require systemtap_git.inc + +DEPENDS = "systemtap virtual/kernel" + +PR = "r0" + +# On systems without CONFIG_UTRACE, this package is empty. +ALLOW_EMPTY_${PN} = "1" + +inherit module-base gettext + +FILES_${PN} += "${datadir}/systemtap/runtime/uprobes" + +EXTRA_OEMAKE = "" + +# Compile and install the uprobes kernel module on machines with utrace +# support. Note that staprun expects it in the systemtap/runtime directory, +# not in /lib/modules. +do_compile() { + if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_DIR}/.config + then + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP + oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" \ + -C ${STAGING_KERNEL_DIR} scripts + oe_runmake KDIR=${STAGING_KERNEL_DIR} \ + M="${S}/runtime/uprobes/" \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" \ + -C "${S}/runtime/uprobes/" + fi +} + +do_install() { + if [ -e "${S}/runtime/uprobes/uprobes.ko" ] + then + install -d ${D}/usr/share/systemtap/runtime/uprobes/ + install -m 0644 ${S}/runtime/uprobes/uprobes.ko ${D}/usr/share/systemtap/runtime/uprobes/ + fi +} diff --git a/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch b/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch new file mode 100644 index 000000000..33a89940a --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/docproc-build-fix.patch @@ -0,0 +1,19 @@ +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> + +Index: git/doc/SystemTap_Tapset_Reference/Makefile.am +=================================================================== +--- git.orig/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 08:43:46.263339003 -0500 ++++ git/doc/SystemTap_Tapset_Reference/Makefile.am 2012-04-13 09:31:22.470083915 -0500 +@@ -27,6 +27,10 @@ + noinst_PROGRAMS = docproc + SRCTREE=$(abs_top_srcdir)/ + DOCPROC=$(abs_builddir)/docproc ++docproc_LINK = $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ ++ ++docproc.o: $(srcdir)/docproc.c ++ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/docproc.c + + all: $(PDFDOCS) stamp-htmldocs stamp-mandocs + tapsets.xml: docproc $(shell find $(SRCTREE)/tapset -name '*.stp') diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb new file mode 100644 index 000000000..91bccd1fa --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap_git.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "SystemTap - script-directed dynamic tracing and performance analysis tool for Linux" + +require systemtap_git.inc + +DEPENDS = "elfutils sqlite3 systemtap-native" +DEPENDS_virtclass-native = "elfutils-native sqlite3-native gettext-native" +DEPENDS_virtclass-nativesdk = "elfutils-nativesdk sqlite3-nativesdk gettext-nativesdk" + +PR = "r3" + +export CC_FOR_BUILD = "${BUILD_CC}" +export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}" +export LDFLAGS_FOR_BUILD = "${BUILD_LDFLAGS}" + +EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \ + ac_cv_file__usr_include_nss=no \ + ac_cv_file__usr_include_nss3=no \ + ac_cv_file__usr_include_nspr=no \ + ac_cv_file__usr_include_nspr4=no \ + ac_cv_file__usr_include_avahi_client=no \ + ac_cv_file__usr_include_avahi_common=no " + +STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" + +EXTRA_OECONF += "${STAP_DOCS} " + +inherit autotools gettext + +BBCLASSEXTEND = "native nativesdk" + +FILES_${PN}-dbg += "${libexecdir}/systemtap/.debug" diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc new file mode 100644 index 000000000..839cec35a --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap_git.inc @@ -0,0 +1,20 @@ +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRCREV = "83bd2699d8cff2f2d6b9eaf5ea254e4cb6b33e81" +PV = "1.7+git${SRCPV}" + +SRC_URI = "git://sources.redhat.com/git/systemtap.git;protocol=git \ + file://docproc-build-fix.patch \ + " + +FILESPATH = "${FILE_DIRNAME}/systemtap" + +SRC_URI[md5sum] = "cb202866ed704c44a876d041f788bdee" +SRC_URI[sha256sum] = "8ffe35caec0d937bd23fd78a3a8d94b58907cc0de0330b35e38f9f764815c459" + +# systemtap doesn't support mips +COMPATIBLE_HOST = '(x86_64.*|i.86.*|powerpc.*|arm.*)-linux' + +S = "${WORKDIR}/git" + diff --git a/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb new file mode 100644 index 000000000..d18cb6ac8 --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Graphical trace viewer for Ftrace" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://kernel-shark.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e" + +SRCREV = "7055ffd37beeb44714e86a4abc703f7e175a0db5" +PR = "r1" +PV = "1.2+git${SRCPV}" + +DEPENDS = "gtk+" +RDEPENDS_${PN} = "trace-cmd" + +inherit pkgconfig + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git \ + file://addldflags.patch \ + file://make-docs-optional.patch \ + file://blktrace-api-compatibility.patch" +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}' 'prefix=${prefix}' gui" + +FILES_${PN} += "${datadir}/trace-cmd/plugins/*.so" +FILES_${PN}-dbg += "${datadir}/trace-cmd/plugins/.debug/" + +FILESPATH = "${FILE_DIRNAME}/trace-cmd" + +do_install() { + oe_runmake CC="${CC}" AR="${AR}" prefix="${prefix}" DESTDIR="${D}" install_gui +} diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch new file mode 100644 index 000000000..14730db90 --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch @@ -0,0 +1,51 @@ +trace-cmd: Cross-compile fixes for LDFLAGS and include path + +Add ability for the Makefile to respect LDFLAGS. +Also remove hardcoded /usr/local/include include path. + +Upstream-Status: Accepted [Post 1.2: 5f576e9af7ad706774d9764a9ae3989376797c0e] + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Signed-off-by: Darren Hart <dvhart@linux.intel.com> + +--- + Makefile | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -202,12 +202,13 @@ export Q VERBOSE + TRACECMD_VERSION = $(TC_VERSION).$(TC_PATCHLEVEL).$(TC_EXTRAVERSION) + KERNELSHARK_VERSION = $(KS_VERSION).$(KS_PATCHLEVEL).$(KS_EXTRAVERSION) + +-INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES) ++INCLUDES = -I. $(CONFIG_INCLUDES) + + include features.mk + + # Set compile option CFLAGS if not set elsewhere + CFLAGS ?= -g -Wall ++LDFLAGS ?= + + ifndef NO_PTRACE + ifneq ($(call try-cc,$(SOURCE_PTRACE),),y) +@@ -251,7 +252,7 @@ do_fpic_compile = \ + + do_app_build = \ + ($(print_app_build) \ +- $(CC) $^ -rdynamic -o $@ $(CONFIG_LIBS) $(LIBS)) ++ $(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS)) + + do_compile_shared_library = \ + ($(print_shared_lib_compile) \ +@@ -263,7 +264,7 @@ do_compile_plugin_obj = \ + + do_plugin_build = \ + ($(print_plugin_build) \ +- $(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<) ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -nostartfiles -o $@ $<) + + do_build_static_lib = \ + ($(print_static_lib_build) \ diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch new file mode 100644 index 000000000..0789e9fdf --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd/blktrace-api-compatibility.patch @@ -0,0 +1,29 @@ +trace-cmd: Add blktrace_api compatibility for TC_BARRIER + +Newer kernels replace TC_BARRIER with TC_FLUSH. Ensure trace-cmd +can build regardless of the linux-kernel-headers version. + +Upstream-Status: Innapropriate [Stop gap] + +Signed-off-by: Darren Hart <dvhart@linux.intel.com> + +diff --git a/plugin_blk.c b/plugin_blk.c +index 9327b17..c8e5e1c 100644 +--- a/plugin_blk.c ++++ b/plugin_blk.c +@@ -44,6 +44,15 @@ struct blk_data { + unsigned short pdu_len; + }; + ++/* ++ * Newer kernels don't define BLK_TC_BARRIER and have replaced it with ++ * BLK_TC_FLUSH. In this case, define it here and report FLUSHES as BARRIERS as ++ * a workaround, as described in: ++ * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=c09c47caedc9854d59378d6e34c989e51cfdd2b4 ++ */ ++#ifndef BLK_TC_BARRIER ++#define BLK_TC_BARRIER 1<<2 ++#endif + static void fill_rwbs(char *rwbs, int action, unsigned int bytes) + { + int i = 0; diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch new file mode 100644 index 000000000..8402426c5 --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch @@ -0,0 +1,36 @@ +Disable building docs until we have asciidocs available as a recipe. + +Upstream-Status: Inappropriate [Account for missing dependency, the lazy way] + +Signed-off-by: Darren Hart <dvhart@linux.intel.com> + +--- + Makefile | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -327,7 +327,9 @@ TARGETS = $(CMD_TARGETS) $(GUI_TARGETS) + # If you want kernelshark, then do: make gui + ### + +-all: all_cmd doc show_gui_make ++# Make doc optional ++#all: all_cmd doc show_gui_make ++all: all_cmd show_gui_make + + all_cmd: $(CMD_TARGETS) + +@@ -503,7 +505,9 @@ install_python: $(PYTHON_SO_INSTALL) $(P + install_cmd: all_cmd install_plugins install_python + $(Q)$(call do_install,trace-cmd,$(bindir_SQ)) + +-install: install_cmd install_doc ++# Make doc optional ++#install: install_cmd install_doc ++install: install_cmd + @echo "Note: to install the gui, type \"make install_gui\"" + + install_gui: install_cmd gui diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb new file mode 100644 index 000000000..7f6f6cf64 --- /dev/null +++ b/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "User interface to Ftrace" +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e \ + file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff \ + file://trace-input.c;beginline=5;endine=8;md5=c9c405aaf5cfc09582ec83cf6e83a020" + +SRCREV = "7055ffd37beeb44714e86a4abc703f7e175a0db5" +PR = "r2" +PV = "1.2+git${SRCPV}" + +inherit pkgconfig + +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git \ + file://addldflags.patch \ + file://make-docs-optional.patch \ + file://trace-cmd/blktrace-api-compatibility.patch" +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "'prefix=${prefix}'" + +FILES_${PN}-dbg += "${datadir}/trace-cmd/plugins/.debug/" + +do_install() { + oe_runmake prefix="${prefix}" DESTDIR="${D}" install +} diff --git a/meta/recipes-kernel/update-modules/update-modules-1.0/COPYING.GPL b/meta/recipes-kernel/update-modules/update-modules-1.0/COPYING.GPL new file mode 100644 index 000000000..d511905c1 --- /dev/null +++ b/meta/recipes-kernel/update-modules/update-modules-1.0/COPYING.GPL @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules b/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules new file mode 100755 index 000000000..99040a1ab --- /dev/null +++ b/meta/recipes-kernel/update-modules/update-modules-1.0/update-modules @@ -0,0 +1,209 @@ +#!/bin/sh +# +# This is the update-modules script for Debian GNU/Linux. +# Copyright 1998-2001 Wichert Akkerman <wakkerma@debian.org> +# Licensed under the GNU GPL, version 2 +# + +MODCONFFILE=/etc/modules.conf +MODCONFTMPFILE="${MODCONFFILE}.$$" +MODULESFILE=/etc/modules +MODULESTMPFILE="${MODULESFILE}.$$" + +ARCHDIR=/etc/modutils/arch +CPUDIR=/etc/modutils/cpu +HEADER="### This file is automatically generated by update-modules" + +set -e + +if [ "$1" = "force" ] ; then + force=1 +else + force= +fi + +# Reset the sorting order since we depend on it +LC_COLLATE=C +export LC_COLLATE + +depdir() +{ + dep=`grep '[[:space:]]*depfile' "${MODCONFFILE}" | tail -n 1 | sed -e 's/depfile=//' -e 's,/[^/]*$,,'` + if [ -z "$dep" ] ; then + dep="/lib/modules/`uname -r`" + fi + + echo $dep +} + +arch() { + local model=`uname -m` + case $model in + i[0-9]86) model=i386; ;; + sun4u) model=sparc64; ;; + arm*) model=arm; ;; + ppc) model=powerpc; ;; + esac + echo $model +} + +archmodel() { + local arch=`arch` + local model="" + if [ $arch = "m68k" ]; then + if [ -f /proc/hardware ]; then + model=`sed -ne 's/^Model:[[:space:]]*//p' /proc/hardware` + case $model in + Atari*) model="atari"; ;; + Amiga*) model="amiga"; ;; + Macintosh*) model="mac"; ;; + Motorola*) model="MVME"; ;; + *) model="generic"; ;; + esac + model=".${model}" + else + echo "/proc/hardware does not exist, assuming general m68k system" + model=".generic" + fi + elif [ $arch = "powerpc" ]; then + if [ -f /proc/cpuinfo ]; then + model=`sed -ne 's/^machine[[:space:]]*:[[:space:]]*//p' /proc/cpuinfo` + case $model in + Amiga*) model="apus"; ;; + Power*) model="pmac"; ;; + *) model="generic"; ;; + esac + model=".${model}" + else + echo "/proc/cpuinfo does not exist, assuming general powerpc system" + model=".generic" + fi + fi + echo "${arch}${model}" +} + +checkoverwrite() { + local cfgfile="$1" + + if [ -f "$cfgfile" ]; then + if ! sed -ne 1p "$cfgfile" | grep -q "^$HEADER" ; then + echo "Error: the current $cfgfile is not automatically generated." >&2 + if [ -z "$force" ]; then + echo "Use \"update-modules force\" to force (re)generation." + exit 1 + else + echo "force specified, (re)generating file anyway." + fi + fi + fi +} + +createfile() { + cat <<EOF > "$1" +$HEADER" +# +# Please do not edit this file directly. If you want to change or add +# anything please take a look at the files in /etc/modutils, /etc/modules-load.d +# and read the manpage for update-modules. +# +EOF +} + +addfile() { + local src="$1" + local tgt="$2" + + echo "### update-modules: start processing $src" >> "$tgt" + if [ -x "$src" ]; then + if ! "$src" >> "$tgt" ; then + echo "Error while executing $src, aborting" >&2 + exit 1 + fi + else + cat "$src" >> "$tgt" + fi + cat <<EOF >> "$tgt" + +### update-modules: end processing $cfg + +EOF +} + + +checkoverwrite "$MODCONFFILE" + +if [ 0 -ne "`id -u`" ]; then + echo "You have to be root to do this." >&2 + exit 2 +fi + +model=`archmodel` +oldmodel=$model + +while [ ! -f "${ARCHDIR}/${model}" ]; do + oldmodel=$model + model=`echo $oldmodel | sed -e 's/\.[^.]\+//'` + if [ "$model" = "$oldmodel" ]; then + break + fi + echo "Configuration for $oldmodel not found, trying $model" +done + +CONF="${ARCHDIR}/${model}" + +if [ ! -f "$CONF" ]; then + ## echo "Architecture-specific modutils configuration not found, using defaults" + CONF="${ARCHDIR}/generic" +fi + +[ -e "$MODCONFFILE" ] && cp -f "$MODCONFFILE" "${MODCONFFILE}.old" + +createfile "$MODCONFTMPFILE" +createfile "$MODULESTMPFILE" + +# well we're using /etc/modprobe.d/*.conf instead of /etc/modutils/*.conf anyway.. +for cfg in /etc/modutils/* $CONF ; do + if [ -f "$cfg" ]; then # this check is necesarry to skip /etc/modutils/archs + if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then + true + elif echo $cfg | grep -q '\.conf$' ; then + addfile "$cfg" "$MODCONFTMPFILE" + else + echo "Please migrate your $cfg file to /etc/modules-load.d/*.conf" + addfile "$cfg" "$MODULESTMPFILE" + fi + fi +done +for cfg in /etc/modules-load.d/*.conf; do + if [ -f "$cfg" ]; then # this check is necesarry to skip weird entries + if echo $cfg | grep -q '\.dpkg-[a-z]*\|~$' ; then + true + else + addfile "$cfg" "$MODULESTMPFILE" + fi + fi +done + +first_time=0 +if [ ! -f $MODULESFILE ]; then + first_time=1 +fi + +mv "$MODCONFTMPFILE" "$MODCONFFILE" +mv "$MODULESTMPFILE" "$MODULESFILE" + +# Don't run modutils.sh if systemd is installed +if [ $first_time -eq 1 ] && [ ! -e /bin/systemctl ]; then + /etc/init.d/modutils.sh || true +fi + +# We also call depmod here to stop insmod from complaining that modules.conf +# is more recent then modules.dep +# +if [ -d "`depdir`" -a -f /proc/modules ] +then + depmod -A || true +fi + +exit 0 + diff --git a/meta/recipes-kernel/update-modules/update-modules_1.0.bb b/meta/recipes-kernel/update-modules/update-modules_1.0.bb new file mode 100644 index 000000000..2af75e6a9 --- /dev/null +++ b/meta/recipes-kernel/update-modules/update-modules_1.0.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "script to manage module configuration files." +SECTION = "base" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe" + +RDEPENDS_${PN} = "module-init-tools-depmod" + +PR = "r13" + +SRC_URI = "file://update-modules \ + file://COPYING.GPL" + +inherit allarch + +pkg_postinst_${PN} () { +if [ "x$D" != "x" ]; then + exit 1 +fi +update-modules +} + +do_install() { + install -d ${D}${sbindir} + install ${WORKDIR}/update-modules ${D}${sbindir} +} + |
