Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pflash option to retrieve PNOR partition flags
This commit extends pflash with an option to retrieve and print information for a particular partition, including the content from "pflash -i" and a verbose list of set miscellaneous flags. -i option is also updated to print a short list of flags in addition to the ECC flag, with one character per flag. A test of the new option is included in libflash/test. Signed-off-by: Michael Tritz <mtritz@us.ibm.com> Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com> [stewart@linux.vnet.ibm.com: various test fixes, enable gcov] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
- Loading branch information
1 parent
eae8678
commit f2c87a3
Showing
6 changed files
with
167 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# test-miscprint.pnor is constructed as follows: | ||
# PRESERVED,0x00000300,0x00000100,P,/dev/zero | ||
# READONLY,0x00000400,0x00000100,R,/dev/zero | ||
# REPROVISION,0x00000500,0x00000100,F,/dev/zero | ||
# BACKUP,0x00000600,0x00000100,B,/dev/zero | ||
|
||
wd="libflash/test" | ||
pflash="./external/pflash/pflash" | ||
|
||
pnor="$wd/test-miscprint.pnor" | ||
|
||
output1=$(${pflash} --detail=1 -F "$pnor" | grep "\[P\]") | ||
output2=$(${pflash} --detail=2 -F "$pnor" | grep "\[R\]") | ||
output3=$(${pflash} --detail=3 -F "$pnor" | grep "\[F\]") | ||
output4=$(${pflash} --detail=4 -F "$pnor" | grep "\[B\]") | ||
|
||
if [[ $output1 == "PRESERVED [P]" && $output2 == "READONLY [R]" && | ||
$output3 == "REPROVISION [F]" && $output4 == "BACKUP [B]" ]]; then | ||
echo "Test passed!" | ||
exit 0; | ||
else | ||
echo "Test failed!" | ||
exit 1; | ||
fi | ||
|