Project import
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4489fed
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,106 @@
+#
+#    Copyright (c) 2010-2014 Nest, 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 make file for the Freescale UTP over USB MSC
+#      tool, uuc.
+#
+
+
+include pre.mak
+
+PackageName		:= uuc
+
+PackageExtension	:= tar.gz
+PackageSeparator	:= -
+
+PackagePatchArgs	:= -p1
+
+PackageArchive		:= $(PackageName)-$(PackageVersion).$(PackageExtension)
+PackageSourceDir	:= $(PackageName)$(PackageSeparator)$(PackageVersion)
+
+PackageBuildMakefile	= $(call GenerateBuildPaths,Makefile)
+
+LicenseSourceFile	:= $(PackageSourceDir)/COPYING
+
+CleanPaths		+= $(PackageLicenseFile)
+
+UUIDDir         	:= sw/tps/e2fsprogs
+UUIDIncDir      	= $(call GenerateResultPaths,$(UUIDDir),usr/include)
+UUIDLibDir      	= $(call GenerateResultPaths,$(UUIDDir),usr/lib)
+
+SOURCEDIRS                      = $(PackageSourceDir)
+$(PackageSourceDir)_RULE_TARGET = $(BuildDirectory)/configure
+
+all: $(PackageDefaultGoal)
+
+# Generate the package license contents.
+
+$(LicenseSourceFile): $(BuildDirectory)/source
+
+$(PackageLicenseFile): $(LicenseSourceFile)
+	$(copy-result)
+
+# Extract the source from the archive and apply patches, if any.
+
+$(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths)
+	$(expand-and-patch-package)
+
+# Prepare the sources.
+
+$(BuildDirectory)/source: | $(PackageSourceDir)
+	$(Verbose)touch $@
+
+# Patch the sources, if necessary.
+
+$(BuildDirectory)/patch: $(BuildDirectory)/source
+	$(Verbose)touch $@
+
+# Generate the package build makefile.
+
+$(PackageBuildMakefile): | $(PackageSourceDir) $(BuildDirectory)
+	$(call create-links,$(CURDIR)/$(PackageSourceDir),$(BuildDirectory))
+
+# Configure the source for building.
+
+$(BuildDirectory)/configure: $(BuildDirectory)/source $(PackageBuildMakefile)
+	$(Verbose)touch $@
+
+# Build the source.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+
+$(BuildDirectory)/build: $(BuildDirectory)/configure | $(BuildDirectory)
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) -C $(BuildDirectory) \
+	CC="$(CC)" CXX="$(CXX)" AR=$(AR) NM=$(NM) RANLIB=$(RANLIB) STRIP=$(STRIP) \
+	CFLAGS="-I$(LinuxHeaderDir)" \
+	all
+	$(Verbose)touch $@
+
+# Stage the build to a temporary installation area.
+#
+# We have to unset MAKEFLAGS since they confuse the package build otherwise.
+
+$(BuildDirectory)/stage: $(BuildDirectory)/build | $(ResultDirectory)
+	$(Verbose)unset MAKEFLAGS && \
+	$(MAKE) -C $(BuildDirectory) DEST_DIR=$(ResultDirectory) install
+	$(Verbose)touch $@
+
+.PHONY: stage
+stage: $(BuildDirectory)/stage
+
+clean:
+	$(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory)
+	$(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory)
+
+include post.mak
diff --git a/uuc-3.0.35-4.1.0.tar.gz b/uuc-3.0.35-4.1.0.tar.gz
new file mode 100755
index 0000000..cebbbfc
--- /dev/null
+++ b/uuc-3.0.35-4.1.0.tar.gz
Binary files differ
diff --git a/uuc.patches/uuc-0001-fix-includes.patch b/uuc.patches/uuc-0001-fix-includes.patch
new file mode 100644
index 0000000..3c52ab1
--- /dev/null
+++ b/uuc.patches/uuc-0001-fix-includes.patch
@@ -0,0 +1,12 @@
+diff -Naur a/sdimage.c b/sdimage.c
+--- a/sdimage.c	2014-07-28 10:44:24.900046829 -0700
++++ b/sdimage.c	2014-07-28 10:45:34.108632190 -0700
+@@ -21,6 +21,8 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <string.h>
++#include <stdlib.h>
+ char *g_filedev;
+ char *g_firmware;
+ 
diff --git a/uuc.url b/uuc.url
new file mode 100644
index 0000000..fd00a19
--- /dev/null
+++ b/uuc.url
@@ -0,0 +1 @@
+https://www.freescale.com/webapp/sps/download/license.jsp?colCode=L3.0.35_4.1.0_ER_SOURCE_BSP&appType=file2&location=null&DOWNLOAD_ID=null
diff --git a/uuc.version b/uuc.version
new file mode 100644
index 0000000..8fc2e4f
--- /dev/null
+++ b/uuc.version
@@ -0,0 +1 @@
+3.0.35-4.1.0