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:
parent
968e6237bd
commit
0b3192c4d5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user