Commit f03e1666d6164da6f098dc1a2e539eced3e4461a
Committed by
Sam Ravnborg
1 parent
e711db3edf
Exists in
master
and in
20 other branches
kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
I'm currently using CROSS_COMPILE="ccache arm-linux-". With that the bash builtin command "type" searches for ccache and arm-linux-mkimage and so sets MKIMAGE="/path/to/ccache" as I don't have arm-linux-mkimage. Then the script dies with an error, that ccache doesn't support the argument -A. This patch adds some quoting such that it works again for me. Please note that this patch doesn't help you if you use ${CROSSCOMPILE}-mkimage and ccache as mkuboot.sh now searches for the command "ccache arm-linux-mkimage". Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Showing 1 changed file with 1 additions and 1 deletions Inline Diff
scripts/mkuboot.sh
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 0; |
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 |