[OE-core] [RFC Bug #892] Putting siteconfig cache files into ROOTFS

Lu, Lianhao lianhao.lu at intel.com
Wed Aug 10 11:47:02 UTC 2011


Hi guys,

When trying to fix bug #892(http://bugzilla.pokylinux.org/show_bug.cgi?id=892), I met some problems in generating the default site config files used by cross-canadian toolchain.

When using autoconf for cross-compile, it is impossible to check features that require running a test program. We should set those values in a file and have the environment variable CONFIG_SITE set to that file, so the autoconf can run correctly for cross-compiling. That's why the 2 recipes meta-toolchain.bb and meta-environment.bb set the CONFIG_SITE environment variable in relevant environment files. Both of them use the function siteinfo_get_files() defined in siteinfo.bbclass.

The function siteinfo_get_files() is designed to get the default site config files for the target system. It collects site config files from 2 places, one is the "site" subdirectory of each BBPATH, the other is from SITECONFIG_SYSROOT_CACHE where each package will put their own site config cache file during their populate-sysroot task respectively. 

Here we have a problem with meta-environment/meta-toolchain recipe. When meta-environment/meta-toolchain try to call siteinfo_get_files(), there is no way to guarantee that all other packages have finished their populate-sysroot tasks and have put their site config cache files into the SITECONFIG_SYSROOT_CACHE. So the value returned by siteinfo_get_files() might differ from time to time depends on what other packages have been built before "bitbake meta-toolchain".

When the user try to cross-compile an application using cross-canadian toolchain we provide, we now encourage the user to use the same rootfs for both running and cross-compiling. So I'm thinking of copying those site config cache files in SITECONFIG_SYSROOT_CACHE into the rootfs, and have the CONFIG_SITE in the relevant environment file point to those site config cache files in the rootfs, something like:

    export CONFIG_SITE="${POKY_TARGET_SYSROOT}/usr/share/site-config-i586-poky-linux"

Any comments?

Best Regards,
-Lianhao




More information about the Openembedded-core mailing list