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

2007-02-08 Thread Oleg Verych
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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2007-02-08 Thread Mike Frysinger

On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:

On Thu, Feb 08, 2007 at 09:28:03AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2007-02-08 Thread Oleg Verych
On Thu, Feb 08, 2007 at 09:28:03AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-08 Thread Oleg Verych
On Thu, Feb 08, 2007 at 05:38:28PM +0100, Roman Zippel wrote:
> Hi,
> 
> On Thu, 8 Feb 2007, Oleg Verych wrote:
> 
> > BTW, Debian shell policy is to be bashizms-clear. Purpose -- to have
> > compatibility with any `sh'. Shall we?
> 
> Wrong.
> 
> http://www.debian.org/doc/debian-policy/ch-files.html#s-scripts
"""
   You may wish to restrict your script to POSIX features when possible
   so that it may use /bin/sh as its interpreter. If your script works
   with dash (originally called ash), it's probably POSIX compliant, but
   if you are in doubt, use /bin/bash.
"""
I think, it's OK to start with ;)  

> bye, Roman


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-08 Thread Roman Zippel
Hi,

On Thu, 8 Feb 2007, Oleg Verych wrote:

> BTW, Debian shell policy is to be bashizms-clear. Purpose -- to have
> compatibility with any `sh'. Shall we?

Wrong.

http://www.debian.org/doc/debian-policy/ch-files.html#s-scripts

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2007-02-08 Thread Mike Frysinger

On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2007-02-08 Thread Oleg Verych
> From: [EMAIL PROTECTED]
> 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" <[EMAIL PROTECTED]>
>
> 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 <[EMAIL PROTECTED]>
> Cc: Sam Ravnborg <[EMAIL PROTECTED]>
> Cc: Oleg Verych <[EMAIL PROTECTED]>
> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
> ---
>
>  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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-08 Thread Jan Engelhardt

