Re: [ptxdist] [PATCH / RFC] replace umkimage by u-boot sources

2012-01-22 Thread Michael Olbrich
On Sun, Jan 22, 2012 at 10:58:59AM +0100, Andreas Bießmann wrote:
> > I don't know fw_printenv. Please elaborate.
> 
> As Bernhard said it is a tool to access u-boot configuration from linux
> through /dev/mtdX, but some target specific configuration is required
> here. So would be some ToDo comment required or just leave this til
> someone stumble over the missing target configuration?

Is this a config file, or what? If yes, add an option for it, and use
install_alternative to install it. Then you can add your target specific
file to your BSP. Or always install and add one to generic/ in ptxdist, if
there are some sane default values.

> I know we will need the fw_printenv tool in some of our products in near
> future but at the moment I just want to have a submenu for U-Boot tools.
> A submenu with just one entry would be a bit empty ...
> 
> 
> 
> >> --- /dev/null
> >> +++ b/rules/host-u-boot-tools.in
> >> @@ -0,0 +1,8 @@
> >> +## SECTION=hosttools_noprompt
> >> +
> >> +config HOST_U_BOOT_TOOLS
> >> +  tristate
> >> +  default ALLYES
> >> +  help
> >> +the U-Boot tools contains the mkimage command which is used
> >> +to create boot images for the U-Boot bootloader.
> > 
> > Can we even see the help for a noprompt option?
> 
> I don't know ... it was like this before (in host-umkimage.in).

Remove the help. host-umkimage used to have a prompt and the help was not
removed with it.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH / RFC] replace umkimage by u-boot sources

2012-01-22 Thread Andreas Bießmann
Hi Michael,

On 21.01.12 19:22, Michael Olbrich wrote:
> On Sat, Jan 21, 2012 at 05:59:01PM +0100, Andreas Bießmann wrote:
>> This patch removes the forked mkimage u-boot tool and uses the mainline
>> u-boot code to build this tool.
>>
>> Signed-off-by: Andreas Bießmann 
>> ---
>> Treat this as an RFC, especially the fw_{save|print}env tool is subject to
>> discuss.
>>
>> Some additional questions:
>>  * how to handle the situation where only U_BOOT_TOOLS but no
>>U_BOOT_TOOLS_TOOL_xxx is choosen?
> 
> Keep it like it is. We have many other packages like that.

OK

> 
>>  * How to inject a user provided configuration for fw_printenv?
> 
> I don't know fw_printenv. Please elaborate.

As Bernhard said it is a tool to access u-boot configuration from linux
through /dev/mtdX, but some target specific configuration is required
here. So would be some ToDo comment required or just leave this til
someone stumble over the missing target configuration?

I know we will need the fw_printenv tool in some of our products in near
future but at the moment I just want to have a submenu for U-Boot tools.
A submenu with just one entry would be a bit empty ...



>> --- /dev/null
>> +++ b/rules/host-u-boot-tools.in
>> @@ -0,0 +1,8 @@
>> +## SECTION=hosttools_noprompt
>> +
>> +config HOST_U_BOOT_TOOLS
>> +tristate
>> +default ALLYES
>> +help
>> +  the U-Boot tools contains the mkimage command which is used
>> +  to create boot images for the U-Boot bootloader.
> 
> Can we even see the help for a noprompt option?

I don't know ... it was like this before (in host-umkimage.in).

regards

Andreas Bießmann

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH / RFC] replace umkimage by u-boot sources

2012-01-22 Thread Michael Olbrich
On Sat, Jan 21, 2012 at 09:08:06PM +0100, Bernhard Walle wrote:
> Am 21.01.12 19:22, schrieb Michael Olbrich:
> > I don't know fw_printenv. Please elaborate.
> 
> This is a tool to print the u-boot environment in Linux. fw_setenv can
> be used to change the u-boot environment from Linux.

Ok. Lets just install the tool here. If someone needs more, they can do it
in an extra package.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH / RFC] replace umkimage by u-boot sources

2012-01-21 Thread Bernhard Walle
Am 21.01.12 19:22, schrieb Michael Olbrich:
> I don't know fw_printenv. Please elaborate.

This is a tool to print the u-boot environment in Linux. fw_setenv can
be used to change the u-boot environment from Linux.


Regards,
Bernhard


-- 
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH / RFC] replace umkimage by u-boot sources

2012-01-21 Thread Michael Olbrich
On Sat, Jan 21, 2012 at 05:59:01PM +0100, Andreas Bießmann wrote:
> This patch removes the forked mkimage u-boot tool and uses the mainline
> u-boot code to build this tool.
> 
> Signed-off-by: Andreas Bießmann 
> ---
> Treat this as an RFC, especially the fw_{save|print}env tool is subject to
> discuss.
> 
> Some additional questions:
>  * how to handle the situation where only U_BOOT_TOOLS but no
>U_BOOT_TOOLS_TOOL_xxx is choosen?

Keep it like it is. We have many other packages like that.

>  * How to inject a user provided configuration for fw_printenv?

I don't know fw_printenv. Please elaborate.

