History log of /openbmc/phosphor-bmc-code-mgmt/ (Results 1 – 25 of 421)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
4983b13826-Feb-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: fetch nested configuration

Config for a code updater is provided via dbus, the common
'FirmwareInfoDef' becomes a nested dbus interface.

For BIOS code updater, it looks like this:
```
xyz.o

common: fetch nested configuration

Config for a code updater is provided via dbus, the common
'FirmwareInfoDef' becomes a nested dbus interface.

For BIOS code updater, it looks like this:
```
xyz.openbmc_project.Configuration.BIOS.FirmwareInfo
```

Update the common code to query this configuration from the nested dbus
interface.

Tested: BIOS code updater can query its configuration with following
EM config json fragment:

```
{
"Name": "HostSPIFlash",
"SPIControllerIndex": 1,
"SPIDeviceIndex": 0,
"HasME": false,
"Layout": "Flat",
"Tool": "None",
"MuxOutputs": ["BMC_SPI_SEL"],
"MuxGPIOValues": [1],
"FirmwareInfo": {
"VendorIANA": "6653",
"CompatibleHardware": "com.tyan.Hardware.S8030.SPI.Host"
},
"Type": "BIOS"
},
```

Change-Id: I1d7241537b759ee74ce4a1f932b5597ac7d95e52
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

0a457ff825-Feb-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: constrain object mapper call

Fix this call site where we are fetching configuration to call
'GetSubTree' with our configuration interfaces as argument.

resolves [1]

Tested: With SPI device

common: constrain object mapper call

Fix this call site where we are fetching configuration to call
'GetSubTree' with our configuration interfaces as argument.

resolves [1]

Tested: With SPI device code updater. Configuration is fetched as
expected.

```
<7> [config] looking for dbus interface xyz.openbmc_project.Configuration.BIOS
```

```
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetSubTree sias /xyz/openbmc_project/ 0 1 xyz.openbmc_project.Configuration.BIOS
a{sa{sas}} 1 "/xyz/openbmc_project/inventory/system/board/chassis/HostSPIFlash" 1 "xyz.openbmc_project.EntityManager" 1 "xyz.openbmc_project.Configuration.BIOS"
```

References:

[1] https://gerrit.openbmc.org/c/openbmc/phosphor-bmc-code-mgmt/+/74893/comment/8c7c7e83_20f92624/

Change-Id: Iea6211aebd01c4b777b13dc02120be92c347824a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

192bb5d927-Feb-2025 Alexander Hansen <alexander.hansen@9elements.com>

meson: apply meson format

since [1] was merged in openbmc-build-scripts, meson format is required
to pass CI.

References:
[1] https://gerrit.openbmc.org/c/openbmc/openbmc-build-scripts/+/77742

Cha

meson: apply meson format

since [1] was merged in openbmc-build-scripts, meson format is required
to pass CI.

References:
[1] https://gerrit.openbmc.org/c/openbmc/openbmc-build-scripts/+/77742

Change-Id: I66206066c41dd3d6225855d0530c72f5089a964b
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

7fe19f4d22-Jan-2025 Jian Zhang <zhangjian.3032@bytedance.com>

bmc: sync-once: handle deleted source files

Ensure destination files are removed if the source files are deleted.

Two changes are made to the sync-once script:
1. If the sync entry is not present i

bmc: sync-once: handle deleted source files

Ensure destination files are removed if the source files are deleted.

Two changes are made to the sync-once script:
1. If the sync entry is not present in the source, remove it from the
destination.
2. Add --delete option to rsync to remove destination files that are not
present in the source.

Tested For first change:
1. For directories that not present in the source, the destination
directory is present.
```
~# tree /etc/systemd/network/
/etc/systemd/network/ [error opening dir]

~# tree /run/media/rwfs-alt/cow/etc/systemd/network/
/run/media/rwfs-alt/cow/etc/systemd/network/
|-- a
|-- b
`-- c
```

