diff options
author | Johannes Schneider <johannes.schneider@leica-geosystems.com> | 2024-02-13 13:24:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-19 14:56:23 +0000 |
commit | e6047ee5e8b8f8208477d52e6765d893a2bde42a (patch) | |
tree | 1bef8b063c578420b1c014bf1ee70ea520e04630 /meta | |
parent | 8a531d19909682ec2f4d373053cb8a9854f1399b (diff) | |
download | poky-e6047ee5e8b8f8208477d52e6765d893a2bde42a.tar.gz |
initramfs-framework: overlayroot: align bootparams with module name
Renaming the 'rootrw' kernel commandline parameter to
'overlayrootrwdev' to both align better with this modules name, and
point out the usage of the variable.
This patch also includes an if block to migrate the old 'rootrw'
block, should it be already used by someone.
(From OE-Core rev: a52b7f5c8ff3e50707b55843d9996983ab8efae2)
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/initrdscripts/initramfs-framework/overlayroot | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot b/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot index 10084228a8..0d41432878 100644 --- a/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot +++ b/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot | |||
@@ -15,7 +15,7 @@ | |||
15 | # accessing the original, unmodified rootfs at /rofs after boot. | 15 | # accessing the original, unmodified rootfs at /rofs after boot. |
16 | # | 16 | # |
17 | # It relies on the initramfs-module-rootfs to mount the original | 17 | # It relies on the initramfs-module-rootfs to mount the original |
18 | # root filesystem, and requires 'rootrw=<foo>' to be passed as a | 18 | # root filesystem, and requires 'overlayrootrwdev=<foo>' to be passed as a |
19 | # kernel parameter, specifying the device/partition intended to | 19 | # kernel parameter, specifying the device/partition intended to |
20 | # use as RW. | 20 | # use as RW. |
21 | # Mount options of the RW device can be tweaked with 'overlayrootfstype=' | 21 | # Mount options of the RW device can be tweaked with 'overlayrootfstype=' |
@@ -74,15 +74,19 @@ exit_gracefully() { | |||
74 | eval "finish_run" | 74 | eval "finish_run" |
75 | } | 75 | } |
76 | 76 | ||
77 | # migrate legacy parameter | ||
78 | if [ ! -z "$bootparam_rootrw" ]; then | ||
79 | bootparam_overlayrootrwdev="$bootparam_rootrw" | ||
80 | fi | ||
77 | 81 | ||
78 | if [ -z "$bootparam_rootrw" ]; then | 82 | if [ -z "$bootparam_overlayrootrwdev" ]; then |
79 | exit_gracefully "rootrw= kernel parameter doesn't exist and its required to mount the overlayfs" | 83 | exit_gracefully "overlayrootrwdev= kernel parameter doesn't exist and its required to mount the overlayfs" |
80 | fi | 84 | fi |
81 | 85 | ||
82 | mkdir -p ${RWMOUNT} | 86 | mkdir -p ${RWMOUNT} |
83 | 87 | ||
84 | # Mount RW device | 88 | # Mount RW device |
85 | if mount -n -t ${bootparam_overlayrootfstype:-ext4} -o ${bootparam_overlayrootfsflags:-defaults} ${bootparam_rootrw} ${RWMOUNT} | 89 | if mount -n -t ${bootparam_overlayrootfstype:-ext4} -o ${bootparam_overlayrootfsflags:-defaults} ${bootparam_overlayrootrwdev} ${RWMOUNT} |
86 | then | 90 | then |
87 | # Set up overlay directories | 91 | # Set up overlay directories |
88 | mkdir -p ${UPPER_DIR} | 92 | mkdir -p ${UPPER_DIR} |