LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: + search-a-little-harder-for-mkimage.patch added to -mm tree
       [not found] <200702080607.l1867c0D006861@shell0.pdx.osdl.net>
@ 2007-02-08 14:11 ` Oleg Verych
  2007-02-08 14:28   ` Mike Frysinger
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Verych @ 2007-02-08 14:11 UTC (permalink / raw)
  To: akpm; +Cc: vapier.adi, olecom, sam, linux-kernel

> From: akpm@linux-foundation.org
> 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@gmail.com>
>
> 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@gentoo.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Oleg Verych <olecom@flower.upol.cz>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
>  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@gmail.com are
>
> search-a-little-harder-for-mkimage.patch
> scrub-non-__glibc__-checks-in-linux-socketh-and-linux-stath.patch
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: + search-a-little-harder-for-mkimage.patch added to -mm tree
  2007-02-08 14:11 ` + search-a-little-harder-for-mkimage.patch added to -mm tree Oleg Verych
@ 2007-02-08 14:28   ` Mike Frysinger
  2007-02-08 20:25     ` Oleg Verych
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2007-02-08 14:28 UTC (permalink / raw)
  To: Oleg Verych; +Cc: akpm, sam, linux-kernel

On 2/8/07, Oleg Verych <olecom@flower.upol.cz> wrote:
> proposition is to substitute:
>      "$(CONFIG_SHELL) $(MKIMAGE)"
> with
>      "mkimage"

this isnt a one-to-one change ... let's look at the typical
mkimage-missing scenario ...

with mkuboot.sh you'd get output like:
...
  UIMAGE  arch/blackfin/boot/vmImage
"mkimage" command not found - U-Boot images will not be built
  Building modules, stage 2.
...

with mkimage you'd get output like:
...
  UIMAGE  arch/blackfin/boot/vmImage
/bin/sh: mkimage: command not found
make[1]: *** [arch/blackfin/boot/vmImage] Error 127
make: *** [vmImage] Error 2

so while you could change all the Makefile's to insert - to ignore
*all* failures, without the script, you loose the ability to only
ignore "binary missing" errors
-mike

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: + search-a-little-harder-for-mkimage.patch added to -mm tree
  2007-02-08 14:28   ` Mike Frysinger
@ 2007-02-08 20:25     ` Oleg Verych
  2007-02-08 20:35       ` Mike Frysinger
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Verych @ 2007-02-08 20:25 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: akpm, sam, linux-kernel

On Thu, Feb 08, 2007 at 09:28:03AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <olecom@flower.upol.cz> wrote:
> >proposition is to substitute:
> >     "$(CONFIG_SHELL) $(MKIMAGE)"
> >with
> >     "mkimage"
> 
> this isnt a one-to-one change ... let's look at the typical
> mkimage-missing scenario ...

You are interested in presents of `mkimage', but yet we discussing its
missing, or "Error -> Don't care" behavior.

uImage, as i can compare with other *final* targets, like bzImage on PC,
must be made in case of `make uImage', or if default rule depends on
it. Thus, if it fails it, must be error. It doesn't matter what cause
it, and what message was printed:

> with mkuboot.sh you'd get output like:
> ...
>  UIMAGE  arch/blackfin/boot/vmImage
> "mkimage" command not found - U-Boot images will not be built
>  Building modules, stage 2.
> ...
> 
> with mkimage you'd get output like:
> ...
>  UIMAGE  arch/blackfin/boot/vmImage
> /bin/sh: mkimage: command not found
> make[1]: *** [arch/blackfin/boot/vmImage] Error 127
> make: *** [vmImage] Error 2

In this example `uImage' is required by final target, e.g.

,-*-
|all: prepare uImage modules_install
|	while things; do them; done
`-*-

> so while you could change all the Makefile's to insert - to ignore
> *all* failures, without the script, you loose the ability to only
> ignore "binary missing" errors

So, are we ignoring our primary (default) goal?

OK, as you wish. As for me it's a plain bloat, but i have neither one
for-embedded setup to propose non-bloating change for _you_ (:.

> -mike
____

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: + search-a-little-harder-for-mkimage.patch added to -mm tree
  2007-02-08 20:25     ` Oleg Verych
@ 2007-02-08 20:35       ` Mike Frysinger
  2007-02-08 21:40         ` - " Oleg Verych
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2007-02-08 20:35 UTC (permalink / raw)
  To: Oleg Verych; +Cc: akpm, sam, linux-kernel

On 2/8/07, Oleg Verych <olecom@flower.upol.cz> wrote:
> On Thu, Feb 08, 2007 at 09:28:03AM -0500, Mike Frysinger wrote:
> > On 2/8/07, Oleg Verych <olecom@flower.upol.cz> wrote:
> > >proposition is to substitute:
> > >     "$(CONFIG_SHELL) $(MKIMAGE)"
> > >with
> > >     "mkimage"
> >
> > this isnt a one-to-one change ... let's look at the typical
> > mkimage-missing scenario ...
>
> You are interested in presents of `mkimage', but yet we discussing its
> missing, or "Error -> Don't care" behavior.

i'm interested in having the system work for the Blackfin port and
that's it.  if people want to redefine the current standard of how
u-boot images are generated, then go for it and get the approval of
all the existing arches.

there's a difference between NACKing my changes because the patch
breaks things versus because you think the whole system should be
taking some other form.

so if you dont like the mkuboot.sh script, fine, have at it with
rewriting the system ... otherwise the patch i proposed should
continue on for inclusion.
-mike

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: - search-a-little-harder-for-mkimage.patch added to -mm tree
  2007-02-08 20:35       ` Mike Frysinger
@ 2007-02-08 21:40         ` Oleg Verych
  0 siblings, 0 replies; 5+ messages in thread
From: Oleg Verych @ 2007-02-08 21:40 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: akpm, sam, linux-kernel

On Thu, Feb 08, 2007 at 03:35:34PM -0500, Mike Frysinger wrote:
[]
> there's a difference between NACKing my changes because the patch
> breaks things versus because you think the whole system should be
> taking some other form.

After all, i was giving negative acknowledgement to only-good-branch
orientation of the patch, and ease of having current script working by
setting up *your* environment. Try to Cc one of maintainers of archs,
where this script is used, to have positive ack.

> so if you dont like the mkuboot.sh script, fine, have at it with
> rewriting the system ... otherwise the patch i proposed should
> continue on for inclusion.

Goodbye.
____

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-08 21:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200702080607.l1867c0D006861@shell0.pdx.osdl.net>
2007-02-08 14:11 ` + search-a-little-harder-for-mkimage.patch added to -mm tree Oleg Verych
2007-02-08 14:28   ` Mike Frysinger
2007-02-08 20:25     ` Oleg Verych
2007-02-08 20:35       ` Mike Frysinger
2007-02-08 21:40         ` - " Oleg Verych

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).