From 277d9a4a151f63833df4456aa9684087989b3feb Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Tue, 4 Mar 2014 07:18:49 -0600
Subject: [PATCH] chroot: dont always enable third party modules

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 beagleboard.org_image.sh |  4 ++++
 scripts/chroot.sh        | 17 ++++++++++-------
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/beagleboard.org_image.sh b/beagleboard.org_image.sh
index a97c93099..4466a2201 100755
--- a/beagleboard.org_image.sh
+++ b/beagleboard.org_image.sh
@@ -143,6 +143,8 @@ minimal_armel () {
 		chroot_enable_debian_backports="${chroot_enable_debian_backports}"
 		chroot_debian_backports_pkg_list="${chroot_debian_backports_pkg_list}"
 
+		third_party_modules="${third_party_modules}"
+
 	__EOF__
 
 	cat ${DIR}/.project
@@ -423,6 +425,8 @@ chroot_multiarch_armel="enable"
 #	fi
 #fi
 
+third_party_modules="enable"
+
 dpkg_arch="armhf"
 DEFAULT_RELEASES="wheezy"
 for REL in ${RELEASES:-$DEFAULT_RELEASES} ; do
diff --git a/scripts/chroot.sh b/scripts/chroot.sh
index 6d964cfe0..cd9b3f788 100755
--- a/scripts/chroot.sh
+++ b/scripts/chroot.sh
@@ -267,6 +267,7 @@ debian)
 	echo "distro=Debian" > /tmp/rcn-ee.conf
 	echo "user_name=${user_name}" >> /tmp/rcn-ee.conf
 	echo "release_date=${time}" >> /tmp/rcn-ee.conf
+	echo "third_party_modules=${third_party_modules}" >> /tmp/rcn-ee.conf
 	sudo mv /tmp/rcn-ee.conf ${tempdir}/etc/rcn-ee.conf
 
 	;;
@@ -486,14 +487,16 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
 
 		dpkg -x /tmp/\${deb_file} /
 
-		unset thirdparty_file
-		thirdparty_file=\$(cat /tmp/index.html | grep thirdparty)
-		thirdparty_file=\$(echo \${thirdparty_file} | awk -F "\"" '{print \$2}')
-		if [ "\${thirdparty_file}" ] ; then
-			wget --directory-prefix=/tmp/ \${kernel_url}\${thirdparty_file}
+		if [ "x\${third_party_modules}" = "xenable" ] ; then
+			unset thirdparty_file
+			thirdparty_file=\$(cat /tmp/index.html | grep thirdparty)
+			thirdparty_file=\$(echo \${thirdparty_file} | awk -F "\"" '{print \$2}')
+			if [ "\${thirdparty_file}" ] ; then
+				wget --directory-prefix=/tmp/ \${kernel_url}\${thirdparty_file}
 
-			if [ -f /tmp/thirdparty ] ; then
-				/bin/sh /tmp/thirdparty
+				if [ -f /tmp/thirdparty ] ; then
+					/bin/sh /tmp/thirdparty
+				fi
 			fi
 		fi
 
-- 
GitLab