Mercurial > flash_v2
annotate packages/fs/fat/current/doc/README.txt @ 1777:c16341b1bac6 default tip
* Added execute permissions to files missed in conversion from CVS
| author | alexs |
|---|---|
| date | Mon, 12 Oct 2009 02:26:09 +0100 |
| parents | f2453fae08d4 |
| children |
| rev | line source |
|---|---|
|
1476
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
1 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
2 FAT Filesystem README |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
3 +++++++++++++++++++++ |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
4 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
5 This file serves as documentation for the FAT filesystem until full |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
6 documentation can be generated. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
7 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
8 Configuring FAT |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
9 =============== |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
10 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
11 The FAT filesystem support consists of several packages: |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
12 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
13 CYGPKG_FS_FAT |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
14 The FAT filesystem itself. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
15 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
16 CYGPKG_BLOCK_LIB |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
17 Block library. This actually implements the block cache. It |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
18 depends on the Linux compatibility library |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
19 (CYGPKG_LINUX_COMPAT) for support. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
20 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
21 CYGPKG_IO_DISK |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
22 Disk device IO support. This provides the top level disk |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
23 driver functions. It also interprets partition tables and |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
24 provides a separate access channel for each partition. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
25 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
26 CYGPKG_DEVS_DISK_ECOSYNTH |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
27 This is the only low level device driver currently known to |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
28 work. This driver treats a file in the Linux filesystem as a |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
29 disk image. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
30 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
31 CYGPKG_DEVS_DISK_V85X_EDB_V850 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
32 This is a device driver for an IDE compatible Compact Flash |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
33 device on a platform that is otherwise unsupported. It has not |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
34 been tested. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
35 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
36 In addition the above new packages, FAT support also relies on the |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
37 following existing packages: |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
38 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
39 CYGPKG_IO_FILEIO |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
40 The File IO package. This provides the API by which the FAT |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
41 filesystem is accessed. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
42 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
43 CYGPKG_IO |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
44 Device IO package. This provides all the infrastructure for |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
45 the disk devices. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
46 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
47 CYGPKG_LIBC_STRING |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
48 Strings library. This provides the string and memory move and |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
49 compare routines used by the filesystem. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
50 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
51 CYGPKG_MEMALLOC |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
52 The FAT filesystem currently uses malloc() to allocate |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
53 its memory resources, so this package is required. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
54 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
55 The doc directory that contains this file contains a number of .ecm |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
56 files that will add the FAT filesystem to most configurations. These |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
57 should be used as a basis for creating new configurations. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
58 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
59 Device Drivers |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
60 ============== |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
61 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
62 The disk device interface is divided into a generic layer in the |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
63 CYGPKG_IO_DISK package and drivers for each device. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
64 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
65 Apart from providing the main API, the other thing that the DISK |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
66 package does is to provide support for disk partitions. It interprets |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
67 the on-disk data structures and provides an independent channel to |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
68 access each partition independently. Partitions are referenced using |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
69 an additional element to the device name. If the device is named |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
70 "/dev/disk0" then "/dev/disk0/1" refers to partition 1, "/dev/disk0/2" |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
71 to partition 2 and so on. If the disk is not partitioned, for example |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
72 a floppy disk, then "/dev/disk0/0" refers to the whole disk. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
73 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
74 There are two device drivers currently supported: |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
75 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
76 Linux Synthetic Driver |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
77 ---------------------- |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
78 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
79 This driver treats a disk file on Linux as a disk image and read or |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
80 writes blocks from/to it to simulate disk IO. At present it supports |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
81 just a single disk device image. There are a number of configuration |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
82 options for this device, see the CDL file for details, and the .ecm |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
83 files for examples. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
84 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
85 EDB V850 Compact Flash Device |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
86 ----------------------------- |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
87 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
88 This uses an IDE interface to a Compact Flash device. This is actually |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
89 for a platform that is not supported in the current source tree, so |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
90 cannot be tested. However, it should be possible to adapt the code for |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
91 other devices. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
92 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
93 Testing |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
94 ======= |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
95 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
96 There is currently just one test available for the FAT filesystem, |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
97 fileio1. This test will currently only run on the Linux synthetic |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
98 target and needs a special disk image. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
99 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
100 To run the test you first need to configure the synthetic disk driver |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
101 to access the disk image. This is most easily done by importing the |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
102 fat16.ecm file. A complete build would look like this: |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
103 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
104 $ mkdir linux.fat16 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
105 $ cd linux.fat16 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
106 $ ecosconfig new linux |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
107 $ ecosconfig import $ECOS_REPOSITORY/fs/fat/current/doc/fat16.ecm |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
108 $ ecosconfig tree |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
109 $ make tests |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
110 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
111 To make the disk image, first ensure that there is at least 10MB of |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
112 space available in your /tmp directory. Add the following two lines to |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
113 your ~/.mtoolsrc file (you may need to create it): |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
114 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
115 drive z: file="/tmp/disk0.img" partition=1 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
116 drive y: file="/tmp/disk0.img" partition=2 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
117 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
118 Now run the mkdisk0 shell script from the fs/fat/doc directory: |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
119 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
120 $ source $ECOS_REPOSITORY/fs/fat/current/doc/mkdisk0 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
121 20000+0 records in |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
122 20000+0 records out |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
123 Warning: no active (bootable) partition present |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
124 $ |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
125 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
126 Ignore the warning, we are not interested in booting this disk. |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
127 |
|
f2453fae08d4
Added support for FAT filesystem. Several packages, see the individual
nickg
parents:
diff
changeset
|
128 It should now be possible to run the fileio1 test program. |