2. After running the sync-once script, the destination directory is
removed.
```
~# bash bmc/sync-once.sh
rsync -a -R --delete /etc/hostname /run/media/rwfs-alt/cow
rsync -a -R --delete /etc/machine-id /run/media/rwfs-alt/cow
Removing /run/media/rwfs-alt/cow//etc/systemd/network/

~# tree /run/media/rwfs-alt/cow/etc/systemd/network/
/run/media/rwfs-alt/cow/etc/systemd/network/ [error opening dir]
```

3. For files that are not present in the source, the destination file is
present.
```
~# ls -l /etc/machine-id
ls: cannot access '/etc/machine-id': No such file or directory
~# ls -l /run/media/rwfs-alt/cow/etc/machine-id
-rw-r--r-- 1 root root 33 Feb 14 03:57 /run/media/rwfs-alt/cow/etc/machine-id
```

4. After running the sync-once script, the destination file is removed.
```
~# bash bmc/sync-once.sh
sudo bash bmc/sync-once.sh

~# rsync -a -R --delete /etc/hostname /run/media/rwfs-alt/cow
Removing /run/media/rwfs-alt/cow//etc/machine-id

~# ls -l /run/media/rwfs-alt/cow/etc/machine-id
ls: cannot access '/run/media/rwfs-alt/cow/etc/machine-id': No such file or directory
```

For the second change:
1. if the destination is directory and the destination's files are not
present in the source, the destination files are removed.
```
~# tree /etc/systemd/network/
/etc/systemd/network/
|-- a
`-- c

~# tree /run/media/rwfs-alt/cow/etc/systemd/network/
/run/media/rwfs-alt/cow/etc/systemd/network/
|-- a
|-- b
`-- c

~# bash bmc/sync-once.sh
rsync -a -R --delete /etc/systemd/network/ /run/media/rwfs-alt/cow

~# tree /etc/systemd/network/
/etc/systemd/network/
|-- a
`-- c

~# tree /run/media/rwfs-alt/cow/etc/systemd/network/
/run/media/rwfs-alt/cow/etc/systemd/network/
|-- a
`-- c
```

Change-Id: I81f5adcf1816f1c8d0b153fa2ae4db2860daa43a
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>

show more ...

ccec7c6721-Feb-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: allow update to Version interface

Change 'setVersion' to change the 'Version' property on
xyz.openbmc_project.Software.Version

Tested: 'Version' property is updated an error is no longer pr

common: allow update to Version interface

Change 'setVersion' to change the 'Version' property on
xyz.openbmc_project.Software.Version

Tested: 'Version' property is updated an error is no longer printed.

Change-Id: I684b9feb5465239aae5cfae846179782d579678c
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

5622ee9218-Feb-2025 Alexander Hansen <alexander.hansen@9elements.com>

common: activation progress not taking effect

'class Device' has member function

```
bool setUpdateProgress(uint8_t progress) const;
```

to update the activation status, which set the activation s

common: activation progress not taking effect

'class Device' has member function

```
bool setUpdateProgress(uint8_t progress) const;
```

to update the activation status, which set the activation status for
device->softwarePending.

'softwarePending' however was only set on the class after the update to
the device already succeeded. So 'Device::updateDevice' could not
update the activation progress via 'Device::setUpdateProgress'

Fix this bug by setting 'softwarePending' before 'updateDevice' is
called.

Tested: With SPI Device Code Updater.

The activation progress is now set as expected.

```
curl --silent --insecure --user root:root https://${bmc}/redfish/v1/TaskService/Tasks/0
```
Output:
```
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"EndTime": "2025-02-18T14:05:46+00:00",
"HidePayload": false,
"Id": "0",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has started.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 10 percent complete.",
"MessageArgs": [
"0",
"10"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 20 percent complete.",
"MessageArgs": [
"0",
"20"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 70 percent complete.",
"MessageArgs": [
"0",
"70"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has changed to progress 100 percent complete.",
"MessageArgs": [
"0",
"100"
],
"MessageId": "TaskEvent.1.0.TaskProgressChanged",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has completed.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.TaskCompletedOK",
"MessageSeverity": "OK",
"Resolution": "None."
}
],
"Name": "Task 0",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"JsonBody": "null",
"TargetUri": "/redfish/v1/UpdateService/update"
},
"PercentComplete": 90,
"StartTime": "2025-02-18T14:04:47+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
"TaskState": "Completed",
"TaskStatus": "OK"
}
```

