Skip to content

Commit 2bc20b8

Browse files
committed
dtbo: print the correct AVB info file
Fix: Issue #174
1 parent 8e6ba46 commit 2bc20b8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • bbootimg/src/main/kotlin/rom/fdt

bbootimg/src/main/kotlin/rom/fdt/Dtbo.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class Dtbo(
3535
var header: DtboHeader = DtboHeader(),
3636
var dtEntries: MutableList<DeviceTreeTableEntry> = mutableListOf()
3737
) {
38+
private var avbInfoExtracted: Boolean = false
3839
class DtboInfo(
3940
var output: String = "",
4041
var json: String = "",
@@ -168,8 +169,10 @@ class Dtbo(
168169
}
169170

170171
fun extractVBMeta(): Dtbo {
172+
avbInfoExtracted = false
171173
try {
172174
AVBInfo.parseFrom(Dumpling(info.output)).dumpDefault(info.output)
175+
avbInfoExtracted = true
173176
} catch (e: Exception) {
174177
log.error("extraceVBMeta(): $e")
175178
}
@@ -236,7 +239,11 @@ class Dtbo(
236239
it.addRow("device-tree blob (${this.header.entryCount} blobs)", "${outDir}dt/dt.*")
237240
it.addRow("\\-- device-tree source ", "${outDir}dt/dt.*.$dtsSuffix")
238241
it.addRule()
239-
it.addRow("AVB info", Avb.getJsonFileName(info.output))
242+
if (avbInfoExtracted) {
243+
it.addRow("AVB info", Avb.getJsonFileName(info.output))
244+
} else {
245+
it.addRow("AVB info", "NONE")
246+
}
240247
it.addRule()
241248
it
242249
}

0 commit comments

Comments
 (0)