#
c111b93c |
| 12-Aug-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
Skip updateable association for functional BMC
The updateable association should only be created for non-functional BMCs for dual image systems, otherwise create the updateable association by defaul
Skip updateable association for functional BMC
The updateable association should only be created for non-functional BMCs for dual image systems, otherwise create the updateable association by default for single image systems. Add object path to version class as it will be needed for update interface and updateable association creation.
Tested: ``` > curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/3c956be0 { "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/3c956be0", "@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory", "Description": "BMC image", "Id": "3c956be0", "Name": "Software Inventory", "RelatedItem": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ], "RelatedItem@odata.count": 1, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" }, "Updateable": true, "Version": "2.16.0-dev-1063-g57294f9ba2-dirty" } ``` Updateable is marked true for inventory with update interface.
Change-Id: I93b6a6ae36e2d0a06e8f5f97d04007da7707f1d6 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
#
6d17852d |
| 24-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable performance-unnecessary-value-param check
This check flags value parameter declarations of expensive to copy types that are copied for each invocation but it would suffice to pass
clang-tidy: Enable performance-unnecessary-value-param check
This check flags value parameter declarations of expensive to copy types that are copied for each invocation but it would suffice to pass them by const reference.
Change-Id: I631deda63fcbb74362313c9596bf7e72933b0d0c Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
#
1e9a5f1a |
| 23-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: use non-deprecated namespaces
The sdbusplus repository has deprecated some namespaces and they are currently only enabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE guard. Switch to the
sdbus++: use non-deprecated namespaces
The sdbusplus repository has deprecated some namespaces and they are currently only enabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE guard. Switch to the new namespace names.
Change-Id: Iaab6df118eb4dc65139e759dcb22851422f88389 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
bf2bb2b1 |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I96286490697ce5d7fecc1c9c358f5f1d054137ec
show more ...
|
#
35aa9a88 |
| 05-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5479733e7f0a81c10fa432538be3f6cf730541f4
show more ...
|
#
054bb0b8 |
| 15-Mar-2022 |
Justin Ledford <justinledford@google.com> |
Add support for Inventory.Decorator.Compatible
This adds support for the compatibility strings interface described in https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/yaml/xyz/openbmc
Add support for Inventory.Decorator.Compatible
This adds support for the compatibility strings interface described in https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/yaml/xyz/openbmc_project/Software#compatibility.
The Version objects will now be created with the Inventory.Decorator.Compatible interface with the compatibility names coming from the MANIFEST file. e.g. version=1.2.3 MachineName=foo purpose=Other ExtendedVersion=a.b.c CompatibleName=foo.bar CompatibleName=baz.bim
Tested: $ busctl get-property xyz.openbmc_project.Software.Version \ /xyz/openbmc_project/software/517751da \ xyz.openbmc_project.Inventory.Decorator.Compatible Names as 2 "foo.bar" "baz.bim"
Signed-off-by: Justin Ledford <justinledford@google.com> Change-Id: I9ee36af2d3d1494d533a3b09c466a250c4fe786b
show more ...
|
#
59b640b0 |
| 21-Jan-2022 |
Adriana Kobylak <anoo@us.ibm.com> |
Support uploading same image for multiple times
The code was unable to upload the same image for multiple times because it has the same version ID.
Add a salt when generating the version ID so that
Support uploading same image for multiple times
The code was unable to upload the same image for multiple times because it has the same version ID.
Add a salt when generating the version ID so that we could get different version IDs for the same image, and thus it is possible to upload the images for multiple times. Use a random generator with the time as seed to ensure uniqueness.
When the image updater starts up, use the mount directory name or functional suffix as seeds to make the version ids unique.
The version ID is then necessary in the version object because the Delete interface needs it when the version object is to be deleted.
With this change, it is possible to upload and update the same image for multiple times, and systems with dual BMC chips could have the same image as well.
Tested: Upload a same image for multiple times and verify all the uploads are OK and getting different DBus objects; Verify it is OK to delete the uploaded images by deleting the DBus objects. Verify the code update works on all layouts and that the flash id (Path property) was set.
- static root@romulus:~# busctl --no-pager introspect \ xyz.openbmc_project.Software.BMC.Updater \ /xyz/openbmc_project/software/79139bc0 ... .Path property s "9e3b868e"
root@romulus:~# ls -l /run/media/rofs-9e3b868e-functional/etc/ lrwxrwxrwx 1 root root 15 Jan 22 20:11 os-release -> /etc/os-release
- ubi root@witherspoon:~# busctl --no-pager introspect \ xyz.openbmc_project.Software.BMC.Updater \ /xyz/openbmc_project/software/151bc3d8 ... .Path property s "cfb85943"
root@witherspoon:~# df /dev/ubiblock0_0 18816 18816 0 100% /media/rofs-cfb85943-functional /dev/ubiblock4_0 18816 18816 0 100% /media/rofs-26085328
root@witherspoon:~# cat /var/lib/phosphor-bmc-code-mgmt/cfb85943/priority { "priority": 0 }
- mmc root@p10bmc:~# busctl --no-pager introspect \ xyz.openbmc_project.Software.BMC.Updater \ /xyz/openbmc_project/software/cb5f99e2 ... .Path property s "b"
root@p10bmc:~# df /dev/mmcblk0p5 202095 153782 33107 82% /media/rofs-b-functional
root@p10bmc:~# cat /var/lib/phosphor-bmc-code-mgmt/b/priority { "priority": 0 }
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Change-Id: I76842de4d5b7c5175acc43ed7c57e0deb4057be5
show more ...
|
#
1e81f23c |
| 18-Jan-2022 |
Adriana Kobylak <anoo@us.ibm.com> |
Determine functional versions from mount directory
In order to support the same version on the primary and backup flash locations, the version string is not enough to determine which version is func
Determine functional versions from mount directory
In order to support the same version on the primary and backup flash locations, the version string is not enough to determine which version is functional. Therefore add a functional suffix to the mount directory of the functional and use that to set the Version as functional.
Tested: The mount directories indicate which version is functional, associations look correct.
- static: root@romulus:~# ls -l /run/media/rofs-79139bc0-functional/etc/ lrwxrwxrwx 1 root root 15 Jan 22 20:11 os-release -> /etc/os-release
root@romulus:~# busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/software/functional org.freedesktop.DBus.Properties Get ss xyz.openbmc_project.Association endpoints v as 1 "/xyz/openbmc_project/software/79139bc0"
- ubi root@witherspoon:~# df /dev/ubiblock0_0 18816 18816 0 100% /media/rofs-cfb85943-functional /dev/ubiblock4_0 18816 18816 0 100% /media/rofs-26085328
- mmc: Verified functional association is correct, the rofs directories are still unmounted after the bmc updater starts.
Change-Id: I8114a86b36ca1c6b1634b01fcce3cef0a2369eca Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
b412bd1d |
| 23-Mar-2021 |
Lei YU <yulei.sh@bytedance.com> |
version.hpp: Pass const reference
In 1fd6ddd it adds a std::string& as parameter, it is better to use const std::string&. In the following commit, there is a change that requires const reference.
S
version.hpp: Pass const reference
In 1fd6ddd it adds a std::string& as parameter, it is better to use const std::string&. In the following commit, there is a change that requires const reference.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ie3f350e577d944dd4d7e65a4790b2fead3d7eecb
show more ...
|
#
1fd6dddf |
| 05-Jan-2021 |
Chanh Nguyen <chanh@amperemail.onmicrosoft.com> |
Implement Software.Extended Version
- Populate the ExtendedVersion object from MANIFEST - Create an ExtendedVersion object
Change-Id: I13e352d4cb8f4a73259a940f341a736fe7e9305f Signed-off-by: Chanh
Implement Software.Extended Version
- Populate the ExtendedVersion object from MANIFEST - Create an ExtendedVersion object
Change-Id: I13e352d4cb8f4a73259a940f341a736fe7e9305f Signed-off-by: Chanh Nguyen <chanh@amperemail.onmicrosoft.com>
show more ...
|
#
58aa7508 |
| 08-Jun-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
clang-format: update to latest from docs repo
The openbmc/docs/style/cpp/.clang-format has been updated to support clang-format10, take this opportunity to update it in this repo.
Change-Id: I9e6b9
clang-format: update to latest from docs repo
The openbmc/docs/style/cpp/.clang-format has been updated to support clang-format10, take this opportunity to update it in this repo.
Change-Id: I9e6b9853bf4cd7399b1ae504ea3be5093d763fee Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
292159f4 |
| 05-May-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
meson: Fix compile errors
Meson runs stricter compiler checks. Fix the following errors in preparation to moving to meson:
- Unusued parameters. Ex: ../download_manager_main.cpp:7:14: error: unused
meson: Fix compile errors
Meson runs stricter compiler checks. Fix the following errors in preparation to moving to meson:
- Unusued parameters. Ex: ../download_manager_main.cpp:7:14: error: unused parameter ‘argc’ [-Werror=unused-parameter] ../static/item_updater_helper.cpp:16:42: error: unused parameter ‘entryId’ [-Werror=unused-parameter] ../watch.cpp:77:38: error: unused parameter ‘s’ [-Werror=unused-parameter] [test/utest.cpp:166]: (style) Variable 'pubKeyConfFile' is assigned a value that is never used.
- Add destructor and initialize variable in init list: ../flash.hpp:18:7: error: ‘class phosphor::software::updater::Flash’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor] [version.hpp:81]: callback is assigned in constructor body. Consider performing initialization in initialization list
Tested: Verified code update on witherspoon still worked.
Change-Id: Ib7a0e0e11d6bfe6eeeb3f2ea4bfefd43505d639e Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
9155b713 |
| 16-May-2020 |
Andrew Geissler <geissonator@yahoo.com> |
string: ensure string included
Latest upstream yocto appears to have removed a free include of string. This is causing compile failures for files which do not include it properly.
Signed-off-by: An
string: ensure string included
Latest upstream yocto appears to have removed a free include of string. This is causing compile failures for files which do not include it properly.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I457b7ca46bd010a9c5b363495d43a9b38e430bcf
show more ...
|
#
29d84b03 |
| 13-Feb-2020 |
Lei YU <mine260309@gmail.com> |
Cleanup the code related to emit_interface_added
sdbusplus now supports action::emit_interface_added() when an object is constructed, so the code that manually invokes emit_interface_added() could b
Cleanup the code related to emit_interface_added
sdbusplus now supports action::emit_interface_added() when an object is constructed, so the code that manually invokes emit_interface_added() could be cleaned up and use the above action instead.
Tested: Verify the software objects are created as before, and BMC code update works fine.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I0b2ce4773c51f89f5b39b2d601173694c969d15b
show more ...
|
#
b7c062ef |
| 18-Sep-2019 |
Vijay Khemka <vijaykhemka@fb.com> |
Verify machine name
Verifying machine name from os-release file vs MANIFEST file in image. Also supporting backword compatibility for older version where machine name is not defined.
Tested: tested
Verify machine name
Verifying machine name from os-release file vs MANIFEST file in image. Also supporting backword compatibility for older version where machine name is not defined.
Tested: tested this with latest image build and manifest file patch
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com> Change-Id: Icb0ac3f884ea1131e2ffd2bde6b8a37185dc55ea
show more ...
|
#
b0ce996a |
| 07-Sep-2018 |
Gunnar Mills <gmills@us.ibm.com> |
clang-format: Update to match docs repo
Update the .clang-format file. Now includes header sorting and updating PointerAlignment.
Change-Id: I5c7690d8d83cdebe26ff3a73b90a2a8c17dd8054 Signed-off-by:
clang-format: Update to match docs repo
Update the .clang-format file. Now includes header sorting and updating PointerAlignment.
Change-Id: I5c7690d8d83cdebe26ff3a73b90a2a8c17dd8054 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
2285fe0f |
| 27-Feb-2018 |
Adriana Kobylak <anoo@us.ibm.com> |
Enable clang code format
Change-Id: Ia899858c11cff6e4fa26b820b35b1e5dca1b57df Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
#
ee13e831 |
| 23-Oct-2017 |
Saqib Khan <khansa@us.ibm.com> |
BMC: Fix the delete implementation.
- Implement delete interface inside version class so that both item_updater and image_manager can share the same interface. This meant removing the delete i
BMC: Fix the delete implementation.
- Implement delete interface inside version class so that both item_updater and image_manager can share the same interface. This meant removing the delete interface from inside the activation class. - The delete is created as a separate object inside version, only if the image is non-functional. This helps remove the delete interface from a running BMC/HOST image. - As part of the activation process, the version from inside the image_manager is deleted and so is the version's tarfile from the image upload dir.
Partially resolves openbmc/openbmc#2490
Change-Id: Ib35bf188df85ebd2277d3d9ad04300e434965eea Signed-off-by: Saqib Khan <khansa@us.ibm.com>
show more ...
|
#
a4fcb683 |
| 06-Oct-2017 |
Gunnar Mills <gmills@us.ibm.com> |
Style and comment changes in version.hpp
Style and comment changes only. Made more clear the difference between the version id (e.g. ad324adb) and the version string (e.g. v1.99.10-19 or IBM-withers
Style and comment changes in version.hpp
Style and comment changes only. Made more clear the difference between the version id (e.g. ad324adb) and the version string (e.g. v1.99.10-19 or IBM-witherspoon-sequoia-ibm-OP9_v1.18_1.54)
A similar change was made in openpower-pnor-code-mgmt.
Change-Id: Ic8cb41ff35117196a134d46eaa4bd476c37abd4c Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
6d873715 |
| 01-Sep-2017 |
Eddie James <eajames@us.ibm.com> |
Add checks for currently running bmc image before erasing
- Check if the image to be erased is currently running on the BMC. If it is, fail to erase the image.
Change-Id: Ief2ba2e5e16f6664eeb4296
Add checks for currently running bmc image before erasing
- Check if the image to be erased is currently running on the BMC. If it is, fail to erase the image.
Change-Id: Ief2ba2e5e16f6664eeb429699b826cae78ef9291 Signed-off-by: Eddie James <eajames@us.ibm.com>
show more ...
|
#
9440f491 |
| 30-Aug-2017 |
Eddie James <eajames@us.ibm.com> |
Fix problem requiring two Delete calls to remove an image
- Remove Delete inheritance and method from Version object. - Add Delete inheritance and method to Activation object. - Add a listener in th
Fix problem requiring two Delete calls to remove an image
- Remove Delete inheritance and method from Version object. - Add Delete inheritance and method to Activation object. - Add a listener in the image Manager for deleted Versions and remove its 'backup' copy of the Version.
Resolves openbmc/openbmc#2086
Change-Id: If41783319cf1ff5b840b747ba457d0570bc52918 Signed-off-by: Eddie James <eajames@us.ibm.com>
show more ...
|
#
1eef62de |
| 10-Aug-2017 |
Saqib Khan <khansa@us.ibm.com> |
BMC: Restore version and activation dbus objects on BMC reboot.
- Read the /media/ dir for active bmc versions. Each active version has a /etc/os-release inside /media/ which is used to recreate
BMC: Restore version and activation dbus objects on BMC reboot.
- Read the /media/ dir for active bmc versions. Each active version has a /etc/os-release inside /media/ which is used to recreate the version and activation objects.
Resolves openbmc/openbmc#2137
Change-Id: I40e97396b0912095868172a5a6566e2189a3446b Signed-off-by: Saqib Khan <khansa@us.ibm.com>
show more ...
|
#
3526ef73 |
| 07-Jul-2017 |
Leonel Gonzalez <lgonzalez@us.ibm.com> |
item_updater: Added erase method
Implements Object.Delete, so item_updater deletes ReadWrite, ReadOnly partitions, and removes Version, and Activation from maps.
Resolves openbmc/openbmc#1550
Chan
item_updater: Added erase method
Implements Object.Delete, so item_updater deletes ReadWrite, ReadOnly partitions, and removes Version, and Activation from maps.
Resolves openbmc/openbmc#1550
Change-Id: If6d08bc7d380d043c28a26570e4698201cd7f5b0 Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
show more ...
|
#
e4233687 |
| 07-Jul-2017 |
Leonel Gonzalez <lgonzalez@us.ibm.com> |
version: Added erase callback and delete method
Added erase callback, and delete method as part of implementing image Object.Delete to delete images.
Change-Id: If3251138c79e05693217fa3ae3f5b238e9c
version: Added erase callback and delete method
Added erase callback, and delete method as part of implementing image Object.Delete to delete images.
Change-Id: If3251138c79e05693217fa3ae3f5b238e9c61df4 Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
show more ...
|
#
84a0e693 |
| 28-Jun-2017 |
Saqib Khan <khansa@us.ibm.com> |
item_updater: style simplification
Resolves openbmc/openbmc#1715
Change-Id: I99bc8cfc96c791c602f807cfb6ba274be82ecc9f Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|