Skip to content

Commit f06daa3

Browse files
committed
fix packing problem with latest vendor_kernel_boot.img
Fix: Issue #175 >>> import java.io.File >>> println(File("").length()) 4096
1 parent ae4b54b commit f06daa3

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020-2025 yuyezhong@gmail.com
1+
// Copyright 2020-2026 yuyezhong@gmail.com
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -370,7 +370,7 @@ data class VendorBoot(
370370
vrtSize = ramdisk_table.eachEntrySize * ramdisk_table.ramdidks.size,
371371
vrtEntryNum = ramdisk_table.ramdidks.size,
372372
vrtEntrySize = ramdisk_table.eachEntrySize,
373-
bootconfigSize = File(bootconfig.file).length().toInt()
373+
bootconfigSize = if (bootconfig.file.isNotBlank()) File(bootconfig.file).length().toInt() else 0
374374
).feature67()
375375
}
376376

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

integrationTest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ def main():
197197
log.info("sparse image is not supported on OS other than Linux, skip testing")
198198
# Issue 134: multiple DTs
199199
verifySingleDir(resDir3, "issue_134_multiple_DTs")
200+
# Issue 175: GKI vendor_kernel_boot
201+
verifySingleDir(resDir3, "issue_175_no_bootconfig_in_vkb")
200202
# legacy OTA support
201203
verifySingleDir(resDir3, "legacy_OTA")
202204

0 commit comments

Comments
 (0)