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,4 @@
{
"buses": [0, 3, 4, 5, 6, 8, 9, 10, 12]
}
@@ -0,0 +1,8 @@
FILESEXTRAPATHS:append := ":${THISDIR}/${PN}"
SRC_URI:append = " \
file://blacklist.json \
"
do_install:append() {
install -m 0444 ${WORKDIR}/blacklist.json -D -t ${D}${datadir}/entity-manager
}
@@ -0,0 +1,23 @@
SUMMARY = "YAML configuration for VEGMAN"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit allarch
SRC_URI = " \
file://vegman-ipmi-sensors-static.yaml \
"
S = "${WORKDIR}"
do_install() {
install -m 0644 -D vegman-ipmi-sensors-static.yaml \
${D}${datadir}/${BPN}/ipmi-sensors-static.yaml
}
FILES:${PN}-dev = " \
${datadir}/${BPN}/ipmi-sensors-static.yaml \
"
ALLOW_EMPTY:${PN} = "1"
@@ -0,0 +1,17 @@
0x01:
entityID: 0x07
entityInstance: 1
sensorType: 0x21
path: /xyz/openbmc_project/led/groups/enclosure_identify_blink
sensorReadingType: 0x6F
mutability: Mutability::Read
serviceInterface: org.freedesktop.DBus.Properties
readingType: assertion
sensorNamePattern: nameLeaf
interfaces:
xyz.openbmc_project.Led.Group:
Asserted:
Offsets:
0x00:
type: bool
assert: true
@@ -0,0 +1,3 @@
baud = 115200
local-tty = ttyS3
local-tty-baud = 115200
@@ -0,0 +1,14 @@
[Unit]
Description=Phosphor Console Muxer listening on device /dev/%I
BindsTo=dev-%i.device
After=dev-%i.device
[Service]
ExecStartPre=/usr/sbin/uart-remapping.sh init
ExecStart=obmc-console-server --config {sysconfdir}/obmc-console.conf %i
ExecStopPost=/usr/sbin/uart-remapping.sh reset
SyslogIdentifier=obmc-console-server
Restart=always
[Install]
WantedBy={SYSTEMD_DEFAULT_TARGET}
@@ -0,0 +1,33 @@
#!/bin/bash -eu
function usage()
{
echo "Usage: $(basename "$0") init|reset"
}
if [ "$#" -ne "1" ] ; then
usage
exit 1;
fi
cmd="${1}"
UART_ROUTING_PATH="/sys/bus/platform/drivers/aspeed-uart-routing/1e78909c.uart-routing"
case "${cmd}" in
init)
echo -n "uart3" > ${UART_ROUTING_PATH}/uart1
echo -n "uart1" > ${UART_ROUTING_PATH}/uart3
echo -n "io1" > ${UART_ROUTING_PATH}/uart4
echo -n "uart4" > ${UART_ROUTING_PATH}/io1
;;
reset)
echo -n "io1" > ${UART_ROUTING_PATH}/uart1
echo -n "io3" > ${UART_ROUTING_PATH}/uart3
echo -n "io4" > ${UART_ROUTING_PATH}/uart4
echo -n "uart1" > ${UART_ROUTING_PATH}/io1
;;
*)
usage
exit 1;
;;
esac
@@ -0,0 +1,19 @@
FILESEXTRAPATHS:append := ":${THISDIR}/${PN}"
RDEPENDS:${PN} += "bash"
OBMC_CONSOLE_HOST_TTY = "ttyS2"
SRC_URI += " \
file://obmc-console@.service \
file://uart-remapping.sh \
"
inherit obmc-phosphor-systemd
SYSTEMD_SERVICE:${PN} += " \
${PN}@${OBMC_CONSOLE_HOST_TTY}.service \
"
do_install:append() {
rm -rf ${D}${nonarch_base_libdir}/udev/rules.d/80-obmc-console-uart.rules
install -m 0644 ${WORKDIR}/${PN}@.service -D -t ${D}${systemd_system_unitdir}
install -m 0755 ${WORKDIR}/uart-remapping.sh -D -t ${D}${sbindir}
}
@@ -0,0 +1 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
@@ -0,0 +1,178 @@
{
"0" : {
"name" : "Ipmb",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "ipmb",
"protocol_type" : "ipmb-1.0",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"1" : {
"name" : "eth0",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "lan-802.3",
"protocol_type" : "ipmb-1.0",
"session_supported" : "multi-session",
"is_ipmi" : true
}
},
"2" : {
"name" : "eth1",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "lan-802.3",
"protocol_type" : "ipmb-1.0",
"session_supported" : "multi-session",
"is_ipmi" : true
}
},
"3" : {
"name" : "RESERVED",
"is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "reserved",
"protocol_type" : "na",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"4" : {
"name" : "RESERVED",
"is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "reserved",
"protocol_type" : "na",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"5" : {
"name" : "RESERVED",
"is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "reserved",
"protocol_type" : "na",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"6" : {
"name" : "SMLINK",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "ipmb",
"protocol_type" : "ipmb-1.0",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"7" : {
"name" : "ipmi_kcs4",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "system-interface",
"protocol_type" : "kcs",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"8" : {
"name" : "INTRABMC",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "oem",
"protocol_type" : "oem",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"9" : {
"name" : "SIPMB",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "ipmb",
"protocol_type" : "ipmb-1.0",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"10" : {
"name" : "PCIE",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "ipmb",
"protocol_type" : "ipmb-1.0",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"11" : {
"name" : "RESERVED",
"is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "reserved",
"protocol_type" : "na",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"12" : {
"name" : "INTERNAL",
"is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "ipmb",
"protocol_type" : "ipmb-1.0",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"13" : {
"name" : "RESERVED",
"is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "reserved",
"protocol_type" : "na",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"14" : {
"name" : "SELF",
"is_valid" : false,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "unknown",
"protocol_type" : "na",
"session_supported" : "session-less",
"is_ipmi" : true
}
},
"15" : {
"name" : "ipmi_kcs3",
"is_valid" : true,
"active_sessions" : 0,
"channel_info" : {
"medium_type" : "system-interface",
"protocol_type" : "kcs",
"session_supported" : "session-less",
"is_ipmi" : true
}
}
}
@@ -0,0 +1,8 @@
{
"id": 0,
"revision": 0,
"addn_dev_support": 143,
"manuf_id": 49769,
"prod_id": 20,
"aux": 0
}
@@ -0,0 +1,8 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PACKAGECONFIG:append = " dynamic-sensors hybrid-sensors"
DEPENDS:append= " vegman-yaml-config"
EXTRA_OEMESON= " \
-Dsensor-yaml-gen=${STAGING_DIR_HOST}${datadir}/vegman-yaml-config/ipmi-sensors-static.yaml \
"
@@ -0,0 +1,10 @@
{
"channels": [
{
"type": "me",
"slave-path": "/dev/ipmb-5",
"bmc-addr": 32,
"remote-addr": 44
}
]
}
@@ -0,0 +1,8 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI:append = " file://ipmb-channels.json"
do_install:append() {
install -m 0644 -D ${WORKDIR}/ipmb-channels.json \
${D}${datadir}/ipmbbridge/
}
@@ -0,0 +1,3 @@
# Replace the '-' to '_', since Dbus object/interface names do not allow '-'.
KERNEL=="ipmi-kcs3", SYMLINK+="ipmi_kcs3"
KERNEL=="ipmi-kcs4", SYMLINK+="ipmi_kcs4"
@@ -0,0 +1,11 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
KCS_DEVICE = "ipmi_kcs3"
SMM_DEVICE = "ipmi_kcs4"
SYSTEMD_SERVICE:${PN}:append = " ${PN}@${SMM_DEVICE}.service "
SRC_URI += "file://99-ipmi-kcs.rules"
do_install:append() {
install -m 0644 ${WORKDIR}/99-ipmi-kcs.rules -D -t ${D}${nonarch_base_libdir}/udev/rules.d/
}
@@ -0,0 +1,5 @@
RMCPP_EXTRA = "eth1"
SYSTEMD_SERVICE:${PN} += " \
${PN}@${RMCPP_EXTRA}.service \
${PN}@${RMCPP_EXTRA}.socket \
"
@@ -0,0 +1,19 @@
SUMMARY = "Phosphor LED Group Management for VEGMAN-Rx20"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit native
PROVIDES += "virtual/phosphor-led-manager-config-native"
SRC_URI += "file://led.yaml"
S = "${WORKDIR}"
# Overwrite the example led layout yaml file prior
# to building the phosphor-led-manager package
do_install() {
SRC=${S}
DEST=${D}${datadir}/phosphor-led-manager
install -D ${SRC}/led.yaml ${DEST}/led.yaml
}
@@ -0,0 +1,123 @@
bmc_booted:
# No LED required.
# Status LED indication
# Managed by callback-manager
status_ok:
platform_status_green:
Action: 'On'
platform_status_red:
Action: 'Off'
status_degraded:
platform_status_green:
Action: 'Blink'
platform_status_red:
Action: 'Blink'
status_non_critical:
platform_status_green:
Action: 'Off'
platform_status_red:
Action: 'Blink'
status_critical:
platform_status_green:
Action: 'Off'
platform_status_red:
Action: 'On'
enclosure_identify:
platform_indicator_blue:
Action: 'On'
#
# May be asserted through IPMI or RedFish.
# We decided that it should be the same as enclosure_identify.
enclosure_identify_blink:
platform_indicator_blue:
Action: 'On'
#
# Asserted while firmware is flashing
firmware_flashing:
platform_indicator_blue:
Action: 'Blink'
#
# Power button indication
# Managed by phosphor-dbus-monitor
power_standby:
platform_power_green:
Action: 'On'
platform_power_red:
Action: 'On'
power_sequence:
platform_power_green:
Action: 'Blink'
DutyOn: 50
Period: 1000
platform_power_red:
Action: 'Off'
power_on:
platform_power_green:
Action: 'On'
platform_power_red:
Action: 'Off'
power_failure:
platform_power_green:
Action: 'Off'
platform_power_red:
Action: 'On'
#
# Temperature status
# Managed by phosphor-dbus-monitor
temp_ok:
temp_status_green:
Action: 'On'
temp_status_red:
Action: 'Off'
temp_failure:
temp_status_green:
Action: 'Blink'
temp_status_red:
Action: 'Blink'
temp_warn:
temp_status_green:
Action: 'On'
temp_status_red:
Action: 'On'
temp_crit:
temp_status_green:
Action: 'Off'
temp_status_red:
Action: 'On'
#
# PSU status
# Managed by phosphor-dbus-monitor
psu_ok:
psu_status_green:
Action: 'On'
psu_status_red:
Action: 'Off'
psu_warn:
psu_status_green:
Action: 'Blink'
psu_status_red:
Action: 'Blink'
psu_crit:
psu_status_green:
Action: 'Off'
psu_status_red:
Action: 'Blink'
@@ -0,0 +1,19 @@
SUMMARY = "Phosphor LED Group Management for VEGMAN"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit native
PROVIDES += "virtual/phosphor-led-manager-config-native"
SRC_URI += "file://led.yaml"
S = "${WORKDIR}"
# Overwrite the example led layout yaml file prior
# to building the phosphor-led-manager package
do_install() {
SRC=${S}
DEST=${D}${datadir}/phosphor-led-manager
install -D ${SRC}/led.yaml ${DEST}/led.yaml
}
@@ -0,0 +1,82 @@
bmc_booted:
# No LED required.
# Status LED indication
# Managed by callback-manager
# NOTE: The green LED actually has different colors on the front and rear
# panels. So, we decided not to use it.
# See https://j.yadro.com/browse/BBMC-221 for details.
status_ok:
platform_status_green:
Action: 'Off'
platform_status_red:
Action: 'Off'
status_degraded:
platform_status_green:
Action: 'Off'
platform_status_red:
Action: 'Blink'
DutyOn: 25
Period: 2000
status_non_critical:
platform_status_green:
Action: 'Off'
platform_status_red:
Action: 'Blink'
DutyOn: 50
Period: 1000
status_critical:
platform_status_green:
Action: 'Off'
platform_status_red:
Action: 'On'
enclosure_identify:
platform_indicator_blue:
Action: 'On'
#
# May be asserted through IPMI or RedFish.
# We decided that it should be the same as enclosure_identify.
enclosure_identify_blink:
platform_indicator_blue:
Action: 'On'
#
# Asserted while firmware is flashing
firmware_flashing:
platform_indicator_blue:
Action: 'Blink'
#
# Power button indication
# Managed by phosphor-dbus-monitor
power_standby:
platform_power_green:
Action: 'On'
platform_power_red:
Action: 'On'
power_sequence:
platform_power_green:
Action: 'Blink'
DutyOn: 50
Period: 1000
platform_power_red:
Action: 'Off'
power_on:
platform_power_green:
Action: 'On'
platform_power_red:
Action: 'Off'
power_failure:
platform_power_green:
Action: 'Off'
platform_power_red:
Action: 'On'
@@ -0,0 +1,9 @@
PACKAGECONFIG = " \
adcsensor \
intelcpusensor \
fansensor \
hwmontempsensor \
intrusionsensor \
ipmbsensor \
psusensor \
"
@@ -0,0 +1 @@
PACKAGECONFIG:remove = " cpuinfo"
@@ -0,0 +1,21 @@
[Unit]
Description=Power Cycle Host Server
After=xyz.openbmc_project.Chassis.Power.service
[Service]
ExecStart=/usr/bin/busctl set-property \
xyz.openbmc_project.State.Chassis \
/xyz/openbmc_project/state/chassis0 \
xyz.openbmc_project.State.Chassis \
RequestedPowerTransition s \
xyz.openbmc_project.State.Chassis.Transition.PowerCycle
ExecStart=/usr/bin/busctl set-property \
xyz.openbmc_project.Control.Host.RestartCause \
/xyz/openbmc_project/control/host0/restart_cause \
xyz.openbmc_project.Control.Host.RestartCause \
RequestedRestartCause s \
xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
Type=oneshot
SyslogIdentifier=phosphor-watchdog
@@ -0,0 +1,14 @@
[Unit]
Description=Shutdown Host Server
After=xyz.openbmc_project.Chassis.Power.service
[Service]
ExecStart=/usr/bin/busctl set-property \
xyz.openbmc_project.State.Chassis \
/xyz/openbmc_project/state/chassis0 \
xyz.openbmc_project.State.Chassis \
RequestedPowerTransition s \
xyz.openbmc_project.State.Chassis.Transition.Off
Type=oneshot
SyslogIdentifier=phosphor-watchdog
@@ -0,0 +1,21 @@
[Unit]
Description=Reset Host Server
After=xyz.openbmc_project.Chassis.Power.service
[Service]
ExecStart=/usr/bin/busctl set-property \
xyz.openbmc_project.State.Host \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.Host \
RequestedHostTransition s \
xyz.openbmc_project.State.Host.Transition.ForceWarmReboot
ExecStart=/usr/bin/busctl set-property \
xyz.openbmc_project.Control.Host.RestartCause \
/xyz/openbmc_project/control/host0/restart_cause \
xyz.openbmc_project.Control.Host.RestartCause \
RequestedRestartCause s \
xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
Type=oneshot
SyslogIdentifier=phosphor-watchdog
@@ -0,0 +1,17 @@
[Unit]
Description=Phosphow Watchdog
[Service]
ExecStart=/usr/bin/env phosphor-watchdog --continue \
--service=xyz.openbmc_project.Watchdog \
--path=/xyz/openbmc_project/watchdog/host0 \
--action_target=xyz.openbmc_project.State.Watchdog.Action.HardReset=phosphor-watchdog-host-reset.service \
--action_target=xyz.openbmc_project.State.Watchdog.Action.PowerOff=phosphor-watchdog-host-poweroff.service \
--action_target=xyz.openbmc_project.State.Watchdog.Action.PowerCycle=phosphor-watchdog-host-cycle.service \
SyslogIdentifier=phosphor-watchdog
BusName=xyz.openbmc_project.Watchdog
Type=dbus
[Install]
WantedBy=basic.target
@@ -0,0 +1,12 @@
FILESEXTRAPATHS:append := ":${THISDIR}/${PN}"
# Remove the override to keep service running after DC cycle
SYSTEMD_OVERRIDE:${PN}:remove = " \
poweron.conf:phosphor-watchdog@poweron.service.d/poweron.conf \
"
SYSTEMD_SERVICE:${PN} = " \
phosphor-watchdog.service \
phosphor-watchdog-host-poweroff.service \
phosphor-watchdog-host-reset.service \
phosphor-watchdog-host-cycle.service \
"