mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-14 11:47:26 +00:00
Check dtb even if kernel is not available
By the flow of unpacking boot image of Chrome OS there will be no kernel file but an dtb image. In that case the dtb image won’t be added when repacking boot image. Signed-off-by: Shaka Huang <shakalaca@gmail.com>
This commit is contained in:
@@ -320,13 +320,14 @@ void repack(const char* orig_image, const char* out_image) {
|
||||
} else {
|
||||
lheader(&boot, kernel_size, = restore(KERNEL_FILE, fd));
|
||||
}
|
||||
// dtb
|
||||
if (access(DTB_FILE, R_OK) == 0) {
|
||||
lheader(&boot, kernel_size, += restore(DTB_FILE, fd));
|
||||
}
|
||||
file_align();
|
||||
}
|
||||
|
||||
// dtb
|
||||
if (access(DTB_FILE, R_OK) == 0) {
|
||||
lheader(&boot, kernel_size, += restore(DTB_FILE, fd));
|
||||
}
|
||||
file_align();
|
||||
|
||||
// ramdisk
|
||||
ramdisk_off = lseek(fd, 0, SEEK_CUR);
|
||||
if (boot.flags & MTK_RAMDISK) {
|
||||
|
Reference in New Issue
Block a user