mirror of
https://git.yoctoproject.org/poky
synced 2026-09-24 22:36:21 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
6c10452955
commit
e78b72075f
@@ -33,9 +33,11 @@ rootfs_run() {
|
|||||||
elif [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
|
elif [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
|
||||||
root_label=`echo $bootparam_root | cut -c7-`
|
root_label=`echo $bootparam_root | cut -c7-`
|
||||||
bootparam_root="/dev/disk/by-label/$root_label"
|
bootparam_root="/dev/disk/by-label/$root_label"
|
||||||
|
elif echo "${bootparam_root}" | grep -q '^ubi[0-9]\+:'; then
|
||||||
|
bootparam_rootfstype="ubifs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "$bootparam_root" ]; then
|
if [ -e "$bootparam_root" ] || [ -n "$bootparam_rootfstype" ]; then
|
||||||
flags=""
|
flags=""
|
||||||
if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then
|
if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then
|
||||||
if [ -n "$bootparam_rootflags" ]; then
|
if [ -n "$bootparam_rootflags" ]; then
|
||||||
@@ -49,6 +51,7 @@ rootfs_run() {
|
|||||||
if [ -n "$bootparam_rootfstype" ]; then
|
if [ -n "$bootparam_rootfstype" ]; then
|
||||||
flags="$flags -t$bootparam_rootfstype"
|
flags="$flags -t$bootparam_rootfstype"
|
||||||
fi
|
fi
|
||||||
|
debug "mount $flags $bootparam_root $ROOTFS_DIR"
|
||||||
mount $flags $bootparam_root $ROOTFS_DIR
|
mount $flags $bootparam_root $ROOTFS_DIR
|
||||||
if mountpoint -q $ROOTFS_DIR; then
|
if mountpoint -q $ROOTFS_DIR; then
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user