Skip to contentSkip to conversation

toolchain-scripts.bbclass:Add CROSS_COMPILE variable to environment-setup file

PATCH In review [email protected] 2 participants 2 messages May 14, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain-scripts.bbclass:Add CROSS_COMPILE variable to environment-setup file

From: Zongchun Yu <[email protected]>

when compiling the linux kernel manually. users need to set CROSS_COMPILE separately. adding the CROSS_COMPILE variable will be nice for using.

---
 meta/classes/toolchain-scripts.bbclass |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
meta/classes/toolchain-scripts.bbclass +3 -0
index 050e799..be5623b 100644
@@ -47,6 +47,7 @@ toolchain_create_sdk_env_script () {
 	echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
 	echo 'export PYTHONHOME=${SDKPATHNATIVE}${prefix_nativesdk}' >> $script
 	echo 'export ARCH=${ARCH}' >> $script
+	echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
 }
 
 # This function creates an environment-setup-script in the TMPDIR which enables
@@ -92,6 +93,7 @@ toolchain_create_tree_env_script () {
 	echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
 	echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
 	echo 'export ARCH=${ARCH}' >> $script
+	echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
 }
 
 # This function creates an environment-setup-script for use by the ADT installer
@@ -137,6 +139,7 @@ toolchain_create_sdk_env_script_for_installer () {
 	echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
 	echo 'export PYTHONHOME=${SDKPATHNATIVE}${prefix_nativesdk}' >> $script
 	echo 'export ARCH=${ARCH}' >> $script
+	echo 'export CROSS_COMPILE=${TARGET_PREFIX}' >> $script
 }
 
 #we get the cached site config in the runtime
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 6 lines · On Tue, May 14, 2013 at 3:43 AM, <[email protected]> wrote:

From: Zongchun Yu <[email protected]>

when compiling the linux kernel manually. users need to set CROSS_COMPILE separately. adding the CROSS_COMPILE variable will be nice for using.

I agree; it makes it easy to use with many make based projects (kernel and u-boot, for example).

--
Otavio Salvador O.S. Systems
E-mail: [email protected] http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br