From: Wolfgang Denk Date: Thu, 17 Sep 2009 14:07:15 +0200 Subject: [U-Boot] Compilation error for fw_printenv In-Reply-To: <4AB20222.3050803@tataelxsi.co.in> References: <4AB20222.3050803@tataelxsi.co.in> Message-ID: <20090917120715.5F0C7832E864@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Rahanesh, In message <4AB20222.3050803@tataelxsi.co.in> you wrote: > Hi All, > > While trying to compile fw_printenv under tools/env directory of u-boot > i am getting the following error: > > fw_env.c:34:27: error: linux/mtd/mtd.h: No such file or directory > fw_env.c: In function fw_printenv: > fw_env.c: In function flash_io: > fw_env.c:390: error: erase_info_t undeclared (first use in this function) > fw_env.c:390: error: (Each undeclared identifier is reported only once > fw_env.c:390: error: for each function it appears in.) > fw_env.c:390: error: expected before erase > fw_env.c:421: error: erase undeclared (first use in this function) > fw_env.c:423: error: MEMUNLOCK undeclared (first use in this function) > fw_env.c:462: error: MEMERASE undeclared (first use in this function) > fw_env.c:519: error: MEMLOCK undeclared (first use in this function) > make: *** [fw_printenv] Error 1 > > How can i solve this? I a very new to Linux Environment. Obviously your cross tool chain does not provide the (needed) linux/mtd/mtd.h header file. Either use a more complete tool chain (we use the ELDK), or manually add this file to your cross tool chain's headers. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "355/113 -- Not the famous irrational number PI, but an incredible simulation!"