[yocto] how to write a shell command in local.conf

Liu treebody at embedstudy.com
Wed Oct 31 19:52:05 PDT 2012


Hi all,
    I add the following settings in local.conf :
 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:  --:--:--
'
ERROR: Please add your architecture to siteinfo.bbclass.
  
 1)I can not understand why it became to 'i386 | ETA: --:--:--
' instead of 'i386'.Is there any mistmake in my settings in the above-mentioned ? 
 2)Another question: I can see HOST_ARCH="i386" using bitbake -e | grep HOST_ARCH,but see nothing using bitbake 
 -e busybox | grep HOST_ARCH.Does it mean the the variable has no effect when building busybox?
  
 Best whishes,
 ---------------------Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20121101/9fcdaafd/attachment.html>


More information about the yocto mailing list