mkbootimg: make ramdisk optional

Change-Id: Iaa0d220a1fdc5e8652ab8eaf3314bbdcb0746732
This commit is contained in:
Rom Lemarchand 2015-04-08 15:13:11 -07:00 committed by Rom Lemarchand
parent ec56019c0f
commit 13e93f7112

View file

@ -59,7 +59,7 @@ int usage(void)
{
fprintf(stderr,"usage: mkbootimg\n"
" --kernel <filename>\n"
" --ramdisk <filename>\n"
" [ --ramdisk <filename> ]\n"
" [ --second <2ndbootloader-filename> ]\n"
" [ --cmdline <kernel-commandline> ]\n"
" [ --board <boardname> ]\n"
@ -179,11 +179,6 @@ int main(int argc, char **argv)
return usage();
}
if(ramdisk_fn == 0) {
fprintf(stderr,"error: no ramdisk image specified\n");
return usage();
}
if(strlen(board) >= BOOT_NAME_SIZE) {
fprintf(stderr,"error: board name too large\n");
return usage();
@ -213,7 +208,7 @@ int main(int argc, char **argv)
return 1;
}
if(!strcmp(ramdisk_fn,"NONE")) {
if(ramdisk_fn == 0) {
ramdisk_data = 0;
hdr.ramdisk_size = 0;
} else {