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,17 @@
SUMMARY = "Event policy configuration for Bios Version Write"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit allarch
inherit phosphor-dbus-monitor
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
SRC_URI += "file://config.yaml"
do_install() {
install -D ${WORKDIR}/config.yaml ${D}${config_dir}/config.yaml
}
FILES:${PN} += "${config_dir}/config.yaml"
@@ -0,0 +1,36 @@
- name: biosversion group
class: group
group: path
members:
- meta: PATH
path: /xyz/openbmc_project/software/bios_active
- name: biosversion property
class: group
group: property
type: string
members:
- interface: xyz.openbmc_project.Software.Version
meta: PROPERTY
property: Version
- name: watch biosversion
class: watch
watch: property
paths: biosversion group
properties: biosversion property
callback: biosversion callback
ignore_start_callback: true
- name: biosversion callback
class: callback
callback: method
service: org.freedesktop.systemd1
path: /org/freedesktop/systemd1
interface: org.freedesktop.systemd1.Manager
method: StartUnit
args:
- value: write-bios-version.service
type: string
- value: replace
type: string
@@ -0,0 +1,23 @@
From 7a64e990e43fab501b288fbe961a1a17410b193a Mon Sep 17 00:00:00 2001
From: roly <Rolyli.Li@luxshare-ict.com>
Date: Wed, 13 Nov 2024 11:06:43 +0800
Subject: [PATCH] Add FBCPLD Type for software manager
---
yaml/xyz/openbmc_project/Software/Version.interface.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/yaml/xyz/openbmc_project/Software/Version.interface.yaml b/yaml/xyz/openbmc_project/Software/Version.interface.yaml
index 3826af0..ec663c7 100644
--- a/yaml/xyz/openbmc_project/Software/Version.interface.yaml
+++ b/yaml/xyz/openbmc_project/Software/Version.interface.yaml
@@ -45,3 +45,6 @@ enumerations:
- name: CPLD
description: >
The version is a version for a CPLD.
+ - name: FBCPLD
+ description: >
+ The version is a version for a Fan Board CPLD.
--
2.25.1
@@ -0,0 +1,30 @@
From 655a0fabe1190c98bd75e7fa990c206ffb529286 Mon Sep 17 00:00:00 2001
From: roly <Rolyli.Li@luxshare-ict.com>
Date: Wed, 20 Nov 2024 15:18:22 +0800
Subject: [PATCH] Add NonVbitrate and Vbitrate property for UART interface
---
yaml/xyz/openbmc_project/Console/UART.interface.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/yaml/xyz/openbmc_project/Console/UART.interface.yaml b/yaml/xyz/openbmc_project/Console/UART.interface.yaml
index e30c443..e6b9b91 100644
--- a/yaml/xyz/openbmc_project/Console/UART.interface.yaml
+++ b/yaml/xyz/openbmc_project/Console/UART.interface.yaml
@@ -4,3 +4,13 @@ properties:
- name: Baud
type: uint64
description: Data transmission rate of the serial console.
+ - name: NonVbitrate
+ type: uint64
+ default: 115200
+ description: >
+ Non volatile SOL bandrate.
+ - name: Vbitrate
+ type: uint64
+ default: 115200
+ description: >
+ Volatile SOL bandrate.
--
2.25.1
@@ -0,0 +1,76 @@
From 32127e9d8729268432dabbcafdcbb31af6d7c6ba Mon Sep 17 00:00:00 2001
From: roly <Rolyli.Li@luxshare-ict.com>
Date: Thu, 14 Nov 2024 19:14:11 +0800
Subject: [PATCH] Add ReleaseDate property for Software interface
---
.../Software/ReleaseDate/meson.build | 15 +++++++++++++++
gen/xyz/openbmc_project/Software/meson.build | 15 +++++++++++++++
.../Software/ReleaseDate.interface.yaml | 7 +++++++
3 files changed, 37 insertions(+)
create mode 100644 gen/xyz/openbmc_project/Software/ReleaseDate/meson.build
create mode 100644 yaml/xyz/openbmc_project/Software/ReleaseDate.interface.yaml
diff --git a/gen/xyz/openbmc_project/Software/ReleaseDate/meson.build b/gen/xyz/openbmc_project/Software/ReleaseDate/meson.build
new file mode 100644
index 0000000..44f9568
--- /dev/null
+++ b/gen/xyz/openbmc_project/Software/ReleaseDate/meson.build
@@ -0,0 +1,15 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Software/ReleaseDate__cpp'.underscorify(),
+ input: [ '../../../../../yaml/xyz/openbmc_project/Software/ReleaseDate.interface.yaml', ],
+ output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'client.hpp', ],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'cpp',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.current_source_dir() / '../../../../../yaml',
+ 'xyz/openbmc_project/Software/ReleaseDate',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/Software/meson.build b/gen/xyz/openbmc_project/Software/meson.build
index ace2bcb..84424b4 100644
--- a/gen/xyz/openbmc_project/Software/meson.build
+++ b/gen/xyz/openbmc_project/Software/meson.build
@@ -89,6 +89,21 @@ generated_others += custom_target(
],
)
+subdir('ReleaseDate')
+generated_others += custom_target(
+ 'xyz/openbmc_project/Software/ReleaseDate__markdown'.underscorify(),
+ input: [ '../../../../yaml/xyz/openbmc_project/Software/ReleaseDate.interface.yaml', ],
+ output: [ 'ReleaseDate.md' ],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'markdown',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.current_source_dir() / '../../../../yaml',
+ 'xyz/openbmc_project/Software/ReleaseDate',
+ ],
+)
+
subdir('RedundancyPriority')
generated_others += custom_target(
'xyz/openbmc_project/Software/RedundancyPriority__markdown'.underscorify(),
diff --git a/yaml/xyz/openbmc_project/Software/ReleaseDate.interface.yaml b/yaml/xyz/openbmc_project/Software/ReleaseDate.interface.yaml
new file mode 100644
index 0000000..e0dded4
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Software/ReleaseDate.interface.yaml
@@ -0,0 +1,7 @@
+description: >
+ An ReleaseDate string for a xyz.openbmc_project.Software.Version.
+properties:
+ - name: ReleaseDate
+ type: string
+ description: >
+ Firmware Release Date.
--
2.25.1
@@ -0,0 +1,145 @@
From 7b1bd6c2b0c605c2cfbfaf9e3a81f4e8c57dfee6 Mon Sep 17 00:00:00 2001
From: roly <Rolyli.Li@luxshare-ict.com>
Date: Fri, 27 Dec 2024 18:28:28 +0800
Subject: [PATCH] Add applyoption and updatetarget interface
---
.../Software/UpdateTarget/meson.build | 15 ++++++++++
gen/xyz/openbmc_project/Software/meson.build | 15 ++++++++++
.../Software/Activation.interface.yaml | 4 +++
.../Software/ApplyOptions.interface.yaml | 28 ++++++++++++++-----
.../Software/UpdateTarget.interface.yaml | 17 +++++++++++
5 files changed, 72 insertions(+), 7 deletions(-)
create mode 100755 gen/xyz/openbmc_project/Software/UpdateTarget/meson.build
create mode 100755 yaml/xyz/openbmc_project/Software/UpdateTarget.interface.yaml
diff --git a/gen/xyz/openbmc_project/Software/UpdateTarget/meson.build b/gen/xyz/openbmc_project/Software/UpdateTarget/meson.build
new file mode 100755
index 0000000..c250c86
--- /dev/null
+++ b/gen/xyz/openbmc_project/Software/UpdateTarget/meson.build
@@ -0,0 +1,15 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Software/UpdateTarget__cpp'.underscorify(),
+ input: [ '../../../../../yaml/xyz/openbmc_project/Software/UpdateTarget.interface.yaml', ],
+ output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'client.hpp', ],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'cpp',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.current_source_dir() / '../../../../../yaml',
+ 'xyz/openbmc_project/Software/UpdateTarget',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/Software/meson.build b/gen/xyz/openbmc_project/Software/meson.build
index 84424b4..b90d1f8 100644
--- a/gen/xyz/openbmc_project/Software/meson.build
+++ b/gen/xyz/openbmc_project/Software/meson.build
@@ -149,6 +149,21 @@ generated_others += custom_target(
],
)
+subdir('UpdateTarget')
+generated_others += custom_target(
+ 'xyz/openbmc_project/Software/UpdateTarget__markdown'.underscorify(),
+ input: [ '../../../../yaml/xyz/openbmc_project/Software/UpdateTarget.interface.yaml', ],
+ output: [ 'UpdateTarget.md' ],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog, '--command', 'markdown',
+ '--output', meson.current_build_dir(),
+ '--tool', sdbusplusplus_prog,
+ '--directory', meson.current_source_dir() / '../../../../yaml',
+ 'xyz/openbmc_project/Software/UpdateTarget',
+ ],
+)
+
subdir('Version')
generated_others += custom_target(
'xyz/openbmc_project/Software/Version__markdown'.underscorify(),
diff --git a/yaml/xyz/openbmc_project/Software/Activation.interface.yaml b/yaml/xyz/openbmc_project/Software/Activation.interface.yaml
index aba2a62..19c64f4 100644
--- a/yaml/xyz/openbmc_project/Software/Activation.interface.yaml
+++ b/yaml/xyz/openbmc_project/Software/Activation.interface.yaml
@@ -42,6 +42,10 @@ enumerations:
description: >
The Software.Version is currently being staged into the staging
flash area.
+ - name: AddQueue
+ description: >
+ The Software.Version is currently being added to the upgrade
+ queue and is waiting for powercycle to trigger the upgrade.
- name: RequestedActivations
description: >
The possible RequestedActivation states of a Software.Version.
diff --git a/yaml/xyz/openbmc_project/Software/ApplyOptions.interface.yaml b/yaml/xyz/openbmc_project/Software/ApplyOptions.interface.yaml
index 4d5a447..3a95d8d 100644
--- a/yaml/xyz/openbmc_project/Software/ApplyOptions.interface.yaml
+++ b/yaml/xyz/openbmc_project/Software/ApplyOptions.interface.yaml
@@ -4,14 +4,28 @@ description: >
used during firmware activation. ApplyOptions usage during firmware
activation is implementation specific, not all firmware targets need
ApplyOptions. This property is removed after activation of the firmware is
- done and when the firmware goes to Active state. The default value of this
- property is false.
+ done and when the firmware goes to Active state.
properties:
- name: ClearConfig
- type: boolean
- default: false
+ type: enum[self.ConfigManagement]
description: >
This property indicates whether to clear the software configurations
- when the firmware image update is getting applied. A value of true
- indicates the firmware configurations should be cleared along with
- firmware image activation.
+ when the firmware image update is getting applied.
+enumerations:
+ - name: ConfigManagement
+ description: >
+ An enumeration of possible purposes of the config management in
+ upgrade.
+ values:
+ - name: Keep
+ description: >
+ Keep config in upgrade.
+ - name: Clear
+ description: >
+ Clear config in upgrade.
+ - name: PartialKeep
+ description: >
+ Partial keep config in upgrade.
+ - name: FactoryReset
+ description: >
+ Factory reset config in upgrade.
\ No newline at end of file
diff --git a/yaml/xyz/openbmc_project/Software/UpdateTarget.interface.yaml b/yaml/xyz/openbmc_project/Software/UpdateTarget.interface.yaml
new file mode 100755
index 0000000..ae3366b
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Software/UpdateTarget.interface.yaml
@@ -0,0 +1,17 @@
+description: >
+ Provide the setting of target slot(s) to be updated.
+
+properties:
+ - name: UpdateTargetSlot
+ type: enum[self.TargetSlot]
+ description: >
+ Indicate which slot(s) to update when an image is to be updated.
+
+enumerations:
+ - name: TargetSlot
+ description: >
+ The target slot(s) for code update.
+ values:
+ - name: Primary
+ - name: Secondary
+ - name: Both
\ No newline at end of file
--
2.25.1
@@ -0,0 +1,24 @@
From 9f6af2701407c166c87a328a2f2335546f3de078 Mon Sep 17 00:00:00 2001
From: "Wang.Bin" <Bin-B.Wang@luxshare-ict.com>
Date: Sun, 5 Jan 2025 16:39:13 +0800
Subject: [PATCH 2/2] Set PowerSupplyRedundancyEnabled to false by default
---
.../openbmc_project/Control/PowerSupplyRedundancy.interface.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/yaml/xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml b/yaml/xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml
index 432b2c2..baec4f5 100644
--- a/yaml/xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml
+++ b/yaml/xyz/openbmc_project/Control/PowerSupplyRedundancy.interface.yaml
@@ -7,6 +7,7 @@ properties:
- const
description: >
When true, the power supplies are redundant.
+ default: false
- name: RotationEnabled
type: boolean
description: >
--
2.25.1
@@ -0,0 +1,58 @@
From ef1b0370f33a69ef2e61635ba82ef23228c8fb1f Mon Sep 17 00:00:00 2001
From: Ren Yu <yux.ren@intel.com>
Date: Fri, 24 May 2019 14:55:10 +0800
Subject: [PATCH] Add the pre-timeout interrupt defined in IPMI spec
The IPMI watchdog pre-timeout interrupt is used to set the different
pre-timeout interrupt source. Add them as a dbus property,
IPMI set/get watchdog commands will use it.
Signed-off-by: Ren Yu <yux.ren@intel.com>
Upstream-Status: Pending
---
.../State/Watchdog.interface.yaml | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/yaml/xyz/openbmc_project/State/Watchdog.interface.yaml b/yaml/xyz/openbmc_project/State/Watchdog.interface.yaml
index 556dca1..dbca599 100644
--- a/yaml/xyz/openbmc_project/State/Watchdog.interface.yaml
+++ b/yaml/xyz/openbmc_project/State/Watchdog.interface.yaml
@@ -33,6 +33,11 @@ properties:
description: >
The action the watchdog should perform when it expires.
default: "HardReset"
+ - name: PreTimeoutInterrupt
+ type: enum[self.PreTimeoutInterruptAction]
+ description: >
+ The BMC generates the selected interrupt before the timer expires.
+ default: "None"
- name: Interval
type: uint64
description: >
@@ -73,6 +78,23 @@ enumerations:
description: >
Perform a power cycle of the system.
+ - name: PreTimeoutInterruptAction
+ description: >
+ The type of PreTimeout Interrupt.
+ values:
+ - name: "None"
+ description: >
+ Do nothing.
+ - name: "SMI"
+ description: >
+ SMI.
+ - name: "NMI"
+ description: >
+ NMI / Diagnostic Interrupt.
+ - name: "MI"
+ description: >
+ Messaging Interrupt.
+
- name: TimerUse
description: >
The type of timer use.
--
2.25.1
@@ -0,0 +1,40 @@
From 3f28ab9d280104a03a83d784a73ec74ec6a72782 Mon Sep 17 00:00:00 2001
From: Ren Yu <yux.ren@intel.com>
Date: Mon, 29 Jul 2019 10:51:12 +0800
Subject: [PATCH] Add PreInterruptFlag properity in DBUS.
PreTimeoutInterruptOccurFlag in DBUS would be set 'true'
when watchdog pre-timeout interrupt occurred.
Tested:
Enable command(raw 0x06 0x31) that get message flag
can set right bit about watchdog,
need record PreTimeoutInterruptOccurFlag
at xyz.openbmmc_project.State.Watchdog when watchdog
pre-timeout interrupt occurred.
Signed-off-by: Ren Yu <yux.ren@intel.com>
Upstream-Status: Pending
---
yaml/xyz/openbmc_project/State/Watchdog.interface.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/yaml/xyz/openbmc_project/State/Watchdog.interface.yaml b/yaml/xyz/openbmc_project/State/Watchdog.interface.yaml
index 30d75f0..1b06363 100644
--- a/yaml/xyz/openbmc_project/State/Watchdog.interface.yaml
+++ b/yaml/xyz/openbmc_project/State/Watchdog.interface.yaml
@@ -59,6 +59,11 @@ properties:
description: >
The timer user at the time of expiration.
default: "Reserved"
+ - name: PreTimeoutInterruptOccurFlag
+ type: boolean
+ description: >
+ PreTimeoutInterruptOccurFlag that preTimeoutInterrupt action occurred.
+ default: false
enumerations:
- name: Action
--
2.25.1
@@ -0,0 +1,17 @@
# The URI is required for the autobump script but keep it commented
# to not override the upstream value
# SRC_URI = "git://github.com/openbmc/phosphor-dbus-interfaces.git;branch=master;protocol=https"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://0024-Add-the-pre-timeout-interrupt-defined-in-IPMI-spec.patch \
file://0025-Add-PreInterruptFlag-properity-in-DBUS.patch \
file://0001-Add-FBCPLD-Type-for-software-manager.patch \
file://0001-Add-ReleaseDate-property-for-Software-interface.patch \
file://0001-Add-NonVbitrate-and-Vbitrate-property-for-UART-inter.patch \
file://0001-Add-applyoption-and-updatetarget-interface.patch \
file://0002-Set-PowerSupplyRedundancyEnabled-to-false-by-default.patch \
"
@@ -0,0 +1,3 @@
PHOSPHOR_DBUS_MONITOR_CONFIGS:append = " \
bios-version-monitor \
"
@@ -0,0 +1,25 @@
SUMMARY = "Write Bios Version to File"
DESCRIPTION = "Write Bios Version to File"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
SRC_URI = "\
file://write-bios-version.sh \
file://${BPN}.service \
"
inherit allarch
inherit obmc-phosphor-systemd
RDEPENDS:${PN} += "bash"
SYSTEMD_SERVICE:${PN} += "${PN}.service"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/write-bios-version.sh ${D}${bindir}
}
@@ -0,0 +1,10 @@
[Unit]
Description=Write Bios Version to File
Wants=phosphor-ipmi-host.service
After=phosphor-ipmi-host.service
[Service]
Type=oneshot
Restart=no
ExecStart=/usr/bin/write-bios-version.sh
@@ -0,0 +1,39 @@
#!/bin/bash
bus=14
address=0x53
offset=0x08
biosversion=$(busctl get-property xyz.openbmc_project.Software.BMC.Updater /xyz/openbmc_project/software/bios_active xyz.openbmc_project.Software.Version Version)
ret=$?
if [ $ret != 0 ]; then
echo "Failed to get BIOS version from dbus"
exit 1
fi
biosversion=$(echo "$biosversion" |cut -d "\"" -f2)
echo "BIOS version got from dbus:$biosversion"
if [ "$biosversion" == "null" ]; then
echo "BIOS version is null, skip"
else
tmp=$(i2ctransfer -y -f $bus w2@$address $offset 0x00 r32)
for str in $tmp;do
if [[ $str != 0x00 ]]; then
str=$(printf "%d" "$str")
version=$(echo "$str" | awk '{printf("%c", $str)}')
version_str="$version_str$version"
fi
done
echo "BIOS version got from epprom:$version_str"
if [ "$biosversion" != "$version_str" ]; then
for ((j=0;j < 32;j++));do
hexArr[$j]=0
done
for ((i=0;i < 14;i++));do
ver=${biosversion:$i:1}
hexArr[$i]=$(printf "%d" "'$ver")
done
i2ctransfer -y -f $bus w34@$address $offset 0x00 "${hexArr[@]}"
echo "Write BIOS version to epprom:${biosversion}"
else
echo "BIOS version same, skip writing BIOS version"
fi
fi