When RPI_USE_U_BOOT is set to 1 in conf/local.conf, if enable_uart is not set to 1 in config.txt then the board won't boot (Resolves agherzan/meta-raspberrypi#1189).
- What I did
Add a new section to check the requirement related to enable_uart=1 in the recipe which generates the system parameters aka config.txt file.
I've added a new section to keep the code readable because I also check if enable_uart has been set through ENABLE_UART environment variable. Indeed, I tried to avoid duplicating lines in config.txt and above all I tried to detect opposing configuration i.e. ENABLE_UART = "0" vs enable_uart=1.
-What is missing
The specific raspberry pi 2 case and its specific dtoverlay=pi3-miniuart-bt configuration is not handled.
-Tests performed
I've rebuilt my image for RPi4-64 with the following configurations:
RPI_USE_U_BOOT = "1" / ENABLE_UART = "1" => OK (single line enable_uart=1 in config.txt)
RPI_USE_U_BOOT = "1" / ENABLE_UART not set => OK
RPI_USE_U_BOOT = "1" / ENABLE_UART = "0" => OK (got a build failure => do_deploy: Invalid configuration: RPI_USE_U_BOOT requires to enable UART in config.txt for raspberrypi-armv8)
RPI_USE_U_BOOT = "0" / ENABLE_UART = "1" => OK
RPI_USE_U_BOOT = "1" / ENABLE_UART not set => OK (no enable_uart in config.txt)
Summary
- What I did
enable_uart=1
in the recipe which generates the system parameters akaconfig.txt
file.enable_uart
has been set throughENABLE_UART
environment variable. Indeed, I tried to avoid duplicating lines inconfig.txt
and above all I tried to detect opposing configuration i.e.ENABLE_UART = "0"
vsenable_uart=1
.-What is missing
The specific raspberry pi 2 case and its specific
dtoverlay=pi3-miniuart-bt
configuration is not handled.-Tests performed
enable_uart=1
in config.txt)do_deploy: Invalid configuration: RPI_USE_U_BOOT requires to enable UART in config.txt for raspberrypi-armv8
)enable_uart
in config.txt)