[PATCH] RPi: Enable serial console on RPi 4 B

14 views
Skip to first unread message

Natalia Tasci

unread,
Apr 7, 2025, 11:46:52 AM4/7/25
to isar-...@googlegroups.com, Natalia Tasci
Tested with Raspbian Linux 12, baud rate of 115200 bps, 500 lines kernel
log.

Signed-off-by: Natalia Tasci <n...@ilbers.de>
---
meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt b/meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt
index 417d53f1..6d742f27 100644
--- a/meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt
+++ b/meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt
@@ -1,5 +1,11 @@
[pi3]
# Restore UART0/ttyAMA0 over GPIOs 14 & 15
+# On RPi 3, using mini UART for serial console is unstable.
+# 1/3 boots produce garbage and doesn't reach login
dtoverlay=miniuart-bt

+[pi4]
+# Enable mini UART (UART1/ttyS0) for serial console for RPi 4
+enable_uart=1
+
[all]
--
2.39.5

MOESSBAUER, Felix

unread,
Apr 7, 2025, 12:39:28 PM4/7/25
to n...@ilbers.de, isar-...@googlegroups.com
On Mon, 2025-04-07 at 16:47 +0200, Natalia Tasci wrote:
> Tested with Raspbian Linux 12, baud rate of 115200 bps, 500 lines
> kernel
> log.

I thought about this as well. We should also consider switching the
RPi4b target over to EFI, as done here:
https://github.com/siemens/mtda/commit/37b0349f59b1c608727907c771f047fb72003fa8

By that, things like the kernel cmdline can be done by the imager and
no longer need to come from bsp packages. This would also easily enable
the use of mount-by-uuid to support USB boot and SD boot at the same
time.

Felix
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany

Natalia Tasci

unread,
Apr 10, 2025, 6:19:20 AM4/10/25
to MOESSBAUER, Felix, isar-...@googlegroups.com
Hi Felix,

On 4/7/25 18:39, MOESSBAUER, Felix wrote:
> On Mon, 2025-04-07 at 16:47 +0200, Natalia Tasci wrote:
>> Tested with Raspbian Linux 12, baud rate of 115200 bps, 500 lines
>> kernel
>> log.
> I thought about this as well. We should also consider switching the
> RPi4b target over to EFI, as done here:
> https://github.com/siemens/mtda/commit/37b0349f59b1c608727907c771f047fb72003fa8
>
> By that, things like the kernel cmdline can be done by the imager and
> no longer need to come from bsp packages. This would also easily enable
> the use of mount-by-uuid to support USB boot and SD boot at the same
> time.

Thanks for the input. Doing this by the imager sounds reasonable. We
could consider the improvement after release.

With kind regards,

Natalia



> Felix
>
>> Signed-off-by: Natalia Tasci <n...@ilbers.de>
>> ---
>>  meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt
>> b/meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt
>> index 417d53f1..6d742f27 100644
>> --- a/meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt
>> +++ b/meta-isar/recipes-bsp/bootconfig-rpi/files/config.txt
>> @@ -1,5 +1,11 @@
>>  [pi3]
>>  # Restore UART0/ttyAMA0 over GPIOs 14 & 15
>> +# On RPi 3, using mini UART for serial console is unstable.
>> +# 1/3 boots produce garbage and doesn't reach login
>>  dtoverlay=miniuart-bt
>>
>> +[pi4]
>> +# Enable mini UART (UART1/ttyS0) for serial console for RPi 4
>> +enable_uart=1
>> +
>>  [all]
>> --
>> 2.39.5

--
Natalia Tasci
ilbers GmbH
Maria-Merian-Str. 8
D-85521, Ottobrunn
+49 (89) 122 67 24-2
http://ilbers.de/
Amtsgericht München, HRB 214197
Geschäftsführer: Baurzhan Ismagulov

Uladzimir Bely

unread,
Apr 15, 2025, 3:01:46 AM4/15/25
to Natalia Tasci, isar-...@googlegroups.com
On Mon, 2025-04-07 at 16:47 +0200, Natalia Tasci wrote:
Applied to next.

--
Best regards,
Uladzimir.


Reply all
Reply to author
Forward
0 new messages