diff options
-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} |