diff options
| author | Zev Weiss <zev@bewilderbeest.net> | 2022-06-30 00:54:10 +0300 |
|---|---|---|
| committer | Patrick Williams <patrick@stwcx.xyz> | 2022-07-05 15:20:43 +0300 |
| commit | bab338782612469fce164efbc882c0b5cfa4efce (patch) | |
| tree | ed7c43e1a1d6b2853e57e87ffdc071579d22f6ed | |
| parent | c53d8ce8e8583bb0fce090a2f686776045d77277 (diff) | |
| download | openbmc-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
| -rw-r--r-- | meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh | 4 |
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 |
