i386 FAT HDD support

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

i386 FAT HDD support

Scott Bailie
I'm attempting to mount an IDE hard drive on an i386 target. As a basic test
of file I/O I mounted a RAMFS first, which worked. Next I added the
fat16.ecm in the \packages\fs\fat\current\doc directory.  Now I'm using the
same program and trying - mount( "/dev/disk0/1", "/mymount", "fatfs" ),
however mount() is failing.  I'm booting via REDBOOT floppy and using TFTP
to grab my program from my development box.  And yes, I have a FAT formatted
HDD installed.

From poking around the list archives it appears that this is supported for
the i386 platform...correct?  Am I missing something?

Thanks!

_________________
Scott Bailie
MIT LINCOLN LAB
781.981.4140
 


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: i386 FAT HDD support

Andrew Lunn-2
On Fri, Nov 04, 2005 at 03:04:29PM -0500, Scott Bailie wrote:
> I'm attempting to mount an IDE hard drive on an i386 target. As a basic test
> of file I/O I mounted a RAMFS first, which worked. Next I added the
> fat16.ecm in the \packages\fs\fat\current\doc directory.  Now I'm using the
> same program and trying - mount( "/dev/disk0/1", "/mymount", "fatfs" ),
> however mount() is failing.  I'm booting via REDBOOT floppy and using TFTP
> to grab my program from my development box.  And yes, I have a FAT formatted
> HDD installed.

FAT what though? FAT16? FAT32? Plain old FAT?

Try enabling the DEBUG code in packages/io/disk/current/src/disk.c See
if it is correctly finding the partition table, etc.

        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

Reply | Threaded
Open this post in threaded view
|

RE: i386 FAT HDD support

Scott Bailie
Sorry, what I did not realize is that the build did not actually finish
successfully and when I built my program it was using the previous build
which included only the RAMFS. When I look through the build output I see
only the following error:

