Commit bc91c9f313309915f6ec767f56f78dcd0305b20f

Authored by Roland Stigge
Committed by Michal Marek
1 parent a3c888fcda

mkuboot.sh: Fail if mkimage is missing

on building an uImage, I get:

$ make uImage
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  Kernel: arch/arm/boot/Image is ready
  SHIPPED arch/arm/boot/compressed/lib1funcs.S
  AS      arch/arm/boot/compressed/lib1funcs.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
"mkimage" command not found - U-Boot images will not be built
  Image arch/arm/boot/uImage is ready
$

I.e. it says: "uImage is ready" even though the uImage file doesn't
exist because mkimage is missing.

I propose the attached patch.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Showing 1 changed file with 1 additions and 1 deletions Inline Diff

1 #!/bin/bash 1 #!/bin/bash
2 2
3 # 3 #
4 # Build U-Boot image when `mkimage' tool is available. 4 # Build U-Boot image when `mkimage' tool is available.
5 # 5 #
6 6
7 MKIMAGE=$(type -path "${CROSS_COMPILE}mkimage") 7 MKIMAGE=$(type -path "${CROSS_COMPILE}mkimage")
8 8
9 if [ -z "${MKIMAGE}" ]; then 9 if [ -z "${MKIMAGE}" ]; then
10 MKIMAGE=$(type -path mkimage) 10 MKIMAGE=$(type -path mkimage)
11 if [ -z "${MKIMAGE}" ]; then 11 if [ -z "${MKIMAGE}" ]; then
12 # Doesn't exist 12 # Doesn't exist
13 echo '"mkimage" command not found - U-Boot images will not be built' >&2 13 echo '"mkimage" command not found - U-Boot images will not be built' >&2
14 exit 0; 14 exit 1;
15 fi 15 fi
16 fi 16 fi
17 17
18 # Call "mkimage" to create U-Boot image 18 # Call "mkimage" to create U-Boot image
19 ${MKIMAGE} "$@" 19 ${MKIMAGE} "$@"
20 20