From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: Henning Schild <henning.schild@siemens.com>
Subject: [PATCH 1/9] wic: added fspassno parameter to partition
Date: Fri, 5 Aug 2022 20:51:36 +0200 [thread overview]
Message-ID: <e8259fc8360b0bb3dbe733c9b1c594f0a05bcf8c.1659725504.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1659725504.git.jan.kiszka@siemens.com>
From: Claudius Heine <ch@denx.de>
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.
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>
---
scripts/lib/wic/help.py | 6 ++++++
scripts/lib/wic/ksparser.py | 1 +
scripts/lib/wic/partition.py | 1 +
scripts/lib/wic/plugins/imager/direct.py | 3 ++-
4 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index 4ff7470a..73e3380c 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -940,6 +940,12 @@ DESCRIPTION
quotes. If not specified, the default string is
"defaults".
+ --fspassno: Specifies the order in which filesystem checks are done
+ at boot time by fsck. See fs_passno parameter of
+ fstab(5). This parameter will be copied into the
+ /etc/fstab file of the installed system. If not
+ specified the default value of "0" will be used.
+
--label label: Specifies the label to give to the filesystem
to be made on the partition. If the given
label is already in use by another filesystem,
diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 0df9eb0d..a49b7b97 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -155,6 +155,7 @@ class KickStart():
part.add_argument('--change-directory')
part.add_argument("--extra-space", type=sizetype("M"))
part.add_argument('--fsoptions', dest='fsopts')
+ part.add_argument('--fspassno', dest='fspassno')
part.add_argument('--fstype', default='vfat',
choices=('ext2', 'ext3', 'ext4', 'btrfs',
'squashfs', 'vfat', 'msdos', 'erofs',
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 09e491dd..e50871b8 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -33,6 +33,7 @@ class Partition():
self.include_path = args.include_path
self.change_directory = args.change_directory
self.fsopts = args.fsopts
+ self.fspassno = args.fspassno
self.fstype = args.fstype
self.label = args.label
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 4d0b836e..da483dae 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -138,8 +138,9 @@ class DirectPlugin(ImagerPlugin):
device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
opts = part.fsopts if part.fsopts else "defaults"
+ passno = part.fspassno if part.fspassno else "0"
line = "\t".join([device_name, part.mountpoint, part.fstype,
- opts, "0", "0"]) + "\n"
+ opts, "0", passno]) + "\n"
fstab_lines.append(line)
updated = True
--
2.35.3
next prev parent reply other threads:[~2022-08-05 18:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 18:51 [PATCH 0/9] Update wic Jan Kiszka
2022-08-05 18:51 ` Jan Kiszka [this message]
2022-08-05 18:51 ` [PATCH 2/9] wic/plugins/images/direct: Allow changes in fstab on rootfs Jan Kiszka
2022-08-05 18:51 ` [PATCH 3/9] wic: fix WicError message Jan Kiszka
2022-08-05 18:51 ` [PATCH 4/9] wic/plugins/rootfs: Fix NameError for 'orig_path' Jan Kiszka
2022-08-05 18:51 ` [PATCH 5/9] wic: add target tools to PATH when executing native commands Jan Kiszka
2022-08-05 18:51 ` [PATCH 6/9] wic/bootimg-efi: use cross objcopy when building unified kernel image Jan Kiszka
2022-08-05 18:51 ` [PATCH 7/9] wic/bootimg-efi: Factor out some common bits Jan Kiszka
2022-08-05 18:51 ` [PATCH 8/9] wic/bootimg-efi: Add support for loading devicetree files Jan Kiszka
2022-08-05 18:51 ` [PATCH 9/9] wic: bootimg-efi-isar: Sync with latest upstream changes Jan Kiszka
2022-08-15 8:23 ` [PATCH 0/9] Update wic Anton Mikanovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e8259fc8360b0bb3dbe733c9b1c594f0a05bcf8c.1659725504.git.jan.kiszka@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox