summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* README.md: Update to include building stdplusHEADmasterBrandon Kim2020-02-061-0/+12
| | | | | | | | | There is a new dependency on stdplus library, need to include the steps on installing the library in the README.md. Resolves: openbmc/phosphor-ipmi-flash#3 Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I14822b65a5e7890458f974acf0bdd71016b0dd99
* tools: increase polling timeout by 5 minutesBenjamin Fair2020-01-131-2/+2
| | | | | | | This is needed for 64 MiB images. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: I3e2a63d1c8ae5db956ca8d5553c98d9cc671409c
* tools: net: support IPv4 and IPv6 addressesBenjamin Fair2019-12-042-3/+3
| | | | | | | | Switch from IPv4-only to an unspecified address family, which will allow either IPv4 or IPv6 addresses to be used. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: I6f4d3e71e2a310fc158ec90793f5c7479e060f02
* tools: Fix clangtidy warning for PpcMemDeviceBrandon Kim2019-11-261-2/+2
| | | | | | | | | | | It seems that the the recently checked in PpcMemDevice code had a clangtidy issue with the move assignment operator. Fixing it by deleting the previously defaulted operator as it is implicitly deleted due to a non-static const data member "ppcMemPath". Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I125cbbb5be6edd53274a9025b741df98cb7f408d
* tools: net: add <optional> headerBenjamin Fair2019-11-251-0/+1
| | | | | | | The constant std::nullopt is used but the header was not included. Change-Id: Ibb79f7f0b9944425202695b8c5d4e1d191b72a69 Signed-off-by: Benjamin Fair <benjaminfair@google.com>
* tools: Add PpcMemDevice as an HostIoInterfaceBrandon Kim2019-11-252-0/+87
| | | | | | | | PPC platforms may require a different mempath and different I/O operations to access the file system. Change-Id: I46b8825c685b362009dc62fdbaa59c65239831d1 Signed-off-by: Brandon Kim <brandonkim@google.com>
* tools: add network bridge supportBenjamin Fair2019-11-217-4/+456
| | | | | | | | Add support to the host tool for sending the image data over a network connection. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: I88630d79499254d6c80ceaa8c7721c241d394fc8
* sys: add networking functionsBenjamin Fair2019-11-213-0/+58
| | | | | | | Add networking related functions to the syscall wrapper. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: I0ccb4138963ce2a8c7bb6f6f3a556de1afcd0c08
* bmc: add network bridge supportBenjamin Fair2019-11-217-10/+247
| | | | | | | This data handler listens on a TCP port for the image bytes. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: I388fdd7303c5f8bc93a8f75e97b3abf8adbb81af
* bmc: allowing packing transport flags denselyBenjamin Fair2019-11-1812-78/+39
| | | | | | | | Future transport backends can densely fill in the upper 5 bits of the transport flag bitfield. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: Ie4ee59e0581e458a9020775e18270100f9a1de4e
* bmc: add test for reserved flagsBenjamin Fair2019-11-182-0/+67
| | | | | | | | | | Test that no one adds transport backends which use the lower 3 bits of the transport flag bitfield. These bits are reserved for exclusive use with the IPMI, LPC, and P2A backends to ensure backwards compatibility with older host tools. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: I6284f2c864aeb5e20a812c0b13e9ecc61349b127
* tools: remove stat() check for supported interfaceBenjamin Fair2019-11-153-34/+2
| | | | | | | | If an unsupported interface is requested, the open() call will simply fail. Signed-off-by: Benjamin Fair <benjaminfair@google.com> Change-Id: Iefd11657d957931873a4d20246d9ccdd791ba0e5
* bmc: check empty instead of zero sizePatrick Venture2019-11-071-1/+1
| | | | | | | | Minor tweak to call the empty() method on the container instead of checking the result of the size() method. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ib5ee66c724783c4a5f63d974032f107b88264375
* bmc: require at least one action pack configurationPatrick Venture2019-11-074-55/+63
| | | | | | | | | | | | | | | | In the event the phosphor-ipmi-flash package is added to an image with only a default configuration, it should not register itself as a blob handler. The default installation does not include any json configuration files. Therefore, this lack of a configuration can be checked at load time. Added validation that the firmware image list contains at least two handlers, and one is always the hash blob handler. Added validation that the action map contains at least one action pack configuration. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I0b2f6cded78121869e8a01290d29e420c555a16d
* internal: Add pread pwrite support in sysBrandon Kim2019-11-053-0/+21
| | | | | Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I84c5e7f493afbb0894528f5d0986180b7109e170
* MAINTAINERS: Add Brandon KimPatrick Venture2019-11-051-0/+1
| | | | | | | | Brandon Kim has taken over downstream maintenance of this effort, and is therefore suited to take on additional upstream responsibilities. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ifa1523428eb589c821f174a19ba9cdbe4a20f6f7
* bmc: implement pci support for NuvotonMedad CChien2019-11-054-4/+160
| | | | | | | | | | Tested: Verified this works for a Nuvoton BMC. enable-nuvoton-p2a-mbox is for PCI-MailBox enable-nuvoton-p2a-vga is for PCI-VGA Signed-off-by: Medad CChien <ctcchien@nuvoton.com> Change-Id: I15bc9cc528c285fbd015f9f2fad0913163d92db8
* bmc: Rework abortProcess and deleteBlobBrandon Kim2019-10-181-23/+23
| | | | | | | | | In order to ensure we can abortProcess upon deleteBlob during an active update, removed the fileOpen() check and abortProcess clears the lookup table. Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I1b6b0efcabb91b7866f83d034c06780b126953d0
* bmc: Replace fileOpen flagBrandon Kim2019-10-183-16/+14
| | | | | | | | Instead of keeping track of a fileOpen flag, keep track of fileOpen using !lookup.empty() instead. Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I09d16479d2a52deae5e8d63582376a27a6a39bb5
* tools: Add ignoreUpdate parameterBrandon Kim2019-09-197-18/+55
| | | | | | | | | | | | | 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
* bmc : add config-static-bmc-with-update-status.json.inBrandon Kim2019-09-175-3/+63
| | | | | | | | Add a default json file with update status (file path defined with UPDATE_STATUS_FILENAME) enabled with --enable-update-status flag. Change-Id: I62d3b547d91840451906e26cbec55dfa74934b5e Signed-off-by: Brandon Kim <brandonkim@google.com>
* docs : add fileSystemdUpdate to json configuration detailsBrandon Kim2019-09-161-4/+4
| | | | | Change-Id: I5a3fc50f54587b8028004a078178dc56e5bf46f5 Signed-off-by: Brandon Kim <brandonkim@google.com>
* docs: add json configuration detailsPatrick Venture2019-08-212-0/+284
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I695e732b2c32bd96d6d68500a8af493a840dc79c
* README: update tool parameter for typePatrick Venture2019-08-211-1/+1
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I16bbf630392fa5f794e8efda22cd8b111f587536
* bmc: merge update and prepare systemdPatrick Venture2019-08-2110-275/+108
| | | | | | | | | The update systemd and prepare systemd were effectively the same, and this makes the systemd action generic. Tested: Not tested beyond unit-tests continuing to pass. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I8070731e53bfd6cdafb1d74d9db652f20341985e
* bmc: add mode to systemd preparation actionPatrick Venture2019-08-213-8/+21
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: If29311cfa9eddecdd81781867598a73789225bc5
* bmc: use string literals instead of variablesPatrick Venture2019-08-211-3/+2
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Iedde0738bbe3bf77fd1b63d2d45f65acc256e45c
* tools: type field now matches the /flash/{type}Patrick Venture2019-08-152-26/+9
| | | | | | | | | | | Instead of mapping one word to a pre-defined mapping of types, let the host user specify any value. A user shouldn't specify hash, or update, or something meaningful. Perhaps this should be validated. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Icec103e0ade999d527923dcacb440086c93e175c
* bmc: require blob ids to start with /flash/Patrick Venture2019-08-152-0/+71
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ib6a0db91d4e2ecd7e7cc3c51ddc1953d9fd8da3c
* tools: bump up timeout for polling to ~5.5 minutesPatrick Venture2019-08-141-1/+6
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I384734c592e39a01c5531d3d7d6c79474c2b0b44
* bmc: buildjson: provide helper for common filesystemd typePatrick Venture2019-08-061-28/+21
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: If0c106301538a6a11e199c8033cf7328f21575e6
* bmc: cleanup verification language and symbolsPatrick Venture2019-08-066-21/+22
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ife4d7e519e44aff60441c5909346ca6d7e2aa090
* bmc: s/SystemdVerification/SystemdWithStatusFile/gPatrick Venture2019-08-054-24/+24
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I5da0ca9e3ae53df957647b19446df4196248fd31
* bmc: allow update to use systemd with pathPatrick Venture2019-08-052-0/+61
| | | | | | | | | Verification provides a mechanism that has a systemd unit and mode, and also a path to check the result. This object can be used for updates, and will be renamed in a later patchset to be more generically named. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I0a995af0aefff76592247775f22fc84189d14903
* bmc: add mode json option for verification systemdPatrick Venture2019-08-052-4/+16
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ibe5764c4e2ad7dd938177c813c8c6706886258a2
* bmc: move verify systemd mode to parameterPatrick Venture2019-08-054-8/+24
| | | | | | | | | Move the mode for the trigger service to a parameter instead of hard-coding it. This isn't yet a json configuration option, that'll be next. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I59564320015c22be1ec3a4701479d0ee93b9f1f7
* bmc: json configuration: update: add mode parameterPatrick Venture2019-08-054-1/+61
| | | | | | | | | Add the mode parameter as an optional configuration option for the update systemd approach. Previously this was hard-coded as "replace" but now the user can specify something else. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I2bcb61bd9ac5733df6da70f901516d26bd31e2a9
* bugfix: bmc: update service requires modePatrick Venture2019-08-053-8/+3
| | | | | | | | | Systemd startunit requires a job-mode. Default it to "replace." In a later patchset, the update systemd and verify system will collapse into one object, but this fix applies to the current implementation. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ia6465abac9979501ea7149933394d8c452b2f315
* tools: p2a: enable bridge on host sidePatrick Venture2019-07-261-26/+64
| | | | | | | | | | Enable the PCI-to-AHB bridge from the host-side. Note: On my test system, this didn't seem to be required, it's possible the bit was stuck on when enabled. Tested: Not tested. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Idbea0e9d378ee108f24240d64b43b6a3c0eea799
* bugfix: tools: p2a: read returns boolPatrick Venture2019-07-261-5/+8
| | | | | | | | The read method returns bool, therefore if this returns 0, it's false, and therefore the read failed. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I365f9edf49a79ca5ea3c13090d6b8a11b9598e53
* bmc: use json for configurationPatrick Venture2019-07-191-79/+10
| | | | | | | | Use a json file for configuration of the flash image. Tested: Verified that /flash/image worked as expected. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I205978203360140870f0e68208912a894e00a6fc
* bmc: implement search for json filesPatrick Venture2019-07-196-0/+129
| | | | | | Tested: Verified it prints out the blobs expected. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I1ba6af8b2ca066e6eb1699cb4214ce32f148005d
* bmc: consolidate action pack code slightlyPatrick Venture2019-07-191-35/+44
| | | | | | | | Consolidate the code slightly as part of moving towards using the json configuration. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Ic24e02973101b9b0d6cd120e761a7e25e1203fd9
* bmc: move from data section objs to ownedPatrick Venture2019-07-1919-137/+237
| | | | | | | | Move from objects created ahead of purpose to owned objects. This is a step towards integrating with the json support. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I738a5edd40724f17245911af1080c350f029fef1
* build: always define conditionalsPatrick Venture2019-07-191-0/+3
| | | | | | | Always define conditionals to enable building of Makefiles. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Id8786d3d5ec6b1ce4582043d6a331921911963d8
* bugfix: build: fix enable-host-biosPatrick Venture2019-07-191-2/+6
| | | | | Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I0478877a952f794c82786fa0a4c004cfc4e15f72
* bmc: provide disabled json supportPatrick Venture2019-07-1810-1/+726
| | | | | | | | Provide support such that a json configuration file can define a firmware handler and its behavior. This is not yet enabled. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: If21f4e97951b3bb91a8afc53bee493d8600a04b7
* tools: add bios supportPatrick Venture2019-07-032-4/+9
| | | | | | | | Add type "bios" to burn_my_bmc, such that when used it'll use the /flash/bios path for writing the bios contents. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I613af23b80eb99936b744d4138a61d2f7b39b962
* build: add option --enable-host-biosPatrick Venture2019-07-0310-20/+147
| | | | | | | Add option to enable building in support for the host bios. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I324fc071f07cd364fd39c7df1ccfd9f0fd509a46
* bmc: add ActionPack notion to bundle actionsPatrick Venture2019-07-0315-62/+390
| | | | | | | | Each firmware type will provide its own set of action implementations for each step, preparation, verification, and update. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: Id6409ac356a74e9094272b37709861e2a33d9862
OpenPOWER on IntegriCloud