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,20 @@
SUMMARY = "Enable Host Boot"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${HPEBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
inherit obmc-phosphor-systemd
HOST_BOOT_SERVICE = "host-boot-enable.service"
SYSTEMD_SERVICE:${PN} += "${HOST_BOOT_SERVICE}"
HOST_BOOT_FMT = "../${HOST_BOOT_SERVICE}:multi-user.target.wants/${HOST_BOOT_SERVICE}"
SYSTEMD_LINK_${PN} += "${HOST_BOOT_FMT}"
SRC_URI += "file://host-boot-enable.service"
SRC_URI += "file://host-boot-enable.sh"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/host-boot-enable.sh ${D}${bindir}
}
@@ -0,0 +1,15 @@
[Unit]
Description=Enable Host Boot
Wants=phosphor-ipmi-host.service
After=phosphor-ipmi-host.service
[Service]
Type=simple
ExecStart=/bin/sh -c "host-boot-enable.sh"
SyslogIdentifier=host-boot-enable
Restart=always
RestartSec=5
StartLimitInterval=0
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,38 @@
#!/bin/sh
findmtd() {
m=$(grep -xl "$1" /sys/class/mtd/*/name)
m=${m%/name}
m=${m##*/}
echo "$m"
}
set -- host-prime host-second vrom-prime vrom-second
for f in "$@"
do
image=$(findmtd "${f}")
if test -z "$image"
then
echo "Unable to find mtd partition for ${f}"
exit 1
fi
done
#enable vrom
# host-prime to vrom-prime
dd if="/dev/$(findmtd host-prime)" of="/dev/$(findmtd vrom-prime)"
# host-second to vrom-second
dd if="/dev/$(findmtd host-second)" of="/dev/$(findmtd vrom-second)"
echo 0x1800008a > /sys/class/soc/srom/vromoff
val=$(( ("$(devmem 0xd1000006 8)" && 0xff) | 0x04 ))
devmem 0xd1000006 8 $val
devmem 0xd1000018 8 0xff
while true
do
devmem 0xd100000f 8 0x14
sleep 1
done