On Feb 8 2007 07:43, Oleg Verych wrote:
>> >>
>> >> > If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
>> >> > with "dash" (very good `sh' equivalents) will fail.
>> >>
>> >> Does the kernel presently build with that shell?
>> >
>> >build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
>> >of course use bash, example is gen_initramfs_list.sh.
>> 
>
>Heh, did i say POSIX? I said bloated shell, from man bash:
>
>BUGS
>   It's too big and too slow.

Like it or lump it. Improve it, or write your own bash-compliant sh. :)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-08 Thread Jan Engelhardt

On Feb 8 2007 07:43, Oleg Verych wrote:
 
   If that matter, `type -path' is bashizm (BloAted SHell), and blackbox
   with dash (very good `sh' equivalents) will fail.
 
  Does the kernel presently build with that shell?
 
 build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
 of course use bash, example is gen_initramfs_list.sh.
 

Heh, did i say POSIX? I said bloated shell, from man bash:

BUGS
   It's too big and too slow.

Like it or lump it. Improve it, or write your own bash-compliant sh. :)
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2007-02-08 Thread Oleg Verych
 From: [EMAIL PROTECTED]
 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 [EMAIL PROTECTED]

 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 [EMAIL PROTECTED]
 Cc: Sam Ravnborg [EMAIL PROTECTED]
 Cc: Oleg Verych [EMAIL PROTECTED]
 Signed-off-by: Andrew Morton [EMAIL PROTECTED]
 ---

  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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2007-02-08 Thread Mike Frysinger

On 2/8/07, Oleg Verych [EMAIL PROTECTED] 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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-08 Thread Roman Zippel
Hi,

On Thu, 8 Feb 2007, Oleg Verych wrote:

 BTW, Debian shell policy is to be bashizms-clear. Purpose -- to have
 compatibility with any `sh'. Shall we?

Wrong.

http://www.debian.org/doc/debian-policy/ch-files.html#s-scripts

bye, Roman
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-08 Thread Oleg Verych
On Thu, Feb 08, 2007 at 05:38:28PM +0100, Roman Zippel wrote:
 Hi,
 
 On Thu, 8 Feb 2007, Oleg Verych wrote:
 
  BTW, Debian shell policy is to be bashizms-clear. Purpose -- to have
  compatibility with any `sh'. Shall we?
 
 Wrong.
 
 http://www.debian.org/doc/debian-policy/ch-files.html#s-scripts

   You may wish to restrict your script to POSIX features when possible
   so that it may use /bin/sh as its interpreter. If your script works
   with dash (originally called ash), it's probably POSIX compliant, but
   if you are in doubt, use /bin/bash.

I think, it's OK to start with ;)  

 bye, Roman


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2007-02-08 Thread Oleg Verych
On Thu, Feb 08, 2007 at 09:28:03AM -0500, Mike Frysinger wrote:
 On 2/8/07, Oleg Verych [EMAIL PROTECTED] 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

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2007-02-08 Thread Mike Frysinger

On 2/8/07, Oleg Verych [EMAIL PROTECTED] wrote:

On Thu, Feb 08, 2007 at 09:28:03AM -0500, Mike Frysinger wrote:
 On 2/8/07, Oleg Verych [EMAIL PROTECTED] 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
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


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

2007-02-08 Thread Oleg Verych
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.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 02:40:28AM -0500, Mike Frysinger wrote:
[] 
> by this argument, why does mkuboot.sh exist at all then ?  let's
> simply delete mkuboot.sh and change all arch Makefile's like so:
> -$(CONFIG_SHELL) $(MKIMAGE) ...
> +-mkimage ...

Yes (with TOOLCHAIN prefix).

> i of course prefer the existing solution: call the mkuboot.sh script
> which checks for a few variations of the `mkimage` binary and if it
> does not exist, output a friendly message

so as `make' will, but better than patched "friendly message", which
doesn't reflect: neither change to toolchain prefix, nor possible
permission problems, or what ever it can be, preventing actual running
the command ;)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:

On Thu, Feb 08, 2007 at 12:56:17AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:
> >> Check to see if `${CROSS_COMPILE}mkimage` exists and if not, fall back to
> >> the standard `mkimage`
> >
> >Why this can't be done by
> >
> >  PATH=$CROSS_COMPILE:$PATH
> >
> >in your environment?
>
> because it wouldnt matter ?  the tool is called
> "$CROSS_COMPILE-mkimage", it isnt $CROSS_COMPILE_PATH/mkimage

Well, i mean search for your `mkimage'.

Let's see how all this used in Makefiles (avr32, ppc, sh are same)

../arch/arm/boot/Makefile:

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

type, which with bash or whatever, doesn't matter. All they need *your*
toolchain in $PATH, why not just to put "$CROSS_COMPILE-mkimage" instead
of $(CONFIG_SHELL) $(MKIMAGE) here? mkuboot.sh just searches $PATH for
mkimage and run it. Double overkill, no?


by this argument, why does mkuboot.sh exist at all then ?  let's
simply delete mkuboot.sh and change all arch Makefile's like so:
-$(CONFIG_SHELL) $(MKIMAGE) ...
+-mkimage ...

i of course prefer the existing solution: call the mkuboot.sh script
which checks for a few variations of the `mkimage` binary and if it
does not exist, output a friendly message
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 12:56:17AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:
> >> Check to see if `${CROSS_COMPILE}mkimage` exists and if not, fall back to
> >> the standard `mkimage`
> >
> >Why this can't be done by
> >
> >  PATH=$CROSS_COMPILE:$PATH
> >
> >in your environment?
> 
> because it wouldnt matter ?  the tool is called
> "$CROSS_COMPILE-mkimage", it isnt $CROSS_COMPILE_PATH/mkimage

Well, i mean search for your `mkimage'.

Let's see how all this used in Makefiles (avr32, ppc, sh are same)

../arch/arm/boot/Makefile:

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

type, which with bash or whatever, doesn't matter. All they need *your*
toolchain in $PATH, why not just to put "$CROSS_COMPILE-mkimage" instead
of $(CONFIG_SHELL) $(MKIMAGE) here? mkuboot.sh just searches $PATH for
mkimage and run it. Double overkill, no?

> >> 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.
> >
> >If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
> >with "dash" (very good `sh' equivalents) will fail. I would recomend to
> >use "which" command (btw, Debian has `sh' version of it), if you
> >concerned about size and performance.
> >
> >Nack + proposition to move from `bash' to `sh'.
> 
> the script already uses "#!/bin/bash" and the patch doesnt change any
> of the existing conventions ... so if you want to rewrite the existing
> code to be POSIX compliant, then do so so i can add back in support
> for $CROSS_COMPILE-mkimage

To run faster, but let me stop here.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:

On Thu, Feb 08, 2007 at 12:58:26AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:
> >Trivial shell scripts, especially for embedded archs (Blackfin is
> >one, IIRC), may be easily converted.
>
> yes, but Blackfin is no-mmu so converting the script to use POSIX
> shell is pointless to us since no-mmu is not a self-hosting
> environment

Heh, did i say POSIX?


/bin/sh is the POSIX shell ... if you want to switch off of /bin/bash,
then the only other sane option is /bin/sh which means rewriting the
code to be POSIX compliant


I said bloated shell, from man bash:

BUGS
   It's too big and too slow.


we get it, you dont like bash, why do you feel the need to keep making
these statements ?
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 12:58:26AM -0500, Mike Frysinger wrote:
> On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:
> >On Wed, Feb 07, 2007 at 09:19:21PM -0800, Andrew Morton wrote:
> >> On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych <[EMAIL PROTECTED]> 
> >wrote:
> >>
> >> > If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
> >> > with "dash" (very good `sh' equivalents) will fail.
> >>
> >> Does the kernel presently build with that shell?
> >
> >build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
> >of course use bash, example is gen_initramfs_list.sh.
> 
> which is what mkuboot.sh is using now
> 
> >Trivial shell scripts, especially for embedded archs (Blackfin is
> >one, IIRC), may be easily converted.
> 
> yes, but Blackfin is no-mmu so converting the script to use POSIX
> shell is pointless to us since no-mmu is not a self-hosting
> environment

Heh, did i say POSIX? I said bloated shell, from man bash:

BUGS
   It's too big and too slow.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych <[EMAIL PROTECTED]> wrote:

On Wed, Feb 07, 2007 at 09:19:21PM -0800, Andrew Morton wrote:
> On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych <[EMAIL PROTECTED]> wrote:
>
> > If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
> > with "dash" (very good `sh' equivalents) will fail.
>
> Does the kernel presently build with that shell?

build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
of course use bash, example is gen_initramfs_list.sh.


which is what mkuboot.sh is using now


Trivial shell scripts, especially for embedded archs (Blackfin is
one, IIRC), may be easily converted.


yes, but Blackfin is no-mmu so converting the script to use POSIX
shell is pointless to us since no-mmu is not a self-hosting
environment
-mike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Wed, Feb 07, 2007 at 09:19:21PM -0800, Andrew Morton wrote:
> On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych <[EMAIL PROTECTED]> wrote:
> 
> > If that matter, `type -path' is bashizm (BloAted SHell), and "blackbox"
> > with "dash" (very good `sh' equivalents) will fail.
> 
> Does the kernel presently build with that shell?

build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
of course use bash, example is gen_initramfs_list.sh.

Trivial shell scripts, especially for embedded archs (Blackfin is
one, IIRC), may be easily converted.

BTW, Debian shell policy is to be bashizms-clear. Purpose -- to have
compatibility with any `sh'. Shall we?


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Wed, Feb 07, 2007 at 09:19:21PM -0800, Andrew Morton wrote:
 On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych [EMAIL PROTECTED] wrote:
 
  If that matter, `type -path' is bashizm (BloAted SHell), and blackbox
  with dash (very good `sh' equivalents) will fail.
 
 Does the kernel presently build with that shell?

build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
of course use bash, example is gen_initramfs_list.sh.

Trivial shell scripts, especially for embedded archs (Blackfin is
one, IIRC), may be easily converted.

BTW, Debian shell policy is to be bashizms-clear. Purpose -- to have
compatibility with any `sh'. Shall we?


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych [EMAIL PROTECTED] wrote:

On Wed, Feb 07, 2007 at 09:19:21PM -0800, Andrew Morton wrote:
 On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych [EMAIL PROTECTED] wrote:

  If that matter, `type -path' is bashizm (BloAted SHell), and blackbox
  with dash (very good `sh' equivalents) will fail.

 Does the kernel presently build with that shell?

build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
of course use bash, example is gen_initramfs_list.sh.


which is what mkuboot.sh is using now


Trivial shell scripts, especially for embedded archs (Blackfin is
one, IIRC), may be easily converted.


yes, but Blackfin is no-mmu so converting the script to use POSIX
shell is pointless to us since no-mmu is not a self-hosting
environment
-mike
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 12:58:26AM -0500, Mike Frysinger wrote:
 On 2/8/07, Oleg Verych [EMAIL PROTECTED] wrote:
 On Wed, Feb 07, 2007 at 09:19:21PM -0800, Andrew Morton wrote:
  On Thu, 8 Feb 2007 06:24:40 +0100 Oleg Verych [EMAIL PROTECTED] 
 wrote:
 
   If that matter, `type -path' is bashizm (BloAted SHell), and blackbox
   with dash (very good `sh' equivalents) will fail.
 
  Does the kernel presently build with that shell?
 
 build - yes, with dash being `$(shell)'. All scripts with `#!/bin/bash'
 of course use bash, example is gen_initramfs_list.sh.
 
 which is what mkuboot.sh is using now
 
 Trivial shell scripts, especially for embedded archs (Blackfin is
 one, IIRC), may be easily converted.
 
 yes, but Blackfin is no-mmu so converting the script to use POSIX
 shell is pointless to us since no-mmu is not a self-hosting
 environment

Heh, did i say POSIX? I said bloated shell, from man bash:

BUGS
   It's too big and too slow.



-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: + search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych [EMAIL PROTECTED] wrote:

On Thu, Feb 08, 2007 at 12:58:26AM -0500, Mike Frysinger wrote:
 On 2/8/07, Oleg Verych [EMAIL PROTECTED] wrote:
 Trivial shell scripts, especially for embedded archs (Blackfin is
 one, IIRC), may be easily converted.

 yes, but Blackfin is no-mmu so converting the script to use POSIX
 shell is pointless to us since no-mmu is not a self-hosting
 environment

Heh, did i say POSIX?


/bin/sh is the POSIX shell ... if you want to switch off of /bin/bash,
then the only other sane option is /bin/sh which means rewriting the
code to be POSIX compliant


I said bloated shell, from man bash:

BUGS
   It's too big and too slow.


we get it, you dont like bash, why do you feel the need to keep making
these statements ?
-mike
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 12:56:17AM -0500, Mike Frysinger wrote:
 On 2/8/07, Oleg Verych [EMAIL PROTECTED] wrote:
  Check to see if `${CROSS_COMPILE}mkimage` exists and if not, fall back to
  the standard `mkimage`
 
 Why this can't be done by
 
   PATH=$CROSS_COMPILE:$PATH
 
 in your environment?
 
 because it wouldnt matter ?  the tool is called
 $CROSS_COMPILE-mkimage, it isnt $CROSS_COMPILE_PATH/mkimage

Well, i mean search for your `mkimage'.

Let's see how all this used in Makefiles (avr32, ppc, sh are same)

../arch/arm/boot/Makefile:

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

type, which with bash or whatever, doesn't matter. All they need *your*
toolchain in $PATH, why not just to put $CROSS_COMPILE-mkimage instead
of $(CONFIG_SHELL) $(MKIMAGE) here? mkuboot.sh just searches $PATH for
mkimage and run it. Double overkill, no?

  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.
 
 If that matter, `type -path' is bashizm (BloAted SHell), and blackbox
 with dash (very good `sh' equivalents) will fail. I would recomend to
 use which command (btw, Debian has `sh' version of it), if you
 concerned about size and performance.
 
 Nack + proposition to move from `bash' to `sh'.
 
 the script already uses #!/bin/bash and the patch doesnt change any
 of the existing conventions ... so if you want to rewrite the existing
 code to be POSIX compliant, then do so so i can add back in support
 for $CROSS_COMPILE-mkimage

To run faster, but let me stop here.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Mike Frysinger

On 2/8/07, Oleg Verych [EMAIL PROTECTED] wrote:

On Thu, Feb 08, 2007 at 12:56:17AM -0500, Mike Frysinger wrote:
 On 2/8/07, Oleg Verych [EMAIL PROTECTED] wrote:
  Check to see if `${CROSS_COMPILE}mkimage` exists and if not, fall back to
  the standard `mkimage`
 
 Why this can't be done by
 
   PATH=$CROSS_COMPILE:$PATH
 
 in your environment?

 because it wouldnt matter ?  the tool is called
 $CROSS_COMPILE-mkimage, it isnt $CROSS_COMPILE_PATH/mkimage

Well, i mean search for your `mkimage'.

Let's see how all this used in Makefiles (avr32, ppc, sh are same)

../arch/arm/boot/Makefile:

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

type, which with bash or whatever, doesn't matter. All they need *your*
toolchain in $PATH, why not just to put $CROSS_COMPILE-mkimage instead
of $(CONFIG_SHELL) $(MKIMAGE) here? mkuboot.sh just searches $PATH for
mkimage and run it. Double overkill, no?


by this argument, why does mkuboot.sh exist at all then ?  let's
simply delete mkuboot.sh and change all arch Makefile's like so:
-$(CONFIG_SHELL) $(MKIMAGE) ...
+-mkimage ...

i of course prefer the existing solution: call the mkuboot.sh script
which checks for a few variations of the `mkimage` binary and if it
does not exist, output a friendly message
-mike
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



Re: search-a-little-harder-for-mkimage.patch

2007-02-07 Thread Oleg Verych
On Thu, Feb 08, 2007 at 02:40:28AM -0500, Mike Frysinger wrote:
[] 
 by this argument, why does mkuboot.sh exist at all then ?  let's
 simply delete mkuboot.sh and change all arch Makefile's like so:
 -$(CONFIG_SHELL) $(MKIMAGE) ...
 +-mkimage ...

Yes (with TOOLCHAIN prefix).

 i of course prefer the existing solution: call the mkuboot.sh script
 which checks for a few variations of the `mkimage` binary and if it
 does not exist, output a friendly message

so as `make' will, but better than patched friendly message, which
doesn't reflect: neither change to toolchain prefix, nor possible
permission problems, or what ever it can be, preventing actual running
the command ;)


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/