Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,29 @@
diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh
index 2a32d26ffc..a8cc76d440 100644
--- a/obmc-init.sh
+++ b/obmc-init.sh
@@ -287,6 +287,14 @@ then
fi
fi
+# Ensure that we clean our rwfs on version change
+if mount $rwdev $rwdir -t $rwfst -o $rwopts; then
+ if ! cmp "$rwdir"/os-release /etc/os-release 2>/dev/null; then
+ echo "RWFS from older BMC version, cleaning"
+ touch $trigger
+ fi
+ umount "$rwdir"
+fi
if grep -w clean-rwfs-filesystem $optfile
then
echo "Cleaning of read-write overlay filesystem requested."
@@ -411,6 +419,9 @@ HERE
debug_takeover "$msg"
fi
+# Keep track of the last version to use this rwfs
+cp /etc/os-release "$rwdir"/os-release
+
# Empty workdir; do not remove workdir itself for it will fail to recreate it if
# RWFS is full
if [ -d $work ]
@@ -0,0 +1,8 @@
/etc/dropbear/dropbear_rsa_host_key
/etc/hostname
/etc/machine-id
/etc/systemd/network
/var/google
/var/lib/phosphor-inventory-manager
/var/lib/smbios/smbios2
/var/log/state
@@ -0,0 +1 @@
/home/root