[PATCH 16/16] ARM: stm32mp: dk2: enable MIPI-DSI display by default

Ahmad Fatoum a.fatoum at barebox.org
Thu Jun 5 14:07:26 PDT 2025


Now that all drivers are in place, let's enable them in the defconfig
and have barebox show a barebox prompt by default when run on the DK2.

If logo support is enabled, the logo is shown instead, but this is not
enabled here as not to require an imagemagick dependency for the
defconfig.

One way around that would be to have S_shipped logos checked into the
source tree, but that's a task for another day.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 arch/arm/boards/stm32mp15xx-dkx/Makefile       |  1 +
 arch/arm/boards/stm32mp15xx-dkx/board.c        |  3 +++
 .../defaultenv-stm32mp15xx-dkx/init/splash     | 18 ++++++++++++++++++
 arch/arm/configs/stm32mp_defconfig             | 18 ++++++++++++------
 4 files changed, 34 insertions(+), 6 deletions(-)
 create mode 100755 arch/arm/boards/stm32mp15xx-dkx/defaultenv-stm32mp15xx-dkx/init/splash

diff --git a/arch/arm/boards/stm32mp15xx-dkx/Makefile b/arch/arm/boards/stm32mp15xx-dkx/Makefile
index 5678718188b9..88b1faf193bc 100644
--- a/arch/arm/boards/stm32mp15xx-dkx/Makefile
+++ b/arch/arm/boards/stm32mp15xx-dkx/Makefile
@@ -2,3 +2,4 @@
 
 lwl-y += lowlevel.o
 obj-y += board.o
+bbenv-y += defaultenv-stm32mp15xx-dkx
diff --git a/arch/arm/boards/stm32mp15xx-dkx/board.c b/arch/arm/boards/stm32mp15xx-dkx/board.c
index d693bf2aaf68..3ef5a6f38d46 100644
--- a/arch/arm/boards/stm32mp15xx-dkx/board.c
+++ b/arch/arm/boards/stm32mp15xx-dkx/board.c
@@ -3,6 +3,7 @@
 #include <init.h>
 #include <mach/stm32mp/bbu.h>
 #include <deep-probe.h>
+#include <envfs.h>
 
 static int dkx_probe(struct device *dev)
 {
@@ -17,6 +18,8 @@ static int dkx_probe(struct device *dev)
 
 	barebox_set_hostname("stm32mp15xx-dkx");
 
+	defaultenv_append_directory(defaultenv_stm32mp15xx_dkx);
+
 	return 0;
 }
 
diff --git a/arch/arm/boards/stm32mp15xx-dkx/defaultenv-stm32mp15xx-dkx/init/splash b/arch/arm/boards/stm32mp15xx-dkx/defaultenv-stm32mp15xx-dkx/init/splash
new file mode 100755
index 000000000000..922431eb916e
--- /dev/null
+++ b/arch/arm/boards/stm32mp15xx-dkx/defaultenv-stm32mp15xx-dkx/init/splash
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if [ -e /dev/fb0 ]; then
+        fb0.enable=1
+fi
+
+if [ -d /logo ]; then
+        for logo in /logo/*; do
+                splash $logo
+                exit
+        done
+fi
+
+# No logo, so let's show console instead
+if [ -e /dev/fbconsole0-1 ]; then
+        fbconsole0.font=7x14
+        fbconsole0.active=ioe
+fi
diff --git a/arch/arm/configs/stm32mp_defconfig b/arch/arm/configs/stm32mp_defconfig
index 366c9430d551..20955b3f6b80 100644
--- a/arch/arm/configs/stm32mp_defconfig
+++ b/arch/arm/configs/stm32mp_defconfig
@@ -9,16 +9,13 @@ CONFIG_MACH_STM32MP15X_EV1=y
 CONFIG_MACH_PROTONIC_STM32MP1=y
 CONFIG_MACH_PROTONIC_STM32MP13=y
 CONFIG_MACH_PHYTEC_PHYCORE_STM32MP1=y
-CONFIG_BOARD_GENERIC_DT=y
 CONFIG_THUMB2_BAREBOX=y
 CONFIG_ARM_BOARD_APPEND_ATAG=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_ARM_UNWIND=y
 CONFIG_MMU=y
 CONFIG_MALLOC_SIZE=0x0
-CONFIG_MALLOC_TLSF=y
 CONFIG_KALLSYMS=y
-CONFIG_RELOCATABLE=y
 CONFIG_HUSH_FANCY_PROMPT=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
@@ -77,6 +74,8 @@ CONFIG_CMD_EDIT=y
 CONFIG_CMD_MENU=y
 CONFIG_CMD_MENU_MANAGEMENT=y
 CONFIG_CMD_MENUTREE=y
+CONFIG_CMD_SPLASH=y
+CONFIG_CMD_FBTEST=y
 CONFIG_CMD_READLINE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_CRC=y
@@ -114,7 +113,6 @@ CONFIG_I2C=y
 CONFIG_I2C_STM32=y
 CONFIG_MTD=y
 CONFIG_MTD_M25P80=y
-CONFIG_MTD_SST25L=y
 CONFIG_USB_HOST=y
 CONFIG_USB_DWC2_HOST=y
 CONFIG_USB_DWC2_GADGET=y
@@ -126,10 +124,13 @@ CONFIG_USB_GADGET_DFU=y
 CONFIG_USB_GADGET_SERIAL=y
 CONFIG_USB_GADGET_FASTBOOT=y
 CONFIG_VIDEO=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_DRIVER_VIDEO_FB_SSD1307=y
 CONFIG_DRIVER_VIDEO_STM32_LTDC=y
+CONFIG_DRIVER_VIDEO_STM32_DSI=y
 CONFIG_DRIVER_VIDEO_BACKLIGHT=y
 CONFIG_DRIVER_VIDEO_SIMPLE_PANEL=y
+CONFIG_DRIVER_VIDEO_PANEL_ORISETECH_OTM8009A=y
 CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 CONFIG_MCI_MMC_BOOT_PARTITIONS=y
@@ -173,11 +174,16 @@ CONFIG_FS_TFTP=y
 CONFIG_FS_NFS=y
 CONFIG_FS_FAT=y
 CONFIG_FS_FAT_WRITE=y
-CONFIG_FS_FAT_LFN=y
 CONFIG_FS_PSTORE=y
 CONFIG_FS_PSTORE_CONSOLE=y
 CONFIG_FS_PSTORE_RAMOOPS=y
 CONFIG_FS_SQUASHFS=y
 CONFIG_FS_RATP=y
-CONFIG_ZLIB=y
 CONFIG_CRC8=y
+CONFIG_BMP=y
+CONFIG_PNG=y
+CONFIG_QOI=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_7x14=y
+CONFIG_FONT_MINI_4x6=y
+CONFIG_FONT_TER16x32=y
-- 
2.39.5




More information about the barebox mailing list