mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
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>
This commit is contained in:
@@ -130,10 +130,10 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
|
||||
|
||||
def get_taskdata(self):
|
||||
data = super(bb.siggen.SignatureGeneratorBasicHash, self).get_taskdata()
|
||||
return (data, self.lockedpnmap, self.lockedhashfn)
|
||||
return (data, self.lockedpnmap, self.lockedhashfn, self.lockedhashes)
|
||||
|
||||
def set_taskdata(self, data):
|
||||
coredata, self.lockedpnmap, self.lockedhashfn = data
|
||||
coredata, self.lockedpnmap, self.lockedhashfn, self.lockedhashes = data
|
||||
super(bb.siggen.SignatureGeneratorBasicHash, self).set_taskdata(coredata)
|
||||
|
||||
def dump_sigs(self, dataCache, options):
|
||||
@@ -171,10 +171,11 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
|
||||
h_locked = self.lockedsigs[recipename][task][0]
|
||||
var = self.lockedsigs[recipename][task][1]
|
||||
self.lockedhashes[tid] = h_locked
|
||||
unihash = super().get_unihash(tid)
|
||||
self.taskhash[tid] = h_locked
|
||||
#bb.warn("Using %s %s %s" % (recipename, task, h))
|
||||
|
||||
if h != h_locked:
|
||||
if h != h_locked and h_locked != unihash:
|
||||
self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s'
|
||||
% (recipename, task, h, h_locked, var))
|
||||
|
||||
@@ -182,6 +183,11 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
|
||||
#bb.warn("%s %s %s" % (recipename, task, h))
|
||||
return h
|
||||
|
||||
def get_unihash(self, tid):
|
||||
if tid in self.lockedhashes:
|
||||
return self.lockedhashes[tid]
|
||||
return super().get_unihash(tid)
|
||||
|
||||
def dump_sigtask(self, fn, task, stampbase, runtime):
|
||||
tid = fn + ":" + task
|
||||
if tid in self.lockedhashes:
|
||||
@@ -211,7 +217,7 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
|
||||
(_, _, task, fn) = bb.runqueue.split_tid_mcfn(tid)
|
||||
if tid not in self.taskhash:
|
||||
continue
|
||||
f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.taskhash[tid] + " \\\n")
|
||||
f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n")
|
||||
f.write(' "\n')
|
||||
f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user