summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/initrdscripts
diff options
context:
space:
mode:
authorZev Weiss <zev@bewilderbeest.net>2022-06-30 00:54:10 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-07-05 15:20:43 +0300
commitbab338782612469fce164efbc882c0b5cfa4efce (patch)
treeed7c43e1a1d6b2853e57e87ffdc071579d22f6ed /meta-phosphor/recipes-phosphor/initrdscripts
parentc53d8ce8e8583bb0fce090a2f686776045d77277 (diff)
downloadopenbmc-bab338782612469fce164efbc882c0b5cfa4efce.tar.xz
initrdscripts: exec switch_root(8) instead of chroot(1)
This should address for NOR-flash systems the same problem that was fixed for MMC-based systems in commit b5cbe9bbba67 ("phosphor-mmc-init: exec switch_root(8) rather than chroot(1)"). By virtue of switch_root(8) wiping out everything in the old root it also avoids wasting a few megabytes of memory keeping that filesystem around without any way of reaching it. Signed-off-by: Zev Weiss <zev@bewilderbeest.net> Change-Id: Ib87c7dcacca45aff3fb2c3fbc288dbb80160a427
Diffstat (limited to 'meta-phosphor/recipes-phosphor/initrdscripts')
-rw-r--r--meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh
index 2a32d26ffc..f778f9276e 100644
--- a/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh
+++ b/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh
@@ -439,6 +439,4 @@ do
mount --move $f root/$f
done
-# switch_root /root $init
-exec chroot /root $init
-
+exec switch_root /root $init