dtbo: print the correct AVB info file

Fix: Issue #174
rc
cfig 6 months ago
parent 8e6ba4662f
commit 2bc20b8a02
No known key found for this signature in database
GPG Key ID: B104C307F0FDABB7

@ -35,6 +35,7 @@ class Dtbo(
var header: DtboHeader = DtboHeader(), var header: DtboHeader = DtboHeader(),
var dtEntries: MutableList<DeviceTreeTableEntry> = mutableListOf() var dtEntries: MutableList<DeviceTreeTableEntry> = mutableListOf()
) { ) {
private var avbInfoExtracted: Boolean = false
class DtboInfo( class DtboInfo(
var output: String = "", var output: String = "",
var json: String = "", var json: String = "",
@ -168,8 +169,10 @@ class Dtbo(
} }
fun extractVBMeta(): Dtbo { fun extractVBMeta(): Dtbo {
avbInfoExtracted = false
try { try {
AVBInfo.parseFrom(Dumpling(info.output)).dumpDefault(info.output) AVBInfo.parseFrom(Dumpling(info.output)).dumpDefault(info.output)
avbInfoExtracted = true
} catch (e: Exception) { } catch (e: Exception) {
log.error("extraceVBMeta(): $e") log.error("extraceVBMeta(): $e")
} }
@ -236,7 +239,11 @@ class Dtbo(
it.addRow("device-tree blob (${this.header.entryCount} blobs)", "${outDir}dt/dt.*") it.addRow("device-tree blob (${this.header.entryCount} blobs)", "${outDir}dt/dt.*")
it.addRow("\\-- device-tree source ", "${outDir}dt/dt.*.$dtsSuffix") it.addRow("\\-- device-tree source ", "${outDir}dt/dt.*.$dtsSuffix")
it.addRule() it.addRule()
if (avbInfoExtracted) {
it.addRow("AVB info", Avb.getJsonFileName(info.output)) it.addRow("AVB info", Avb.getJsonFileName(info.output))
} else {
it.addRow("AVB info", "NONE")
}
it.addRule() it.addRule()
it it
} }

Loading…
Cancel
Save