Skip to content

Commit

Permalink
mkbootimg: Add --dt parameter to specify DT image
Browse files Browse the repository at this point in the history
New optional --dt parameter to specify a kernel device tree image.

Change-Id: Ie29a11cbf4138426bfd19ae486d69a5fcbd8f442

Resolution: Cherry-pick simply to be up-to-date with CM HEAD, despite
having added this myself previously.
  • Loading branch information
David Ng authored and osm0sis committed Feb 5, 2016
1 parent 4e8fea9 commit b98749e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mkbootimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ int usage(void)
" [ --board <boardname> ]\n"
" [ --base <address> ]\n"
" [ --pagesize <pagesize> ]\n"
" [ --dt <filename> ]\n"
" [ --kernel_offset <base offset> ]\n"
" [ --ramdisk_offset <base offset> ]\n"
" [ --second_offset <base offset> ]\n"
" [ --tags_offset <base offset> ]\n"
" [ --dt <filename> ]\n"
" [ --id ]\n"
" -o|--output <filename>\n"
);
Expand Down Expand Up @@ -315,6 +315,10 @@ int main(int argc, char **argv)
print_id((uint8_t *) hdr.id, sizeof(hdr.id));
}

if(dt_data) {
if(write(fd, dt_data, hdr.dt_size) != hdr.dt_size) goto fail;
if(write_padding(fd, pagesize, hdr.dt_size)) goto fail;
}
return 0;

fail:
Expand Down

0 comments on commit b98749e

Please sign in to comment.