Change-Id: I4b22a37215357b83300f8368f75d3c025cd5d06b
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

85aed22318-Feb-2025 Alexander Hansen <alexander.hansen@9elements.com>

fixup: test: example device

- Fix the update progress loop in
test/common/exampledevice/example_device.cpp.
The update progress should be incremented there.

- Move a comment to the relevant lin

fixup: test: example device

- Fix the update progress loop in
test/common/exampledevice/example_device.cpp.
The update progress should be incremented there.

- Move a comment to the relevant lines in
test/common/exampledevice/example_updater_main.cpp

Tested: Unit tests pass.

Change-Id: I5fa908e1c6f95eaaa2710853c065fc341a30035f
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

aa30064604-Feb-2025 Alexander Hansen <alexander.hansen@9elements.com>

fw update: implement example device

Introduce example-device and example-code-updater, which are used as
examples for how to implement devices and code updaters according to the
design [1]

Tested:

fw update: implement example device

Introduce example-device and example-code-updater, which are used as
examples for how to implement devices and code updaters according to the
design [1]

Tested:

The example code updater allows us to perform manual testing without
a dependency on any specific device.

Running the example code updater results in follow dbus output:

```
busctl --full --no-pager tree xyz.openbmc_project.ExampleCodeUpdater

└─ /xyz
└─ /xyz/openbmc_project
└─ /xyz/openbmc_project/software
└─ /xyz/openbmc_project/software/ExampleSoftware_4081

busctl --full --no-pager introspect xyz.openbmc_project.ExampleCodeUpdater /xyz/openbmc_project/software/ExampleSoftware_4081

CodeUpdater /xyz/openbmc_project/software/ExampleSoftware_4081
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.Software.Activation interface - - -
.Activation property s "xyz.openbmc_project.Software.Activation.Activations.Active" emits-change writable
.RequestedActivation property s "xyz.openbmc_project.Software.Activation.RequestedActivations.None" emits-change writable
xyz.openbmc_project.Software.Update interface - - -
.StartUpdate method hs o -
.AllowedApplyTimes property as 1 "xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.OnReset" emits-change
xyz.openbmc_project.Software.Version interface - - -
.Purpose property s "xyz.openbmc_project.Software.Version.VersionPurpose.Unknown" emits-change writable
.Version property s "v1.0"
```

References:
[1] https://github.com/openbmc/docs/blob/master/designs/code-update.md

Change-Id: I2bad241b3102e58eda5139174791adda82f6ca95
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

cc37235514-Jan-2025 Alexander Hansen <alexander.hansen@9elements.com>

fw update: common code

new daemons to implement the flow as described in
https://github.com/openbmc/docs/blob/master/designs/code-update.md

- common/
common code folder
- common update flow
-

fw update: common code

new daemons to implement the flow as described in
https://github.com/openbmc/docs/blob/master/designs/code-update.md

- common/
common code folder
- common update flow
- base class for the device specific update daemons

The new daemons are all following the generic template of Code Updater
daemon as outlined in the design.

The idea is that they are separate daemons (per device, as outlined in
the design) but share all the code that's not device specific.

Tested: next patch in series

Change-Id: If2438b8506aceb8c5313ec13a0bf7cb68f3cc279
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

ec807fcb03-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

Change-Id: Ifc60fd8e7091d83202753a57f215667613f1691c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

726e100c30-Jan-2025 Patrick Williams <patrick@stwcx.xyz>

