b7df12cc | 12-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 ...
|
6fbb54c0 | 03-Aug-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
use start update D-Bus interface for usb manager
Use the start update D-Bus interface for usb manager. This change is based on - https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/65738
use start update D-Bus interface for usb manager
Use the start update D-Bus interface for usb manager. This change is based on - https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/65738 https://gerrit.openbmc.org/c/openbmc/docs/+/65739
Tested: ``` <6> StartUpdate succeeded, objectPath: /xyz/openbmc_project/software/ce236cf7 ```
Change-Id: Ie8337836537d5ca5aca4bcaa0aa86cbd018752eb Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
2e506700 | 03-Aug-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
add meson dependency for phosphor-dbus-interfaces
Add the meson dependency for phosphor-dbus-interfaces for usb manager for using the start update D-Bus interface. This change is based on - https://
add meson dependency for phosphor-dbus-interfaces
Add the meson dependency for phosphor-dbus-interfaces for usb manager for using the start update D-Bus interface. 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: I0a2e0526e27f94d22162b760cb62356e9d855ee4 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 ...
|
4fd0d0f0 | 22-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-error: fix clang-diagnostic-defaulted-function-deleted error
The clang-diagnostic-defaulted-function-deleted error is generated when explicitly defaulted move assignment operator is implicitly
clang-error: fix clang-diagnostic-defaulted-function-deleted error
The clang-diagnostic-defaulted-function-deleted error is generated when explicitly defaulted move assignment operator is implicitly deleted. This commit fixes those errors.
Change-Id: Id62b89eb3b58b819799194be91516f7c5e9cadc6 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
e80b5bcb | 12-Apr-2023 |
Patrick Williams <patrick@stwcx.xyz> |
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig
meson: remove deprecated get_pkgconfig_variable
Since meson 0.56, the `get_pkgconfig_variable` has been deprecated. In meson 0.58 the `get_variable` was enhanced to no longer require the `pkgconfig` keyword argument. Ensure meson 0.58 is required and update the usage of all `get_pkgconfig_variable` and `get_variable` to be the modern variant.
Change-Id: I46c094c1a1e4793556e93f9e5158bff7c6042cc4 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
44b9fef9 | 07-Feb-2023 |
George Liu <liuxiwei@inspur.com> |
Fix the core dump by using filesystem error_code
The currently used filesystem method will cause an exception if the file system is damaged for some reason, resulting in a core dump of the process.
Fix the core dump by using filesystem error_code
The currently used filesystem method will cause an exception if the file system is damaged for some reason, resulting in a core dump of the process. So the overloaded method with the error_code parameter should be used here to ensure that the process core dump will not be caused after an exception is thrown.
Fixes: openbmc/phosphor-bmc-code-mgmt#12
Tested: built phosphor-bmc-code-mgmt successfully and CI passes.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I329f78b481cb466e755bc1b78562583620f561c2
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 ...
|
047f60e0 | 06-Apr-2022 |
Andrew Geissler <geissonator@yahoo.com> |
make getproperty a templated function
This will make it more generic so other types of properties can be read
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Icc7c040ec44d470b6b62
make getproperty a templated function
This will make it more generic so other types of properties can be read
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Icc7c040ec44d470b6b62d8b74200c7e35012e25c
show more ...
|
c026f6cd | 21-Mar-2022 |
Patrick Williams <patrick@stwcx.xyz> |
meson: simplify dependencies
Leverage wrapfile `[provide]` directives to simplify the dependency searching in the meson.build.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia27d54
meson: simplify dependencies
Leverage wrapfile `[provide]` directives to simplify the dependency searching in the meson.build.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia27d543a9c13b2c6973ab394ed88cd12d93e88a8
show more ...
|
0cd6d84b | 26-Dec-2021 |
Lei YU <yulei.sh@bytedance.com> |
cleanup: Fix warnings found by cppcheck
Fix various warnings found by cppcheck.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I4db2319f5890d7aa73c8f418f610a6cba338ce24 |
3d8ab813 | 23-Dec-2021 |
Lei YU <yulei.sh@bytedance.com> |
meson: Fix deprecated meson warnings
Fix the warnings related to deprecated meson functions:
WARNING: Project targeting '>= 0.57.0' but tried to use feature deprecated since '0.56.0': Dependency.ge
meson: Fix deprecated meson warnings
Fix the warnings related to deprecated meson functions:
WARNING: Project targeting '>= 0.57.0' but tried to use feature deprecated since '0.56.0': Dependency.get_pkgconfig_variable. use Dependency.get_variable(pkgconfig : ...) instead WARNING: Project targeting '>= 0.57.0' but tried to use feature deprecated since '0.56.0': meson.source_root. use meson.project_source_root() or meson.global_source_root() instead.
Tested: Verify that there are no such warnings in local CI.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I1388aaa12161d020d06657e507ddef78cb116ffe
show more ...
|
6d775e64 | 25-Oct-2021 |
George Liu <liuxiwei@inspur.com> |
usb: Add service and rules files
Trigger the USB code update via udev rules. Once a USB flash drive is plugged into the BMC, an sda1 device is created, starting the USB service file. Use SYSTEMD_WAN
usb: Add service and rules files
Trigger the USB code update via udev rules. Once a USB flash drive is plugged into the BMC, an sda1 device is created, starting the USB service file. Use SYSTEMD_WANTS since this service is long running.
Use BindsTo and After dev-sdX in the service file so that it automatically stops when then USB drive is unplugged. Also add a dependency to start after the Version service, which creates the /tmp/images directory to copy the image to, and after the Updater service, which handles the update.
Every time a USB drive is plugged, Linux creates a device sda1, sdb1, sdc1, etc. Add rules for only the first 2 plug attempts, in case the user made a mistake with the first USB drive as that seems sufficient. If the second attempt does not work, the user would need to reboot the BMC to retry.
Tested: - Inserted USB key and verified the code update started and finished successfully: Dec 03 19:29:44 p10bmc kernel: sda: sda1 Dec 03 19:29:44 p10bmc kernel: sd 0:0:0:0: [sda] Attached SCSI removable disk Dec 03 19:29:44 p10bmc systemd[1]: Created slice Slice /system/usb-code-update. Dec 03 19:29:44 p10bmc systemd[1]: Started FW Code Update via USB sda1. Dec 03 19:29:50 p10bmc phosphor-version-software-manager[544]: Untaring /tmp/images/obmc-phosphor-image-rainier.ext4.mmc.tar to /tmp/images/imageM6FtSg ... Dec 03 19:30:42 p10bmc phosphor-image-updater[470]: BMC activation has ended - BMC reboots are re-enabled.
- Removed USB key and verified usb sda1 service stopped: Dec 03 20:30:52 p10bmc systemd[1]: usb-code-update@sda1.service: Deactivated successfully. Dec 03 20:30:52 p10bmc systemd[1]: Stopped FW Code Update via USB sda1.
- Reinserted USB key and verified code update started with device sdb1: Dec 03 20:31:05 p10bmc kernel: sdb: sdb1 Dec 03 20:31:05 p10bmc kernel: sd 1:0:0:0: [sdb] Attached SCSI removable disk Dec 03 20:31:05 p10bmc systemd[1]: Started FW Code Update via USB sdb1. Dec 03 20:31:11 p10bmc phosphor-version-software-manager[541]: Untaring /tmp/images/obmc-phosphor-image-rainier.ext4.mmc.tar to /tmp/images/imagey2OFWQ
- Removed USB key and verified usb sdb1 service stopped: Dec 03 20:32:38 p10bmc systemd[1]: usb-code-update@sdb1.service: Deactivated successfully. Dec 03 20:32:38 p10bmc systemd[1]: Stopped FW Code Update via USB sdb1.
- Rebooted BMC with the USB drive inserted and verified the code update started when the BMC booted after the software services started, and the usb code update finished by the time the BMC reached Ready state: [ OK ] Started OpenBMC Software Update Manager. [ OK ] Started Phosphor Version Software Manager. [ OK ] Started FW Code Update via USB sda1.
- Verified the usb service exited on error and a code update can be restarted: root@p10bmc:~# systemctl status usb-code-update@sda1 ● usb-code-update@sda1.service - FW Code Update via USB sda1 Loaded: loaded (/lib/systemd/system/usb-code-update@.service; static) Active: active (exited) since Fri 2021-12-03 21:26:19 UTC; 2min 31s ago Process: 523 ExecStart=/usr/bin/phosphor-usb-code-update --device sda1 (code=exited, status=0/SUCCESS) Main PID: 523 (code=exited, status=0/SUCCESS) Dec 03 21:26:19 p10bmc systemd[1]: Started FW Code Update via USB sda1. Dec 03 21:26:19 p10bmc phosphor-usb-code-update[523]: Error when copying /run/media/usb/sda1/obmc-phosphor-image-rainier.ext4.mmc.tar to /tmp/images: filesystem error: cannot copy file: No …r.ext4.mmc.tar] Dec 03 21:26:19 p10bmc phosphor-usb-code-update[523]: Failed to FW Update via USB, usbPath:/run/media/usb/sda1
Signed-off-by: George Liu <liuxiwei@inspur.com> Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Change-Id: I733f1b0f217f4fdd2f99cc6e8bbd602085da407d
show more ...
|
5107c45f | 09-Nov-2021 |
George Liu <liuxiwei@inspur.com> |
usb: Update the RequestedActivation property
Subscribe to the add software interface, when an update is detected, call back the updateActivation method and verify whether it needs to be updated. If
usb: Update the RequestedActivation property
Subscribe to the add software interface, when an update is detected, call back the updateActivation method and verify whether it needs to be updated. If necessary: 1. Set ApplyTime to OnReset to prevent the bmc from restarting immediately after the update. 2. Change the RequestedActivation attribute value and start to update the image bmc.
Tested: Manually start the phopshor-usb-manager daemon, and saw that the bmc upgrade file(*.tar) has been copied to /tmp/images and the update has been triggered, and bmc has not been restarted immediately.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Ic650e34f8ec61d3c826332d28275db90f9ef348e
show more ...
|
fc025e14 | 09-Nov-2021 |
George Liu <liuxiwei@inspur.com> |
usb: Add utility for D-Bus
Putting all D-Bus related operation to the utils file.
Tested: Call the set/getProperty functions locally and successfully set/get the corresponding attribute value.
Sig
usb: Add utility for D-Bus
Putting all D-Bus related operation to the utils file.
Tested: Call the set/getProperty functions locally and successfully set/get the corresponding attribute value.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0e0c33fd6ec5db3a47babaf417b0c708709e580b
show more ...
|
073a6530 | 25-Oct-2021 |
George Liu <liuxiwei@inspur.com> |
usb: Copy image file to /tmp/images via USB
Traverse the USB mount directory, and copy the first file with a `.tar` extension under the directory to the `/tmp/images` directory.
Tested: Manually ca
usb: Copy image file to /tmp/images via USB
Traverse the USB mount directory, and copy the first file with a `.tar` extension under the directory to the `/tmp/images` directory.
Tested: Manually call the fs::copy_file app locally, test passed.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I8e03b9c3305f5e9d9a1535dd176ecd40dbea8903
show more ...
|
cc74233c | 20-Oct-2021 |
George Liu <liuxiwei@inspur.com> |
usb: Initialize USB Code Update
Compile the USB Code Update function after enabling `usb-code-update`, and expect to pass in the name of the USB mount folder when calling the process.
Also, the dep
usb: Initialize USB Code Update
Compile the USB Code Update function after enabling `usb-code-update`, and expect to pass in the name of the USB mount folder when calling the process.
Also, the dependency of CLI11 has been added.
Tested: enabled `usb-code-update` and built `phosphor-bmc-code-mgmt` successfully and check that there is a `phosphor-usb-code-update` process in image-bmc.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Iedfb63c3866cc8542afef9b54bfeaaf5f7b40c6b
show more ...
|