How to show splash screen instead show booting output

Hello,
I am working with colibri imx7d platform. I am using 5.0.0 BSP version and I made my own image based on tdx-reference-multimedia-image.
When I turn on the system the display shows booting output but I need to show an splash screen instead. How can I do that?
I supposed that I have to make a recipe to do this.
Any idea that can help me.
Thanks.
Emmanuel

1 Like

Hi @emmaperea ,

Please take a look at this article.

On Yocto you will have to append some modifications into the kernel to add the splash screen, this question might help you on this task.

Best regards,
Daniel Morais

Hello Daniel,
Thanks for you reply.
I could disable console output with the setup u-boot variable.
I know that I have to set in kernel defconfig CONFIG_LOGO_CUSTOM_CLUT224=y.
I have 2 questions:
Where can I find the defconfig file that the image is using?
How can I set my custon defconfig? Because I try to patching /arch/arm/configs/colibri_imx7_defconfig but It dindn’t work because I dind in the platform:
root@colibri-imx7-emmc:/proc# zcat config.gz | grep LOGO
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y
and It seems patching is no aplied.
And I try to aplly my defconfig file in linux-toradex_5.4-2.3.x.bbappend , where I did

FILESPATH_prepend := “${THISDIR}/linux-toradex-5.4-2.3.x:”

SRC_URI +=
file://defconfig
"
KBUILD_DEFCONFIG_colibri_imx7 ?= “defconfig”

And bitbake print these warnings:
WARNING: linux-toradex-5.4.115+gitAUTOINC+dbdbcabf0f-r0 do_kernel_metadata: defconfig detected in WORKDIR. colibri_imx7_defconfig skipped
WARNING: linux-toradex-5.4.115+gitAUTOINC+dbdbcabf0f-r0 do_kernel_metadata: [NOTE]: defconfig was supplied both via KBUILD_DEFCONFIG and SRC_URI. Dropping SRC_URI defconfig

HI @emmaperea ,

Answering your questions:

Where can I find the defconfig file that the image is using?
A: Please take a look at this article.

How can I set my custon defconfig? Because I try to patching /arch/arm/configs/colibri_imx7_defconfig but It didn’t work because I did in the platf yorm:
A: The article mentioned above has instructions on how to download our kernel repository, to achieve what you want you need to download the repository, configure the defconfig as displayed in the article, then you can do the changes you want and generate a new defconfig, if you have issues on this step, please take a look at this question.

About the issue where yocto is dropping your defconfig, the variable KBUILD_DEFCONFIG_colibri_imx7 should work, can you please try to change from ?= to = and check if the warning is solved? Also please check this question for more information.

Best regards,
Daniel Morais

Hi @daniel_m.tx,
Reading Yocto documentation and a lot of posts that had the same issue that me(custom defconfig is not applied) the only thing thats worked was changing configuration with fragments
defconfig fragments
I made this config fragments:

CONFIG_LOGO=y
CONFIG_FB_LOGO_CENTERED=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
# CONFIG_LOGO_CUSTOM_CLUT224 is not set
CONFIG_LOGO_CUSTOM_CLUT224=y

I check the defconfig in build/.config and Its applied.
I made a recipie to copy my custom logo image in drivers/video/logo:

FILESPATH_prepend := "${THISDIR}/linux-toradex-5.4-2.3.x:"
SRC_URI += " \ 
             file://custom.cfg \
             file://myCustom_kernel_splash.ppm \
           "

do_configure_append() {
        cp "${WORKDIR}/myCustom_kernel_splash.ppm" "${WORKDIR}/git/drivers/video/logo/logo_custom_clut224.ppm"
}

COMPATIBLE_MACHINE = "(mx7)"

My custom logo is copied under drivers/video/logo as logo_custom_clut224.ppm.
But when I turn on the board I doesn’t show logo.
There is something else that I have to do? Do I have to tell to the system that the logo that has to show now is logo_custom_clut224.ppm in somwere else?
Regards,
Emmanuel

Hi @emmaperea ,

I’ve made some tests here following the steps provided at this question and it worked well, can you please try it and inform us of the result?

About your sources, it seems that everything is correct, did you pay attention to the resolution note on this topic?

Best regards,
Daniel Morais

Hi all.

I’m using colibri imx7d emmc 1gb an I’m not able to present any boot image nor psplash from yocto.

