42a44c28 | 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: I09e19a126d456dc184fd70e82d4e4e4217fa8ee7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
166b4f19 | 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I0ffaae547bff9679343b36c337436af0260c8f73 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
3f596287 | 12-Apr-2024 |
Willy Tu <wltu@google.com> |
handler: Support more retry logic
Add retry logic for more methods that may fail due to unstable ipmi interfaces. Also added one seconds sleep in between retries to allow some time for the interface
handler: Support more retry logic
Add retry logic for more methods that may fail due to unstable ipmi interfaces. Also added one seconds sleep in between retries to allow some time for the interface to be initialized.
Tested: Updated BMC firmware with the new tool and didn't have any regression.
Change-Id: Ifc4155dd895f1a654da9e03f17e4c1e8613c9133 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
a9423469 | 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 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-17 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: Ie6154ef3394b8e652a8cb1ac33d68e3c3cec8cd8 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
2d57d522 | 17-Sep-2023 |
Tim Lee <timlee660101@gmail.com> |
tools/pci: refactor did variable for NuvotonPciBridge
Symptom: Host tool "burn_my_bmc" for in-band firmware update didn't work and exception is about PCI device cannot find in NPCM8xx platform.
roo
tools/pci: refactor did variable for NuvotonPciBridge
Symptom: Host tool "burn_my_bmc" for in-band firmware update didn't work and exception is about PCI device cannot find in NPCM8xx platform.
root@localhost:~# burn_my_bmc --command update --interface ipmipci --image test.sig --sig test.sig --type dummy
Sending over the firmware image. Opening the cleanup blob Committing to the cleanup blob Closing cleanup blob Exception received: Couldn't find supported PCI device
Root cause: There are new Nuvoton PCI device-id in NPCM8xx platform. The previous device-id 0x0750 is hardcode for NPCM7xx platform. However, NPCM8xx PCI device is using new device-id 0x0850. Thus, host tool will throw the exception from NotFoundException().
Solution: We need to refactor this "did" variable to make host tool "burn_my_bmc" can work well for these two kinds of PCI devices.
Tested: In-band firmware update can work well in NPCM8xx with did change to 0x0850. Here is the result of "lspci" from host side for refer it. root@localhost:~# lspci -v | grep d7: d7:01.0 Unassigned class [ff00]: Winbond Electronics Corp Device 0850 (rev 08) d7:02.0 Unassigned class [ff00]: Winbond Electronics Corp Device 0850 (rev 08)
Change-Id: I2917298f13b0bcd7de3b2ff71173c546ea3cb02b Signed-off-by: Tim Lee <timlee660101@gmail.com>
show more ...
|
14c78ed1 | 16-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
use std::format
Remove use of fmt and replace with the std::format version.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib89de0b3d10866276964db7b3fa8d97991df410d |
41dedad6 | 13-Jul-2023 |
Patrick Williams <patrick@stwcx.xyz> |
use std::move_only_function
C++23 has a replacement for function2 in std::move_only_function. Leverage that and remove the extra dependency.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Chan
use std::move_only_function
C++23 has a replacement for function2 in std::move_only_function. Leverage that and remove the extra dependency.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I69fa59627b91fc1f640f7a688926bed7f138ca19
show more ...
|
1038836c | 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: I2ee8cbc4581d0c3ccdc130b646357c45fa0373db Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
1b23b772 | 15-Mar-2023 |
Willy Tu <wltu@google.com> |
Add retry to sendFile handler
In cases where the ipmi interface is interrupted, we want to be able to recover automatically without having to retrigger it again. For example, this may happen if the
Add retry to sendFile handler
In cases where the ipmi interface is interrupted, we want to be able to recover automatically without having to retrigger it again. For example, this may happen if the ipminet interface gets reconfigure in the middle of transfering an image.
The inital goal was to have the retry for ipminet only with and restart at the remaining data instead of from the beginning. The issue there is that we needed to restart the ipmi blob session to write again and doing so will clear out the existing written data. When trying to write to existing session will caused the update to be stalled and required a ipmi restart to recover.
Tested: images is able to be tranfered fully and validated after we interrupted the ipminet interface in the middle.
Change-Id: Id734f6a92625bc6a1256fea010fb4b068f7bf1d5 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
ea65e680 | 13-Jul-2022 |
Brandon Kim <brandonkim@google.com> |
meson: Fix meson builds
When building the project from scratch (from a new workstation without docker) I found that there were dependencies missing. Fixed them up.
Tested: Was able to build " tools
meson: Fix meson builds
When building the project from scratch (from a new workstation without docker) I found that there were dependencies missing. Fixed them up.
Tested: Was able to build " tools/" and "bmc/"
Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: Id2250c481a37d3cd4ed6915b1b2b0978df6e4649
show more ...
|
36af21c5 | 06-May-2022 |
William A. Kennington III <wak@google.com> |
tools/net: Fix missing include
Change-Id: If8bba23866e6f129f8e9ecdb704f4b06e33a50ec Signed-off-by: William A. Kennington III <wak@google.com> |
9bb21e3e | 08-Apr-2022 |
William A. Kennington III <wak@google.com> |
tools/net: Handle files which don't support sendfile
This adds a fallback read / write model.
Tested: ran against non-sendfile compatible file and it sent to the BMC successfully.
Change-Id: I6fd7
tools/net: Handle files which don't support sendfile
This adds a fallback read / write model.
Tested: ran against non-sendfile compatible file and it sent to the BMC successfully.
Change-Id: I6fd781ad19cd37376ca90743f799988e50ed460e Signed-off-by: William A. Kennington III <wak@google.com> Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
28c00d6e | 27-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
span: switch to std
Reduce the dependency on stdplus' version of span now that we are using C++20 and use the one out of the STL instead.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-
span: switch to std
Reduce the dependency on stdplus' version of span now that we are using C++20 and use the one out of the STL instead.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I040ba1796d6f278353fbc990ea6b62314927951e
show more ...
|
99d292a3 | 08-Feb-2022 |
Willy Tu <wltu@google.com> |
phosphor-ipmi-flash: Code Health Cleanup
Removed the following warning. - using decl '*' is unused - 'push_back' is called inside a loop; consider pre-allocating the container capacity before th
phosphor-ipmi-flash: Code Health Cleanup
Removed the following warning. - using decl '*' is unused - 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop - function '*' defined in a header file; function definitions in header files can lead to ODR violations
Change-Id: I44e4b0f8056a853fb45b690394be1a8ebec45b20 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
2862421c | 09-Nov-2021 |
Patrick Venture <venture@google.com> |
tools/test: delete now returns a boolean
Updates the test mock expectation to return a boolean.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I8f10a1b561900295b2613317c09de688a4d9d
tools/test: delete now returns a boolean
Updates the test mock expectation to return a boolean.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I8f10a1b561900295b2613317c09de688a4d9d944
show more ...
|
7d249a7a | 13-Sep-2021 |
Willy Tu <wltu@google.com> |
updater: remove find() and use std::string::starts_with()
Use std::string::starts_with to check for active blob prefix.
Change-Id: I03271c5f19781b522287d09ed8e2882baf68d3e0 Signed-off-by: Willy Tu
updater: remove find() and use std::string::starts_with()
Use std::string::starts_with to check for active blob prefix.
Change-Id: I03271c5f19781b522287d09ed8e2882baf68d3e0 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
35b77c9b | 13-Sep-2021 |
Willy Tu <wltu@google.com> |
build: remove autotool
Change-Id: I662c8a5d29453622744f44c1984416f1303354e6 Signed-off-by: Willy Tu <wltu@google.com> |
bcae9002 | 12-Sep-2021 |
Willy Tu <wltu@google.com> |
build: Add meson build
Changes to note, - `with_systemdsystemunitdir` and `with_tmpfilesdir` is removed since it is not being documented nor used in OpenBMC. - Removed the Code coverage feature wi
build: Add meson build
Changes to note, - `with_systemdsystemunitdir` and `with_tmpfilesdir` is removed since it is not being documented nor used in OpenBMC. - Removed the Code coverage feature with `-DDHAVE_GCOV`, since it is not used and meson covers it. - Removed `--enable-oe-sdk` for using the OpenBMC SDK. It should work directly with no change required.
Tested: ``` Jan 01 00:01:54 ipmid[709]: Try loading blob from persistent data Jan 01 00:01:54 ipmid[709]: Stale blob data, resetting internals... Jan 01 00:01:56 ipmid[709]: config loaded: /flash/bios Jan 01 00:01:56 ipmid[709]: config loaded: /flash/image Jan 01 00:01:56 ipmid[709]: config loaded: /flash/dummy ... ```
``` $ ls /usr/lib/blob-ipmid/ libfirmwareblob.so libfirmwarecleanupblob.so libversionblob.so ```
Testing the service, ``` $ echo "hello" > /tmp/test.txt $ burn_my_bmc -command update -layout dummy -image /tmp/test.txt Sending over the firmware image. Opening the verification file Committing to /flash/verify to trigger service Calling stat on /flash/verify session to check status running success Returned success succeeded ```
On the BMC. ``` /run/initramfs$ cat dummy hello ```
Change-Id: I21c7c33bd62c0ee40681cb40da90125c125bea2f Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
cf37663b | 13-Oct-2021 |
William A. Kennington III <wak@google.com> |
tools: Support more frequent status checks
This changes the check logic to query the BMC more frequently at the beginning and exponentially back off if the BMC is not yet ready. This makes short upd
tools: Support more frequent status checks
This changes the check logic to query the BMC more frequently at the beginning and exponentially back off if the BMC is not yet ready. This makes short updates significantly faster.
Change-Id: Icfcc1d0c9ef20aa04de754bfe2da04add6ee51e6 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
f88bcf3b | 14-Oct-2021 |
William A. Kennington III <wak@google.com> |
tools/helper: Streamline return types
These functions can already return exceptions, so make better use of them for reporting failures.
Change-Id: I572e9e3ee44bbd5add601f3246bb4f95cb9308bf Signed-o
tools/helper: Streamline return types
These functions can already return exceptions, so make better use of them for reporting failures.
Change-Id: I572e9e3ee44bbd5add601f3246bb4f95cb9308bf Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
4b0c2eca | 14-Oct-2021 |
William A. Kennington III <wak@google.com> |
tools: Reduce cleanup logging output
We don't need all 3 lines to print, 1 should be sufficient information.
Change-Id: I8034d3a90eee0e2e06377527abd176bd3249a942 Signed-off-by: William A. Kenningto
tools: Reduce cleanup logging output
We don't need all 3 lines to print, 1 should be sufficient information.
Change-Id: I8034d3a90eee0e2e06377527abd176bd3249a942 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
43eeeb30 | 14-Oct-2021 |
William A. Kennington III <wak@google.com> |
tools: Add handle for automatically closing blobs
This makes it harder to accidentally leak blob handles and cleans up the code a little bit.
Change-Id: I49a1606a3360e6439a8c3d426de7006a138d330c Si
tools: Add handle for automatically closing blobs
This makes it harder to accidentally leak blob handles and cleans up the code a little bit.
Change-Id: I49a1606a3360e6439a8c3d426de7006a138d330c Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
9b7a3b4f | 11-Oct-2021 |
Willy Tu <wltu@google.com> |
tools: Support empty image file and ignore the fileSize check
Removed the unit test for checking file size of zero.
Tested:
Sending `/dev/null` and still works fine.
Change-Id: Ibbde4fd430d9550fb
tools: Support empty image file and ignore the fileSize check
Removed the unit test for checking file size of zero.
Tested:
Sending `/dev/null` and still works fine.
Change-Id: Ibbde4fd430d9550fb7b75b6a583a53d4425d8075 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
665905ff | 06-Oct-2021 |
Patrick Williams <patrick@stwcx.xyz> |
catch exceptions as const
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic72f02ce23c85436f61f593e14e75ab34e99fabe |
b487eb47 | 16-Sep-2021 |
Willy Tu <wltu@google.com> |
phosphor-ipmi-flash: Fix all C++ warnings
Change-Id: I89236b2dab88ca725e269bb8f5b2cbfd271e807a Signed-off-by: Willy Tu <wltu@google.com> |