| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The remove association function was supposed to be called on delete but
was never implemented so if the associations are queried but the version
has been deleted, that'd be false information, so call to remove the
associations on delete, also rename it to delete all associations,
because the delete function already determined if the requested version
is functional.
Tested: Verified the associations for the requested version are deleted
with a DeleteAll and Delete call.
Change-Id: Ia4fde01c9500b648660bc9a4c355d44a35af7cc5
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an activation fails, the version is marked as Failed.
On a subsequent activation, the bmc updater core dumps due
to 2 issues during the freeSpace call:
1. The Failed activation doesn't have a Priority object, so
default its priority to a large value.
2. If the subsequent activation is to the same version id,
then freeSpace should not do an erase on it, because that
removes the activations object that it's trying to activate.
Tested: Verified that doing an activation after a version
was marked as Failed did not core dump the updater anymore.
Change-Id: Iba36497b53738e00283cfec55e8c666f943cd5d5
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Update the .clang-format file.
Now includes header sorting and updating PointerAlignment.
Change-Id: I5c7690d8d83cdebe26ff3a73b90a2a8c17dd8054
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The service that sets the priority value is unique to the ubi
layout because there is only one version at a time on the
static layout.
Move the calling of the service to the ubi implementation.
Tested:
- Witherspoon: Priorities are still set.
- Romulus: The BMC.Updater app does not core dump with the
latest sdbusplus changes due to calling a non-existent service.
Change-Id: Ica1c68f00d5cb43c51ee09c5a3851613edf941d5
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Add item_updater_helper and implement it in ubi and static layouts.
Tested: Build this repo on both Romulus and Witherspoon OK;
Tested on Romulus and Witherspoon that code update works fine.
Change-Id: I706cfe63900f89bb41672dcc745b3483e06838c7
Signed-off-by: Lei YU <mine260309@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Add a function to call the "mirror u-boot" service when the BMC boots.
Since the BMC is booting, we know we had a good u-boot and u-boot
environment, so we can safely copy the current one to the alternate
chip.
Change-Id: Ib628ea4a5fc9ae8d80f1047bddf94eb3fa52cdba
Signed-off-by: Eddie James <eajames@us.ibm.com>
|
|
|
|
|
| |
Change-Id: Ia899858c11cff6e4fa26b820b35b1e5dca1b57df
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new function to delete version objects as part of the Activation.
The code update service automatically removes the ubi volumes to make
space, but it does not remove the dbus object associated with the
removed volume. The side effect of leaving the dbus object is that
when freePriority() is called at the end of the Activation, a new
priority value is assigned to all version dbus objects (including the
deleted one) which fills up the u-boot environment variables.
Tested: Verified that after an Activation, there were only 2 priority
values in the u-boot env variables instead of 3, and they corresponded
to existing volumes.
Change-Id: I41a7ea95eeea1c8a2cb8ce4b41671e77f5c42cac
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recursive nature of calling the free priority function
would trigger setting the u-boot env multiple times.
Make a change so that the priorities are sorted and
updated once.
- Create a non-overriden priority setter function to be called
by the free priority function and by the function that creates
the dbus objects after a bmc reboot. There's no need to call
to free the priorities after reboot since the priorities are
preserved on the bmc, and if they're not they default to 0 or 255.
- When a dbus request is made to update the priority, update
the value, then call the free priority function, which will
sort the versions by priority and bump the priority of any
duplicate ones.
Resolves openbmc/openbmc#2535
Change-Id: Ib92cc0ca6c4d5f6e986f3cde7156d63b53844b46
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- We need to update the uboot env variables to point to the
version that has the lowest priority when
the version with lowest priority gets deleted or when
the version with lowest priority gets a higher priority
Resolves openbmc/openbmc#2372
Change-Id: If43105c9ee2c3ada8aeb19939a428eb05e621ee9
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Style and comment changes only.
A similar change was made in openpower-pnor-code-mgmt.
Change-Id: I5ad5cb37267983a1749847599d379e437e818540
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
This commit extends the item updater with a function to delete all
non-current versions uploaded to the machine.
Resolves openbmc/openbmc#2264
Change-Id: I4d835d5020766f8bb5e9653b28535acfb191fe53
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- If a BMC is set to the lowest priority then update the u-boot
environment variables so that that system boots from that version
on the next reboot.
Resolves openbmc/openbmc#2284
Change-Id: If0b67b07496f602fa06607bd0685d6394cb8d9fd
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
|
|
|
| |
removeActiveAssociation and createActiveAssociation should be
pass by reference.
Change-Id: If9396b4ab36fc4497db0cf0b6da7e04a2c6c4055
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
| |
Create a functional association for the "running" BMC image.
Change-Id: Id254df06b4361b418e765cc5222b1e1ee0d348a3
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Create an association between an active image
and the active image's version object.
Resolves openbmc/openbmc#2007
Change-Id: I4fd27235db97a3cee87d2da335245e00ec602fba
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Create an association from /xyz/openbmc_project/software/<id>
to the BMC inventory item.
To determine the BMC inventory item path, look for paths under
/xyz/openbmc_project/inventory/system/chassis/ that end in /bmc.
Change-Id: I8da748743368e3e607b30a76a6729829dcceec54
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
| |
Change-Id: Ied7b803219ccc4686c1316e8b7049538bd52c5ff
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
In this commit, a "field mode" feature is added. When field mode is
enabled, the PNOR patch path is unmounted, disabling host patches.
Resolves openbmc/openbmc#1350
Change-Id: Ia207b1fe1cdeb1b4fbf9b2fbf77052d7191ea726
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Implements Object.Delete, so item_updater deletes
ReadWrite, ReadOnly partitions, and removes
Version, and Activation from maps.
Resolves openbmc/openbmc#1550
Change-Id: If6d08bc7d380d043c28a26570e4698201cd7f5b0
Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
This commit implements the generic factory reset interface for the BMC
software updater. When the reset function is called, a service file is
called which sets the environmental variable to reset the RW volume.
Change-Id: Ic69b5d145edd654ed75295a9e9aeef9f53779dad
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Create Redundancy Priority interface after a successful
PNOR update and set the priority.
- Remove Redundancy Priority interface once the activation
state changes from being Active.
- Create override function for RedundancyPriority.
Resolves openbmc/openbmc#1755
Change-Id: I160dc4a6cad243d58759c71bbeb218aab841cf7a
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
The image manager implements the Common.FilePath.Path interface,
make use of it to find the image files instead of hardcoding the
path, since the updater shouldn't know/care where the images are.
Change-Id: Ieb9ad8e393a7f91645631db9f302095eb82d7f61
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
- There needs to be only one version class for both
BMC and PNOR images. Thus removing the BMCVERSION
class and moving the functionality to MANAGER class.
Change-Id: I6dda818960588cfd9ed345fe93068531efc7a877
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Implementing the Version object under item_updater helps
to retain the version of the active images after the bmc
is rebooted and the image_dir no longer holds version file.
Change-Id: I55349bbc62b212b4e034239f4f6743129c8b1070
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Validate the image dir by checking its content.
- Set Activation to "Active" if current image,
"Ready" if validation passed and "Invalid" if
validation fails
Resolves openbmc/openbmc#1629
Change-Id: I5f1c42fb2ba93c849ea8653c9e81c737ae27c814
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
|
|
|
|
|
| |
Change-Id: Ib2dc2b482448422c8497da3af269047288f2159a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|
This is the initial BMC Item Updater.
Change-Id: I1c4f8ec94d7d35a0e03a363007b79414b20058ac
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|