build: use allowed over enabled or not-disabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`)

build: use allowed over enabled or not-disabled

Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer return true for auto features. Instead, the
expectation is to use `allowed()` which is true for both enabled and
auto.

Switch all uses of `enabled` to `allowed`.
Switch all uses of `not disabled` to `allowed`.

Change-Id: Id589cab6f0a0b49365bc4f6b8a151243fde02dba
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

ac3f93e617-Jan-2025 Christopher Meis <christopher.meis@9elements.com>

Fix broken download link to boost_1.84 and update version to boost_1.86

[1] https://github.com/boostorg/boost/issues/996#issuecomment-2567031602

Change-Id: I0092e7e0a3205bb1ee206af3a65f60de6e6186b4

Fix broken download link to boost_1.84 and update version to boost_1.86

[1] https://github.com/boostorg/boost/issues/996#issuecomment-2567031602

Change-Id: I0092e7e0a3205bb1ee206af3a65f60de6e6186b4
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>

show more ...

eae5ec9e01-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I4a9d4410fcf7c9e87481d7d962fbcc92d071c913
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I4a9d4410fcf7c9e87481d7d962fbcc92d071c913
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

00b3cae126-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

fw update: pldm package parser

The code is taken from 'pldm' repo, but there is an ongoing effort to
make it part of libpldm [1].

The intent of this patch is to provide a few high-level functions t

fw update: pldm package parser

The code is taken from 'pldm' repo, but there is an ongoing effort to
make it part of libpldm [1].

The intent of this patch is to provide a few high-level functions to
parse a PLDM fw update package.

If/when the package parser is available in libpldm, this code can be
dropped.

References:
- [1] https://gerrit.openbmc.org/c/openbmc/libpldm/+/77095

Tested: next patch in series

Change-Id: I8212d88702e59d9d78965baf4e8c2243b8035b42
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

5c7c841f29-Jan-2025 Patrick Williams <patrick@stwcx.xyz>

meson: add libpldm wrap file

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib554f7e697641c941a4275f021a8207a5cdb5472

88b98bf229-Jan-2025 Alexander Hansen <alexander.hansen@9elements.com>

fix: fw-update: make libpldm optional dependency

Only pull in the libpldm dependency if tests are enabled.

The only users of this dependency currently are in the tests.

Change-Id: I17759c536e32c4b

fix: fw-update: make libpldm optional dependency

Only pull in the libpldm dependency if tests are enabled.

The only users of this dependency currently are in the tests.

Change-Id: I17759c536e32c4b15af1f9afd0acde85efe4d3c4
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

4a053c8e26-Nov-2024 Alexander Hansen <alexander.hansen@9elements.com>

fw update: library to create pldm fw package

Implement some helper functions to easily create a pldm fw package in a
few lines of user code.

This is helpful for unit testing the code update flow.

fw update: library to create pldm fw package

Implement some helper functions to easily create a pldm fw package in a
few lines of user code.

This is helpful for unit testing the code update flow.

The package created is for testing purpose. The library is not
fully-featured or complete and should not be relied upon for anything
other than the tests in this repo.

https://github.com/openbmc/docs/blob/master/designs/code-update.md

Tested: next few patches in series

Change-Id: If899e5537a2e5ac641544ca80e8876d83549da28
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>

show more ...

cab87e9c02-Jan-2025 Jagpal Singh Gill <paligill@gmail.com>

re-organize the current files into bmc directory

More daemons are being developed in phosphor-bmc-code-mgmt repo as part
of https://github.com/openbmc/docs/blob/master/designs/code-update.md.
For th

re-organize the current files into bmc directory

More daemons are being developed in phosphor-bmc-code-mgmt repo as part
of https://github.com/openbmc/docs/blob/master/designs/code-update.md.
For this move the current files for BMC code update into bmc
subdirectory for a better code organization.

Tested:
meson build passes.

Change-Id: I7b5575bcfbe54ac00aa803f94b5d8f6d69ce2f3f
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...


bmc/activation.cpp
bmc/activation.hpp
bmc/detect-slot-aspeed
bmc/download_manager.cpp
bmc/download_manager.hpp
bmc/download_manager_main.cpp
bmc/flash.hpp
bmc/force-reboot.service.in
bmc/gen-bios-tar
bmc/image_manager.cpp
bmc/image_manager.hpp
bmc/image_manager_main.cpp
bmc/image_verify.cpp
bmc/image_verify.hpp
bmc/images.cpp
bmc/images.hpp
bmc/item_updater.cpp
bmc/item_updater.hpp
bmc/item_updater_helper.hpp
bmc/item_updater_main.cpp
bmc/meson.build
bmc/mmc/flash.cpp
bmc/mmc/item_updater_helper.cpp
bmc/mmc/obmc-flash-mmc-mirroruboot.service.in
bmc/mmc/obmc-flash-mmc-mount.service.in
bmc/mmc/obmc-flash-mmc-remove@.service.in
bmc/mmc/obmc-flash-mmc-setprimary@.service.in
bmc/mmc/obmc-flash-mmc-umount.service.in
bmc/mmc/obmc-flash-mmc@.service.in
bmc/msl_verify.cpp
bmc/msl_verify.hpp
bmc/obmc-flash-bmc
bmc/obmc-flash-bmc-setenv@.service.in
bmc/obmc-flash-host-bios@.service.in
bmc/openssl_alloc.cpp
bmc/openssl_alloc.hpp
bmc/reboot-guard-disable.service.in
bmc/reboot-guard-enable.service.in
bmc/reset-cs0-aspeed
bmc/serialize.cpp
bmc/serialize.hpp
bmc/side-switch/meson.build
bmc/side-switch/phosphor-bmc-side-switch.service
bmc/side-switch/side_switch.cpp
bmc/side-switch/side_switch.hpp
bmc/software.conf
bmc/software_manager.cpp
bmc/software_utils.cpp
bmc/software_utils.hpp
bmc/static/flash.cpp
bmc/static/item_updater_helper.cpp
bmc/static/obmc-flash-bmc-alt@.service.in
bmc/static/obmc-flash-bmc-prepare-for-sync.service.in
bmc/static/obmc-flash-bmc-static-mount-alt.service.in
bmc/sync-once.sh
bmc/sync_manager.cpp
bmc/sync_manager.hpp
bmc/sync_manager_main.cpp
bmc/sync_watch.cpp
bmc/sync_watch.hpp
bmc/synclist
bmc/test/README.md
bmc/test/utest.cpp
bmc/ubi/flash.cpp
bmc/ubi/item_updater_helper.cpp
bmc/ubi/obmc-flash-bmc-cleanup.service.in
bmc/ubi/obmc-flash-bmc-mirroruboot.service.in
bmc/ubi/obmc-flash-bmc-ubiremount.service.in
bmc/ubi/obmc-flash-bmc-ubiro-remove@.service.in
bmc/ubi/obmc-flash-bmc-ubiro@.service.in
bmc/ubi/obmc-flash-bmc-ubirw-remove.service.in
bmc/ubi/obmc-flash-bmc-ubirw.service.in
bmc/ubi/obmc-flash-bmc-updateubootvars@.service.in
bmc/update_manager.cpp
bmc/update_manager.hpp
bmc/usb/70-bmc-usb.rules
bmc/usb/meson.build
bmc/usb/services/usb-code-update@.service
bmc/usb/usb_manager.cpp
bmc/usb/usb_manager.hpp
bmc/usb/usb_manager_main.cpp
bmc/usr-local.mount.in
bmc/utils.cpp
bmc/utils.hpp
bmc/version.cpp
bmc/version.hpp
bmc/watch.cpp
bmc/watch.hpp
bmc/xyz.openbmc_project.Software.BMC.Updater.service.in
bmc/xyz.openbmc_project.Software.Download.service.in
bmc/xyz.openbmc_project.Software.Manager.service.in
bmc/xyz.openbmc_project.Software.Sync.service.in
bmc/xyz.openbmc_project.Software.Version.service.in
meson.build
bdcf574118-Dec-2024 Patrick Williams <patrick@stwcx.xyz>

sync_watch: remove unused 'loop' member

Clang-19 warns about an unused member, which is indeed unused, so
remove it.

```
../sync_watch.hpp:73:15: error: private field 'loop' is not used [-Werror,-W

sync_watch: remove unused 'loop' member

Clang-19 warns about an unused member, which is indeed unused, so
remove it.

```
../sync_watch.hpp:73:15: error: private field 'loop' is not used [-Werror,-Wunused-private-field]
73 | sd_event& loop;
```

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I3836822d8ebd4b9b1bb219be0583636ae8a47b96

show more ...

b3e3d64818-Dec-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have b

clang-format: re-format for clang-19

clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have been deprecated, so adjust the style file
accordingly.

See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style.
See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.

Change-Id: I56feaf9f59062859fda246a38bae0c2aa0b12462
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

db3d966a06-Dec-2024 Adriana Kobylak <anoo@us.ibm.com>

obmc-flash-bmc: Add new Manager service as default

For D-Bus calls that require the service name, use the new
Software.Manager service first since that'll be the default, and if the
call fails, try

obmc-flash-bmc: Add new Manager service as default

For D-Bus calls that require the service name, use the new
Software.Manager service first since that'll be the default, and if the
call fails, try with the old code update service name:
busctl new || old

We could use the mapper API GetObject to figure out the service name,
but this would add a 2nd D-Bus call, and the new code update service
would be the default so there's no need to make additional calls. In
addition the output of GetObject would need to be parsed. And in some
instances like the call to busctl tree service, there's not a unique
interface under the software/ path to differentiate the service name
from other updaters such as the PSU update manager.

Tested: Code update with new and old service on a p10bmc system.

Change-Id: Ib5c8115006028d7d9341895afab46eb771f8cf33
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

61c1a8aa05-Dec-2024 Adriana Kobylak <anoo@us.ibm.com>

Add the new Software.Manager to service dependencies

Remove the Wants dependencies to the old code update service, these
services start by default. Add Before/After dependencies on the new
Software.

Add the new Software.Manager to service dependencies

Remove the Wants dependencies to the old code update service, these
services start by default. Add Before/After dependencies on the new
Software.Manager service to support both the old and the new flow.

Change-Id: I4669e2ef89ab4d8e292c1add3c8b87bb640b5583
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

b7df12cc12-Nov-2024 Jagpal Singh Gill <paligill@gmail.com>

update usb-code-update service dependencies

Remove the usb-code-update Wants dependencies on old update service and
add After dependencies on Software.Manager service.

Tested:
Verified with new ser

update usb-code-update service dependencies

Remove the usb-code-update Wants dependencies on old update service and
add After dependencies on Software.Manager service.

Tested:
Verified with new service enabled and usb-code-updater starts fine.

Change-Id: I4906fc8ca447f14f72e718f4a55c0bd3adf6f940
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

58d6982c12-Nov-2024 Jagpal Singh Gill <paligill@gmail.com>

disable service files for Updater and Version

Add the service files for Updater and Version manager only if the
software-update-dbus-interface meson option is disabled. These services
will be repla

disable service files for Updater and Version

Add the service files for Updater and Version manager only if the
software-update-dbus-interface meson option is disabled. These services
will be replaced by new Software.Manager service.

Tested -
```
> curl -k -H "X-Auth-Token: $token" -H "Content-Type:multipart/form-data" -X POST -F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/a79d71e4\"],\"@Redfish.OperationApplyTime\":\"OnReset\"};type=application/json" -F "UpdateFile=@obmc-phosphor-image-romulus-20241015174416.static.mtd.tar;type=application/octet-stream" https://${bmc}/redfish/v1/UpdateService/update
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"Id": "0",
"TaskState": "Running",
"TaskStatus": "OK"
}

> systemctl status xyz.openbmc_project.Software.Manager
* xyz.openbmc_project.Software.Manager.service - Phosphor Software Manager
Loaded: loaded (/usr/lib/systemd/system/xyz.openbmc_project.Software.Manager.service; enabled; preset: enabled)
Active: active (running) since Thu 2024-11-14 00:54:43 UTC; 2min 8s ago
Process: 272 ExecStartPre=/bin/sh -c mkdir -p /tmp/images (code=exited, status=0/SUCCESS)
Main PID: 290 (phosphor-softwa)
CPU: 995ms
CGroup: /system.slice/xyz.openbmc_project.Software.Manager.service
`-290 /usr/bin/phosphor-software-manager

Nov 14 00:54:11 romulus systemd[1]: Starting Phosphor Software Manager...
Nov 14 00:54:22 romulus phosphor-software-manager[290]: Creating Software Manager
Nov 14 00:54:43 romulus systemd[1]: Started Phosphor Software Manager.

> systemctl status xyz.openbmc_project.Software.Version.service
* xyz.openbmc_project.Software.Version.service - Phosphor Version Software Manager
Loaded: loaded (/usr/lib/systemd/system/xyz.openbmc_project.Software.Version.service; enabled; preset: enabled)
Active: active (running) since Thu 2024-11-14 01:35:19 UTC; 38s ago
Process: 345 ExecStartPre=/bin/sh -c mkdir -p /tmp/images (code=exited, status=0/SUCCESS)
Main PID: 350 (phosphor-versio)
CPU: 391ms
CGroup: /system.slice/xyz.openbmc_project.Software.Version.service
`-350 /usr/bin/phosphor-version-software-manager

Nov 14 01:35:10 romulus systemd[1]: Starting Phosphor Version Software Manager...
Nov 14 01:35:19 romulus systemd[1]: Started Phosphor Version Software Manager.
> systemctl status xyz.openbmc_project.Software.BMC.Updater.service
* xyz.openbmc_project.Software.BMC.Updater.service - OpenBMC Software Update Manager
Loaded: loaded (/usr/lib/systemd/system/xyz.openbmc_project.Software.BMC.Updater.service; enabled; preset: enabled)
Drop-In: /usr/lib/systemd/system/xyz.openbmc_project.Software.BMC.Updater.service.d
`-software-bmc-updater.conf
Active: active (running) since Thu 2024-11-14 01:35:00 UTC; 1min 20s ago
Main PID: 271 (phosphor-image-)
CPU: 825ms
CGroup: /system.slice/xyz.openbmc_project.Software.BMC.Updater.service
`-271 /usr/bin/phosphor-image-updater

Nov 14 01:34:42 romulus systemd[1]: Starting OpenBMC Software Update Manager...

> systemctl status xyz.openbmc_project.Software.Manager.service
Unit xyz.openbmc_project.Software.Manager.service could not be found.
```

Change-Id: I67b40d18fce6e5a67d6fad9a5e3c7a0c74cd11aa
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

46f2a39804-Nov-2024 Jagpal Singh Gill <paligill@gmail.com>

verify the image purpose with updater type

Verify the image purpose with updater type to make sure the correct
image is targeted for a given updater type.

Tested:
```
> curl -k -H "X-Auth-Token: $t

verify the image purpose with updater type

Verify the image purpose with updater type to make sure the correct
image is targeted for a given updater type.

Tested:
```
> curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/octet-stream" -X POST -T bios_image.tar https://${bmc}/redfish/v1/UpdateService/update
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"Id": "0",
"TaskState": "Running",
"TaskStatus": "OK"
}

