summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorSaqib Khan <khansa@us.ibm.com>2017-08-17 14:52:37 -0500
committerSaqib Khan <khansa@us.ibm.com>2017-08-19 08:36:14 -0500
commit2cbfa03543672125df47885ebb83ec8626bbdbf3 (patch)
tree5365d7c1ed112bc4b36cecc0ab94c1a4f3476b60 /configure.ac
parentef8cd9f6777b4db0eb5fac8ec0c215d6aeb9716a (diff)
downloadopenpower-pnor-code-mgmt-2cbfa03543672125df47885ebb83ec8626bbdbf3.tar.gz
openpower-pnor-code-mgmt-2cbfa03543672125df47885ebb83ec8626bbdbf3.zip
Limit the number of Active pnor versions
- We need to limit the number of pnor versions because pnor chip has limited space. If we run out of space and the user tries another pnor code update then the update will fail. - Currently we can only hold two images on pnor at this point. As we continue to decrease the size of pnor image we will increment the number of active pnor chips we can hold. - This check will need to be removed once we have complete issue #1402 which will automatically monitor the flash usage and delete any image accordingly. Resolves openbmc/openbmc#2155 Change-Id: Id62ba8554fba1ddb78286f70b0c3482a7beb8a6b Signed-off-by: Saqib Khan <khansa@us.ibm.com>
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 48d359a4a..8abd1b575 100755
--- a/configure.ac
+++ b/configure.ac
@@ -99,5 +99,9 @@ AC_DEFINE(PNOR_RW_ACTIVE_PATH, "/var/lib/phosphor-software-manager/pnor/rw",
AC_DEFINE(PNOR_PRSV_ACTIVE_PATH, "/var/lib/phosphor-software-manager/pnor/prsv",
[Path to the active preserved pnor partitions])
+AC_ARG_VAR(ACTIVE_PNOR_MAX_ALLOWED, [The maximum allowed active pnor versions])
+AS_IF([test "x$ACTIVE_PNOR_MAX_ALLOWED" == "x"], [ACTIVE_PNOR_MAX_ALLOWED=2])
+AC_DEFINE_UNQUOTED([ACTIVE_PNOR_MAX_ALLOWED], [$ACTIVE_PNOR_MAX_ALLOWED], [The maximum allowed active pnor versions])
+
AC_CONFIG_FILES([Makefile test/Makefile])
AC_OUTPUT
OpenPOWER on IntegriCloud