summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/siteinfo.bbclass4
-rw-r--r--meta/classes/toolchain-scripts.bbclass24
2 files changed, 24 insertions, 4 deletions
diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass
index a61b5e50cd..02294c4d2e 100644
--- a/meta/classes/siteinfo.bbclass
+++ b/meta/classes/siteinfo.bbclass
@@ -118,7 +118,7 @@ python () {
118 bb.fatal("Please add your architecture to siteinfo.bbclass") 118 bb.fatal("Please add your architecture to siteinfo.bbclass")
119} 119}
120 120
121def siteinfo_get_files(d): 121def siteinfo_get_files(d, no_cache = False):
122 sitedata = siteinfo_data(d) 122 sitedata = siteinfo_data(d)
123 sitefiles = "" 123 sitefiles = ""
124 for path in d.getVar("BBPATH", True).split(":"): 124 for path in d.getVar("BBPATH", True).split(":"):
@@ -127,6 +127,8 @@ def siteinfo_get_files(d):
127 if os.path.exists(filename): 127 if os.path.exists(filename):
128 sitefiles += filename + " " 128 sitefiles += filename + " "
129 129
130 if no_cache: return sitefiles
131
130 # Now check for siteconfig cache files 132 # Now check for siteconfig cache files
131 path_siteconfig = bb.data.getVar('SITECONFIG_SYSROOTCACHE', d, 1) 133 path_siteconfig = bb.data.getVar('SITECONFIG_SYSROOTCACHE', d, 1)
132 if os.path.isdir(path_siteconfig): 134 if os.path.isdir(path_siteconfig):
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index b7e4e04eaf..4a28e5fe38 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -101,17 +101,28 @@ toolchain_create_sdk_env_script_for_installer () {
101 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script 101 echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
102} 102}
103 103
104#we get the cached site config in the runtime
105TOOLCHAIN_CONFIGSITE_NOCACHE := "${@siteinfo_get_files(d, True)}"
106TOOLCHAIN_CONFIGSITE_SYSROOTCACHE := "${STAGING_DATADIR}/${TARGET_SYS}_config_site.d"
107TOOLCHAIN_NEED_CONFIGSITE_CACHE = "eglibc ncurses"
108
104#This function create a site config file 109#This function create a site config file
105toolchain_create_sdk_siteconfig () { 110toolchain_create_sdk_siteconfig () {
106 local siteconfig=$1 111 local siteconfig=$1
107 shift
108 local files=$@
109 112
110 rm -f $siteconfig 113 rm -f $siteconfig
111 touch $siteconfig 114 touch $siteconfig
112 for sitefile in ${files} ; do 115
116 for sitefile in ${TOOLCHAIN_CONFIGSITE_NOCACHE} ; do
113 cat $sitefile >> $siteconfig 117 cat $sitefile >> $siteconfig
114 done 118 done
119
120 #get cached site config
121 for sitefile in ${TOOLCHAIN_NEED_CONFIGSITE_CACHE}; do
122 if [ -r ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config ]; then
123 cat ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config >> $siteconfig
124 fi
125 done
115} 126}
116 127
117#This function create a version information file 128#This function create a version information file
@@ -124,3 +135,10 @@ toolchain_create_sdk_version () {
124 echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile 135 echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
125 echo 'Timestamp: ${DATETIME}' >> $versionfile 136 echo 'Timestamp: ${DATETIME}' >> $versionfile
126} 137}
138
139python __anonymous () {
140 deps = bb.data.getVarFlag('do_configure', 'depends', d) or ""
141 for dep in (bb.data.getVar('TOOLCHAIN_NEED_CONFIGSITE_CACHE', d, True) or "").split():
142 deps += " %s:do_populate_sysroot" % dep
143 bb.data.setVarFlag('do_configure', 'depends', deps, d)
144}