>  platforms/hosttools.in |2 +-
>  platforms/image_uimage.in  |8 ++--
>  platforms/kernel.in|2 +-
>  rules/host-u-boot-tools.in |8 
>  rules/host-u-boot-tools.make   |   33 +++
>  rules/host-umkimage.in |8 
>  rules/host-umkimage.make   |   37 -
>  rules/templates/template-kernel-in |2 +-
>  rules/u-boot-tools.in  |   27 
>  rules/u-boot-tools.make|   78 
> 
>  rules/umkimage.in  |8 
>  rules/umkimage.make|   66 --
>  12 files changed, 153 insertions(+), 126 deletions(-)
>  create mode 100644 rules/host-u-boot-tools.in
>  create mode 100644 rules/host-u-boot-tools.make
>  delete mode 100644 rules/host-umkimage.in
>  delete mode 100644 rules/host-umkimage.make
>  create mode 100644 rules/u-boot-tools.in
>  create mode 100644 rules/u-boot-tools.make
>  delete mode 100644 rules/umkimage.in
>  delete mode 100644 rules/umkimage.make
> 
> diff --git a/platforms/hosttools.in b/platforms/hosttools.in
> index 155b30b..e9ce0fc 100644
> --- a/platforms/hosttools.in
> +++ b/platforms/hosttools.in
> @@ -19,7 +19,7 @@ source "rules/host-mtd-utils.in"
>  source "rules/host-mtools.in"
>  source "rules/host-openssl.in"
>  source "rules/host-squashfs-tools.in"
> -source "rules/host-umkimage.in"
> +source "rules/host-u-boot-tools.in"
>  source "rules/host-util-linux-ng.in"
>  source "rules/host-xl-tools.in"
>  source "rules/host-xz.in"
> diff --git a/platforms/image_uimage.in b/platforms/image_uimage.in
> index 62119c4..719793d 100644
> --- a/platforms/image_uimage.in
> +++ b/platforms/image_uimage.in
> @@ -3,7 +3,7 @@
>  menuconfig IMAGE_UIMAGE
>   bool
>   prompt "Generate images/uRamdisk  "
> - select HOST_UMKIMAGE
> + select HOST_U_BOOT_TOOLS
>   select IMAGE_EXT2
>   select IMAGE_EXT2_GZIP
>   help
> @@ -21,16 +21,16 @@ config IMAGE_UIMAGE_NAME
>  config IMAGE_UIMAGE_EXTRA_ARGS
>   string
>   default ""
> - prompt "extra arguments passed to umkimage"
> + prompt "extra arguments passed to mkimage"
>   help
> -   If needed you can add extra arguments for umkimage here
> +   If needed you can add extra arguments for mkimage here
> (e.g. -a 0xaa0 -e 0xaa0 )
>  
>  # TODO: See comment in rules/post/images.make for this topic
>  #config IMAGE_UIMAGE_MULTI
>  #bool
>  #prompt "Generate a multi image images/muimage"
> -#select HOST_UMKIMAGE
> +#select HOST_U_BOOT_TOOLS
>  #select KERNEL
>  #select IMAGE_CPIO
>  #help
> diff --git a/platforms/kernel.in b/platforms/kernel.in
> index b601284..01b31d3 100644
> --- a/platforms/kernel.in
> +++ b/platforms/kernel.in
> @@ -2,7 +2,7 @@ menuconfig KERNEL
>   bool
>   default y
>   select IMAGE_KERNEL
> - select HOST_UMKIMAGEif KERNEL_IMAGE_U
> + select HOST_U_BOOT_TOOLSif KERNEL_IMAGE_U
>   select HOST_XZ  if KERNEL_XZ
>   select HOST_LZOPif KERNEL_LZOP
>   select CROSS_MODULE_INIT_TOOLS  if KERNEL_MODULES
> diff --git a/rules/host-u-boot-tools.in b/rules/host-u-boot-tools.in
> new file mode 100644
> index 000..b653430
> --- /dev/null
> +++ b/rules/host-u-boot-tools.in
> @@ -0,0 +1,8 @@
> +## SECTION=hosttools_noprompt
> +
> +config HOST_U_BOOT_TOOLS
> + tristate
> + default ALLYES
> + help
> +   the U-Boot tools contains the mkimage command which is used
> +   to create boot images for the U-Boot bootloader.

Can we even see the help for a noprompt option?

> diff --git a/rules/host-u-boot-tools.make b/rules/host-u-boot-tools.make
> new file mode 100644
> index 000..ec804c3
> --- /dev/null
> +++ b/rules/host-u-boot-tools.make
> @@ -0,0 +1,33 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2012 by Andreas Bießmann 
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +HOST_PACKAGES-$(PTXCONF_HOST_U_BOOT_TOOLS) += host-u-boot-tools
> +
> +
> +# 
> 
> +# Prepa

[ptxdist] [PATCH / RFC] replace umkimage by u-boot sources

2012-01-21 Thread Andreas Bießmann
This patch removes the forked mkimage u-boot tool and uses the mainline
u-boot code to build this tool.

Signed-off-by: Andreas Bießmann 
---
Treat this as an RFC, especially the fw_{save|print}env tool is subject to
discuss.

