SSD202D-kernel-uimage后面加入dtb_旋风旋风的博客-CSDN博客
1.由于内核的uimage老是压缩解压缩,拿到压缩包里面dtb实在困难;
2.把dtb烧在后面又有安全隐患;而且还会有打包升级方法ota之类的很多;又毙掉了,
3.最后直接把dtb放在logo的包里,但是logo包要想添加好,也要深刻的理解
于是没办法,我还是往logo分区里面加,硬着头皮
logo的形成:
logo是在make image的时候跑了以下代码
//project/image/image.mklogo_nofsimage:@echo [[$@]]$(PROJ_ROOT)/image/makefiletools/bin/dispcfggen -c -o $(logo$(RESOUCE))_202d -p $(LOGO_ADDR) -s $(BOOTLOGO_BUFSIZE) -d $(DISP_OUT_NAME)$(PROJ_ROOT)/image/makefiletools/bin/logogen -a -i $(PROJ_ROOT)/board/ini/misc/$(BOOTLOGO_FILE) -o $(logo$(RESOUCE))_202d$(PROJ_ROOT)/image/makefiletools/bin/logogen -a -i $(PROJ_ROOT)/board/ini/misc/upgrade.jpg -o $(logo$(RESOUCE))_202d
看似简单,实则涉及到dispcfggen和logogen
深度剖析
dispcfggen : -c 创建一个总头部 -o 输出文件 -p 地址 -s 空间大小 -d 屏名字
logogen : -a 添加到固件包里面 -i 输入文件 -o 输出文件
编译可以看到
[[logo_nofsimage]]
/home/sdk/project/image/makefiletools/bin/dispcfggen -c -o /home/sdk/project/image/o utput/images/logo_202d -p 0x7c00000 -s 0x300000 -d TM070RDH13
LOGO header size 56
First use: TM070R
Insert disp name: TM070RDH13
Disp header size (308) mhal pnl para size(192) spi cmd size(0)
Insert disp name: TM101
Disp header size (308) mhal pnl para size(192) spi cmd size(0)
Insert disp name: G101S
Disp header size (308) mhal pnl para size(192) spi cmd size(0)
Insert disp name: M101G
Disp header size (308) mhal pnl para size(192) spi cmd size(0)
Insert disp name: NV156
Disp header size (308) mhal pnl para size(192) spi cmd size(0)
Insert disp name: G215H
Disp header size (308) mhal pnl para size(192) spi cmd size(194)
Insert disp name: ZW_T101
Disp header size (308) mhal pnl para size(192) spi cmd size(0)
Insert disp name: HIB070
Disp header size (308) mhal pnl para size(192) spi cmd size(0)
Insert disp name: TS-B0700
Disp header size (308) mhal pnl para size(192) spi cmd size(14)
Data count 9, total size 2984(0xba8), first use addr 72(0x48)
dipslay_start=0x07c00000
dipslay_size=0x00300000
/home/sdk/project/image/makefiletools/bin/logogen -a -i /home/sdk/project/board/ini/ misc/logo.jpg -o /home/sdk/project/image/output/images/logo_202d
Ready to open logo file /home/sdk/work/project/board/ini/misc/logo.jpg
Get file size 3653 sub head size 44
/home/sdk/project/image/makefiletools/bin/logogen -a -i /home/sdk/project/board/ini/ misc/upgrade.jpg -o /home/sdk/project/image/output/images/logo_202d
Ready to open logo file /home/sdk/project/board/ini/misc/upgrade.jpg
Get file size 14485 sub head size 44
具体的dispcfggen和logogen是在
这几条命令生成的;通过上面的代码可以读出生成的逻辑
大致就是这样子,设计思路就是添加dtb,然后头部直接动态跳到dtb地址获取到
于是有了一下添加
diff --git a/project/image/image.mk b/project/image/image.mk
index 174f8dddc..81040db12 100755
--- a/project/image/image.mk
+++ b/project/image/image.mk
@@ -7,6 +7,8 @@ BOOT_TARGET_FSIMAGE:=$(foreach n,$(BOOT_FSIMAGE_LIST),$(n)_$(FLASH_TYPE)_$($(n)$BOOT_TARGET_NOFSIMAGE:=$(foreach n,$(filter-out $(BOOT_FSIMAGE_LIST), $(BOOT_IMAGE_LIST)),$(n)_nofsimage)MKYAFFS2IMAGE=/work/projects/build/linux/sbin/mkyaffs2image610MKCRAMFS=$(shell which mkcramfs || which mkfs.cramfs)
+KERNEL_DTB_FILE:=$(PROJ_ROOT)/../kernel/arch/arm/boot/kernel.dtb
+KERNEL_DTB_BIT:=$(shell test -f $(KERNEL_DTB_FILE) && echo ye