diff --git a/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt b/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt index 0fd0fbe..3506d93 100644 --- a/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt +++ b/bbootimg/src/main/kotlin/bootimg/v3/BootV3.kt @@ -288,7 +288,7 @@ data class BootV3( //ramdisk if (ramdisk.size > 0) { val fmt = C.dumpRamdisk( - Helper.Slice(info.role, ramdisk.position, ramdisk.size, ramdisk.file), File(workDir, "root").toString() + Helper.Slice(info.input, ramdisk.position, ramdisk.size, ramdisk.file), File(workDir, "root").toString() ) this.ramdisk.file = this.ramdisk.file + ".$fmt" if (fmt == "xz") { diff --git a/bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt b/bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt index 12de14e..6a515e4 100644 --- a/bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt +++ b/bbootimg/src/main/kotlin/bootimg/v3/VendorBoot.kt @@ -246,14 +246,14 @@ data class VendorBoot( //Fixed: remove cpio in C/C++ //C.packRootfs("$workDir/root", this.ramdisk.file, parseOsMajor()) //enable advance JAVA cpio - C.packRootfs("$workDir/root", this.ramdisk.file, this.ramdisk.xzFlags) + C.packRootfs(Helper.joinPath("$workDir", "root"), this.ramdisk.file, this.ramdisk.xzFlags) } this.ramdisk.size = File(this.ramdisk.file).length().toInt() } else -> { this.ramdisk_table.ramdidks.forEachIndexed { index, it -> File(it.file).deleleIfExists() - log.info(Helper.joinPath(workDir!!, "/root.${index + 1}") + " -> " + it.file) + log.info(Helper.joinPath(workDir!!, "root.${index + 1}") + " -> " + it.file) C.packRootfs(Helper.joinPath(workDir, "root.${index + 1}"), it.file, this.ramdisk.xzFlags) } this.ramdisk.size = this.ramdisk_table.ramdidks.sumOf { File(it.file).length() }.toInt() @@ -416,7 +416,7 @@ data class VendorBoot( } val tab = AsciiTable().let { it.addRule() - val imageInfoJsonFile = Helper.joinPath(workDir!!, info.role.removeSuffix(".img"), ".json") + val imageInfoJsonFile = Helper.joinPath(workDir!!, info.role.removeSuffix(".img") + ".json") it.addRow("image info", imageInfoJsonFile) prints.add(Pair("image info", imageInfoJsonFile)) it.addRule() diff --git a/bbootimg/src/main/kotlin/packable/DeviceTreeParser.kt b/bbootimg/src/main/kotlin/packable/DeviceTreeParser.kt index 6bcc834..a72419f 100644 --- a/bbootimg/src/main/kotlin/packable/DeviceTreeParser.kt +++ b/bbootimg/src/main/kotlin/packable/DeviceTreeParser.kt @@ -43,7 +43,7 @@ class DeviceTreeParser : IPackable { log.info("\n\t\t\tPack Summary of {}\n{}\n", fileName, Common.table2String(prints)) } - override fun pull(fileName: String, deviceName: String) { + fun pull(fileName: String) { //prepare super.clear() File(workDir).mkdir()