diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.host | 2 | ||||
-rw-r--r-- | scripts/kwbimage.c | 6 | ||||
-rw-r--r-- | scripts/kwboot.c | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 133edfae5b..a89a0c5d43 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -85,7 +85,7 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) # Create executable from a single .c file # host-csingle -> Executable quiet_cmd_host-csingle = HOSTCC $@ - cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \ + cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \ $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) $(host-csingle): $(obj)/%: $(src)/%.c FORCE $(call if_changed_dep,host-csingle) diff --git a/scripts/kwbimage.c b/scripts/kwbimage.c index 5b84db3f7a..2a052a7ff3 100644 --- a/scripts/kwbimage.c +++ b/scripts/kwbimage.c @@ -967,7 +967,11 @@ static void *image_create_v1(struct image_cfg_element *image_cfg, cur += (binarye->binary.nargs + 1) * sizeof(unsigned int); - ret = fread(cur, s.st_size, 1, bin); + if (s.st_size) + ret = fread(cur, s.st_size, 1, bin); + else + ret = 1; + if (ret != 1) { fprintf(stderr, "Could not read binary image %s\n", diff --git a/scripts/kwboot.c b/scripts/kwboot.c index 4c6b19aa21..db177ceb5f 100644 --- a/scripts/kwboot.c +++ b/scripts/kwboot.c @@ -716,7 +716,7 @@ static void kwboot_usage(FILE *stream, char *progname) { fprintf(stream, - "Usage: %s [-d | -b <image> | -D <image> ] [ -t ] [-B <baud> ] <TTY>\n", + "Usage: %s [-d | -b <image> [ -n <naks> ] | -D <image> ] [ -t ] [-B <baud> ] <TTY>\n", progname); fprintf(stream, "\n"); fprintf(stream, @@ -724,6 +724,8 @@ kwboot_usage(FILE *stream, char *progname) fprintf(stream, " -D <image>: boot <image> without preamble (Dove)\n"); fprintf(stream, " -d: enter debug mode\n"); + fprintf(stream, + " -n <naks>: wait for <naks> NAK before uploading image (default: 1)\n"); fprintf(stream, "\n"); fprintf(stream, " -t: mini terminal\n"); fprintf(stream, "\n"); |