Re: + search-a-little-harder-for-mkimage.patch added to -mm tree

From: Oleg Verych
Date: Thu Feb 08 2007 - 09:03:22 EST


> From: akpm@xxxxxxxxxxxxxxxxxxxx
> Newsgroups: gmane.linux.kernel.commits.mm
> Subject: + search-a-little-harder-for-mkimage.patch added to -mm tree
> Date: Wed, 07 Feb 2007 22:07:38 -0800
[]
> ------------------------------------------------------
> Subject: search a little harder for mkimage
> From: "Mike Frysinger" <vapier.adi@xxxxxxxxx>
>
> Check to see if `${CROSS_COMPILE}mkimage` exists and if not, fall back to
> the standard `mkimage`

Understanding of what mkuboot.sh is doing leads to:

-- ordinary addition of PATH to (possible) executable, named mkimage;
-- in case of any other problem to execute it: permissions, aliasing due to
wrong $PATH (and setting it up isn't handle either), script will print
*wrong* message, in case of CROSS_COMPILE filename;
-- minor overkill due to double wrapping of all of this;

`make' itself executes programs by search $PATH, prints *right*
messages in case of errors.

Unless author of the patch or script itself have really strong position to
not remove it, please.

There are currently four users of this, all like this:

MKIMAGE := $(srctree)/scripts/mkuboot.sh
[...]
quiet_cmd_uimage = UIMAGE $@
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
-C gzip -a $(KERNEL_LOAD) -e $(KERNEL_LOAD) \
-n'Linux-$(KERNELRELEASE)' -d $< $@

proposition is to substitute:
"$(CONFIG_SHELL) $(MKIMAGE)"
with
"mkimage"

and optional, for particular Makefile, "$(CROSS_COMPILE)" prefix.
Remove mkuboot.sh.

> The Blackfin toolchain includes mkimage, but we dont want to namespace
> collide with any of the user's system setup, so we prefix it with our
> toolchain name.
>
> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
> Cc: Sam Ravnborg <sam@xxxxxxxxxxxx>
> Cc: Oleg Verych <olecom@xxxxxxxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> ---
>
> scripts/mkuboot.sh | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff -puN scripts/mkuboot.sh~search-a-little-harder-for-mkimage scripts/mkuboot.sh
> --- a/scripts/mkuboot.sh~search-a-little-harder-for-mkimage
> +++ a/scripts/mkuboot.sh
> @@ -4,12 +4,15 @@
> # Build U-Boot image when `mkimage' tool is available.
> #
>
> -MKIMAGE=$(type -path mkimage)
> +MKIMAGE=$(type -path ${CROSS_COMPILE}mkimage)
>
> if [ -z "${MKIMAGE}" ]; then
> - # Doesn't exist
> - echo '"mkimage" command not found - U-Boot images will not be built' >&2
> - exit 0;
> + MKIMAGE=$(type -path mkimage)
> + if [ -z "${MKIMAGE}" ]; then
> + # Doesn't exist
> + echo '"mkimage" command not found - U-Boot images will not be built' >&2
> + exit 0;
> + fi
> fi
>
> # Call "mkimage" to create U-Boot image
> _
>
> Patches currently in -mm which might be from vapier.adi@xxxxxxxxx are
>
> search-a-little-harder-for-mkimage.patch
> scrub-non-__glibc__-checks-in-linux-socketh-and-linux-stath.patch
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/