I.MX25 PDK U-boot SplashScreen

cancel
Showing results for 
Search instead for 
Did you mean: 

I.MX25 PDK U-boot SplashScreen

No ratings

I.MX25 PDK U-boot SplashScreen

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.

Labels (2)
Comments

Dear jesseg & Grant Whitacre,

I couldn't find the patch file, U-boot-splash.tar.gz ( u-boot.spec.in & u-boot-2009.08-1273860148.patch)

Where can I find the files?

No need to apply any additional patch if you use the U-boot from this tree:

http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/board/freescale/mx25_3stack/mx25_3sta...

Regards,

Fabio Estevam

Dear Fabio Estevam,

Thanks for your reference code.

I confirmed the operation in SD.

But I couldn't boot because of Kernel Verifying Check Fail when I used the Nand.

The error is like as below,

"Verifying Checksum ... Bad Data CRC"

What's the problem?

I don't have access to a mx25pdk at the moment, but on recent threads of this forum we see people reporting booting from NAND on mx25.

Please check that and start a new thread if needed.

Regards,

Fabio Estevam

I solved the problem.

I'll attach the modified files.

- added File

  . drivers/video/mx2fb.c

- modified Files

  . drivers/video/Makefile

  . common/Makefile

  . board/freescale/mx25_3stack/mx25_3stack.c

  . common/lcd.c

  . lib_arm/board.c

  . include/lcd.h

  . include/common.h

  . include/configs/mx25_3stack.h

- added u-boot environment

  . setenv splashimage 0x80800000

  . setenv splashimage_nand_init_addr 0x00100000

  . setenv splashimage_nand_size 0x00100000

- test Image

  . test_image_01_480x272.bmp.565

  . write test_image into Nandflash 0x100000

I couldn't attach the files.

Send the mail or memo to me, if you want to get the files.

Hi Eric,

Could you please share the modified source files.

With Regards,

Elango.S

Sorry for the late response.

I'm out of office now.

After coming back to my office, I'll send the files to you.

Have a nice day.

Dear Elango.S,

I'll send the files to you.

Could you give me your e-mail address?

I'll send the files if you send me your mail address.

Best Regards,

Eric.

Hi Eric,

How to avoid the blink effect When Linux takes control of the board ( I mean it initializes the LCD controller and Framebuffer again in linux).

If you have solution please do share with me.

Regards,

Elango.S

Hi Elango and Eric,

Anyone solved this blink effect when linux takes control of the board.I am avoiding the lcdc initialization and lcd initialization in kernel but how framebuffer initialization can be avoided ?

Please provide the input.

Regards,

Priti

Version history
Revision #:
2 of 2
Last update:
‎09-10-2020 02:46 AM
Updated by:
 
Contributors