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,22 @@
#!/bin/sh
sigfile="/tmp/bmc.sig"
imagebmc="/run/initramfs/image-bmc"
bmcimage="/run/initramfs/bmc-image"
publickey="/etc/activationdata/OpenBMC/publickey"
bmclog="/tmp/update-bmc.log"
if [ -f $publickey ];then
r="$(openssl dgst -verify $publickey -sha256 -signature $sigfile $bmcimage)"
echo "$r" > $bmclog
if [ "Verified OK" = "$r" ]; then
mv $bmcimage $imagebmc
rm -f $sigfile
exit 0
else
exit 1
fi
else
echo "No $publickey file" > $bmclog
exit 1
fi
@@ -0,0 +1,21 @@
[{
"blob": "/flash/image",
"handler": {
"type": "file",
"path": "/run/initramfs/bmc-image"
},
"actions": {
"preparation": {
"type": "skip"
},
"verification": {
"type": "systemd",
"unit": "phosphor-ipmi-flash-bmc-verify.service"
},
"update": {
"type": "systemd",
"unit": "reboot.target",
"mode": "replace-irreversibly"
}
}
}]
@@ -0,0 +1,9 @@
[Unit]
Description=Phosphor-ipmi-flash bmc verify service
[Service]
ExecStart=/usr/bin/bmc-verify.sh
Type=oneshot
[Install]
WantedBy=phosphor-ipmi-flash-bmc-verify.target