[Fix] - fpgasupdate -- skip Factory check under certain conditions #3063
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A check was recently added to fpgasupdate to prevent writing to the flash factory page when the current boot-page is also factory. This combo is in fact already prevented in the hardware by the BMC but a vague error message is propagated back to the SW stack. So the purpose of the check in fpgasupdate is to enable printing of a descriptive message to the user.
This check works for n6001 and beyond, and PACSigned binaries, but was shown to fail on D5005 systems and with .gbs files.
The D5005 failure seems to be because the boot-page sysfs entry is missing on such installations.
The .gbs failure is because such binaries are missing the Auth Block0 segment.
This change simply skips the check if either of the above conditions is true. It is OK to skip this because the BMC prevents the combo anyways.
Tests run: