embedded linux - What are the steps in general to cross compile any open source for the specific target -
my job take open source internet. cross compile mipsel toolchain , binary. struggle lot cross compile code. steps in general cross compile source package. use platform linux. example, cc, ld , else? every source code has different structure, unable make out similarity between packages. how can cross compile it? there systematic steps done? please advise.
i can assume downloaded random oss tarball , stuck now. can give pointers, because haven't discovered universal, 1 size fits solution yet, you'll have experiment bit before finding approach suits needs best. , i've still haven't encountered nontrivial cross compilation job went start finish without tweaking, fiddling , lots of patience.
- the basic solution: need toolchain platform, have here if there's pre-built satisfies needs, or head on dan kegel's crosstool page largely automate creation of toolchain platforms supported it, , toolchain allow compile , link programs have no other dependencies standard libraries.
- many open source packages come autoconf configure scripts crosscompilation-aware, ie adding
--target=xxxx
make them use right cross compiler. work may involve downloading , crosscompiling/installing libraries first. major issue autoconf script tries compile small piece of code study output, determine feature of environment. can solved manually modifying configure, or disabling unneeded feature via egconfigure --without-xxxx
- if target system embedded linux system tools buildroot, openembedded or eldk automate not creation of usable toolchain, cross compilation of many commonly used libraries , add on packages linux. these tools allow add other packages target lists (eg custom application created or bought), may involve manually solving of issues explained in 2) first. there patch-scripts come these tools can used learn commonly used tricks around compilation issues.
Comments
Post a Comment