diff options
| author | Claudius Heine <ch@denx.de> | 2022-05-15 12:06:00 +0530 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-05-16 23:19:18 +0100 |
| commit | d5f64c38f12c2f09c378efc6ff1be621acf4249f (patch) | |
| tree | 19a9dae0c299edec7350dd1e208334516812ef3b /scripts/lib | |
| parent | 88c200c75187f4c2bbdcb738c5aeb30b69b25b9b (diff) | |
| download | poky-d5f64c38f12c2f09c378efc6ff1be621acf4249f.tar.gz | |
wic: added fspassno parameter to partition
The `fspassno` parameter allows to overwrite the value of the last
column (`fs_passno`) in the /etc/fstab of the target root file system.
This allows to have periodic file system checks.
(From OE-Core rev: b9b9f71e6f37bfbf954ade518391b242669481e3)
Signed-off-by: Claudius Heine <ch@denx.de>
Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/wic/help.py | 6 | ||||
| -rw-r--r-- | scripts/lib/wic/ksparser.py | 1 | ||||
| -rw-r--r-- | scripts/lib/wic/partition.py | 1 | ||||
| -rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 3 |
4 files changed, 10 insertions, 1 deletions
diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py index 4ff7470a6a..73e3380cde 100644 --- a/scripts/lib/wic/help.py +++ b/scripts/lib/wic/help.py | |||
| @@ -940,6 +940,12 @@ DESCRIPTION | |||
| 940 | quotes. If not specified, the default string is | 940 | quotes. If not specified, the default string is |
| 941 | "defaults". | 941 | "defaults". |
| 942 | 942 | ||
| 943 | --fspassno: Specifies the order in which filesystem checks are done | ||
| 944 | at boot time by fsck. See fs_passno parameter of | ||
| 945 | fstab(5). This parameter will be copied into the | ||
| 946 | /etc/fstab file of the installed system. If not | ||
| 947 | specified the default value of "0" will be used. | ||
| 948 | |||
| 943 | --label label: Specifies the label to give to the filesystem | 949 | --label label: Specifies the label to give to the filesystem |
| 944 | to be made on the partition. If the given | 950 | to be made on the partition. If the given |
| 945 | label is already in use by another filesystem, | 951 | label is already in use by another filesystem, |
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py index 0df9eb0d05..a49b7b97c4 100644 --- a/scripts/lib/wic/ksparser.py +++ b/scripts/lib/wic/ksparser.py | |||
| @@ -155,6 +155,7 @@ class KickStart(): | |||
| 155 | part.add_argument('--change-directory') | 155 | part.add_argument('--change-directory') |
| 156 | part.add_argument("--extra-space", type=sizetype("M")) | 156 | part.add_argument("--extra-space", type=sizetype("M")) |
| 157 | part.add_argument('--fsoptions', dest='fsopts') | 157 | part.add_argument('--fsoptions', dest='fsopts') |
| 158 | part.add_argument('--fspassno', dest='fspassno') | ||
| 158 | part.add_argument('--fstype', default='vfat', | 159 | part.add_argument('--fstype', default='vfat', |
| 159 | choices=('ext2', 'ext3', 'ext4', 'btrfs', | 160 | choices=('ext2', 'ext3', 'ext4', 'btrfs', |
| 160 | 'squashfs', 'vfat', 'msdos', 'erofs', | 161 | 'squashfs', 'vfat', 'msdos', 'erofs', |
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 09e491dd49..e50871b8d7 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py | |||
| @@ -33,6 +33,7 @@ class Partition(): | |||
| 33 | self.include_path = args.include_path | 33 | self.include_path = args.include_path |
| 34 | self.change_directory = args.change_directory | 34 | self.change_directory = args.change_directory |
| 35 | self.fsopts = args.fsopts | 35 | self.fsopts = args.fsopts |
| 36 | self.fspassno = args.fspassno | ||
| 36 | self.fstype = args.fstype | 37 | self.fstype = args.fstype |
| 37 | self.label = args.label | 38 | self.label = args.label |
| 38 | self.use_label = args.use_label | 39 | self.use_label = args.use_label |
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 4d0b836ef6..da483daed5 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
| @@ -138,8 +138,9 @@ class DirectPlugin(ImagerPlugin): | |||
| 138 | device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum) | 138 | device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum) |
| 139 | 139 | ||
| 140 | opts = part.fsopts if part.fsopts else "defaults" | 140 | opts = part.fsopts if part.fsopts else "defaults" |
| 141 | passno = part.fspassno if part.fspassno else "0" | ||
| 141 | line = "\t".join([device_name, part.mountpoint, part.fstype, | 142 | line = "\t".join([device_name, part.mountpoint, part.fstype, |
| 142 | opts, "0", "0"]) + "\n" | 143 | opts, "0", passno]) + "\n" |
| 143 | 144 | ||
| 144 | fstab_lines.append(line) | 145 | fstab_lines.append(line) |
| 145 | updated = True | 146 | updated = True |
