summaryrefslogtreecommitdiffstats
path: root/mkbootimg
diff options
context:
space:
mode:
authorRom Lemarchand <romlem@android.com>2015-04-08 15:13:11 -0700
committerRom Lemarchand <romlem@google.com>2015-04-08 15:13:11 -0700
commit13e93f71129e15e36ef5b3282cf9952ca464ca14 (patch)
treef94205e415824a85d4a784368374bdccbc9caa17 /mkbootimg
parentec56019c0f7823dbac81562e05de17967088df7c (diff)
downloadsystem_core-13e93f71129e15e36ef5b3282cf9952ca464ca14.zip
system_core-13e93f71129e15e36ef5b3282cf9952ca464ca14.tar.gz
system_core-13e93f71129e15e36ef5b3282cf9952ca464ca14.tar.bz2
mkbootimg: make ramdisk optional
Change-Id: Iaa0d220a1fdc5e8652ab8eaf3314bbdcb0746732
Diffstat (limited to 'mkbootimg')
-rw-r--r--mkbootimg/mkbootimg.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/mkbootimg/mkbootimg.c b/mkbootimg/mkbootimg.c
index fc92b4d..a4ab7e1 100644
--- a/mkbootimg/mkbootimg.c
+++ b/mkbootimg/mkbootimg.c
@@ -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 {