#
6d131aa7 |
| 08-Apr-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
start-update-interface: implement update manager
Implement the update manager module for the new daemon inheriting from the Update D-Bus interface. Link with new interface APIs from item_updater and
start-update-interface: implement update manager
Implement the update manager module for the new daemon inheriting from the Update D-Bus interface. Link with new interface APIs from item_updater and software utils. New daemon will continue to exist at runtime alongwith old flow, until old flow is deprecated and removed. This change is based on - https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/65738 https://gerrit.openbmc.org/c/openbmc/docs/+/65739
Change-Id: I0ecbbb8fc5340de7f66f8870ae389b405a2debee Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
#
bb024eba |
| 08-Apr-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
start-update-interface: item_updater & activation
Refactor item_updater so new update-manager module can call create the required interfaces such as version, activation etc for the incoming update r
start-update-interface: item_updater & activation
Refactor item_updater so new update-manager module can call create the required interfaces such as version, activation etc for the incoming update request. To facilitate this, new APIs are exposed and useUpdateDBusInterface is added to class constructor so required initializations can be performed accordingly. useUpdateDBusInterface helps to skip D-Bus callback registration for new software interfaces as item_updater will rely on start update D-Bus interface for intercepting image update requests. The apply time will be passed to the software manager via start update interface, so this patch adds an apply time parameter to the activation class. checkApplyTimeImmediate() can decide based on useUpdateDBusInterface whether to use the ApplyTime value from activation class or get it from the Settingsd for the old legacy flow. This change is based on - https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/65738 https://gerrit.openbmc.org/c/openbmc/docs/+/65739
Change-Id: I8477b0850f0a18630c197774bfa076d4c98096b1 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
#
fc33ba86 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I2b9626d95674508bb090745de6471fe2755c89fd Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
2d5704e6 |
| 26-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable readability-simplify-boolean-expr check
This check looks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly
clang-tidy: Enable readability-simplify-boolean-expr check
This check looks for boolean expressions involving boolean constants and simplifies them to use the appropriate boolean expression directly.
Change-Id: I79d7e4486bd0ea5f5b9b5a1644af99384e41e251 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
#
ce82de51 |
| 16-Jan-2024 |
Adriana Kobylak <anoo@us.ibm.com> |
errors: Use non-deprecated namespaces
The error namespaces have been updated. Reference: https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/66308 https://gerrit.openbmc.org/c/openbmc/phosphor-logging/
errors: Use non-deprecated namespaces
The error namespaces have been updated. Reference: https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/66308 https://gerrit.openbmc.org/c/openbmc/phosphor-logging/+/66463
Tested: Compiled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE option.
Change-Id: Idd1ca6f14635039bd8bd2f34d69afd3e97588648 Signed-off-by: Adriana Kobylak <anoo@us.ibm.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 ...
|
#
d5e8e73b |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I50e60f2b1a9db9039cb5450ae509064eaeaa9d2e Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
d97d3b9f |
| 19-Dec-2022 |
moni kumar <monix.kumar@intel.com> |
Removed reset of the interface ActivationProgress
ActivationProgress reset was removing the activationProgress interface which relates to Task progress. This was causing failure of the DBus control
Removed reset of the interface ActivationProgress
ActivationProgress reset was removing the activationProgress interface which relates to Task progress. This was causing failure of the DBus control commands to set the progress in the taskID, while BMC Firmware update is in progress. Moreover, the interface should not be removed after creation until the Firmware update completes.
Tested:
The DBus control commands work fine after removal of this reset.
Signed-off-by: moni kumar <monix.kumar@intel.com> Change-Id: I7157b10164759dd3d24f310074867beb08a5dc61
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 ...
|
#
10ec9750 |
| 27-Apr-2022 |
zamiseck <zimzam17@gmail.com> |
Change location of MSL error
The prev_entry() functionality that was being used to pass meta data was not performing as expected. To make sure all the desired information is passed to the event logs
Change location of MSL error
The prev_entry() functionality that was being used to pass meta data was not performing as expected. To make sure all the desired information is passed to the event logs. This is done by reporting directly from the msl_verify.cpp file where the information is then directly reported.
Signed-off-by: Zami Seck <zimzam17@gmail.com> Change-Id: I4c4a41a104db9dcf303914b4a5e4e43908082414
show more ...
|
#
3afdaaf3 |
| 28-Mar-2022 |
zamiseck <zimzam17@gmail.com> |
Signature Validation : Change Error Thrown
This commit changes the error reported when the signature requirements are not met. Instead of reporting "InternalError", the newly defined InvalidSignatur
Signature Validation : Change Error Thrown
This commit changes the error reported when the signature requirements are not met. Instead of reporting "InternalError", the newly defined InvalidSignature error is thrown in its place. This allows there to be a more specific error shown.
Tested: Before: Apr 08 19:04:44 witherspoon phosphor-image-updater[416]: Error occurred during image validation Apr 08 19:04:44 witherspoon phosphor-image-updater[416]: The operation failed internally.
After: Jan 01 00:11:10 witherspoon phosphor-image-updater[403]: Signature Validation failed for image version.
Signed-off-by: Zami Seck <zimzam17@gmail.com> Change-Id: Ia92aba70ea4b346b1473b557a5adeeea7a3cae3d
show more ...
|
#
bee6243a |
| 14-Mar-2022 |
Thang Tran <thuutran@amperecomputing.com> |
Create ActivationBlocksTransition before write HOST BIOS image
Currently, Host can be turned on and the BMC can reboot during HOST BIOS image is flashing. it can make the flashing fails. Enable Acti
Create ActivationBlocksTransition before write HOST BIOS image
Currently, Host can be turned on and the BMC can reboot during HOST BIOS image is flashing. it can make the flashing fails. Enable ActivationBlocksTransition before write HOST BIOS image to block turning on HOST or reboot BMC when flashing did not complete.
Tested: 1. Request to write new Host bios image via Redfish. 2. Turn on HOST. 3. HOST still is off until flashing completed. 4. New HOST BIOS image is flashed.
Signed-off-by: Thang Tran <thuutran@amperecomputing.com> Change-Id: Ifa8ec1a96bc9c1ecf0dbdcc5d11435c0f594d66b
show more ...
|
#
d8c9eea3 |
| 16-Dec-2021 |
Lei YU <yulei.sh@bytedance.com> |
dual-image: Implement BMC update when running on secondary
Implement the BMC code update when it's running on the secondary image. It will update the alt flash by obmc-flash-bmc-alt@.service and wai
dual-image: Implement BMC update when running on secondary
Implement the BMC code update when it's running on the secondary image. It will update the alt flash by obmc-flash-bmc-alt@.service and wait for the completion. After the update is done, it needs reboot to take effect.
Note if the BMC is running on the secondary, it requires a following commit to reset the CS to make the SoC to boot from the primary flash.
This commit only flashes the alt image when it's running on the secondary image, there will be future commits to support other cases, e.g. flashing both images.
Tested: Verify the code update process is successful and it flashes the whole primary chip when the BMC is running on the secondary chip.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ifa849e55c28f17b46d7f999ff43a7ad7e73f2ea1
show more ...
|
#
0b1fd51c |
| 02-Dec-2021 |
zamiseck <zimzam17@gmail.com> |
ItemUpdater::erase() : Fixed double delete
In some cases, when the erase function is called, it attempts to erase an image that is no longer present on the bmc. This results in the following error "
ItemUpdater::erase() : Fixed double delete
In some cases, when the erase function is called, it attempts to erase an image that is no longer present on the bmc. This results in the following error "Error deleting image (/xyz/ openbmc_project/software/xxxxxxxx) from image manager: sd_bus_call noreply: org.freedesktop.DBus.Error.UnknownObject: Unknown object '/xyz/openbmc_project/software/xxxxxxxx'". This function should only be attempting to erase images that exist.
Tested: Case 1: When activating a new image and the process calls the erase function on its own Case 2: When calling delete from the BMC command line Case 3: When calling delete all from the BMC command line
All of the above cases did not throw the aforementioned error
Signed-off-by: Zami Seck <zimzam17@gmail.com> Change-Id: I66f8734bcaf8cf31f2b009e53c20d59ee26fd5ad
show more ...
|
#
780220f2 |
| 18-Jan-2022 |
Adriana Kobylak <anoo@us.ibm.com> |
serialize: Use flash id instead of version id
Update the serialize functions to take the flash id instead of the version id since version id can be different every time the BMC boots up once support
serialize: Use flash id instead of version id
Update the serialize functions to take the flash id instead of the version id since version id can be different every time the BMC boots up once support for uploading the same version is added.
For the erase() function, if the flash id cannot be determined, it won't be able to clean up the serialize directory since it doesn't know the name for it, but this should be a rare scenario since the flash id (Path property) is set when the BMC boots up.
Tested: The serialize directory name remains the same for ubi (version id), and it changes to "a" or "b" for mmc. The priority of the versions are found and restored upon reboot.
Change-Id: Ic2bd39caadbf7147e30200be8c4080f2b030c17a Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
ae06d76a |
| 13-Aug-2021 |
Zami Seck <zimzam17@gmail.com> |
item_updater : erase() : remove uploaded images
This method needs to erase both uploaded and active images to ensure that after either the Delete or DeleteAll methods are called, all targeted images
item_updater : erase() : remove uploaded images
This method needs to erase both uploaded and active images to ensure that after either the Delete or DeleteAll methods are called, all targeted images are removed regardless of activation status and the necessary space is freed up. Erase should also handle the deleting of images from the image manager to ensure that--after deletion--the same image can then be uploaded without receiving the "image already exists" message.
Tested: Used busctl to call the delete method. Ensured that the same image can then be uploaded again without reboot. Ensured that the tmp/images/ directory was empty.
Signed-off-by: Zami Seck <zimzam17@gmail.com> Change-Id: I3ebec1f4bd9dfcf406afa22f958621ed56eca9b1
show more ...
|
#
4ce901c5 |
| 02-Sep-2021 |
Patrick Williams <patrick@stwcx.xyz> |
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-
exception: switch to public sdbus exception
SdBusError was intended to be a private error type inside sdbusplus. Switch all catch locations to use the general sdbusplus::exception type.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I25679cac0b64183f7b8508edb21609d64334e319
show more ...
|
#
c9bb6425 |
| 27-Aug-2021 |
Patrick Williams <patrick@stwcx.xyz> |
logging: switch to lg2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Id62fbc10ab83a0cf94d235e1d1ea3e031295fbf5
|
#
7d2fa142 |
| 05-Aug-2021 |
Lei YU <yulei.sh@bytedance.com> |
Fix build issue related to boost asio
The previous commit has issue in the boost asio code and causes the build error when host-bios-upgrade is enabled.
It was not caught by the repo CI because the
Fix build issue related to boost asio
The previous commit has issue in the boost asio code and causes the build error when host-bios-upgrade is enabled.
It was not caught by the repo CI because the repo CI build does not enable the host-bios-upgrade config.
This patch fixes the issue by using the correct boost asio code.
Tested: Manually enable host-bios-upgrade in local CI and verify the build is fine.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I224ee3a3706e83ec8ca9d6737d72a84f456d3b2f
show more ...
|
#
25868189 |
| 14-May-2021 |
Lei YU <yulei.sh@bytedance.com> |
bios: Delete uploaded DBus object after update
When the BIOS code update is completed, delete the uploaded DBus object so that only the "bios_active" object remains. Otherwise it leaves the uploaded
bios: Delete uploaded DBus object after update
When the BIOS code update is completed, delete the uploaded DBus object so that only the "bios_active" object remains. Otherwise it leaves the uploaded DBus object that does not reflect a real thing.
Tested: Verify only bios_active remains and the uploaded BIOS object is deleted from DBus, and it is possible to upload and update the same BIOS tarball for multieple times.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I18e76238821f48a3b322594bb359fcb37f28f397
show more ...
|
#
16aa28a0 |
| 06-May-2021 |
Lei YU <yulei.sh@bytedance.com> |
bios: Update bios_active version after code update
When BIOS is updated, update the bios_active's version so that it shows the expected version, otherwise it shows the version before the update.
Th
bios: Update bios_active version after code update
When BIOS is updated, update the bios_active's version so that it shows the expected version, otherwise it shows the version before the update.
The new uploaded version is not deleted in this commit.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I93ea834411ae48054d6514517d6e57a4d69e4b92
show more ...
|
#
7ab55e20 |
| 19-May-2021 |
Lei YU <yulei.sh@bytedance.com> |
image_verify: Support other images
The code was verifying BMC images only, make it support other images e.g. BIOS tarball.
The change moves the verifySignature() call before checking the purpose, s
image_verify: Support other images
The code was verifying BMC images only, make it support other images e.g. BIOS tarball.
The change moves the verifySignature() call before checking the purpose, so that every image is to be verified.
The `Signature::verify()` is updated to support: * If the BMC images exists in the tarball, verify all of them; * If one of the optional images exists in the taball, verify it; * Return true when either BMC or the optional images are verfied.
The `optional-images` config option removes the "choices", so that a bbappend could set its own optional images, e.g. `bios.bin`, `fpga.bin`, etc.
Be noted that the code in verifyFullImage() uses hard-coded images when WANT_SIGNATURE_FULL_VERIFY is defined, which is not generic. So if WANT_SIGNATURE_FULL_VERIFY is defined, the verify will fail for BIOS tarball.
Tested: Enable field mode and verify the BIOS code update fails on invalid or missing signatures, and succeeds on valid signatures.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Id5e1d2eb2c3daec91f24819ec78fa864dc92f0b1
show more ...
|
#
837de881 |
| 03-Nov-2020 |
Lei YU <yulei.sh@bytedance.com> |
flash-bios: Do not delete image in case of failure
The code was to delete the BIOS image after the BIOS code update is finished no matter if the update is successful or not.
Change the logic to not
flash-bios: Do not delete image in case of failure
The code was to delete the BIOS image after the BIOS code update is finished no matter if the update is successful or not.
Change the logic to not delete the image when it fails, so that we could examine what's wrong and retry the update.
To delete the image, use DELETE API.
Tested: Verify the image is not deleted when BIOS code update fails.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ic4d985b0e48bc134f710590aa06098b1e15b1c27
show more ...
|
#
21dad047 |
| 26-Jun-2020 |
Miguel Gomez <mgomez@mx1.ibm.com> |
BMC Minimum ship Level
This code compares the BMC_MSL defined at compile time, It will parse the new fw (explicit at MANIFEST file) and use regex to evaluate it and compare BMC_MSL against version
BMC Minimum ship Level
This code compares the BMC_MSL defined at compile time, It will parse the new fw (explicit at MANIFEST file) and use regex to evaluate it and compare BMC_MSL against version from MANIFEST. If newer or equal it will apply, otherwise it will fail, preventing activation operation.
Tested: regex-bmc-msl="([a-z]+[0-9]{2})+([0-9]+).([0-9]+).([0-9]+)" fw-package="version=fw1010.00-28.4-0-ge611abca21" bmc-msl="fw1010.00-27" proceeds with activation... bmc-msl="fw1010.00-29" returns:
Jul 15 20:35:45 tacoma1z-w81 phosphor-image-updater[766]: BMC Minimum Ship Level NOT met
Jul 15 20:35:45 tacoma1z-w81 phosphor-image-updater[766]: A system component has a software version that is incompatible as determined by the implementation and needs to be updated....
Signed-off-by: Miguel Gomez <mgomez@mx1.ibm.com> Change-Id: I0ab0eba7c7c89f38ca698aa3e369aa50797edb07
show more ...
|
#
70f5bc04 |
| 13-May-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Update and remove functions for the kernel and rootfs
Add support for update and remove of eMMC images.
The code update tarball contains an image-kernel and image-rofs files. These can be flas
mmc: Update and remove functions for the kernel and rootfs
Add support for update and remove of eMMC images.
The code update tarball contains an image-kernel and image-rofs files. These can be flashed directly to the eMMC partitions since they're filesystem files compressed with zstd:
https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/30781 https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/34334
The image-rofs contains the BMC rootfs files, and the image-kernel contains the fitImage file which is loaded by U-Boot.
Tested: Verified the non-running rofs and kernel partitions were updated.
Change-Id: Ic983dec1df389d56f11f12dc2e82589d1a2b9dcc Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|