From ecc31a594c9f467d8b6eb5f0f94d9f749b862519 Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Sat, 13 Nov 2021 23:47:57 +0000 Subject: rpi-config: Take into consideration ENABLE_UART value of 0 Also, validate if the value of it is not 0 or 1. Fixes: https://github.com/agherzan/meta-raspberrypi/issues/567 Signed-off-by: Andrei Gherzan --- recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb index 13a0714..fe18884 100644 --- a/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/recipes-bsp/bootfiles/rpi-config_git.bb @@ -174,9 +174,11 @@ do_deploy() { fi # UART support - if [ "${ENABLE_UART}" = "1" ]; then + if [ "${ENABLE_UART}" = "1" ] || [ "${ENABLE_UART}" = "0" ] ; then echo "# Enable UART" >>$CONFIG - echo "enable_uart=1" >>$CONFIG + echo "enable_uart=${ENABLE_UART}" >>$CONFIG + else + bbfatal "Invalid value for ENABLE_UART [${ENABLE_UART}]. The value for ENABLE_UART can be 0 or 1." fi # Infrared support -- cgit v1.2.3-54-g00ecf