Attention is currently required from: Martin L Roth, Nico Huber.
Maximilian Brune has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81290?usp=email )
Change subject: genbuild_h: Fix and harden major/minor version parsing
......................................................................
Patch Set 1:
(2 comments)
File util/genbuild_h/genbuild_h.sh:
https://review.coreboot.org/c/coreboot/+/81290/comment/bb01697f_1ef923e9 :
PS1, Line 39: MAJOR_VER="$(echo "${VERSION}" | sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\1/p')"
: MINOR_VER="$(echo "${VERSION}" | sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\2/p')"
we could gain some readability if we used extended regex `sed -E` and removed the `\` from the characters with special meaning (e.g. '(')
https://review.coreboot.org/c/coreboot/+/81290/comment/c577c3a3_068d9d85 :
PS1, Line 40: *
nit: we could be more explicit and write {2} instead of * (for year and for month)
--
To view, visit https://review.coreboot.org/c/coreboot/+/81290?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie39381a8ef4b971556168b6996efeefe6adf2b14
Gerrit-Change-Number: 81290
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Maximilian Brune <maximilian.brune(a)9elements.com>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Comment-Date: Sat, 16 Mar 2024 02:23:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Nico Huber has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/81292?usp=email )
Change subject: util/lint: Fix `uname` check for Darwin
......................................................................
Abandoned
Duplicate
--
To view, visit https://review.coreboot.org/c/coreboot/+/81292?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ia18f7d921a4fb27cbfe71cdb9711c022139214b0
Gerrit-Change-Number: 81292
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-MessageType: abandon
Attention is currently required from: Felix Held.
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81263?usp=email )
Change subject: 3rdparty/amd_blobs: update submodule pointer
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
Any chance you could at least get the commit message from the
--
To view, visit https://review.coreboot.org/c/coreboot/+/81263?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: If1bd0b37bebcdd600465dbd48162792e2c32bfb7
Gerrit-Change-Number: 81263
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Sat, 16 Mar 2024 00:58:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Martin L Roth, Nico Huber.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/81292?usp=email )
Change subject: util/lint: Fix `uname` check for Darwin
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Duplicate of CB:81285
--
To view, visit https://review.coreboot.org/c/coreboot/+/81292?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ia18f7d921a4fb27cbfe71cdb9711c022139214b0
Gerrit-Change-Number: 81292
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Martin L Roth <gaumless(a)gmail.com>
Gerrit-CC: Felix Singer <service+coreboot-gerrit(a)felixsinger.de>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Comment-Date: Sat, 16 Mar 2024 00:46:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81292?usp=email )
Change subject: util/lint: Fix `uname` check for Darwin
......................................................................
util/lint: Fix `uname` check for Darwin
Even though many versions of `test` and `[` silently accept `==',
it's not a valid operator. String equality is tested with `='.
Change-Id: Ia18f7d921a4fb27cbfe71cdb9711c022139214b0
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M util/lint/lint
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/81292/1
diff --git a/util/lint/lint b/util/lint/lint
index 1896db1..66d8346 100755
--- a/util/lint/lint
+++ b/util/lint/lint
@@ -30,7 +30,7 @@
}
# Look if we have getopt. If not, build it.
-if [ $(uname) == Darwin ]; then
+if [ $(uname) = Darwin ]; then
GETOPT="getopt hIJ"
else
GETOPT="getopt -l help,junit,invert -o hIJ"
--
To view, visit https://review.coreboot.org/c/coreboot/+/81292?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ia18f7d921a4fb27cbfe71cdb9711c022139214b0
Gerrit-Change-Number: 81292
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81291?usp=email )
Change subject: genbuild_h: Fix and harden major/minor version parsing
......................................................................
genbuild_h: Fix and harden major/minor version parsing
Our major version is suddenly two digits long to represent the year.
This can't be parsed with the current sed scripts. To make sure that
no unparsed data ends up in our major/minor versions, we'll run sed
with `-n' and only print the extracted numbers if anything. Also, to
allow us to use the version numbers in C code, we strip leading zeros
(a leading 0 identifies octal numbers, so for instance 08 for August
is not a valid number).
This can result in empty major/minor version strings, so we move the
default `0' to the final variable expansion.
As a bonus, this makes an explicit check if the numbers can be parsed
unnecessary.
Change-Id: Ie39381a8ef4b971556168b6996efeefe6adf2b14
Reported-by: Christoph Zechner <christophz(a)vrvis.at>
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M util/genbuild_h/genbuild_h.sh
1 file changed, 8 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/81291/1
diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh
index 2bfcc4c..b381ab2 100755
--- a/util/genbuild_h/genbuild_h.sh
+++ b/util/genbuild_h/genbuild_h.sh
@@ -6,8 +6,8 @@
GITREV=""
TIMESOURCE=""
XGCCPATH="${XGCCPATH:-util/crossgcc/xgcc/bin/}"
-MAJOR_VER="0"
-MINOR_VER="0"
+MAJOR_VER=""
+MINOR_VER=""
COREBOOT_VERSION_FILE=".coreboot-version"
export LANG=C
@@ -36,19 +36,15 @@
TIMESOURCE=git
DATE="$(get_git_head_data %ct)"
VERSION="$(git describe)"
- # Only use the `git describe` output if the tag is in the expected <major>.<minor>
- # format, e.g. 4.18. Forks of coreboot may have other tags in different formats.
- if echo "${VERSION}" | grep -q "^[0-9]\.[0-9][0-9]*"; then
- MAJOR_VER="$(echo "${VERSION}" | sed 's/\([0-9]\)\.\([0-9][0-9]*\).*/\1/')"
- MINOR_VER="$(echo "${VERSION}" | sed 's/\([0-9]\)\.\([0-9][0-9]*\).*/\2/')"
- fi
+ MAJOR_VER="$(echo "${VERSION}" | sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\1/p')"
+ MINOR_VER="$(echo "${VERSION}" | sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\2/p')"
else
GITREV=Unknown
TIMESOURCE="date"
DATE=$(LANG="" LC_ALL=C TZ=UTC0 date +%s)
if [ -f "${COREBOOT_VERSION_FILE}" ]; then
- MAJOR_VER="$(sed 's/\([0-9]\)\.\([0-9][0-9]*\).*/\1/' "${COREBOOT_VERSION_FILE}")"
- MINOR_VER="$(sed 's/\([0-9]\)\.\([0-9][0-9]*\).*/\2/' "${COREBOOT_VERSION_FILE}")"
+ MAJOR_VER="$(sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\1/p' "${COREBOOT_VERSION_FILE}")"
+ MINOR_VER="$(sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\2/p' "${COREBOOT_VERSION_FILE}")"
fi
fi
@@ -84,8 +80,8 @@
printf "#define COREBOOT_ORIGIN_GIT_REVISION \"%s\"\n" "${GITREV}"
printf "#define COREBOOT_EXTRA_VERSION \"%s\"\n" "${COREBOOT_EXTRA_VERSION}"
-printf "#define COREBOOT_MAJOR_VERSION %s\n" "${MAJOR_VER}"
-printf "#define COREBOOT_MINOR_VERSION %s\n" "${MINOR_VER}"
+printf "#define COREBOOT_MAJOR_VERSION %s\n" "${MAJOR_VER:-0}"
+printf "#define COREBOOT_MINOR_VERSION %s\n" "${MINOR_VER:-0}"
printf "#define COREBOOT_BUILD \"%s\"\n" "$(our_date "${DATE}" "+%a %b %d %H:%M:%S %Z %Y")"
printf "#define COREBOOT_BUILD_YEAR_BCD 0x%s\n" "$(our_date "${DATE}" "+%y")"
printf "#define COREBOOT_BUILD_MONTH_BCD 0x%s\n" "$(our_date "${DATE}" "+%m")"
--
To view, visit https://review.coreboot.org/c/coreboot/+/81291?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: 24.02_branch
Gerrit-Change-Id: Ie39381a8ef4b971556168b6996efeefe6adf2b14
Gerrit-Change-Number: 81291
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/81290?usp=email )
Change subject: genbuild_h: Fix and harden major/minor version parsing
......................................................................
genbuild_h: Fix and harden major/minor version parsing
Our major version is suddenly two digits long to represent the year.
This can't be parsed with the current sed scripts. To make sure that
no unparsed data ends up in our major/minor versions, we'll run sed
with `-n' and only print the extracted numbers if anything. Also, to
allow us to use the version numbers in C code, we strip leading zeros
(a leading 0 identifies octal numbers, so for instance 08 for August
is not a valid number).
This can result in empty major/minor version strings, so we move the
default `0' to the final variable expansion.
As a bonus, this makes an explicit check if the numbers can be parsed
unnecessary.
Change-Id: Ie39381a8ef4b971556168b6996efeefe6adf2b14
Reported-by: Christoph Zechner <christophz(a)vrvis.at>
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M util/genbuild_h/genbuild_h.sh
1 file changed, 8 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/81290/1
diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh
index 2bfcc4c..b381ab2 100755
--- a/util/genbuild_h/genbuild_h.sh
+++ b/util/genbuild_h/genbuild_h.sh
@@ -6,8 +6,8 @@
GITREV=""
TIMESOURCE=""
XGCCPATH="${XGCCPATH:-util/crossgcc/xgcc/bin/}"
-MAJOR_VER="0"
-MINOR_VER="0"
+MAJOR_VER=""
+MINOR_VER=""
COREBOOT_VERSION_FILE=".coreboot-version"
export LANG=C
@@ -36,19 +36,15 @@
TIMESOURCE=git
DATE="$(get_git_head_data %ct)"
VERSION="$(git describe)"
- # Only use the `git describe` output if the tag is in the expected <major>.<minor>
- # format, e.g. 4.18. Forks of coreboot may have other tags in different formats.
- if echo "${VERSION}" | grep -q "^[0-9]\.[0-9][0-9]*"; then
- MAJOR_VER="$(echo "${VERSION}" | sed 's/\([0-9]\)\.\([0-9][0-9]*\).*/\1/')"
- MINOR_VER="$(echo "${VERSION}" | sed 's/\([0-9]\)\.\([0-9][0-9]*\).*/\2/')"
- fi
+ MAJOR_VER="$(echo "${VERSION}" | sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\1/p')"
+ MINOR_VER="$(echo "${VERSION}" | sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\2/p')"
else
GITREV=Unknown
TIMESOURCE="date"
DATE=$(LANG="" LC_ALL=C TZ=UTC0 date +%s)
if [ -f "${COREBOOT_VERSION_FILE}" ]; then
- MAJOR_VER="$(sed 's/\([0-9]\)\.\([0-9][0-9]*\).*/\1/' "${COREBOOT_VERSION_FILE}")"
- MINOR_VER="$(sed 's/\([0-9]\)\.\([0-9][0-9]*\).*/\2/' "${COREBOOT_VERSION_FILE}")"
+ MAJOR_VER="$(sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\1/p' "${COREBOOT_VERSION_FILE}")"
+ MINOR_VER="$(sed -n 's/^0*\([0-9]*\)\.0*\([0-9]*\).*/\2/p' "${COREBOOT_VERSION_FILE}")"
fi
fi
@@ -84,8 +80,8 @@
printf "#define COREBOOT_ORIGIN_GIT_REVISION \"%s\"\n" "${GITREV}"
printf "#define COREBOOT_EXTRA_VERSION \"%s\"\n" "${COREBOOT_EXTRA_VERSION}"
-printf "#define COREBOOT_MAJOR_VERSION %s\n" "${MAJOR_VER}"
-printf "#define COREBOOT_MINOR_VERSION %s\n" "${MINOR_VER}"
+printf "#define COREBOOT_MAJOR_VERSION %s\n" "${MAJOR_VER:-0}"
+printf "#define COREBOOT_MINOR_VERSION %s\n" "${MINOR_VER:-0}"
printf "#define COREBOOT_BUILD \"%s\"\n" "$(our_date "${DATE}" "+%a %b %d %H:%M:%S %Z %Y")"
printf "#define COREBOOT_BUILD_YEAR_BCD 0x%s\n" "$(our_date "${DATE}" "+%y")"
printf "#define COREBOOT_BUILD_MONTH_BCD 0x%s\n" "$(our_date "${DATE}" "+%m")"
--
To view, visit https://review.coreboot.org/c/coreboot/+/81290?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie39381a8ef4b971556168b6996efeefe6adf2b14
Gerrit-Change-Number: 81290
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Attention is currently required from: Yu-Ping Wu.
Hello Yu-Ping Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81289?usp=email
to look at the new patch set (#3).
Change subject: libpayload: Include commonlib/helpers.h in libpayload.h for GPL builds
......................................................................
libpayload: Include commonlib/helpers.h in libpayload.h for GPL builds
This patch makes the GPL-restricted commonlib helpers available in
libpayload when CONFIG_LP_GPL is selected, as a convenience to GPL
payloads that use them a lot.
Cq-Depend: chromium:5375721
Change-Id: I844c6e700c4c0d557f97da94fa3aa2e868edd756
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M payloads/libpayload/include/libpayload.h
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/81289/3
--
To view, visit https://review.coreboot.org/c/coreboot/+/81289?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I844c6e700c4c0d557f97da94fa3aa2e868edd756
Gerrit-Change-Number: 81289
Gerrit-PatchSet: 3
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Yu-Ping Wu.
Hello Yu-Ping Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81289?usp=email
to look at the new patch set (#2).
Change subject: libpayload: Include commonlib/helpers.h in libpayload.h for GPL builds
......................................................................
libpayload: Include commonlib/helpers.h in libpayload.h for GPL builds
This patch makes the GPL-restricted commonlib helpers available in
libpayload when CONFIG_LP_GPL is selected, as a convenience to GPL
payloads that use them a lot.
Change-Id: I844c6e700c4c0d557f97da94fa3aa2e868edd756
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Cq-Depend: chromium:5375721
---
M payloads/libpayload/include/libpayload.h
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/89/81289/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/81289?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I844c6e700c4c0d557f97da94fa3aa2e868edd756
Gerrit-Change-Number: 81289
Gerrit-PatchSet: 2
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: newpatchset