Boot Logo for SAM SOC's


This page describes to set a Boot Logo using U-boot.

U-boot Device tree changes.

if your using LCD Models TM7000, TM7000B and TM4301B then, change below display-timings in uboot/arch/arm/dts/<board-name>.dts in hlcdc device node.

                         hlcdc: hlcdc@f0000000 {
                               atmel,vl-bpix = <4>;
                               atmel,guard-time = <1>;
                               pinctrl-names = "default";
                               pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_pwm &pinctrl_lcd_rgb>;
                               status = "okay";

                              display-timings {
                                    480x272 {
                                            clock-frequency = <9000000>;
                                             hactive = <480>;
                                             vactive = <272>;
                                             hsync-len = <41>;
                                             hfront-porch = <2>;
                                             hback-porch = <2>;
                                             vfront-porch = <2>;
                                             vback-porch = <2>;
                                             vsync-len = <11>;

Displaying Boot Logo:

  1. By using BMP Command
  2. By including bmp file directly in u-boot binary

To use BMP command define CONFIG_CMD_BMP in uboot/include/configs/<Board-name>.h configuration file.

                        #define CONFIG_CMD_BMP

Enable HLCD display driver in U-boot using make menuconfig and Select Device Drivers ---> Graphics support --->. Finally build uboot binary using make command.


Below is an Example to display splash screen using BMP command from u-boot promt. In this example, we are copying a BMP image from a sdcard to DDR Address 0x22000000 and bmp display command copy bmp image from 0x2200000 to frame buffer memory address.

                       >fatload mmc 1:1 0x22000000 ; bmp display 0x22000000;

The another option is to store bmp image in a header file and build uboot binary including bmp header file. By default Microchip logo and text is already present in uboot/lib/at91/microchip_logo_8bpp.h. In case if you want to modify boot logo with different bmp image, replace unsigned char microchip_logo_8bpp[ ] array items in uboot/lib/at91/microchip_logo_8bpp.h file using hexdump application as shown below.

                      hexdump  -v -e '15/1 "0x%02X,  "  1/1  "  0x%02X, \n" '   file.bmp   >   bmp.txt

                      replace microchip_logo_8bpp[ ] array items with above generated bmp.txt file items

If you want to disable text content under Microchip logo, Comment out below two lines in the function video_show_board_logo_info in uboot/board/atmel/board_name/board_name.c file.

                            for (s = buf, i = 0; i < len; s++, i++)
                                   vidconsole_put_char(con, *s);

Linux Device tree changes for Boot Logo.

In the kernel, we need to reserve the uboot framebuffer memory to retain boot logo till Linux booting is complected. Add below code snippet to Linux device tree file to create a reserved-memory node. In this reserved-memory node, create a display_reserved end point with frame buffer memory address details used by uboot..

Note: In case of custom board with different memory size, framebuffer@3FD00000 memory location might change. This memory location can be obtained by enabling debug option in uboot menuconfig and print memory address on uboot console starting with Video frame buffers from or Refer video_reserve function in uboot/driver/video/Video-uclass.c file.

                    reserved-memory {
                               #address-cells = <1>;
                               #size-cells = <1>;

                               display_reserved: framebuffer@3FD00000 {
                               reg = <0x3FD00000 0x100000>;

Set memory-region property under hlcd device node as show in below (i.e. memory-region=<&display_reserved> )

                     hlcdc: hlcdc@f0000000 {
                             compatible = "atmel,sama5d4-hlcdc";
                             reg = <0xf0000000 0x4000>;
                             interrupts = <51 IRQ_TYPE_LEVEL_HIGH 0>;
                             clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
                             clock-names = "periph_clk","sys_clk", "slow_clk";
                             status = "disabled";

                             memory-region = <&display_reserved>;

Build the Kernel and make sure CONFIG_OF_RESERVED_MEM=y is set in kernel config.

while Linux booting, the Boot Logo screen will stay till the DRM device is gets configured by userspace application or /dev/fb0 emulation is created.

Topic attachments
I Attachment Action Size Date Who Comment
PNGpng BootLogo_menuconfig.png manage 90.9 K 2018-05-03 - 21:01 SandeepSheriker BootLogo_menuconfig
r9 - 02 Jun 2020 - 07:01:59 - EugenHristev
Linux & Open Source for AT91 Microchip Microprocessors

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Microchip® and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM