From: Rahanesh Date: Wed, 16 Sep 2009 19:06:03 +0530 Subject: [U-Boot] error in fw_printenv In-Reply-To: <20090916132828.8666E832E864@gemini.denx.de> References: <4AB0DFCA.4040909@tataelxsi.co.in> <20090916132828.8666E832E864@gemini.denx.de> Message-ID: <4AB0E9C3.10105@tataelxsi.co.in> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang Cannot get MTD information: Inappropriate ioctl for device got printed Thanks Rahanesh Wolfgang Denk wrote: > Dear Rahanesh, > > In message <4AB0DFCA.4040909@tataelxsi.co.in> you wrote: > >> When i executed fw_printenv on an embedded board , it threw an error >> >> >> IOCTL error : Cannot get MTD information!! Any idea why this error >> occurred? >> > > Well, looking in the source code, I see a single place with a similar > error message: > > 786 rc = ioctl (fd, MEMGETINFO, &mtdinfo); > 787 if (rc < 0) { > 788 perror ("Cannot get MTD information"); > 789 return -1; > 790 } > > But then, the error message would be: > > Cannot get MTD information: XXX XXX XXX > > with "XXX XXX XXX" giving an explanation of what goes wrong. > > What was the "XXX XXX XXX" that got printed in your case? > > > >> The contents of config file which i used shown below >> >> >> >> # MTD device name Device offset Env. size Flash sector size >> Number of sectors >> /dev/mtd0 0x0000 0x1000 0x10000 >> > > Are you sure this is correct? Your environment size is only 4 KiB? > And your flash secor size is 64 KiB? > > Best regards, > > Wolfgang Denk > >