From: Ting Liu <ting....@nxp.com>

Signed-off-by: Ting Liu <ting....@nxp.com>
---
 recipes-bsp/u-boot/u-boot-qoriq_2016.09.bb | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2016.09.bb 
b/recipes-bsp/u-boot/u-boot-qoriq_2016.09.bb
index 43a47ac..4ba46b9 100644
--- a/recipes-bsp/u-boot/u-boot-qoriq_2016.09.bb
+++ b/recipes-bsp/u-boot/u-boot-qoriq_2016.09.bb
@@ -35,19 +35,23 @@ python () {
     if "e5500-64b:" in arch or "e6500-64b:" in arch:
         if not "lib32" in ml:
             raise bb.parse.SkipPackage("Building the u-boot for this arch 
requires multilib to be enabled")
-        sys_multilib = 'powerpc' + d.getVar('TARGET_VENDOR', False) + 
'mllib32-' + d.getVar('HOST_OS', False)
+        sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib32-linux'
+        sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS')
+        workdir = d.getVar('WORKDIR').replace(sys_original,sys_multilib)
         d.setVar('DEPENDS_append', ' lib32-gcc-cross-powerpc lib32-libgcc')
-        d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE', False) 
+ '/' + sys_multilib)
-        d.setVar('TOOLCHAIN_OPTIONS_append', '/../lib32-' + 
d.getVar("MACHINE", False))
-        d.setVar("WRAP_TARGET_PREFIX", sys_multilib + '-')
+        d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + 
'/powerpc' + sys_multilib)
+        d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + 
'/lib32-recipe-sysroot')
+        d.setVar("WRAP_TARGET_PREFIX", 'powerpc' + sys_multilib + '-')
     elif "fsl-lsch2-32b:" in arch:
         if not "lib64" in ml:
             raise bb.parse.SkipPackage("Building the u-boot for this arch 
requires multilib to be enabled")
-        sys_multilib = 'aarch64' + d.getVar('TARGET_VENDOR', False) + 
'mllib64-linux'
+        sys_multilib = d.getVar('TARGET_VENDOR') + 'mllib64-linux'
+        sys_original = d.getVar('TARGET_VENDOR') + '-' + d.getVar('TARGET_OS')
+        workdir = d.getVar('WORKDIR').replace(sys_original,sys_multilib)
         d.setVar('DEPENDS_append', ' lib64-gcc-cross-aarch64 lib64-libgcc')
-        d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE', False) 
+ '/' + sys_multilib)
-        d.setVar('TOOLCHAIN_OPTIONS_append', '/../lib64-' + 
d.getVar("MACHINE", False))
-        d.setVar("WRAP_TARGET_PREFIX", sys_multilib + '-')
+        d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + 
'/aarch64' + sys_multilib)
+        d.setVar('TOOLCHAIN_OPTIONS', '--sysroot=' + workdir + 
'/lib64-recipe-sysroot')
+        d.setVar("WRAP_TARGET_PREFIX", 'aarch64' + sys_multilib + '-')
 }
 
 WRAP_TARGET_PREFIX ?= "${TARGET_PREFIX}"
-- 
1.9.0

-- 
_______________________________________________
meta-freescale mailing list
meta-freescale@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to