util/abuild: Fix building ChromeOS boards
The commit49ae935b37("util/abuild: Change [...] to [[...]] for consistency") [1] accidentally replaced "\>" with ">" in a grep pattern, causing all boards to be considered not supporting ChromeOS. The commitf66c7c1037("util/abuild: Update echo to printf for consistency") [2] replaced @echo $(foreach arch,$(REQUIRED_ARCHES),\ $(if $(filter $(arch),$(SUBARCH_SUPPORTED)),,$(arch))) with @printf "%s\n" "$(foreach arch,$(REQUIRED_ARCHES),\ $(if $(filter $(arch),$(SUBARCH_SUPPORTED)),,$(arch)))" and caused an additional whitespace character to be printed when all required archs are supported. The result of the `missing_arches` shell variable would be " ", and hence the `[[ -n "$missing_arches" ]]` check would be wrong. Fix this by using `-z`. [1] CB:87367 [2] CB:87368 Change-Id: Ib77566e70ac8b3717f3b29433ce9ae0a1fc69cce Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/87708 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jakub "Kuba" Czapiga <czapiga@google.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Yidi Lin <yidilin@google.com>
This commit is contained in:
parent
62b823f69e
commit
c81b08c4ba
1 changed files with 2 additions and 2 deletions
|
|
@ -510,7 +510,7 @@ build_config()
|
|||
|
||||
export HOSTCC='gcc'
|
||||
|
||||
if [[ "${chromeos}" = true ]] && [[ "$(grep -c "^[[:space:]]*select[[:space:]]*MAINBOARD_HAS_CHROMEOS>" "${ROOT}/src/mainboard/${board_srcdir}/Kconfig")" -eq 0 ]]; then
|
||||
if [[ "${chromeos}" = true ]] && [[ "$(grep -c "^[[:space:]]*select[[:space:]]*MAINBOARD_HAS_CHROMEOS\>" "${ROOT}/src/mainboard/${board_srcdir}/Kconfig")" -eq 0 ]]; then
|
||||
printf "%s doesn't support ChromeOS, skipping.\n" "${BUILD_NAME}"
|
||||
return
|
||||
fi
|
||||
|
|
@ -598,7 +598,7 @@ EOF
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -n "${missing_arches}" ]]; then
|
||||
if [[ -z "${missing_arches}" ]]; then
|
||||
printf "skipping %s because we're missing compilers for (%s)\n" "${BUILD_NAME}" "${missing_arches}"
|
||||
return
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue