[U-Boot] error compiling U-boot tools

Hallo
Just like to report problem when compiling U-boot tools
After building U-boot.bin wit h make -all I tried to compile U-boot tools with make env or make tools-all
It reports error:
fw_env.c: In function `flash_write_buf': fw_env.c:860: error: `MTD_DATAFLASH' undeclared (first use in this function) fw_env.c:860: error: (Each undeclared identifier is reported only once fw_env.c:860: error: for each function it appears in.) fw_env.c: In function `flash_read': fw_env.c:979: error: `MTD_DATAFLASH' undeclared (first use in this function) fw_env.c: In function `fw_env_open': fw_env.c:1149: error: `MTD_DATAFLASH' undeclared (first use in this function) gmake[2]: *** [fw_printenv] Error 1 Makefile:523: *** [env] Error 2
Adding definition of MTD_DATAFLASH #define MTD_DATAFLASH 6 in ./tools/env/fw_env.c
which is defined in ./include/linux/mtd/mtd-abi.h
compiles ok.
From git repository the following commit can be seen:
Add support for dataflash to U-boot environment settings tool.
author Remy Bohmer linux@bohmer.net
Sat, 12 Feb 2011 18:06:26 +0000 (19:06 +0100)
committer Wolfgang Denk wd@denx.de
Tue, 12 Apr 2011 20:58:34 +0000 (22:58 +0200)
Viel spas !
________________________________ This e-mail and any attachments may contain confidential and/or privileged information and is intended solely for the addressee. Any unauthorised use, review, retransmissions, dissemination, copying or other use of this information by persons or entities other than the intended recipient is strictly prohibited.
To elektronsko sporo?ilo in vse morebitne priloge lahko vsebujejo informacije zaupne narave in so namenjene izklju?no naslovniku. Fizi?ni ali pravni osebi, ki ni naslovnik, je kakr?nakoli nepoobla??ena uporaba, pregledovanje, po?iljanje, raz?irjanje, kopiranje ali drug na?in razpolaganja z vsebino sporo?ila strogo prepovedana.

On Monday 20 February 2012 09:23:00 Kopac Drago wrote:
I tried to compile U-boot tools with make env or make tools-all
It reports error:
fw_env.c: In function `flash_write_buf': fw_env.c:860: error: `MTD_DATAFLASH' undeclared (first use in this function)
the kernel headers installed in your host system are out of date. looking at the kernel history, it seems they're *very* old as MTD_DATAFLASH was added in Feb 2005. i could understand making concessions for semi-recent additions, but not for something this old.
not a bug in u-boot ... update your distro's kernel headers. -mike
participants (2)
-
Kopac Drago
-
Mike Frysinger