/ecos-c/workdir/fatFs/ecos_install/include/cyg/io/disk.h:59:29:
pkgconf/io_disk.h: No such file or directory
make: Leaving directory `/ecos-c/workdir/fatFs/ecos_build'
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c: In function
`ide_ident':
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c:227:
`CYGDAT_DEVS_DISK_IDE_SECTOR_SIZE' undeclared (first use in this function)
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c:227: (Each
undeclared identifier is reported only once
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c:227: for each
function it appears in.)
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c: In function
`ide_read_sector':
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c:260:
`CYGDAT_DEVS_DISK_IDE_SECTOR_SIZE' undeclared (first use in this function)
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c: In function
`ide_write_sector':
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c:295:
`CYGDAT_DEVS_DISK_IDE_SECTOR_SIZE' undeclared (first use in this function)
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c: In function
`ide_disk_init':
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c:311:
`CYGDAT_DEVS_DISK_IDE_SECTOR_SIZE' undeclared (first use in this function)
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c:311: warning:
unused variable `id_buf'
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c: At top level:
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c:308: warning:
`ide_disk_init' defined but not used
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.c:386: warning:
`ide_disk_lookup' defined but not used
/ecos-c/ecos/packages/devs/disk/ide/current/src/ide_disk.h:160: warning:
`ide_disk_funs' defined but not used

Any thoughts?

Thanks again!


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Andrew Lunn
Sent: Friday, November 04, 2005 4:35 PM
To: Scott Bailie
Cc: [hidden email]
Subject: Re: [ECOS] i386 FAT HDD support

On Fri, Nov 04, 2005 at 03:04:29PM -0500, Scott Bailie wrote:
> I'm attempting to mount an IDE hard drive on an i386 target. As a basic
test
> of file I/O I mounted a RAMFS first, which worked. Next I added the
> fat16.ecm in the \packages\fs\fat\current\doc directory.  Now I'm using
the
> same program and trying - mount( "/dev/disk0/1", "/mymount", "fatfs" ),
> however mount() is failing.  I'm booting via REDBOOT floppy and using TFTP
> to grab my program from my development box.  And yes, I have a FAT
formatted
> HDD installed.

FAT what though? FAT16? FAT32? Plain old FAT?

Try enabling the DEBUG code in packages/io/disk/current/src/disk.c See
if it is correctly finding the partition table, etc.

        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



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: i386 FAT HDD support

Andrew Lunn-2
On Mon, Nov 07, 2005 at 08:37:50AM -0500, Scott Bailie wrote:
> Sorry, what I did not realize is that the build did not actually finish
> successfully and when I built my program it was using the previous build
> which included only the RAMFS. When I look through the build output I see
> only the following error:
>
> /ecos-c/workdir/fatFs/ecos_install/include/cyg/io/disk.h:59:29:
> pkgconf/io_disk.h: No such file or directory

rm -fr

your work tree and start again. It looks like you have a corrupt
configuration.

        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

Reply | Threaded
Open this post in threaded view
|

RE: i386 FAT HDD support

Scott Bailie
I decided to start from scratch...

I'm using the net Template for i386 w/ 82559 ethernet.

+ CYGPKG_IO_DISK
+ CYGPKG_DEVS_DISK_IDE
+ CYGPKG_FS_FAT
  CYGPKG_FS_FAT causes an unresolved confilict --> CYGPKG_BLOCK_LIB. So out
of curiosity I added it.
+ CYGPKG_BLOCK_LIB
  CYGPKG_BLOCK_LIB too causes an unresolved conflict -->
CYGPKG_LINUX_COMPAT.  So I decided to try to add it as well...

At this point I have no conflicts but the build fails with the errors below.


I get the feeling I am doing something wrong as I did not expect to ever see
Unresolved conflicts. I'd appreciate any suggestions you can give.


Errors...

/ecos-c/ecos/packages/fs/fat/current/src/fatfs.c:56:28: pkgconf/fs_fat.h: No
such file or directory
make[1]: Entering directory
`/ecos-c/workdir/fatFs/ecos_build/language/c/libc/stdio/current'
In file included from /ecos-c/ecos/packages/fs/fat/current/src/fatfs.c:78:
make[1]: Nothing to be done for `build'.
/ecos-c/ecos/packages/fs/fat/current/src/fatfs.h:50:28: pkgconf/fs_fat.h: No
such file or directory
make[1]: Leaving directory
`/ecos-c/workdir/fatFs/ecos_build/language/c/libc/stdio/current'
In file included from /ecos-c/ecos/packages/fs/fat/current/src/fatfs.c:78:
make -r -C language/c/libm/current build
/ecos-c/ecos/packages/fs/fat/current/src/fatfs.h:146:
`CYGNUM_FS_FAT_NODE_HASH_TABLE_SIZE' undeclared here (not in a function)
make[1]: Entering directory
`/ecos-c/workdir/fatFs/ecos_build/language/c/libm/current'
/ecos-c/ecos/packages/fs/fat/current/src/fatfs.h:147: confused by earlier
errors, bailing out
make[1]: Nothing to be done for `build'.
make[1]: *** [src/fatfs.o.d] Error 1
make[1]: Leaving directory
`/ecos-c/workdir/fatFs/ecos_build/language/c/libm/current'
make[1]: *** Waiting for unfinished jobs....
make -r -C compat/posix/current build
/ecos-c/ecos/packages/fs/fat/current/src/fatfs_ncache.c:48:28:
pkgconf/fs_fat.h: No such file or directory
make[1]: Entering directory
`/ecos-c/workdir/fatFs/ecos_build/compat/posix/current'
In file included from
/ecos-c/ecos/packages/fs/fat/current/src/fatfs_ncache.c:57:
make[1]: Nothing to be done for `build'.
/ecos-c/ecos/packages/fs/fat/current/src/fatfs.h:50:28: pkgconf/fs_fat.h: No
such file or directory
make[1]: Leaving directory
`/ecos-c/workdir/fatFs/ecos_build/compat/posix/current'
In file included from
/ecos-c/ecos/packages/fs/fat/current/src/fatfs_ncache.c:57:
make -r -C io/watchdog/current build
/ecos-c/ecos/packages/fs/fat/current/src/fatfs.h:146:
`CYGNUM_FS_FAT_NODE_HASH_TABLE_SIZE' undeclared here (not in a function)
make[1]: Entering directory
`/ecos-c/workdir/fatFs/ecos_build/io/watchdog/current'
/ecos-c/ecos/packages/fs/fat/current/src/fatfs.h:147: confused by earlier
errors, bailing out
make[1]: Nothing to be done for `build'.
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory
`/ecos-c/workdir/fatFs/ecos_build/io/watchdog/current'
make[1]: *** [src/fatfs_ncache.o.d] Error 1
make -r -C io/wallclock/current build
/ecos-c/ecos/packages/fs/fat/current/src/fatfs_supp.c:48:28:
pkgconf/fs_fat.h: No such file or directory
make[1]: Entering directory
`/ecos-c/workdir/fatFs/ecos_build/io/wallclock/current'
In file included from
/ecos-c/ecos/packages/fs/fat/current/src/fatfs_supp.c:62:
make[1]: Nothing to be done for `build'.
/ecos-c/ecos/packages/fs/fat/current/src/fatfs.h:50:28: pkgconf/fs_fat.h: No
such file or directory
make[1]: Leaving directory
`/ecos-c/workdir/fatFs/ecos_build/io/wallclock/current'
In file included from
/ecos-c/ecos/packages/fs/fat/current/src/fatfs_supp.c:62:
make -r -C error/current build
/ecos-c/ecos/packages/fs/fat/current/src/fatfs.h:146:
`CYGNUM_FS_FAT_NODE_HASH_TABLE_SIZE' undeclared here (not in a function)
make[1]: Entering directory `/ecos-c/workdir/fatFs/ecos_build/error/current'
/ecos-c/ecos/packages/fs/fat/current/src/fatfs.h:147: confused by earlier
errors, bailing out
make[1]: Nothing to be done for `build'.
make[1]: *** [src/fatfs_supp.o.d] Error 1

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Andrew Lunn
Sent: Monday, November 07, 2005 8:54 AM
To: Scott Bailie
Cc: [hidden email]
Subject: Re: [ECOS] i386 FAT HDD support

On Mon, Nov 07, 2005 at 08:37:50AM -0500, Scott Bailie wrote:
> Sorry, what I did not realize is that the build did not actually finish
> successfully and when I built my program it was using the previous build
> which included only the RAMFS. When I look through the build output I see
> only the following error:
>
> /ecos-c/workdir/fatFs/ecos_install/include/cyg/io/disk.h:59:29:
> pkgconf/io_disk.h: No such file or directory

rm -fr

your work tree and start again. It looks like you have a corrupt
configuration.

        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



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: i386 FAT HDD support

Andrew Lunn-2
On Mon, Nov 07, 2005 at 09:34:58AM -0500, Scott Bailie wrote:

> I decided to start from scratch...
>
> I'm using the net Template for i386 w/ 82559 ethernet.
>
> + CYGPKG_IO_DISK
> + CYGPKG_DEVS_DISK_IDE
> + CYGPKG_FS_FAT
>   CYGPKG_FS_FAT causes an unresolved confilict --> CYGPKG_BLOCK_LIB. So out
> of curiosity I added it.
> + CYGPKG_BLOCK_LIB
>   CYGPKG_BLOCK_LIB too causes an unresolved conflict -->
> CYGPKG_LINUX_COMPAT.  So I decided to try to add it as well...
>
> At this point I have no conflicts but the build fails with the errors below.

lunn@londo:~/eCos/work$ rm -fr *
lunn@londo:~/eCos/work$ ecosconfig new pc_i82559 net
U CYGBLD_ISO_STRUCTTIMEVAL_HEADER, new inferred value <cyg/posix/sys/time.h>
lunn@londo:~/eCos/work$ ecosconfig add disk blib linux_compat ide_disk fatfs
lunn@londo:~/eCos/work$ ecosconfig tree
lunn@londo:~/eCos/work$ make -s
headers finished
build finished

        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

Reply | Threaded
Open this post in threaded view
|

RE: i386 FAT HDD support

Scott Bailie
Using the command line configtool as you indicated works perfectly.

I still can not mount the drive, however. I enabled debug statements in
ide_disk.c and I get indication that a device was found - it displays the
Serial, Firmware Rev, Model, etc. but then I see the following message -
"IDE device 0:0 is not a hard disk!"  When the device is identified the
"kind" is "c". According to ide_disk.c it should be "2". I tried another HDD
but I get the same behavior. Suggestions?



-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Andrew Lunn
Sent: Monday, November 07, 2005 9:47 AM
To: Scott Bailie
Cc: [hidden email]
Subject: Re: [ECOS] i386 FAT HDD support

On Mon, Nov 07, 2005 at 09:34:58AM -0500, Scott Bailie wrote:
> I decided to start from scratch...
>
> I'm using the net Template for i386 w/ 82559 ethernet.
>
> + CYGPKG_IO_DISK
> + CYGPKG_DEVS_DISK_IDE
> + CYGPKG_FS_FAT
>   CYGPKG_FS_FAT causes an unresolved confilict --> CYGPKG_BLOCK_LIB. So
out
> of curiosity I added it.
> + CYGPKG_BLOCK_LIB
>   CYGPKG_BLOCK_LIB too causes an unresolved conflict -->
> CYGPKG_LINUX_COMPAT.  So I decided to try to add it as well...
>
> At this point I have no conflicts but the build fails with the errors
below.

lunn@londo:~/eCos/work$ rm -fr *
lunn@londo:~/eCos/work$ ecosconfig new pc_i82559 net
U CYGBLD_ISO_STRUCTTIMEVAL_HEADER, new inferred value <cyg/posix/sys/time.h>
lunn@londo:~/eCos/work$ ecosconfig add disk blib linux_compat ide_disk fatfs
lunn@londo:~/eCos/work$ ecosconfig tree
lunn@londo:~/eCos/work$ make -s
headers finished
build finished

        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



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply | Threaded
Open this post in threaded view
|

Re: i386 FAT HDD support

Andrew Lunn-2
On Mon, Nov 07, 2005 at 01:52:03PM -0500, Scott Bailie wrote:
> Using the command line configtool as you indicated works perfectly.
>
> I still can not mount the drive, however. I enabled debug statements in
> ide_disk.c and I get indication that a device was found - it displays the
> Serial, Firmware Rev, Model, etc. but then I see the following message -
> "IDE device 0:0 is not a hard disk!"  When the device is identified the
> "kind" is "c". According to ide_disk.c it should be "2". I tried another HDD
> but I get the same behavior. Suggestions?

See the thread at:

http://sources.redhat.com/ml/ecos-patches/2005-02/msg00002.html

It looks like its time to commit the second part of the patch, but in
a cleaned up state.

        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