summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-04-14 07:58:05 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-07-15 08:20:23 -0400
commit0d07cf5e53a21e35289adc3ab99b6804ff0c3833 (patch)
treec4879833d93bf616723003077318ecf0437214ec
parent93d2c159673325624ef3f2d14ededfcdf76f948b (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.rst18
-rw-r--r--Documentation/filesystems/nfs/nfsroot.txt2
-rw-r--r--Documentation/filesystems/ramfs-rootfs-initramfs.txt4
-rw-r--r--usr/Kconfig2
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 ----------------------- 2initramfs buffer format
3=======================
3 4
4 Al Viro, H. Peter Anvin 5Al Viro, H. Peter Anvin
5 Last revision: 2002-01-13 6
7Last revision: 2002-01-13
6 8
7Starting with kernel 2.5.x, the old "initial ramdisk" protocol is 9Starting with kernel 2.5.x, the old "initial ramdisk" protocol is
8getting {replaced/complemented} with the new "initial ramfs" 10getting {replaced/complemented} with the new "initial ramfs"
@@ -18,7 +20,8 @@ archive can be compressed using gzip(1). One valid version of an
18initramfs buffer is thus a single .cpio.gz file. 20initramfs buffer is thus a single .cpio.gz file.
19 21
20The full format of the initramfs buffer is defined by the following 22The full format of the initramfs buffer is defined by the following
21grammar, where: 23grammar, 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
49full width of the field, for example, the integer 4780 is represented 52full width of the field, for example, the integer 4780 is represented
50by the ASCII string "000012ac"): 53by the ASCII string "000012ac"):
51 54
55============= ================== ==============================================
52Field name Field size Meaning 56Field name Field size Meaning
57============= ================== ==============================================
53c_magic 6 bytes The string "070701" or "070702" 58c_magic 6 bytes The string "070701" or "070702"
54c_ino 8 bytes File inode number 59c_ino 8 bytes File inode number
55c_mode 8 bytes File mode and permissions 60c_mode 8 bytes File mode and permissions
@@ -65,6 +70,7 @@ c_rmin 8 bytes Minor part of device node reference
65c_namesize 8 bytes Length of filename, including final \0 70c_namesize 8 bytes Length of filename, including final \0
66c_chksum 8 bytes Checksum of data field if c_magic is 070702; 71c_chksum 8 bytes Checksum of data field if c_magic is 070702;
67 otherwise zero 72 otherwise zero
73============= ================== ==============================================
68 74
69The c_mode field matches the contents of st_mode returned by stat(2) 75The c_mode field matches the contents of st_mode returned by stat(2)
70on Linux, and encodes the file type and file permissions. 76on 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
82marker; the c_filesize for an end-of-archive marker must be zero. 88marker; the c_filesize for an end-of-archive marker must be zero.
83 89
84 90
85*** Handling of hard links 91Handling of hard links
92======================
86 93
87When a nondirectory with c_nlink > 1 is seen, the (c_maj,c_min,c_ino) 94When a nondirectory with c_nlink > 1 is seen, the (c_maj,c_min,c_ino)
88tuple is looked up in a tuple buffer. If not found, it is entered in 95tuple 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=======================
1Early userspace support 2Early userspace support
2======================= 3=======================
3 4
@@ -26,6 +27,7 @@ archive to be used as the image or have the kernel build process build
26the image from specifications. 27the image from specifications.
27 28
28CPIO ARCHIVE method 29CPIO ARCHIVE method
30-------------------
29 31
30You can create a cpio archive that contains the early userspace image. 32You can create a cpio archive that contains the early userspace image.
31Your cpio archive should be specified in CONFIG_INITRAMFS_SOURCE and it 33Your 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
34combination with a cpio archive. 36combination with a cpio archive.
35 37
36IMAGE BUILDING method 38IMAGE BUILDING method
39---------------------
37 40
38The kernel build process can also build an early userspace image from 41The kernel build process can also build an early userspace image from
39source parts rather than supplying a cpio archive. This method provides 42source 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===============
4Early 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
159set permissions or create device nodes in the new archive. (Note that those 159set permissions or create device nodes in the new archive. (Note that those
160two example "file" entries expect to find files named "init.sh" and "busybox" in 160two example "file" entries expect to find files named "init.sh" and "busybox" in
161a directory called "initramfs", under the linux-2.6.* directory. See 161a directory called "initramfs", under the linux-2.6.* directory. See
162Documentation/early-userspace/README for more details.) 162Documentation/early-userspace/early_userspace_support.rst for more details.)
163 163
164The kernel does not depend on external cpio tools. If you specify a 164The kernel does not depend on external cpio tools. If you specify a
165directory instead of a configuration file, the kernel's build infrastructure 165directory 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