How do I customize the splashscreen image in U-boot?

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I customize the splashscreen image in U-boot?

Jump to solution
9,760 Views
micschrag
Contributor IV

Device info:

     Processor: iMX6Q (Dual Core Version)

     Uboot Version: 2009.08

     BSP Version: Freescale Android BSP for KitKat 4.4.2_r1

I am trying to customize the splashscreen within U-boot, but have run into a problem: Whenever I put in a custom splashscreen, the screen appears blank. Here is an explanation of what processes I have tried so far.

After a bit of research, I came across a thread that had the following manual outlining a process for setting up my splashscreen: https://community.freescale.com/servlet/JiveServlet/download/320516-257543/uboot_mx6x.pdf (section 5.4). After successfully implementing steps 1 and 2 (enabling and setting variables), I was able to see the default Freescale splashscreen (the one I had seen on a development board I have).Now, I proceeded to step 3, and downloaded a 600x400 .jpeg file, converted it to .bmp by editing it in MS Paint, and got the bin2txt.py tool (https://community.freescale.com/docs/DOC-93833), then converted my bmp image using the tool. Here is where there might be an issue: the tool converted my file into a .h file. When I compared this .h file with the Freescale .c file, i noticed that there was little difference besides the declaration of the array, and a logo_size method. I added these items, and added the .o file into the Makefile. Now, I backed up the Freescale splashscreen file, and copied my .c file over the old file. When I rebooted the device, the splashscreen was blank. Here is the debug I have attempted:

All of these changes have been made using a clean build.

1. I tried a different image to make sure there wasn't an error with the one I was using.

2. I tried saving the file in 16 color bmp format instead

3. I tried editing /board/freescale/mx6q_sabresd/mx6q_sabresd.c, and changed the following code items (and they are the same name as the constant items in the my_logo.c file)

    

     #ifdef CONFIG_VIDEO_MX5

     extern unsigned char my_logo[];

     extern int my_logo_size;

     extern int g_ipu_hw_rev;

and

     if (s != NULL) {

          addr = simple_strtoul(s, NULL, 16);

     #if defined(CONFIG_ARCH_MMU)

          addr = ioremap_nocache(iomem_to_phys(addr), my_logo_size);

     #endif

          memcpy((char *)addr, (char *)my_logo, my_logo_size);

     }

All of these changed ended up producing the same result: a blank screen with no logo appearing. I have one more item to test: trying to grab a bmp without the paint conversion, but then I am out of ideas.

Labels (4)
1 Solution
1,377 Views
micschrag
Contributor IV

Lei,

I am finally able to display a custom splashscreen, and here is the information I needed to do so:

1. Make a 600x400 bmp, and save as 8bpp (256 color).

     This step was where I was having an issue. I found that I needed an 8 bit depth bmp by digging through the u-boot source code (uboot-imx/include/configs/mx6dl_sabresd.h)

2. Convert the bmp to a c header file by running the bin2txt.py tool (see above).

3. Change the header file into a c file by adding a few lines to it (make it a const and add a size function to the bottom).

     An example can be found in the fsl_bmp-600x400.c file (uboot-imx/board/freescale/common/)

4. Add the call for the new splashscreen to the MakeFile (uboot-imx/board/freescale/common/).

5. (If Needed) Change the references to the fsl splashscreen to our custom one in uboot-imx/board/freescale/mx6q_sabresd/mx6q_sabresd.c

6. Perform a clean build. These changes should be present in your next set of images.

Thanks for the help,

Michael

View solution in original post

7 Replies
1,377 Views
leiwang111
Contributor I

Michael,

Yes, you can customize the u-Boot splash screen.

And I think that you were taking the right approach. However I don't see that you modified the /board/freescale/common/Makefile to include your my_logo.c file.

You could do something like:

-COBJS-${CONFIG_VIDEO_MX5}+= fsl_bmp_600x400.o fsl_bmp_reversed_600x400.o
+COBJS-${CONFIG_VIDEO_MX5}+= fsl_bmp_600x400.o fsl_bmp_reversed_600x400.o my_logo.o

Hope this helps!

Lei

0 Kudos
1,377 Views
micschrag
Contributor IV

Lei,

Please refer to my initial description "I added these items, and added the .o file into the Makefile". This portion of my description covers that process.

Michael

0 Kudos
1,377 Views
leiwang111
Contributor I

Michael,

I miss-read your post.

What board are you working with? Is it a SabreSD board or a custom board. I don't think SabreSD board display u-Boot splashscreen by default. Some environment variables need to be added.

Also since you don't have problem displaying the default splashscreen (I believe it is fsl_bmp_600x400.c or Sabre). I think one easy thing to try is to replace the array content (const unsigned char fsl_bmp_600x400[] ) with what you generated without change the variable names and anything else. Or even better just partially replacing elements of that big array (with equal number of elements of course) to see if you can see any change in the displayed splash image. Those elements just simply map to each pixel in 8-bit color format of your image.

That might give you some hint with what is going on. I had no problem to customize the u-Boot splashscreen at all.

Regards,

Lei

0 Kudos
1,378 Views
micschrag
Contributor IV

Lei,

I am finally able to display a custom splashscreen, and here is the information I needed to do so:

1. Make a 600x400 bmp, and save as 8bpp (256 color).

     This step was where I was having an issue. I found that I needed an 8 bit depth bmp by digging through the u-boot source code (uboot-imx/include/configs/mx6dl_sabresd.h)

2. Convert the bmp to a c header file by running the bin2txt.py tool (see above).

3. Change the header file into a c file by adding a few lines to it (make it a const and add a size function to the bottom).

     An example can be found in the fsl_bmp-600x400.c file (uboot-imx/board/freescale/common/)

4. Add the call for the new splashscreen to the MakeFile (uboot-imx/board/freescale/common/).

5. (If Needed) Change the references to the fsl splashscreen to our custom one in uboot-imx/board/freescale/mx6q_sabresd/mx6q_sabresd.c

6. Perform a clean build. These changes should be present in your next set of images.

Thanks for the help,

Michael

View solution in original post

1,377 Views
micschrag
Contributor IV

The bmp without conversion did not work any better than my other attempts. I have rolled back the changes, and am now back from whence I have began.

0 Kudos
1,377 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Michael,

    you can refer to this post :

Patch to support uboot logo keep from uboot to kernel to Android for JB4.2.2_1.1.0-GA and L3.0.35_4....

Hope it can help you!

Regards,

weidong

0 Kudos
1,377 Views
micschrag
Contributor IV

Weidong,

Is there a newer version of this patch? If you read the device info carefully, we are using 4.4.2 (KitKat), and those patches are for 4.2.2 & 4.3.2 (Jelly Bean). Or is there no major changes within the kernel/uboot for 4.4.2?

Thanks,

Michael

0 Kudos