* [ECOS] Mounting a FAT filesystem
@ 2009-04-03 15:58 Eduardo Sabaj
0 siblings, 0 replies; 7+ messages in thread
From: Eduardo Sabaj @ 2009-04-03 15:58 UTC (permalink / raw)
To: ecos-discuss, esabaj
I enabled the debuggers in ide_disk.c. Now I see that the driver can
read the following information from the disk in function
ide_disk_init():
Firmware rev. : NDBA418J
Model : 128MB NANDrive
C/H/S : 977/8/32
Kind : 4
However, the following "if" condition is the one which is rejecting the disk.
ide_disk_init ()
{
....
....
if (((ide_idData->general_conf>>8)&0x1f)!=2) {
diag_printf("IDE device %d:%d is not a hard disk!\n",
info->port, info->chan);
return false;
}
}
The value of "ide_idData->general_conf>>8)&0x1f" is the same as Kind
(printed above), So it expects a value of 2 while the value that is
reading is 4. Could anyone tell me which is the incompatibility here?
Regards
Eduardo
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Mounting a FAT filesystem
[not found] ` <49D60A1D.4020508@hasar.com>
@ 2009-04-03 18:02 ` Gary Thomas
0 siblings, 0 replies; 7+ messages in thread
From: Gary Thomas @ 2009-04-03 18:02 UTC (permalink / raw)
To: eCos
Eduardo Sabaj wrote:
> I've already enabled this debugger. I can see the following message..
>
> "IDE device 0:0 is not a hard disk"
Start with this - the eCos IDE driver does not recognize your hardware.
Until you solve this, you cannot proceed.
How could this message be any clearer?
> My board has attached two ide disks: a disk on module (128 Mb) acting as
> a slave, and a NandDrive (also 128 Mb) configured as master..
>
> By the way, which is the syntax to mount the disk attached as master ?
> (remember that there is only one partition which occupies the whole disk)...
>
> mount ("/dev/hda/"....)
> mount ("/dev/hda0/0", ...)
>
> Regards
> Eduardo
>
> Gary Thomas escribió:
>> Eduardo Sabaj wrote:
>>
>>> Gary, I didn't verify it... Is there any debugger that tells me this
>>> information?
>>>
>>
>> Try enabling 'CYGDBG_IO_DISK_DEBUG'
>>
>>
>>> Gary Thomas escribió:
>>>
>>>> Andrew Lunn wrote:
>>>>
>>>>
>>>>> On Fri, Apr 03, 2009 at 09:04:42AM -0300, Eduardo Sabaj wrote:
>>>>>
>>>>>
>>>>>> I have an i386 platform with two IDE disks and until now I have had no
>>>>>> success in trying to mount a FAT filesystem in my development.. What I
>>>>>> have tried is the following:
>>>>>>
>>>>>> mount ("/dev/hda/" , "/", "fatfs:sync=write");
>>>>>>
>>>>>> In spite of the fact that on my project file (.ecc) the names of the
>>>>>> disk devices are /dev/hda, /dev/hdb, etc..., mount returns -1 and
>>>>>> errno 19 ("no such device").
>>>>>>
>>>>>> Moreover, if I try to lookup the driver by...
>>>>>>
>>>>>> cyg_io_lookup("/dev/hda/", &handle);
>>>>>>
>>>>>> it returns -22 ("invalid argument"). Could anyone tell me what I'm missing ??
>>>>>>
>>>>>>
>>>>> Arn't you forgetting about partitions? You want to mount the first
>>>>> partition on the disk, not the disk itself?
>>>>>
>>>>>
>>>> Also, have you verified that the IDE driver actually finds
>>>> any of these partitions?
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Mounting a FAT filesystem
[not found] ` <49D602BB.6080309@hasar.com>
@ 2009-04-03 12:43 ` Gary Thomas
[not found] ` <49D60A1D.4020508@hasar.com>
0 siblings, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2009-04-03 12:43 UTC (permalink / raw)
To: Eduardo Sabaj; +Cc: eCos
Eduardo Sabaj wrote:
> Gary, I didn't verify it... Is there any debugger that tells me this
> information?
Try enabling 'CYGDBG_IO_DISK_DEBUG'
> Gary Thomas escribió:
>> Andrew Lunn wrote:
>>
>>> On Fri, Apr 03, 2009 at 09:04:42AM -0300, Eduardo Sabaj wrote:
>>>
>>>> I have an i386 platform with two IDE disks and until now I have had no
>>>> success in trying to mount a FAT filesystem in my development.. What I
>>>> have tried is the following:
>>>>
>>>> mount ("/dev/hda/" , "/", "fatfs:sync=write");
>>>>
>>>> In spite of the fact that on my project file (.ecc) the names of the
>>>> disk devices are /dev/hda, /dev/hdb, etc..., mount returns -1 and
>>>> errno 19 ("no such device").
>>>>
>>>> Moreover, if I try to lookup the driver by...
>>>>
>>>> cyg_io_lookup("/dev/hda/", &handle);
>>>>
>>>> it returns -22 ("invalid argument"). Could anyone tell me what I'm missing ??
>>>>
>>> Arn't you forgetting about partitions? You want to mount the first
>>> partition on the disk, not the disk itself?
>>>
>>
>> Also, have you verified that the IDE driver actually finds
>> any of these partitions?
>>
>>
>
> <http://www.grupohasar.com/disclaimer>
>
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Mounting a FAT filesystem
2009-04-03 12:17 ` Andrew Lunn
2009-04-03 12:20 ` Gary Thomas
@ 2009-04-03 12:28 ` Eduardo Sabaj
1 sibling, 0 replies; 7+ messages in thread
From: Eduardo Sabaj @ 2009-04-03 12:28 UTC (permalink / raw)
To: Eduardo Sabaj, ecos-discuss, esabaj
Andrew, I have only one partition, however, I tried adding the
partition number ..
mount ("/dev/hda/0", "/", "fatfs:sync=write");
(I read that partition number '0' means the whole disk) and it didn't work.
I suppose that there is something that I'm omitting but I can't
realize what is it..
On Fri, Apr 3, 2009 at 9:17 AM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Fri, Apr 03, 2009 at 09:04:42AM -0300, Eduardo Sabaj wrote:
>> I have an i386 platform with two IDE disks and until now I have had no
>> success in trying to mount a FAT filesystem in my development.. What I
>> have tried is the following:
>>
>> mount ("/dev/hda/" , "/", "fatfs:sync=write");
>>
>> In spite of the fact that on my project file (.ecc) the names of the
>> disk devices are /dev/hda, /dev/hdb, etc..., mount returns -1 and
>> errno 19 ("no such device").
>>
>> Moreover, if I try to lookup the driver by...
>>
>> cyg_io_lookup("/dev/hda/", &handle);
>>
>> it returns -22 ("invalid argument"). Could anyone tell me what I'm missing ??
>
> Arn't you forgetting about partitions? You want to mount the first
> partition on the disk, not the disk itself?
>
> Andrew
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Mounting a FAT filesystem
2009-04-03 12:17 ` Andrew Lunn
@ 2009-04-03 12:20 ` Gary Thomas
[not found] ` <49D602BB.6080309@hasar.com>
2009-04-03 12:28 ` Eduardo Sabaj
1 sibling, 1 reply; 7+ messages in thread
From: Gary Thomas @ 2009-04-03 12:20 UTC (permalink / raw)
To: Eduardo Sabaj, ecos-discuss, esabaj
Andrew Lunn wrote:
> On Fri, Apr 03, 2009 at 09:04:42AM -0300, Eduardo Sabaj wrote:
>> I have an i386 platform with two IDE disks and until now I have had no
>> success in trying to mount a FAT filesystem in my development.. What I
>> have tried is the following:
>>
>> mount ("/dev/hda/" , "/", "fatfs:sync=write");
>>
>> In spite of the fact that on my project file (.ecc) the names of the
>> disk devices are /dev/hda, /dev/hdb, etc..., mount returns -1 and
>> errno 19 ("no such device").
>>
>> Moreover, if I try to lookup the driver by...
>>
>> cyg_io_lookup("/dev/hda/", &handle);
>>
>> it returns -22 ("invalid argument"). Could anyone tell me what I'm missing ??
>
> Arn't you forgetting about partitions? You want to mount the first
> partition on the disk, not the disk itself?
Also, have you verified that the IDE driver actually finds
any of these partitions?
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ECOS] Mounting a FAT filesystem
2009-04-03 12:04 Eduardo Sabaj
@ 2009-04-03 12:17 ` Andrew Lunn
2009-04-03 12:20 ` Gary Thomas
2009-04-03 12:28 ` Eduardo Sabaj
0 siblings, 2 replies; 7+ messages in thread
From: Andrew Lunn @ 2009-04-03 12:17 UTC (permalink / raw)
To: Eduardo Sabaj; +Cc: ecos-discuss, esabaj
On Fri, Apr 03, 2009 at 09:04:42AM -0300, Eduardo Sabaj wrote:
> I have an i386 platform with two IDE disks and until now I have had no
> success in trying to mount a FAT filesystem in my development.. What I
> have tried is the following:
>
> mount ("/dev/hda/" , "/", "fatfs:sync=write");
>
> In spite of the fact that on my project file (.ecc) the names of the
> disk devices are /dev/hda, /dev/hdb, etc..., mount returns -1 and
> errno 19 ("no such device").
>
> Moreover, if I try to lookup the driver by...
>
> cyg_io_lookup("/dev/hda/", &handle);
>
> it returns -22 ("invalid argument"). Could anyone tell me what I'm missing ??
Arn't you forgetting about partitions? You want to mount the first
partition on the disk, not the disk itself?
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
* [ECOS] Mounting a FAT filesystem
@ 2009-04-03 12:04 Eduardo Sabaj
2009-04-03 12:17 ` Andrew Lunn
0 siblings, 1 reply; 7+ messages in thread
From: Eduardo Sabaj @ 2009-04-03 12:04 UTC (permalink / raw)
To: ecos-discuss, esabaj
I have an i386 platform with two IDE disks and until now I have had no
success in trying to mount a FAT filesystem in my development.. What I
have tried is the following:
mount ("/dev/hda/" , "/", "fatfs:sync=write");
In spite of the fact that on my project file (.ecc) the names of the
disk devices are /dev/hda, /dev/hdb, etc..., mount returns -1 and
errno 19 ("no such device").
Moreover, if I try to lookup the driver by...
cyg_io_lookup("/dev/hda/", &handle);
it returns -22 ("invalid argument"). Could anyone tell me what I'm missing ??
FYI, in order to have support for FAT filesystem and for generic IDE,
I added the following packages on my configuration file:
-----
cdl_savefile_version 1;
cdl_savefile_command cdl_savefile_version {};
cdl_savefile_command cdl_savefile_command {};
cdl_savefile_command cdl_configuration { description hardware template
package };
cdl_savefile_command cdl_package { value_source user_value
wizard_value inferred_value };
cdl_savefile_command cdl_component { value_source user_value
wizard_value inferred_value };
cdl_savefile_command cdl_option { value_source user_value wizard_value
inferred_value };
cdl_savefile_command cdl_interface { value_source user_value
wizard_value inferred_value };
cdl_configuration eCos {
package CYGPKG_IO_FILEIO current ;
package CYGPKG_IO current ;
package CYGPKG_LIBC_STRING current ;
package CYGPKG_DEVS_DISK_IDE current ;
package CYGPKG_IO_DISK current ;
package CYGPKG_BLOCK_LIB current ;
package CYGPKG_LINUX_COMPAT current ;
package CYGPKG_FS_FAT current ;
package CYGPKG_MEMALLOC current ;
};
-----
Regards,
Eduardo
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-04-03 15:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-03 15:58 [ECOS] Mounting a FAT filesystem Eduardo Sabaj
-- strict thread matches above, loose matches on Subject: below --
2009-04-03 12:04 Eduardo Sabaj
2009-04-03 12:17 ` Andrew Lunn
2009-04-03 12:20 ` Gary Thomas
[not found] ` <49D602BB.6080309@hasar.com>
2009-04-03 12:43 ` Gary Thomas
[not found] ` <49D60A1D.4020508@hasar.com>
2009-04-03 18:02 ` Gary Thomas
2009-04-03 12:28 ` Eduardo Sabaj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).