Search for dtb only if not existed
This commit is contained in:
parent
7a376c9efc
commit
b614b06736
@ -92,7 +92,8 @@ int parse_img(void *orig, size_t size, boot_img *boot) {
|
||||
boot->extra = base + pos;
|
||||
}
|
||||
|
||||
// Linear search in kernel for DTB
|
||||
// Search for dtb in kernel if not found
|
||||
if (boot->hdr.dt_size == 0) {
|
||||
for (int i = 0; i < boot->hdr.kernel_size; ++i) {
|
||||
if (memcmp(boot->kernel + i, DTB_MAGIC, 4) == 0) {
|
||||
boot->flags |= APPEND_DTB;
|
||||
@ -102,6 +103,7 @@ int parse_img(void *orig, size_t size, boot_img *boot) {
|
||||
fprintf(stderr, "APPEND_DTB [%d]\n", boot->hdr.dt_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
boot->ramdisk_type = check_type(boot->ramdisk);
|
||||
boot->kernel_type = check_type(boot->kernel);
|
||||
|
Loading…
Reference in New Issue
Block a user