Using dosfs/ida/ata drivers
Wu, Mark H.
Mark.H.Wu at disney.com
Tue Jun 2 18:50:45 UTC 2015
I'm trying to get the file system working on my pc386 machine, and I ran into some issues. At first, I was following the directions on:
<https://devel.rtems.org/wiki/TBR/UserManual/Using_the_RTEMS_DOS_File_System>, but those don't seem current. Specifically, in rtems/ide_part_table.h, it marks rtems_ide_part_table_initialize() as deprecated.
So I'm using that as the baseline for the configuration requirements, but I also get an error in confdefs.h when I include:
#define CONFIGURE_BDBUF_BUFFER_COUNT 1024
#define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS 64
#define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS 32
So I commented out CONFIGURE_BDBUF_BUFFER_COUNT, which was causing an error in confdefs.h.
Replacing the code that uses rtems_ide_part_table_initialize(), I've looked at the code in testsuites/samples/fileio/init.c, which is very similar to the code listed in https://lists.rtems.org/pipermail/users/2012-November/025807.html, so I ran with that.
The fileio test binary worked fine... after I read its instructions to find out that you mount /dev/hda instead of /dev/ide0 or /dev/ide1. But I could not get my own application to mount the disk. I kept getting an "Invalid Name" error (return code 3).
It took a lot of trial and error, but I finally found that I couldn't set CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS to 32. It was failing "silently" in bdbuf.c in rtems_bdbuf_do_init(), because the size was too large. (I checked the math, and it was indeed too large.) Shouldn't the system fail more obviously if it can't initialize?
Also related, what's the mechanism for reporting errors in documentation such as this? I see that the original page is "To Be Removed," but I have also found some errors in some of the other documentation that I would like to report.
More information about the users
mailing list