Commit 0b3192c4 authored by Shaka Huang's avatar Shaka Huang Committed by John Wu

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: 's avatarShaka Huang <shakalaca@gmail.com>
parent 968e6237
...@@ -320,12 +320,13 @@ void repack(const char* orig_image, const char* out_image) { ...@@ -320,12 +320,13 @@ void repack(const char* orig_image, const char* out_image) {
} else { } else {
lheader(&boot, kernel_size, = restore(KERNEL_FILE, fd)); lheader(&boot, kernel_size, = restore(KERNEL_FILE, fd));
} }
}
// dtb // dtb
if (access(DTB_FILE, R_OK) == 0) { if (access(DTB_FILE, R_OK) == 0) {
lheader(&boot, kernel_size, += restore(DTB_FILE, fd)); lheader(&boot, kernel_size, += restore(DTB_FILE, fd));
} }
file_align(); file_align();
}
// ramdisk // ramdisk
ramdisk_off = lseek(fd, 0, SEEK_CUR); ramdisk_off = lseek(fd, 0, SEEK_CUR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment