diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 22:41:29 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 22:41:29 +0300 |
commit | 21f9b84b4b729fbd7acbd465e7a3f726e4d20f91 (patch) | |
tree | eb2d091d427ca0813b445509d59cc8e27e8ad25f /yocto-poky/meta/classes/siteconfig.bbclass | |
parent | 101cef31e2bf54c678501155cd2106251acbd076 (diff) | |
parent | c124f4f2e04dca16a428a76c89677328bc7bf908 (diff) | |
download | openbmc-21f9b84b4b729fbd7acbd465e7a3f726e4d20f91.tar.xz |
Merge commit 'c124f4f2e04dca16a428a76c89677328bc7bf908' as 'yocto-poky'
Diffstat (limited to 'yocto-poky/meta/classes/siteconfig.bbclass')
-rw-r--r-- | yocto-poky/meta/classes/siteconfig.bbclass | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/yocto-poky/meta/classes/siteconfig.bbclass b/yocto-poky/meta/classes/siteconfig.bbclass new file mode 100644 index 000000000..45dce489d --- /dev/null +++ b/yocto-poky/meta/classes/siteconfig.bbclass @@ -0,0 +1,33 @@ +python siteconfig_do_siteconfig () { + shared_state = sstate_state_fromvars(d) + if shared_state['task'] != 'populate_sysroot': + return + if not os.path.isdir(os.path.join(d.getVar('FILE_DIRNAME', True), 'site_config')): + bb.debug(1, "No site_config directory, skipping do_siteconfig") + return + bb.build.exec_func('do_siteconfig_gencache', d) + sstate_clean(shared_state, d) + sstate_install(shared_state, d) +} + +EXTRASITECONFIG ?= "" + +siteconfig_do_siteconfig_gencache () { + mkdir -p ${WORKDIR}/site_config_${MACHINE} + gen-site-config ${FILE_DIRNAME}/site_config \ + >${WORKDIR}/site_config_${MACHINE}/configure.ac + cd ${WORKDIR}/site_config_${MACHINE} + autoconf + rm -f ${BPN}_cache + CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${BPN}_cache + sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \ + -e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \ + < ${BPN}_cache > ${BPN}_config + mkdir -p ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d + cp ${BPN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d + +} + +do_populate_sysroot[sstate-interceptfuncs] += "do_siteconfig " + +EXPORT_FUNCTIONS do_siteconfig do_siteconfig_gencache |