summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Schneider <johannes.schneider@leica-geosystems.com>2024-02-13 13:24:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-19 14:56:23 +0000
commit8a531d19909682ec2f4d373053cb8a9854f1399b (patch)
treefad2ca897f67b038f23f25e1f38d94e8e67c7c2b
parentde27ecd228e250a7b5a0b84f7d2096131c0110f1 (diff)
downloadpoky-8a531d19909682ec2f4d373053cb8a9854f1399b.tar.gz
initramfs-framework: overlayroot: fix kernel commandline clash
The initramfs-framwork takes kernel commandline options and converts them for internal use to variables following the 'bootparam_name' pattern. The overlayroot module uses 'bootparam_rootfstype' and 'bootparam_rootfsflags' which both collide with linux kernel parameters 'rootfstype' and 'rootfsflags'. This collision is solved by putting the variables in the namespace of the initramfs-framework module. (From OE-Core rev: ef20ef719c699b94fc52b81c520faa0b3714efeb) 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>
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/overlayroot4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot b/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot
index d40342dc59..10084228a8 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot
@@ -18,6 +18,8 @@
18# root filesystem, and requires 'rootrw=<foo>' to be passed as a 18# root filesystem, and requires 'rootrw=<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='
22# (defaults to 'ext4') and 'overlayrootfsflags=' ('defaults').
21# 23#
22# This module needs to be executed after the initramfs-module-rootfs 24# This module needs to be executed after the initramfs-module-rootfs
23# since it relies on it to mount the filesystem at initramfs startup 25# since it relies on it to mount the filesystem at initramfs startup
@@ -80,7 +82,7 @@ fi
80mkdir -p ${RWMOUNT} 82mkdir -p ${RWMOUNT}
81 83
82# Mount RW device 84# Mount RW device
83if mount -n -t ${bootparam_rootfstype:-ext4} -o ${bootparam_rootflags:-defaults} ${bootparam_rootrw} ${RWMOUNT} 85if mount -n -t ${bootparam_overlayrootfstype:-ext4} -o ${bootparam_overlayrootfsflags:-defaults} ${bootparam_rootrw} ${RWMOUNT}
84then 86then
85 # Set up overlay directories 87 # Set up overlay directories
86 mkdir -p ${UPPER_DIR} 88 mkdir -p ${UPPER_DIR}