Project import
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a879ef6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,105 @@
+#
+# Copyright (c) 2015 Nest Labs, Inc.
+# All rights reserved.
+#
+# This document is the property of Nest. It is considered
+# confidential and proprietary information.
+#
+# This document may not be reproduced or transmitted in any form,
+# in whole or in part, without the express written permission of
+# Nest.
+#
+# Description:
+# This file is the makefile for building LTTng kernel module.
+#
+
+include pre.mak
+include products/paths.mak
+
+PackageName := lttng-modules
+PackageExtension := tar.bz2
+PackageSeparator := -
+PackagePatchArgs := -p1
+PackageArchive := $(PackageName).$(PackageExtension)
+PackageSourceDir := $(PackageName)$(PackageSeparator)$(PackageVersion)
+PackageBuildReadmeFile := $(call GenerateBuildPaths,README.md)
+
+CleanPaths += $(PackageLicenseFile)
+
+SOURCEDIRS = $(PackageSourceDir)
+$(PackageSourceDir)_RULE_TARGET = $(BuildDirectory)/configure
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(PackageLicenseFile): $(PackageSourceDir)/LICENSE
+ $(copy-result)
+
+# Extract the source from the archive and apply patches, if any.
+
+$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
+ $(call expand-archive,$(PackageArchive),.)
+ $(Verbose)touch $(@)
+ $(call patch-directory,$(@),$(PackagePatchArgs),$(PackagePatchPaths))
+
+# Prepare the sources.
+
+$(BuildDirectory)/source: | $(PackageSourceDir)
+ $(Verbose)touch $@
+
+# Patch the sources, if necessary.
+
+$(BuildDirectory)/patch: $(BuildDirectory)/source
+ $(Verbose)touch $@
+
+# Clone the source tree.
+
+$(PackageBuildReadmeFile): | $(PackageSourceDir) $(BuildDirectory)
+ $(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory))
+
+# Configure the source for building.
+
+$(BuildDirectory)/configure: $(BuildDirectory)/source $(PackageBuildReadmeFile)
+ $(Verbose)touch $@
+
+# Build the source.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+#
+# This package has no way of explicitly setting CC, LD, OBJCOPY, et al and
+# instead relies on the value of CROSS_COMPILE. Consequently, we have to
+# ensure that 'ToolBinDir' is in 'PATH' so that the build infrastructure can
+# find $(CROSS_COMPILE)gcc, $(CROSS_COMPILE)ld, et al.
+
+$(BuildDirectory)/build $(BuildDirectory)/stage: PATH := $(PATH):$(ToolBinDir)
+
+$(BuildDirectory)/build: $(BuildDirectory)/configure $(LinuxBuildDir)/build | $(BuildDirectory)
+ $(Verbose)unset MAKEFLAGS && \
+ $(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \
+ ARCH=$(LinuxProductArch) \
+ KERNELDIR=$(LinuxBuildDir)
+ $(Verbose)touch $@
+
+# Stage the build to a temporary installation area.
+
+$(BuildDirectory)/stage: $(BuildDirectory)/build | $(ResultDirectory)
+ $(Verbose)unset MAKEFLAGS && \
+ $(MAKE) $(JOBSFLAG) -C $(BuildDirectory) \
+ ARCH=$(LinuxProductArch) \
+ KERNELDIR=$(LinuxBuildDir) \
+ "INSTALL_MOD_DIR=extras/" \
+ "INSTALL_MOD_PATH=$(LinuxResultsPath)" \
+ DEPMOD=$(DEPMOD) \
+ modules_install
+ $(Verbose)touch $@
+
+.PHONY: stage
+stage: $(BuildDirectory)/stage
+
+clean:
+ $(Verbose)$(RM) $(RMFLAGS) -r $(PackageWrapperDir)
+ $(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+ $(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
diff --git a/lttng-modules.patches/lttng-modules-50.description b/lttng-modules.patches/lttng-modules-50.description
new file mode 100644
index 0000000..c3fbcd3
--- /dev/null
+++ b/lttng-modules.patches/lttng-modules-50.description
@@ -0,0 +1 @@
+The new Poky 4.8.2 toolchain has fix (https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=204665) in it. So removing the checks from lttng-modules.
diff --git a/lttng-modules.patches/lttng-modules-50.patch b/lttng-modules.patches/lttng-modules-50.patch
new file mode 100644
index 0000000..ef0cfce
--- /dev/null
+++ b/lttng-modules.patches/lttng-modules-50.patch
@@ -0,0 +1,24 @@
+diff -aruN a/wrapper/compiler.h b/wrapper/compiler.h
+--- a/wrapper/compiler.h 2015-09-04 10:20:27.133032355 -0700
++++ b/wrapper/compiler.h 2015-09-04 10:20:35.688926684 -0700
+@@ -23,20 +23,4 @@
+
+ #include <linux/compiler.h>
+
+-/*
+- * Don't allow compiling with buggy compiler.
+- */
+-
+-#ifdef GCC_VERSION
+-
+-/*
+- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
+- */
+-# ifdef __ARMEL__
+-# if GCC_VERSION >= 40800 && GCC_VERSION <= 40802
+-# error Your gcc version produces clobbered frame accesses
+-# endif
+-# endif
+-#endif
+-
+ #endif /* _LTTNG_WRAPPER_COMPILER_H */
diff --git a/lttng-modules.tar.bz2 b/lttng-modules.tar.bz2
new file mode 100644
index 0000000..ccf85d5
--- /dev/null
+++ b/lttng-modules.tar.bz2
Binary files differ
diff --git a/lttng-modules.url b/lttng-modules.url
new file mode 100644
index 0000000..6f687e4
--- /dev/null
+++ b/lttng-modules.url
@@ -0,0 +1 @@
+http://lttng.org/files/lttng-modules/lttng-modules-2.6.2.tar.bz2
diff --git a/lttng-modules.version b/lttng-modules.version
new file mode 100644
index 0000000..097a15a
--- /dev/null
+++ b/lttng-modules.version
@@ -0,0 +1 @@
+2.6.2