[RK3288] [Android6.0] about Uboot logo related Knowledge point summary "Turn"

Source: Internet
Author: User
Tags bmp image

This article was reproduced from: http://blog.csdn.net/kris_fei/article/details/76256224

Platform:rockchip
Os:android 6.0
kernel:3.10.92

Met many netizens can not find Uboot logo where, in fact, initially I also subconsciously go to u-boot directory down to find, but later found in the kernel directory

Load Order:
1.uboot boot will first go to the logo partition loading
2. Load failure attempts to load from the resource partition
3. Load failure attempts to load from boot partition

Limitations:
1. Only even resolution can be displayed
2. Can only display a bit deep 8bit bmp picture
3. Input is 24bit picture

Production:
#convert -compress rle -colors 256 src.bmp logo.bmp

Compile:
Replace after compilation in Resource.img or Boot.img (with resource.img in the case)

Code calls:

int Rk_bitmap_from_resource (Unsignedshort* FB) {Constchar* File_path ="Logo.bmp";Return Show_resource_image (File_path)?0:-1;}BOOL Show_resource_image (Constchar* image_path) {BOOL ret =False#ifdef CONFIG_LCD bmp_image_t *bmp = NULL;Const disk_partition_t* PTN = get_disk_partition (logo_name); Resource_content image;memset (&image,0,sizeof (image));snprintf (Image.path,sizeof (Image.path),"%s", image_path);if (PTN) {printf"Find logo from partition%s\n", logo_name);#ifdef Config_direct_logo bmp = Lcd_get_buffer ();#else bmp = (void *) gd->arch.rk_boot_buf_addr;#endif read_storage (Ptn->start, BMP, Config_max_bmp_blocks); Debug"BMP image at 0x%p, sign:%c%c\n", BMP, bmp->header.signature[0], bmp->header.signature[1]); }if (PTN && bmp && bmp->header.signature[0] = =' B ' && bmp->header.signature[1] = =' M ') {debug ("%s:show logo.bmp from Logo partition\n", __func__); Lcd_display_bitmap_center ((uint32_t) (UnsignedLong) BMP); RET =True }else {if (Get_content (0, &image)) {Debug ("%s:show logo from resource or boot partition\n", __func__);int blocks = (image.content_size + block_size-1)/block_size;if (Image.content_size > Config_rk_boot_buffer_size) {fbterr ("Failed to BMP image too large,%d\n", image.content_size);ReturnFalse } #ifdef Config_direct_logo image.load_addr = Lcd_get_buffer ();  #else image.load_addr = (void *) Gd->arch.rk_boot_buf_addr; #endif if (!load_content_data (&image, 0, IMAGE.LOAD_ADDR, blocks)) {return FALSE;} fbtdbg ( "Try to show:%s\n", image_path); Lcd_display_bitmap_center ((uint32_t) (unsigned long) image.load_addr); ret = true;} else {fbterr ( #endif return ret;}       
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21st
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62

Reference:
Rockchip Uboot Development Guide _v3.7

[RK3288] [Android6.0] about Uboot logo related Knowledge point summary "Turn"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.