Some additional questions:
 * how to handle the situation where only U_BOOT_TOOLS but no
   U_BOOT_TOOLS_TOOL_xxx is choosen?
 * How to inject a user provided configuration for fw_printenv?

 platforms/hosttools.in |2 +-
 platforms/image_uimage.in  |8 ++--
 platforms/kernel.in|2 +-
 rules/host-u-boot-tools.in |8 
 rules/host-u-boot-tools.make   |   33 +++
 rules/host-umkimage.in |8 
 rules/host-umkimage.make   |   37 -
 rules/templates/template-kernel-in |2 +-
 rules/u-boot-tools.in  |   27 
 rules/u-boot-tools.make|   78 
 rules/umkimage.in  |8 
 rules/umkimage.make|   66 --
 12 files changed, 153 insertions(+), 126 deletions(-)
 create mode 100644 rules/host-u-boot-tools.in
 create mode 100644 rules/host-u-boot-tools.make
 delete mode 100644 rules/host-umkimage.in
 delete mode 100644 rules/host-umkimage.make
 create mode 100644 rules/u-boot-tools.in
 create mode 100644 rules/u-boot-tools.make
 delete mode 100644 rules/umkimage.in
 delete mode 100644 rules/umkimage.make

diff --git a/platforms/hosttools.in b/platforms/hosttools.in
index 155b30b..e9ce0fc 100644
--- a/platforms/hosttools.in
+++ b/platforms/hosttools.in
@@ -19,7 +19,7 @@ source "rules/host-mtd-utils.in"
 source "rules/host-mtools.in"
 source "rules/host-openssl.in"
 source "rules/host-squashfs-tools.in"
-source "rules/host-umkimage.in"
+source "rules/host-u-boot-tools.in"
 source "rules/host-util-linux-ng.in"
 source "rules/host-xl-tools.in"
 source "rules/host-xz.in"
diff --git a/platforms/image_uimage.in b/platforms/image_uimage.in
index 62119c4..719793d 100644
--- a/platforms/image_uimage.in
+++ b/platforms/image_uimage.in
@@ -3,7 +3,7 @@
 menuconfig IMAGE_UIMAGE
bool
prompt "Generate images/uRamdisk  "
-   select HOST_UMKIMAGE
+   select HOST_U_BOOT_TOOLS
select IMAGE_EXT2
select IMAGE_EXT2_GZIP
help
@@ -21,16 +21,16 @@ config IMAGE_UIMAGE_NAME
 config IMAGE_UIMAGE_EXTRA_ARGS
string
default ""
-   prompt "extra arguments passed to umkimage"
+   prompt "extra arguments passed to mkimage"
help
- If needed you can add extra arguments for umkimage here
+ If needed you can add extra arguments for mkimage here
  (e.g. -a 0xaa0 -e 0xaa0 )
 
 # TODO: See comment in rules/post/images.make for this topic
 #config IMAGE_UIMAGE_MULTI
 #  bool
 #  prompt "Generate a multi image images/muimage"
-#  select HOST_UMKIMAGE
+#  select HOST_U_BOOT_TOOLS
 #  select KERNEL
 #  select IMAGE_CPIO
 #  help
diff --git a/platforms/kernel.in b/platforms/kernel.in
index b601284..01b31d3 100644
--- a/platforms/kernel.in
+++ b/platforms/kernel.in
@@ -2,7 +2,7 @@ menuconfig KERNEL
bool
default y
select IMAGE_KERNEL
-   select HOST_UMKIMAGEif KERNEL_IMAGE_U
+   select HOST_U_BOOT_TOOLSif KERNEL_IMAGE_U
select HOST_XZ  if KERNEL_XZ
select HOST_LZOPif KERNEL_LZOP
select CROSS_MODULE_INIT_TOOLS  if KERNEL_MODULES
diff --git a/rules/host-u-boot-tools.in b/rules/host-u-boot-tools.in
new file mode 100644
index 000..b653430
--- /dev/null
+++ b/rules/host-u-boot-tools.in
@@ -0,0 +1,8 @@
+## SECTION=hosttools_noprompt
+
+config HOST_U_BOOT_TOOLS
+   tristate
+   default ALLYES
+   help
+ the U-Boot tools contains the mkimage command which is used
+ to create boot images for the U-Boot bootloader.
diff --git a/rules/host-u-boot-tools.make b/rules/host-u-boot-tools.make
new file mode 100644
index 000..ec804c3
--- /dev/null
+++ b/rules/host-u-boot-tools.make
@@ -0,0 +1,33 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2012 by Andreas Bießmann 
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+HOST_PACKAGES-$(PTXCONF_HOST_U_BOOT_TOOLS) += host-u-boot-tools
+
+
+# 
+# Prepare
+# 
+
+HOST_U_BOOT_TOOLS_CONF_TOOL:= NO
+HOST_U_BOOT_TOOLS_MAKE_OPT := tools
+
+# 
+# Install
+# 
+
+$(STATEDIR)/host-u-boot-tools.install:
+   @$(call targetinfo)
+   install $