Initial commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
EXTRA_OEMESON:append = "-Dlong-press-time-ms=5000"
|
||||
@@ -0,0 +1,2 @@
|
||||
PACKAGECONFIG:remove = " intelcpusensor ipmbsensor"
|
||||
PACKAGECONFIG:append = " nvmesensor"
|
||||
@@ -0,0 +1,8 @@
|
||||
FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
|
||||
|
||||
# To delay turning off host when fan sensors are not detected yet
|
||||
# To use CurrentHostState to decide host state for phosphor-fan-monitor
|
||||
|
||||
PACKAGECONFIG:append = " delay-host-control monitor-use-host-state"
|
||||
PACKAGECONFIG[delay-host-control] = "-Ddelay-host-control=20"
|
||||
PACKAGECONFIG[monitor-use-host-state] = "-Dmonitor-use-host-state=enabled"
|
||||
Executable
+104
@@ -0,0 +1,104 @@
|
||||
#!/bin/bash
|
||||
|
||||
usage () {
|
||||
echo "Usage:"
|
||||
echo " $(basename "$0") <image path> "
|
||||
echo "Where:"
|
||||
echo " <image path>: the path link to folder, which include image file and MANIFEST"
|
||||
echo "Example:"
|
||||
echo " $(basename "$0") /tmp/images/ghdh1393"
|
||||
}
|
||||
|
||||
|
||||
IMG_PATH="$1"
|
||||
if [ ! -d "$IMG_PATH" ]; then
|
||||
echo "The folder $IMG_PATH does not exist"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MANIFEST_PATH="${IMG_PATH}/MANIFEST"
|
||||
if [ ! -f "$MANIFEST_PATH" ]; then
|
||||
echo "The MANIFEST file $MANIFEST_PATH does not exist"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
EXTENDED_VERSION=$(awk '/ExtendedVersion/ {print}' "${MANIFEST_PATH}" | cut -d "=" -f 2)
|
||||
|
||||
# If the ExtendedVersion is empty, set default to update UEFI/EDKII on primary device
|
||||
if [ -z "$EXTENDED_VERSION" ]
|
||||
then
|
||||
EXTENDED_VERSION="primary"
|
||||
fi
|
||||
|
||||
# Assign the command based on the ExtendedVersion
|
||||
case ${EXTENDED_VERSION} in
|
||||
"primary")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.bin" -o -name "*.rom" \))
|
||||
CMD="/usr/sbin/ampere_flash_bios.sh $IMAGE 1"
|
||||
;;
|
||||
|
||||
"secondary")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.bin" -o -name "*.rom" \))
|
||||
CMD="/usr/sbin/ampere_flash_bios.sh $IMAGE 2"
|
||||
;;
|
||||
|
||||
"scp-primary")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.slim" -o -name "*.rom" \))
|
||||
CMD="/usr/sbin/ampere_firmware_upgrade.sh smpmpro $IMAGE 1"
|
||||
;;
|
||||
|
||||
"scp-secondary")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.slim" -o -name "*.rom" \))
|
||||
CMD="/usr/sbin/ampere_firmware_upgrade.sh smpmpro $IMAGE 2"
|
||||
;;
|
||||
|
||||
"eeprom" | "eeprom-primary")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.slim" -o -name "*.rom" -o -name "*.bin" \))
|
||||
CMD="/usr/sbin/ampere_firmware_upgrade.sh eeprom $IMAGE 1"
|
||||
;;
|
||||
|
||||
"eeprom-secondary")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.img" -o -name "*.slim" -o -name "*.rom" -o -name "*.bin" \))
|
||||
CMD="/usr/sbin/ampere_firmware_upgrade.sh eeprom $IMAGE 2"
|
||||
;;
|
||||
|
||||
"fru" | "mbfru")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.bin" \))
|
||||
CMD="/usr/sbin/ampere_firmware_upgrade.sh fru $IMAGE 1"
|
||||
;;
|
||||
|
||||
|
||||
"bmcfru")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.bin" \))
|
||||
CMD="/usr/sbin/ampere_firmware_upgrade.sh fru $IMAGE 2"
|
||||
;;
|
||||
|
||||
"mbcpld")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.jed" \))
|
||||
CMD="/usr/bin/ampere_firmware_upgrade.sh mb_cpld $IMAGE"
|
||||
;;
|
||||
"bmccpld")
|
||||
IMAGE=$(find "${IMG_PATH}" -type f \( -name "*.jed" \))
|
||||
CMD="/usr/bin/ampere_firmware_upgrade.sh bmc_cpld $IMAGE"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid ExtendedVersion: ${EXTENDED_VERSION}. Please check MANIFEST file!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if [ -z "$IMAGE" ]
|
||||
then
|
||||
echo "ERROR: The image file: No such file or directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! eval "$CMD";
|
||||
then
|
||||
echo "ERROR: The firmware update not successfull"
|
||||
exit 1
|
||||
fi
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Ampere service for flashing the Host firmware image
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=no
|
||||
ExecStart=/usr/sbin/firmware_update.sh /tmp/images/%I
|
||||
TimeoutSec=300
|
||||
@@ -0,0 +1,18 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI += " \
|
||||
file://firmware_update.sh \
|
||||
"
|
||||
|
||||
PACKAGECONFIG[flash_bios] = "-Dhost-bios-upgrade=enabled, -Dhost-bios-upgrade=disabled"
|
||||
|
||||
PACKAGECONFIG:append = " flash_bios static-dual-image"
|
||||
|
||||
SYSTEMD_SERVICE:${PN}:updater += "${@bb.utils.contains('PACKAGECONFIG', 'flash_bios', 'obmc-flash-host-bios@.service', '', d)}"
|
||||
|
||||
RDEPENDS:${PN} += "bash"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}/usr/sbin
|
||||
install -m 0755 ${WORKDIR}/firmware_update.sh ${D}/usr/sbin/firmware_update.sh
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Ampere Computing LLC host shutdown ACK
|
||||
Conflicts=obmc-chassis-poweron@0.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/ampere_power_util.sh mb shutdown_ack
|
||||
SyslogIdentifier=ampere_host_shutdown_ack
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Ampere Computing LLC HighTempt event
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
ExecStart=/usr/sbin/ampere_add_redfishevent.sh OpenBMC.0.1.AmpereEvent.Warning "CPU%i HighTemp asserted"
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=Ampere Computing LLC HighTempt event
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
ExecStart=/usr/sbin/ampere_add_redfishevent.sh OpenBMC.0.1.AmpereEvent.OK "CPU%i HighTemp deasserted"
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Ampere Computing LLC Overtemp event handling
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
ExecStart=/bin/sh -c "touch /tmp/fault_overtemp && obmcutil chassisoff"
|
||||
ExecStartPost=/bin/sh -c "ampere_add_redfishevent.sh OpenBMC.0.1.CPUThermalTrip.Critical %i && sleep 10 && rm /tmp/fault_overtemp"
|
||||
@@ -0,0 +1,11 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SYSTEMD_SERVICE:${PN}-monitor += " \
|
||||
ampere-host-shutdown-ack@.service \
|
||||
ampere_overtemp@.service \
|
||||
ampere_hightemp_start@.service \
|
||||
ampere_hightemp_stop@.service \
|
||||
"
|
||||
|
||||
SYSTEMD_LINK:${PN}-monitor:append = " ../phosphor-multi-gpio-monitor.service:multi-user.target.requires/phosphor-multi-gpio-monitor.service"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SNOOP_DEVICE = ""
|
||||
@@ -0,0 +1,10 @@
|
||||
FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
|
||||
|
||||
EXTRA_OEMESON:append = " \
|
||||
-Dinsecure-tftp-update=disabled \
|
||||
-Dbmcweb-logging=enabled \
|
||||
-Dredfish-bmc-journal=enabled \
|
||||
-Dhttp-body-limit=65 \
|
||||
-Dredfish-new-powersubsystem-thermalsubsystem=enabled \
|
||||
-Dredfish-allow-deprecated-power-thermal=disabled \
|
||||
"
|
||||
@@ -0,0 +1,17 @@
|
||||
SUMMARY = "Copy the inventory cleanup yaml for inventory manager"
|
||||
PR = "r1"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
inherit allarch
|
||||
inherit phosphor-inventory-manager
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
SRC_URI = "file://inventory-cleanup.yaml"
|
||||
|
||||
do_install() {
|
||||
install -D inventory-cleanup.yaml ${D}${base_datadir}/events.d/inventory-cleanup.yaml
|
||||
}
|
||||
|
||||
FILES:${PN} += "${base_datadir}/events.d/inventory-cleanup.yaml"
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
description: >
|
||||
Ampere inventory fixups
|
||||
|
||||
events:
|
||||
- name: Add Chassis interface
|
||||
description: >
|
||||
Add the chassis interface on the chassis inventory path
|
||||
type: startup
|
||||
actions:
|
||||
- name: createObjects
|
||||
objs:
|
||||
/system/chassis:
|
||||
xyz.openbmc_project.Inventory.Item.Chassis:
|
||||
Type:
|
||||
value: "xyz.openbmc_project.Inventory.Item.Chassis.ChassisType.RackMount"
|
||||
type: string
|
||||
@@ -0,0 +1,30 @@
|
||||
SUMMARY = "Ampere OEM IPMI commands"
|
||||
DESCRIPTION = "Ampere OEM IPMI commands"
|
||||
|
||||
LICENSE = "Apache-2.0"
|
||||
S = "${WORKDIR}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
|
||||
DEPENDS = "boost phosphor-ipmi-host phosphor-logging systemd"
|
||||
|
||||
inherit meson pkgconfig obmc-phosphor-ipmiprovider-symlink
|
||||
|
||||
LIBRARY_NAMES = "libzampoemcmds.so"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
SRC_URI = "git://github.com/openbmc/ampere-ipmi-oem.git;branch=master;protocol=https"
|
||||
SRCREV = "2a19152956defafd7d9c5344b376a428e878c507"
|
||||
|
||||
HOSTIPMI_PROVIDER_LIBRARY += "${LIBRARY_NAMES}"
|
||||
NETIPMI_PROVIDER_LIBRARY += "${LIBRARY_NAMES}"
|
||||
|
||||
FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
|
||||
FILES:${PN}:append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
|
||||
FILES:${PN}:append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
|
||||
FILES:${PN}-dev:append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV}"
|
||||
|
||||
do_install:append(){
|
||||
install -d ${D}${includedir}/ampere-ipmi-oem
|
||||
install -m 0644 -D ${S}/include/*.hpp ${D}${includedir}/ampere-ipmi-oem
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
|
||||
+178
@@ -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" : "usb0",
|
||||
"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
|
||||
}
|
||||
},
|
||||
"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" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"7" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"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" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"10" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"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" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"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" : "ipmb",
|
||||
"protocol_type" : "ipmb-1.0",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"15" : {
|
||||
"name" : "ipmi_ssif",
|
||||
"is_valid" : true,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "smbus-v2.0",
|
||||
"protocol_type" : "ipmi-smbus",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"path": "/xyz/openbmc_project/sensors/power/total_power"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
inherit obmc-phosphor-systemd
|
||||
|
||||
HOSTIPMI_PROVIDER_LIBRARY:remove = "libstrgfnhandler.so"
|
||||
|
||||
do_install:append () {
|
||||
rm -rf ${D}${libdir}/ipmid-providers
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Usage of this utility
|
||||
echo "Trigger soft off the host."
|
||||
/usr/sbin/ampere_power_util.sh mb soft_off
|
||||
exit $?;
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Ampere Soft power off of the host
|
||||
Wants=obmc-host-stop-pre@0.target
|
||||
Before=obmc-host-stop-pre@0.target
|
||||
Conflicts=obmc-host-start@0.target
|
||||
ConditionPathExists=!/run/openbmc/host@0-request
|
||||
ConditionPathExists=!/lib/systemd/system/pldmSoftPowerOff.service
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
ExecStart=/usr/bin/phosphor-softpoweroff
|
||||
SyslogIdentifier=phosphor-softpoweroff
|
||||
Type=oneshot
|
||||
@@ -0,0 +1,18 @@
|
||||
FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
|
||||
|
||||
RRECOMMENDS:${PN} += "ipmitool"
|
||||
RDEPENDS:${PN} += "bash"
|
||||
|
||||
SRC_URI += "\
|
||||
file://ampere-phosphor-softpoweroff \
|
||||
file://ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \
|
||||
"
|
||||
|
||||
AMPERE_SOFTPOWEROFF_TMPL = "ampere.xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
|
||||
|
||||
do_install:append(){
|
||||
install -d ${D}${includedir}/phosphor-ipmi-host
|
||||
install -m 0644 -D ${S}/selutility.hpp ${D}${includedir}/phosphor-ipmi-host
|
||||
install -m 0755 ${WORKDIR}/ampere-phosphor-softpoweroff ${D}/${bindir}/phosphor-softpoweroff
|
||||
install -m 0644 ${WORKDIR}/${AMPERE_SOFTPOWEROFF_TMPL} ${D}${systemd_unitdir}/system/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
PACKAGECONFIG:append = " log-threshold"
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/xyz/openbmc_project/ipmi/sol/eth0:
|
||||
- Interface: xyz.openbmc_project.Ipmi.SOL
|
||||
Properties:
|
||||
Enable:
|
||||
Default: 'true'
|
||||
Privilege:
|
||||
Default: 4
|
||||
Progress:
|
||||
Default: 0
|
||||
RetryCount:
|
||||
Default: 7
|
||||
RetryIntervalMS:
|
||||
Default: 100
|
||||
Threshold:
|
||||
Default: 1
|
||||
|
||||
/xyz/openbmc_project/ipmi/sol/eth1:
|
||||
- Interface: xyz.openbmc_project.Ipmi.SOL
|
||||
Properties:
|
||||
Enable:
|
||||
Default: 'true'
|
||||
Privilege:
|
||||
Default: 4
|
||||
Progress:
|
||||
Default: 0
|
||||
RetryCount:
|
||||
Default: 7
|
||||
RetryIntervalMS:
|
||||
Default: 100
|
||||
Threshold:
|
||||
Default: 1
|
||||
|
||||
/xyz/openbmc_project/control/host0/power_restore_policy:
|
||||
- Interface: xyz.openbmc_project.Control.Power.RestorePolicy
|
||||
Properties:
|
||||
PowerRestorePolicy:
|
||||
Default: RestorePolicy::Policy::AlwaysOn
|
||||
@@ -0,0 +1,2 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
SRC_URI:append = " file://ampere_settings.override.yml"
|
||||
@@ -0,0 +1,3 @@
|
||||
PACKAGECONFIG:append = " smbios-ipmi-blob"
|
||||
|
||||
PACKAGECONFIG:remove = " cpuinfo"
|
||||
@@ -0,0 +1,25 @@
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
DEPENDS += "gpioplus libgpiod"
|
||||
|
||||
EXTRA_OEMESON:append = " \
|
||||
-Dhost-gpios=enabled \
|
||||
-Dboot-count-max-allowed=1 \
|
||||
-Donly-run-apr-on-power-loss=true \
|
||||
"
|
||||
|
||||
FILES:${PN} += "${systemd_system_unitdir}/*"
|
||||
FILES:${PN}-host += "${bindir}/phosphor-host-condition-gpio"
|
||||
SYSTEMD_SERVICE:${PN}-host += "phosphor-host-condition-gpio@.service"
|
||||
|
||||
pkg_postinst:${PN}-obmc-targets:prepend() {
|
||||
mkdir -p $D$systemd_system_unitdir/multi-user.target.requires
|
||||
LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-host-condition-gpio@0.service"
|
||||
TARGET="../phosphor-host-condition-gpio@.service"
|
||||
ln -s $TARGET $LINK
|
||||
}
|
||||
|
||||
pkg_prerm:${PN}-obmc-targets:prepend() {
|
||||
LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-host-condition-gpio@0.service"
|
||||
rm $LINK
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
|
||||
|
||||
#
|
||||
# Ampere Mt. Jade power control involves different action during
|
||||
# the course of action which does not involve rebooting the Host.
|
||||
# Thus disable the use of Host Power-On watchdog.
|
||||
#
|
||||
WATCHDOG_FMT = ""
|
||||
ENABLE_WATCHDOG_FMT = ""
|
||||
Reference in New Issue
Block a user