From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jQd7905Csz2yjX for ; Fri, 13 Nov 2026 00:15:01 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jQd753tvPz2xN1 for ; Fri, 13 Nov 2026 00:14:57 +0000 (UTC) Received: from mout-b-201.mailbox.org (mout-b-201.mailbox.org [IPv6:2001:67c:2050:102:465::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bit raw public key) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.mailbox.org", Issuer "Thawte TLS RSA CA G1" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4jQd723qlqz46Y for ; Fri, 13 Nov 2026 00:14:54 +0000 (UTC) Authentication-Results: mail01.ipfire.org; dkim=pass header.d=mandelbit.com header.s=MBO0001 header.b=pX4pCSST; spf=pass (mail01.ipfire.org: domain of antonio@mandelbit.com designates 2001:67c:2050:102:465::201 as permitted sender) smtp.mailfrom=antonio@mandelbit.com; dmarc=none ARC-Seal: i=1; a=rsa-sha256; d=lists.ipfire.org; s=202003rsa; cv=none; t=1794528895; b=dkvElO+ooF9W64xD3D/iFE+bqx0li8s8RKHRZlNXdH7++I/xoG5pvtvC2csRdFODhh6Ycz bhrOFr7xJPj5252VTg1CDguaLCjxWKqyQmEcDetjSCVmLckoN0OLuOQb5UpS3GLEkE8nxh HaUC+Fss9eeNx+P0gIWvTCdNLq6w640JhvHs4VkH/yzI1fCFkaiOg5rYtJP8JNbxO8BVU4 X8Uy1mqFNx84+RKs5rpmsz1qNWgYH1oMUcoKqWOqqb/4k+Q3ucrLOu+T2i584zoBhYdpwO CVQ722xzqT/Z1eHMqTRNi13WRmz1BNmGqLmRgcmQRexOXfso789hWVLiaPa/0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1794528895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:dkim-signature; bh=LPclj8x70eOU0SgSytVM52w20xxwpv7oUHVvdZ6WbU0=; b=Iu7On5U7W/NPC05BqNHmRR5OEf5FcSwq5oQrVFIfEOyI614NCu25TL68w8lJL3v/Z9Xy10 ldAmTTSSRcLOgoqxg09oNPuCr8wNHx4j9ozJml8EzyH/ASVRmixPn/HUbD8aNKbtQbEnU6 FkjrBx84q99J6tkBftzFBZl7eNBzmcYi43BnecspDRawaFIDfve1QRyhFf/b6ceUNm4mrv YbWV1m1Lu/8imLUTt7d5ZaS5Jc8pHf6UcPN/FUrNGYgE/IZ1iEriEFP7PG27hMBofTv2LK lxkD5F3G1Q75cilwGtTd6tE7fsH4vc4JNn+HT4AMp0OBO6d9kPdSlrk2pUwu2w== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=mandelbit.com header.s=MBO0001 header.b=pX4pCSST; spf=pass (mail01.ipfire.org: domain of antonio@mandelbit.com designates 2001:67c:2050:102:465::201 as permitted sender) smtp.mailfrom=antonio@mandelbit.com; dmarc=none Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-201.mailbox.org (Postfix) with ESMTPS id 4jQd6v3F3bzLmMb; Fri, 13 Nov 2026 01:14:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1794528887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LPclj8x70eOU0SgSytVM52w20xxwpv7oUHVvdZ6WbU0=; b=pX4pCSST3Y9n+nCDjj7Nmg29qlo/ZXoCrj+fRtj78ycGBIC32rpHTiF3HIbD4KL/Nma4+L u0mPzyWV8jbyYGpmHriMDsUV3nlstsd4mYPxhCZsXSXGwucFbYDODHhNVEwzAL3lUp20Jb 3OgT6KitISO4HZh80eUkoYn6DkbyFBPoJGj9eBF+EqcLsUtaS9TlSrMB3PV1np4egBIjTo YiwJKQl2V50aV/TLHGt9LiB1zImAwGOO993/zwivmN6gYL/y2UCgoDwSRG6jUU1oYWuSWd 4k7sFFQi6hZI2drbBbvNFnOYQ68Y1pTWC3+QjLFaMOQlZVcCbjBRBeqk9o9Pfg== From: Antonio Quartulli To: development@lists.ipfire.org Cc: Antonio Quartulli Subject: [PATCH] u-boot: Fix serial console on Raspberry Pi 4 Date: Fri, 13 Nov 2026 01:14:43 +0100 Message-ID: <20261113001443.2118539-1-antonio@mandelbit.com> X-Mailer: git-send-email 2.56.0 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-8.35 / 11.00]; NEURAL_HAM(-3.00)[-1.000]; BAYES_HAM(-3.00)[100.00%]; R_DKIM_ALLOW(-1.51)[mandelbit.com:s=MBO0001]; MID_CONTAINS_FROM(1.00)[]; SPF_REPUTATION_HAM(-0.87)[-0.87337868210232]; DKIM_REPUTATION(-0.87)[-0.87337868210232]; R_MISSING_CHARSET(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:67c:2050::/48]; R_DKIM_ALIGNED(-0.10)[strict]; RCVD_IN_DNSWL_LOW(-0.10)[2001:67c:2050:b231:465::1:received]; MX_GOOD(-0.10)[mxext1.mailbox.org]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_NA(0.00)[mandelbit.com]; IP_REPUTATION_HAM(0.00)[asn: 199118(-0.35), country: DE(-0.01), ip: 2001:67c:2050:102::(0.00)]; DKIM_TRACE(0.00)[mandelbit.com:+]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:199118, ipnet:2001:67c:2050::/48, country:DE]; FROM_HAS_DN(0.00)[] X-Rspamd-Server: mail01.haj.ipfire.org X-Rspamd-Queue-Id: 4jQd723qlqz46Y X-Rspamd-Action: no action boot.cmd only selects the mini UART (ttyS1) for the Pi 3B/3B+ dtbs and falls back to ttyAMA0 on every other Pi. On boards with Bluetooth (4B, 400, 3A+, Zero 2 W) ttyAMA0 is the PL011 wired to the BT module, so the kernel console disappears after "Starting kernel ...". Pick the console from the stdout-path of the dtb being booted instead: serial1 is the mini UART on the pin header (ttyS1), serial0 the PL011. Fixes: #13052 Signed-off-by: Antonio Quartulli --- Notes: - The core update needs to ship /boot/boot.cmd and the regenerated /boot/boot.scr (built from boot.cmd by lfs/u-boot). I didn't touch the filelists. config/u-boot/boot.cmd | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/config/u-boot/boot.cmd b/config/u-boot/boot.cmd index 929d30862..924e34d01 100644 --- a/config/u-boot/boot.cmd +++ b/config/u-boot/boot.cmd @@ -48,19 +48,22 @@ if test "${board}" = "sunxi"; then fi; fi; +fatload ${boot_dev} ${boot_part} ${fdt_addr_r} dtb-${KVER}/${fdtfile}; + # Check if serial console is enabled if test "${SERIAL-CONSOLE}" = "ON"; then if test ${console} = ""; then if test "${board}" = "rpi"; then if test ${cpu} = "armv8"; then - if test "${fdtfile}" = "broadcom/bcm2837-rpi-3-b-plus.dtb"; then + # Use the UART the device tree routes to the pin header: + # serial1 is the mini UART (ttyS1), serial0 the PL011 (ttyAMA0) + setenv stdout_path; + fdt addr ${fdt_addr_r}; + fdt get value stdout_path /chosen stdout-path; + if test "${stdout_path}" = "serial1:115200n8"; then setenv console ttyS1,115200n8; else - if test "${fdtfile}" = "broadcom/bcm2837-rpi-3-b.dtb"; then - setenv console ttyS1,115200n8; - else - setenv console ttyAMA0,115200n8; - fi; + setenv console ttyAMA0,115200n8; fi; fi; else @@ -79,7 +82,6 @@ if test ${fdt_high} = ""; then fi; fatload ${boot_dev} ${boot_part} ${kernel_addr_r} vmlinuz-${KVER}; -fatload ${boot_dev} ${boot_part} ${fdt_addr_r} dtb-${KVER}/${fdtfile}; if test "${FDTCMDS}" = ""; then echo ; -- 2.56.0