
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...