Nov 05 01:51:54 romulus phosphor-software-manager[582]: Purpose (xyz.openbmc_project.Software.Version.VersionPurpose.Host) is not supported
Nov 05 01:51:54 romulus phosphor-software-manager[582]: An error occurred processing the image.

curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/TaskService/Tasks/0
{
"@odata.id": "/redfish/v1/TaskService/Tasks/0",
"@odata.type": "#Task.v1_4_3.Task",
"EndTime": "2024-11-05T01:51:54+00:00",
"HidePayload": false,
"Id": "0",
"Messages": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has started.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.3.TaskStarted",
"MessageSeverity": "OK",
"Resolution": "None."
},
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The task with Id '0' has completed with errors.",
"MessageArgs": [
"0"
],
"MessageId": "TaskEvent.1.0.3.TaskAborted",
"MessageSeverity": "Critical",
"Resolution": "None."
}
],
"Name": "Task 0",
"Payload": {
"HttpHeaders": [],
"HttpOperation": "POST",
"JsonBody": "null",
"TargetUri": "/redfish/v1/UpdateService/update"
},
"PercentComplete": 0,
"StartTime": "2024-11-05T01:51:25+00:00",
"TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0",
"TaskState": "Exception",
"TaskStatus": "Warning"
}
```

Change-Id: I9eada7cc929a5518b44f28249a1cf8c5a55a5384
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...

12345678910>>...17