summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-11-22 15:19:58 +0000
committerGitHub <noreply@github.com>2019-11-22 15:19:58 +0000
commita58a53b7fd864dbf5835b25e232c76bc0752deef (patch)
tree5d618003d6947c4f84e0b222685bded3650e55df
parent512214c29530372ecb9a259eec8cb6f84e2a177c (diff)
parenta2a33efa29fdb10ffa8e5d77106d2d705ddabb8f (diff)
downloadgenimage-a58a53b7fd864dbf5835b25e232c76bc0752deef.tar.gz
genimage-a58a53b7fd864dbf5835b25e232c76bc0752deef.tar.xz
Merge pull request #83 from michaelolbrich/ext-test-doc
expand mke2fs test and add some more docs
-rw-r--r--README.rst15
-rw-r--r--test/mke2fs.config1
-rw-r--r--test/mke2fs.dump56
3 files changed, 41 insertions, 31 deletions
diff --git a/README.rst b/README.rst
index 6993de3..620b9da 100644
--- a/README.rst
+++ b/README.rst
@@ -155,16 +155,27 @@ Generates ext* images.
Options:
-:extraargs: Extra arguments passed to genext2fs
+:use-mke2fs: If set to true, then mke2fs is used to create the
+ image. Otherwise, genext2fs is used. Defaults to false.
+:mke2fs-conf: mke2fs.conf that should be used. If unspecified, the system
+ default is used.
+:extraargs: Extra arguments passed to genext2fs or mke2fs.
:features: Filesystem features. Passed to the ``-O`` option of tune2fs. This
is a comma separated list of enabled or disabled features. See
- ``man tune2fs`` for features. Default for ext3 images is
+ ``man ext4`` for features.
+ For genext2fs all feature are specified. Default for ext3 images is
``has_journal``. Default for ext4 images is
``extents,uninit_bg,dir_index,has_journal``.
+ For mke2fs these features are added in addition to the default
+ features of the ext type. Already enabled features can be disabled
+ by prefixing the feature with ``^``.
:label: Specify the volume-label. Passed to the ``-L`` option of tune2fs
:fs-timestamp: Sets different timestamps in the image. Sets the given timestamp
using the debugfs commands ``set_current_time``,
``set_super_value mkfs_time`` and ``set_super_value lastcheck``
+:root-owner: User and group IDs for the root directory. Defaults to ``0:0``.
+:usage-type: Specify the usage type for the filesystem. Only valid with mke2fs.
+ More details can be found in the mke2fs man-page.
FIT
***
diff --git a/test/mke2fs.config b/test/mke2fs.config
index 877b4d5..7f4518a 100644
--- a/test/mke2fs.config
+++ b/test/mke2fs.config
@@ -5,6 +5,7 @@ image mke2fs.ext4 {
use-mke2fs = true
mke2fs-conf = "mke2fs.conf"
extraargs = "-U 12345678-1234-1234-1234-1234567890ab"
+ features = "^resize_inode,quota"
}
size = 32M
}
diff --git a/test/mke2fs.dump b/test/mke2fs.dump
index 2e30c15..8b88090 100644
--- a/test/mke2fs.dump
+++ b/test/mke2fs.dump
@@ -2,7 +2,7 @@ Filesystem volume name: mke2fs
Last mounted on: <not available>
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super dir_nlink extra_isize metadata_csum
+Filesystem features: has_journal ext_attr dir_index filetype extent 64bit flex_bg sparse_super dir_nlink extra_isize quota metadata_csum
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
@@ -11,13 +11,12 @@ Filesystem OS type: Linux
Inode count: 8192
Block count: 32768
Reserved block count: 1638
-Free blocks: 26838
+Free blocks: 27592
Free inodes: 8141
First block: 1
Block size: 1024
Fragment size: 1024
Group descriptor size: 64
-Reserved GDT blocks: 255
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2048
@@ -30,7 +29,7 @@ Mount count: 0
Maximum mount count: -1
Last checked: Sat Jan 1 00:00:00 2000
Check interval: 0 (<none>)
-Lifetime writes: 343 kB
+Lifetime writes: 123 kB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
@@ -38,6 +37,8 @@ Inode size: 128
Journal inode: 8
Default directory hash: half_md4
Journal backup: inode blocks
+User quota inode: 3
+Group quota inode: 4
Checksum type: crc32c
Journal features: (none)
Journal size: 4096k
@@ -46,37 +47,34 @@ Journal sequence: 0x00000001
Journal start: 0
-Group 0: (Blocks 1-8192) csum 0xcb99 [ITABLE_ZEROED]
+Group 0: (Blocks 1-8192) csum 0x62cb [ITABLE_ZEROED]
Primary superblock at 1, Group descriptors at 2-2
- Reserved GDT blocks at 3-257
- Block bitmap at 258 (+257), csum 0x064f6fdd
- Inode bitmap at 262 (+261), csum 0xb1052088
- Inode table at 266-521 (+265)
- 6873 free blocks, 1997 free inodes, 18 directories, 1997 unused inodes
- Free blocks: 1320-8192
+ Block bitmap at 3 (+2), csum 0xb4967804
+ Inode bitmap at 7 (+6), csum 0xb1052088
+ Inode table at 11-266 (+10)
+ 7117 free blocks, 1997 free inodes, 18 directories, 1997 unused inodes
+ Free blocks: 1076-8192
Free inodes: 52-2048
-Group 1: (Blocks 8193-16384) csum 0xfabf [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
+Group 1: (Blocks 8193-16384) csum 0x7d4b [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Backup superblock at 8193, Group descriptors at 8194-8194
- Reserved GDT blocks at 8195-8449
- Block bitmap at 259 (bg #0 + 258), csum 0x00000000
- Inode bitmap at 263 (bg #0 + 262), csum 0x00000000
- Inode table at 522-777 (bg #0 + 521)
- 7935 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
- Free blocks: 8450-16384
+ Block bitmap at 4 (bg #0 + 3), csum 0x00000000
+ Inode bitmap at 8 (bg #0 + 7), csum 0x00000000
+ Inode table at 267-522 (bg #0 + 266)
+ 8190 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 8195-16384
Free inodes: 2049-4096
-Group 2: (Blocks 16385-24576) csum 0xada9 [INODE_UNINIT, ITABLE_ZEROED]
- Block bitmap at 260 (bg #0 + 259), csum 0x040008b2
- Inode bitmap at 264 (bg #0 + 263), csum 0x00000000
- Inode table at 778-1033 (bg #0 + 777)
+Group 2: (Blocks 16385-24576) csum 0x9725 [INODE_UNINIT, ITABLE_ZEROED]
+ Block bitmap at 5 (bg #0 + 4), csum 0x040008b2
+ Inode bitmap at 9 (bg #0 + 8), csum 0x00000000
+ Inode table at 523-778 (bg #0 + 522)
4096 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
Free blocks: 20481-24576
Free inodes: 4097-6144
-Group 3: (Blocks 24577-32767) csum 0x8723 [INODE_UNINIT, ITABLE_ZEROED]
+Group 3: (Blocks 24577-32767) csum 0xc701 [INODE_UNINIT, ITABLE_ZEROED]
Backup superblock at 24577, Group descriptors at 24578-24578
- Reserved GDT blocks at 24579-24833
- Block bitmap at 261 (bg #0 + 260), csum 0x78c21b7c
- Inode bitmap at 265 (bg #0 + 264), csum 0x00000000
- Inode table at 1034-1289 (bg #0 + 1033)
- 7934 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
- Free blocks: 24834-32767
+ Block bitmap at 6 (bg #0 + 5), csum 0x4327ef1c
+ Inode bitmap at 10 (bg #0 + 9), csum 0x00000000
+ Inode table at 779-1034 (bg #0 + 778)
+ 8189 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes
+ Free blocks: 24579-32767
Free inodes: 6145-8192