summaryrefslogtreecommitdiffstats
path: root/tools/updater.hpp
Commit message (Collapse)AuthorAgeFilesLines
* tools: Add ignoreUpdate parameterBrandon Kim2019-09-191-1/+2
| | | | | | | | | | | | | Adds ignoreUpdate flag to skip checking the update status and always return success instead. This is needed for platforms that use the reboot json and encounters an update failure due to IPMI going down during shutdown. Tested: Tried out an update with and without --ignore-update to verify that the flag ignores the update status and returns success. Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: Ie20774f997229cd5ff8ae9082dc8a747079f9a2c
* tools: add support for ubi tarball from hostPatrick Venture2019-06-211-1/+3
| | | | | | | Add a parameter that specifies the layout type, static or ubitar. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I86c09d8ffeb55ba789279d2568b579a44b3923d7
* tools: split out the update handlerPatrick Venture2019-06-201-78/+1
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I367ea961c98ec822d3200d101c4f5977d77e7402
* tools: add cleanup blob on failurePatrick Venture2019-06-201-0/+7
| | | | | | | | If the update process fails, call the cleanup blob and try to cleanup artifacts automatically. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ib57e5cc7f13b73e2d7371116058469a4d4bfd0c4
* tool: continue the unit-tests of the host toolPatrick Venture2019-06-191-13/+30
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I51349fc103af2a55f1b83830bf8e74407fc15b9e
* tools: open and commit() on updateBlobIdPatrick Venture2019-06-051-2/+1
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Id4d531e2ea2d755aa310261966254419d78dccdb
* tools: add update handlerPatrick Venture2019-05-161-4/+46
| | | | | | | | | | | Add an UpdateHandler to handle each step of the update process. This code was already in place but is now handled via an UpdateHandler object. Tested: Not yet tested. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I36cd1b94d8e2c0788d09805d935738d86e6e33de
* tools: implement firmware verification pollingPatrick Venture2019-05-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The verification process is asynchronous, therefore poll the BMC firmware state. Tested: Verified it behaves as intended, before moving it into a sub-routine: Opening the verification file Committing to verification file to trigger verification service Calling stat on verification session to check status stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x3 other stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x0 running stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x0 running stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x1 success stat received: blob_state: 0x206 size: 0x0 metadata(1): 0x1 success Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I3cb13d1a966c2c833fd4fee5654332f34e80355a
* use ipmiblob library from ipmi-blob-toolPatrick Venture2019-03-081-2/+2
| | | | | | | | | | Drop all code that is now handled by the ipmiblob library provided by the new ipmi-blob-tool. This is a library that can be included on the BMC if necessary, but relies on nothing that is strictly meant for the BMC. Change-Id: Iadbf0bd89c58cafc436fba05ea43e21c49e2b669 Signed-off-by: Patrick Venture <venture@google.com>
* tools: put all host-side code into host_tool namespacePatrick Venture2019-01-041-0/+5
| | | | | | | | To avoid confusion and organize the code itself more cleanly, place the host-side code into its own namespace. Change-Id: I573eb0494eb59874adb1d1eadc502499e928e396 Signed-off-by: Patrick Venture <venture@google.com>
* tools: updater: add exceptions for errorsPatrick Venture2018-12-131-3/+4
| | | | | | | Add custom exception for errors per TODO comments. Change-Id: I14b89afe816724ff2bdb1761ef6e6a0a8217feed Signed-off-by: Patrick Venture <venture@google.com>
* tools: move interface building into mainPatrick Venture2018-12-121-2/+3
| | | | | | | | Move interface building into the main method to simplify processing and input further down the call stack. Change-Id: Ib14827bfe8c4ea89a04a7c201fdff9d538546ef5 Signed-off-by: Patrick Venture <venture@google.com>
* tools: start implementing blob interfacePatrick Venture2018-12-121-2/+5
| | | | | | | | Start implementing blob interface to handle sending BLOB protocol commands. Change-Id: I9eeb6c1b6f49d9b0332e156e02476e2b07850d64 Signed-off-by: Patrick Venture <venture@google.com>
* tools: start burn_my_bmc toolPatrick Venture2018-12-111-0/+14
| | | | | | | | | | | | | | Start implementation of burn_my_bmc host tool, the purpose of which is to upload the firmware image and trigger the verification process. The utility will accept four parameters: 1) command - the command to run, initially only "update" 2) interface - the data interface to use, e.g. lpc or pci 3) image - the path to the image file 4) sig - the path to the image's signature file Change-Id: Ifbab7df947f37dd3a6fddddcf523c0fa724c9551 Signed-off-by: Patrick Venture <venture@google.com>
* Revert original implementation in favor of blob-based approachPatrick Venture2018-11-021-53/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert original implementation of the in-band firmware update to pivot to using a blob-based implementation. Blob-based design is under review here: https://gerrit.openbmc-project.xyz/14444 Revert "tools: starting burn_my_bmc host utility" This reverts commit 7dc4670d4be4884e0c6486ca4f0e799116935096. Revert "phosphor-ipmi-flash: main: move to iana header" This reverts commit e39f2b3a9a19b8e788a7225a0d291716325b77ee. Revert "update clang-format" This reverts commit 1aedab2391cd883e95ebde0129fcaf88d7f16233. Revert "Build as c++17" This reverts commit 004fb909202e39b34cb72d31390facd525b04c9b. Revert "clang-format: always break template declarations" This reverts commit ff0ee70f0fb8e0c2173f826f4d96fbfced09ca14. Revert "clang-format-6.0 bump fixes" This reverts commit 8f378c927a5789f30ba625595153bc1422d511dc. Revert "flash-ipmi: implement flashAbort" This reverts commit 605f75f7c026b5c2f454de155f6f211b2c3b187f. Revert "flash-ipmi: implement flashDataVerify" This reverts commit 9c6baad43fe7d1db8e449766eed35865ce6a2e4b. Revert "flash-ipmi: implement flashVerifyCheck" This reverts commit 7fc66de0d5465f4d25033d6baf48b6489f843331. Revert "ipmi: start implementing flashVerifyCheck" This reverts commit fdc65b2524bee544d35a6e2cbeef4c2f68aeb8fd. Revert "flash-ipmi: implement flashHashFinish" This reverts commit d5f590f955a67715e7903a04c3a8028f1d4f2664. Revert "flash-ipmi: implement flashHashData" This reverts commit cbe51498953d7bd29f516cdfcdb654706b463d2e. Revert "flash-ipmi: implement flashStartHash" This reverts commit 6f17bd2220d723fd349077ccd96845a5652403e0. Revert "flash-ipmi: implement flashDataFinish" This reverts commit 57703664cd76c2744adf4c5fa504388909efa824. Revert "flash-ipmi: implement flashDataBlock" This reverts commit 3c086f2f649d1c4cc7926cbd9375a39dd23e6997. Revert "update copyright year" This reverts commit 514f648b76c1a855a356e5a4ca83fd5bf6c53b3f. Revert "flash-ipmi: implement flashStartTransfer" This reverts commit 8ec019fdc15cb021f2c7d4cefb85a8ccd3581159. Revert "ipmi: start implementing flashAbort" This reverts commit 5c251ca550f56722280dcf17b8c48832ace07142. Revert "ipmi: start implementing flashDataVerify" This reverts commit 1cb87d25f79cfb905611b81348fbccb362f5e29a. Revert "main: cleanup command handling" This reverts commit 9a5a79a0797294ba9f5c7b2ab79e4dcbacac0c44. Revert "test: rework ipmi validate test as table" This reverts commit 39b3a82609511e2d855a2182f22361cc1332bb25. Revert "ipmi: start implementing flashHashFinish" This reverts commit fbc7d191eb6d49ff93379e90f372960b799b25c4. Revert "ipmi: start implementing flashHashData" This reverts commit cfe66877a5d7cc64bcce5c8789ca164edf9f1c56. Revert "ipmi: start implementing flashStartHash" This reverts commit 8d9f7322f46afaab81e32d1999f5bc000f1ba9a6. Revert "ipmi: start implementing flashDataFinish" This reverts commit 2c1205db94647c196c154bae0e106933b9ff526e. Revert "ipmi: promote min length check to earlier" This reverts commit a53a7b35085ddd41ef3cc47b084d29a1f413e818. Revert "ipmi: start implementing flashDataBlock" This reverts commit 79e131fce6e308f7e0f96bc71b07a7f0ebeeffcd. Revert "ipmi: start implementing flashStartTransfer" This reverts commit 54c3b53c0d0c7991469ab1be97bdf4e3f301e8f5. Revert "add flash-ipmi header defining sub-commands" This reverts commit 3d1786bcd038e4d042d268737a9b874fd667bf84. Revert "main: start with no-op handler" This reverts commit accc91799d6a1de4726313b907e5dfa7555bf919. Change-Id: I1c4dc9dcd2bf7d110240a028a329fcb1e01a4e5b Signed-off-by: Patrick Venture <venture@google.com>
* tools: starting burn_my_bmc host utilityPatrick Venture2018-09-181-0/+53
burn_my_bmc is a host-run utility that in cooperation with the phosphor-ipmi-flash library, attempts to send a BMC firmware image and signature file to the BMC and trigger verification of said image. The program's current design and use were tailored towards the legacy OpenBMC image and not UBI. Therefore, changes to support the UBI process will get addressed as it all takes shape. The overall process is: 1) Attempts to send firmware image over an interface. 2) Attempts to send signature file contents over an interface*. 3) Triggers a verification step. 4) Reboots the BMC**. * The only interface in the initial version here is the blocktransfer interface. It's technically also possibly KCS. It's sending the data over the same communications channel as the normal IPMI packets. A later patchset will enable sending the data bytes over an LPC memory region or the PCI P2A region. ** The 4th step is done by a separate call to the 'reboot' command. The 'reboot' and 'ping' commands will come in a later patchset. Change-Id: I62d725274e56c55ca414fa6c2a3eab6c500066ed Signed-off-by: Patrick Venture <venture@google.com>
OpenPOWER on IntegriCloud