HI Community:
   I'm trying to cross compile a stage1 base system for Openpandora. All the
steps can be followed in this wiki [1].
   I prefer to take cross compile way,because I think it's more considerable
for embedded development. Since not all the embedded devices
are that powerful as TI's OMAP3 chip.  Gentoo-openpandora-dev already took
the native way to compile out most packages : ) Great!
   Actually the upstream provide two scripts [2] to setup the building
environment. Which one is crossdev_set_environment.sh, it set SYSROOT same
with ROOT, another is set_environment.sh, which make ROOT different from
SYSROOT. Since SYSROOT is the cross
toolchain's environment, and ROOT is the target rootfs. I perfer to take
set_set_environment.sh's way, It would seperate toolchains and target
 rootfs. So it will make the finanal rootfs more neat and clean, also will
avoid potential file confliction. That could be possible, for example
the linux-headers, both cross toolchain and target rootfs will emerge. Also
maybe simply mark it as provided would solve this problem.
   The upstream's default embedded's make.conf only look for header files
and library from ROOT's path. So if some lowlevel package
looking for header file or library located at the toolchain's path, will
fail at complile stage. I come cross and idea, maybe it's possible to add
both SYSROOT and ROOT's path into compiler's looking path.So I just tweaked
the CFLAGS and LDFLAGS[3]. I have no idea whill there be
any problem with this. Still struggling and so far I got here.
   Any idea about how to make embedded people's life easy would be great.
   We may share the same problem. So I put the thread here, hope can drag
people's attention

Best Regards

          Dennis 'Openfree' Yxun

[1]
http://gentoo.openpandora.org/wiki/index.php/Create_Image/Installing_Crossdev_Tools
[2]
http://bazaar.launchpad.net/~gentoo-pandora-devs/gentoo-arm-pandora/main/files
[3] LDFLAGS=" -L${ROOT}/lib  -L/${ROOT}/usr/lib \
-L${SYSROOT}usr/lib -L${SYSROOT}lib \
"
CFLAGS="-Os -pipe ${MARCH_TUNE} -fomit-frame-pointer \
 -I${SYSROOT}/usr/include \
 -I${SYSROOT}/include \
 -I${ROOT}usr/include/ \
 -I${ROOT}include/ \
"

Reply via email to