I follow your Splash Screen on the Linux Kernel | Toradex Developer Center but I can’t add my image to kernel, I’m only able to disable linux boot on display and I continue to see two penguins, but no image.

I tried also to install psplash ipk in my image, but I don’t see any psplash image nor progress bar…

Any idea?

Thanks a lot!

Hi @vbardelli,

As this ticket is already solved and it’s quite old, can you open a new ticket please?

Thanks!

Best Regards,
Hiago.

Hi hfranco.tx

thanks for your response

I will open a new ticket

1 Like

Hello @vbardelli,
I had to add the following defconfig configuration plus follow the steps of https://developer.toradex.com/linux-bsp/os-development/boot/splash-screen-on-the-linux-kernel/

CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y

After set config font the kernel logo show up.

Hi @emmaperea ! Thank you very much for your response!

Sorry for my late, but I tried some more tests in order to understand something more about this damned display… (you can see my tests in this ticket: St7789v tft display bring up on colibri imx7d )

Unfortunately at the moment I was able to see something on display (some print from kernel boot) only with driver loaded as a module, with kernel 4.9, for the moment. So, my first question to you is:

Do you use the driver as module or directly integrated into the kernel? And what is your kernel version?

Then, with the driver loaded as module, I tried to add my custom logo (but also standard linux logo, both colored or mono) to the kernel boot but I’m not able to see nothing, just some prints from boot.

I checked my .config and I already have CONFIG_FONT_8x8 and CONFIG_FONT_8x16 set to y.

Can you please be so kind to share your image logo? Just to test if the problem is my image?

Or there’s a way to test the image from cli using something similar that linux uses at boot?

I tried with: “cat linux_custom_clut224.ppm > /dev/fb0” but I only see some garbage on the display…

Any response from you would be really appreciated!

Thanks a lot!

gentle ping @emmaperea

Hi @vbardelli ,

Are you still facing the issue with the splash screen?

If you can see the two penguins and the Linux boot, you may also be able to see the splash screen if you do the correct changes on the Kernel. One point to verify is the dimension of the image you are trying to use, make sure that it is smaller than the resolution of the display, as described here.

If the comment above doesn’t solve the issue, since this ticket was already solved, can you please create a new question in our community?

Best regards,
Daniel Morais

Hi @daniel_m.tx , thanks for your response.

Yes. I’m still facing the issue with the linux splash screen with st7789v display.

At the moment I’m using the kernel 4.9, the only kernel with I’m able to use the display. But JUST with driver AS MODULE, NOT DIRECTLY compiled into the kernel.

I can’t see any penguin on display. JUST some print of kernel boot after some seconds (7s, more or less). So, I suppose that I start to see something AFTER that the display driver module was loaded. Probably this is why I don’t see the two penguins, I don’t know if this is the same problem also for splash screen: linux tries to load the splash screen BEFORE the display driver module is loaded…

What you wrote about the smaller resolution is totally new for me, I never see that in your web documentation, is this a new edit? In any case, with another display, on another board, with the same SOM and the same kernel, I can use the correct display resolution (not reduced), and it works.

In any case the dimensions of my display is 320x240, so, what do you suggest for smaller resolution? 291x211? Because, on the same page of your documentation you create an image of the SAME resolution of the screen, NOT reduced. I can try, but I don’t think that this is the problem…

I already create a new ticket about this problem, in particular about the problem to compile this display driver directly in the kernel:

I wrote also in this ticket because it seems that @emmaperea was able to setup the display and the splash, and I asked him some support about (in particular the kernel version and the device tree that he is using).

Thanks.

Valerio

Hi, sorry for the delay.
I list the steps that I had to do to show kernel logo:

  1. Create the 224 ppm format image as It is described in Splash Screen on the Linux Kernel | Toradex Developer Center

  2. I disabled framebuffer: Splash Screen on the Linux Kernel | Toradex Developer Center
    The framebuffer disbaled I made a patch to change it in u-boot:

diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
-		"console=tty1 console=${console}" \
-		",${baudrate}n8 ${memargs} consoleblank=0\0" \
+		"console=null console=${console}" \
+		",${baudrate}n8 ${memargs} consoleblank=0 vt.global_cursor_default=0\0" \
  1. I configured to show Custom 224-color Linux logo as default, I made the following kernel patch:
diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig
index d8e3a0c7c653..2e0e3e9f5f41 100644
--- a/drivers/video/logo/Kconfig
+++ b/drivers/video/logo/Kconfig
@@ -70,6 +70,6 @@ config LOGO_SUPERH_CLUT224
 
 config LOGO_CUSTOM_CLUT224
 	bool "Custom 224-color Linux logo"
-	default n
+	default y
 
 endif # LOGO
  1. Configure 8x8 and 8x16 fonts in defconfig:
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
  1. I made a bbappend to store my Custom logo into kernel sources:
# Copyright (c) 2021 Abelardo Cuffia S.A.

# If we use EXTRAFILESPATH_prepend, it does not work. So we use FILESPATH_prepend instead.
FILESPATH_prepend := "${THISDIR}/linux-toradex-5.4-2.3.x:"

unset KBUILD_DEFCONFIG

SRC_URI += " \
            file://defconfig \
            file://logo_custom_default.patch \
            file://Custom_kernel_splash.ppm \
	   "

SCMVERSION="n"
LOCALVERSION="-5.3.0-custom"

do_configure_append () {

	cp --no-preserve=ownership ${WORKDIR}/FGS_kernel_splash.ppm ${S}/drivers/video/logo/logo_custom_clut224.ppm
}

I hope that this help you to show you custom logo.
If you are seeing some print boot kernel maybe you are not disbaling framebuffer.

Regards,
Emmanuel

Hi all!

Now, finally, I’m able to integrate the st7789v “staging” driver directly into the kernel 4.9 (the kernel where the driver already works, as module). For the others that have the same problem with this driver, in this version of kernel, this is the part involved with this driver, in my devicetree:

&iomuxc {	
	pinctrl_disp_gpio: disp_gpio_muxgrp {
		fsl,pins = <
			MX7D_PAD_ECSPI2_SS0__GPIO4_IO23      0x14  // DIS_RST   @ SODIMM 65
			MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2  0x14  // DIS_D/CX  @ SODIMM 63
		>;
	};
};

&ecspi3 {
	status = "okay";
	
	mcp2515: can@0 {
		compatible = "microchip,mcp2515";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_can_int>;
		reg = <0>;
		clocks = <&clk16m>;
		interrupt-parent = <&gpio5>;
		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
		spi-max-frequency = <10000000>;
		status = "disabled";
	};

	spidev0: spidev@0 {
		compatible = "toradex,evalspi";
		reg = <0>;
		spi-max-frequency = <23000000>;
		status = "disabled";
	};

	display: display@0{
		compatible = "sitronix,st7789v";
	
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_disp_gpio>;
		
		reg = <0>;                                   // ECSPI3 has only one slave select
		spi-max-frequency = <24000000>;              // 48MHz
		buswidth = <8>;
		
		reset-gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;  // SODIMM pin 65
		dc-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;      // SODIMM pin 63
		
		width = <240>;
		height = <320>;
		rotate = <270>;                              // Rotate to landscape
		
		invert = <1>;              
		
		debug = <0x4000000>;                         // Print init commands to the kernel log

		status = "okay";				
	};
};

For the moment I integrated this part directly in imx7d-colibri-emmc-eval-v3.dts. Fort he moment, I also commented the same pins (that are in use) in imx7-colibri.dtsi, and, consequently, I commented ecspi3 in imx7-colibri-aster.dtsi (my devicetree is imx7d-colibri-emmc-eval-v3.dtb).

In this way I’m able to see the two penguins on the display!

Then I follow this instructions:

I create the boot logo with the the SAME dimension of the display: 320x240 (if I follow the “danger box”, and created an image 291x211, I just see a left and a bottom border, so I don’t really understand this box).

I leave the “framebuffer console support” in menuconfig, if I disabled this, I’m not able to see the splash screen.

Thanks to @emmaperea , to avoid the boot prints at the bottom, under my splash screen I change the “setup” u-boot env variable with:

Colibri iMX7 # print setup
setup=setenv setupargs console=null console=${console},${baudrate}n8 ${memargs} consoleblank=0
Colibri iMX7 # 

Then I’m finally able to see my splash screen!

The only problem is that I see the colors inverted (for example blue, instead of orange), also if I add inverted parameters in devicetree: it seems that this parameter is totally ignored. I’m investigating about this.

So, also for me, this ticket could be considered as solved, for kernel 5.4 and the drm part for st7789v driver, I continues the discussion on this other ticket:

Thank you very much @emmaperea for your support!

Regards, Valerio