summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-19 22:41:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-30 16:55:21 +0100
commitc92aca546ea9c0c4b36b9e39619df14d3b803f88 (patch)
tree843c2aa1351998554859c7b5da494295b2259062 /meta
parent3584fffc72166a9971a4a85f3d6fda4eb23d5042 (diff)
downloadpoky-c92aca546ea9c0c4b36b9e39619df14d3b803f88.tar.gz
sstatesig: Fix hash equivlanency locked signature issues
Using locked signatures with the hash equivalency server ran into problems. We need to: a) Ensure the lockedhashes data object is passed from the core to any individual tasks using the get/set_taskdata methods b) Return a locked singature instead of a unihash c) Write the unihash being used to locked signature lists rather than the calculated taskhash d) Skip warnings of hash mismatch if the hash is a unihash These changes fix esdk builds (which use locked sigs) when a hash equivalence server is in use. (From OE-Core rev: 25dc3d78de01dffa77a3a2452d6a97d741b446d9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/sstatesig.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 50d80bf51a..43eb6034e6 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -130,10 +130,10 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
130 130
131 def get_taskdata(self): 131 def get_taskdata(self):
132 data = super(bb.siggen.SignatureGeneratorBasicHash, self).get_taskdata() 132 data = super(bb.siggen.SignatureGeneratorBasicHash, self).get_taskdata()
133 return (data, self.lockedpnmap, self.lockedhashfn) 133 return (data, self.lockedpnmap, self.lockedhashfn, self.lockedhashes)
134 134
135 def set_taskdata(self, data): 135 def set_taskdata(self, data):
136 coredata, self.lockedpnmap, self.lockedhashfn = data 136 coredata, self.lockedpnmap, self.lockedhashfn, self.lockedhashes = data
137 super(bb.siggen.SignatureGeneratorBasicHash, self).set_taskdata(coredata) 137 super(bb.siggen.SignatureGeneratorBasicHash, self).set_taskdata(coredata)
138 138
139 def dump_sigs(self, dataCache, options): 139 def dump_sigs(self, dataCache, options):
@@ -171,10 +171,11 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
171 h_locked = self.lockedsigs[recipename][task][0] 171 h_locked = self.lockedsigs[recipename][task][0]
172 var = self.lockedsigs[recipename][task][1] 172 var = self.lockedsigs[recipename][task][1]
173 self.lockedhashes[tid] = h_locked 173 self.lockedhashes[tid] = h_locked
174 unihash = super().get_unihash(tid)
174 self.taskhash[tid] = h_locked 175 self.taskhash[tid] = h_locked
175 #bb.warn("Using %s %s %s" % (recipename, task, h)) 176 #bb.warn("Using %s %s %s" % (recipename, task, h))
176 177
177 if h != h_locked: 178 if h != h_locked and h_locked != unihash:
178 self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s' 179 self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s'
179 % (recipename, task, h, h_locked, var)) 180 % (recipename, task, h, h_locked, var))
180 181
@@ -182,6 +183,11 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
182 #bb.warn("%s %s %s" % (recipename, task, h)) 183 #bb.warn("%s %s %s" % (recipename, task, h))
183 return h 184 return h
184 185
186 def get_unihash(self, tid):
187 if tid in self.lockedhashes:
188 return self.lockedhashes[tid]
189 return super().get_unihash(tid)
190
185 def dump_sigtask(self, fn, task, stampbase, runtime): 191 def dump_sigtask(self, fn, task, stampbase, runtime):
186 tid = fn + ":" + task 192 tid = fn + ":" + task
187 if tid in self.lockedhashes: 193 if tid in self.lockedhashes:
@@ -211,7 +217,7 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
211 (_, _, task, fn) = bb.runqueue.split_tid_mcfn(tid) 217 (_, _, task, fn) = bb.runqueue.split_tid_mcfn(tid)
212 if tid not in self.taskhash: 218 if tid not in self.taskhash:
213 continue 219 continue
214 f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.taskhash[tid] + " \\\n") 220 f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n")
215 f.write(' "\n') 221 f.write(' "\n')
216 f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l))) 222 f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l)))
217 223