mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] efi: loader: fix format string for ARM32
@ 2026-06-11 21:14 Ahmad Fatoum
  2026-06-11 21:14 ` [PATCH 2/3] ARM: stm32mp: lxa: change stdout-path baud rate from 9600 to 115200 Ahmad Fatoum
  2026-06-11 21:14 ` [PATCH 3/3] ARM: stm32mp: enable useful options for the LXA Fairy Tux2 Ahmad Fatoum
  0 siblings, 2 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-06-11 21:14 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

size_t is an unsigned long on our ARM64, but an unsigned int on ARM32,
which causes a GCC warning when compiling this printf format string.

Switch to the appropriate %zx format specifier to fix this.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 efi/loader/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/efi/loader/boot.c b/efi/loader/boot.c
index adeb2ff337b3..adcfd96b4648 100644
--- a/efi/loader/boot.c
+++ b/efi/loader/boot.c
@@ -370,7 +370,7 @@ static efi_status_t EFIAPI efi_get_memory_map_ext(
 	r = efi_get_memory_map(memory_map_size, memory_map, map_key,
 			       descriptor_size, descriptor_version);
 
-	__EFI_PRINT("%sEFI: Exit: %s(%zu@%p, %p, 0x%lx@%p, %zu@%p, %u@%p): %u\n",
+	__EFI_PRINT("%sEFI: Exit: %s(%zu@%p, %p, 0x%zx@%p, %zu@%p, %u@%p): %u\n",
 		    __efi_nesting_dec(), __func__,
 		    *memory_map_size, memory_map_size, memory_map,
 		    *map_key, map_key, *descriptor_size, descriptor_size,
-- 
2.47.3




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ARM: stm32mp: lxa: change stdout-path baud rate from 9600 to 115200
  2026-06-11 21:14 [PATCH 1/3] efi: loader: fix format string for ARM32 Ahmad Fatoum
@ 2026-06-11 21:14 ` Ahmad Fatoum
  2026-06-15  8:16   ` (subset) " Sascha Hauer
  2026-06-11 21:14 ` [PATCH 3/3] ARM: stm32mp: enable useful options for the LXA Fairy Tux2 Ahmad Fatoum
  1 sibling, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2026-06-11 21:14 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The LXA boards are the only upstream STM32 boards that set
stdout-path = &uart* instead of explicitly specifying a baud rate.

This would mean the default of 9600 is used, but it goes unnoticed when
booting normally as barebox fixes up a console= line that includes a
baud rate.

When EFI booting GRUB however, GRUB will not pass along the console=
line and thus the board ends up with a 9600 baud Linux console,
confusing users.

A fix for this has been submitted upstream[1]. Until then, have the fix
in barebox as barebox will pass along its device tree when booting via
EFI.

[1]: https://lore.kernel.org/all/20260611-lxa-stdout-path-baudrate-v1-0-59b60a5069ff@pengutronix.de/

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/dts/stm32mp153c-lxa-fairytux2.dtsi | 2 ++
 arch/arm/dts/stm32mp157c-lxa-mc1.dts        | 2 ++
 arch/arm/dts/stm32mp15xc-lxa-tac.dtsi       | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/arch/arm/dts/stm32mp153c-lxa-fairytux2.dtsi b/arch/arm/dts/stm32mp153c-lxa-fairytux2.dtsi
index 701981358c68..d373ce04cf83 100644
--- a/arch/arm/dts/stm32mp153c-lxa-fairytux2.dtsi
+++ b/arch/arm/dts/stm32mp153c-lxa-fairytux2.dtsi
@@ -10,6 +10,8 @@ / {
 	barebox,deep-probe;
 
 	chosen {
+		stdout-path = "serial0:115200n8";
+
 		environment {
 			compatible = "barebox,environment";
 			device-path = &sdmmc2, "partname:barebox-environment";
diff --git a/arch/arm/dts/stm32mp157c-lxa-mc1.dts b/arch/arm/dts/stm32mp157c-lxa-mc1.dts
index 392194c20bd6..cfccb5207f43 100644
--- a/arch/arm/dts/stm32mp157c-lxa-mc1.dts
+++ b/arch/arm/dts/stm32mp157c-lxa-mc1.dts
@@ -14,6 +14,8 @@ aliases {
 	};
 
 	chosen {
+		stdout-path = "serial0:115200n8";
+
 		environment-sd {
 			compatible = "barebox,environment";
 			device-path = &sdmmc1, "partname:barebox-environment";
diff --git a/arch/arm/dts/stm32mp15xc-lxa-tac.dtsi b/arch/arm/dts/stm32mp15xc-lxa-tac.dtsi
index 6bd119a799e0..8c605fef2cbc 100644
--- a/arch/arm/dts/stm32mp15xc-lxa-tac.dtsi
+++ b/arch/arm/dts/stm32mp15xc-lxa-tac.dtsi
@@ -9,6 +9,8 @@ / {
 	barebox,deep-probe;
 
 	chosen {
+		stdout-path = "serial0:115200n8";
+
 		environment {
 			compatible = "barebox,environment";
 			device-path = &environment_emmc;
-- 
2.47.3




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ARM: stm32mp: enable useful options for the LXA Fairy Tux2
  2026-06-11 21:14 [PATCH 1/3] efi: loader: fix format string for ARM32 Ahmad Fatoum
  2026-06-11 21:14 ` [PATCH 2/3] ARM: stm32mp: lxa: change stdout-path baud rate from 9600 to 115200 Ahmad Fatoum
@ 2026-06-11 21:14 ` Ahmad Fatoum
  2026-06-11 21:21   ` [PATCH] fixup! " Ahmad Fatoum
  1 sibling, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2026-06-11 21:14 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The Fairy Tux 2 has a PCA953x I2C GPIO controller controlling some LEDs
as well as the reset to the dual role USB chip.

The USB-C port will be useful to boot installer images via EFI.

Enable support for these as well as other options that can prove useful.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/configs/stm32mp_defconfig | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/stm32mp_defconfig b/arch/arm/configs/stm32mp_defconfig
index 1d1b75fbb0a8..dab6dee6635d 100644
--- a/arch/arm/configs/stm32mp_defconfig
+++ b/arch/arm/configs/stm32mp_defconfig
@@ -11,7 +11,6 @@ CONFIG_MACH_PROTONIC_STM32MP1=y
 CONFIG_MACH_PROTONIC_STM32MP13=y
 CONFIG_MACH_PHYTEC_PHYCORE_STM32MP1=y
 CONFIG_THUMB2_BAREBOX=y
-CONFIG_ARM_BOARD_APPEND_ATAG=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_ARM_UNWIND=y
 CONFIG_NAME="stm32mp_defconfig"
@@ -24,7 +23,6 @@ CONFIG_MENU=y
 CONFIG_BOOTM_SHOW_TYPE=y
 CONFIG_BOOTM_VERBOSE=y
 CONFIG_BOOTM_INITRD=y
-CONFIG_BOOTM_OFTREE=y
 CONFIG_BOOTM_OFTREE_UIMAGE=y
 CONFIG_BLSPEC=y
 CONFIG_CONSOLE_ACTIVATE_NONE=y
@@ -39,6 +37,9 @@ CONFIG_PARTITION_DISK_EFI=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_REBOOT_MODE=y
 CONFIG_RESET_SOURCE=y
+CONFIG_FASTBOOT_SPARSE=y
+CONFIG_FASTBOOT_CMD_OEM=y
+CONFIG_EFI_LOADER=y
 CONFIG_CMD_DMESG=y
 CONFIG_LONGHELP=y
 CONFIG_CMD_IOMEM=y
@@ -62,6 +63,8 @@ CONFIG_CMD_SAVEENV=y
 CONFIG_CMD_FILETYPE=y
 CONFIG_CMD_LN=y
 CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_FIPTOOL=y
+CONFIG_CMD_FIPTOOL_WRITE=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_LET=y
 CONFIG_CMD_MSLEEP=y
@@ -91,6 +94,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_LED=y
 CONFIG_CMD_POWEROFF=y
 CONFIG_CMD_SPI=y
+CONFIG_CMD_USBGADGET=y
 CONFIG_CMD_WD=y
 CONFIG_CMD_BAREBOX_UPDATE=y
 CONFIG_CMD_OF_DIFF=y
@@ -105,12 +109,12 @@ CONFIG_NET_FASTBOOT=y
 CONFIG_OF_BAREBOX_DRIVERS=y
 CONFIG_AIODEV=y
 CONFIG_STM32_ADC=y
-CONFIG_STM32_QSPI=y
 CONFIG_DRIVER_SERIAL_STM32=y
 CONFIG_DRIVER_NET_DESIGNWARE_STM32=y
 CONFIG_AT803X_PHY=y
 CONFIG_MICREL_PHY=y
 CONFIG_REALTEK_PHY=y
+CONFIG_STM32_QSPI=y
 CONFIG_DRIVER_SPI_STM32=y
 CONFIG_I2C=y
 CONFIG_I2C_STM32=y
@@ -126,6 +130,7 @@ CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_DFU=y
 CONFIG_USB_GADGET_SERIAL=y
 CONFIG_USB_GADGET_FASTBOOT=y
+CONFIG_USB_GADGET_MASS_STORAGE=y
 CONFIG_VIDEO=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_DRIVER_VIDEO_FB_SSD1307=y
@@ -158,7 +163,9 @@ CONFIG_PWM=y
 CONFIG_PWM_STM32=y
 CONFIG_HWRNG=y
 CONFIG_HWRNG_STM32=y
+CONFIG_GPIO_PCA953X=y
 CONFIG_STM32_BSEC=y
+CONFIG_STM32_BSEC_WRITE=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED=y
 CONFIG_REGULATOR_STM32_PWR=y
-- 
2.47.3




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] fixup! ARM: stm32mp: enable useful options for the LXA Fairy Tux2
  2026-06-11 21:14 ` [PATCH 3/3] ARM: stm32mp: enable useful options for the LXA Fairy Tux2 Ahmad Fatoum
@ 2026-06-11 21:21   ` Ahmad Fatoum
  0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-06-11 21:21 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

ARM: stm32mp: enable resize command

The Debian CDROM installer resizes the terminal and rebooting into
barebox may fix the viewport at a smaller size than what the terminal
has.

Enable the resize command to allow users to make use of the full
terminal width again easily.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/arm/configs/stm32mp_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/stm32mp_defconfig b/arch/arm/configs/stm32mp_defconfig
index dab6dee6635d..e1aef7c86fc0 100644
--- a/arch/arm/configs/stm32mp_defconfig
+++ b/arch/arm/configs/stm32mp_defconfig
@@ -74,6 +74,7 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_MIITOOL=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TFTP=y
+CONFIG_CMD_RESIZE=y
 CONFIG_CMD_ECHO_E=y
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_MENU=y
-- 
2.47.3




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: (subset) [PATCH 2/3] ARM: stm32mp: lxa: change stdout-path baud rate from 9600 to 115200
  2026-06-11 21:14 ` [PATCH 2/3] ARM: stm32mp: lxa: change stdout-path baud rate from 9600 to 115200 Ahmad Fatoum
@ 2026-06-15  8:16   ` Sascha Hauer
  0 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2026-06-15  8:16 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Thu, 11 Jun 2026 23:14:21 +0200, Ahmad Fatoum wrote:
> The LXA boards are the only upstream STM32 boards that set
> stdout-path = &uart* instead of explicitly specifying a baud rate.
> 
> This would mean the default of 9600 is used, but it goes unnoticed when
> booting normally as barebox fixes up a console= line that includes a
> baud rate.
> 
> [...]

Applied, thanks!

[2/3] ARM: stm32mp: lxa: change stdout-path baud rate from 9600 to 115200
      https://git.pengutronix.de/cgit/barebox/commit/?id=5b2e2a7d2066 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-15  8:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-11 21:14 [PATCH 1/3] efi: loader: fix format string for ARM32 Ahmad Fatoum
2026-06-11 21:14 ` [PATCH 2/3] ARM: stm32mp: lxa: change stdout-path baud rate from 9600 to 115200 Ahmad Fatoum
2026-06-15  8:16   ` (subset) " Sascha Hauer
2026-06-11 21:14 ` [PATCH 3/3] ARM: stm32mp: enable useful options for the LXA Fairy Tux2 Ahmad Fatoum
2026-06-11 21:21   ` [PATCH] fixup! " Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox