MPSOC之4——petalinux提取源码

petalinux使用太不方便,捆绑的太死板,也不通用,还不如直接用编译器来的简单高效。
本文说明从petalinux中提取出源代码的过程,前提是已经petalinux-build完成。

1. uboot

编译结果里没有uboot的源码,可能是编译完了就删除了。
从git上下载吧。

git clone https://github.com/Xilinx/u-boot-xlnx.git

2. linux

分析log文件太费劲了,直接查找linux内核的文件,获取内核源码。

[liuwanpeng@localhost xilinx-zcu102-2017.2]$ find ./ -name "core.c" -print
./build/tmp/sysroots/plnx_aarch64/usr/lib/perl/ptest/ext/XS-APItest/core.c
./build/tmp/work-shared/plnx_aarch64/kernel-source/arch/arm/mach-cns3xxx/core.c
./build/tmp/work-shared/plnx_aarch64/kernel-source/arch/arm/mach-ebsa110/core.c
linux目录在:./build/tmp/work-shared/plnx_aarch64/kernel-source/

3.dts

使用petalinux根据bsp建立工程以后,会在prebuild文件夹生产system.dtb,用dtc反汇编可获取dts文件

4.rootfs

编译完成后,./image/linux中有编译好的rootfs

5 编译器提取

暂时不提取,后续如果别的机器不安装petalinux时,再把编译器单独提取出来。

posted @ 2017-12-20 16:02  liuwanpeng  阅读(4035)  评论(1编辑  收藏  举报