I.MX25 PDK U-boot SplashScreen

Document created by jesseg Employee on Jul 30, 2012Last modified by denisse_mendoza on Jun 19, 2015
Version 7Show Document
  • View in full screen mode

Splash Screen on U-boot for i.MX25 PDK

 

Having a bitmap on the LCD a few seconds after boot is a requirement on several embedded systems, u-Boot supports this feature. However, currently, the code provided on Freescale's BSP only implements support for the LCD controller on Linux. This page provides instructions to add support for the LCDC on the u-boot.

 

1 - Install Freescale i.MX25 BSP, SDK 1.7

 

It is available on www.freescale.com. If needed follow the getting started section instructions.

 

2 - Update u-boot source

 

After installing the BSP and running LTIB for the first time, it's time to update u-boot:

 

- Download u-Boot patch and spec file.

 

- Replace the file "u-boot.spec.in" located at <ltib_path>/config/platform/imx by the one downloaded

- Copy the "u-boot-2009.08-1273860148.patch" downloaded to /opt/freescale/pkgs

 

3 - Extract and rebuild u-boot

 

- To extract the source and aply the patch run:

<Ltib_path>$ ./ltib -p u-boot -m prep

 

- Now Build:    

<Ltib_path>$ ./ltib -p u-boot -m scbuild

  

After completing this step an u-Boot binary (u-boot.bin) will be saved at <ltib_path>/rpm/BUILD/u-boot-2009.08

 

4 - Program the SD card

 

Program a SD card with the new u-Boot binary and a bitmap image to be displayed. Insert the SD and run:     

$sudo dd if=<ltib_path>/rpm/BUILD/u-boot-2009.08/u-boot.bin of=/dev/mmcblk0 bs=512

 

"/dev/mmcblk0" should replaced according to your host, use "dmesg" after inserting the SD to find out where is the SD on your host. Unmount it before issuing the dd command.

 

$sudo dd if="your_image".bmp of=/dev/mmcblk0 bs=512 seek=608

 

 

Argument seek 608, skips the first 608 blocks of the SD (608x512) where the uboot is stored. If you need to relocate the image, update also the environment variable "splashimage_mmc_init_block", see step 6.

 

5 - Boot

 

Boot the image from the SD.

Personality Board settings:

  12345678

SW22 -> 00000000

SW21 -> 11000000

  

Debug Board settings:

SW5,6,7,8,9,10 -> OFF

  

  12345678

SW4 -> 10000001

Turn on the board and stop at u-boot prompt:

MX25 U-Boot >

 

6 - u-Boot environment variables

 

Update u-Boot environment variables for the splash screen to work:

 

The address in memory to load the splash screen from:

MX25 U-Boot > setenv splashimage 0x80800000 

The SD device on the board:

MX25 U-Boot > setenv splashimage_mmc_dev 0 

The block on the SD where the bitmap is stored, this must match the block on step 4.

MX25 U-Boot > setenv splashimage_mmc_init_block 0x260  

The amount in blocks to be read from the SD card, this depends on the bitmap size, i.e. for a 308278 bytes bitmap, 0x2B5 blocks are enough on a 512 bytes per block SD, (308278 / 512).

MX25 U-Boot > setenv splashimage_mmc_blkcnt 0x2b5 

The SD card block size in bytes:

MX25 U-Boot > setenv splashimage_mmc_blksize 512 

Save the environment variables:

MX25 U-Boot > saveenv 

Now reboot the board and you should see the splash screen on the LCD.

 

7 - Booting Linux

 

When Linux takes control of the board it initializes the LCD controller and Framebuffer again. To maintain the splash screen on the LCD you can replace the Linux Logo with the figure used for the splash screen, the side effect is a blink when Linux takes over the LCDC.

 

To achieve this, create a new image in Gimp and save it as ".ppm". Copy it to Linux "logo" folder <ltib_path>/rpm/BUILD/linux-2.6.31/drivers/video/logo Run:

$ ppmquant -mapfile clut_vga16.ppm "my_image.ppm" | pnmnoraw > logo_linux_vga16.ppm 

where: logo_linux_vga16.ppm is the current logo being used by Linux.

 

Recompile the kernel and boot it.

 

Attachments

    Outcomes