Mr Thomas the last question... [Initializing Partition Table (?)]

Thomas Doerfler Thomas.Doerfler at imd-systems.de
Wed Jul 28 09:14:20 UTC 2004


Hi Joe,


> Hi again,
> 
> Ok, now I understood how it will working...
> So, there is no floppy drivers for rtems, and there is
> only rtems drivers for FAT formated HDs.

right.

> 
> Suppose the following:
> 
> I will format a HD and let it empty or I install the
> msdos 6.2 in it
> 
> Then I plug it in the IDE 1 controler of my computer.

Just for the records: It should be the first harddisk on the 
first controller "Primary Master".

> The I startup the rtems fileio program via flopy disk.

ok

> 
> If I mount /dev/hda1 in /mnt/hda and if I write/create
> a file using fileio into /dev/hda1/my.txt where is
> situated the my.txt file in the dos file system?
> 


> c:\my.txt?? 
This would be the location, becasue "/mnt/hda1" is mainly a 
replacement for the MS-DOS "C:\"

> c:\mnt\my.txt??
> c:\mnt\hda\my.txt??
> 
> 
> 
> Mr Thomas, I will not post more msgs concerning this
> subject... I will try to get a hd and test it with the
> fileio sample.

Don't bother to ask again, that's what a mailing list is for. 
But please also send your questions to "rtems-users", because in 
that way we get sort of a searchable "FAQ" for other guys with 
similar questions.

> I want to thank you once more again about the time you
> spent trying to help me...

your welcome,
	Thomas.

