On Wed, Oct 31, 2012 at 7:52 PM, Liu <treeb...@embedstudy.com> wrote: > HOST_ARCH:="${@os.popen('/usr/bin/gcc -dumpmachine | sed -e s\'/-.*//\' \ > -e \'s/sparc.*/sparc/\' \ > -e \'s/arm.*/arm/g\' \ > -e \'s/m68k.*/m68k/\' \ > -e \'s/ppc/powerpc/g\' \ > -e \'s/v850.*/v850/g\' \ > -e \'s/sh[234]/sh/\' \ > -e \'s/mips-.*/mips/\' \ > -e \'s/mipsel-.*/mipsel/\' \ > -e \'s/cris.*/cris/\' \ > -e \'s/i[3-9]86/i386/\'').read()}" > Then I came up with a problem,I can see the variable HOST_ARCH changed to > "i386" using "bitbake -e | grep HOST_ARCH",but when I bitbake busybox ,it > says : > ERROR: Unable to determine endianness for architecture 'i386 | ETA: > --:--:-- > '
You forgot to strip off the trailing newline. Use read().rstrip(). You may also want to use bb.process or oe.process rather than os.popen. -- Christopher Larson _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto