Mimoja has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38426 )
Change subject: lib: Always read SPD sources as text file ......................................................................
lib: Always read SPD sources as text file
In som circumstances grep detects in input of an spd hex file as binary resulting in an spd source not beeing added to the resulting spd.bin. This appreas to be especially the case with heavily commented files.
This commit forces grep to read the input as text file.
Example SPD that does not work (regardless of beeing stripped of zero blocks).
```hex # TotalBytes: 512 ; BytesUsed: 384 23 # SPD Revision 1.1 11 # DDR Ramtype: LPDDR4X 11 # Config Rest 0E 16 21 95 08 00 00 00 00 0A 22 00 00 49 00 04 0F 92 54 05 00 84 00 90 A8 90 C0 08 60 04 00 00 [...] # CRC Is: 0x1EB4 Calculated: 0x1EB4 Match! 1E B4 # ModuleSpecificParameter [...] # HybridMemoryParameter [...] # ExtendedFunctionParameter [...] # ManufactoringInformation ## Module Manufactoring ID 00 00 ## Module Manufactoring Location and Date 00 00 00 ## Module Manufactoring Serial 00 00 00 00 ## Module Manufactoring Part Number: "K4UBE3D4AA-MGCL" 4B 34 55 42 45 33 44 34 41 41 2D 4D 47 43 4C 00 00 00 00 00 ## Module Manufactoring Revision Code 00 ## Module Manufactor: "Samsung" (0xCE80) CE 80 ## Module Stepping 00 ## Module Manufactoring Data [..] ## Module Reserved 00 00 # EndUserProgrammable [...] ```
Change-Id: I7e5bad069531630b36dc3702c8c4bd94ba0946c1 Signed-off-by: Johanna Schander coreboot@mimoja.de --- M src/lib/Makefile.inc 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/38426/1
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 748f55a..2333f64 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -338,7 +338,7 @@ # Include spd ROM data $(LIB_SPD_BIN): $(LIB_SPD_DEPS) for f in $(LIB_SPD_DEPS); \ - do for c in $$(cat $$f | grep -v ^#); \ + do for c in $$(cat $$f | grep --binary-files=text -v ^#); \ do printf $$(printf '%o' 0x$$c); \ done; \ done > $@
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38426
to look at the new patch set (#2).
Change subject: lib: Always read SPD sources as text file ......................................................................
lib: Always read SPD sources as text file
In som circumstances grep detects in input of an spd hex file as binary resulting in an spd source not beeing added to the resulting spd.bin. This appreas to be especially the case with heavily commented files.
This commit forces grep to read the input as text file.
Example SPD that would else be detected as binary (regardless of stripped zero blocks).
```hex # TotalBytes: 512 ; BytesUsed: 384 23 # SPD Revision 1.1 11 # DDR Ramtype: LPDDR4X 11 # Config Rest 0E 16 21 95 08 00 00 00 00 0A 22 00 00 49 00 04 0F 92 54 05 00 84 00 90 A8 90 C0 08 60 04 00 00 [...] # CRC Is: 0x1EB4 Calculated: 0x1EB4 Match! 1E B4 # ModuleSpecificParameter [...] # HybridMemoryParameter [...] # ExtendedFunctionParameter [...] # ManufactoringInformation ## Module Manufactoring ID 00 00 ## Module Manufactoring Location and Date 00 00 00 ## Module Manufactoring Serial 00 00 00 00 ## Module Manufactoring Part Number: "K4UBE3D4AA-MGCL" 4B 34 55 42 45 33 44 34 41 41 2D 4D 47 43 4C 00 00 00 00 00 ## Module Manufactoring Revision Code 00 ## Module Manufactor: "Samsung" (0xCE80) CE 80 ## Module Stepping 00 ## Module Manufactoring Data [..] ## Module Reserved 00 00 # EndUserProgrammable [...] ```
Change-Id: I7e5bad069531630b36dc3702c8c4bd94ba0946c1 Signed-off-by: Johanna Schander coreboot@mimoja.de --- M src/lib/Makefile.inc 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/38426/2
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38426 )
Change subject: lib: Always read SPD sources as text file ......................................................................
Patch Set 2: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/38426/2/src/lib/Makefile.inc File src/lib/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/38426/2/src/lib/Makefile.inc@341 PS2, Line 341: --binary-files=text This looks very GNU to me, but I checked and it seems to be implemented ~everywhere for compatibility.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38426 )
Change subject: lib: Always read SPD sources as text file ......................................................................
Patch Set 2: Code-Review+1
(4 comments)
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG@9 PS2, Line 9: som some
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG@9 PS2, Line 9: in the
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG@9 PS2, Line 9: In som circumstances grep detects in input of an spd hex file Under some … ?
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG@11 PS2, Line 11: appreas appears
Hello Christoph Pomaska, Paul Menzel, Jonathan Neuschäfer, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38426
to look at the new patch set (#3).
Change subject: lib: Always read SPD sources as text file ......................................................................
lib: Always read SPD sources as text file
Under some circumstances grep detects the input of a spd hex file as binary resulting in an spd source not beeing added to the resulting spd.bin. This appears to be especially the case with heavily commented files.
This commit forces grep to read the input as text file.
Example SPD that would else be detected as binary (regardless of stripped zero blocks).
```hex # TotalBytes: 512 ; BytesUsed: 384 23 # SPD Revision 1.1 11 # DDR Ramtype: LPDDR4X 11 # Config Rest 0E 16 21 95 08 00 00 00 00 0A 22 00 00 49 00 04 0F 92 54 05 00 84 00 90 A8 90 C0 08 60 04 00 00 [...] # CRC Is: 0x1EB4 Calculated: 0x1EB4 Match! 1E B4 # ModuleSpecificParameter [...] # HybridMemoryParameter [...] # ExtendedFunctionParameter [...] # ManufactoringInformation ## Module Manufactoring ID 00 00 ## Module Manufactoring Location and Date 00 00 00 ## Module Manufactoring Serial 00 00 00 00 ## Module Manufactoring Part Number: "K4UBE3D4AA-MGCL" 4B 34 55 42 45 33 44 34 41 41 2D 4D 47 43 4C 00 00 00 00 00 ## Module Manufactoring Revision Code 00 ## Module Manufactor: "Samsung" (0xCE80) CE 80 ## Module Stepping 00 ## Module Manufactoring Data [..] ## Module Reserved 00 00 # EndUserProgrammable [...] ```
Thanks to Patrick Georgi for checking that this grep option is widely available.
Change-Id: I7e5bad069531630b36dc3702c8c4bd94ba0946c1 Signed-off-by: Johanna Schander coreboot@mimoja.de --- M src/lib/Makefile.inc 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/38426/3
Mimoja has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38426 )
Change subject: lib: Always read SPD sources as text file ......................................................................
Patch Set 3:
(4 comments)
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG@9 PS2, Line 9: som
some
Done
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG@9 PS2, Line 9: in
the
Done
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG@9 PS2, Line 9: In som circumstances grep detects in input of an spd hex file
Under some … ?
Done
https://review.coreboot.org/c/coreboot/+/38426/2//COMMIT_MSG@11 PS2, Line 11: appreas
appears
Done
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/38426 )
Change subject: lib: Always read SPD sources as text file ......................................................................
lib: Always read SPD sources as text file
Under some circumstances grep detects the input of a spd hex file as binary resulting in an spd source not beeing added to the resulting spd.bin. This appears to be especially the case with heavily commented files.
This commit forces grep to read the input as text file.
Example SPD that would else be detected as binary (regardless of stripped zero blocks).
```hex # TotalBytes: 512 ; BytesUsed: 384 23 # SPD Revision 1.1 11 # DDR Ramtype: LPDDR4X 11 # Config Rest 0E 16 21 95 08 00 00 00 00 0A 22 00 00 49 00 04 0F 92 54 05 00 84 00 90 A8 90 C0 08 60 04 00 00 [...] # CRC Is: 0x1EB4 Calculated: 0x1EB4 Match! 1E B4 # ModuleSpecificParameter [...] # HybridMemoryParameter [...] # ExtendedFunctionParameter [...] # ManufactoringInformation ## Module Manufactoring ID 00 00 ## Module Manufactoring Location and Date 00 00 00 ## Module Manufactoring Serial 00 00 00 00 ## Module Manufactoring Part Number: "K4UBE3D4AA-MGCL" 4B 34 55 42 45 33 44 34 41 41 2D 4D 47 43 4C 00 00 00 00 00 ## Module Manufactoring Revision Code 00 ## Module Manufactor: "Samsung" (0xCE80) CE 80 ## Module Stepping 00 ## Module Manufactoring Data [..] ## Module Reserved 00 00 # EndUserProgrammable [...] ```
Thanks to Patrick Georgi for checking that this grep option is widely available.
Change-Id: I7e5bad069531630b36dc3702c8c4bd94ba0946c1 Signed-off-by: Johanna Schander coreboot@mimoja.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/38426 Reviewed-by: Patrick Georgi pgeorgi@google.com Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/lib/Makefile.inc 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved Paul Menzel: Looks good to me, but someone else must approve
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 748f55a..2333f64 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -338,7 +338,7 @@ # Include spd ROM data $(LIB_SPD_BIN): $(LIB_SPD_DEPS) for f in $(LIB_SPD_DEPS); \ - do for c in $$(cat $$f | grep -v ^#); \ + do for c in $$(cat $$f | grep --binary-files=text -v ^#); \ do printf $$(printf '%o' 0x$$c); \ done; \ done > $@