[U-Boot] error in fw_printenv

Rahanesh rahanesh at tataelxsi.co.in
Wed Sep 16 15:36:03 CEST 2009


Hi Wolfgang

Cannot get MTD information: Inappropriate ioctl for device got printed


Thanks
Rahanesh


Wolfgang Denk wrote:
> Dear Rahanesh,
>
> In message <4AB0DFCA.4040909 at 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
>
>   





More information about the U-Boot mailing list