本文主要是介绍反编译dtb文件,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在目录下
android/out/target/product/项目名/obj/KERNEL_OBJ
scripts/dtc/dtc -I dtb -O dts -o now.dts arch/arm/boot/dts/qcom/生成的.dtb
然后分析now.dts即为反编译生成的总的dts
修改了dtsi/dts需要将obj/KERNEL_OBJ目录删除掉,或手动touch一下新修改文件的时间,才能生效(确保编译到的话,可以加可产生编译错误的代码确认)
查找dtb生成的方法,只有.dts的文件才会生成dtb及中间文件
find ./ -iname *.dtb.dts.tmp
find ./linux-kernel/ -iname *.dtb.dts.tmp
./linux-kernel/arch/arm64/boot/dts/ti/.k3-j721e-common-proc-board.dtb.dts.tmp
./linux-kernel/arch/arm64/boot/dts/ti/.k3-j721e-proc-board-tps65917.dtb.dts.tmpfind ./linux-kernel/arch/arm64/boot/dts/ti/ -iname *dtb
./linux-kernel/arch/arm64/boot/dts/ti/k3-j721e-proc-board-tps65917.dtb
./linux-kernel/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dtb
dtbo不识别
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
make sure you've compiled with -@
发现ok的有__symbols__
设备树知识小全(六):设备节点及label的命名
board-support/linux-kernel/scripts/Makefile.lib
@@ -320,7 +320,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb FORCEquiet_cmd_dtc = DTC $@cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \$(DTC) -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \
- $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
+ $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) -@ \-d $(depfile).dtc.tmp $(dtc-tmp) ; \cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
这篇关于反编译dtb文件的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!