Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40566 )
Change subject: util/scripts/ucode_h_to_bin.sh: Fix .inc-lines with just comment ......................................................................
util/scripts/ucode_h_to_bin.sh: Fix .inc-lines with just comment
There are microcodes in .inc format out in the wild which contains lines with just a comment. So these files look like the following example:
; External header dd 000000001h dd 00000001bh ... ; Data dd 000000000h ...
The lines with just a comment starts with a ';' and will break the current awk formatting which is performed to reformat the content into C code style. As we are just interested in the data we can simply drop all lines that start with a ';' which sed can do pretty easy.
Change-Id: I9ff5db51667672cffd9d776fb9497962b4a6083a Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M util/scripts/ucode_h_to_bin.sh 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/40566/1
diff --git a/util/scripts/ucode_h_to_bin.sh b/util/scripts/ucode_h_to_bin.sh index 2010c48..c79362c 100755 --- a/util/scripts/ucode_h_to_bin.sh +++ b/util/scripts/ucode_h_to_bin.sh @@ -42,8 +42,8 @@
include_file() { if [ "${1: -4}" == ".inc" ]; then - awk '{gsub( /h.*$/, "", $2 ); print "0x" $2 ","; }' "$1" \ - >> "${TMPFILE}.c" + sed '/^;/d' <"$1" | awk '{gsub( /h.*$/, "", $2 ); print "0x" $2 ","; }' \ + >> "${TMPFILE}.c" else echo "#include "$1"" >> "${TMPFILE}.c" fi
Hello build bot (Jenkins), Patrick Georgi, Lev,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40566
to look at the new patch set (#2).
Change subject: util/scripts/ucode_h_to_bin.sh: Fix .inc-lines with just comment ......................................................................
util/scripts/ucode_h_to_bin.sh: Fix .inc-lines with just comment
There are microcodes in .inc format out in the wild which contains lines with just a comment. So these files look like the following example:
; External header dd 000000001h dd 00000001bh ... ; Data dd 000000000h ...
The lines with just a comment starts with a ';' and will break the current awk formatting which is performed to reformat the content into C code style. As we are just interested in the data we can simply drop all lines that start with a ';' which sed can do pretty easy.
Change-Id: I9ff5db51667672cffd9d776fb9497962b4a6083a Signed-off-by: Werner Zeh werner.zeh@siemens.com --- M util/scripts/ucode_h_to_bin.sh 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/40566/2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40566 )
Change subject: util/scripts/ucode_h_to_bin.sh: Fix .inc-lines with just comment ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40566 )
Change subject: util/scripts/ucode_h_to_bin.sh: Fix .inc-lines with just comment ......................................................................
util/scripts/ucode_h_to_bin.sh: Fix .inc-lines with just comment
There are microcodes in .inc format out in the wild which contains lines with just a comment. So these files look like the following example:
; External header dd 000000001h dd 00000001bh ... ; Data dd 000000000h ...
The lines with just a comment starts with a ';' and will break the current awk formatting which is performed to reformat the content into C code style. As we are just interested in the data we can simply drop all lines that start with a ';' which sed can do pretty easy.
Change-Id: I9ff5db51667672cffd9d776fb9497962b4a6083a Signed-off-by: Werner Zeh werner.zeh@siemens.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/40566 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M util/scripts/ucode_h_to_bin.sh 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/util/scripts/ucode_h_to_bin.sh b/util/scripts/ucode_h_to_bin.sh index 2010c48..cb403a4 100755 --- a/util/scripts/ucode_h_to_bin.sh +++ b/util/scripts/ucode_h_to_bin.sh @@ -42,7 +42,7 @@
include_file() { if [ "${1: -4}" == ".inc" ]; then - awk '{gsub( /h.*$/, "", $2 ); print "0x" $2 ","; }' "$1" \ + sed '/^;/d' <"$1" | awk '{gsub( /h.*$/, "", $2 ); print "0x" $2 ","; }' \ >> "${TMPFILE}.c" else echo "#include "$1"" >> "${TMPFILE}.c"