| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This is needed for 64 MiB images.
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: I3e2a63d1c8ae5db956ca8d5553c98d9cc671409c
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
The constant std::nullopt is used but the header was not included.
Change-Id: Ibb79f7f0b9944425202695b8c5d4e1d191b72a69
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Add networking related functions to the syscall wrapper.
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: I0ccb4138963ce2a8c7bb6f6f3a556de1afcd0c08
|
|
|
|
|
|
|
|
| |
If an unsupported interface is requested, the open() call will simply
fail.
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: Iefd11657d957931873a4d20246d9ccdd791ba0e5
|
|
|
|
|
| |
Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: I84c5e7f493afbb0894528f5d0986180b7109e170
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I384734c592e39a01c5531d3d7d6c79474c2b0b44
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given:
The bridge is enabled!
Received address: 0x47ff0000
Progress: 100.00%Sending over the hash file.
Add the missing newline when the progress output reaches 100%.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I83f97144fcc6d675e2bace050de81bd0084338d2
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I9da1674d6cbc688efc7bab0e033788d6ee4694f7
|
|
|
|
|
|
|
| |
Tested: Verified the build and install process works for the host-tool,
burn_my_bmc.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Icf0fc9ed572055561fa0e82d71f7807410430794
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ic4b645091c71f270ba3b2f290f7206ebe3222f1d
|
|
|
|
|
|
|
|
|
|
| |
The host tool depended on the BMC header: firmware_handler.hpp because
it defined the flags. This header depends on phosphor-ipmi-blobs,
therefore the host-tool depends on this. Move the flags into a separate
common header file and snip this dependency.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Id2ad33a1611c02605a1ed5c695429d0451eb98d4
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I2407359461a1a2f0e733ff8cd0cb1744b6304c32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tested: Verified this works for a Nuvoton BMC.
EXTRA_OECONF_append_xxx = " \
--enable-static-layout \
--enable-lpc-bridge \
--enable-nuvoton-lpc \
--enable-reboot-update \
MAPPED_ADDRESS=0xc0008000 \
"
/tmp/phosphor_ipmi_flash_tool \
--command update \
--interface ipmilpc \
--image image-bmc \
--sig image-bmc.sig \
--type static \
--address 0xfedc1000 \
--length 0x1000
Sending over the firmware image.
trying to open blob
sending writeMeta
caught exception
EFBIG returned!
sending writeMeta
writemeta sent
Sending over the hash file.
trying to open blob
sending writeMeta
caught exception
EFBIG returned!
sending writeMeta
writemeta sent
Opening the verification file
Committing to /flash/verify to trigger service
Calling stat on /flash/verify session to check status
other
success
Returned success
succeeded
Opening the update file
Committing to /flash/update to trigger service
Calling stat on /flash/update session to check status
running
Opening the cleanup blob
Exception received: blob exception received: Received IPMI_CC: 255
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: If866303e95e9b6a19dc8b20a99bb89fd66f95eeb
|
|
|
|
|
|
|
| |
Add a parameter that specifies the layout type, static or ubitar.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I86c09d8ffeb55ba789279d2568b579a44b3923d7
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Id873c41997e2617d1fa3db5767112c23d77c487c
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I367ea961c98ec822d3200d101c4f5977d77e7402
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ic7049ffc2a3c4e7dad3356e11f48f6e5ed8eeca1
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
The host needs to have memory set aside for this purpose, and this
enables the caller to provide those values.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: If40ec3b08bd1932cba91d3f770c7fde6f280463d
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I51349fc103af2a55f1b83830bf8e74407fc15b9e
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I15b3514d095d9fc770a1b0fe125eb48d96ada2c8
|
|
|
|
|
|
|
|
|
| |
Update the verification commit status debug message to not specify that
it's the verification blob specifically as this method is used for both
verification and update.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I0ee89a5e8f7eae2533ab89db12032b33d1c25ec1
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Id4d531e2ea2d755aa310261966254419d78dccdb
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ibb9c1c9f9cb7e9cda18f4e8dddb31d57a12f0d90
|
|
|
|
|
|
|
|
|
| |
The scope of the variable 'commandAttempts' can be reduced.
The scope of the variable 'attempts' can be reduced.
The scope of the variable 'exitLoop' can be reduced.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib2e258c1af7110ff4568695b8f1ea877a9ffef99
|
|
|
|
|
|
|
|
|
| |
(style) The scope of the variable 'bytesRead' can be reduced.
[tools/bt.cpp:21]
[tools/p2a.cpp:111]
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I6b96247a02cd35d073b424501bb161e80aedf3b4
|
|
|
|
|
|
|
|
| |
The blobs namespace is really owned by phosphor-ipmi-blobs. Move all
phosphor-ipmi-flash objects into ipmi_flash namespace.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I51b721ad4f3cdc4cc43846c942967ed2e5f16589
|
|
|
|
|
|
|
|
|
|
| |
Enable verification configuration beyond the result file check. This
patchset allows a developer to provide their own verification mechanisms
by implementing an interface and adding configuration to enable using
their custom version.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Iba5d4be75bb49d9c4ab84be8578f0306c15b5be9
|
|
|
|
|
|
|
|
| |
Create a common util object for the BMC library and host tool. Place in
blobs namespace favoring BMC.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I036fd65d924c65fcfa71aba5cd76275a2941ff14
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I2a12b61b63ec1e0d54fffae07431c145b988ad7f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Trigger verification via committing to the verify blob id.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia3722ff144ba268cd554bac0fda06f0c426edd88
|
|
|
|
|
|
|
|
| |
The printfs were using actual sizes instead of leveraging %z to deal
with std::size_t.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I7ac731b0458d9501762651bdc9d796f7a6ada620
|
|
|
|
|
|
|
|
|
| |
Tool worked by declaring its own pci utility object instead of using the
one provided. There are not yet unit-tests associated with the
P2aDataHandler that would have caught this.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I62cdeb17d298f1db51d8f513c59bfd299fc2884a
|
|
|
|
|
|
|
|
|
|
|
|
| |
Send the hash file contents to the firmware image or tarball can be
verified, for whatever verification process is used by a platform.
Tested: Verified md5sum of /tmp/bmc.sig matches the signature file's
hash on the host. Sent the contents over P2A. The implementation uses
the same data pathway for the firmware image and the signature file.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Icbc7fddc4587059004935cf51063797b25f76ad0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement sending firmware image over p2a via the aspeed-p2a-ctrl
driver.
Test configuration:
# Image is static, uses the PCI bridge, and requires the ASPEED
# PCI-to-AHB hardware implementation.
EXTRA_OECONF_append_quanta-q71l = " --enable-static-layout"
EXTRA_OECONF_append_quanta-q71l = " --enable-pci-bridge"
EXTRA_OECONF_append_quanta-q71l = " --enable-aspeed-p2a"
EXTRA_OECONF_append_quanta-q71l = " MAPPED_ADDRESS=0x47FF0000"
Tested: Verified via md5sum the image-bmc file sent from the host via
this tool matches the hash of /run/initramfs/bmc-image. This code can
be used to send any file down, but was only tested with a "static"
layout build.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I430bc7444f06f4f93a63e3bf2646bd195eaa2e52
|
|
|
|
|
|
|
| |
Catch all derived exceptions that may be thrown from the Updater.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I7ab1e74fc1378a3e8f73eae40295e42ef7a2833a
|
|
|
|
|
|
|
|
| |
ipmi-blob-tool changed the constructors to perform explicit ownership of
the inputs. Therefore, update our constructions to obey this pattern.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I8029ce2ced3d75505f918a66afdc5fd61409c69d
|
|
|
|
|
|
|
|
|
| |
Align the mmap by pagesize.
Tested: Verified alignment is correct and mmap succeeds where it would
fail on a mis-aligned call.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I76a4f94415c9337d8ca983e24a18e3e4fc701564
|
|
|
|
|
|
|
|
|
|
|
| |
Read the PCI configuration from the blob handler itself. Don't use this
yet, but read it.
Tested: Verified with a bugfix in ipmi-blob-tool that it was able to
read back and print the value configured into the BMC image.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I49a8c93508e64a65fd37b50ec2b437f0016272f2
|