summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Schweizer <walter.schweizer@siemens.com>2024-12-16 15:46:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-08 12:37:20 +0000
commite78b72075fe888847c2debb5749c81ce38762ef0 (patch)
tree0c29aba19cfbc2fe7b61cef6107f7a52c4c0338a
parent6c104529559db14891c1a3cede81047633b2c68d (diff)
downloadpoky-e78b72075fe888847c2debb5749c81ce38762ef0.tar.gz
initrdscripts: add UBI support
Mounting the rootfs failed when it was on UBI. This patch allows the rootfs to live on UBI. (From OE-Core rev: 197867f854cc19493b28fcd2300179cfc407e0a6) Signed-off-by: Walter Schweizer <walter.schweizer@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/rootfs5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 38e138f618..df0cbfb091 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -33,9 +33,11 @@ rootfs_run() {
33 elif [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then 33 elif [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
34 root_label=`echo $bootparam_root | cut -c7-` 34 root_label=`echo $bootparam_root | cut -c7-`
35 bootparam_root="/dev/disk/by-label/$root_label" 35 bootparam_root="/dev/disk/by-label/$root_label"
36 elif echo "${bootparam_root}" | grep -q '^ubi[0-9]\+:'; then
37 bootparam_rootfstype="ubifs"
36 fi 38 fi
37 39
38 if [ -e "$bootparam_root" ]; then 40 if [ -e "$bootparam_root" ] || [ -n "$bootparam_rootfstype" ]; then
39 flags="" 41 flags=""
40 if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then 42 if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then
41 if [ -n "$bootparam_rootflags" ]; then 43 if [ -n "$bootparam_rootflags" ]; then
@@ -49,6 +51,7 @@ rootfs_run() {
49 if [ -n "$bootparam_rootfstype" ]; then 51 if [ -n "$bootparam_rootfstype" ]; then
50 flags="$flags -t$bootparam_rootfstype" 52 flags="$flags -t$bootparam_rootfstype"
51 fi 53 fi
54 debug "mount $flags $bootparam_root $ROOTFS_DIR"
52 mount $flags $bootparam_root $ROOTFS_DIR 55 mount $flags $bootparam_root $ROOTFS_DIR
53 if mountpoint -q $ROOTFS_DIR; then 56 if mountpoint -q $ROOTFS_DIR; then
54 break 57 break