source: rtems/doc/filesystem/init.t @ 7441fe2c

4.104.114.84.95
Last change on this file since 7441fe2c was 7441fe2c, checked in by Joel Sherrill <joel.sherrill@…>, on 10/12/99 at 21:54:40

Made many changes to turn the outline into something more like a manual
and less like a collection of notes.

  • Property mode set to 100644
File size: 4.0 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-1998.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@chapter System Initialization
10
11After the RTEMS initialization is performed, the application's
12initialization will be performed. Part of initialization is a call to
13rtems_filesystem_initialize(). This routine will mount the `In Memory File
14System' as the base filesystem.  Mounting the base filesystem consists
15of the following:
16
17@itemize @bullet
18
19@item Initialization of mount table chain control structure
20
21@item Allocation of a @code{jnode} structure that will server as the root node
22of the `In Memory Filesystem'
23
24@item Initialization of the allocated @code{jnode} with the appropriate OPS,
25directory handlers and pathconf limits and options.
26
27@item Allocation of a memory region for filesystem specific global
28management variables
29
30@item Creation of first mount table entry for the base filesystem
31
32@item Initialization of the first mount table chain entry to indicate that
33the mount point is NULL and the mounted filesystem is the base file
34system
35
36@end itemize
37
38
39After the base filesystem has been mounted, the following operations are
40performed under its directory structure:
41
42@itemize @bullet
43
44@item Creation of the /dev directory
45
46@item Registration of devices under /dev directory
47
48@end itemize
49
50@section Base Filesystem
51
52RTEMS initially mounts a RAM based file system known as the base file system. 
53The root directory of this file system tree serves as the logical root of the
54directory hierarchy (Figure 3). Under the root directory a `/dev' directory
55is created under which all I/O device directories and files are registered as
56part of the file system hierarchy.
57
58@example
59Figure of the tree structure goes here.
60@end example
61
62A RAM based file system draws its management resources from memory. File and
63directory nodes are simply allocated blocks of memory. Data associated with
64regular files is stored in collections of memory blocks. When the system is
65turned off or restarted all memory-based components of the file system are
66lost.
67
68The base file system serves as a starting point for the mounting of file
69systems that are resident on semi-permanent storage media. Examples of such
70media include non- volatile memory, flash memory and IDE hard disk drives
71(Figure 3). File systems of other types will be mounted onto mount points
72within the base file system or other file systems that are subordinate to the
73base file system. The framework set up under the base file system will allow
74for these new file system types and the unique data and functionality that is
75required to manage the future file systems.
76
77@subsection Base Filesystem Mounting
78
79At present, the first file system to be mounted is the `In Memory File
80System'. It is mounted using a standard MOUNT() command in which the mount
81point is NULL.  This flags the mount as the first file system to be
82registered under the operating system and appropriate initialization of file
83system management information is performed (See figures 4 and 5). If a
84different file system type is desired as the base file system, alterations
85must be made to base_fs.c. This routine handles the mount of the base file
86system.
87
88
89@example
90Figure of the mount table chain goes here.
91@end example
92
93
94Once the root of the base file system has been established and it has been
95recorded as the mount point of the base file system, devices are integrated
96into the base file system. For every device that is configured into the
97system (See ioman.c) a device registration process is performed. Device
98registration produces a unique dev_t handle that consists of a major and
99minor device number. In addition, the configuration information for each
100device contains a text string that represents the fully qualified pathname to
101that device's place in the base file system's hierarchy. A file system node
102is created for the device along the specified registration path.
103
104
105@example
106Figure  of the Mount Table Processing goes here.
107@end example
108
109
110Note: Other file systems can be mounted but they are mounted onto points
111(directory mount points) in the base file system.
112
113
Note: See TracBrowser for help on using the repository browser.