diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-04-14 07:58:05 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-07-15 08:20:23 -0400 |
commit | 0d07cf5e53a21e35289adc3ab99b6804ff0c3833 (patch) | |
tree | c4879833d93bf616723003077318ecf0437214ec | |
parent | 93d2c159673325624ef3f2d14ededfcdf76f948b (diff) |
docs: early-userspace: convert docs to ReST and rename to *.rst
The two files there describes a Kernel API feature, used to
support early userspace stuff. Prepare for moving them to
the kernel API book by converting to ReST format.
The conversion itself was quite trivial: just add/mark a few
titles as such, add a literal block markup, add a table markup
and a few blank lines, in order to make Sphinx to properly parse it.
At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | Documentation/early-userspace/buffer-format.rst (renamed from Documentation/early-userspace/buffer-format.txt) | 19 | ||||
-rw-r--r-- | Documentation/early-userspace/early_userspace_support.rst (renamed from Documentation/early-userspace/README) | 3 | ||||
-rw-r--r-- | Documentation/early-userspace/index.rst | 18 | ||||
-rw-r--r-- | Documentation/filesystems/nfs/nfsroot.txt | 2 | ||||
-rw-r--r-- | Documentation/filesystems/ramfs-rootfs-initramfs.txt | 4 | ||||
-rw-r--r-- | usr/Kconfig | 2 |
6 files changed, 38 insertions, 10 deletions
diff --git a/Documentation/early-userspace/buffer-format.txt b/Documentation/early-userspace/buffer-format.rst index e1fd7f9dad16..7f74e301fdf3 100644 --- a/Documentation/early-userspace/buffer-format.txt +++ b/Documentation/early-userspace/buffer-format.rst | |||
@@ -1,8 +1,10 @@ | |||
1 | initramfs buffer format | 1 | ======================= |
2 | ----------------------- | 2 | initramfs buffer format |
3 | ======================= | ||
3 | 4 | ||
4 | Al Viro, H. Peter Anvin | 5 | Al Viro, H. Peter Anvin |
5 | Last revision: 2002-01-13 | 6 | |
7 | Last revision: 2002-01-13 | ||
6 | 8 | ||
7 | Starting with kernel 2.5.x, the old "initial ramdisk" protocol is | 9 | Starting with kernel 2.5.x, the old "initial ramdisk" protocol is |
8 | getting {replaced/complemented} with the new "initial ramfs" | 10 | getting {replaced/complemented} with the new "initial ramfs" |
@@ -18,7 +20,8 @@ archive can be compressed using gzip(1). One valid version of an | |||
18 | initramfs buffer is thus a single .cpio.gz file. | 20 | initramfs buffer is thus a single .cpio.gz file. |
19 | 21 | ||
20 | The full format of the initramfs buffer is defined by the following | 22 | The full format of the initramfs buffer is defined by the following |
21 | grammar, where: | 23 | grammar, where:: |
24 | |||
22 | * is used to indicate "0 or more occurrences of" | 25 | * is used to indicate "0 or more occurrences of" |
23 | (|) indicates alternatives | 26 | (|) indicates alternatives |
24 | + indicates concatenation | 27 | + indicates concatenation |
@@ -49,7 +52,9 @@ hexadecimal ASCII numbers fully padded with '0' on the left to the | |||
49 | full width of the field, for example, the integer 4780 is represented | 52 | full width of the field, for example, the integer 4780 is represented |
50 | by the ASCII string "000012ac"): | 53 | by the ASCII string "000012ac"): |
51 | 54 | ||
55 | ============= ================== ============================================== | ||
52 | Field name Field size Meaning | 56 | Field name Field size Meaning |
57 | ============= ================== ============================================== | ||
53 | c_magic 6 bytes The string "070701" or "070702" | 58 | c_magic 6 bytes The string "070701" or "070702" |
54 | c_ino 8 bytes File inode number | 59 | c_ino 8 bytes File inode number |
55 | c_mode 8 bytes File mode and permissions | 60 | c_mode 8 bytes File mode and permissions |
@@ -65,6 +70,7 @@ c_rmin 8 bytes Minor part of device node reference | |||
65 | c_namesize 8 bytes Length of filename, including final \0 | 70 | c_namesize 8 bytes Length of filename, including final \0 |
66 | c_chksum 8 bytes Checksum of data field if c_magic is 070702; | 71 | c_chksum 8 bytes Checksum of data field if c_magic is 070702; |
67 | otherwise zero | 72 | otherwise zero |
73 | ============= ================== ============================================== | ||
68 | 74 | ||
69 | The c_mode field matches the contents of st_mode returned by stat(2) | 75 | The c_mode field matches the contents of st_mode returned by stat(2) |
70 | on Linux, and encodes the file type and file permissions. | 76 | on Linux, and encodes the file type and file permissions. |
@@ -82,7 +88,8 @@ If the filename is "TRAILER!!!" this is actually an end-of-archive | |||
82 | marker; the c_filesize for an end-of-archive marker must be zero. | 88 | marker; the c_filesize for an end-of-archive marker must be zero. |
83 | 89 | ||
84 | 90 | ||
85 | *** Handling of hard links | 91 | Handling of hard links |
92 | ====================== | ||
86 | 93 | ||
87 | When a nondirectory with c_nlink > 1 is seen, the (c_maj,c_min,c_ino) | 94 | When a nondirectory with c_nlink > 1 is seen, the (c_maj,c_min,c_ino) |
88 | tuple is looked up in a tuple buffer. If not found, it is entered in | 95 | tuple is looked up in a tuple buffer. If not found, it is entered in |
diff --git a/Documentation/early-userspace/README b/Documentation/early-userspace/early_userspace_support.rst index 955d667dc87e..3deefb34046b 100644 --- a/Documentation/early-userspace/README +++ b/Documentation/early-userspace/early_userspace_support.rst | |||
@@ -1,3 +1,4 @@ | |||
1 | ======================= | ||
1 | Early userspace support | 2 | Early userspace support |
2 | ======================= | 3 | ======================= |
3 | 4 | ||
@@ -26,6 +27,7 @@ archive to be used as the image or have the kernel build process build | |||
26 | the image from specifications. | 27 | the image from specifications. |
27 | 28 | ||
28 | CPIO ARCHIVE method | 29 | CPIO ARCHIVE method |
30 | ------------------- | ||
29 | 31 | ||
30 | You can create a cpio archive that contains the early userspace image. | 32 | You can create a cpio archive that contains the early userspace image. |
31 | Your cpio archive should be specified in CONFIG_INITRAMFS_SOURCE and it | 33 | Your cpio archive should be specified in CONFIG_INITRAMFS_SOURCE and it |
@@ -34,6 +36,7 @@ CONFIG_INITRAMFS_SOURCE and directory and file names are not allowed in | |||
34 | combination with a cpio archive. | 36 | combination with a cpio archive. |
35 | 37 | ||
36 | IMAGE BUILDING method | 38 | IMAGE BUILDING method |
39 | --------------------- | ||
37 | 40 | ||
38 | The kernel build process can also build an early userspace image from | 41 | The kernel build process can also build an early userspace image from |
39 | source parts rather than supplying a cpio archive. This method provides | 42 | source parts rather than supplying a cpio archive. This method provides |
diff --git a/Documentation/early-userspace/index.rst b/Documentation/early-userspace/index.rst new file mode 100644 index 000000000000..2b8eb6132058 --- /dev/null +++ b/Documentation/early-userspace/index.rst | |||
@@ -0,0 +1,18 @@ | |||
1 | :orphan: | ||
2 | |||
3 | =============== | ||
4 | Early Userspace | ||
5 | =============== | ||
6 | |||
7 | .. toctree:: | ||
8 | :maxdepth: 1 | ||
9 | |||
10 | early_userspace_support | ||
11 | buffer-format | ||
12 | |||
13 | .. only:: subproject and html | ||
14 | |||
15 | Indices | ||
16 | ======= | ||
17 | |||
18 | * :ref:`genindex` | ||
diff --git a/Documentation/filesystems/nfs/nfsroot.txt b/Documentation/filesystems/nfs/nfsroot.txt index d2963123eb1c..4862d3d77e27 100644 --- a/Documentation/filesystems/nfs/nfsroot.txt +++ b/Documentation/filesystems/nfs/nfsroot.txt | |||
@@ -239,7 +239,7 @@ rdinit=<executable file> | |||
239 | A description of the process of mounting the root file system can be | 239 | A description of the process of mounting the root file system can be |
240 | found in: | 240 | found in: |
241 | 241 | ||
242 | Documentation/early-userspace/README | 242 | Documentation/early-userspace/early_userspace_support.rst |
243 | 243 | ||
244 | 244 | ||
245 | 245 | ||
diff --git a/Documentation/filesystems/ramfs-rootfs-initramfs.txt b/Documentation/filesystems/ramfs-rootfs-initramfs.txt index 79637d227e85..fa985909dbca 100644 --- a/Documentation/filesystems/ramfs-rootfs-initramfs.txt +++ b/Documentation/filesystems/ramfs-rootfs-initramfs.txt | |||
@@ -105,7 +105,7 @@ All this differs from the old initrd in several ways: | |||
105 | - The old initrd file was a gzipped filesystem image (in some file format, | 105 | - The old initrd file was a gzipped filesystem image (in some file format, |
106 | such as ext2, that needed a driver built into the kernel), while the new | 106 | such as ext2, that needed a driver built into the kernel), while the new |
107 | initramfs archive is a gzipped cpio archive (like tar only simpler, | 107 | initramfs archive is a gzipped cpio archive (like tar only simpler, |
108 | see cpio(1) and Documentation/early-userspace/buffer-format.txt). The | 108 | see cpio(1) and Documentation/early-userspace/buffer-format.rst). The |
109 | kernel's cpio extraction code is not only extremely small, it's also | 109 | kernel's cpio extraction code is not only extremely small, it's also |
110 | __init text and data that can be discarded during the boot process. | 110 | __init text and data that can be discarded during the boot process. |
111 | 111 | ||
@@ -159,7 +159,7 @@ One advantage of the configuration file is that root access is not required to | |||
159 | set permissions or create device nodes in the new archive. (Note that those | 159 | set permissions or create device nodes in the new archive. (Note that those |
160 | two example "file" entries expect to find files named "init.sh" and "busybox" in | 160 | two example "file" entries expect to find files named "init.sh" and "busybox" in |
161 | a directory called "initramfs", under the linux-2.6.* directory. See | 161 | a directory called "initramfs", under the linux-2.6.* directory. See |
162 | Documentation/early-userspace/README for more details.) | 162 | Documentation/early-userspace/early_userspace_support.rst for more details.) |
163 | 163 | ||
164 | The kernel does not depend on external cpio tools. If you specify a | 164 | The kernel does not depend on external cpio tools. If you specify a |
165 | directory instead of a configuration file, the kernel's build infrastructure | 165 | directory instead of a configuration file, the kernel's build infrastructure |
diff --git a/usr/Kconfig b/usr/Kconfig index 43658b8a975e..86e37e297278 100644 --- a/usr/Kconfig +++ b/usr/Kconfig | |||
@@ -18,7 +18,7 @@ config INITRAMFS_SOURCE | |||
18 | When multiple directories and files are specified then the | 18 | When multiple directories and files are specified then the |
19 | initramfs image will be the aggregate of all of them. | 19 | initramfs image will be the aggregate of all of them. |
20 | 20 | ||
21 | See <file:Documentation/early-userspace/README> for more details. | 21 | See <file:Documentation/early-userspace/early_userspace_support.rst> for more details. |
22 | 22 | ||
23 | If you are not sure, leave it blank. | 23 | If you are not sure, leave it blank. |
24 | 24 | ||