> 
> Joe
> (rtems beginner)
> 
> 
> 
> 
> 
> 
> --- Thomas Doerfler <Thomas.Doerfler at imd-systems.de>
> wrote:
> 
> > Hello Joe,
> > 
> > it would be great if you would also implement an 
> > ext2/ext3 linux FS support for RTEMS, but until now 
> > only various FAT formats are supported. 
> > 
> > Using a floppy instead would be a good idea, but 
> > currently RTEMS is not shipped with floppy drivers.
> > 
> > wkr,
> > Thomas.
> > 
> > 
> > > Hi Mr Thomas, and thanks once more again,
> > > 
> > > So, I have a mandrake linux box using a 80GB had
> > disk
> > > which was limited to 40Gb due to mother noard
> > > restrictions. I only have the madrake linux
> > installed
> > > in that computer, a mendocino celeron at 400MHz.
> > > 
> > > Does the hardisk must be FAT formated???
> > > The hard disk I have is formated using linux
> > > filesystem. I installed mandrake with the express
> > > option and it created the linux needed
> > partitions...
> > > 
> > > 
> > > So when I try to mount it using fileio sample I
> > get a
> > > return value diferent from zero and the last error
> > is
> > > 25 - file or directory doens exists... :-(
> > > 
> > > I dont have any FAT formated hard disk... :-( 
> > > 
> > > Can I use a floppy instead? I am starting the
> > rtems
> > > program using a grub diskette which was formated
> > using
> > > fat system...  Can I use it to be mounted?
> > > 
> > > How do I refere to the floppy when mounting and
> > > initializing using the fileio samples? /dev/fd0?
> > > 
> > > Many thanks, once more again...
> > > I ama  student and I am trying to make some
> > research
> > > in the rtems but I need to create a file to store
> > some
> > > values for later use...
> > > 
> > > Joe
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --- Thomas Doerfler
> > <Thomas.Doerfler at imd-systems.de>
> > > wrote:
> > > 
> > > > Hello,
> > > > 
> > > > yes, I think the IDE and ATA driver should 
> > > > initialize on your system. So in the "fileio"
> > menu, 
> > > > you should call "fileio_part_table_initialize"
> > (menu
> > > > 
> > > > letter 'p') and then "fileio_fsmount" (menu
> > letter 
> > > > 'f'). Then your first harddisk partition with
> > FAT 
> > > > filesystem should be mounted to /mnt/hda.
> > > > 
> > > > What messages do you get, when you call 
> > > > "fileio_mount"? What kind of harddisk do you use
> > and
> > > > 
> > > > how is it partitioned?
> > > > 
> > > > wkr,
> > > > Thomas.
> > > > 
> > > > 
> > > > > Hello Mr Thomas and thank you for your help,
> > > > > 
> > > > > I have the following instruction in my rtems
> > > > program
> > > > > and I realize that the
> > RTEMS_BSP_HAS_IDE_DRIVER is
> > > > > defined!
> > > > > 
> > > > > rtems_driver_address_table Device_drivers[] =
> > > > > {
> > > > >  	CONSOLE_DRIVER_TABLE_ENTRY
> > > > >  	,CLOCK_DRIVER_TABLE_ENTRY
> > > > > #ifdef RTEMS_BSP_HAS_IDE_DRIVER
> > > > >  	,IDE_CONTROLLER_DRIVER_TABLE_ENTRY
> > > > >  	/* important: ATA driver must be after ide
> > > > drivers
> > > > >  */
> > > > > 	,ATA_DRIVER_TABLE_ENTRY 
> > > > > #endif
> > > > > };
> > > > > 
> > > > > But I cant see the hda anyway... :-(
> > > > > That instruction is enough to load and
> > initialize
> > > > the
> > > > > hardisk driver?
> > > > > 
> > > > > So, please, could you give a quick look at the
> > > > > scaletton of my program... I cant solve this
> > > > problem
> > > > > alone... Did you saw anything suspicious? Do I
> > > > have to
> > > > > include any special parameter when I configure
> > and
> > > > > build the rtems to access hard drive? 
> > > > > 
> > > > > 
> > > > > Thank you Mr Thomas...
> > > > > 
> > > > > Joe
> > > > > 
> > > > > 
> > > > > PS: My program is in one file only called
> > hello.c
> > > > and
> > > > > i want to use POSIX api as much as possible...
> > > > >
> > > >
> > >
> >
> ==================================================================
> > > > > 
> > > > > #define CONFIGURE_INIT
> > > > > 
> > > > > #include <bsp.h> /* for device driver
> > prototypes
> > > > */
> > > > > #include <libchip/ata.h> /* for ata driver
> > > > prototype
> > > > > */
> > > > > #include <libchip/ide_ctrl.h> /* for general
> > ide
> > > > > driver prototype */
> > > > > 
> > > > > #define
> > CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> > > > > #define
> > CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
> > > > > #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
> > > > > #define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
> > > > > 
> > > > > #ifdef CONFIGURE_INIT
> > > > > rtems_driver_address_table Device_drivers[] =
> > > > > 	{
> > > > > 	CONSOLE_DRIVER_TABLE_ENTRY
> > > > > 	,CLOCK_DRIVER_TABLE_ENTRY
> > > > > #ifdef RTEMS_BSP_HAS_IDE_DRIVER
> > > > > 	,IDE_CONTROLLER_DRIVER_TABLE_ENTRY
> > > > > 	/* important: ATA driver must be after ide
> > > > drivers */
> > > > > 	,ATA_DRIVER_TABLE_ENTRY
> > > > > #endif
> > > > > 	};
> > > > > 
> > > > > #include <rtems/bdbuf.h>
> > > > > rtems_bdbuf_config rtems_bdbuf_configuration[]
> > = {
> > > > >   {512,128,NULL}
> > > > > };
> > > > > int rtems_bdbuf_configuration_size =(
> > > > > sizeof(rtems_bdbuf_configuration)
> > > > > 				    
> > /sizeof(rtems_bdbuf_configuration[0]));
> > > > > #endif
> > > > > 
> > > > > #include <unistd.h>
> > > > > #include <rtems/error.h>
> > > > > #include <dosfs.h>
> > > > > #include <ctype.h>
> > > > > #include <rtems/ide_part_table.h>
> > > > > #include <rtems/libcsupport.h>
> > > > > #include "fsmount.h"
> > > > > 
> > > > > #include <rtems.h>
> > > > > #include <stdlib.h>
> > > > > #include <stdio.h>
> > > > > #include <string.h>
> > > > > #include <errno.h>
> > > > > #include <semaphore.h>
> > > > > #include <pthread.h>
> > > > > #include <fcntl.h>
> > > > > #include <time.h>
> > > > > #include <rtems/posix/timer.h>
> > 
> === message truncated ===
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail

--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at imd-systems.de
PGP public key available at: http://www.imd-
systems.de/pgp_keys.htm




More information about the users mailing list