public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] fix building of tools/env programs
@ 2005-07-15  6:10 Murray.Jensen at csiro.au
  2006-03-12 23:17 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Murray.Jensen at csiro.au @ 2005-07-15  6:10 UTC (permalink / raw)
  To: u-boot

This patch shows what I had to do to get the programs in the tools/env
directory to build (i.e. fw_printenv/fw_setenv). Your mileage may vary.
Cheers!
								Murray...

CHANGELOG entry:

* Patch by Murray Jensen <Murray.Jensen@csiro.au>, July 15, 2005:
  - fix building of programs in the tools/env directory

Copyright:

This patch is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
-- 
Murray Jensen, CSIRO Manufacturing & Infra. Tech.      Phone: +61 3 9662 7763
Locked Bag No. 9, Preston, Vic, 3072, Australia.         Fax: +61 3 9662 7853
Internet: Murray.Jensen at csiro.au

To the extent permitted by law, CSIRO does not represent, warrant and/or
guarantee that the integrity of this communication has been maintained or
that the communication is free of errors, virus, interception or interference.

The information contained in this e-mail may be confidential or privileged.
Any unauthorised use or disclosure is prohibited. If you have received this
e-mail in error, please delete it immediately and notify Murray Jensen on
+61 3 9662 7763. Thank you.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TOOLS-EN.GZ
Type: application/x-gunzip
Size: 621 bytes
Desc: tools-enable-env.patch.gz
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050715/142638ff/attachment.bin 

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

* [U-Boot-Users] [PATCH] fix building of tools/env programs
  2005-07-15  6:10 [U-Boot-Users] [PATCH] fix building of tools/env programs Murray.Jensen at csiro.au
@ 2006-03-12 23:17 ` Wolfgang Denk
  2006-03-23  0:53   ` Murray.Jensen at csiro.au
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2006-03-12 23:17 UTC (permalink / raw)
  To: u-boot

In message <4867.1121407843@gerd> you wrote:
> 
> This patch shows what I had to do to get the programs in the tools/env
> directory to build (i.e. fw_printenv/fw_setenv). Your mileage may vary.

It would have been nice if you had given a better description of  the
actual problem.

> * Patch by Murray Jensen <Murray.Jensen@csiro.au>, July 15, 2005:
>   - fix building of programs in the tools/env directory


...
-#include <linux/mtd/mtd.h>
+#include <mtd/mtd-user.h>
...

This does not  work  everywhere;  for  example:  I  cannot  find  any
"mtd/mtd-user.h" anywhere on my FC2 system.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
All I ask is a chance to prove that money can't make me happy.

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

* [U-Boot-Users] [PATCH] fix building of tools/env programs
  2006-03-12 23:17 ` Wolfgang Denk
@ 2006-03-23  0:53   ` Murray.Jensen at csiro.au
  2006-03-23 10:46     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Murray.Jensen at csiro.au @ 2006-03-23  0:53 UTC (permalink / raw)
  To: u-boot

On Mon, 13 Mar 2006 00:17:39 +0100, Wolfgang Denk writes:
>In message <4867.1121407843@gerd> you wrote:
>> This patch shows what I had to do to get the programs in the tools/env
>> directory to build (i.e. fw_printenv/fw_setenv). Your mileage may vary.
>
>It would have been nice if you had given a better description of  the
>actual problem.

Sorry, the first problem is that make doesn't descend into the "env"
subdirectory when building (hence the addition of "env" to TOOLSUBDIRS
in "tools/Makefile"). The second problem is that the env subdirectory
is not set up for cross-compiling properly - it uses the hosts gcc
when building the dependencies, as well as different compiler flags.
The third problem was that a user level program should not include
linux kernel header files. Hence the change from <linux/mtd/mtd.h>
to <mtd/mtd-user.h>.

>> * Patch by Murray Jensen <Murray.Jensen@csiro.au>, July 15, 2005:
>>   - fix building of programs in the tools/env directory
>...
>-#include <linux/mtd/mtd.h>
>+#include <mtd/mtd-user.h>
>...
>
>This does not  work  everywhere;  for  example:  I  cannot  find  any
>"mtd/mtd-user.h" anywhere on my FC2 system.

Hmm.. I use OpenEmbedded for cross compiling. This file is installed into
the OpenEmbedded cross compiling includes area as part of the building of
the OE "mtd-utils" package (check out http://www.linux-mtd.infradead.org/).
Cheers!
								Murray...
-- 
Murray Jensen, CSIRO Manufacturing & Infra. Tech.      Phone: +61 3 9662 7763
Locked Bag No. 9, Preston, Vic, 3072, Australia.         Fax: +61 3 9662 7853
Internet: Murray.Jensen at csiro.au

To the extent permitted by law, CSIRO does not represent, warrant and/or
guarantee that the integrity of this communication has been maintained or
that the communication is free of errors, virus, interception or interference.

The information contained in this e-mail may be confidential or privileged.
Any unauthorised use or disclosure is prohibited. If you have received this
e-mail in error, please delete it immediately and notify Murray Jensen on
+61 3 9662 7763. Thank you.

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

* [U-Boot-Users] [PATCH] fix building of tools/env programs
  2006-03-23  0:53   ` Murray.Jensen at csiro.au
@ 2006-03-23 10:46     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2006-03-23 10:46 UTC (permalink / raw)
  To: u-boot

In message <26948.1143075192@gerd> you wrote:
> 
> Sorry, the first problem is that make doesn't descend into the "env"
> subdirectory when building (hence the addition of "env" to TOOLSUBDIRS

This is not a problem but intentional. I don;t  want  to  have  these
(rarely  used) tools to be build each and every time. This just slows
down the build process.

> in "tools/Makefile"). The second problem is that the env subdirectory
> is not set up for cross-compiling properly - it uses the hosts gcc
> when building the dependencies, as well as different compiler flags.

You are right here.

> The third problem was that a user level program should not include
> linux kernel header files. Hence the change from <linux/mtd/mtd.h>
> to <mtd/mtd-user.h>.

Please note that this has changed between kernel versions. In 2.4  it
was normal to include <linux/mtd/mtd.h>; using <mtd/mtd-user.h> break
such systems because there the file simply does not exist.

> >This does not  work  everywhere;  for  example:  I  cannot  find  any
> >"mtd/mtd-user.h" anywhere on my FC2 system.
> 
> Hmm.. I use OpenEmbedded for cross compiling. This file is installed into
> the OpenEmbedded cross compiling includes area as part of the building of
> the OE "mtd-utils" package (check out http://www.linux-mtd.infradead.org/).

Please try this yourself on any 2.4 kernel based system.

We will have to find an implementation that  works  in  all  environ-
ments; breaking 2.4 kernel support is not acceptable to me.

[Actually I think I wrote all this before.]

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I have a very small mind and must live with it.    -- Edsger Dijkstra

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

end of thread, other threads:[~2006-03-23 10:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-15  6:10 [U-Boot-Users] [PATCH] fix building of tools/env programs Murray.Jensen at csiro.au
2006-03-12 23:17 ` Wolfgang Denk
2006-03-23  0:53   ` Murray.Jensen at csiro.au
2006-03-23 10:46     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox