[RK3288][Android6.0] 关于uboot中logo相关知识点小结【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/76256224
Platform: Rockchip
OS: Android 6.0
Kernel: 3.10.92
遇到不少网友找不到uboot logo在哪里,其实一开始我也潜意识地去u-boot目录下去找,但是后来发现是在kernel目录下
加载顺序:
1.uboot开机的时候会先去logo分区加载
2.加载失败则尝试从resource分区加载
3.加载失败则尝试从boot分区加载
限制:
1. 只能显示偶数分辨率
2. 只能显示位深为8bit的bmp图片
3. 输入是24bit图片
制作: #convert -compress rle -colors 256 src.bmp logo.bmp
编译:
替换编译后是在resource.img或者boot.img(包含Resource.img的情况)中
代码调用:
int rk_bitmap_from_resource(unsigned short* fb)
{
const char* file_path = "logo.bmp";
return show_resource_image(file_path) ? 0 : -1;
}
bool show_resource_image(const char* 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)(unsigned long)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);
return false;
}
#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("Failed to load image:%s\n", image_path);
}
}
#endif
return ret;
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 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
参考:
Rockchip uboot开发指南_V3.7
[RK3288][Android6.0] 关于uboot中logo相关知识点小结【转】的更多相关文章
- [RK3288][Android6.0] 调试笔记 --- Goodix GT9和GT9F区别【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/78341425 Platform: RK3288 OS: Android 6.0 Kernel ...
- [RK3288][Android6.0] U-boot 启动流程小结【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/52536093 Platform: RK3288OS: Android 6.0Version: ...
- React及Nextjs相关知识点小结
React及Nextjs知识点小结 函数式组件和类组件区别是什么 1.函数式组件是用于创建无状态的组件,组件不会被实例化,无法访问this中的对象,无法访问生命周期方法,是无副作用的,相比于类组件函数 ...
- [RK3288][Android6.0] 调试笔记 --- 移除uboot和kernel开机logo【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/71600690 Platform: RockchipOS: Android 6.0Kernel ...
- [RK3288][Android6.0] Display驱动初始化流程小结【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/52584903 Platform: RK3288OS: Android 6.0Kernel: ...
- [RK3288][Android6.0] 调试笔记 --- 普通串口的添加 【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/54574073 标签: rk3288 串口添加 2017-01-16 14:52 1079 ...
- [RK3288][Android6.0] TS-ADC驱动流程小结【转】
本文转载自:https://blog.csdn.net/kris_fei/article/details/55045936 Platform: RK3288OS: Android 6.0Kernel: ...
- [RK3288][Android6.0] 调试笔记 --- 替换系统签名【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/55100299 Platform: RK3288OS: Android 6.0Kernel: ...
- [RK3288][Android6.0] 调试笔记 --- eMMC分区号和名字的对应【转】
本文转载自:http://blog.csdn.net/kris_fei/article/details/77318410 Platform: Rockchip OS: Android 6.0 Kern ...
随机推荐
- Spring拓展接口之BeanPostProcessor,我们来看看它的底层实现
前言 开心一刻 小明:“妈,我被公司开除了”,妈:“啊,为什么呀?”, 小明:“我骂董事长是笨蛋,公司召开高层会议还要起诉我”,妈:“告你诽谤是吧?”,小明:“不是,他们说要告我泄露公司机密” Bea ...
- Couchbase V(管理任务)
Couchbase V(管理任务) 多读写 在Couchbase2.1中支持硬盘多读些(Multi- Readers and Writers),一般双核4G服务默认3个thread 4核16G内存一个 ...
- mysql 递归查询父节点 和子节点
查父集合 --drop FUNCTION `getParentList` )) ) BEGIN ) default ''; ) default rootId; WHILE rootId is not ...
- python--如何在线上环境优雅的修改配置文件?
1.如何在线上环境优雅的修改配置文件? 原配置文件 #原配置文件 global log 127.0.0.1 local2 daemon maxconn 256 log 127.0.0.1 local2 ...
- python和搜索
# -*- coding: UTF-8 -*- import re # 搜索逻辑 def querylogic(list): query = {} if len(list) > 1 or len ...
- [codeforces722D]Generating Sets
[codeforces722D]Generating Sets 试题描述 You are given a set Y of n distinct positive integers y1, y2, . ...
- POJ 2375 Cow Ski Area【tarjan】
题目大意:一个W*L的山,每个山有个高度,当且仅当一个山不比它相邻(有公共边的格子)的山矮时能够滑过去,现在可以装化学电梯来无视山的高度滑雪,问最少装多少电梯使得任意两点都可到达 思路:最后一句话已经 ...
- Android应用的权限配置和权限列表
权限配置写在Mainifest.xml文件中: <?xml version="1.0" encoding="utf-8"?> <manifes ...
- C# 通过HTTP代理访问Socket来获取邮件
C# 通过HTTP代理访问Socket来获取邮件 关键穿透代理的代码(通过HTTP代理获取TcpClent) public class ClientHelper { public static Tcp ...
- Request获取Session的两种方式
1.无请求参数 public HttpSession getSession() 获取当前request关联的session,如果当前request没有session,创建一个session. 2.有请 ...