History log of /openbmc/phosphor-bmc-code-mgmt/static/item_updater_helper.cpp (Results 1 – 9 of 9)
Revision Date Author Comments
# 25773a7e 21-Jan-2022 Adriana Kobylak <anoo@us.ibm.com>

Use flash id to write image to flash

Update the item updater helper functions to take the flash id instead of
the version id since flash id is the name of the volumes/partitions.

The flash id was b

Use flash id to write image to flash

Update the item updater helper functions to take the flash id instead of
the version id since flash id is the name of the volumes/partitions.

The flash id was being persisted for the mmc layout with the name of
"partlabel". This is not needed anymore since the flash id is now being
passed by the service files.

The write functions/service files still use the version id to know where
the image files are located in /tmp/. They then set the value of flash
id (Path property) which is then used by the other functions such as
Delete and setting the u-boot environment variables.

Tested: Code update and Delete functions work on ubi and mmc.

Change-Id: I87c5b8ae2e24af30256dc3b436859835f14cda05
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 56ec62e2 20-Jan-2021 Adriana Kobylak <anoo@us.ibm.com>

reset: Call execute() instead of systemd service

The obmc-flash-bmc-setenv@.service file calls a script that
runs the fw_setenv command. Call the fw_setenv command directly
as an eff

reset: Call execute() instead of systemd service

The obmc-flash-bmc-setenv@.service file calls a script that
runs the fw_setenv command. Call the fw_setenv command directly
as an effort to move away from systemd service calls which are
async calls and are harder to monitor for completion.

The only difference is that the script calls fw_setenv twice
because for certain variables such as field mode, the code
parses the actual environment file to get the value, and if
the system supports a redundant environment, then fw_setenv
is needed to be called twice so that the updated value is
reflected in both redundant copies and the code parses the
value correctly.

Factory reset is not a value that is parsed by this code,
so a single call is enough.

Tested: Verified in witherspoon that the rwreset environment
variable was set and factory reset occurred upon reboot.

Change-Id: I76691b1c8c78aa9232074d10d435a3e944b1cd9a
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 292159f4 05-May-2020 Adriana Kobylak <anoo@us.ibm.com>

meson: Fix compile errors

Meson runs stricter compiler checks. Fix the following errors in
preparation to moving to meson:

- Unusued parameters. Ex:
../download_manager_main

meson: Fix compile errors

Meson runs stricter compiler checks. Fix the following errors in
preparation to moving to meson:

- Unusued parameters. Ex:
../download_manager_main.cpp:7:14: error: unused parameter ‘argc’ [-Werror=unused-parameter]
../static/item_updater_helper.cpp:16:42: error: unused parameter ‘entryId’ [-Werror=unused-parameter]
../watch.cpp:77:38: error: unused parameter ‘s’ [-Werror=unused-parameter]
[test/utest.cpp:166]: (style) Variable 'pubKeyConfFile' is assigned a value that is never used.

- Add destructor and initialize variable in init list:
../flash.hpp:18:7: error: ‘class phosphor::software::updater::Flash’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
[version.hpp:81]: callback is assigned in constructor body. Consider performing initialization in initialization list

Tested: Verified code update on witherspoon still worked.

Change-Id: Ib7a0e0e11d6bfe6eeeb3f2ea4bfefd43505d639e
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 22848ece 28-Oct-2019 Adriana Kobylak <anoo@us.ibm.com>

Move function to enable field mode to common code

The only different between ubi and static layout for setting field mode
was masking the usr-local.mount service file. Now that the servi

Move function to enable field mode to common code

The only different between ubi and static layout for setting field mode
was masking the usr-local.mount service file. Now that the service file
is in the common code, it makes sense to move the function to the common
code.

Tested:
- Witherspoon: Verified setting field mode disabled the /usr/local mount
as it currently does.
- Romulus: Verified that after setting the field mode, the usr-local.mount
service file could not be started because it's masked.

Change-Id: I8afb755366053c38f72d682e874308c42e232d98
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# b0ce996a 07-Sep-2018 Gunnar Mills <gmills@us.ibm.com>

clang-format: Update to match docs repo

Update the .clang-format file.
Now includes header sorting and updating PointerAlignment.

Change-Id: I5c7690d8d83cdebe26ff3a73b90a2a8c17d

clang-format: Update to match docs repo

Update the .clang-format file.
Now includes header sorting and updating PointerAlignment.

Change-Id: I5c7690d8d83cdebe26ff3a73b90a2a8c17dd8054
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 76c79df3 27-Aug-2018 Lei YU <mine260309@gmail.com>

static layout: Support field mode

Enable support for field mode, which sets "fieldmode=true" in u-boot
env.

Tested: Verify field mode is enabled via REST API, and verify it is

static layout: Support field mode

Enable support for field mode, which sets "fieldmode=true" in u-boot
env.

Tested: Verify field mode is enabled via REST API, and verify it is
still enabled after BMC reboot.

Change-Id: I9ff01a51260d1f08021e0ba7ade16fd48c8bb24e
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# 28b2ba4a 19-Jul-2018 Lei YU <mine260309@gmail.com>

static layout: support factory reset

Implement factory reset for static flash layout, that starts
obmc-flash-bmc-setenv to set factory-reset u-boot env and let
init to do the cleanup

static layout: support factory reset

Implement factory reset for static flash layout, that starts
obmc-flash-bmc-setenv to set factory-reset u-boot env and let
init to do the cleanup.

Tested: Invoke factory reset on /xyz/openbmc_project/software and verify
everything in rwfs is deleted, and after reboot, the BMC acts
like a fresh new one.

Change-Id: I20e361519af6c3c12703315070debabd8cf88060
Signed-off-by: Lei YU <mine260309@gmail.com>

show more ...


# bbcb7be1 17-Jul-2018 Adriana Kobylak <anoo@us.ibm.com>

Move setting the priority U-Boot variable to ubi

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 setting the priority U-Boot variable to ubi

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>

show more ...


# 56aaf454 21-Jun-2018 Lei YU <mine260309@gmail.com>

item_updater: sort ubi specific code

Add item_updater_helper and implement it in ubi and static layouts.

Tested: Build this repo on both Romulus and Witherspoon OK;
Test

item_updater: sort ubi specific code

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>

show more ...